@0xmonaco/types 1.0.69 → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -878,6 +878,296 @@ export interface paths {
878
878
  patch?: never;
879
879
  trace?: never;
880
880
  };
881
+ "/api/v1/copy-trading/follows": {
882
+ parameters: {
883
+ query?: never;
884
+ header?: never;
885
+ path?: never;
886
+ cookie?: never;
887
+ };
888
+ /**
889
+ * List your follows
890
+ * @description List your follows.
891
+ *
892
+ * Every follow you have made (live and stopped), newest first.
893
+ */
894
+ get: operations["list_my_follows"];
895
+ put?: never;
896
+ /**
897
+ * Follow a lead trader or edit a follow
898
+ * @description Follow a lead trader or edit a follow.
899
+ *
900
+ * Without `followId`, creates a follow: `allocation` moves from your margin
901
+ * account into a new copy account for this leader, and from then on the
902
+ * leader's fills are mirrored into it. With `followId`, edits that follow
903
+ * (it must be yours): the leader comes from the follow, so an edit works even
904
+ * after the leader releases their handle, and `leader` may be empty; a
905
+ * `leader` handle that names a different leader is refused. `copyExisting`
906
+ * copies the leader's open positions into the new copy account at creation
907
+ * (see PreviewFollow for what that costs); it applies only to a create, and
908
+ * an edit that sets it is refused.
909
+ */
910
+ post: operations["upsert_follow"];
911
+ delete?: never;
912
+ options?: never;
913
+ head?: never;
914
+ patch?: never;
915
+ trace?: never;
916
+ };
917
+ "/api/v1/copy-trading/follows/preview": {
918
+ parameters: {
919
+ query?: never;
920
+ header?: never;
921
+ path?: never;
922
+ cookie?: never;
923
+ };
924
+ get?: never;
925
+ put?: never;
926
+ /**
927
+ * Preview copying a lead trader's open positions
928
+ * @description Preview copying a leader's open positions.
929
+ *
930
+ * What a follow with these terms would open if it set `copyExisting`, as
931
+ * totals only: the estimated margin and fees, and how many of the leader's
932
+ * positions would and would not be copied. It names no pair, side or
933
+ * reason. Read-only; nothing is placed or reserved. The same session rules
934
+ * and follow terms rules as following apply, it is refused while copy
935
+ * trading is off, and it spends the order-risk preview budget. At most 64
936
+ * positions are sized; `truncated` says when more matched.
937
+ */
938
+ post: operations["preview_follow"];
939
+ delete?: never;
940
+ options?: never;
941
+ head?: never;
942
+ patch?: never;
943
+ trace?: never;
944
+ };
945
+ "/api/v1/copy-trading/follows/{followId}": {
946
+ parameters: {
947
+ query?: never;
948
+ header?: never;
949
+ path?: never;
950
+ cookie?: never;
951
+ };
952
+ /**
953
+ * Get one of your follows
954
+ * @description Get one of your follows.
955
+ *
956
+ * The follow plus its most recent skipped mirrors (up to 100, newest
957
+ * first). 404 unless the follow is yours.
958
+ */
959
+ get: operations["get_follow"];
960
+ put?: never;
961
+ post?: never;
962
+ delete?: never;
963
+ options?: never;
964
+ head?: never;
965
+ patch?: never;
966
+ trace?: never;
967
+ };
968
+ "/api/v1/copy-trading/follows/{followId}/leader-positions": {
969
+ parameters: {
970
+ query?: never;
971
+ header?: never;
972
+ path?: never;
973
+ cookie?: never;
974
+ };
975
+ /**
976
+ * List the open positions of a followed lead trader
977
+ * @description List the open positions of the leader one of your follows copies.
978
+ *
979
+ * The leader comes from the follow, so this works even after the leader
980
+ * releases their handle. 404 unless the follow is yours; 403 unless it is
981
+ * live (ACTIVE or CLOSE_ONLY).
982
+ */
983
+ get: operations["list_follow_leader_positions"];
984
+ put?: never;
985
+ post?: never;
986
+ delete?: never;
987
+ options?: never;
988
+ head?: never;
989
+ patch?: never;
990
+ trace?: never;
991
+ };
992
+ "/api/v1/copy-trading/follows/{followId}/stop": {
993
+ parameters: {
994
+ query?: never;
995
+ header?: never;
996
+ path?: never;
997
+ cookie?: never;
998
+ };
999
+ get?: never;
1000
+ put?: never;
1001
+ /**
1002
+ * Stop a follow
1003
+ * @description Stop a follow.
1004
+ *
1005
+ * Stops mirroring the leader. Stopping one of your own follows only; the
1006
+ * follow is identified by its id. An exit is never gated beyond ownership,
1007
+ * except that a delegated agent session cannot stop a follow.
1008
+ */
1009
+ post: operations["stop_follow"];
1010
+ delete?: never;
1011
+ options?: never;
1012
+ head?: never;
1013
+ patch?: never;
1014
+ trace?: never;
1015
+ };
1016
+ "/api/v1/copy-trading/leaders": {
1017
+ parameters: {
1018
+ query?: never;
1019
+ header?: never;
1020
+ path?: never;
1021
+ cookie?: never;
1022
+ };
1023
+ /**
1024
+ * List lead traders
1025
+ * @description List lead traders.
1026
+ *
1027
+ * The public leaderboard: every ACTIVE lead trader with their stats for one
1028
+ * window, sorted by the chosen metric (highest first; leaders without a
1029
+ * value for the metric come last). Served from a snapshot refreshed about
1030
+ * once a minute; `asOf` is its time.
1031
+ */
1032
+ get: operations["list_lead_traders"];
1033
+ put?: never;
1034
+ post?: never;
1035
+ delete?: never;
1036
+ options?: never;
1037
+ head?: never;
1038
+ patch?: never;
1039
+ trace?: never;
1040
+ };
1041
+ "/api/v1/copy-trading/leaders/me": {
1042
+ parameters: {
1043
+ query?: never;
1044
+ header?: never;
1045
+ path?: never;
1046
+ cookie?: never;
1047
+ };
1048
+ /**
1049
+ * Get your lead trader profile
1050
+ * @description Get your lead trader profile.
1051
+ *
1052
+ * Your profile, follow summary and stats for every window. 404 when you
1053
+ * are not a lead trader.
1054
+ */
1055
+ get: operations["get_my_lead_trader"];
1056
+ /**
1057
+ * Register as a lead trader or edit your profile
1058
+ * @description Register as a lead trader or edit your profile.
1059
+ *
1060
+ * A registration is checked against the platform's eligibility rules:
1061
+ * account equity, trading history, closed positions, and a claimed custom
1062
+ * TraderCode handle. The profile is replaced as sent: an omitted `bio` or
1063
+ * `minAllocation` clears it and an omitted `status` means ACTIVE; an
1064
+ * omitted `shareBps` keeps the current share (the platform default on a
1065
+ * registration). A follower with a live follow cannot register.
1066
+ */
1067
+ put: operations["upsert_lead_trader"];
1068
+ post?: never;
1069
+ delete?: never;
1070
+ options?: never;
1071
+ head?: never;
1072
+ patch?: never;
1073
+ trace?: never;
1074
+ };
1075
+ "/api/v1/copy-trading/leaders/me/followers": {
1076
+ parameters: {
1077
+ query?: never;
1078
+ header?: never;
1079
+ path?: never;
1080
+ cookie?: never;
1081
+ };
1082
+ /**
1083
+ * List your followers
1084
+ * @description List your current followers.
1085
+ *
1086
+ * Your live followers (ACTIVE or CLOSE_ONLY), newest first. Each follower
1087
+ * appears by wallet address and display string.
1088
+ */
1089
+ get: operations["list_my_followers"];
1090
+ put?: never;
1091
+ post?: never;
1092
+ delete?: never;
1093
+ options?: never;
1094
+ head?: never;
1095
+ patch?: never;
1096
+ trace?: never;
1097
+ };
1098
+ "/api/v1/copy-trading/leaders/{leader}": {
1099
+ parameters: {
1100
+ query?: never;
1101
+ header?: never;
1102
+ path?: never;
1103
+ cookie?: never;
1104
+ };
1105
+ /**
1106
+ * Get a lead trader
1107
+ * @description Get a lead trader's profile.
1108
+ *
1109
+ * Profile, follow summary and stats for every window. `leader` is the
1110
+ * custom TraderCode handle. 404 for an unknown or
1111
+ * suspended leader.
1112
+ */
1113
+ get: operations["get_lead_trader"];
1114
+ put?: never;
1115
+ post?: never;
1116
+ delete?: never;
1117
+ options?: never;
1118
+ head?: never;
1119
+ patch?: never;
1120
+ trace?: never;
1121
+ };
1122
+ "/api/v1/copy-trading/leaders/{leader}/closed-trades": {
1123
+ parameters: {
1124
+ query?: never;
1125
+ header?: never;
1126
+ path?: never;
1127
+ cookie?: never;
1128
+ };
1129
+ /**
1130
+ * List a lead trader's closed trades
1131
+ * @description List a lead trader's closed trades.
1132
+ *
1133
+ * The leader's reducing executions (partial and full closes, liquidations
1134
+ * and auto-deleveraging), newest first.
1135
+ */
1136
+ get: operations["list_lead_trader_closed_trades"];
1137
+ put?: never;
1138
+ post?: never;
1139
+ delete?: never;
1140
+ options?: never;
1141
+ head?: never;
1142
+ patch?: never;
1143
+ trace?: never;
1144
+ };
1145
+ "/api/v1/copy-trading/leaders/{leader}/positions": {
1146
+ parameters: {
1147
+ query?: never;
1148
+ header?: never;
1149
+ path?: never;
1150
+ cookie?: never;
1151
+ };
1152
+ /**
1153
+ * List a followed lead trader's open positions
1154
+ * @description List a lead trader's open positions.
1155
+ *
1156
+ * Visible to the leader's current followers only: the caller must hold a
1157
+ * live follow (ACTIVE or CLOSE_ONLY) of this leader in the session's
1158
+ * application. The leader is addressed by handle; a released handle names
1159
+ * no one (another user may claim it), so it is a 404 even for a current
1160
+ * follower.
1161
+ */
1162
+ get: operations["list_lead_trader_open_positions"];
1163
+ put?: never;
1164
+ post?: never;
1165
+ delete?: never;
1166
+ options?: never;
1167
+ head?: never;
1168
+ patch?: never;
1169
+ trace?: never;
1170
+ };
881
1171
  "/api/v1/delegated-agents": {
882
1172
  parameters: {
883
1173
  query?: never;
@@ -3696,6 +3986,34 @@ export interface components {
3696
3986
  message?: string | null;
3697
3987
  submittedQuantity?: string | null;
3698
3988
  };
3989
+ ClosedTrade: {
3990
+ /**
3991
+ * Format: uuid
3992
+ * @description Trading pair UUID
3993
+ */
3994
+ tradingPairId?: string | null;
3995
+ /** @description LONG or SHORT; empty on legacy rows */
3996
+ positionSide?: string | null;
3997
+ /**
3998
+ * @description DECREASE, CLOSE, LIQUIDATE or ADL
3999
+ * @example CLOSE
4000
+ */
4001
+ action?: string | null;
4002
+ /** @description Closed size in base units */
4003
+ size?: string | null;
4004
+ /** @description Execution price */
4005
+ exitPrice?: string | null;
4006
+ /** @description Average entry price of the position at the close */
4007
+ entryPrice?: string | null;
4008
+ /** @description Gross realized PnL of the execution, in quote units */
4009
+ realizedPnl?: string | null;
4010
+ /** @description Realized PnL net of the execution's fees and funding, in quote units */
4011
+ netRealizedPnl?: string | null;
4012
+ /** @description Net realized PnL as a percentage of the initial margin released by the execution */
4013
+ realizedRoe?: string | null;
4014
+ /** @description Execution time (RFC 3339) */
4015
+ closedAt?: string | null;
4016
+ };
3699
4017
  ConditionalOrder: {
3700
4018
  conditionalOrderId?: string | null;
3701
4019
  /** Format: uuid */
@@ -3746,6 +4064,27 @@ export interface components {
3746
4064
  /** @description TRAILING_STOP only: when tracking began. Absent while the stop is still waiting for activationPrice (state stays ACTIVE in both phases). */
3747
4065
  trailArmedAt?: string | null;
3748
4066
  };
4067
+ /** @description A follow's market filter. */
4068
+ CopyMarketFilter: {
4069
+ /** @description Trading pair UUIDs to copy (at most 256); empty means every market. */
4070
+ tradingPairIds?: string[] | null;
4071
+ };
4072
+ CopySkip: {
4073
+ /**
4074
+ * Format: uuid
4075
+ * @description Trading pair UUID of the leader fill that was not mirrored
4076
+ */
4077
+ tradingPairId?: string | null;
4078
+ /**
4079
+ * @description Why the mirror was skipped, e.g. INSUFFICIENT_MARGIN, BELOW_MIN, MARKET_STATE, LEVERAGE_MISMATCH
4080
+ * @example INSUFFICIENT_MARGIN
4081
+ */
4082
+ reason?: string | null;
4083
+ /** @description The copy quantity that could not be placed, in base units */
4084
+ requestedQuantity?: string | null;
4085
+ /** @description When the mirror was skipped (RFC 3339) */
4086
+ skippedAt?: string | null;
4087
+ };
3749
4088
  CreateDelegatedSessionRequest: {
3750
4089
  /**
3751
4090
  * Format: uuid
@@ -4184,7 +4523,7 @@ export interface components {
4184
4523
  maxOrderNotional?: string | null;
4185
4524
  /**
4186
4525
  * Format: int32
4187
- * @description Maximum concurrent open orders, if set
4526
+ * @description Legacy field; no concurrent open-order cap is enforced. New or updated policies leave it unset.
4188
4527
  */
4189
4528
  maxOpenOrders?: number | null;
4190
4529
  };
@@ -4297,6 +4636,72 @@ export interface components {
4297
4636
  */
4298
4637
  takerFeeBps?: string | null;
4299
4638
  };
4639
+ Follow: {
4640
+ /**
4641
+ * Format: uuid
4642
+ * @description The follow's id
4643
+ */
4644
+ followId?: string | null;
4645
+ /** @description The leader followed. */
4646
+ leader?: components["schemas"]["LeadTraderRef"] | null;
4647
+ /**
4648
+ * @description ACTIVE, CLOSE_ONLY (only reductions mirror) or STOPPED
4649
+ * @example ACTIVE
4650
+ */
4651
+ status?: string | null;
4652
+ /** @description FOLLOW, CROSS or ISOLATED */
4653
+ marginModePolicy?: string | null;
4654
+ /** @description PROPORTIONAL or FIXED_MARGIN */
4655
+ sizingMode?: string | null;
4656
+ /** @description Margin per leader order for FIXED_MARGIN, in quote units */
4657
+ sizingParam?: string | null;
4658
+ /** @description FOLLOW or FIXED */
4659
+ leverageMode?: string | null;
4660
+ /** @description Leverage for FIXED */
4661
+ fixedLeverage?: string | null;
4662
+ /** @description Collateral allocated to the follow, in quote units */
4663
+ allocation?: string | null;
4664
+ /** @description Copy stop-loss as a fraction of the allocation */
4665
+ slPct?: string | null;
4666
+ /** @description Whether the follow copied the leader's open positions at creation */
4667
+ copyExisting?: boolean | null;
4668
+ /** @description Trading pair UUIDs copied; empty means every market. */
4669
+ tradingPairIds?: string[] | null;
4670
+ /**
4671
+ * Format: uint32
4672
+ * @description Consecutive mirrors skipped for insufficient margin
4673
+ */
4674
+ consecutiveSkips?: number | null;
4675
+ /**
4676
+ * Format: uuid
4677
+ * @description The copy account's cross risk bucket in your margin account
4678
+ */
4679
+ copyRiskBucketId?: string | null;
4680
+ /** @description When the follow started (RFC 3339) */
4681
+ startedAt?: string | null;
4682
+ /** @description When the follow stopped (RFC 3339) */
4683
+ stoppedAt?: string | null;
4684
+ /** @description FOLLOWER, STOP_LOSS, SKIP_LIMIT, ADMIN or LEADER_SUSPENDED */
4685
+ stopReason?: string | null;
4686
+ };
4687
+ Follower: {
4688
+ /** @description The follower's wallet address (lowercase hex) */
4689
+ walletAddress?: string | null;
4690
+ /** @description The follower's custom TraderCode handle when claimed, else the wallet address */
4691
+ display?: string | null;
4692
+ /**
4693
+ * @description ACTIVE or CLOSE_ONLY
4694
+ * @example ACTIVE
4695
+ */
4696
+ status?: string | null;
4697
+ /**
4698
+ * @description Collateral allocated to the follow, in quote units
4699
+ * @example 1000
4700
+ */
4701
+ allocation?: string | null;
4702
+ /** @description When the follow started (RFC 3339) */
4703
+ startedAt?: string | null;
4704
+ };
4300
4705
  FundingPaymentRecord: {
4301
4706
  /**
4302
4707
  * Format: uuid
@@ -4644,6 +5049,17 @@ export interface components {
4644
5049
  */
4645
5050
  recentRequests?: components["schemas"]["FaucetRequestRecord"][] | null;
4646
5051
  };
5052
+ GetFollowResponse: {
5053
+ /** @description The follow. */
5054
+ follow?: components["schemas"]["Follow"] | null;
5055
+ /** @description Most recent skipped mirrors, newest first (up to 100). */
5056
+ recentSkips?: components["schemas"]["CopySkip"][] | null;
5057
+ /**
5058
+ * @description The copy account's equity at the engine's marks, in quote units: its collateral plus the unrealized PnL of its positions. Absent when the engine could not be read. A balance, not trading PnL
5059
+ * @example 1042.75
5060
+ */
5061
+ copyAccountEquity?: string | null;
5062
+ };
4647
5063
  GetFundingStateResponse: {
4648
5064
  /** Format: uuid */
4649
5065
  tradingPairId?: string | null;
@@ -4682,6 +5098,14 @@ export interface components {
4682
5098
  components?: components["schemas"]["IndexComponent"][] | null;
4683
5099
  updatedAt?: string | null;
4684
5100
  };
5101
+ GetLeadTraderResponse: {
5102
+ /** @description The leader's profile. */
5103
+ profile?: components["schemas"]["LeadTraderProfile"] | null;
5104
+ /** @description Current followers and allocation. */
5105
+ followSummary?: components["schemas"]["LeadTraderFollowSummary"] | null;
5106
+ /** @description Stats for 7d, 30d, 90d and all, in that order. */
5107
+ stats?: components["schemas"]["LeadTraderStats"][] | null;
5108
+ };
4685
5109
  GetLimitsResponse: {
4686
5110
  limits?: components["schemas"]["SubAccountLimit"][] | null;
4687
5111
  };
@@ -4730,6 +5154,12 @@ export interface components {
4730
5154
  withdrawableCollateral?: string | null;
4731
5155
  totalPositionNotional?: string | null;
4732
5156
  unrealizedPnl?: string | null;
5157
+ /**
5158
+ * @description On a risk bucket row this is the risk bucket's cash balance (realized
5159
+ * closes, funding and transfers between a copy account's risk buckets land
5160
+ * here), not trading profit; trading PnL comes from position history and
5161
+ * the portfolio PnL endpoints.
5162
+ */
4733
5163
  realizedPnl?: string | null;
4734
5164
  updatedAt?: string | null;
4735
5165
  label?: string | null;
@@ -4747,6 +5177,13 @@ export interface components {
4747
5177
  * rows and persisted-fallback reads.
4748
5178
  */
4749
5179
  availableOrderCollateral?: string | null;
5180
+ /**
5181
+ * Format: uuid
5182
+ * @description On a copy risk bucket row, the id of the follow (copy account) that funds it
5183
+ */
5184
+ copyFollowId?: string | null;
5185
+ /** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
5186
+ copyLeaderHandle?: string | null;
4750
5187
  };
4751
5188
  GetMarkPriceResponse: {
4752
5189
  /** Format: uuid */
@@ -4874,7 +5311,7 @@ export interface components {
4874
5311
  movements?: components["schemas"]["LedgerMovement"][] | null;
4875
5312
  /**
4876
5313
  * Format: uint32
4877
- * @description Total number of movements
5314
+ * @description Matching movements. Exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a user with more matching movements than the listing can page through reads the cap, not their lifetime total.
4878
5315
  * @example 150
4879
5316
  */
4880
5317
  total?: number | null;
@@ -4892,7 +5329,7 @@ export interface components {
4892
5329
  pageSize?: number | null;
4893
5330
  /**
4894
5331
  * Format: uint32
4895
- * @description Total number of pages
5332
+ * @description Number of pages at the requested page size. Exact up to 10,000 and saturates there, the last page this listing can reach.
4896
5333
  * @example 8
4897
5334
  */
4898
5335
  totalPages?: number | null;
@@ -5937,43 +6374,18 @@ export interface components {
5937
6374
  };
5938
6375
  GetUserTradesResponse: {
5939
6376
  trades?: components["schemas"]["UserTrade"][] | null;
5940
- /**
5941
- * @deprecated
5942
- * @description Deprecated: current page number (legacy offset mode only; 0 in cursor mode)
5943
- * @example 1
5944
- */
5945
- page?: string | null;
5946
6377
  /**
5947
6378
  * @description Items per page
5948
6379
  * @example 20
5949
6380
  */
5950
6381
  pageSize?: string | null;
5951
6382
  /**
5952
- * @deprecated
5953
- * @description Deprecated: total matching trades (legacy page-number mode only; 0 in cursor mode). Exact up to pageSize x 10,000 rows and saturates there. Use pageToken cursor pagination instead.
5954
- * @example 150
5955
- */
5956
- total?: string | null;
5957
- /**
5958
- * @deprecated
5959
- * @description Deprecated: total pages at this pageSize (legacy page-number mode only; 0 in cursor mode). Exact up to 10,000 and saturates there. Use pageToken cursor pagination instead.
5960
- * @example 8
5961
- */
5962
- totalPages?: string | null;
5963
- /**
5964
- * @description Cursor for the next page. Empty on every page-number (legacy) response —
5965
- * page-number mode never mints a token, full page or not, since resuming
5966
- * a client from a legacy-minted position could silently strand archived
5967
- * history newer than wherever that page happened to end. To walk full
5968
- * history, start a cursor-mode request with `page_token` present but
5969
- * empty (`""`); from then on the token is present whenever that page
5970
- * returned any rows (AIP-158 "maybe more" semantics), not only when the
5971
- * page is exactly full. Empty only when a cursor-mode page returned zero
5972
- * rows, which is the sole proof the walk is exhausted; a non-empty token
5973
- * does not guarantee further results, so keep following it until a
5974
- * response returns zero rows and an empty token. The two modes never
5975
- * bridge: a page-number response's empty token is not "done," it simply
5976
- * means page-number mode does not participate in cursor continuation.
6383
+ * @description Cursor for the next page. Present whenever that page returned any rows
6384
+ * (AIP-158 "maybe more" semantics), not only when the page is exactly full.
6385
+ * Empty only when a page returned zero rows, which is the sole proof the
6386
+ * walk is exhausted; a non-empty token does not guarantee further results,
6387
+ * so keep following it until a response returns zero rows and an empty
6388
+ * token.
5977
6389
  */
5978
6390
  nextPageToken?: string | null;
5979
6391
  };
@@ -6006,6 +6418,136 @@ export interface components {
6006
6418
  */
6007
6419
  source?: string | null;
6008
6420
  };
6421
+ /** @description Current followers and the collateral they have allocated. Window-free. */
6422
+ LeadTraderFollowSummary: {
6423
+ /**
6424
+ * Format: uint32
6425
+ * @description Live follows (ACTIVE or CLOSE_ONLY)
6426
+ * @example 12
6427
+ */
6428
+ followerCount?: number | null;
6429
+ /**
6430
+ * @description Collateral allocated by live follows, in quote units (AUM as allocated, not marked)
6431
+ * @example 25000
6432
+ */
6433
+ allocated?: string | null;
6434
+ /**
6435
+ * @description Equity of live follows' copy accounts at the engine's marks, in quote units (AUM marked: collateral plus unrealized PnL of copy positions). Absent when it could not be read. Not trading PnL
6436
+ * @example 25400.5
6437
+ */
6438
+ aumEquity?: string | null;
6439
+ };
6440
+ LeadTraderListing: {
6441
+ /** @description The leader's profile. */
6442
+ profile?: components["schemas"]["LeadTraderProfile"] | null;
6443
+ /** @description Current followers and allocation. */
6444
+ followSummary?: components["schemas"]["LeadTraderFollowSummary"] | null;
6445
+ /** @description Stats for the requested window. */
6446
+ stats?: components["schemas"]["LeadTraderStats"] | null;
6447
+ };
6448
+ LeadTraderOpenPosition: {
6449
+ /**
6450
+ * Format: uuid
6451
+ * @description Trading pair UUID
6452
+ */
6453
+ tradingPairId?: string | null;
6454
+ /** @description LONG or SHORT */
6455
+ side?: string | null;
6456
+ /** @description Position size in base units */
6457
+ size?: string | null;
6458
+ /** @description Average entry price */
6459
+ entryPrice?: string | null;
6460
+ /** @description Current mark price */
6461
+ markPrice?: string | null;
6462
+ /** @description Unrealized PnL at the mark, in quote units */
6463
+ unrealizedPnl?: string | null;
6464
+ /** @description Position leverage */
6465
+ leverage?: string | null;
6466
+ /** @description CROSS or ISOLATED */
6467
+ marginMode?: string | null;
6468
+ };
6469
+ LeadTraderProfile: {
6470
+ /** @description Who the leader is. */
6471
+ leader?: components["schemas"]["LeadTraderRef"] | null;
6472
+ /**
6473
+ * @description ACTIVE (accepting follows), PAUSED (existing follows keep mirroring, no new follows) or SUSPENDED (only on your own profile)
6474
+ * @example ACTIVE
6475
+ */
6476
+ status?: string | null;
6477
+ /**
6478
+ * Format: uint32
6479
+ * @description The leader's share of followers' realized profit, in basis points
6480
+ * @example 1000
6481
+ */
6482
+ shareBps?: number | null;
6483
+ /** @description Free-text profile description; empty when none */
6484
+ bio?: string | null;
6485
+ /**
6486
+ * @description The leader's minimum follow allocation in quote units, when above the platform floor
6487
+ * @example 1000
6488
+ */
6489
+ minAllocation?: string | null;
6490
+ /**
6491
+ * @description Registration time (RFC 3339)
6492
+ * @example 2026-09-23T12:00:00Z
6493
+ */
6494
+ registeredAt?: string | null;
6495
+ };
6496
+ /** @description A lead trader as the public sees them: never an internal id. */
6497
+ LeadTraderRef: {
6498
+ /**
6499
+ * @description The leader's wallet address (lowercase hex)
6500
+ * @example 0x1234567890abcdef1234567890abcdef12345678
6501
+ */
6502
+ walletAddress?: string | null;
6503
+ /**
6504
+ * @description The leader's custom TraderCode handle, when claimed
6505
+ * @example alpha_trader
6506
+ */
6507
+ handle?: string | null;
6508
+ /**
6509
+ * @description The handle when claimed, else the wallet address (every listed or addressable leader has a handle)
6510
+ * @example alpha_trader
6511
+ */
6512
+ display?: string | null;
6513
+ };
6514
+ /**
6515
+ * @description A leader's trading performance over one window, from the account PnL
6516
+ * rollups. Bucket balances never feed these numbers.
6517
+ */
6518
+ LeadTraderStats: {
6519
+ /**
6520
+ * @description 7d, 30d, 90d or all
6521
+ * @example 30d
6522
+ */
6523
+ window?: string | null;
6524
+ /**
6525
+ * @description Trading PnL over the window in quote units: realized plus unrealized, net of fees and funding
6526
+ * @example 1250.5
6527
+ */
6528
+ pnl?: string | null;
6529
+ /**
6530
+ * @description PnL as a percentage of the highest base balance (starting equity plus net deposits) over the window; absent when that base is not positive
6531
+ * @example 12.5
6532
+ */
6533
+ roiPct?: string | null;
6534
+ /**
6535
+ * @description Largest peak-to-trough fall of cumulative PnL over the window, as a percentage of the highest base balance; sampled at the window's rollup interval (1h for 7d, 4h for 30d and 90d, 1d for all)
6536
+ * @example 4.2
6537
+ */
6538
+ maxDrawdownPct?: string | null;
6539
+ /**
6540
+ * @description Winning closes as a percentage of winning plus losing closes over the window; absent when there were none
6541
+ * @example 61.5
6542
+ */
6543
+ winRatePct?: string | null;
6544
+ /**
6545
+ * Format: uint32
6546
+ * @description Closes over the window, break-even included
6547
+ * @example 40
6548
+ */
6549
+ closedTrades?: number | null;
6550
+ };
6009
6551
  LedgerMovement: {
6010
6552
  /**
6011
6553
  * Format: uuid
@@ -6283,23 +6825,17 @@ export interface components {
6283
6825
  orders?: components["schemas"]["ConditionalOrder"][] | null;
6284
6826
  /**
6285
6827
  * Format: uint32
6286
- * @description Matching conditional orders in page-number (offset) mode: exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more matching conditional orders than the listing can page through reads the cap, not its lifetime total. 0 in cursor (pageToken) mode, which runs no COUNT (AIP-158).
6828
+ * @description Matching conditional orders, counted up to a server ceiling of 10,000 and saturating there, so a caller with more than that reads the cap rather than a lifetime total.
6287
6829
  * @example 3
6288
6830
  */
6289
6831
  total?: number | null;
6290
- /**
6291
- * Format: uint32
6292
- * @deprecated
6293
- * @description Deprecated: current page number (legacy offset mode only; 0 in cursor mode)
6294
- */
6295
- page?: number | null;
6296
6832
  /** Format: uint32 */
6297
6833
  pageSize?: number | null;
6298
6834
  /**
6299
6835
  * @description Cursor for the next page, minted only when a further page exists — the
6300
6836
  * read over-fetches one row to decide, so there is no "maybe more" state.
6301
- * Empty on every page-number (legacy) response, and empty on the final
6302
- * cursor page (including a full final page, since nothing follows it).
6837
+ * Empty on the final page (including a full final page, since nothing
6838
+ * follows it).
6303
6839
  * Follow it until it comes back empty; that empty token is the definitive
6304
6840
  * end of the walk, so no extra zero-row request is needed. Do not feed the
6305
6841
  * empty token back as `page_token` — an empty input `page_token` restarts
@@ -6315,6 +6851,9 @@ export interface components {
6315
6851
  /** @description The calling owner's delegated agents */
6316
6852
  agents?: components["schemas"]["DelegatedAgent"][] | null;
6317
6853
  };
6854
+ ListFollowLeaderPositionsResponse: {
6855
+ positions?: components["schemas"]["LeadTraderOpenPosition"][] | null;
6856
+ };
6318
6857
  ListFundingHistoryResponse: {
6319
6858
  records?: components["schemas"]["FundingRecord"][] | null;
6320
6859
  /** Format: uint32 */
@@ -6328,7 +6867,7 @@ export interface components {
6328
6867
  records?: components["schemas"]["FundingPaymentRecord"][] | null;
6329
6868
  /**
6330
6869
  * Format: uint32
6331
- * @description Total matching funding payment records
6870
+ * @description Matching funding payment records. Exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a user with more matching payments than the listing can page through reads the cap, not their lifetime total.
6332
6871
  * @example 2
6333
6872
  */
6334
6873
  total?: number | null;
@@ -6346,11 +6885,26 @@ export interface components {
6346
6885
  pageSize?: number | null;
6347
6886
  /**
6348
6887
  * Format: uint32
6349
- * @description Total number of pages
6888
+ * @description Number of pages at the requested page size. Exact up to 10,000 and saturates there, the last page this listing can reach.
6350
6889
  * @example 1
6351
6890
  */
6352
6891
  totalPages?: number | null;
6353
6892
  };
6893
+ ListLeadTraderClosedTradesResponse: {
6894
+ closedTrades?: components["schemas"]["ClosedTrade"][] | null;
6895
+ /** @description Cursor for the next page; empty when there are no more. */
6896
+ nextPageToken?: string | null;
6897
+ };
6898
+ ListLeadTraderOpenPositionsResponse: {
6899
+ positions?: components["schemas"]["LeadTraderOpenPosition"][] | null;
6900
+ };
6901
+ ListLeadTradersResponse: {
6902
+ leaders?: components["schemas"]["LeadTraderListing"][] | null;
6903
+ /** @description Cursor for the next page; empty when there are no more. */
6904
+ nextPageToken?: string | null;
6905
+ /** @description Time of the leaderboard snapshot these rows come from (RFC 3339) */
6906
+ asOf?: string | null;
6907
+ };
6354
6908
  ListManagedMarketAssignmentsResponse: {
6355
6909
  /** @description Expected assignments, including phases currently unable to quote. */
6356
6910
  items?: components["schemas"]["ManagedMarketAssignment"][] | null;
@@ -6371,6 +6925,16 @@ export interface components {
6371
6925
  /** Format: uint32 */
6372
6926
  pageSize?: number | null;
6373
6927
  };
6928
+ ListMyFollowersResponse: {
6929
+ followers?: components["schemas"]["Follower"][] | null;
6930
+ /** @description Cursor for the next page; empty when there are no more. */
6931
+ nextPageToken?: string | null;
6932
+ };
6933
+ ListMyFollowsResponse: {
6934
+ follows?: components["schemas"]["Follow"][] | null;
6935
+ /** @description Cursor for the next page; empty when there are no more. */
6936
+ nextPageToken?: string | null;
6937
+ };
6374
6938
  ListOrdersResponse: {
6375
6939
  orders?: components["schemas"]["GetOrderResponse"][] | null;
6376
6940
  /**
@@ -6379,13 +6943,6 @@ export interface components {
6379
6943
  * @example 150
6380
6944
  */
6381
6945
  total?: number | null;
6382
- /**
6383
- * Format: uint32
6384
- * @deprecated
6385
- * @description Deprecated: current page number (legacy offset mode only; 0 in cursor mode)
6386
- * @example 1
6387
- */
6388
- page?: number | null;
6389
6946
  /**
6390
6947
  * Format: uint32
6391
6948
  * @description Items per page
@@ -6399,19 +6956,12 @@ export interface components {
6399
6956
  */
6400
6957
  totalPages?: number | null;
6401
6958
  /**
6402
- * @description Cursor for the next page. Empty on every page-number (legacy) response —
6403
- * page-number mode never mints a token, full page or not, since resuming
6404
- * a client from a legacy-minted position could silently strand archived
6405
- * history newer than wherever that page happened to end. To walk full
6406
- * history, start a cursor-mode request with `page_token` present but
6407
- * empty (`""`); from then on the token is present whenever that page
6408
- * returned any rows (AIP-158 "maybe more" semantics), not only when the
6409
- * page is exactly full. Empty only when a cursor-mode page returned zero
6410
- * rows, which is the sole proof the walk is exhausted; a non-empty token
6411
- * does not guarantee further results, so keep following it until a
6412
- * response returns zero rows and an empty token. The two modes never
6413
- * bridge: a page-number response's empty token is not "done," it simply
6414
- * means page-number mode does not participate in cursor continuation.
6959
+ * @description Cursor for the next page. Present whenever that page returned any rows
6960
+ * (AIP-158 "maybe more" semantics), not only when the page is exactly full.
6961
+ * Empty only when a page returned zero rows, which is the sole proof the
6962
+ * walk is exhausted; a non-empty token does not guarantee further results,
6963
+ * so keep following it until a response returns zero rows and an empty
6964
+ * token.
6415
6965
  */
6416
6966
  nextPageToken?: string | null;
6417
6967
  /**
@@ -6514,17 +7064,10 @@ export interface components {
6514
7064
  orders?: components["schemas"]["TwapOrder"][] | null;
6515
7065
  /**
6516
7066
  * Format: uint32
6517
- * @description Matching TWAP orders in page-number (offset) mode: exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more matching TWAP orders than the listing can page through reads the cap, not its lifetime total. 0 in cursor (pageToken) mode, which runs no COUNT (AIP-158).
7067
+ * @description Matching TWAP orders, counted up to a server ceiling of 10,000 and saturating there, so a caller with more than that reads the cap rather than a lifetime total.
6518
7068
  * @example 3
6519
7069
  */
6520
7070
  total?: number | null;
6521
- /**
6522
- * Format: uint32
6523
- * @deprecated
6524
- * @description Deprecated: current page number (legacy offset mode only; 0 in cursor mode)
6525
- * @example 1
6526
- */
6527
- page?: number | null;
6528
7071
  /**
6529
7072
  * Format: uint32
6530
7073
  * @description Items per page
@@ -6534,8 +7077,8 @@ export interface components {
6534
7077
  /**
6535
7078
  * @description Cursor for the next page, minted only when a further page exists — the
6536
7079
  * read over-fetches one row to decide, so there is no "maybe more" state.
6537
- * Empty on every page-number (legacy) response, and empty on the final
6538
- * cursor page (including a full final page, since nothing follows it).
7080
+ * Empty on the final page (including a full final page, since nothing
7081
+ * follows it).
6539
7082
  * Follow it until it comes back empty; that empty token is the definitive
6540
7083
  * end of the walk, so no extra zero-row request is needed. Do not feed the
6541
7084
  * empty token back as `page_token` — an empty input `page_token` restarts
@@ -6619,6 +7162,12 @@ export interface components {
6619
7162
  withdrawableCollateral?: string | null;
6620
7163
  totalPositionNotional?: string | null;
6621
7164
  unrealizedPnl?: string | null;
7165
+ /**
7166
+ * @description On a risk bucket row this is the risk bucket's cash balance (realized
7167
+ * closes, funding and transfers between a copy account's risk buckets land
7168
+ * here), not trading profit; trading PnL comes from position history and
7169
+ * the portfolio PnL endpoints.
7170
+ */
6622
7171
  realizedPnl?: string | null;
6623
7172
  updatedAt?: string | null;
6624
7173
  label?: string | null;
@@ -6667,6 +7216,13 @@ export interface components {
6667
7216
  * neither of the gate's terms is reconstructable.
6668
7217
  */
6669
7218
  availableOrderCollateral?: string | null;
7219
+ /**
7220
+ * Format: uuid
7221
+ * @description On a copy risk bucket row, the id of the follow (copy account) that funds it
7222
+ */
7223
+ copyFollowId?: string | null;
7224
+ /** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
7225
+ copyLeaderHandle?: string | null;
6670
7226
  };
6671
7227
  MatchResult: {
6672
7228
  /**
@@ -7122,6 +7678,13 @@ export interface components {
7122
7678
  * against another.
7123
7679
  */
7124
7680
  tradingPairId?: string | null;
7681
+ /**
7682
+ * Format: uuid
7683
+ * @description On a copy risk bucket row, the id of the follow (copy account) that funds it
7684
+ */
7685
+ copyFollowId?: string | null;
7686
+ /** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
7687
+ copyLeaderHandle?: string | null;
7125
7688
  };
7126
7689
  PortfolioSeriesWindow: {
7127
7690
  /**
@@ -7398,6 +7961,75 @@ export interface components {
7398
7961
  */
7399
7962
  cumFees?: string | null;
7400
7963
  };
7964
+ PreviewFollowRequest: {
7965
+ /**
7966
+ * @description The leader's custom TraderCode handle
7967
+ * @example alpha_trader
7968
+ */
7969
+ leader?: string | null;
7970
+ /**
7971
+ * @description FOLLOW (default), CROSS or ISOLATED
7972
+ * @example FOLLOW
7973
+ */
7974
+ marginModePolicy?: string | null;
7975
+ /**
7976
+ * @description PROPORTIONAL (default) or FIXED_MARGIN
7977
+ * @example PROPORTIONAL
7978
+ */
7979
+ sizingMode?: string | null;
7980
+ /** @description Margin per leader order in quote units; required for FIXED_MARGIN, omitted otherwise */
7981
+ sizingParam?: string | null;
7982
+ /**
7983
+ * @description FOLLOW (default) or FIXED
7984
+ * @example FOLLOW
7985
+ */
7986
+ leverageMode?: string | null;
7987
+ /** @description Leverage for every copy; required for FIXED, omitted otherwise */
7988
+ fixedLeverage?: string | null;
7989
+ /**
7990
+ * @description Collateral the copy account would start with, in quote units
7991
+ * @example 1000
7992
+ */
7993
+ allocation?: string | null;
7994
+ /** @description Markets to copy; omit to copy every market the leader trades. */
7995
+ markets?: components["schemas"]["CopyMarketFilter"] | null;
7996
+ };
7997
+ /**
7998
+ * @description What following with `copyExisting` would open, as totals only. The caller
7999
+ * of a preview is never a follower of the leader (copyExisting applies only
8000
+ * on a create), so the response names no pair, side, size, mark or skip
8001
+ * reason, and a leader whose positions cannot be copied at all gives
8002
+ * `copiedPositions = 0` with no reason. The totals are rounded UP to cents
8003
+ * (the settlement currency's display precision). A residual aggregate signal
8004
+ * remains: the counts and the rounded totals across varied allocations
8005
+ * bound the size of the leader's book, never its markets or direction.
8006
+ */
8007
+ PreviewFollowResponse: {
8008
+ /**
8009
+ * @description Estimated collateral the copied positions would reserve at placement, in quote units, rounded up to cents
8010
+ * @example 125.40
8011
+ */
8012
+ estimatedMargin?: string | null;
8013
+ /**
8014
+ * @description Estimated taker fees of the copies, in quote units, rounded up to cents
8015
+ * @example 0.35
8016
+ */
8017
+ estimatedFee?: string | null;
8018
+ /**
8019
+ * Format: uint32
8020
+ * @description The leader's positions (in the copied markets) that would be copied
8021
+ * @example 2
8022
+ */
8023
+ copiedPositions?: number | null;
8024
+ /**
8025
+ * Format: uint32
8026
+ * @description The leader's positions (in the copied markets) that would not be copied
8027
+ * @example 1
8028
+ */
8029
+ skippedPositions?: number | null;
8030
+ /** @description True when the leader holds more positions in the copied markets than one preview sizes (64); the totals and counts cover the first ones only */
8031
+ truncated?: boolean | null;
8032
+ };
7401
8033
  PriceChange: {
7402
8034
  /**
7403
8035
  * @description Price 24 hours ago
@@ -8285,6 +8917,13 @@ export interface components {
8285
8917
  */
8286
8918
  slippageToleranceBps?: number | null;
8287
8919
  };
8920
+ StopFollowResponse: {
8921
+ /**
8922
+ * Format: uuid
8923
+ * @description The stopped follow's id
8924
+ */
8925
+ followId?: string | null;
8926
+ };
8288
8927
  SubAccount: {
8289
8928
  /**
8290
8929
  * Format: uuid
@@ -9139,7 +9778,7 @@ export interface components {
9139
9778
  * @description Agent wallet address (EVM, 42 chars including 0x)
9140
9779
  * @example 0x742d35cc6634c0532925a3b8d4060f31e2c3d8b5
9141
9780
  */
9142
- agentAddress?: string | null;
9781
+ agentAddress: string;
9143
9782
  /**
9144
9783
  * @description Optional human-friendly label for the agent
9145
9784
  * @example market-maker-bot
@@ -9151,26 +9790,26 @@ export interface components {
9151
9790
  */
9152
9791
  expiresAt?: string | null;
9153
9792
  /**
9154
- * @description Actions the agent may perform: CREATE_ORDER, CANCEL_ORDER, REPLACE_ORDER
9793
+ * @description Required JSON array of actions the agent may perform: CREATE_ORDER, CANCEL_ORDER, REPLACE_ORDER. An empty array permits no actions.
9155
9794
  * @example [
9156
9795
  * "CREATE_ORDER",
9157
9796
  * "CANCEL_ORDER"
9158
9797
  * ]
9159
9798
  */
9160
- allowedActions?: string[] | null;
9161
- /** @description Trading pair UUIDs the agent may trade. An order is allowed if its market or its margin account is permitted. */
9162
- allowedTradingPairIds?: string[] | null;
9163
- /** @description Margin account UUIDs the agent may trade against. An order is allowed if its market or its margin account is permitted. */
9799
+ allowedActions: string[];
9800
+ /** @description Required JSON array of trading pair UUIDs. An order is allowed if its market or its margin account is permitted. Send [] for account-only scope; both scopes empty permit no orders. */
9801
+ allowedTradingPairIds: string[];
9802
+ /** @description Optional JSON array of additional margin account UUIDs. Omitted, null, or [] adds no account scope; it does not grant access to every account. An order is allowed if its market or its margin account is permitted. */
9164
9803
  allowedMarginAccountIds?: string[] | null;
9165
9804
  /**
9166
- * @description Permitted order types (LIMIT, MARKET). Empty means unrestricted.
9805
+ * @description Optional JSON array of permitted order types (LIMIT, MARKET). Omitted, null, or [] means unrestricted order types.
9167
9806
  * @example [
9168
9807
  * "LIMIT"
9169
9808
  * ]
9170
9809
  */
9171
9810
  allowedOrderTypes?: string[] | null;
9172
9811
  /**
9173
- * @description Permitted time-in-force values (GTC, IOC, FOK). Empty means unrestricted.
9812
+ * @description Optional JSON array of permitted time-in-force values (GTC, IOC, FOK). Omitted, null, or [] means unrestricted time in force.
9174
9813
  * @example [
9175
9814
  * "GTC"
9176
9815
  * ]
@@ -9188,11 +9827,104 @@ export interface components {
9188
9827
  maxOrderNotional?: string | null;
9189
9828
  /**
9190
9829
  * Format: int32
9191
- * @description Maximum concurrent open orders. Omit for no limit.
9192
- * @example 100
9830
+ * @description Unsupported legacy field. Requests that set maxOpenOrders are rejected; no concurrent open-order cap is enforced. Omit this field.
9193
9831
  */
9194
9832
  maxOpenOrders?: number | null;
9195
9833
  };
9834
+ UpsertFollowRequest: {
9835
+ /**
9836
+ * Format: uuid
9837
+ * @description Omit to create a follow; set to edit one of your follows
9838
+ */
9839
+ followId?: string | null;
9840
+ /**
9841
+ * @description The leader's custom TraderCode handle; required on a create, optional on an edit (a consistency check when it resolves)
9842
+ * @example alpha_trader
9843
+ */
9844
+ leader?: string | null;
9845
+ /**
9846
+ * @description FOLLOW (default: the leader's risk bucket mode per market), CROSS or ISOLATED
9847
+ * @example FOLLOW
9848
+ */
9849
+ marginModePolicy?: string | null;
9850
+ /**
9851
+ * @description PROPORTIONAL (default: scaled by copy account equity over the leader's equity) or FIXED_MARGIN
9852
+ * @example PROPORTIONAL
9853
+ */
9854
+ sizingMode?: string | null;
9855
+ /** @description Margin per leader order in quote units; required for FIXED_MARGIN, omitted otherwise */
9856
+ sizingParam?: string | null;
9857
+ /**
9858
+ * @description FOLLOW (default: the leader's leverage) or FIXED
9859
+ * @example FOLLOW
9860
+ */
9861
+ leverageMode?: string | null;
9862
+ /** @description Leverage for every copy; required for FIXED, omitted otherwise */
9863
+ fixedLeverage?: string | null;
9864
+ /**
9865
+ * @description Collateral for the copy account, in quote units, at or above the minimum
9866
+ * @example 1000
9867
+ */
9868
+ allocation?: string | null;
9869
+ /**
9870
+ * @description Copy stop-loss as a fraction of the allocation in (0, 1]; omitted means none
9871
+ * @example 0.25
9872
+ */
9873
+ slPct?: string | null;
9874
+ /** @description On a create, also copy the leader's currently open positions into the new copy account, sized like any mirrored fill (PreviewFollow shows the cost). Default false. Refused on an edit */
9875
+ copyExisting?: boolean | null;
9876
+ /** @description Markets to copy; omit to copy every market the leader trades. */
9877
+ markets?: components["schemas"]["CopyMarketFilter"] | null;
9878
+ };
9879
+ UpsertFollowResponse: {
9880
+ /**
9881
+ * Format: uuid
9882
+ * @description The follow's id
9883
+ */
9884
+ followId?: string | null;
9885
+ /**
9886
+ * Format: uuid
9887
+ * @description The copy account: the cross risk bucket in your margin account that holds this follow's collateral and positions
9888
+ */
9889
+ copyRiskBucketId?: string | null;
9890
+ /** @description True when this call created the follow, false when it edited one */
9891
+ created?: boolean | null;
9892
+ };
9893
+ UpsertLeadTraderRequest: {
9894
+ /**
9895
+ * Format: uint32
9896
+ * @description Profit share in basis points, within the platform's range; omitted keeps the current share (the platform default on a registration)
9897
+ * @example 1000
9898
+ */
9899
+ shareBps?: number | null;
9900
+ /** @description Free-text profile description, at most 2,000 bytes; omitted clears it */
9901
+ bio?: string | null;
9902
+ /**
9903
+ * @description ACTIVE (default) or PAUSED
9904
+ * @example ACTIVE
9905
+ */
9906
+ status?: string | null;
9907
+ /**
9908
+ * @description Minimum follow allocation in quote units, at or above the platform floor; omitted clears it
9909
+ * @example 1000
9910
+ */
9911
+ minAllocation?: string | null;
9912
+ };
9913
+ UpsertLeadTraderResponse: {
9914
+ /** @description True when this call registered you, false when it edited your profile */
9915
+ created?: boolean | null;
9916
+ /**
9917
+ * @description Your status after the call
9918
+ * @example ACTIVE
9919
+ */
9920
+ status?: string | null;
9921
+ /**
9922
+ * Format: uint32
9923
+ * @description Your profit share after the call, in basis points
9924
+ * @example 1000
9925
+ */
9926
+ shareBps?: number | null;
9927
+ };
9196
9928
  UserInfo: {
9197
9929
  /**
9198
9930
  * Format: uuid
@@ -10396,31 +11128,20 @@ export interface operations {
10396
11128
  get_user_trades: {
10397
11129
  parameters: {
10398
11130
  query?: {
10399
- /**
10400
- * @deprecated
10401
- * @description Deprecated: page number for legacy offset pagination (1-indexed). Use pageToken cursor pagination instead.
10402
- */
10403
- page?: number;
10404
11131
  /** @description Items per page (max: 100 in page-number mode; up to 1000 when pageToken is present) */
10405
11132
  pageSize?: number;
10406
11133
  /** @description Trading pair identifier (UUID) */
10407
11134
  tradingPairId?: string;
10408
11135
  /**
10409
- * @description Pagination cursor with three distinct states:
10410
- * - Omitted: legacy page-number pagination via `page`, limited to recent
10411
- * history once the archive window is enabled.
10412
- * - Empty string (""): start a cursor walk with no prior position, from
10413
- * the newest row (this endpoint always sorts newest-first).
11136
+ * @description Pagination cursor with two states:
11137
+ * - Omitted or empty string (""): start a cursor walk with no prior
11138
+ * position, from the newest row.
10414
11139
  * - Non-empty: an opaque cursor from a previous response's
10415
11140
  * `next_page_token`; results resume immediately after that position.
10416
11141
  *
10417
- * In either cursor-walk state (empty or non-empty), `page` is ignored, the
10418
- * response omits exact totals (total/total_pages/page are 0), and results
10419
- * cover full trade history — hot and archived rows merged — unlike
10420
- * page-number mode, which only ever sees recent history. Clients that need
10421
- * complete trade history must use the cursor form (start with an empty
10422
- * string, then follow next_page_token) rather than `page`. Filters must
10423
- * match the request that produced the token.
11142
+ * Every walk covers full trade history — hot and archived rows merged. The
11143
+ * response carries no item count: this listing's table is too large to count
11144
+ * behind a filter. Filters must match the request that produced the token.
10424
11145
  */
10425
11146
  pageToken?: string;
10426
11147
  };
@@ -11272,9 +11993,17 @@ export interface operations {
11272
11993
  };
11273
11994
  };
11274
11995
  };
11275
- list_delegated_agents: {
11996
+ list_my_follows: {
11276
11997
  parameters: {
11277
- query?: never;
11998
+ query?: {
11999
+ /** @description Items per page (max 1000) */
12000
+ pageSize?: number;
12001
+ /**
12002
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
12003
+ * first page.
12004
+ */
12005
+ pageToken?: string;
12006
+ };
11278
12007
  header?: never;
11279
12008
  path?: never;
11280
12009
  cookie?: never;
@@ -11287,18 +12016,18 @@ export interface operations {
11287
12016
  [name: string]: unknown;
11288
12017
  };
11289
12018
  content: {
11290
- "application/json": components["schemas"]["ListDelegatedAgentsResponse"];
12019
+ "application/json": components["schemas"]["ListMyFollowsResponse"];
11291
12020
  };
11292
12021
  };
11293
- /** @description Authentication required */
11294
- 401: {
12022
+ /** @description Invalid query parameters or page token */
12023
+ 400: {
11295
12024
  headers: {
11296
12025
  [name: string]: unknown;
11297
12026
  };
11298
12027
  content?: never;
11299
12028
  };
11300
- /** @description Only master accounts can list delegated agents */
11301
- 403: {
12029
+ /** @description Authentication required */
12030
+ 401: {
11302
12031
  headers: {
11303
12032
  [name: string]: unknown;
11304
12033
  };
@@ -11320,7 +12049,7 @@ export interface operations {
11320
12049
  };
11321
12050
  };
11322
12051
  };
11323
- upsert_delegated_agent: {
12052
+ upsert_follow: {
11324
12053
  parameters: {
11325
12054
  query?: never;
11326
12055
  header?: never;
@@ -11329,7 +12058,7 @@ export interface operations {
11329
12058
  };
11330
12059
  requestBody: {
11331
12060
  content: {
11332
- "application/json": components["schemas"]["UpsertDelegatedAgentRequest"];
12061
+ "application/json": components["schemas"]["UpsertFollowRequest"];
11333
12062
  };
11334
12063
  };
11335
12064
  responses: {
@@ -11339,10 +12068,10 @@ export interface operations {
11339
12068
  [name: string]: unknown;
11340
12069
  };
11341
12070
  content: {
11342
- "application/json": components["schemas"]["DelegatedAgent"];
12071
+ "application/json": components["schemas"]["UpsertFollowResponse"];
11343
12072
  };
11344
12073
  };
11345
- /** @description Invalid request */
12074
+ /** @description Invalid request, or refused by a follow rule (the message names the rule) */
11346
12075
  400: {
11347
12076
  headers: {
11348
12077
  [name: string]: unknown;
@@ -11356,56 +12085,36 @@ export interface operations {
11356
12085
  };
11357
12086
  content?: never;
11358
12087
  };
11359
- /** @description Only master accounts can manage delegated agents */
12088
+ /** @description Delegated agent or sub-account sessions cannot follow */
11360
12089
  403: {
11361
12090
  headers: {
11362
12091
  [name: string]: unknown;
11363
12092
  };
11364
12093
  content?: never;
11365
12094
  };
11366
- /** @description Internal server error */
11367
- 500: {
12095
+ /** @description Lead trader or follow not found */
12096
+ 404: {
11368
12097
  headers: {
11369
12098
  [name: string]: unknown;
11370
12099
  };
11371
12100
  content?: never;
11372
12101
  };
11373
- };
11374
- };
11375
- list_delegated_agent_owners: {
11376
- parameters: {
11377
- query?: never;
11378
- header?: never;
11379
- path?: never;
11380
- cookie?: never;
11381
- };
11382
- requestBody?: never;
11383
- responses: {
11384
- /** @description OK */
11385
- 200: {
11386
- headers: {
11387
- [name: string]: unknown;
11388
- };
11389
- content: {
11390
- "application/json": components["schemas"]["ListDelegatedAgentOwnersResponse"];
11391
- };
11392
- };
11393
- /** @description Authentication required */
11394
- 401: {
12102
+ /** @description Copy trading is not available */
12103
+ 409: {
11395
12104
  headers: {
11396
12105
  [name: string]: unknown;
11397
12106
  };
11398
12107
  content?: never;
11399
12108
  };
11400
- /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
11401
- 429: {
12109
+ /** @description Internal server error */
12110
+ 500: {
11402
12111
  headers: {
11403
12112
  [name: string]: unknown;
11404
12113
  };
11405
12114
  content?: never;
11406
12115
  };
11407
- /** @description Internal server error */
11408
- 500: {
12116
+ /** @description Matching engine unavailable; retry */
12117
+ 503: {
11409
12118
  headers: {
11410
12119
  [name: string]: unknown;
11411
12120
  };
@@ -11413,7 +12122,7 @@ export interface operations {
11413
12122
  };
11414
12123
  };
11415
12124
  };
11416
- create_delegated_session: {
12125
+ preview_follow: {
11417
12126
  parameters: {
11418
12127
  query?: never;
11419
12128
  header?: never;
@@ -11422,7 +12131,7 @@ export interface operations {
11422
12131
  };
11423
12132
  requestBody: {
11424
12133
  content: {
11425
- "application/json": components["schemas"]["CreateDelegatedSessionRequest"];
12134
+ "application/json": components["schemas"]["PreviewFollowRequest"];
11426
12135
  };
11427
12136
  };
11428
12137
  responses: {
@@ -11432,10 +12141,10 @@ export interface operations {
11432
12141
  [name: string]: unknown;
11433
12142
  };
11434
12143
  content: {
11435
- "application/json": components["schemas"]["CreateDelegatedSessionResponse"];
12144
+ "application/json": components["schemas"]["PreviewFollowResponse"];
11436
12145
  };
11437
12146
  };
11438
- /** @description Invalid request */
12147
+ /** @description Invalid request, or terms a follow would refuse (the message names the rule) */
11439
12148
  400: {
11440
12149
  headers: {
11441
12150
  [name: string]: unknown;
@@ -11449,24 +12158,804 @@ export interface operations {
11449
12158
  };
11450
12159
  content?: never;
11451
12160
  };
11452
- /** @description No active delegation for owner */
12161
+ /** @description Delegated agent or sub-account sessions cannot follow */
11453
12162
  403: {
11454
12163
  headers: {
11455
12164
  [name: string]: unknown;
11456
12165
  };
11457
12166
  content?: never;
11458
12167
  };
11459
- /** @description Internal server error */
11460
- 500: {
12168
+ /** @description Lead trader not found */
12169
+ 404: {
11461
12170
  headers: {
11462
12171
  [name: string]: unknown;
11463
12172
  };
11464
12173
  content?: never;
11465
12174
  };
11466
- };
11467
- };
11468
- revoke_delegated_agent: {
11469
- parameters: {
12175
+ /** @description Copy trading is not available */
12176
+ 409: {
12177
+ headers: {
12178
+ [name: string]: unknown;
12179
+ };
12180
+ content?: never;
12181
+ };
12182
+ /** @description Read or order-risk preview rate limit exceeded; retry after the interval in details.retryAfter */
12183
+ 429: {
12184
+ headers: {
12185
+ [name: string]: unknown;
12186
+ };
12187
+ content?: never;
12188
+ };
12189
+ /** @description Internal server error */
12190
+ 500: {
12191
+ headers: {
12192
+ [name: string]: unknown;
12193
+ };
12194
+ content?: never;
12195
+ };
12196
+ /** @description Matching engine unavailable or its preview capacity is busy; retry */
12197
+ 503: {
12198
+ headers: {
12199
+ [name: string]: unknown;
12200
+ };
12201
+ content?: never;
12202
+ };
12203
+ };
12204
+ };
12205
+ get_follow: {
12206
+ parameters: {
12207
+ query?: never;
12208
+ header?: never;
12209
+ path: {
12210
+ followId: string;
12211
+ };
12212
+ cookie?: never;
12213
+ };
12214
+ requestBody?: never;
12215
+ responses: {
12216
+ /** @description OK */
12217
+ 200: {
12218
+ headers: {
12219
+ [name: string]: unknown;
12220
+ };
12221
+ content: {
12222
+ "application/json": components["schemas"]["GetFollowResponse"];
12223
+ };
12224
+ };
12225
+ /** @description Invalid follow id */
12226
+ 400: {
12227
+ headers: {
12228
+ [name: string]: unknown;
12229
+ };
12230
+ content?: never;
12231
+ };
12232
+ /** @description Authentication required */
12233
+ 401: {
12234
+ headers: {
12235
+ [name: string]: unknown;
12236
+ };
12237
+ content?: never;
12238
+ };
12239
+ /** @description Follow not found */
12240
+ 404: {
12241
+ headers: {
12242
+ [name: string]: unknown;
12243
+ };
12244
+ content?: never;
12245
+ };
12246
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12247
+ 429: {
12248
+ headers: {
12249
+ [name: string]: unknown;
12250
+ };
12251
+ content?: never;
12252
+ };
12253
+ /** @description Internal server error */
12254
+ 500: {
12255
+ headers: {
12256
+ [name: string]: unknown;
12257
+ };
12258
+ content?: never;
12259
+ };
12260
+ };
12261
+ };
12262
+ list_follow_leader_positions: {
12263
+ parameters: {
12264
+ query?: never;
12265
+ header?: never;
12266
+ path: {
12267
+ followId: string;
12268
+ };
12269
+ cookie?: never;
12270
+ };
12271
+ requestBody?: never;
12272
+ responses: {
12273
+ /** @description OK */
12274
+ 200: {
12275
+ headers: {
12276
+ [name: string]: unknown;
12277
+ };
12278
+ content: {
12279
+ "application/json": components["schemas"]["ListFollowLeaderPositionsResponse"];
12280
+ };
12281
+ };
12282
+ /** @description Invalid follow id */
12283
+ 400: {
12284
+ headers: {
12285
+ [name: string]: unknown;
12286
+ };
12287
+ content?: never;
12288
+ };
12289
+ /** @description Authentication required */
12290
+ 401: {
12291
+ headers: {
12292
+ [name: string]: unknown;
12293
+ };
12294
+ content?: never;
12295
+ };
12296
+ /** @description The follow is stopped */
12297
+ 403: {
12298
+ headers: {
12299
+ [name: string]: unknown;
12300
+ };
12301
+ content?: never;
12302
+ };
12303
+ /** @description Follow not found */
12304
+ 404: {
12305
+ headers: {
12306
+ [name: string]: unknown;
12307
+ };
12308
+ content?: never;
12309
+ };
12310
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12311
+ 429: {
12312
+ headers: {
12313
+ [name: string]: unknown;
12314
+ };
12315
+ content?: never;
12316
+ };
12317
+ /** @description Internal server error */
12318
+ 500: {
12319
+ headers: {
12320
+ [name: string]: unknown;
12321
+ };
12322
+ content?: never;
12323
+ };
12324
+ /** @description Matching engine unavailable; retry */
12325
+ 503: {
12326
+ headers: {
12327
+ [name: string]: unknown;
12328
+ };
12329
+ content?: never;
12330
+ };
12331
+ };
12332
+ };
12333
+ stop_follow: {
12334
+ parameters: {
12335
+ query?: never;
12336
+ header?: never;
12337
+ path: {
12338
+ followId: string;
12339
+ };
12340
+ cookie?: never;
12341
+ };
12342
+ requestBody?: never;
12343
+ responses: {
12344
+ /** @description OK */
12345
+ 200: {
12346
+ headers: {
12347
+ [name: string]: unknown;
12348
+ };
12349
+ content: {
12350
+ "application/json": components["schemas"]["StopFollowResponse"];
12351
+ };
12352
+ };
12353
+ /** @description Invalid follow id, or refused by the engine (the message names the rule) */
12354
+ 400: {
12355
+ headers: {
12356
+ [name: string]: unknown;
12357
+ };
12358
+ content?: never;
12359
+ };
12360
+ /** @description Authentication required */
12361
+ 401: {
12362
+ headers: {
12363
+ [name: string]: unknown;
12364
+ };
12365
+ content?: never;
12366
+ };
12367
+ /** @description Delegated agent sessions cannot stop a follow */
12368
+ 403: {
12369
+ headers: {
12370
+ [name: string]: unknown;
12371
+ };
12372
+ content?: never;
12373
+ };
12374
+ /** @description Follow not found */
12375
+ 404: {
12376
+ headers: {
12377
+ [name: string]: unknown;
12378
+ };
12379
+ content?: never;
12380
+ };
12381
+ /** @description Internal server error */
12382
+ 500: {
12383
+ headers: {
12384
+ [name: string]: unknown;
12385
+ };
12386
+ content?: never;
12387
+ };
12388
+ /** @description Matching engine unavailable; retry */
12389
+ 503: {
12390
+ headers: {
12391
+ [name: string]: unknown;
12392
+ };
12393
+ content?: never;
12394
+ };
12395
+ };
12396
+ };
12397
+ list_lead_traders: {
12398
+ parameters: {
12399
+ query?: {
12400
+ /** @description Metric to rank by, highest first */
12401
+ sort?: "roi" | "pnl" | "followers" | "allocated" | "win_rate";
12402
+ /** @description Stats window */
12403
+ window?: "7d" | "30d" | "90d" | "all";
12404
+ /** @description Items per page (max 100) */
12405
+ pageSize?: number;
12406
+ /**
12407
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
12408
+ * first page. Sort and window must match the request that produced it.
12409
+ */
12410
+ pageToken?: string;
12411
+ };
12412
+ header?: never;
12413
+ path?: never;
12414
+ cookie?: never;
12415
+ };
12416
+ requestBody?: never;
12417
+ responses: {
12418
+ /** @description OK */
12419
+ 200: {
12420
+ headers: {
12421
+ [name: string]: unknown;
12422
+ };
12423
+ content: {
12424
+ "application/json": components["schemas"]["ListLeadTradersResponse"];
12425
+ };
12426
+ };
12427
+ /** @description Invalid query parameters or page token */
12428
+ 400: {
12429
+ headers: {
12430
+ [name: string]: unknown;
12431
+ };
12432
+ content?: never;
12433
+ };
12434
+ /** @description Internal server error */
12435
+ 500: {
12436
+ headers: {
12437
+ [name: string]: unknown;
12438
+ };
12439
+ content?: never;
12440
+ };
12441
+ };
12442
+ };
12443
+ get_my_lead_trader: {
12444
+ parameters: {
12445
+ query?: never;
12446
+ header?: never;
12447
+ path?: never;
12448
+ cookie?: never;
12449
+ };
12450
+ requestBody?: never;
12451
+ responses: {
12452
+ /** @description OK */
12453
+ 200: {
12454
+ headers: {
12455
+ [name: string]: unknown;
12456
+ };
12457
+ content: {
12458
+ "application/json": components["schemas"]["GetLeadTraderResponse"];
12459
+ };
12460
+ };
12461
+ /** @description Authentication required */
12462
+ 401: {
12463
+ headers: {
12464
+ [name: string]: unknown;
12465
+ };
12466
+ content?: never;
12467
+ };
12468
+ /** @description You are not a lead trader */
12469
+ 404: {
12470
+ headers: {
12471
+ [name: string]: unknown;
12472
+ };
12473
+ content?: never;
12474
+ };
12475
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12476
+ 429: {
12477
+ headers: {
12478
+ [name: string]: unknown;
12479
+ };
12480
+ content?: never;
12481
+ };
12482
+ /** @description Internal server error */
12483
+ 500: {
12484
+ headers: {
12485
+ [name: string]: unknown;
12486
+ };
12487
+ content?: never;
12488
+ };
12489
+ };
12490
+ };
12491
+ upsert_lead_trader: {
12492
+ parameters: {
12493
+ query?: never;
12494
+ header?: never;
12495
+ path?: never;
12496
+ cookie?: never;
12497
+ };
12498
+ requestBody: {
12499
+ content: {
12500
+ "application/json": components["schemas"]["UpsertLeadTraderRequest"];
12501
+ };
12502
+ };
12503
+ responses: {
12504
+ /** @description OK */
12505
+ 200: {
12506
+ headers: {
12507
+ [name: string]: unknown;
12508
+ };
12509
+ content: {
12510
+ "application/json": components["schemas"]["UpsertLeadTraderResponse"];
12511
+ };
12512
+ };
12513
+ /** @description Invalid request, or refused by an eligibility rule such as one lead profile per wallet (the message names the rule) */
12514
+ 400: {
12515
+ headers: {
12516
+ [name: string]: unknown;
12517
+ };
12518
+ content?: never;
12519
+ };
12520
+ /** @description Authentication required */
12521
+ 401: {
12522
+ headers: {
12523
+ [name: string]: unknown;
12524
+ };
12525
+ content?: never;
12526
+ };
12527
+ /** @description Delegated agent or sub-account sessions cannot register */
12528
+ 403: {
12529
+ headers: {
12530
+ [name: string]: unknown;
12531
+ };
12532
+ content?: never;
12533
+ };
12534
+ /** @description Copy trading is not available */
12535
+ 409: {
12536
+ headers: {
12537
+ [name: string]: unknown;
12538
+ };
12539
+ content?: never;
12540
+ };
12541
+ /** @description Internal server error */
12542
+ 500: {
12543
+ headers: {
12544
+ [name: string]: unknown;
12545
+ };
12546
+ content?: never;
12547
+ };
12548
+ /** @description Matching engine unavailable; retry */
12549
+ 503: {
12550
+ headers: {
12551
+ [name: string]: unknown;
12552
+ };
12553
+ content?: never;
12554
+ };
12555
+ };
12556
+ };
12557
+ list_my_followers: {
12558
+ parameters: {
12559
+ query?: {
12560
+ /** @description Items per page (max 1000) */
12561
+ pageSize?: number;
12562
+ /**
12563
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
12564
+ * first page.
12565
+ */
12566
+ pageToken?: string;
12567
+ };
12568
+ header?: never;
12569
+ path?: never;
12570
+ cookie?: never;
12571
+ };
12572
+ requestBody?: never;
12573
+ responses: {
12574
+ /** @description OK */
12575
+ 200: {
12576
+ headers: {
12577
+ [name: string]: unknown;
12578
+ };
12579
+ content: {
12580
+ "application/json": components["schemas"]["ListMyFollowersResponse"];
12581
+ };
12582
+ };
12583
+ /** @description Invalid query parameters or page token */
12584
+ 400: {
12585
+ headers: {
12586
+ [name: string]: unknown;
12587
+ };
12588
+ content?: never;
12589
+ };
12590
+ /** @description Authentication required */
12591
+ 401: {
12592
+ headers: {
12593
+ [name: string]: unknown;
12594
+ };
12595
+ content?: never;
12596
+ };
12597
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12598
+ 429: {
12599
+ headers: {
12600
+ [name: string]: unknown;
12601
+ };
12602
+ content?: never;
12603
+ };
12604
+ /** @description Internal server error */
12605
+ 500: {
12606
+ headers: {
12607
+ [name: string]: unknown;
12608
+ };
12609
+ content?: never;
12610
+ };
12611
+ };
12612
+ };
12613
+ get_lead_trader: {
12614
+ parameters: {
12615
+ query?: never;
12616
+ header?: never;
12617
+ path: {
12618
+ leader: string;
12619
+ };
12620
+ cookie?: never;
12621
+ };
12622
+ requestBody?: never;
12623
+ responses: {
12624
+ /** @description OK */
12625
+ 200: {
12626
+ headers: {
12627
+ [name: string]: unknown;
12628
+ };
12629
+ content: {
12630
+ "application/json": components["schemas"]["GetLeadTraderResponse"];
12631
+ };
12632
+ };
12633
+ /** @description Lead trader not found */
12634
+ 404: {
12635
+ headers: {
12636
+ [name: string]: unknown;
12637
+ };
12638
+ content?: never;
12639
+ };
12640
+ /** @description Internal server error */
12641
+ 500: {
12642
+ headers: {
12643
+ [name: string]: unknown;
12644
+ };
12645
+ content?: never;
12646
+ };
12647
+ };
12648
+ };
12649
+ list_lead_trader_closed_trades: {
12650
+ parameters: {
12651
+ query?: {
12652
+ /** @description Items per page (max 100) */
12653
+ pageSize?: number;
12654
+ /**
12655
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
12656
+ * first page.
12657
+ */
12658
+ pageToken?: string;
12659
+ };
12660
+ header?: never;
12661
+ path: {
12662
+ leader: string;
12663
+ };
12664
+ cookie?: never;
12665
+ };
12666
+ requestBody?: never;
12667
+ responses: {
12668
+ /** @description OK */
12669
+ 200: {
12670
+ headers: {
12671
+ [name: string]: unknown;
12672
+ };
12673
+ content: {
12674
+ "application/json": components["schemas"]["ListLeadTraderClosedTradesResponse"];
12675
+ };
12676
+ };
12677
+ /** @description Invalid query parameters or page token */
12678
+ 400: {
12679
+ headers: {
12680
+ [name: string]: unknown;
12681
+ };
12682
+ content?: never;
12683
+ };
12684
+ /** @description Lead trader not found */
12685
+ 404: {
12686
+ headers: {
12687
+ [name: string]: unknown;
12688
+ };
12689
+ content?: never;
12690
+ };
12691
+ /** @description Internal server error */
12692
+ 500: {
12693
+ headers: {
12694
+ [name: string]: unknown;
12695
+ };
12696
+ content?: never;
12697
+ };
12698
+ };
12699
+ };
12700
+ list_lead_trader_open_positions: {
12701
+ parameters: {
12702
+ query?: never;
12703
+ header?: never;
12704
+ path: {
12705
+ leader: string;
12706
+ };
12707
+ cookie?: never;
12708
+ };
12709
+ requestBody?: never;
12710
+ responses: {
12711
+ /** @description OK */
12712
+ 200: {
12713
+ headers: {
12714
+ [name: string]: unknown;
12715
+ };
12716
+ content: {
12717
+ "application/json": components["schemas"]["ListLeadTraderOpenPositionsResponse"];
12718
+ };
12719
+ };
12720
+ /** @description Authentication required */
12721
+ 401: {
12722
+ headers: {
12723
+ [name: string]: unknown;
12724
+ };
12725
+ content?: never;
12726
+ };
12727
+ /** @description Only current followers of this leader can see open positions */
12728
+ 403: {
12729
+ headers: {
12730
+ [name: string]: unknown;
12731
+ };
12732
+ content?: never;
12733
+ };
12734
+ /** @description Lead trader not found */
12735
+ 404: {
12736
+ headers: {
12737
+ [name: string]: unknown;
12738
+ };
12739
+ content?: never;
12740
+ };
12741
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12742
+ 429: {
12743
+ headers: {
12744
+ [name: string]: unknown;
12745
+ };
12746
+ content?: never;
12747
+ };
12748
+ /** @description Internal server error */
12749
+ 500: {
12750
+ headers: {
12751
+ [name: string]: unknown;
12752
+ };
12753
+ content?: never;
12754
+ };
12755
+ /** @description Matching engine unavailable; retry */
12756
+ 503: {
12757
+ headers: {
12758
+ [name: string]: unknown;
12759
+ };
12760
+ content?: never;
12761
+ };
12762
+ };
12763
+ };
12764
+ list_delegated_agents: {
12765
+ parameters: {
12766
+ query?: never;
12767
+ header?: never;
12768
+ path?: never;
12769
+ cookie?: never;
12770
+ };
12771
+ requestBody?: never;
12772
+ responses: {
12773
+ /** @description OK */
12774
+ 200: {
12775
+ headers: {
12776
+ [name: string]: unknown;
12777
+ };
12778
+ content: {
12779
+ "application/json": components["schemas"]["ListDelegatedAgentsResponse"];
12780
+ };
12781
+ };
12782
+ /** @description Authentication required */
12783
+ 401: {
12784
+ headers: {
12785
+ [name: string]: unknown;
12786
+ };
12787
+ content?: never;
12788
+ };
12789
+ /** @description Only master accounts can list delegated agents */
12790
+ 403: {
12791
+ headers: {
12792
+ [name: string]: unknown;
12793
+ };
12794
+ content?: never;
12795
+ };
12796
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12797
+ 429: {
12798
+ headers: {
12799
+ [name: string]: unknown;
12800
+ };
12801
+ content?: never;
12802
+ };
12803
+ /** @description Internal server error */
12804
+ 500: {
12805
+ headers: {
12806
+ [name: string]: unknown;
12807
+ };
12808
+ content?: never;
12809
+ };
12810
+ };
12811
+ };
12812
+ upsert_delegated_agent: {
12813
+ parameters: {
12814
+ query?: never;
12815
+ header?: never;
12816
+ path?: never;
12817
+ cookie?: never;
12818
+ };
12819
+ requestBody: {
12820
+ content: {
12821
+ "application/json": components["schemas"]["UpsertDelegatedAgentRequest"];
12822
+ };
12823
+ };
12824
+ responses: {
12825
+ /** @description OK */
12826
+ 200: {
12827
+ headers: {
12828
+ [name: string]: unknown;
12829
+ };
12830
+ content: {
12831
+ "application/json": components["schemas"]["DelegatedAgent"];
12832
+ };
12833
+ };
12834
+ /** @description Invalid request */
12835
+ 400: {
12836
+ headers: {
12837
+ [name: string]: unknown;
12838
+ };
12839
+ content?: never;
12840
+ };
12841
+ /** @description Authentication required */
12842
+ 401: {
12843
+ headers: {
12844
+ [name: string]: unknown;
12845
+ };
12846
+ content?: never;
12847
+ };
12848
+ /** @description Only master accounts can manage delegated agents */
12849
+ 403: {
12850
+ headers: {
12851
+ [name: string]: unknown;
12852
+ };
12853
+ content?: never;
12854
+ };
12855
+ /** @description Internal server error */
12856
+ 500: {
12857
+ headers: {
12858
+ [name: string]: unknown;
12859
+ };
12860
+ content?: never;
12861
+ };
12862
+ };
12863
+ };
12864
+ list_delegated_agent_owners: {
12865
+ parameters: {
12866
+ query?: never;
12867
+ header?: never;
12868
+ path?: never;
12869
+ cookie?: never;
12870
+ };
12871
+ requestBody?: never;
12872
+ responses: {
12873
+ /** @description OK */
12874
+ 200: {
12875
+ headers: {
12876
+ [name: string]: unknown;
12877
+ };
12878
+ content: {
12879
+ "application/json": components["schemas"]["ListDelegatedAgentOwnersResponse"];
12880
+ };
12881
+ };
12882
+ /** @description Authentication required */
12883
+ 401: {
12884
+ headers: {
12885
+ [name: string]: unknown;
12886
+ };
12887
+ content?: never;
12888
+ };
12889
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12890
+ 429: {
12891
+ headers: {
12892
+ [name: string]: unknown;
12893
+ };
12894
+ content?: never;
12895
+ };
12896
+ /** @description Internal server error */
12897
+ 500: {
12898
+ headers: {
12899
+ [name: string]: unknown;
12900
+ };
12901
+ content?: never;
12902
+ };
12903
+ };
12904
+ };
12905
+ create_delegated_session: {
12906
+ parameters: {
12907
+ query?: never;
12908
+ header?: never;
12909
+ path?: never;
12910
+ cookie?: never;
12911
+ };
12912
+ requestBody: {
12913
+ content: {
12914
+ "application/json": components["schemas"]["CreateDelegatedSessionRequest"];
12915
+ };
12916
+ };
12917
+ responses: {
12918
+ /** @description OK */
12919
+ 200: {
12920
+ headers: {
12921
+ [name: string]: unknown;
12922
+ };
12923
+ content: {
12924
+ "application/json": components["schemas"]["CreateDelegatedSessionResponse"];
12925
+ };
12926
+ };
12927
+ /** @description Invalid request */
12928
+ 400: {
12929
+ headers: {
12930
+ [name: string]: unknown;
12931
+ };
12932
+ content?: never;
12933
+ };
12934
+ /** @description Authentication required */
12935
+ 401: {
12936
+ headers: {
12937
+ [name: string]: unknown;
12938
+ };
12939
+ content?: never;
12940
+ };
12941
+ /** @description No active delegation for owner */
12942
+ 403: {
12943
+ headers: {
12944
+ [name: string]: unknown;
12945
+ };
12946
+ content?: never;
12947
+ };
12948
+ /** @description Internal server error */
12949
+ 500: {
12950
+ headers: {
12951
+ [name: string]: unknown;
12952
+ };
12953
+ content?: never;
12954
+ };
12955
+ };
12956
+ };
12957
+ revoke_delegated_agent: {
12958
+ parameters: {
11470
12959
  query?: never;
11471
12960
  header?: never;
11472
12961
  path: {
@@ -12845,11 +14334,6 @@ export interface operations {
12845
14334
  get_orders: {
12846
14335
  parameters: {
12847
14336
  query?: {
12848
- /**
12849
- * @deprecated
12850
- * @description Deprecated: page number for legacy offset pagination (1-indexed). Use pageToken cursor pagination instead.
12851
- */
12852
- page?: number;
12853
14337
  /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
12854
14338
  pageSize?: number;
12855
14339
  /** @description Order status (single value or comma-separated list) */
@@ -12862,21 +14346,15 @@ export interface operations {
12862
14346
  /** @description Sort direction for createdAt */
12863
14347
  orderBy?: "ASC" | "DESC";
12864
14348
  /**
12865
- * @description Pagination cursor with three distinct states:
12866
- * - Omitted: legacy page-number pagination via `page`, limited to recent
12867
- * history once the archive window is enabled.
12868
- * - Empty string (""): start a cursor walk with no prior position, from
12869
- * the newest row (or the oldest, when `orderBy` is ASC).
14349
+ * @description Pagination cursor with two states:
14350
+ * - Omitted or empty string (""): start a cursor walk with no prior
14351
+ * position, from the newest row (or the oldest, when `orderBy` is ASC).
12870
14352
  * - Non-empty: an opaque cursor from a previous response's
12871
14353
  * `next_page_token`; results resume immediately after that position.
12872
14354
  *
12873
- * In either cursor-walk state (empty or non-empty), `page` is ignored (it
12874
- * comes back as 0), but `total` and `total_pages` ARE populated — bounded by
12875
- * the server count ceiling, see `total_capped`. Results cover full order
12876
- * history — hot and archived rows merged — unlike page-number mode, which
12877
- * only ever sees recent history. Clients that need complete order history
12878
- * must use the cursor form (start with an empty string, then follow
12879
- * next_page_token) rather than `page`. Filters and orderBy must match the
14355
+ * `total` and `total_pages` are populated — bounded by the server count
14356
+ * ceiling, see `total_capped`. Every walk covers full order history — hot
14357
+ * and archived rows merged. Filters and orderBy must match the
12880
14358
  * request that produced the token.
12881
14359
  */
12882
14360
  pageToken?: string;
@@ -13313,24 +14791,17 @@ export interface operations {
13313
14791
  /** @description Trading pair identifier (UUID) */
13314
14792
  tradingPairId?: string;
13315
14793
  state?: string;
13316
- /**
13317
- * @deprecated
13318
- * @description Deprecated: page number for legacy offset pagination (1-indexed). Use pageToken cursor pagination instead.
13319
- */
13320
- page?: number;
13321
14794
  /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
13322
14795
  pageSize?: number;
13323
14796
  /**
13324
- * @description Pagination cursor with three distinct states:
13325
- * - Omitted: legacy page-number pagination via `page`.
13326
- * - Empty string (""): start a cursor walk with no prior position, from
13327
- * the newest conditional order.
14797
+ * @description Pagination cursor with two states:
14798
+ * - Omitted or empty string (""): start a cursor walk with no prior
14799
+ * position, from the newest conditional order.
13328
14800
  * - Non-empty: an opaque cursor from a previous response's
13329
14801
  * `next_page_token`; results resume immediately after that position.
13330
14802
  *
13331
- * In either cursor-walk state (empty or non-empty), `page` is ignored and
13332
- * `total` is not populated — both come back 0, because cursor mode runs no
13333
- * COUNT (AIP-158). Cursor pages are keyset seeks on `(createdAt, id)`, so a
14803
+ * `total` is the matching row count, bounded at a server ceiling of 10,000
14804
+ * and saturating there. Pages are keyset seeks on `(createdAt, id)`, so a
13334
14805
  * page size up to 1000 is allowed. Filters must match the request that
13335
14806
  * produced the token; a token replayed against different filters is
13336
14807
  * rejected.
@@ -13424,27 +14895,20 @@ export interface operations {
13424
14895
  list_twap_orders: {
13425
14896
  parameters: {
13426
14897
  query?: {
13427
- /**
13428
- * @deprecated
13429
- * @description Deprecated: page number for legacy offset pagination (1-indexed). Use pageToken cursor pagination instead.
13430
- */
13431
- page?: number;
13432
14898
  /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
13433
14899
  pageSize?: number;
13434
14900
  state?: string;
13435
14901
  /** @description Trading pair identifier (UUID) */
13436
14902
  tradingPairId?: string;
13437
14903
  /**
13438
- * @description Pagination cursor with three distinct states:
13439
- * - Omitted: legacy page-number pagination via `page`.
13440
- * - Empty string (""): start a cursor walk with no prior position, from
13441
- * the newest TWAP parent.
14904
+ * @description Pagination cursor with two states:
14905
+ * - Omitted or empty string (""): start a cursor walk with no prior
14906
+ * position, from the newest TWAP parent.
13442
14907
  * - Non-empty: an opaque cursor from a previous response's
13443
14908
  * `next_page_token`; results resume immediately after that position.
13444
14909
  *
13445
- * In either cursor-walk state (empty or non-empty), `page` is ignored and
13446
- * `total` is not populated — both come back 0, because cursor mode runs no
13447
- * COUNT (AIP-158). Cursor pages are keyset seeks on `(createdAt, id)`, so a
14910
+ * `total` is the matching row count, bounded at a server ceiling of 10,000
14911
+ * and saturating there. Pages are keyset seeks on `(createdAt, id)`, so a
13448
14912
  * page size up to 1000 is allowed. Filters must match the request that
13449
14913
  * produced the token; a token replayed against different filters is
13450
14914
  * rejected.