@0xmonaco/types 1.0.69 → 1.0.72

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.
Files changed (38) hide show
  1. package/dist/auth/index.d.ts +4 -2
  2. package/dist/auth/responses.d.ts +3 -1
  3. package/dist/copy-trading/index.d.ts +143 -0
  4. package/dist/copy-trading/index.js +8 -0
  5. package/dist/copy-trading/responses.d.ts +416 -0
  6. package/dist/copy-trading/responses.js +317 -0
  7. package/dist/delegated-agents/index.d.ts +9 -0
  8. package/dist/fees/index.d.ts +3 -0
  9. package/dist/fees/responses.js +4 -4
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +1 -0
  12. package/dist/margin-accounts/index.d.ts +18 -0
  13. package/dist/portfolio/index.d.ts +12 -0
  14. package/dist/profile/index.d.ts +30 -40
  15. package/dist/sdk/index.d.ts +3 -0
  16. package/dist/trading/responses.d.ts +3 -46
  17. package/dist/validation/copy-trading.d.ts +124 -0
  18. package/dist/validation/copy-trading.js +156 -0
  19. package/dist/validation/index.d.ts +1 -0
  20. package/dist/validation/index.js +1 -0
  21. package/dist/validation/positions.d.ts +1 -1
  22. package/dist/validation/profile.d.ts +1 -1
  23. package/dist/validation/profile.js +8 -16
  24. package/dist/validation/trading.d.ts +4 -5
  25. package/dist/validation/trading.js +25 -50
  26. package/dist/websocket/client.d.ts +9 -1
  27. package/dist/websocket/events/copy-events.d.ts +133 -0
  28. package/dist/websocket/events/copy-events.js +17 -0
  29. package/dist/websocket/events/index.d.ts +1 -0
  30. package/dist/websocket/events/index.js +1 -0
  31. package/dist/websocket/events/orders-events.d.ts +51 -0
  32. package/dist/websocket/events/position-events.d.ts +14 -10
  33. package/dist/websocket/events/twap-order-events.d.ts +7 -0
  34. package/dist/websocket/snapshots.d.ts +24 -2
  35. package/dist/wire/operations.d.ts +1 -1
  36. package/dist/wire/operations.js +16 -0
  37. package/dist/wire/schema.d.ts +2218 -325
  38. package/package.json +2 -2
@@ -621,9 +621,11 @@ export interface paths {
621
621
  * Refresh session expiry
622
622
  * @description Refresh session expiry.
623
623
  *
624
- * Extends the expiration of the current session. The request must be signed
624
+ * Refreshes the expiration of the current session. The request must be signed
625
625
  * by the session private key (RFC 9421 or legacy X-Monaco-* headers); no body is
626
- * required.
626
+ * required. Delegated sessions require an active, unexpired delegation;
627
+ * their resulting expiry is capped by the delegation expiry and may move
628
+ * earlier if the owner shortened that delegation.
627
629
  */
628
630
  post: operations["refresh_session"];
629
631
  delete?: never;
@@ -878,6 +880,396 @@ export interface paths {
878
880
  patch?: never;
879
881
  trace?: never;
880
882
  };
883
+ "/api/v1/copy-trading/follows": {
884
+ parameters: {
885
+ query?: never;
886
+ header?: never;
887
+ path?: never;
888
+ cookie?: never;
889
+ };
890
+ /**
891
+ * List your follows
892
+ * @description List your follows.
893
+ *
894
+ * Every follow you have made (live and stopped), newest first.
895
+ */
896
+ get: operations["list_my_follows"];
897
+ put?: never;
898
+ /**
899
+ * Follow a lead trader or edit a follow
900
+ * @description Follow a lead trader or edit a follow.
901
+ *
902
+ * Without `followId`, creates a follow: `allocation` moves from your margin
903
+ * account into a new copy account for this leader, and from then on the
904
+ * leader's fills are mirrored into it. With `followId`, edits that follow
905
+ * (it must be yours): the leader comes from the follow, so an edit works even
906
+ * after the leader releases their handle, and `leader` may be empty; a
907
+ * `leader` handle that names a different leader is refused. `copyExisting`
908
+ * copies the leader's open positions into the new copy account at creation
909
+ * (see PreviewFollow for what that costs); it applies only to a create, and
910
+ * an edit that sets it is refused.
911
+ */
912
+ post: operations["upsert_follow"];
913
+ delete?: never;
914
+ options?: never;
915
+ head?: never;
916
+ patch?: never;
917
+ trace?: never;
918
+ };
919
+ "/api/v1/copy-trading/follows/close-positions": {
920
+ parameters: {
921
+ query?: never;
922
+ header?: never;
923
+ path?: never;
924
+ cookie?: never;
925
+ };
926
+ get?: never;
927
+ put?: never;
928
+ /**
929
+ * Close all your copy positions
930
+ * @description Close all your copy positions.
931
+ *
932
+ * Closes the copy positions of every live follow of yours, as
933
+ * CloseFollowPositions does for one: one batch per follow, the follows
934
+ * kept, and the same limits (not a flatten guarantee; the follows keep
935
+ * mirroring). A follow whose stop is in progress is listed in
936
+ * `stoppingFollowIds` and left to its stop. A follow whose close could not
937
+ * run is listed in `failedFollows` and the others still close. Never gated
938
+ * by copy trading being switched off or by an operations block; only a
939
+ * delegated agent session is refused. Shares CloseFollowPositions' rate
940
+ * limit.
941
+ */
942
+ post: operations["close_all_copy_positions"];
943
+ delete?: never;
944
+ options?: never;
945
+ head?: never;
946
+ patch?: never;
947
+ trace?: never;
948
+ };
949
+ "/api/v1/copy-trading/follows/preview": {
950
+ parameters: {
951
+ query?: never;
952
+ header?: never;
953
+ path?: never;
954
+ cookie?: never;
955
+ };
956
+ get?: never;
957
+ put?: never;
958
+ /**
959
+ * Preview copying a lead trader's open positions
960
+ * @description Preview copying a leader's open positions.
961
+ *
962
+ * What a follow with these terms would open if it set `copyExisting`, as
963
+ * totals only: the estimated margin and fees, and how many of the leader's
964
+ * positions would and would not be copied. It names no pair, side or
965
+ * reason. Read-only; nothing is placed or reserved. The same session rules
966
+ * and follow terms rules as following apply, it is refused while copy
967
+ * trading is off, and it spends the order-risk preview budget. At most 64
968
+ * positions are sized; `truncated` says when more matched.
969
+ */
970
+ post: operations["preview_follow"];
971
+ delete?: never;
972
+ options?: never;
973
+ head?: never;
974
+ patch?: never;
975
+ trace?: never;
976
+ };
977
+ "/api/v1/copy-trading/follows/{followId}": {
978
+ parameters: {
979
+ query?: never;
980
+ header?: never;
981
+ path?: never;
982
+ cookie?: never;
983
+ };
984
+ /**
985
+ * Get one of your follows
986
+ * @description Get one of your follows.
987
+ *
988
+ * The follow plus its most recent skipped mirrors (up to 100, newest
989
+ * first). 404 unless the follow is yours.
990
+ */
991
+ get: operations["get_follow"];
992
+ put?: never;
993
+ post?: never;
994
+ delete?: never;
995
+ options?: never;
996
+ head?: never;
997
+ patch?: never;
998
+ trace?: never;
999
+ };
1000
+ "/api/v1/copy-trading/follows/{followId}/close-positions": {
1001
+ parameters: {
1002
+ query?: never;
1003
+ header?: never;
1004
+ path?: never;
1005
+ cookie?: never;
1006
+ };
1007
+ get?: never;
1008
+ put?: never;
1009
+ /**
1010
+ * Close a follow's copy positions
1011
+ * @description Close a follow's copy positions.
1012
+ *
1013
+ * Closes every position in the follow's copy account at market (reduce-only,
1014
+ * immediate-or-cancel) and cancels the resting orders and conditional
1015
+ * orders (TP/SL) on its copy risk buckets (a TWAP cannot run on a copy risk
1016
+ * bucket), but keeps the follow: it stays ACTIVE (or CLOSE_ONLY) and the
1017
+ * leader's next trades keep mirroring. StopFollow is the close-and-stop
1018
+ * path. The proceeds stay in the copy account. Not a flatten guarantee:
1019
+ * on a thin or halted market part of a position can stay open
1020
+ * (`positionsNotClosed`), and a leader trade after the close opens copy
1021
+ * positions again; stop the follow to end the copying. A close is never
1022
+ * gated by copy trading being switched off or by an operations block, and
1023
+ * only a delegated agent session is refused. Both close routes share a
1024
+ * small per-account rate limit (about one close per second, burst 5). The
1025
+ * response is sent once the batch is durably logged; each close's fills
1026
+ * arrive on the order, position and copy channels.
1027
+ */
1028
+ post: operations["close_follow_positions"];
1029
+ delete?: never;
1030
+ options?: never;
1031
+ head?: never;
1032
+ patch?: never;
1033
+ trace?: never;
1034
+ };
1035
+ "/api/v1/copy-trading/follows/{followId}/leader-positions": {
1036
+ parameters: {
1037
+ query?: never;
1038
+ header?: never;
1039
+ path?: never;
1040
+ cookie?: never;
1041
+ };
1042
+ /**
1043
+ * List the open positions of a followed lead trader
1044
+ * @description List the open positions of the leader one of your follows copies.
1045
+ *
1046
+ * The leader comes from the follow, so this works even after the leader
1047
+ * releases their handle. 404 unless the follow is yours; 403 unless it is
1048
+ * live (ACTIVE or CLOSE_ONLY).
1049
+ */
1050
+ get: operations["list_follow_leader_positions"];
1051
+ put?: never;
1052
+ post?: never;
1053
+ delete?: never;
1054
+ options?: never;
1055
+ head?: never;
1056
+ patch?: never;
1057
+ trace?: never;
1058
+ };
1059
+ "/api/v1/copy-trading/follows/{followId}/position-margin": {
1060
+ parameters: {
1061
+ query?: never;
1062
+ header?: never;
1063
+ path?: never;
1064
+ cookie?: never;
1065
+ };
1066
+ get?: never;
1067
+ put?: never;
1068
+ /**
1069
+ * Add margin to a copy position
1070
+ * @description Add margin to a copy position (0XM-2971).
1071
+ *
1072
+ * Moves collateral from the follow's copy account into the margin of its
1073
+ * isolated copy position on one trading pair: the position's margin rises
1074
+ * by exactly `amount`, the copy account's remaining collateral falls by the
1075
+ * same, and your margin account is never touched. It lowers the position's
1076
+ * leverage and moves its liquidation price away; it opens no exposure, so
1077
+ * it works while copy trading is switched off and on a CLOSE_ONLY follow.
1078
+ * There is no margin reduction: a follow exits by being stopped. Follow
1079
+ * writes need a master account session (not a delegated agent or a
1080
+ * sub-account). 404 unless the follow is yours; 409 while it is stopping
1081
+ * or once it is stopped, and when copy trading is not available on the
1082
+ * platform at all (the platform then runs copy trading exits only). It
1083
+ * spends the per-user movement budget withdrawals and collateral transfers
1084
+ * share. It is not idempotent: a retry after a timeout whose first attempt
1085
+ * landed adds the amount twice, so read the follow before retrying.
1086
+ */
1087
+ post: operations["add_follow_position_margin"];
1088
+ delete?: never;
1089
+ options?: never;
1090
+ head?: never;
1091
+ patch?: never;
1092
+ trace?: never;
1093
+ };
1094
+ "/api/v1/copy-trading/follows/{followId}/stop": {
1095
+ parameters: {
1096
+ query?: never;
1097
+ header?: never;
1098
+ path?: never;
1099
+ cookie?: never;
1100
+ };
1101
+ get?: never;
1102
+ put?: never;
1103
+ /**
1104
+ * Stop a follow
1105
+ * @description Stop a follow.
1106
+ *
1107
+ * Stops mirroring the leader. Stopping one of your own follows only; the
1108
+ * follow is identified by its id. An exit is never gated beyond ownership,
1109
+ * except that a delegated agent session cannot stop a follow.
1110
+ */
1111
+ post: operations["stop_follow"];
1112
+ delete?: never;
1113
+ options?: never;
1114
+ head?: never;
1115
+ patch?: never;
1116
+ trace?: never;
1117
+ };
1118
+ "/api/v1/copy-trading/leaders": {
1119
+ parameters: {
1120
+ query?: never;
1121
+ header?: never;
1122
+ path?: never;
1123
+ cookie?: never;
1124
+ };
1125
+ /**
1126
+ * List lead traders
1127
+ * @description List lead traders.
1128
+ *
1129
+ * The public leaderboard: every ACTIVE lead trader with their stats for one
1130
+ * window, sorted by the chosen metric (highest first; leaders without a
1131
+ * value for the metric come last). Served from a snapshot refreshed about
1132
+ * once a minute; `asOf` is its time.
1133
+ */
1134
+ get: operations["list_lead_traders"];
1135
+ put?: never;
1136
+ post?: never;
1137
+ delete?: never;
1138
+ options?: never;
1139
+ head?: never;
1140
+ patch?: never;
1141
+ trace?: never;
1142
+ };
1143
+ "/api/v1/copy-trading/leaders/me": {
1144
+ parameters: {
1145
+ query?: never;
1146
+ header?: never;
1147
+ path?: never;
1148
+ cookie?: never;
1149
+ };
1150
+ /**
1151
+ * Get your lead trader profile
1152
+ * @description Get your lead trader profile.
1153
+ *
1154
+ * Your profile, follow summary and stats for every window. 404 when you
1155
+ * are not a lead trader.
1156
+ */
1157
+ get: operations["get_my_lead_trader"];
1158
+ /**
1159
+ * Register as a lead trader or edit your profile
1160
+ * @description Register as a lead trader or edit your profile.
1161
+ *
1162
+ * A registration is checked against the platform's eligibility rules:
1163
+ * account equity, trading history, closed positions, and a claimed custom
1164
+ * TraderCode handle. The profile is replaced as sent: an omitted `bio` or
1165
+ * `minAllocation` clears it and an omitted `status` means ACTIVE; an
1166
+ * omitted `shareBps` keeps the current share (the platform default on a
1167
+ * registration). A follower with a live follow cannot register.
1168
+ */
1169
+ put: operations["upsert_lead_trader"];
1170
+ post?: never;
1171
+ delete?: never;
1172
+ options?: never;
1173
+ head?: never;
1174
+ patch?: never;
1175
+ trace?: never;
1176
+ };
1177
+ "/api/v1/copy-trading/leaders/me/followers": {
1178
+ parameters: {
1179
+ query?: never;
1180
+ header?: never;
1181
+ path?: never;
1182
+ cookie?: never;
1183
+ };
1184
+ /**
1185
+ * List your followers
1186
+ * @description List your current followers.
1187
+ *
1188
+ * Your live followers (ACTIVE or CLOSE_ONLY), newest first. Each follower
1189
+ * appears by wallet address and display string.
1190
+ */
1191
+ get: operations["list_my_followers"];
1192
+ put?: never;
1193
+ post?: never;
1194
+ delete?: never;
1195
+ options?: never;
1196
+ head?: never;
1197
+ patch?: never;
1198
+ trace?: never;
1199
+ };
1200
+ "/api/v1/copy-trading/leaders/{leader}": {
1201
+ parameters: {
1202
+ query?: never;
1203
+ header?: never;
1204
+ path?: never;
1205
+ cookie?: never;
1206
+ };
1207
+ /**
1208
+ * Get a lead trader
1209
+ * @description Get a lead trader's profile.
1210
+ *
1211
+ * Profile, follow summary and stats for every window. `leader` is the
1212
+ * custom TraderCode handle. 404 for an unknown or
1213
+ * suspended leader.
1214
+ */
1215
+ get: operations["get_lead_trader"];
1216
+ put?: never;
1217
+ post?: never;
1218
+ delete?: never;
1219
+ options?: never;
1220
+ head?: never;
1221
+ patch?: never;
1222
+ trace?: never;
1223
+ };
1224
+ "/api/v1/copy-trading/leaders/{leader}/closed-trades": {
1225
+ parameters: {
1226
+ query?: never;
1227
+ header?: never;
1228
+ path?: never;
1229
+ cookie?: never;
1230
+ };
1231
+ /**
1232
+ * List a lead trader's closed trades
1233
+ * @description List a lead trader's closed trades.
1234
+ *
1235
+ * The leader's reducing executions (partial and full closes, liquidations
1236
+ * and auto-deleveraging), newest first.
1237
+ */
1238
+ get: operations["list_lead_trader_closed_trades"];
1239
+ put?: never;
1240
+ post?: never;
1241
+ delete?: never;
1242
+ options?: never;
1243
+ head?: never;
1244
+ patch?: never;
1245
+ trace?: never;
1246
+ };
1247
+ "/api/v1/copy-trading/leaders/{leader}/positions": {
1248
+ parameters: {
1249
+ query?: never;
1250
+ header?: never;
1251
+ path?: never;
1252
+ cookie?: never;
1253
+ };
1254
+ /**
1255
+ * List a followed lead trader's open positions
1256
+ * @description List a lead trader's open positions.
1257
+ *
1258
+ * Visible to the leader's current followers only: the caller must hold a
1259
+ * live follow (ACTIVE or CLOSE_ONLY) of this leader in the session's
1260
+ * application. The leader is addressed by handle; a released handle names
1261
+ * no one (another user may claim it), so it is a 404 even for a current
1262
+ * follower.
1263
+ */
1264
+ get: operations["list_lead_trader_open_positions"];
1265
+ put?: never;
1266
+ post?: never;
1267
+ delete?: never;
1268
+ options?: never;
1269
+ head?: never;
1270
+ patch?: never;
1271
+ trace?: never;
1272
+ };
881
1273
  "/api/v1/delegated-agents": {
882
1274
  parameters: {
883
1275
  query?: never;
@@ -952,7 +1344,9 @@ export interface paths {
952
1344
  * `ListDelegatedAgentOwners`) and a freshly generated session public key.
953
1345
  * The new session acts as the owner but records the agent's address for
954
1346
  * policy enforcement. Requires an active delegation for the (owner, agent)
955
- * pair.
1347
+ * pair. Session expiry is bounded by the delegation expiry, if set. Every
1348
+ * authenticated request and periodic WebSocket session revalidation requires
1349
+ * the backing delegation to remain active and unexpired.
956
1350
  */
957
1351
  post: operations["create_delegated_session"];
958
1352
  delete?: never;
@@ -976,8 +1370,9 @@ export interface paths {
976
1370
  * @description Revoke a delegated agent.
977
1371
  *
978
1372
  * Master accounts only. Revokes the delegation identified by
979
- * `delegated_agent_id`. Existing delegated sessions are not invalidated; only
980
- * future session creation is blocked.
1373
+ * `delegated_agent_id` and its existing delegated sessions. Subsequent signed
1374
+ * requests and session refresh fail; connected WebSockets lose access at
1375
+ * their next periodic session revalidation. Existing orders are not canceled.
981
1376
  */
982
1377
  delete: operations["revoke_delegated_agent"];
983
1378
  options?: never;
@@ -1070,6 +1465,8 @@ export interface paths {
1070
1465
  /**
1071
1466
  * Get my fee tier and pair schedule
1072
1467
  * @description Return the caller's current fee tier, rolling 14-day volumes, and a pair's schedule.
1468
+ *
1469
+ * Volumes and the tier are wallet-wide: the caller's wallet total across every application.
1073
1470
  */
1074
1471
  get: operations["get_my_fee_tier"];
1075
1472
  put?: never;
@@ -2749,23 +3146,72 @@ export interface components {
2749
3146
  */
2750
3147
  version?: number | null;
2751
3148
  };
2752
- AppUser: {
3149
+ AddFollowPositionMarginRequest: {
2753
3150
  /**
2754
3151
  * Format: uuid
2755
- * @description User UUID
2756
- * @example 123e4567-e89b-12d3-a456-426614174000
3152
+ * @description The follow's id
2757
3153
  */
2758
- id?: string | null;
3154
+ followId?: string | null;
2759
3155
  /**
2760
- * @description Wallet address
2761
- * @example 0x742d35Cc6634C0532925a3b8D4060f31E2C3d8B5
3156
+ * Format: uuid
3157
+ * @description Trading pair UUID of the copy position to add margin to
2762
3158
  */
2763
- address?: string | null;
3159
+ tradingPairId?: string | null;
2764
3160
  /**
2765
- * @description Display username
2766
- * @example trader123
3161
+ * @description Margin to add, in quote units: a positive decimal, taken from the follow's copy account
3162
+ * @example 25
2767
3163
  */
2768
- username?: string | null;
3164
+ amount?: string | null;
3165
+ };
3166
+ AddFollowPositionMarginResponse: {
3167
+ /**
3168
+ * Format: uuid
3169
+ * @description The follow's id
3170
+ */
3171
+ followId?: string | null;
3172
+ /**
3173
+ * Format: uuid
3174
+ * @description Trading pair UUID of the copy position
3175
+ */
3176
+ tradingPairId?: string | null;
3177
+ /**
3178
+ * Format: uuid
3179
+ * @description The copy position's isolated risk bucket
3180
+ */
3181
+ riskBucketId?: string | null;
3182
+ /**
3183
+ * Format: uuid
3184
+ * @description The copy position's id
3185
+ */
3186
+ positionId?: string | null;
3187
+ /**
3188
+ * @description The copy position's margin after the add, in quote units
3189
+ * @example 125
3190
+ */
3191
+ positionMargin?: string | null;
3192
+ /**
3193
+ * @description What the copy account can still put into this position, in quote units, after the add
3194
+ * @example 875
3195
+ */
3196
+ copyAccountAvailable?: string | null;
3197
+ };
3198
+ AppUser: {
3199
+ /**
3200
+ * Format: uuid
3201
+ * @description User UUID
3202
+ * @example 123e4567-e89b-12d3-a456-426614174000
3203
+ */
3204
+ id?: string | null;
3205
+ /**
3206
+ * @description Wallet address
3207
+ * @example 0x742d35Cc6634C0532925a3b8D4060f31E2C3d8B5
3208
+ */
3209
+ address?: string | null;
3210
+ /**
3211
+ * @description Display username
3212
+ * @example trader123
3213
+ */
3214
+ username?: string | null;
2769
3215
  /**
2770
3216
  * @description Account type: master or sub
2771
3217
  * @example master
@@ -3683,6 +4129,37 @@ export interface components {
3683
4129
  /** @description Required when renewing an unexpired lease. Decimal string in JSON. */
3684
4130
  expectedGeneration?: string | null;
3685
4131
  };
4132
+ CloseAllCopyPositionsResponse: {
4133
+ /**
4134
+ * @description Every live follow whose stop is not in progress and whose close ran,
4135
+ * including one with nothing to close (0 orders placed, 0 positions not
4136
+ * closed).
4137
+ */
4138
+ follows?: components["schemas"]["CloseFollowPositionsResponse"][] | null;
4139
+ /** @description Follows whose stop is in progress: their stop closes their positions. */
4140
+ stoppingFollowIds?: string[] | null;
4141
+ /** @description Follows whose close could not run; the other follows still closed. */
4142
+ failedFollows?: components["schemas"]["FollowCloseFailure"][] | null;
4143
+ };
4144
+ CloseFollowPositionsResponse: {
4145
+ /**
4146
+ * Format: uuid
4147
+ * @description The follow's id
4148
+ */
4149
+ followId?: string | null;
4150
+ /**
4151
+ * Format: uint32
4152
+ * @description Reduce-only, immediate-or-cancel close orders placed; each may fill in part
4153
+ * @example 2
4154
+ */
4155
+ closeOrdersPlaced?: number | null;
4156
+ /**
4157
+ * Format: uint32
4158
+ * @description Copy positions still open after the batch (for example a thin or halted market); 0 when the copy account is flat
4159
+ * @example 0
4160
+ */
4161
+ positionsNotClosed?: number | null;
4162
+ };
3686
4163
  ClosePositionRequest: {
3687
4164
  quantity?: string | null;
3688
4165
  closeType?: string | null;
@@ -3696,6 +4173,34 @@ export interface components {
3696
4173
  message?: string | null;
3697
4174
  submittedQuantity?: string | null;
3698
4175
  };
4176
+ ClosedTrade: {
4177
+ /**
4178
+ * Format: uuid
4179
+ * @description Trading pair UUID
4180
+ */
4181
+ tradingPairId?: string | null;
4182
+ /** @description LONG or SHORT; empty on legacy rows */
4183
+ positionSide?: string | null;
4184
+ /**
4185
+ * @description DECREASE, CLOSE, LIQUIDATE or ADL
4186
+ * @example CLOSE
4187
+ */
4188
+ action?: string | null;
4189
+ /** @description Closed size in base units */
4190
+ size?: string | null;
4191
+ /** @description Execution price */
4192
+ exitPrice?: string | null;
4193
+ /** @description Average entry price of the position at the close */
4194
+ entryPrice?: string | null;
4195
+ /** @description Gross realized PnL of the execution, in quote units */
4196
+ realizedPnl?: string | null;
4197
+ /** @description Realized PnL net of the execution's fees and funding, in quote units */
4198
+ netRealizedPnl?: string | null;
4199
+ /** @description Net realized PnL as a percentage of the initial margin released by the execution */
4200
+ realizedRoe?: string | null;
4201
+ /** @description Execution time (RFC 3339) */
4202
+ closedAt?: string | null;
4203
+ };
3699
4204
  ConditionalOrder: {
3700
4205
  conditionalOrderId?: string | null;
3701
4206
  /** Format: uuid */
@@ -3746,6 +4251,27 @@ export interface components {
3746
4251
  /** @description TRAILING_STOP only: when tracking began. Absent while the stop is still waiting for activationPrice (state stays ACTIVE in both phases). */
3747
4252
  trailArmedAt?: string | null;
3748
4253
  };
4254
+ /** @description A follow's market filter. */
4255
+ CopyMarketFilter: {
4256
+ /** @description Trading pair UUIDs to copy (at most 256); empty means every market. */
4257
+ tradingPairIds?: string[] | null;
4258
+ };
4259
+ CopySkip: {
4260
+ /**
4261
+ * Format: uuid
4262
+ * @description Trading pair UUID of the leader fill that was not mirrored
4263
+ */
4264
+ tradingPairId?: string | null;
4265
+ /**
4266
+ * @description Why the mirror was skipped, e.g. INSUFFICIENT_MARGIN, BELOW_MIN, MARKET_STATE, LEVERAGE_MISMATCH
4267
+ * @example INSUFFICIENT_MARGIN
4268
+ */
4269
+ reason?: string | null;
4270
+ /** @description The copy quantity that could not be placed, in base units */
4271
+ requestedQuantity?: string | null;
4272
+ /** @description When the mirror was skipped (RFC 3339) */
4273
+ skippedAt?: string | null;
4274
+ };
3749
4275
  CreateDelegatedSessionRequest: {
3750
4276
  /**
3751
4277
  * Format: uuid
@@ -3758,7 +4284,7 @@ export interface components {
3758
4284
  };
3759
4285
  CreateDelegatedSessionResponse: {
3760
4286
  /**
3761
- * @description Session expiry as a Unix timestamp (seconds)
4287
+ * @description Session expiry as a Unix timestamp (seconds), bounded by the delegation expiry when set. Earlier revocation or policy expiry also ends access.
3762
4288
  * @example 1735689599
3763
4289
  */
3764
4290
  expiresAt?: string | null;
@@ -4184,7 +4710,7 @@ export interface components {
4184
4710
  maxOrderNotional?: string | null;
4185
4711
  /**
4186
4712
  * Format: int32
4187
- * @description Maximum concurrent open orders, if set
4713
+ * @description Legacy field; no concurrent open-order cap is enforced. New or updated policies leave it unset.
4188
4714
  */
4189
4715
  maxOpenOrders?: number | null;
4190
4716
  };
@@ -4297,6 +4823,85 @@ export interface components {
4297
4823
  */
4298
4824
  takerFeeBps?: string | null;
4299
4825
  };
4826
+ Follow: {
4827
+ /**
4828
+ * Format: uuid
4829
+ * @description The follow's id
4830
+ */
4831
+ followId?: string | null;
4832
+ /** @description The leader followed. */
4833
+ leader?: components["schemas"]["LeadTraderRef"] | null;
4834
+ /**
4835
+ * @description ACTIVE, CLOSE_ONLY (only reductions mirror) or STOPPED
4836
+ * @example ACTIVE
4837
+ */
4838
+ status?: string | null;
4839
+ /** @description FOLLOW, CROSS or ISOLATED */
4840
+ marginModePolicy?: string | null;
4841
+ /** @description PROPORTIONAL or FIXED_MARGIN */
4842
+ sizingMode?: string | null;
4843
+ /** @description Margin per leader order for FIXED_MARGIN, in quote units */
4844
+ sizingParam?: string | null;
4845
+ /** @description FOLLOW or FIXED */
4846
+ leverageMode?: string | null;
4847
+ /** @description Leverage for FIXED */
4848
+ fixedLeverage?: string | null;
4849
+ /** @description Collateral allocated to the follow, in quote units */
4850
+ allocation?: string | null;
4851
+ /** @description Copy stop-loss as a fraction of the allocation */
4852
+ slPct?: string | null;
4853
+ /** @description Whether the follow copied the leader's open positions at creation */
4854
+ copyExisting?: boolean | null;
4855
+ /** @description Trading pair UUIDs copied; empty means every market. */
4856
+ tradingPairIds?: string[] | null;
4857
+ /**
4858
+ * Format: uint32
4859
+ * @description Consecutive mirrors skipped for insufficient margin
4860
+ */
4861
+ consecutiveSkips?: number | null;
4862
+ /**
4863
+ * Format: uuid
4864
+ * @description The copy account's cross risk bucket in your margin account
4865
+ */
4866
+ copyRiskBucketId?: string | null;
4867
+ /** @description When the follow started (RFC 3339) */
4868
+ startedAt?: string | null;
4869
+ /** @description When the follow stopped (RFC 3339) */
4870
+ stoppedAt?: string | null;
4871
+ /** @description FOLLOWER, STOP_LOSS, SKIP_LIMIT, ADMIN or LEADER_SUSPENDED */
4872
+ stopReason?: string | null;
4873
+ };
4874
+ /** @description A follow whose close could not run. */
4875
+ FollowCloseFailure: {
4876
+ /**
4877
+ * Format: uuid
4878
+ * @description The follow's id
4879
+ */
4880
+ followId?: string | null;
4881
+ /**
4882
+ * @description Why the close could not run, as a fixed sentence; retry the close
4883
+ * @example The copy positions could not be closed right now; retry shortly
4884
+ */
4885
+ reason?: string | null;
4886
+ };
4887
+ Follower: {
4888
+ /** @description The follower's wallet address (lowercase hex) */
4889
+ walletAddress?: string | null;
4890
+ /** @description The follower's custom TraderCode handle when claimed, else the wallet address */
4891
+ display?: string | null;
4892
+ /**
4893
+ * @description ACTIVE or CLOSE_ONLY
4894
+ * @example ACTIVE
4895
+ */
4896
+ status?: string | null;
4897
+ /**
4898
+ * @description Collateral allocated to the follow, in quote units
4899
+ * @example 1000
4900
+ */
4901
+ allocation?: string | null;
4902
+ /** @description When the follow started (RFC 3339) */
4903
+ startedAt?: string | null;
4904
+ };
4300
4905
  FundingPaymentRecord: {
4301
4906
  /**
4302
4907
  * Format: uuid
@@ -4644,6 +5249,17 @@ export interface components {
4644
5249
  */
4645
5250
  recentRequests?: components["schemas"]["FaucetRequestRecord"][] | null;
4646
5251
  };
5252
+ GetFollowResponse: {
5253
+ /** @description The follow. */
5254
+ follow?: components["schemas"]["Follow"] | null;
5255
+ /** @description Most recent skipped mirrors, newest first (up to 100). */
5256
+ recentSkips?: components["schemas"]["CopySkip"][] | null;
5257
+ /**
5258
+ * @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
5259
+ * @example 1042.75
5260
+ */
5261
+ copyAccountEquity?: string | null;
5262
+ };
4647
5263
  GetFundingStateResponse: {
4648
5264
  /** Format: uuid */
4649
5265
  tradingPairId?: string | null;
@@ -4682,6 +5298,14 @@ export interface components {
4682
5298
  components?: components["schemas"]["IndexComponent"][] | null;
4683
5299
  updatedAt?: string | null;
4684
5300
  };
5301
+ GetLeadTraderResponse: {
5302
+ /** @description The leader's profile. */
5303
+ profile?: components["schemas"]["LeadTraderProfile"] | null;
5304
+ /** @description Current followers and allocation. */
5305
+ followSummary?: components["schemas"]["LeadTraderFollowSummary"] | null;
5306
+ /** @description Stats for 7d, 30d, 90d and all, in that order. */
5307
+ stats?: components["schemas"]["LeadTraderStats"][] | null;
5308
+ };
4685
5309
  GetLimitsResponse: {
4686
5310
  limits?: components["schemas"]["SubAccountLimit"][] | null;
4687
5311
  };
@@ -4730,6 +5354,12 @@ export interface components {
4730
5354
  withdrawableCollateral?: string | null;
4731
5355
  totalPositionNotional?: string | null;
4732
5356
  unrealizedPnl?: string | null;
5357
+ /**
5358
+ * @description On a risk bucket row this is the risk bucket's cash balance (realized
5359
+ * closes, funding and transfers between a copy account's risk buckets land
5360
+ * here), not trading profit; trading PnL comes from position history and
5361
+ * the portfolio PnL endpoints.
5362
+ */
4733
5363
  realizedPnl?: string | null;
4734
5364
  updatedAt?: string | null;
4735
5365
  label?: string | null;
@@ -4747,6 +5377,13 @@ export interface components {
4747
5377
  * rows and persisted-fallback reads.
4748
5378
  */
4749
5379
  availableOrderCollateral?: string | null;
5380
+ /**
5381
+ * Format: uuid
5382
+ * @description On a copy risk bucket row, the id of the follow (copy account) that funds it
5383
+ */
5384
+ copyFollowId?: string | null;
5385
+ /** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
5386
+ copyLeaderHandle?: string | null;
4750
5387
  };
4751
5388
  GetMarkPriceResponse: {
4752
5389
  /** Format: uuid */
@@ -4874,7 +5511,7 @@ export interface components {
4874
5511
  movements?: components["schemas"]["LedgerMovement"][] | null;
4875
5512
  /**
4876
5513
  * Format: uint32
4877
- * @description Total number of movements
5514
+ * @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
5515
  * @example 150
4879
5516
  */
4880
5517
  total?: number | null;
@@ -4892,7 +5529,7 @@ export interface components {
4892
5529
  pageSize?: number | null;
4893
5530
  /**
4894
5531
  * Format: uint32
4895
- * @description Total number of pages
5532
+ * @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
5533
  * @example 8
4897
5534
  */
4898
5535
  totalPages?: number | null;
@@ -4900,22 +5537,22 @@ export interface components {
4900
5537
  GetMyFeeTierResponse: {
4901
5538
  /**
4902
5539
  * Format: int32
4903
- * @description Caller's resolved tier (1–6) from stored weighted 14-day volume
5540
+ * @description Caller's resolved tier (1–6) from their wallet's stored weighted 14-day volume
4904
5541
  * @example 2
4905
5542
  */
4906
5543
  currentTierLevel?: number | null;
4907
5544
  /**
4908
- * @description Caller's weighted 14-day volume (perp + 2.5× spot)
5545
+ * @description Caller's weighted 14-day volume (perp + 2.5× spot), summed across every application the wallet trades through
4909
5546
  * @example 7500000
4910
5547
  */
4911
5548
  weightedVolume14d?: string | null;
4912
5549
  /**
4913
- * @description Caller's rolling 14-day spot volume
5550
+ * @description Caller's rolling 14-day spot volume, summed across every application the wallet trades through
4914
5551
  * @example 1000000
4915
5552
  */
4916
5553
  spotVolume14d?: string | null;
4917
5554
  /**
4918
- * @description Caller's rolling 14-day perp volume
5555
+ * @description Caller's rolling 14-day perp volume, summed across every application the wallet trades through
4919
5556
  * @example 5000000
4920
5557
  */
4921
5558
  perpVolume14d?: string | null;
@@ -5634,7 +6271,7 @@ export interface components {
5634
6271
  cumFees?: string | null;
5635
6272
  /**
5636
6273
  * Format: int64
5637
- * @description Opaque, non-negative producer-owned version for this position row. Compare only within the same position; higher is newer. 0 is the unranked legacy sentinel and never participates in ordering: treat it exactly as an absent version and fall back to a full field comparison rather than ranking it as oldest. It advances on sequenced position mutations (open, add, reduce, close, funding, margin transfer, liquidation, ADL) and is shared by the persisted read, the WebSocket positions snapshot and a RANKED live position_update frame. A live frame is ranked only when it is a faithful projection of the row persisted at that sequence: in practice the fills that leave a position open. Frames that re-read live risk state after sequencing (funding, margin_added/margin_reduced) and terminal frames (which report size 0 and LIQUIDATED, while the stored row keeps its size and records CLOSED) omit the version even though the mutation did advance the persisted one, so an absent version never implies that nothing was persisted. mark_price, unrealized_pnl, liquidation_price, leverage, maintenance_margin_required and initial_margin_required are UNVERSIONED valuation fields, re-derived per payload rather than served from the versioned row: the version does not advance for them (five move with the oracle mark; leverage does not, being opening notional over posted margin, but the live surfaces derive it while the persisted row serves its stored column, so it can still disagree at an unchanged version) (a valuation-only oracle tick persists nothing; a state-transitioning one, a breach or recovery, persists the account's snapshot and restamps the positions it changed), so the merge rule is per field group — on an equal version skip the versioned fields but still take all six from the newer payload, because discarding a whole payload on an equal version freezes displayed PnL and can leave a stale margin requirement on screen. isolated_margin is the one exception among the versioned fields: the WebSocket positions snapshot overlays it from an independent live matching-engine read rather than the versioned row, so take it from the newest payload on an equal version too or a consumer can retain stale backing. The version advances exactly when the row's versioned content changed at that sequence, a change undone within one persistence batch included; a position a command left unchanged keeps its version, so a RANKED live frame for an untouched sibling of a filled position can carry a higher version than the persisted row while describing identical content — rank it as newer, and nothing changes. A response served from live matching-engine state reports 0 (unranked): the engine holds the state but not the version.
6274
+ * @description Opaque, non-negative producer-owned version for this position row. Compare only within the same position; higher is newer. 0 is the unranked legacy sentinel and never participates in ordering: treat it exactly as an absent version and fall back to a full field comparison rather than ranking it as oldest. It advances on sequenced position mutations (open, add, reduce, close, funding, margin transfer, liquidation, ADL) and is shared by the persisted read, the WebSocket positions snapshot and a RANKED live position_update frame. Ranked live frames include fills that leave a position open, direct isolated-position margin adds/reductions, and copy-position margin adds; the copy add refreshes its isolated child and copy-cross siblings at the same version. Cross-risk-bucket ALLOCATE/RELEASE and copy follow/stop refreshes use margin_added/margin_reduced but omit the version because those commands write no position rows. Funding omits it because it re-reads live state after sequencing; terminal frames omit it because they report size 0 and sometimes LIQUIDATED while the stored row keeps its size and records CLOSED. Wallet IN/OUT and plain isolated allocation send no position frame. Transfer frames use captured post-command state and are released only after durable acknowledgement. mark_price, unrealized_pnl, liquidation_price, leverage, maintenance_margin_required and initial_margin_required are UNVERSIONED valuation fields, re-derived per payload rather than served from the versioned row: the version does not advance for them (five move with the oracle mark; leverage does not, being opening notional over posted margin, but the live surfaces derive it while the persisted row serves its stored column, so it can still disagree at an unchanged version) (a valuation-only oracle tick persists nothing; a state-transitioning one, a breach or recovery, persists the account's snapshot and restamps the positions it changed), so the merge rule is per field group — on an equal version skip the versioned fields but still take all six from the newer payload, because discarding a whole payload on an equal version freezes displayed PnL and can leave a stale margin requirement on screen. isolated_margin is the one exception among the versioned fields: the WebSocket positions snapshot overlays it from an independent live matching-engine read rather than the versioned row, so take it from the newest payload on an equal version too or a consumer can retain stale backing. The version advances exactly when the row's versioned content changed at that sequence, a change undone within one persistence batch included; a position a command left unchanged keeps its version, so a RANKED live frame for an untouched sibling of a filled position can carry a higher version than the persisted row while describing identical content — rank it as newer, and nothing changes. A response served from live matching-engine state reports 0 (unranked): the engine holds the state but not the version.
5638
6275
  * @example 918342
5639
6276
  */
5640
6277
  version?: number | null;
@@ -5937,43 +6574,18 @@ export interface components {
5937
6574
  };
5938
6575
  GetUserTradesResponse: {
5939
6576
  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
6577
  /**
5947
6578
  * @description Items per page
5948
6579
  * @example 20
5949
6580
  */
5950
6581
  pageSize?: string | null;
5951
6582
  /**
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.
6583
+ * @description Cursor for the next page. Present whenever that page returned any rows
6584
+ * (AIP-158 "maybe more" semantics), not only when the page is exactly full.
6585
+ * Empty only when a page returned zero rows, which is the sole proof the
6586
+ * walk is exhausted; a non-empty token does not guarantee further results,
6587
+ * so keep following it until a response returns zero rows and an empty
6588
+ * token.
5977
6589
  */
5978
6590
  nextPageToken?: string | null;
5979
6591
  };
@@ -6006,6 +6618,136 @@ export interface components {
6006
6618
  */
6007
6619
  source?: string | null;
6008
6620
  };
6621
+ /** @description Current followers and the collateral they have allocated. Window-free. */
6622
+ LeadTraderFollowSummary: {
6623
+ /**
6624
+ * Format: uint32
6625
+ * @description Live follows (ACTIVE or CLOSE_ONLY)
6626
+ * @example 12
6627
+ */
6628
+ followerCount?: number | null;
6629
+ /**
6630
+ * @description Collateral allocated by live follows, in quote units (AUM as allocated, not marked)
6631
+ * @example 25000
6632
+ */
6633
+ allocated?: string | null;
6634
+ /**
6635
+ * @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
6636
+ * @example 25400.5
6637
+ */
6638
+ aumEquity?: string | null;
6639
+ };
6640
+ LeadTraderListing: {
6641
+ /** @description The leader's profile. */
6642
+ profile?: components["schemas"]["LeadTraderProfile"] | null;
6643
+ /** @description Current followers and allocation. */
6644
+ followSummary?: components["schemas"]["LeadTraderFollowSummary"] | null;
6645
+ /** @description Stats for the requested window. */
6646
+ stats?: components["schemas"]["LeadTraderStats"] | null;
6647
+ };
6648
+ LeadTraderOpenPosition: {
6649
+ /**
6650
+ * Format: uuid
6651
+ * @description Trading pair UUID
6652
+ */
6653
+ tradingPairId?: string | null;
6654
+ /** @description LONG or SHORT */
6655
+ side?: string | null;
6656
+ /** @description Position size in base units */
6657
+ size?: string | null;
6658
+ /** @description Average entry price */
6659
+ entryPrice?: string | null;
6660
+ /** @description Current mark price */
6661
+ markPrice?: string | null;
6662
+ /** @description Unrealized PnL at the mark, in quote units */
6663
+ unrealizedPnl?: string | null;
6664
+ /** @description Position leverage */
6665
+ leverage?: string | null;
6666
+ /** @description CROSS or ISOLATED */
6667
+ marginMode?: string | null;
6668
+ };
6669
+ LeadTraderProfile: {
6670
+ /** @description Who the leader is. */
6671
+ leader?: components["schemas"]["LeadTraderRef"] | null;
6672
+ /**
6673
+ * @description ACTIVE (accepting follows), PAUSED (existing follows keep mirroring, no new follows) or SUSPENDED (only on your own profile)
6674
+ * @example ACTIVE
6675
+ */
6676
+ status?: string | null;
6677
+ /**
6678
+ * Format: uint32
6679
+ * @description The leader's share of followers' realized profit, in basis points
6680
+ * @example 1000
6681
+ */
6682
+ shareBps?: number | null;
6683
+ /** @description Free-text profile description; empty when none */
6684
+ bio?: string | null;
6685
+ /**
6686
+ * @description The leader's minimum follow allocation in quote units, when above the platform floor
6687
+ * @example 1000
6688
+ */
6689
+ minAllocation?: string | null;
6690
+ /**
6691
+ * @description Registration time (RFC 3339)
6692
+ * @example 2026-09-23T12:00:00Z
6693
+ */
6694
+ registeredAt?: string | null;
6695
+ };
6696
+ /** @description A lead trader as the public sees them: never an internal id. */
6697
+ LeadTraderRef: {
6698
+ /**
6699
+ * @description The leader's wallet address (lowercase hex)
6700
+ * @example 0x1234567890abcdef1234567890abcdef12345678
6701
+ */
6702
+ walletAddress?: string | null;
6703
+ /**
6704
+ * @description The leader's custom TraderCode handle, when claimed
6705
+ * @example alpha_trader
6706
+ */
6707
+ handle?: string | null;
6708
+ /**
6709
+ * @description The handle when claimed, else the wallet address (every listed or addressable leader has a handle)
6710
+ * @example alpha_trader
6711
+ */
6712
+ display?: string | null;
6713
+ };
6714
+ /**
6715
+ * @description A leader's trading performance over one window, from the account PnL
6716
+ * rollups. Bucket balances never feed these numbers.
6717
+ */
6718
+ LeadTraderStats: {
6719
+ /**
6720
+ * @description 7d, 30d, 90d or all
6721
+ * @example 30d
6722
+ */
6723
+ window?: string | null;
6724
+ /**
6725
+ * @description Trading PnL over the window in quote units: realized plus unrealized, net of fees and funding
6726
+ * @example 1250.5
6727
+ */
6728
+ pnl?: string | null;
6729
+ /**
6730
+ * @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
6731
+ * @example 12.5
6732
+ */
6733
+ roiPct?: string | null;
6734
+ /**
6735
+ * @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)
6736
+ * @example 4.2
6737
+ */
6738
+ maxDrawdownPct?: string | null;
6739
+ /**
6740
+ * @description Winning closes as a percentage of winning plus losing closes over the window; absent when there were none
6741
+ * @example 61.5
6742
+ */
6743
+ winRatePct?: string | null;
6744
+ /**
6745
+ * Format: uint32
6746
+ * @description Closes over the window, break-even included
6747
+ * @example 40
6748
+ */
6749
+ closedTrades?: number | null;
6750
+ };
6009
6751
  LedgerMovement: {
6010
6752
  /**
6011
6753
  * Format: uuid
@@ -6283,23 +7025,17 @@ export interface components {
6283
7025
  orders?: components["schemas"]["ConditionalOrder"][] | null;
6284
7026
  /**
6285
7027
  * 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).
7028
+ * @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
7029
  * @example 3
6288
7030
  */
6289
7031
  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
7032
  /** Format: uint32 */
6297
7033
  pageSize?: number | null;
6298
7034
  /**
6299
7035
  * @description Cursor for the next page, minted only when a further page exists — the
6300
7036
  * 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).
7037
+ * Empty on the final page (including a full final page, since nothing
7038
+ * follows it).
6303
7039
  * Follow it until it comes back empty; that empty token is the definitive
6304
7040
  * end of the walk, so no extra zero-row request is needed. Do not feed the
6305
7041
  * empty token back as `page_token` — an empty input `page_token` restarts
@@ -6315,6 +7051,9 @@ export interface components {
6315
7051
  /** @description The calling owner's delegated agents */
6316
7052
  agents?: components["schemas"]["DelegatedAgent"][] | null;
6317
7053
  };
7054
+ ListFollowLeaderPositionsResponse: {
7055
+ positions?: components["schemas"]["LeadTraderOpenPosition"][] | null;
7056
+ };
6318
7057
  ListFundingHistoryResponse: {
6319
7058
  records?: components["schemas"]["FundingRecord"][] | null;
6320
7059
  /** Format: uint32 */
@@ -6328,7 +7067,7 @@ export interface components {
6328
7067
  records?: components["schemas"]["FundingPaymentRecord"][] | null;
6329
7068
  /**
6330
7069
  * Format: uint32
6331
- * @description Total matching funding payment records
7070
+ * @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
7071
  * @example 2
6333
7072
  */
6334
7073
  total?: number | null;
@@ -6346,11 +7085,26 @@ export interface components {
6346
7085
  pageSize?: number | null;
6347
7086
  /**
6348
7087
  * Format: uint32
6349
- * @description Total number of pages
7088
+ * @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
7089
  * @example 1
6351
7090
  */
6352
7091
  totalPages?: number | null;
6353
7092
  };
7093
+ ListLeadTraderClosedTradesResponse: {
7094
+ closedTrades?: components["schemas"]["ClosedTrade"][] | null;
7095
+ /** @description Cursor for the next page; empty when there are no more. */
7096
+ nextPageToken?: string | null;
7097
+ };
7098
+ ListLeadTraderOpenPositionsResponse: {
7099
+ positions?: components["schemas"]["LeadTraderOpenPosition"][] | null;
7100
+ };
7101
+ ListLeadTradersResponse: {
7102
+ leaders?: components["schemas"]["LeadTraderListing"][] | null;
7103
+ /** @description Cursor for the next page; empty when there are no more. */
7104
+ nextPageToken?: string | null;
7105
+ /** @description Time of the leaderboard snapshot these rows come from (RFC 3339) */
7106
+ asOf?: string | null;
7107
+ };
6354
7108
  ListManagedMarketAssignmentsResponse: {
6355
7109
  /** @description Expected assignments, including phases currently unable to quote. */
6356
7110
  items?: components["schemas"]["ManagedMarketAssignment"][] | null;
@@ -6371,6 +7125,16 @@ export interface components {
6371
7125
  /** Format: uint32 */
6372
7126
  pageSize?: number | null;
6373
7127
  };
7128
+ ListMyFollowersResponse: {
7129
+ followers?: components["schemas"]["Follower"][] | null;
7130
+ /** @description Cursor for the next page; empty when there are no more. */
7131
+ nextPageToken?: string | null;
7132
+ };
7133
+ ListMyFollowsResponse: {
7134
+ follows?: components["schemas"]["Follow"][] | null;
7135
+ /** @description Cursor for the next page; empty when there are no more. */
7136
+ nextPageToken?: string | null;
7137
+ };
6374
7138
  ListOrdersResponse: {
6375
7139
  orders?: components["schemas"]["GetOrderResponse"][] | null;
6376
7140
  /**
@@ -6379,13 +7143,6 @@ export interface components {
6379
7143
  * @example 150
6380
7144
  */
6381
7145
  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
7146
  /**
6390
7147
  * Format: uint32
6391
7148
  * @description Items per page
@@ -6399,19 +7156,12 @@ export interface components {
6399
7156
  */
6400
7157
  totalPages?: number | null;
6401
7158
  /**
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.
7159
+ * @description Cursor for the next page. Present whenever that page returned any rows
7160
+ * (AIP-158 "maybe more" semantics), not only when the page is exactly full.
7161
+ * Empty only when a page returned zero rows, which is the sole proof the
7162
+ * walk is exhausted; a non-empty token does not guarantee further results,
7163
+ * so keep following it until a response returns zero rows and an empty
7164
+ * token.
6415
7165
  */
6416
7166
  nextPageToken?: string | null;
6417
7167
  /**
@@ -6514,17 +7264,10 @@ export interface components {
6514
7264
  orders?: components["schemas"]["TwapOrder"][] | null;
6515
7265
  /**
6516
7266
  * 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).
7267
+ * @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
7268
  * @example 3
6519
7269
  */
6520
7270
  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
7271
  /**
6529
7272
  * Format: uint32
6530
7273
  * @description Items per page
@@ -6534,8 +7277,8 @@ export interface components {
6534
7277
  /**
6535
7278
  * @description Cursor for the next page, minted only when a further page exists — the
6536
7279
  * 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).
7280
+ * Empty on the final page (including a full final page, since nothing
7281
+ * follows it).
6539
7282
  * Follow it until it comes back empty; that empty token is the definitive
6540
7283
  * end of the walk, so no extra zero-row request is needed. Do not feed the
6541
7284
  * empty token back as `page_token` — an empty input `page_token` restarts
@@ -6619,6 +7362,12 @@ export interface components {
6619
7362
  withdrawableCollateral?: string | null;
6620
7363
  totalPositionNotional?: string | null;
6621
7364
  unrealizedPnl?: string | null;
7365
+ /**
7366
+ * @description On a risk bucket row this is the risk bucket's cash balance (realized
7367
+ * closes, funding and transfers between a copy account's risk buckets land
7368
+ * here), not trading profit; trading PnL comes from position history and
7369
+ * the portfolio PnL endpoints.
7370
+ */
6622
7371
  realizedPnl?: string | null;
6623
7372
  updatedAt?: string | null;
6624
7373
  label?: string | null;
@@ -6667,6 +7416,13 @@ export interface components {
6667
7416
  * neither of the gate's terms is reconstructable.
6668
7417
  */
6669
7418
  availableOrderCollateral?: string | null;
7419
+ /**
7420
+ * Format: uuid
7421
+ * @description On a copy risk bucket row, the id of the follow (copy account) that funds it
7422
+ */
7423
+ copyFollowId?: string | null;
7424
+ /** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
7425
+ copyLeaderHandle?: string | null;
6670
7426
  };
6671
7427
  MatchResult: {
6672
7428
  /**
@@ -7122,6 +7878,13 @@ export interface components {
7122
7878
  * against another.
7123
7879
  */
7124
7880
  tradingPairId?: string | null;
7881
+ /**
7882
+ * Format: uuid
7883
+ * @description On a copy risk bucket row, the id of the follow (copy account) that funds it
7884
+ */
7885
+ copyFollowId?: string | null;
7886
+ /** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
7887
+ copyLeaderHandle?: string | null;
7125
7888
  };
7126
7889
  PortfolioSeriesWindow: {
7127
7890
  /**
@@ -7319,7 +8082,7 @@ export interface components {
7319
8082
  cumFees?: string | null;
7320
8083
  /**
7321
8084
  * Format: int64
7322
- * @description Opaque, non-negative producer-owned version for this position row. Compare only within the same position; higher is newer. 0 is the unranked legacy sentinel and never participates in ordering: it means the row predates this field or came from a producer that does not stamp it, so treat it exactly as an absent version and fall back to a full field comparison rather than ranking it as oldest. It advances on sequenced position mutations (open, add, reduce, close, funding, margin transfer, liquidation, ADL) and is shared by the persisted read, the WebSocket positions snapshot and a RANKED live position_update frame. A live frame is ranked only when it is a faithful projection of the row persisted at that sequence: in practice the fills that leave a position open. Frames that re-read live risk state after sequencing (funding, margin_added/margin_reduced) and terminal frames (which report size 0 and LIQUIDATED, while the stored row keeps its size and records CLOSED) omit the version even though the mutation did advance the persisted one, so an absent version never implies that nothing was persisted. mark_price, unrealized_pnl, liquidation_price, leverage, maintenance_margin_required and initial_margin_required are UNVERSIONED valuation fields, re-derived per payload rather than served from the versioned row: the version does not advance for them (five move with the oracle mark; leverage does not, being opening notional over posted margin, but the live surfaces derive it while the persisted row serves its stored column, so it can still disagree at an unchanged version) (a valuation-only oracle tick persists nothing; a state-transitioning one, a breach or recovery, persists the account's snapshot and restamps the positions it changed), so the merge rule is per field group — on an equal version skip the versioned fields but still take all six from the newer payload, because discarding a whole payload on an equal version freezes displayed PnL and can leave a stale margin requirement on screen. isolated_margin is the one exception among the versioned fields: the WebSocket positions snapshot overlays it from an independent live matching-engine read rather than the versioned row, so take it from the newest payload on an equal version too or a consumer can retain stale backing. The version advances exactly when the row's versioned content changed at that sequence, a change undone within one persistence batch included; a position a command left unchanged keeps its version, so a RANKED live frame for an untouched sibling of a filled position can carry a higher version than the persisted row while describing identical content — rank it as newer, and nothing changes. A response served from live matching-engine state reports 0 (unranked): the engine holds the state but not the version.
8085
+ * @description Opaque, non-negative producer-owned version for this position row. Compare only within the same position; higher is newer. 0 is the unranked legacy sentinel and never participates in ordering: it means the row predates this field or came from a producer that does not stamp it, so treat it exactly as an absent version and fall back to a full field comparison rather than ranking it as oldest. It advances on sequenced position mutations (open, add, reduce, close, funding, margin transfer, liquidation, ADL) and is shared by the persisted read, the WebSocket positions snapshot and a RANKED live position_update frame. Ranked live frames include fills that leave a position open, direct isolated-position margin adds/reductions, and copy-position margin adds; the copy add refreshes its isolated child and copy-cross siblings at the same version. Cross-risk-bucket ALLOCATE/RELEASE and copy follow/stop refreshes use margin_added/margin_reduced but omit the version because those commands write no position rows. Funding omits it because it re-reads live state after sequencing; terminal frames omit it because they report size 0 and sometimes LIQUIDATED while the stored row keeps its size and records CLOSED. Wallet IN/OUT and plain isolated allocation send no position frame. Transfer frames use captured post-command state and are released only after durable acknowledgement. mark_price, unrealized_pnl, liquidation_price, leverage, maintenance_margin_required and initial_margin_required are UNVERSIONED valuation fields, re-derived per payload rather than served from the versioned row: the version does not advance for them (five move with the oracle mark; leverage does not, being opening notional over posted margin, but the live surfaces derive it while the persisted row serves its stored column, so it can still disagree at an unchanged version) (a valuation-only oracle tick persists nothing; a state-transitioning one, a breach or recovery, persists the account's snapshot and restamps the positions it changed), so the merge rule is per field group — on an equal version skip the versioned fields but still take all six from the newer payload, because discarding a whole payload on an equal version freezes displayed PnL and can leave a stale margin requirement on screen. isolated_margin is the one exception among the versioned fields: the WebSocket positions snapshot overlays it from an independent live matching-engine read rather than the versioned row, so take it from the newest payload on an equal version too or a consumer can retain stale backing. The version advances exactly when the row's versioned content changed at that sequence, a change undone within one persistence batch included; a position a command left unchanged keeps its version, so a RANKED live frame for an untouched sibling of a filled position can carry a higher version than the persisted row while describing identical content — rank it as newer, and nothing changes. A response served from live matching-engine state reports 0 (unranked): the engine holds the state but not the version.
7323
8086
  * @example 918342
7324
8087
  */
7325
8088
  version?: number | null;
@@ -7398,34 +8161,103 @@ export interface components {
7398
8161
  */
7399
8162
  cumFees?: string | null;
7400
8163
  };
7401
- PriceChange: {
8164
+ PreviewFollowRequest: {
7402
8165
  /**
7403
- * @description Price 24 hours ago
7404
- * @example 34500.00
8166
+ * @description The leader's custom TraderCode handle
8167
+ * @example alpha_trader
7405
8168
  */
7406
- price24hAgo?: string | null;
8169
+ leader?: string | null;
7407
8170
  /**
7408
- * @description Absolute price change in last 24 hours
7409
- * @example 500.00
8171
+ * @description FOLLOW (default), CROSS or ISOLATED
8172
+ * @example FOLLOW
7410
8173
  */
7411
- priceChange24h?: string | null;
8174
+ marginModePolicy?: string | null;
7412
8175
  /**
7413
- * @description Percentage price change in last 24 hours
7414
- * @example 1.45
8176
+ * @description PROPORTIONAL (default) or FIXED_MARGIN
8177
+ * @example PROPORTIONAL
7415
8178
  */
7416
- priceChangePercent24h?: string | null;
7417
- };
7418
- PriceLevel: {
8179
+ sizingMode?: string | null;
8180
+ /** @description Margin per leader order in quote units; required for FIXED_MARGIN, omitted otherwise */
8181
+ sizingParam?: string | null;
7419
8182
  /**
7420
- * @description Price at this level
7421
- * @example 35000.00
8183
+ * @description FOLLOW (default) or FIXED
8184
+ * @example FOLLOW
7422
8185
  */
7423
- price?: string | null;
8186
+ leverageMode?: string | null;
8187
+ /** @description Leverage for every copy; required for FIXED, omitted otherwise */
8188
+ fixedLeverage?: string | null;
7424
8189
  /**
7425
- * @description Total quantity at this price level
7426
- * @example 1.5
8190
+ * @description Collateral the copy account would start with, in quote units
8191
+ * @example 1000
7427
8192
  */
7428
- quantity?: string | null;
8193
+ allocation?: string | null;
8194
+ /** @description Markets to copy; omit to copy every market the leader trades. */
8195
+ markets?: components["schemas"]["CopyMarketFilter"] | null;
8196
+ };
8197
+ /**
8198
+ * @description What following with `copyExisting` would open, as totals only. The caller
8199
+ * of a preview is never a follower of the leader (copyExisting applies only
8200
+ * on a create), so the response names no pair, side, size, mark or skip
8201
+ * reason, and a leader whose positions cannot be copied at all gives
8202
+ * `copiedPositions = 0` with no reason. The totals are rounded UP to cents
8203
+ * (the settlement currency's display precision). A residual aggregate signal
8204
+ * remains: the counts and the rounded totals across varied allocations
8205
+ * bound the size of the leader's book, never its markets or direction.
8206
+ */
8207
+ PreviewFollowResponse: {
8208
+ /**
8209
+ * @description Estimated collateral the copied positions would reserve at placement, in quote units, rounded up to cents
8210
+ * @example 125.40
8211
+ */
8212
+ estimatedMargin?: string | null;
8213
+ /**
8214
+ * @description Estimated taker fees of the copies, in quote units, rounded up to cents
8215
+ * @example 0.35
8216
+ */
8217
+ estimatedFee?: string | null;
8218
+ /**
8219
+ * Format: uint32
8220
+ * @description The leader's positions (in the copied markets) that would be copied
8221
+ * @example 2
8222
+ */
8223
+ copiedPositions?: number | null;
8224
+ /**
8225
+ * Format: uint32
8226
+ * @description The leader's positions (in the copied markets) that would not be copied
8227
+ * @example 1
8228
+ */
8229
+ skippedPositions?: number | null;
8230
+ /** @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 */
8231
+ truncated?: boolean | null;
8232
+ };
8233
+ PriceChange: {
8234
+ /**
8235
+ * @description Price 24 hours ago
8236
+ * @example 34500.00
8237
+ */
8238
+ price24hAgo?: string | null;
8239
+ /**
8240
+ * @description Absolute price change in last 24 hours
8241
+ * @example 500.00
8242
+ */
8243
+ priceChange24h?: string | null;
8244
+ /**
8245
+ * @description Percentage price change in last 24 hours
8246
+ * @example 1.45
8247
+ */
8248
+ priceChangePercent24h?: string | null;
8249
+ };
8250
+ PriceLevel: {
8251
+ /**
8252
+ * @description Price at this level
8253
+ * @example 35000.00
8254
+ */
8255
+ price?: string | null;
8256
+ /**
8257
+ * @description Total quantity at this price level
8258
+ * @example 1.5
8259
+ */
8260
+ quantity?: string | null;
7429
8261
  /**
7430
8262
  * Format: uint32
7431
8263
  * @description Number of orders at this price level
@@ -7668,7 +8500,7 @@ export interface components {
7668
8500
  RefreshResponse: {
7669
8501
  /**
7670
8502
  * Format: int32
7671
- * @description Unix timestamp when the session expires after refresh
8503
+ * @description Unix timestamp when the session expires after refresh. For delegated sessions, bounded by the active delegation expiry when set.
7672
8504
  * @example 1699876543
7673
8505
  */
7674
8506
  expiresAt?: number | null;
@@ -8285,6 +9117,13 @@ export interface components {
8285
9117
  */
8286
9118
  slippageToleranceBps?: number | null;
8287
9119
  };
9120
+ StopFollowResponse: {
9121
+ /**
9122
+ * Format: uuid
9123
+ * @description The stopped follow's id
9124
+ */
9125
+ followId?: string | null;
9126
+ };
8288
9127
  SubAccount: {
8289
9128
  /**
8290
9129
  * Format: uuid
@@ -9139,38 +9978,38 @@ export interface components {
9139
9978
  * @description Agent wallet address (EVM, 42 chars including 0x)
9140
9979
  * @example 0x742d35cc6634c0532925a3b8d4060f31e2c3d8b5
9141
9980
  */
9142
- agentAddress?: string | null;
9981
+ agentAddress: string;
9143
9982
  /**
9144
9983
  * @description Optional human-friendly label for the agent
9145
9984
  * @example market-maker-bot
9146
9985
  */
9147
9986
  name?: string | null;
9148
9987
  /**
9149
- * @description Optional delegation expiry timestamp (ISO 8601). Omit for no expiry.
9988
+ * @description Optional delegation expiry timestamp (ISO 8601). Ends delegated reads, trading, and session refresh. Omit for no delegation expiry; session expiry still applies.
9150
9989
  * @example 2026-12-31T23:59:59Z
9151
9990
  */
9152
9991
  expiresAt?: string | null;
9153
9992
  /**
9154
- * @description Actions the agent may perform: CREATE_ORDER, CANCEL_ORDER, REPLACE_ORDER
9993
+ * @description Required JSON array of actions the agent may perform: CREATE_ORDER, CANCEL_ORDER, REPLACE_ORDER. An empty array permits no actions.
9155
9994
  * @example [
9156
9995
  * "CREATE_ORDER",
9157
9996
  * "CANCEL_ORDER"
9158
9997
  * ]
9159
9998
  */
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. */
9999
+ allowedActions: string[];
10000
+ /** @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. */
10001
+ allowedTradingPairIds: string[];
10002
+ /** @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
10003
  allowedMarginAccountIds?: string[] | null;
9165
10004
  /**
9166
- * @description Permitted order types (LIMIT, MARKET). Empty means unrestricted.
10005
+ * @description Optional JSON array of permitted order types (LIMIT, MARKET). Omitted, null, or [] means unrestricted order types.
9167
10006
  * @example [
9168
10007
  * "LIMIT"
9169
10008
  * ]
9170
10009
  */
9171
10010
  allowedOrderTypes?: string[] | null;
9172
10011
  /**
9173
- * @description Permitted time-in-force values (GTC, IOC, FOK). Empty means unrestricted.
10012
+ * @description Optional JSON array of permitted time-in-force values (GTC, IOC, FOK). Omitted, null, or [] means unrestricted time in force.
9174
10013
  * @example [
9175
10014
  * "GTC"
9176
10015
  * ]
@@ -9188,11 +10027,104 @@ export interface components {
9188
10027
  maxOrderNotional?: string | null;
9189
10028
  /**
9190
10029
  * Format: int32
9191
- * @description Maximum concurrent open orders. Omit for no limit.
9192
- * @example 100
10030
+ * @description Unsupported legacy field. Requests that set maxOpenOrders are rejected; no concurrent open-order cap is enforced. Omit this field.
9193
10031
  */
9194
10032
  maxOpenOrders?: number | null;
9195
10033
  };
10034
+ UpsertFollowRequest: {
10035
+ /**
10036
+ * Format: uuid
10037
+ * @description Omit to create a follow; set to edit one of your follows
10038
+ */
10039
+ followId?: string | null;
10040
+ /**
10041
+ * @description The leader's custom TraderCode handle; required on a create, optional on an edit (a consistency check when it resolves)
10042
+ * @example alpha_trader
10043
+ */
10044
+ leader?: string | null;
10045
+ /**
10046
+ * @description FOLLOW (default: the leader's risk bucket mode per market), CROSS or ISOLATED
10047
+ * @example FOLLOW
10048
+ */
10049
+ marginModePolicy?: string | null;
10050
+ /**
10051
+ * @description PROPORTIONAL (default: scaled by copy account equity over the leader's equity) or FIXED_MARGIN
10052
+ * @example PROPORTIONAL
10053
+ */
10054
+ sizingMode?: string | null;
10055
+ /** @description Margin per leader order in quote units; required for FIXED_MARGIN, omitted otherwise */
10056
+ sizingParam?: string | null;
10057
+ /**
10058
+ * @description FOLLOW (default: the leader's leverage) or FIXED
10059
+ * @example FOLLOW
10060
+ */
10061
+ leverageMode?: string | null;
10062
+ /** @description Leverage for every copy; required for FIXED, omitted otherwise */
10063
+ fixedLeverage?: string | null;
10064
+ /**
10065
+ * @description Collateral for the copy account, in quote units, at or above the minimum
10066
+ * @example 1000
10067
+ */
10068
+ allocation?: string | null;
10069
+ /**
10070
+ * @description Copy stop-loss as a fraction of the allocation in (0, 1]; omitted means none
10071
+ * @example 0.25
10072
+ */
10073
+ slPct?: string | null;
10074
+ /** @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 */
10075
+ copyExisting?: boolean | null;
10076
+ /** @description Markets to copy; omit to copy every market the leader trades. */
10077
+ markets?: components["schemas"]["CopyMarketFilter"] | null;
10078
+ };
10079
+ UpsertFollowResponse: {
10080
+ /**
10081
+ * Format: uuid
10082
+ * @description The follow's id
10083
+ */
10084
+ followId?: string | null;
10085
+ /**
10086
+ * Format: uuid
10087
+ * @description The copy account: the cross risk bucket in your margin account that holds this follow's collateral and positions
10088
+ */
10089
+ copyRiskBucketId?: string | null;
10090
+ /** @description True when this call created the follow, false when it edited one */
10091
+ created?: boolean | null;
10092
+ };
10093
+ UpsertLeadTraderRequest: {
10094
+ /**
10095
+ * Format: uint32
10096
+ * @description Profit share in basis points, within the platform's range; omitted keeps the current share (the platform default on a registration)
10097
+ * @example 1000
10098
+ */
10099
+ shareBps?: number | null;
10100
+ /** @description Free-text profile description, at most 2,000 bytes; omitted clears it */
10101
+ bio?: string | null;
10102
+ /**
10103
+ * @description ACTIVE (default) or PAUSED
10104
+ * @example ACTIVE
10105
+ */
10106
+ status?: string | null;
10107
+ /**
10108
+ * @description Minimum follow allocation in quote units, at or above the platform floor; omitted clears it
10109
+ * @example 1000
10110
+ */
10111
+ minAllocation?: string | null;
10112
+ };
10113
+ UpsertLeadTraderResponse: {
10114
+ /** @description True when this call registered you, false when it edited your profile */
10115
+ created?: boolean | null;
10116
+ /**
10117
+ * @description Your status after the call
10118
+ * @example ACTIVE
10119
+ */
10120
+ status?: string | null;
10121
+ /**
10122
+ * Format: uint32
10123
+ * @description Your profit share after the call, in basis points
10124
+ * @example 1000
10125
+ */
10126
+ shareBps?: number | null;
10127
+ };
9196
10128
  UserInfo: {
9197
10129
  /**
9198
10130
  * Format: uuid
@@ -10396,31 +11328,20 @@ export interface operations {
10396
11328
  get_user_trades: {
10397
11329
  parameters: {
10398
11330
  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
11331
  /** @description Items per page (max: 100 in page-number mode; up to 1000 when pageToken is present) */
10405
11332
  pageSize?: number;
10406
11333
  /** @description Trading pair identifier (UUID) */
10407
11334
  tradingPairId?: string;
10408
11335
  /**
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).
11336
+ * @description Pagination cursor with two states:
11337
+ * - Omitted or empty string (""): start a cursor walk with no prior
11338
+ * position, from the newest row.
10414
11339
  * - Non-empty: an opaque cursor from a previous response's
10415
11340
  * `next_page_token`; results resume immediately after that position.
10416
11341
  *
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.
11342
+ * Every walk covers full trade history — hot and archived rows merged. The
11343
+ * response carries no item count: this listing's table is too large to count
11344
+ * behind a filter. Filters must match the request that produced the token.
10424
11345
  */
10425
11346
  pageToken?: string;
10426
11347
  };
@@ -10762,8 +11683,979 @@ export interface operations {
10762
11683
  };
10763
11684
  content?: never;
10764
11685
  };
10765
- /** @description Unauthorized - Invalid or missing x-server-key */
10766
- 401: {
11686
+ /** @description Unauthorized - Invalid or missing x-server-key */
11687
+ 401: {
11688
+ headers: {
11689
+ [name: string]: unknown;
11690
+ };
11691
+ content?: never;
11692
+ };
11693
+ /** @description Internal server error */
11694
+ 500: {
11695
+ headers: {
11696
+ [name: string]: unknown;
11697
+ };
11698
+ content?: never;
11699
+ };
11700
+ };
11701
+ };
11702
+ create_challenge: {
11703
+ parameters: {
11704
+ query?: never;
11705
+ header?: never;
11706
+ path?: never;
11707
+ cookie?: never;
11708
+ };
11709
+ requestBody: {
11710
+ content: {
11711
+ "application/json": components["schemas"]["ChallengeRequest"];
11712
+ };
11713
+ };
11714
+ responses: {
11715
+ /** @description OK */
11716
+ 200: {
11717
+ headers: {
11718
+ [name: string]: unknown;
11719
+ };
11720
+ content: {
11721
+ "application/json": components["schemas"]["ChallengeResponse"];
11722
+ };
11723
+ };
11724
+ /** @description Invalid request parameters */
11725
+ 400: {
11726
+ headers: {
11727
+ [name: string]: unknown;
11728
+ };
11729
+ content?: never;
11730
+ };
11731
+ /** @description Origin not allowed for this application */
11732
+ 403: {
11733
+ headers: {
11734
+ [name: string]: unknown;
11735
+ };
11736
+ content?: never;
11737
+ };
11738
+ /** @description Invalid clientId */
11739
+ 404: {
11740
+ headers: {
11741
+ [name: string]: unknown;
11742
+ };
11743
+ content?: never;
11744
+ };
11745
+ /** @description Authentication rate limit exceeded — challenge and verify share one per-client-address budget (60 requests/min sustained, burst 120); retry after the interval in details.retryAfter */
11746
+ 429: {
11747
+ headers: {
11748
+ [name: string]: unknown;
11749
+ };
11750
+ content?: never;
11751
+ };
11752
+ /** @description Internal server error */
11753
+ 500: {
11754
+ headers: {
11755
+ [name: string]: unknown;
11756
+ };
11757
+ content?: never;
11758
+ };
11759
+ };
11760
+ };
11761
+ refresh_session: {
11762
+ parameters: {
11763
+ query?: never;
11764
+ header?: never;
11765
+ path?: never;
11766
+ cookie?: never;
11767
+ };
11768
+ requestBody: {
11769
+ content: {
11770
+ "application/json": components["schemas"]["RefreshRequest"];
11771
+ };
11772
+ };
11773
+ responses: {
11774
+ /** @description OK */
11775
+ 200: {
11776
+ headers: {
11777
+ [name: string]: unknown;
11778
+ };
11779
+ content: {
11780
+ "application/json": components["schemas"]["RefreshResponse"];
11781
+ };
11782
+ };
11783
+ /** @description Missing, invalid, or expired session signature */
11784
+ 401: {
11785
+ headers: {
11786
+ [name: string]: unknown;
11787
+ };
11788
+ content?: never;
11789
+ };
11790
+ /** @description Session not found */
11791
+ 404: {
11792
+ headers: {
11793
+ [name: string]: unknown;
11794
+ };
11795
+ content?: never;
11796
+ };
11797
+ /** @description Internal server error */
11798
+ 500: {
11799
+ headers: {
11800
+ [name: string]: unknown;
11801
+ };
11802
+ content?: never;
11803
+ };
11804
+ };
11805
+ };
11806
+ revoke_session: {
11807
+ parameters: {
11808
+ query?: never;
11809
+ header?: never;
11810
+ path?: never;
11811
+ cookie?: never;
11812
+ };
11813
+ requestBody: {
11814
+ content: {
11815
+ "application/json": components["schemas"]["RevokeRequest"];
11816
+ };
11817
+ };
11818
+ responses: {
11819
+ /** @description OK */
11820
+ 200: {
11821
+ headers: {
11822
+ [name: string]: unknown;
11823
+ };
11824
+ content: {
11825
+ "application/json": components["schemas"]["RevokeResponse"];
11826
+ };
11827
+ };
11828
+ /** @description Request body must be empty */
11829
+ 400: {
11830
+ headers: {
11831
+ [name: string]: unknown;
11832
+ };
11833
+ content?: never;
11834
+ };
11835
+ /** @description Missing or invalid session signature */
11836
+ 401: {
11837
+ headers: {
11838
+ [name: string]: unknown;
11839
+ };
11840
+ content?: never;
11841
+ };
11842
+ /** @description Session not found */
11843
+ 404: {
11844
+ headers: {
11845
+ [name: string]: unknown;
11846
+ };
11847
+ content?: never;
11848
+ };
11849
+ /** @description Internal server error */
11850
+ 500: {
11851
+ headers: {
11852
+ [name: string]: unknown;
11853
+ };
11854
+ content?: never;
11855
+ };
11856
+ };
11857
+ };
11858
+ verify_signature: {
11859
+ parameters: {
11860
+ query?: never;
11861
+ header?: never;
11862
+ path?: never;
11863
+ cookie?: never;
11864
+ };
11865
+ requestBody: {
11866
+ content: {
11867
+ "application/json": components["schemas"]["VerifyRequest"];
11868
+ };
11869
+ };
11870
+ responses: {
11871
+ /** @description OK */
11872
+ 200: {
11873
+ headers: {
11874
+ [name: string]: unknown;
11875
+ };
11876
+ content: {
11877
+ "application/json": components["schemas"]["VerifyResponse"];
11878
+ };
11879
+ };
11880
+ /** @description Invalid request parameters, nonce expired, or already used */
11881
+ 400: {
11882
+ headers: {
11883
+ [name: string]: unknown;
11884
+ };
11885
+ content?: never;
11886
+ };
11887
+ /** @description Invalid signature */
11888
+ 401: {
11889
+ headers: {
11890
+ [name: string]: unknown;
11891
+ };
11892
+ content?: never;
11893
+ };
11894
+ /** @description Origin not allowed for this application */
11895
+ 403: {
11896
+ headers: {
11897
+ [name: string]: unknown;
11898
+ };
11899
+ content?: never;
11900
+ };
11901
+ /** @description Invalid nonce or clientId */
11902
+ 404: {
11903
+ headers: {
11904
+ [name: string]: unknown;
11905
+ };
11906
+ content?: never;
11907
+ };
11908
+ /** @description Authentication rate limit exceeded — challenge and verify share one per-client-address budget (60 requests/min sustained, burst 120), checked before the signature; retry after the interval in details.retryAfter */
11909
+ 429: {
11910
+ headers: {
11911
+ [name: string]: unknown;
11912
+ };
11913
+ content?: never;
11914
+ };
11915
+ /** @description Internal server error */
11916
+ 500: {
11917
+ headers: {
11918
+ [name: string]: unknown;
11919
+ };
11920
+ content?: never;
11921
+ };
11922
+ /** @description Contract-wallet (EIP-1271) verification could not be completed for an eligible address: the chain did not answer, did not answer within the deadline, or the server was at its concurrent-verification capacity and declined to ask. Retryable, and not a verdict on the signature. */
11923
+ 503: {
11924
+ headers: {
11925
+ [name: string]: unknown;
11926
+ };
11927
+ content?: never;
11928
+ };
11929
+ };
11930
+ };
11931
+ get_buildercodes_config: {
11932
+ parameters: {
11933
+ query?: never;
11934
+ header?: never;
11935
+ path?: never;
11936
+ cookie?: never;
11937
+ };
11938
+ requestBody?: never;
11939
+ responses: {
11940
+ /** @description OK */
11941
+ 200: {
11942
+ headers: {
11943
+ [name: string]: unknown;
11944
+ };
11945
+ content: {
11946
+ "application/json": components["schemas"]["GetBuildercodesConfigResponse"];
11947
+ };
11948
+ };
11949
+ /** @description Authentication required */
11950
+ 401: {
11951
+ headers: {
11952
+ [name: string]: unknown;
11953
+ };
11954
+ content?: never;
11955
+ };
11956
+ /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
11957
+ 403: {
11958
+ headers: {
11959
+ [name: string]: unknown;
11960
+ };
11961
+ content?: never;
11962
+ };
11963
+ /** @description Authenticated application not found (gRPC: NOT_FOUND) */
11964
+ 404: {
11965
+ headers: {
11966
+ [name: string]: unknown;
11967
+ };
11968
+ content?: never;
11969
+ };
11970
+ /** @description Internal server error */
11971
+ 500: {
11972
+ headers: {
11973
+ [name: string]: unknown;
11974
+ };
11975
+ content?: never;
11976
+ };
11977
+ };
11978
+ };
11979
+ list_buildercode_payouts: {
11980
+ parameters: {
11981
+ query?: {
11982
+ /** @description Page number (1-indexed) */
11983
+ page?: number;
11984
+ /** @description Items per page (max 100) */
11985
+ pageSize?: number;
11986
+ /** @description Only return BuilderCodes payouts of this payout kind: REVENUE_SHARE (the frontend's share of Monaco's fee) or BUILDER_FEE (the frontend's own builder fee). Omit for every kind. */
11987
+ kind?: "REVENUE_SHARE" | "BUILDER_FEE";
11988
+ };
11989
+ header?: never;
11990
+ path?: never;
11991
+ cookie?: never;
11992
+ };
11993
+ requestBody?: never;
11994
+ responses: {
11995
+ /** @description OK */
11996
+ 200: {
11997
+ headers: {
11998
+ [name: string]: unknown;
11999
+ };
12000
+ content: {
12001
+ "application/json": components["schemas"]["ListBuildercodePayoutsResponse"];
12002
+ };
12003
+ };
12004
+ /** @description Invalid pagination */
12005
+ 400: {
12006
+ headers: {
12007
+ [name: string]: unknown;
12008
+ };
12009
+ content?: never;
12010
+ };
12011
+ /** @description Authentication required */
12012
+ 401: {
12013
+ headers: {
12014
+ [name: string]: unknown;
12015
+ };
12016
+ content?: never;
12017
+ };
12018
+ /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
12019
+ 403: {
12020
+ headers: {
12021
+ [name: string]: unknown;
12022
+ };
12023
+ content?: never;
12024
+ };
12025
+ /** @description Authenticated application not found (gRPC: NOT_FOUND) */
12026
+ 404: {
12027
+ headers: {
12028
+ [name: string]: unknown;
12029
+ };
12030
+ content?: never;
12031
+ };
12032
+ /** @description Internal server error */
12033
+ 500: {
12034
+ headers: {
12035
+ [name: string]: unknown;
12036
+ };
12037
+ content?: never;
12038
+ };
12039
+ };
12040
+ };
12041
+ get_buildercode_payout_summary: {
12042
+ parameters: {
12043
+ query?: never;
12044
+ header?: never;
12045
+ path?: never;
12046
+ cookie?: never;
12047
+ };
12048
+ requestBody?: never;
12049
+ responses: {
12050
+ /** @description OK */
12051
+ 200: {
12052
+ headers: {
12053
+ [name: string]: unknown;
12054
+ };
12055
+ content: {
12056
+ "application/json": components["schemas"]["GetBuildercodePayoutSummaryResponse"];
12057
+ };
12058
+ };
12059
+ /** @description Authentication required */
12060
+ 401: {
12061
+ headers: {
12062
+ [name: string]: unknown;
12063
+ };
12064
+ content?: never;
12065
+ };
12066
+ /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
12067
+ 403: {
12068
+ headers: {
12069
+ [name: string]: unknown;
12070
+ };
12071
+ content?: never;
12072
+ };
12073
+ /** @description Authenticated application not found (gRPC: NOT_FOUND) */
12074
+ 404: {
12075
+ headers: {
12076
+ [name: string]: unknown;
12077
+ };
12078
+ content?: never;
12079
+ };
12080
+ /** @description Internal server error */
12081
+ 500: {
12082
+ headers: {
12083
+ [name: string]: unknown;
12084
+ };
12085
+ content?: never;
12086
+ };
12087
+ };
12088
+ };
12089
+ get_buildercode_rewards_balance: {
12090
+ parameters: {
12091
+ query?: never;
12092
+ header?: never;
12093
+ path?: never;
12094
+ cookie?: never;
12095
+ };
12096
+ requestBody?: never;
12097
+ responses: {
12098
+ /** @description OK */
12099
+ 200: {
12100
+ headers: {
12101
+ [name: string]: unknown;
12102
+ };
12103
+ content: {
12104
+ "application/json": components["schemas"]["GetBuildercodeRewardsBalanceResponse"];
12105
+ };
12106
+ };
12107
+ /** @description Authentication required */
12108
+ 401: {
12109
+ headers: {
12110
+ [name: string]: unknown;
12111
+ };
12112
+ content?: never;
12113
+ };
12114
+ /** @description Refused: BuilderCodes is disabled or the caller is delegated (gRPC: PERMISSION_DENIED) */
12115
+ 403: {
12116
+ headers: {
12117
+ [name: string]: unknown;
12118
+ };
12119
+ content?: never;
12120
+ };
12121
+ /** @description Internal server error */
12122
+ 500: {
12123
+ headers: {
12124
+ [name: string]: unknown;
12125
+ };
12126
+ content?: never;
12127
+ };
12128
+ };
12129
+ };
12130
+ claim_buildercode_rewards: {
12131
+ parameters: {
12132
+ query?: never;
12133
+ header?: never;
12134
+ path?: never;
12135
+ cookie?: never;
12136
+ };
12137
+ requestBody: {
12138
+ content: {
12139
+ "application/json": components["schemas"]["ClaimBuildercodeRewardsRequest"];
12140
+ };
12141
+ };
12142
+ responses: {
12143
+ /** @description OK */
12144
+ 200: {
12145
+ headers: {
12146
+ [name: string]: unknown;
12147
+ };
12148
+ content: {
12149
+ "application/json": components["schemas"]["ClaimBuildercodeRewardsResponse"];
12150
+ };
12151
+ };
12152
+ /** @description Invalid token or amount */
12153
+ 400: {
12154
+ headers: {
12155
+ [name: string]: unknown;
12156
+ };
12157
+ content?: never;
12158
+ };
12159
+ /** @description Authentication required */
12160
+ 401: {
12161
+ headers: {
12162
+ [name: string]: unknown;
12163
+ };
12164
+ content?: never;
12165
+ };
12166
+ /** @description Refused: BuilderCodes is not enabled, or the caller is a delegated-agent session (gRPC: PERMISSION_DENIED) */
12167
+ 403: {
12168
+ headers: {
12169
+ [name: string]: unknown;
12170
+ };
12171
+ content?: never;
12172
+ };
12173
+ /** @description Insufficient BuilderCodes payout balance, including a wallet that never accrued one (gRPC: FAILED_PRECONDITION) */
12174
+ 409: {
12175
+ headers: {
12176
+ [name: string]: unknown;
12177
+ };
12178
+ content?: never;
12179
+ };
12180
+ /** @description Internal server error */
12181
+ 500: {
12182
+ headers: {
12183
+ [name: string]: unknown;
12184
+ };
12185
+ content?: never;
12186
+ };
12187
+ /** @description Matching engine unavailable or slow to answer. Outcome UNKNOWN, not a rejection — the claim may still commit and there is no idempotency key, so treat it as pending and do not retry automatically; a balance read does not settle it, because an admitted claim may still be queued. Two tagged cases are the exception, both refused before the claim can be admitted and so provably non-committing, and both safe to retry: a maintenance block (`error: OPERATIONS_BLOCKED`; gRPC metadata `x-maintenance-blocked: true`) and a sequencer overload (`code: OVERLOADED`) (gRPC: UNAVAILABLE) */
12188
+ 503: {
12189
+ headers: {
12190
+ [name: string]: unknown;
12191
+ };
12192
+ content?: never;
12193
+ };
12194
+ };
12195
+ };
12196
+ list_my_follows: {
12197
+ parameters: {
12198
+ query?: {
12199
+ /** @description Items per page (max 1000) */
12200
+ pageSize?: number;
12201
+ /**
12202
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
12203
+ * first page.
12204
+ */
12205
+ pageToken?: string;
12206
+ };
12207
+ header?: never;
12208
+ path?: never;
12209
+ cookie?: never;
12210
+ };
12211
+ requestBody?: never;
12212
+ responses: {
12213
+ /** @description OK */
12214
+ 200: {
12215
+ headers: {
12216
+ [name: string]: unknown;
12217
+ };
12218
+ content: {
12219
+ "application/json": components["schemas"]["ListMyFollowsResponse"];
12220
+ };
12221
+ };
12222
+ /** @description Invalid query parameters or page token */
12223
+ 400: {
12224
+ headers: {
12225
+ [name: string]: unknown;
12226
+ };
12227
+ content?: never;
12228
+ };
12229
+ /** @description Authentication required */
12230
+ 401: {
12231
+ headers: {
12232
+ [name: string]: unknown;
12233
+ };
12234
+ content?: never;
12235
+ };
12236
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12237
+ 429: {
12238
+ headers: {
12239
+ [name: string]: unknown;
12240
+ };
12241
+ content?: never;
12242
+ };
12243
+ /** @description Internal server error */
12244
+ 500: {
12245
+ headers: {
12246
+ [name: string]: unknown;
12247
+ };
12248
+ content?: never;
12249
+ };
12250
+ };
12251
+ };
12252
+ upsert_follow: {
12253
+ parameters: {
12254
+ query?: never;
12255
+ header?: never;
12256
+ path?: never;
12257
+ cookie?: never;
12258
+ };
12259
+ requestBody: {
12260
+ content: {
12261
+ "application/json": components["schemas"]["UpsertFollowRequest"];
12262
+ };
12263
+ };
12264
+ responses: {
12265
+ /** @description OK */
12266
+ 200: {
12267
+ headers: {
12268
+ [name: string]: unknown;
12269
+ };
12270
+ content: {
12271
+ "application/json": components["schemas"]["UpsertFollowResponse"];
12272
+ };
12273
+ };
12274
+ /** @description Invalid request, or refused by a follow rule (the message names the rule) */
12275
+ 400: {
12276
+ headers: {
12277
+ [name: string]: unknown;
12278
+ };
12279
+ content?: never;
12280
+ };
12281
+ /** @description Authentication required */
12282
+ 401: {
12283
+ headers: {
12284
+ [name: string]: unknown;
12285
+ };
12286
+ content?: never;
12287
+ };
12288
+ /** @description Delegated agent or sub-account sessions cannot follow */
12289
+ 403: {
12290
+ headers: {
12291
+ [name: string]: unknown;
12292
+ };
12293
+ content?: never;
12294
+ };
12295
+ /** @description Lead trader or follow not found */
12296
+ 404: {
12297
+ headers: {
12298
+ [name: string]: unknown;
12299
+ };
12300
+ content?: never;
12301
+ };
12302
+ /** @description Copy trading is not available */
12303
+ 409: {
12304
+ headers: {
12305
+ [name: string]: unknown;
12306
+ };
12307
+ content?: never;
12308
+ };
12309
+ /** @description Internal server error */
12310
+ 500: {
12311
+ headers: {
12312
+ [name: string]: unknown;
12313
+ };
12314
+ content?: never;
12315
+ };
12316
+ /** @description Matching engine unavailable; retry */
12317
+ 503: {
12318
+ headers: {
12319
+ [name: string]: unknown;
12320
+ };
12321
+ content?: never;
12322
+ };
12323
+ };
12324
+ };
12325
+ close_all_copy_positions: {
12326
+ parameters: {
12327
+ query?: never;
12328
+ header?: never;
12329
+ path?: never;
12330
+ cookie?: never;
12331
+ };
12332
+ requestBody?: never;
12333
+ responses: {
12334
+ /** @description OK */
12335
+ 200: {
12336
+ headers: {
12337
+ [name: string]: unknown;
12338
+ };
12339
+ content: {
12340
+ "application/json": components["schemas"]["CloseAllCopyPositionsResponse"];
12341
+ };
12342
+ };
12343
+ /** @description The close was refused */
12344
+ 400: {
12345
+ headers: {
12346
+ [name: string]: unknown;
12347
+ };
12348
+ content?: never;
12349
+ };
12350
+ /** @description Authentication required */
12351
+ 401: {
12352
+ headers: {
12353
+ [name: string]: unknown;
12354
+ };
12355
+ content?: never;
12356
+ };
12357
+ /** @description Delegated agent sessions cannot close copy positions */
12358
+ 403: {
12359
+ headers: {
12360
+ [name: string]: unknown;
12361
+ };
12362
+ content?: never;
12363
+ };
12364
+ /** @description Copy trading is not available */
12365
+ 409: {
12366
+ headers: {
12367
+ [name: string]: unknown;
12368
+ };
12369
+ content?: never;
12370
+ };
12371
+ /** @description Copy position close rate limit exceeded; retry after the interval in details.retryAfter */
12372
+ 429: {
12373
+ headers: {
12374
+ [name: string]: unknown;
12375
+ };
12376
+ content?: never;
12377
+ };
12378
+ /** @description Internal server error */
12379
+ 500: {
12380
+ headers: {
12381
+ [name: string]: unknown;
12382
+ };
12383
+ content?: never;
12384
+ };
12385
+ /** @description The matching engine is unavailable; retry */
12386
+ 503: {
12387
+ headers: {
12388
+ [name: string]: unknown;
12389
+ };
12390
+ content?: never;
12391
+ };
12392
+ };
12393
+ };
12394
+ preview_follow: {
12395
+ parameters: {
12396
+ query?: never;
12397
+ header?: never;
12398
+ path?: never;
12399
+ cookie?: never;
12400
+ };
12401
+ requestBody: {
12402
+ content: {
12403
+ "application/json": components["schemas"]["PreviewFollowRequest"];
12404
+ };
12405
+ };
12406
+ responses: {
12407
+ /** @description OK */
12408
+ 200: {
12409
+ headers: {
12410
+ [name: string]: unknown;
12411
+ };
12412
+ content: {
12413
+ "application/json": components["schemas"]["PreviewFollowResponse"];
12414
+ };
12415
+ };
12416
+ /** @description Invalid request, or terms a follow would refuse (the message names the rule) */
12417
+ 400: {
12418
+ headers: {
12419
+ [name: string]: unknown;
12420
+ };
12421
+ content?: never;
12422
+ };
12423
+ /** @description Authentication required */
12424
+ 401: {
12425
+ headers: {
12426
+ [name: string]: unknown;
12427
+ };
12428
+ content?: never;
12429
+ };
12430
+ /** @description Delegated agent or sub-account sessions cannot follow */
12431
+ 403: {
12432
+ headers: {
12433
+ [name: string]: unknown;
12434
+ };
12435
+ content?: never;
12436
+ };
12437
+ /** @description Lead trader not found */
12438
+ 404: {
12439
+ headers: {
12440
+ [name: string]: unknown;
12441
+ };
12442
+ content?: never;
12443
+ };
12444
+ /** @description Copy trading is not available */
12445
+ 409: {
12446
+ headers: {
12447
+ [name: string]: unknown;
12448
+ };
12449
+ content?: never;
12450
+ };
12451
+ /** @description Read or order-risk preview rate limit exceeded; retry after the interval in details.retryAfter */
12452
+ 429: {
12453
+ headers: {
12454
+ [name: string]: unknown;
12455
+ };
12456
+ content?: never;
12457
+ };
12458
+ /** @description Internal server error */
12459
+ 500: {
12460
+ headers: {
12461
+ [name: string]: unknown;
12462
+ };
12463
+ content?: never;
12464
+ };
12465
+ /** @description Matching engine unavailable or its preview capacity is busy; retry */
12466
+ 503: {
12467
+ headers: {
12468
+ [name: string]: unknown;
12469
+ };
12470
+ content?: never;
12471
+ };
12472
+ };
12473
+ };
12474
+ get_follow: {
12475
+ parameters: {
12476
+ query?: never;
12477
+ header?: never;
12478
+ path: {
12479
+ followId: string;
12480
+ };
12481
+ cookie?: never;
12482
+ };
12483
+ requestBody?: never;
12484
+ responses: {
12485
+ /** @description OK */
12486
+ 200: {
12487
+ headers: {
12488
+ [name: string]: unknown;
12489
+ };
12490
+ content: {
12491
+ "application/json": components["schemas"]["GetFollowResponse"];
12492
+ };
12493
+ };
12494
+ /** @description Invalid follow id */
12495
+ 400: {
12496
+ headers: {
12497
+ [name: string]: unknown;
12498
+ };
12499
+ content?: never;
12500
+ };
12501
+ /** @description Authentication required */
12502
+ 401: {
12503
+ headers: {
12504
+ [name: string]: unknown;
12505
+ };
12506
+ content?: never;
12507
+ };
12508
+ /** @description Follow not found */
12509
+ 404: {
12510
+ headers: {
12511
+ [name: string]: unknown;
12512
+ };
12513
+ content?: never;
12514
+ };
12515
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12516
+ 429: {
12517
+ headers: {
12518
+ [name: string]: unknown;
12519
+ };
12520
+ content?: never;
12521
+ };
12522
+ /** @description Internal server error */
12523
+ 500: {
12524
+ headers: {
12525
+ [name: string]: unknown;
12526
+ };
12527
+ content?: never;
12528
+ };
12529
+ };
12530
+ };
12531
+ close_follow_positions: {
12532
+ parameters: {
12533
+ query?: never;
12534
+ header?: never;
12535
+ path: {
12536
+ followId: string;
12537
+ };
12538
+ cookie?: never;
12539
+ };
12540
+ requestBody?: never;
12541
+ responses: {
12542
+ /** @description OK */
12543
+ 200: {
12544
+ headers: {
12545
+ [name: string]: unknown;
12546
+ };
12547
+ content: {
12548
+ "application/json": components["schemas"]["CloseFollowPositionsResponse"];
12549
+ };
12550
+ };
12551
+ /** @description Invalid follow id, or the close was refused */
12552
+ 400: {
12553
+ headers: {
12554
+ [name: string]: unknown;
12555
+ };
12556
+ content?: never;
12557
+ };
12558
+ /** @description Authentication required */
12559
+ 401: {
12560
+ headers: {
12561
+ [name: string]: unknown;
12562
+ };
12563
+ content?: never;
12564
+ };
12565
+ /** @description Delegated agent sessions cannot close copy positions */
12566
+ 403: {
12567
+ headers: {
12568
+ [name: string]: unknown;
12569
+ };
12570
+ content?: never;
12571
+ };
12572
+ /** @description Follow not found */
12573
+ 404: {
12574
+ headers: {
12575
+ [name: string]: unknown;
12576
+ };
12577
+ content?: never;
12578
+ };
12579
+ /** @description The follow is stopped, or its stop is in progress (which closes its positions itself), or copy trading is not available */
12580
+ 409: {
12581
+ headers: {
12582
+ [name: string]: unknown;
12583
+ };
12584
+ content?: never;
12585
+ };
12586
+ /** @description Copy position close rate limit exceeded; retry after the interval in details.retryAfter */
12587
+ 429: {
12588
+ headers: {
12589
+ [name: string]: unknown;
12590
+ };
12591
+ content?: never;
12592
+ };
12593
+ /** @description Internal server error */
12594
+ 500: {
12595
+ headers: {
12596
+ [name: string]: unknown;
12597
+ };
12598
+ content?: never;
12599
+ };
12600
+ /** @description The close cannot run right now, or the matching engine is unavailable; retry */
12601
+ 503: {
12602
+ headers: {
12603
+ [name: string]: unknown;
12604
+ };
12605
+ content?: never;
12606
+ };
12607
+ };
12608
+ };
12609
+ list_follow_leader_positions: {
12610
+ parameters: {
12611
+ query?: never;
12612
+ header?: never;
12613
+ path: {
12614
+ followId: string;
12615
+ };
12616
+ cookie?: never;
12617
+ };
12618
+ requestBody?: never;
12619
+ responses: {
12620
+ /** @description OK */
12621
+ 200: {
12622
+ headers: {
12623
+ [name: string]: unknown;
12624
+ };
12625
+ content: {
12626
+ "application/json": components["schemas"]["ListFollowLeaderPositionsResponse"];
12627
+ };
12628
+ };
12629
+ /** @description Invalid follow id */
12630
+ 400: {
12631
+ headers: {
12632
+ [name: string]: unknown;
12633
+ };
12634
+ content?: never;
12635
+ };
12636
+ /** @description Authentication required */
12637
+ 401: {
12638
+ headers: {
12639
+ [name: string]: unknown;
12640
+ };
12641
+ content?: never;
12642
+ };
12643
+ /** @description The follow is stopped */
12644
+ 403: {
12645
+ headers: {
12646
+ [name: string]: unknown;
12647
+ };
12648
+ content?: never;
12649
+ };
12650
+ /** @description Follow not found */
12651
+ 404: {
12652
+ headers: {
12653
+ [name: string]: unknown;
12654
+ };
12655
+ content?: never;
12656
+ };
12657
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
12658
+ 429: {
10767
12659
  headers: {
10768
12660
  [name: string]: unknown;
10769
12661
  };
@@ -10776,18 +12668,27 @@ export interface operations {
10776
12668
  };
10777
12669
  content?: never;
10778
12670
  };
12671
+ /** @description Matching engine unavailable; retry */
12672
+ 503: {
12673
+ headers: {
12674
+ [name: string]: unknown;
12675
+ };
12676
+ content?: never;
12677
+ };
10779
12678
  };
10780
12679
  };
10781
- create_challenge: {
12680
+ add_follow_position_margin: {
10782
12681
  parameters: {
10783
12682
  query?: never;
10784
12683
  header?: never;
10785
- path?: never;
12684
+ path: {
12685
+ followId: string;
12686
+ };
10786
12687
  cookie?: never;
10787
12688
  };
10788
12689
  requestBody: {
10789
12690
  content: {
10790
- "application/json": components["schemas"]["ChallengeRequest"];
12691
+ "application/json": components["schemas"]["AddFollowPositionMarginRequest"];
10791
12692
  };
10792
12693
  };
10793
12694
  responses: {
@@ -10797,31 +12698,45 @@ export interface operations {
10797
12698
  [name: string]: unknown;
10798
12699
  };
10799
12700
  content: {
10800
- "application/json": components["schemas"]["ChallengeResponse"];
12701
+ "application/json": components["schemas"]["AddFollowPositionMarginResponse"];
10801
12702
  };
10802
12703
  };
10803
- /** @description Invalid request parameters */
12704
+ /** @description Invalid follow id, trading pair or amount, or refused by the engine with code COPY_TRADING_REJECTED (no copy position on the pair, the position or the margin account is being liquidated, the position has lost more than its margin, more than the copy account holds; the message names the rule) */
10804
12705
  400: {
10805
12706
  headers: {
10806
12707
  [name: string]: unknown;
10807
12708
  };
10808
12709
  content?: never;
10809
12710
  };
10810
- /** @description Origin not allowed for this application */
12711
+ /** @description Authentication required */
12712
+ 401: {
12713
+ headers: {
12714
+ [name: string]: unknown;
12715
+ };
12716
+ content?: never;
12717
+ };
12718
+ /** @description Only a master account session can add margin (not a delegated agent or a sub-account) */
10811
12719
  403: {
10812
12720
  headers: {
10813
12721
  [name: string]: unknown;
10814
12722
  };
10815
12723
  content?: never;
10816
12724
  };
10817
- /** @description Invalid clientId */
12725
+ /** @description Follow not found */
10818
12726
  404: {
10819
12727
  headers: {
10820
12728
  [name: string]: unknown;
10821
12729
  };
10822
12730
  content?: never;
10823
12731
  };
10824
- /** @description Authentication rate limit exceeded — challenge and verify share one per-client-address budget (60 requests/min sustained, burst 120); retry after the interval in details.retryAfter */
12732
+ /** @description The follow is stopping or stopped, or code COPY_TRADING_UNAVAILABLE: copy trading is not available on the platform */
12733
+ 409: {
12734
+ headers: {
12735
+ [name: string]: unknown;
12736
+ };
12737
+ content?: never;
12738
+ };
12739
+ /** @description Movement rate limit exceeded — withdrawals and collateral transfers share a per-user budget; retry after the interval in details.retryAfter */
10825
12740
  429: {
10826
12741
  headers: {
10827
12742
  [name: string]: unknown;
@@ -10835,20 +12750,25 @@ export interface operations {
10835
12750
  };
10836
12751
  content?: never;
10837
12752
  };
12753
+ /** @description Matching engine unavailable; retry */
12754
+ 503: {
12755
+ headers: {
12756
+ [name: string]: unknown;
12757
+ };
12758
+ content?: never;
12759
+ };
10838
12760
  };
10839
12761
  };
10840
- refresh_session: {
12762
+ stop_follow: {
10841
12763
  parameters: {
10842
12764
  query?: never;
10843
12765
  header?: never;
10844
- path?: never;
10845
- cookie?: never;
10846
- };
10847
- requestBody: {
10848
- content: {
10849
- "application/json": components["schemas"]["RefreshRequest"];
12766
+ path: {
12767
+ followId: string;
10850
12768
  };
12769
+ cookie?: never;
10851
12770
  };
12771
+ requestBody?: never;
10852
12772
  responses: {
10853
12773
  /** @description OK */
10854
12774
  200: {
@@ -10856,17 +12776,31 @@ export interface operations {
10856
12776
  [name: string]: unknown;
10857
12777
  };
10858
12778
  content: {
10859
- "application/json": components["schemas"]["RefreshResponse"];
12779
+ "application/json": components["schemas"]["StopFollowResponse"];
10860
12780
  };
10861
12781
  };
10862
- /** @description Missing, invalid, or expired session signature */
12782
+ /** @description Invalid follow id, or refused by the engine (the message names the rule) */
12783
+ 400: {
12784
+ headers: {
12785
+ [name: string]: unknown;
12786
+ };
12787
+ content?: never;
12788
+ };
12789
+ /** @description Authentication required */
10863
12790
  401: {
10864
12791
  headers: {
10865
12792
  [name: string]: unknown;
10866
12793
  };
10867
12794
  content?: never;
10868
12795
  };
10869
- /** @description Session not found */
12796
+ /** @description Delegated agent sessions cannot stop a follow */
12797
+ 403: {
12798
+ headers: {
12799
+ [name: string]: unknown;
12800
+ };
12801
+ content?: never;
12802
+ };
12803
+ /** @description Follow not found */
10870
12804
  404: {
10871
12805
  headers: {
10872
12806
  [name: string]: unknown;
@@ -10880,20 +12814,35 @@ export interface operations {
10880
12814
  };
10881
12815
  content?: never;
10882
12816
  };
12817
+ /** @description Matching engine unavailable; retry */
12818
+ 503: {
12819
+ headers: {
12820
+ [name: string]: unknown;
12821
+ };
12822
+ content?: never;
12823
+ };
10883
12824
  };
10884
12825
  };
10885
- revoke_session: {
12826
+ list_lead_traders: {
10886
12827
  parameters: {
10887
- query?: never;
12828
+ query?: {
12829
+ /** @description Metric to rank by, highest first */
12830
+ sort?: "roi" | "pnl" | "followers" | "allocated" | "win_rate";
12831
+ /** @description Stats window */
12832
+ window?: "7d" | "30d" | "90d" | "all";
12833
+ /** @description Items per page (max 100) */
12834
+ pageSize?: number;
12835
+ /**
12836
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
12837
+ * first page. Sort and window must match the request that produced it.
12838
+ */
12839
+ pageToken?: string;
12840
+ };
10888
12841
  header?: never;
10889
12842
  path?: never;
10890
12843
  cookie?: never;
10891
12844
  };
10892
- requestBody: {
10893
- content: {
10894
- "application/json": components["schemas"]["RevokeRequest"];
10895
- };
10896
- };
12845
+ requestBody?: never;
10897
12846
  responses: {
10898
12847
  /** @description OK */
10899
12848
  200: {
@@ -10901,30 +12850,16 @@ export interface operations {
10901
12850
  [name: string]: unknown;
10902
12851
  };
10903
12852
  content: {
10904
- "application/json": components["schemas"]["RevokeResponse"];
12853
+ "application/json": components["schemas"]["ListLeadTradersResponse"];
10905
12854
  };
10906
12855
  };
10907
- /** @description Request body must be empty */
12856
+ /** @description Invalid query parameters or page token */
10908
12857
  400: {
10909
12858
  headers: {
10910
12859
  [name: string]: unknown;
10911
12860
  };
10912
12861
  content?: never;
10913
12862
  };
10914
- /** @description Missing or invalid session signature */
10915
- 401: {
10916
- headers: {
10917
- [name: string]: unknown;
10918
- };
10919
- content?: never;
10920
- };
10921
- /** @description Session not found */
10922
- 404: {
10923
- headers: {
10924
- [name: string]: unknown;
10925
- };
10926
- content?: never;
10927
- };
10928
12863
  /** @description Internal server error */
10929
12864
  500: {
10930
12865
  headers: {
@@ -10934,18 +12869,14 @@ export interface operations {
10934
12869
  };
10935
12870
  };
10936
12871
  };
10937
- verify_signature: {
12872
+ get_my_lead_trader: {
10938
12873
  parameters: {
10939
12874
  query?: never;
10940
12875
  header?: never;
10941
12876
  path?: never;
10942
12877
  cookie?: never;
10943
12878
  };
10944
- requestBody: {
10945
- content: {
10946
- "application/json": components["schemas"]["VerifyRequest"];
10947
- };
10948
- };
12879
+ requestBody?: never;
10949
12880
  responses: {
10950
12881
  /** @description OK */
10951
12882
  200: {
@@ -10953,38 +12884,24 @@ export interface operations {
10953
12884
  [name: string]: unknown;
10954
12885
  };
10955
12886
  content: {
10956
- "application/json": components["schemas"]["VerifyResponse"];
10957
- };
10958
- };
10959
- /** @description Invalid request parameters, nonce expired, or already used */
10960
- 400: {
10961
- headers: {
10962
- [name: string]: unknown;
12887
+ "application/json": components["schemas"]["GetLeadTraderResponse"];
10963
12888
  };
10964
- content?: never;
10965
12889
  };
10966
- /** @description Invalid signature */
12890
+ /** @description Authentication required */
10967
12891
  401: {
10968
12892
  headers: {
10969
12893
  [name: string]: unknown;
10970
12894
  };
10971
12895
  content?: never;
10972
12896
  };
10973
- /** @description Origin not allowed for this application */
10974
- 403: {
10975
- headers: {
10976
- [name: string]: unknown;
10977
- };
10978
- content?: never;
10979
- };
10980
- /** @description Invalid nonce or clientId */
12897
+ /** @description You are not a lead trader */
10981
12898
  404: {
10982
12899
  headers: {
10983
12900
  [name: string]: unknown;
10984
12901
  };
10985
12902
  content?: never;
10986
12903
  };
10987
- /** @description Authentication rate limit exceeded — challenge and verify share one per-client-address budget (60 requests/min sustained, burst 120), checked before the signature; retry after the interval in details.retryAfter */
12904
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
10988
12905
  429: {
10989
12906
  headers: {
10990
12907
  [name: string]: unknown;
@@ -10998,23 +12915,20 @@ export interface operations {
10998
12915
  };
10999
12916
  content?: never;
11000
12917
  };
11001
- /** @description Contract-wallet (EIP-1271) verification could not be completed for an eligible address: the chain did not answer, did not answer within the deadline, or the server was at its concurrent-verification capacity and declined to ask. Retryable, and not a verdict on the signature. */
11002
- 503: {
11003
- headers: {
11004
- [name: string]: unknown;
11005
- };
11006
- content?: never;
11007
- };
11008
12918
  };
11009
12919
  };
11010
- get_buildercodes_config: {
12920
+ upsert_lead_trader: {
11011
12921
  parameters: {
11012
12922
  query?: never;
11013
12923
  header?: never;
11014
12924
  path?: never;
11015
12925
  cookie?: never;
11016
12926
  };
11017
- requestBody?: never;
12927
+ requestBody: {
12928
+ content: {
12929
+ "application/json": components["schemas"]["UpsertLeadTraderRequest"];
12930
+ };
12931
+ };
11018
12932
  responses: {
11019
12933
  /** @description OK */
11020
12934
  200: {
@@ -11022,9 +12936,16 @@ export interface operations {
11022
12936
  [name: string]: unknown;
11023
12937
  };
11024
12938
  content: {
11025
- "application/json": components["schemas"]["GetBuildercodesConfigResponse"];
12939
+ "application/json": components["schemas"]["UpsertLeadTraderResponse"];
11026
12940
  };
11027
12941
  };
12942
+ /** @description Invalid request, or refused by an eligibility rule such as one lead profile per wallet (the message names the rule) */
12943
+ 400: {
12944
+ headers: {
12945
+ [name: string]: unknown;
12946
+ };
12947
+ content?: never;
12948
+ };
11028
12949
  /** @description Authentication required */
11029
12950
  401: {
11030
12951
  headers: {
@@ -11032,15 +12953,15 @@ export interface operations {
11032
12953
  };
11033
12954
  content?: never;
11034
12955
  };
11035
- /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
12956
+ /** @description Delegated agent or sub-account sessions cannot register */
11036
12957
  403: {
11037
12958
  headers: {
11038
12959
  [name: string]: unknown;
11039
12960
  };
11040
12961
  content?: never;
11041
12962
  };
11042
- /** @description Authenticated application not found (gRPC: NOT_FOUND) */
11043
- 404: {
12963
+ /** @description Copy trading is not available */
12964
+ 409: {
11044
12965
  headers: {
11045
12966
  [name: string]: unknown;
11046
12967
  };
@@ -11053,17 +12974,25 @@ export interface operations {
11053
12974
  };
11054
12975
  content?: never;
11055
12976
  };
12977
+ /** @description Matching engine unavailable; retry */
12978
+ 503: {
12979
+ headers: {
12980
+ [name: string]: unknown;
12981
+ };
12982
+ content?: never;
12983
+ };
11056
12984
  };
11057
12985
  };
11058
- list_buildercode_payouts: {
12986
+ list_my_followers: {
11059
12987
  parameters: {
11060
12988
  query?: {
11061
- /** @description Page number (1-indexed) */
11062
- page?: number;
11063
- /** @description Items per page (max 100) */
12989
+ /** @description Items per page (max 1000) */
11064
12990
  pageSize?: number;
11065
- /** @description Only return BuilderCodes payouts of this payout kind: REVENUE_SHARE (the frontend's share of Monaco's fee) or BUILDER_FEE (the frontend's own builder fee). Omit for every kind. */
11066
- kind?: "REVENUE_SHARE" | "BUILDER_FEE";
12991
+ /**
12992
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
12993
+ * first page.
12994
+ */
12995
+ pageToken?: string;
11067
12996
  };
11068
12997
  header?: never;
11069
12998
  path?: never;
@@ -11077,10 +13006,10 @@ export interface operations {
11077
13006
  [name: string]: unknown;
11078
13007
  };
11079
13008
  content: {
11080
- "application/json": components["schemas"]["ListBuildercodePayoutsResponse"];
13009
+ "application/json": components["schemas"]["ListMyFollowersResponse"];
11081
13010
  };
11082
13011
  };
11083
- /** @description Invalid pagination */
13012
+ /** @description Invalid query parameters or page token */
11084
13013
  400: {
11085
13014
  headers: {
11086
13015
  [name: string]: unknown;
@@ -11094,15 +13023,8 @@ export interface operations {
11094
13023
  };
11095
13024
  content?: never;
11096
13025
  };
11097
- /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
11098
- 403: {
11099
- headers: {
11100
- [name: string]: unknown;
11101
- };
11102
- content?: never;
11103
- };
11104
- /** @description Authenticated application not found (gRPC: NOT_FOUND) */
11105
- 404: {
13026
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
13027
+ 429: {
11106
13028
  headers: {
11107
13029
  [name: string]: unknown;
11108
13030
  };
@@ -11117,11 +13039,13 @@ export interface operations {
11117
13039
  };
11118
13040
  };
11119
13041
  };
11120
- get_buildercode_payout_summary: {
13042
+ get_lead_trader: {
11121
13043
  parameters: {
11122
13044
  query?: never;
11123
13045
  header?: never;
11124
- path?: never;
13046
+ path: {
13047
+ leader: string;
13048
+ };
11125
13049
  cookie?: never;
11126
13050
  };
11127
13051
  requestBody?: never;
@@ -11132,24 +13056,10 @@ export interface operations {
11132
13056
  [name: string]: unknown;
11133
13057
  };
11134
13058
  content: {
11135
- "application/json": components["schemas"]["GetBuildercodePayoutSummaryResponse"];
11136
- };
11137
- };
11138
- /** @description Authentication required */
11139
- 401: {
11140
- headers: {
11141
- [name: string]: unknown;
11142
- };
11143
- content?: never;
11144
- };
11145
- /** @description Refused: BuilderCodes is disabled, the caller is delegated, or the caller is not this application's payout wallet (gRPC: PERMISSION_DENIED) */
11146
- 403: {
11147
- headers: {
11148
- [name: string]: unknown;
13059
+ "application/json": components["schemas"]["GetLeadTraderResponse"];
11149
13060
  };
11150
- content?: never;
11151
13061
  };
11152
- /** @description Authenticated application not found (gRPC: NOT_FOUND) */
13062
+ /** @description Lead trader not found */
11153
13063
  404: {
11154
13064
  headers: {
11155
13065
  [name: string]: unknown;
@@ -11165,11 +13075,21 @@ export interface operations {
11165
13075
  };
11166
13076
  };
11167
13077
  };
11168
- get_buildercode_rewards_balance: {
13078
+ list_lead_trader_closed_trades: {
11169
13079
  parameters: {
11170
- query?: never;
13080
+ query?: {
13081
+ /** @description Items per page (max 100) */
13082
+ pageSize?: number;
13083
+ /**
13084
+ * @description Opaque cursor from a previous response's `nextPageToken`; omit for the
13085
+ * first page.
13086
+ */
13087
+ pageToken?: string;
13088
+ };
11171
13089
  header?: never;
11172
- path?: never;
13090
+ path: {
13091
+ leader: string;
13092
+ };
11173
13093
  cookie?: never;
11174
13094
  };
11175
13095
  requestBody?: never;
@@ -11180,18 +13100,18 @@ export interface operations {
11180
13100
  [name: string]: unknown;
11181
13101
  };
11182
13102
  content: {
11183
- "application/json": components["schemas"]["GetBuildercodeRewardsBalanceResponse"];
13103
+ "application/json": components["schemas"]["ListLeadTraderClosedTradesResponse"];
11184
13104
  };
11185
13105
  };
11186
- /** @description Authentication required */
11187
- 401: {
13106
+ /** @description Invalid query parameters or page token */
13107
+ 400: {
11188
13108
  headers: {
11189
13109
  [name: string]: unknown;
11190
13110
  };
11191
13111
  content?: never;
11192
13112
  };
11193
- /** @description Refused: BuilderCodes is disabled or the caller is delegated (gRPC: PERMISSION_DENIED) */
11194
- 403: {
13113
+ /** @description Lead trader not found */
13114
+ 404: {
11195
13115
  headers: {
11196
13116
  [name: string]: unknown;
11197
13117
  };
@@ -11206,18 +13126,16 @@ export interface operations {
11206
13126
  };
11207
13127
  };
11208
13128
  };
11209
- claim_buildercode_rewards: {
13129
+ list_lead_trader_open_positions: {
11210
13130
  parameters: {
11211
13131
  query?: never;
11212
13132
  header?: never;
11213
- path?: never;
11214
- cookie?: never;
11215
- };
11216
- requestBody: {
11217
- content: {
11218
- "application/json": components["schemas"]["ClaimBuildercodeRewardsRequest"];
13133
+ path: {
13134
+ leader: string;
11219
13135
  };
13136
+ cookie?: never;
11220
13137
  };
13138
+ requestBody?: never;
11221
13139
  responses: {
11222
13140
  /** @description OK */
11223
13141
  200: {
@@ -11225,32 +13143,32 @@ export interface operations {
11225
13143
  [name: string]: unknown;
11226
13144
  };
11227
13145
  content: {
11228
- "application/json": components["schemas"]["ClaimBuildercodeRewardsResponse"];
13146
+ "application/json": components["schemas"]["ListLeadTraderOpenPositionsResponse"];
11229
13147
  };
11230
13148
  };
11231
- /** @description Invalid token or amount */
11232
- 400: {
13149
+ /** @description Authentication required */
13150
+ 401: {
11233
13151
  headers: {
11234
13152
  [name: string]: unknown;
11235
13153
  };
11236
13154
  content?: never;
11237
13155
  };
11238
- /** @description Authentication required */
11239
- 401: {
13156
+ /** @description Only current followers of this leader can see open positions */
13157
+ 403: {
11240
13158
  headers: {
11241
13159
  [name: string]: unknown;
11242
13160
  };
11243
13161
  content?: never;
11244
13162
  };
11245
- /** @description Refused: BuilderCodes is not enabled, or the caller is a delegated-agent session (gRPC: PERMISSION_DENIED) */
11246
- 403: {
13163
+ /** @description Lead trader not found */
13164
+ 404: {
11247
13165
  headers: {
11248
13166
  [name: string]: unknown;
11249
13167
  };
11250
13168
  content?: never;
11251
13169
  };
11252
- /** @description Insufficient BuilderCodes payout balance, including a wallet that never accrued one (gRPC: FAILED_PRECONDITION) */
11253
- 409: {
13170
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
13171
+ 429: {
11254
13172
  headers: {
11255
13173
  [name: string]: unknown;
11256
13174
  };
@@ -11263,7 +13181,7 @@ export interface operations {
11263
13181
  };
11264
13182
  content?: never;
11265
13183
  };
11266
- /** @description Matching engine unavailable or slow to answer. Outcome UNKNOWN, not a rejection — the claim may still commit and there is no idempotency key, so treat it as pending and do not retry automatically; a balance read does not settle it, because an admitted claim may still be queued. Two tagged cases are the exception, both refused before the claim can be admitted and so provably non-committing, and both safe to retry: a maintenance block (`error: OPERATIONS_BLOCKED`; gRPC metadata `x-maintenance-blocked: true`) and a sequencer overload (`code: OVERLOADED`) (gRPC: UNAVAILABLE) */
13184
+ /** @description Matching engine unavailable; retry */
11267
13185
  503: {
11268
13186
  headers: {
11269
13187
  [name: string]: unknown;
@@ -12845,11 +14763,6 @@ export interface operations {
12845
14763
  get_orders: {
12846
14764
  parameters: {
12847
14765
  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
14766
  /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
12854
14767
  pageSize?: number;
12855
14768
  /** @description Order status (single value or comma-separated list) */
@@ -12862,21 +14775,15 @@ export interface operations {
12862
14775
  /** @description Sort direction for createdAt */
12863
14776
  orderBy?: "ASC" | "DESC";
12864
14777
  /**
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).
14778
+ * @description Pagination cursor with two states:
14779
+ * - Omitted or empty string (""): start a cursor walk with no prior
14780
+ * position, from the newest row (or the oldest, when `orderBy` is ASC).
12870
14781
  * - Non-empty: an opaque cursor from a previous response's
12871
14782
  * `next_page_token`; results resume immediately after that position.
12872
14783
  *
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
14784
+ * `total` and `total_pages` are populated — bounded by the server count
14785
+ * ceiling, see `total_capped`. Every walk covers full order history — hot
14786
+ * and archived rows merged. Filters and orderBy must match the
12880
14787
  * request that produced the token.
12881
14788
  */
12882
14789
  pageToken?: string;
@@ -13313,24 +15220,17 @@ export interface operations {
13313
15220
  /** @description Trading pair identifier (UUID) */
13314
15221
  tradingPairId?: string;
13315
15222
  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
15223
  /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
13322
15224
  pageSize?: number;
13323
15225
  /**
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.
15226
+ * @description Pagination cursor with two states:
15227
+ * - Omitted or empty string (""): start a cursor walk with no prior
15228
+ * position, from the newest conditional order.
13328
15229
  * - Non-empty: an opaque cursor from a previous response's
13329
15230
  * `next_page_token`; results resume immediately after that position.
13330
15231
  *
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
15232
+ * `total` is the matching row count, bounded at a server ceiling of 10,000
15233
+ * and saturating there. Pages are keyset seeks on `(createdAt, id)`, so a
13334
15234
  * page size up to 1000 is allowed. Filters must match the request that
13335
15235
  * produced the token; a token replayed against different filters is
13336
15236
  * rejected.
@@ -13424,27 +15324,20 @@ export interface operations {
13424
15324
  list_twap_orders: {
13425
15325
  parameters: {
13426
15326
  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
15327
  /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
13433
15328
  pageSize?: number;
13434
15329
  state?: string;
13435
15330
  /** @description Trading pair identifier (UUID) */
13436
15331
  tradingPairId?: string;
13437
15332
  /**
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.
15333
+ * @description Pagination cursor with two states:
15334
+ * - Omitted or empty string (""): start a cursor walk with no prior
15335
+ * position, from the newest TWAP parent.
13442
15336
  * - Non-empty: an opaque cursor from a previous response's
13443
15337
  * `next_page_token`; results resume immediately after that position.
13444
15338
  *
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
15339
+ * `total` is the matching row count, bounded at a server ceiling of 10,000
15340
+ * and saturating there. Pages are keyset seeks on `(createdAt, id)`, so a
13448
15341
  * page size up to 1000 is allowed. Filters must match the request that
13449
15342
  * produced the token; a token replayed against different filters is
13450
15343
  * rejected.