@0xmonaco/types 1.0.73 → 1.0.75
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.
- package/dist/api/index.d.ts +0 -7
- package/dist/applications/index.d.ts +14 -15
- package/dist/applications/index.js +2 -2
- package/dist/applications/requests.d.ts +70 -15
- package/dist/applications/requests.js +2 -3
- package/dist/applications/responses.d.ts +35 -39
- package/dist/applications/responses.js +1 -1
- package/dist/buildercodes/responses.d.ts +2 -3
- package/dist/buildercodes/responses.js +2 -3
- package/dist/copy-trading/index.d.ts +7 -7
- package/dist/delegated-agents/index.d.ts +15 -5
- package/dist/fees/responses.js +2 -2
- package/dist/margin-accounts/index.d.ts +185 -21
- package/dist/market/index.d.ts +76 -6
- package/dist/pitpass/index.d.ts +31 -11
- package/dist/pitpass/index.js +1 -1
- package/dist/pitpass/responses.d.ts +67 -0
- package/dist/pitpass/responses.js +92 -8
- package/dist/portfolio/index.d.ts +36 -14
- package/dist/positions/index.d.ts +81 -14
- package/dist/profile/index.d.ts +114 -44
- package/dist/trading/index.d.ts +1 -1
- package/dist/trading/orders.d.ts +6 -32
- package/dist/trading/responses.d.ts +9 -14
- package/dist/validation/applications.d.ts +51 -0
- package/dist/validation/applications.js +45 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/margin-accounts.d.ts +44 -3
- package/dist/validation/margin-accounts.js +57 -6
- package/dist/validation/market.d.ts +24 -0
- package/dist/validation/market.js +22 -0
- package/dist/validation/positions.d.ts +5 -3
- package/dist/validation/positions.js +12 -5
- package/dist/validation/profile.d.ts +19 -2
- package/dist/validation/profile.js +36 -4
- package/dist/validation/trading.d.ts +2 -2
- package/dist/websocket/base.d.ts +56 -6
- package/dist/websocket/client.d.ts +8 -3
- package/dist/websocket/events/index.d.ts +1 -0
- package/dist/websocket/events/index.js +1 -0
- package/dist/websocket/events/liquidation-events.d.ts +3 -3
- package/dist/websocket/events/orders-events.d.ts +6 -0
- package/dist/websocket/events/position-events.d.ts +33 -15
- package/dist/websocket/events/position-valuation-events.d.ts +60 -0
- package/dist/websocket/events/position-valuation-events.js +15 -0
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +7 -0
- package/dist/wire/schema.d.ts +1441 -307
- package/package.json +2 -2
package/dist/wire/schema.d.ts
CHANGED
|
@@ -297,7 +297,9 @@ export interface paths {
|
|
|
297
297
|
* address — and a per-order mode always overrides it. The write is sequenced
|
|
298
298
|
* through the matching engine; on success the next order from the wallet
|
|
299
299
|
* family already resolves the new mode. Delegated-agent sessions cannot
|
|
300
|
-
* change it.
|
|
300
|
+
* change it. It spends the per-account settings-write rate limit (about one
|
|
301
|
+
* write per second, burst 10) that the copy trading lead trader and follow
|
|
302
|
+
* writes share.
|
|
301
303
|
*/
|
|
302
304
|
put: operations["set_self_trade_prevention_default"];
|
|
303
305
|
post?: never;
|
|
@@ -442,8 +444,8 @@ export interface paths {
|
|
|
442
444
|
* List application balances
|
|
443
445
|
* @description List application balances.
|
|
444
446
|
*
|
|
445
|
-
* Returns a paginated list of
|
|
446
|
-
*
|
|
447
|
+
* Returns a paginated list of the balances of the application's users.
|
|
448
|
+
* Public: the application is selected by `client_id`.
|
|
447
449
|
*/
|
|
448
450
|
get: operations["list_application_balances"];
|
|
449
451
|
put?: never;
|
|
@@ -488,9 +490,9 @@ export interface paths {
|
|
|
488
490
|
* List application movements
|
|
489
491
|
* @description List application movements.
|
|
490
492
|
*
|
|
491
|
-
* Returns a paginated list of
|
|
492
|
-
* trades, etc.)
|
|
493
|
-
*
|
|
493
|
+
* Returns a paginated list of the ledger movements (deposits, withdrawals,
|
|
494
|
+
* trades, etc.) of the application's users. Public: the application is
|
|
495
|
+
* selected by `client_id`.
|
|
494
496
|
*/
|
|
495
497
|
get: operations["list_application_movements"];
|
|
496
498
|
put?: never;
|
|
@@ -512,8 +514,8 @@ export interface paths {
|
|
|
512
514
|
* List application orders
|
|
513
515
|
* @description List application orders.
|
|
514
516
|
*
|
|
515
|
-
* Returns a paginated list of all orders
|
|
516
|
-
*
|
|
517
|
+
* Returns a paginated list of all orders placed by the application's users.
|
|
518
|
+
* Public: the application is selected by `client_id`.
|
|
517
519
|
*/
|
|
518
520
|
get: operations["list_application_orders"];
|
|
519
521
|
put?: never;
|
|
@@ -536,8 +538,8 @@ export interface paths {
|
|
|
536
538
|
* @description Get application stats.
|
|
537
539
|
*
|
|
538
540
|
* Returns aggregate volume and fee stats for this application. Stats are
|
|
539
|
-
* scoped to trades where the application's users were the taker.
|
|
540
|
-
*
|
|
541
|
+
* scoped to trades where the application's users were the taker. Public:
|
|
542
|
+
* the application is selected by `client_id`.
|
|
541
543
|
*/
|
|
542
544
|
get: operations["get_application_stats"];
|
|
543
545
|
put?: never;
|
|
@@ -559,8 +561,8 @@ export interface paths {
|
|
|
559
561
|
* List application users
|
|
560
562
|
* @description List application users.
|
|
561
563
|
*
|
|
562
|
-
* Returns a paginated list of
|
|
563
|
-
*
|
|
564
|
+
* Returns a paginated list of the application's users. Public: the
|
|
565
|
+
* application is selected by `client_id`.
|
|
564
566
|
*/
|
|
565
567
|
get: operations["list_application_users"];
|
|
566
568
|
put?: never;
|
|
@@ -732,9 +734,10 @@ export interface paths {
|
|
|
732
734
|
*
|
|
733
735
|
* The fee can be set while builder fees are switched off
|
|
734
736
|
* (`builderFeeEnabled` false): it is stored and nothing is charged until they
|
|
735
|
-
* are switched on.
|
|
736
|
-
*
|
|
737
|
-
*
|
|
737
|
+
* are switched on. A newly stored fee reaches order requests within a few
|
|
738
|
+
* seconds. Sequencer ordering is authoritative for matching-engine policy and
|
|
739
|
+
* enrollment state: an order processed before one of those sequenced changes
|
|
740
|
+
* uses the earlier state, and a later order uses the new state.
|
|
738
741
|
*
|
|
739
742
|
* A refused change is **HTTP 409** / **FAILED_PRECONDITION** when the
|
|
740
743
|
* application is not enrolled with a payout address or has no changes left
|
|
@@ -940,6 +943,11 @@ export interface paths {
|
|
|
940
943
|
* retry with backoff, and an overload positively wants one. Only an UNTAGGED
|
|
941
944
|
* availability failure — matching-engine transport, timeout and fail-closed
|
|
942
945
|
* paths — carries the unknown outcome.
|
|
946
|
+
*
|
|
947
|
+
* A claim spends the per-user movement budget withdrawals and collateral
|
|
948
|
+
* transfers share. Over budget it is refused with **HTTP 429** /
|
|
949
|
+
* **RESOURCE_EXHAUSTED** before it reaches the sequencer, so it committed
|
|
950
|
+
* nothing and is safe to retry after the interval in `details.retryAfter`.
|
|
943
951
|
*/
|
|
944
952
|
post: operations["claim_buildercode_rewards"];
|
|
945
953
|
delete?: never;
|
|
@@ -975,7 +983,9 @@ export interface paths {
|
|
|
975
983
|
* `leader` handle that names a different leader is refused. `copyExisting`
|
|
976
984
|
* copies the leader's open positions into the new copy account at creation
|
|
977
985
|
* (see PreviewFollow for what that costs); it applies only to a create, and
|
|
978
|
-
* an edit that sets it is refused.
|
|
986
|
+
* an edit that sets it is refused. A create and an edit each spend the
|
|
987
|
+
* per-account settings-write rate limit (about one write per second, burst
|
|
988
|
+
* 10) that UpsertLeadTrader and the self-trade-prevention default share.
|
|
979
989
|
*/
|
|
980
990
|
post: operations["upsert_follow"];
|
|
981
991
|
delete?: never;
|
|
@@ -1146,9 +1156,7 @@ export interface paths {
|
|
|
1146
1156
|
* There is no margin reduction: a follow exits by being stopped. Follow
|
|
1147
1157
|
* writes need a master account session (not a delegated agent or a
|
|
1148
1158
|
* sub-account). 404 unless the follow is yours; 409 while it is stopping
|
|
1149
|
-
* or once it is stopped
|
|
1150
|
-
* platform at all (the platform then runs copy trading exits only). It
|
|
1151
|
-
* spends the per-user movement budget withdrawals and collateral transfers
|
|
1159
|
+
* or once it is stopped. It spends the per-user movement budget withdrawals and collateral transfers
|
|
1152
1160
|
* share. It is not idempotent: a retry after a timeout whose first attempt
|
|
1153
1161
|
* landed adds the amount twice, so read the follow before retrying.
|
|
1154
1162
|
*/
|
|
@@ -1173,8 +1181,11 @@ export interface paths {
|
|
|
1173
1181
|
* @description Stop a follow.
|
|
1174
1182
|
*
|
|
1175
1183
|
* Stops mirroring the leader. Stopping one of your own follows only; the
|
|
1176
|
-
* follow is identified by its id. An exit is never
|
|
1177
|
-
*
|
|
1184
|
+
* follow is identified by its id. An exit is never refused for the state
|
|
1185
|
+
* of the account or the platform. Only three things apply: ownership, the
|
|
1186
|
+
* refusal of a delegated agent session, and a per-account rate limit of
|
|
1187
|
+
* its own (about one stop per second, burst 20), which closes and follow
|
|
1188
|
+
* edits never spend.
|
|
1178
1189
|
*/
|
|
1179
1190
|
post: operations["stop_follow"];
|
|
1180
1191
|
delete?: never;
|
|
@@ -1232,7 +1243,9 @@ export interface paths {
|
|
|
1232
1243
|
* TraderCode handle. The profile is replaced as sent: an omitted `bio` or
|
|
1233
1244
|
* `minAllocation` clears it and an omitted `status` means ACTIVE; an
|
|
1234
1245
|
* omitted `shareBps` keeps the current share (the platform default on a
|
|
1235
|
-
* registration). A follower with a live follow cannot register.
|
|
1246
|
+
* registration). A follower with a live follow cannot register. It spends
|
|
1247
|
+
* the per-account settings-write rate limit (about one write per second,
|
|
1248
|
+
* burst 10) that UpsertFollow and the self-trade-prevention default share.
|
|
1236
1249
|
*/
|
|
1237
1250
|
put: operations["upsert_lead_trader"];
|
|
1238
1251
|
post?: never;
|
|
@@ -1360,7 +1373,10 @@ export interface paths {
|
|
|
1360
1373
|
*
|
|
1361
1374
|
* Master accounts only. Creates (or updates, keyed on `agent_address`) a
|
|
1362
1375
|
* delegation linking the calling owner to an agent wallet, together with the
|
|
1363
|
-
* policy that constrains what the agent may do on the owner's behalf.
|
|
1376
|
+
* policy that constrains what the agent may do on the owner's behalf. An
|
|
1377
|
+
* owner holds at most 10 active, unexpired agents; a new one past that is
|
|
1378
|
+
* rejected until one is revoked or expires. Binding an agent to one margin
|
|
1379
|
+
* account (`allowed_margin_account_ids`) makes it that sub-account's key.
|
|
1364
1380
|
*/
|
|
1365
1381
|
post: operations["upsert_delegated_agent"];
|
|
1366
1382
|
delete?: never;
|
|
@@ -1412,7 +1428,8 @@ export interface paths {
|
|
|
1412
1428
|
* `ListDelegatedAgentOwners`) and a freshly generated session public key.
|
|
1413
1429
|
* The new session acts as the owner but records the agent's address for
|
|
1414
1430
|
* policy enforcement. Requires an active delegation for the (owner, agent)
|
|
1415
|
-
* pair
|
|
1431
|
+
* pair, and, when the delegation has an IP allowlist, a caller address
|
|
1432
|
+
* inside it. Session expiry is bounded by the delegation expiry. Every
|
|
1416
1433
|
* authenticated request and periodic WebSocket session revalidation requires
|
|
1417
1434
|
* the backing delegation to remain active and unexpired.
|
|
1418
1435
|
*/
|
|
@@ -1696,6 +1713,29 @@ export interface paths {
|
|
|
1696
1713
|
patch?: never;
|
|
1697
1714
|
trace?: never;
|
|
1698
1715
|
};
|
|
1716
|
+
"/api/v1/margin/accounts/{marginAccountId}/pnl": {
|
|
1717
|
+
parameters: {
|
|
1718
|
+
query?: never;
|
|
1719
|
+
header?: never;
|
|
1720
|
+
path?: never;
|
|
1721
|
+
cookie?: never;
|
|
1722
|
+
};
|
|
1723
|
+
/**
|
|
1724
|
+
* @description One margin account's own PnL: realized (settled on the account plus
|
|
1725
|
+
* still held in its open risk buckets) and unrealized (its positions
|
|
1726
|
+
* repriced at the latest risk marks). Transfers between the caller's
|
|
1727
|
+
* accounts are flows, not PnL, so the figures of the caller's accounts sum
|
|
1728
|
+
* to the owner-wide figure.
|
|
1729
|
+
*/
|
|
1730
|
+
get: operations["get_margin_account_pnl"];
|
|
1731
|
+
put?: never;
|
|
1732
|
+
post?: never;
|
|
1733
|
+
delete?: never;
|
|
1734
|
+
options?: never;
|
|
1735
|
+
head?: never;
|
|
1736
|
+
patch?: never;
|
|
1737
|
+
trace?: never;
|
|
1738
|
+
};
|
|
1699
1739
|
"/api/v1/margin/accounts/{marginAccountId}/simulate-order-risk": {
|
|
1700
1740
|
parameters: {
|
|
1701
1741
|
query?: never;
|
|
@@ -1728,6 +1768,30 @@ export interface paths {
|
|
|
1728
1768
|
patch?: never;
|
|
1729
1769
|
trace?: never;
|
|
1730
1770
|
};
|
|
1771
|
+
"/api/v1/margin/collateral/transfer": {
|
|
1772
|
+
parameters: {
|
|
1773
|
+
query?: never;
|
|
1774
|
+
header?: never;
|
|
1775
|
+
path?: never;
|
|
1776
|
+
cookie?: never;
|
|
1777
|
+
};
|
|
1778
|
+
get?: never;
|
|
1779
|
+
put?: never;
|
|
1780
|
+
/**
|
|
1781
|
+
* @description Move collateral between the spot wallet, the caller's margin accounts and
|
|
1782
|
+
* their risk buckets. `from` and `to` each name the wallet or a margin
|
|
1783
|
+
* account (optionally one of its risk buckets). Supported moves: wallet to
|
|
1784
|
+
* the default margin account and back, margin account to margin account,
|
|
1785
|
+
* and margin account to one of its own risk buckets. The older transfer
|
|
1786
|
+
* routes keep working unchanged.
|
|
1787
|
+
*/
|
|
1788
|
+
post: operations["transfer_collateral"];
|
|
1789
|
+
delete?: never;
|
|
1790
|
+
options?: never;
|
|
1791
|
+
head?: never;
|
|
1792
|
+
patch?: never;
|
|
1793
|
+
trace?: never;
|
|
1794
|
+
};
|
|
1731
1795
|
"/api/v1/margin/parent-margin-account": {
|
|
1732
1796
|
parameters: {
|
|
1733
1797
|
query?: never;
|
|
@@ -1849,6 +1913,101 @@ export interface paths {
|
|
|
1849
1913
|
patch?: never;
|
|
1850
1914
|
trace?: never;
|
|
1851
1915
|
};
|
|
1916
|
+
"/api/v1/margin/sub-accounts": {
|
|
1917
|
+
parameters: {
|
|
1918
|
+
query?: never;
|
|
1919
|
+
header?: never;
|
|
1920
|
+
path?: never;
|
|
1921
|
+
cookie?: never;
|
|
1922
|
+
};
|
|
1923
|
+
get?: never;
|
|
1924
|
+
put?: never;
|
|
1925
|
+
/**
|
|
1926
|
+
* @description Open a sub-account: another margin account of the caller, keyed by
|
|
1927
|
+
* `subaccount_key`, with its own collateral and its own risk buckets. The
|
|
1928
|
+
* default margin account (key `default`) is the only one deposits and
|
|
1929
|
+
* withdrawals touch; fund a sub-account with `TransferCollateral`.
|
|
1930
|
+
* Re-creating the key of a closed sub-account re-opens the same account.
|
|
1931
|
+
* Keys starting with `copy:` are reserved. An owner may hold a limited
|
|
1932
|
+
* number of open sub-accounts, set by their weighted 14-day volume tier
|
|
1933
|
+
* (10 at the first tier, up to 50) or an admin override; a create past it
|
|
1934
|
+
* is refused. Copy-trading sub-accounts do not count.
|
|
1935
|
+
*/
|
|
1936
|
+
post: operations["create_sub_account"];
|
|
1937
|
+
delete?: never;
|
|
1938
|
+
options?: never;
|
|
1939
|
+
head?: never;
|
|
1940
|
+
patch?: never;
|
|
1941
|
+
trace?: never;
|
|
1942
|
+
};
|
|
1943
|
+
"/api/v1/margin/sub-accounts/{marginAccountId}/close": {
|
|
1944
|
+
parameters: {
|
|
1945
|
+
query?: never;
|
|
1946
|
+
header?: never;
|
|
1947
|
+
path?: never;
|
|
1948
|
+
cookie?: never;
|
|
1949
|
+
};
|
|
1950
|
+
get?: never;
|
|
1951
|
+
put?: never;
|
|
1952
|
+
/**
|
|
1953
|
+
* @description Close a sub-account. Refused unless it is flat: no position and no order,
|
|
1954
|
+
* conditional order or TWAP. Its flat, solvent risk buckets close in the
|
|
1955
|
+
* same step, and all of its remaining collateral moves to the default
|
|
1956
|
+
* margin account. A risk bucket in liquidation or bad debt refuses the
|
|
1957
|
+
* close, and nothing moves.
|
|
1958
|
+
*/
|
|
1959
|
+
post: operations["close_sub_account"];
|
|
1960
|
+
delete?: never;
|
|
1961
|
+
options?: never;
|
|
1962
|
+
head?: never;
|
|
1963
|
+
patch?: never;
|
|
1964
|
+
trace?: never;
|
|
1965
|
+
};
|
|
1966
|
+
"/api/v1/margin/sub-accounts/{marginAccountId}/collateral/transfer-in": {
|
|
1967
|
+
parameters: {
|
|
1968
|
+
query?: never;
|
|
1969
|
+
header?: never;
|
|
1970
|
+
path?: never;
|
|
1971
|
+
cookie?: never;
|
|
1972
|
+
};
|
|
1973
|
+
get?: never;
|
|
1974
|
+
put?: never;
|
|
1975
|
+
/**
|
|
1976
|
+
* @description Move collateral from the caller's default margin account to one of their
|
|
1977
|
+
* sub-accounts, in one sequenced step. The same move as `TransferCollateral`
|
|
1978
|
+
* from the default account to the sub-account. The path names an open
|
|
1979
|
+
* sub-account of the caller; the default margin account itself is refused
|
|
1980
|
+
* (fund it with the parent-margin-account routes).
|
|
1981
|
+
*/
|
|
1982
|
+
post: operations["transfer_collateral_to_sub_account"];
|
|
1983
|
+
delete?: never;
|
|
1984
|
+
options?: never;
|
|
1985
|
+
head?: never;
|
|
1986
|
+
patch?: never;
|
|
1987
|
+
trace?: never;
|
|
1988
|
+
};
|
|
1989
|
+
"/api/v1/margin/sub-accounts/{marginAccountId}/collateral/transfer-out": {
|
|
1990
|
+
parameters: {
|
|
1991
|
+
query?: never;
|
|
1992
|
+
header?: never;
|
|
1993
|
+
path?: never;
|
|
1994
|
+
cookie?: never;
|
|
1995
|
+
};
|
|
1996
|
+
get?: never;
|
|
1997
|
+
put?: never;
|
|
1998
|
+
/**
|
|
1999
|
+
* @description Move collateral from one of the caller's sub-accounts back to their
|
|
2000
|
+
* default margin account, in one sequenced step. The mirror of
|
|
2001
|
+
* `TransferCollateralToSubAccount`; the amount must fit the sub-account's
|
|
2002
|
+
* free collateral.
|
|
2003
|
+
*/
|
|
2004
|
+
post: operations["transfer_collateral_from_sub_account"];
|
|
2005
|
+
delete?: never;
|
|
2006
|
+
options?: never;
|
|
2007
|
+
head?: never;
|
|
2008
|
+
patch?: never;
|
|
2009
|
+
trace?: never;
|
|
2010
|
+
};
|
|
1852
2011
|
"/api/v1/market/funding/history": {
|
|
1853
2012
|
parameters: {
|
|
1854
2013
|
query?: never;
|
|
@@ -2643,12 +2802,14 @@ export interface paths {
|
|
|
2643
2802
|
* Get your referral position
|
|
2644
2803
|
* @description Read your own referral position (self-scoped).
|
|
2645
2804
|
*
|
|
2646
|
-
* Return the authenticated caller's referral position: their
|
|
2647
|
-
*
|
|
2648
|
-
*
|
|
2805
|
+
* Return the authenticated caller's referral position: their referral chain
|
|
2806
|
+
* upward (L1, L2 and onward — who referred them, who referred that wallet, and
|
|
2807
|
+
* so on, as many levels as PitPass currently rewards), the total rewards they
|
|
2808
|
+
* have earned, and their most recent reward rows.
|
|
2809
|
+
* Self-scoped — identity comes only from the session, never a path id,
|
|
2649
2810
|
* so a caller can only ever read their own chain. Every other user is
|
|
2650
2811
|
* identified by their public wallet address, never an internal id. An empty
|
|
2651
|
-
* `referrer`
|
|
2812
|
+
* `referrer` and `upline` mean the caller was not referred.
|
|
2652
2813
|
*/
|
|
2653
2814
|
get: operations["get_my_referral_position"];
|
|
2654
2815
|
put?: never;
|
|
@@ -2670,10 +2831,12 @@ export interface paths {
|
|
|
2670
2831
|
* Get your referral downline and earnings
|
|
2671
2832
|
* @description Read your own downline earnings (self-scoped).
|
|
2672
2833
|
*
|
|
2673
|
-
* Return who the authenticated caller earns from and how much:
|
|
2674
|
-
* earnings-by-source breakdown
|
|
2675
|
-
*
|
|
2676
|
-
*
|
|
2834
|
+
* Return who the authenticated caller earns from and how much: one page of
|
|
2835
|
+
* the earnings-by-source breakdown across every reward level, their L1
|
|
2836
|
+
* direct-referee roster (including referees who have not traded yet), and a
|
|
2837
|
+
* per-level earnings summary that always covers every level and source,
|
|
2838
|
+
* whatever page is requested. `earnings_by_source` is paged (`page_size`,
|
|
2839
|
+
* `page_token`); a request without them gets the first page, not every row.
|
|
2677
2840
|
* Self-scoped — identity comes only from the session, never a path id. Every
|
|
2678
2841
|
* source and referee is identified by their public wallet address, never an
|
|
2679
2842
|
* internal id.
|
|
@@ -2687,6 +2850,41 @@ export interface paths {
|
|
|
2687
2850
|
patch?: never;
|
|
2688
2851
|
trace?: never;
|
|
2689
2852
|
};
|
|
2853
|
+
"/api/v1/pitpass/referrals/me/tree": {
|
|
2854
|
+
parameters: {
|
|
2855
|
+
query?: never;
|
|
2856
|
+
header?: never;
|
|
2857
|
+
path?: never;
|
|
2858
|
+
cookie?: never;
|
|
2859
|
+
};
|
|
2860
|
+
/**
|
|
2861
|
+
* Get one level of your referral tree
|
|
2862
|
+
* @description Read one level of your own referral tree (self-scoped).
|
|
2863
|
+
*
|
|
2864
|
+
* Return the wallets directly referred by `parent` — the authenticated caller
|
|
2865
|
+
* when `parent` is omitted, otherwise one of the caller's own referees above
|
|
2866
|
+
* the deepest rewarded level — one page at a time, newest first. Each node carries its level
|
|
2867
|
+
* relative to the caller, its parent, how many wallets it has referred (so the
|
|
2868
|
+
* client knows whether it can be expanded), and what the caller has earned
|
|
2869
|
+
* from that wallet's own trades. Expanding a node is another call with
|
|
2870
|
+
* `parent` set to that node's wallet; the tree stops at the deepest level that
|
|
2871
|
+
* pays referral rewards, which an admin configures (at most 10).
|
|
2872
|
+
*
|
|
2873
|
+
* Self-scoped — identity comes only from the session. A `parent` that is not
|
|
2874
|
+
* the caller or a referee the caller can expand returns 404, the same
|
|
2875
|
+
* as a wallet that does not exist, so the endpoint cannot be used to read
|
|
2876
|
+
* anyone else's tree. Every node is identified by its public wallet address,
|
|
2877
|
+
* never an internal id.
|
|
2878
|
+
*/
|
|
2879
|
+
get: operations["get_my_referral_tree"];
|
|
2880
|
+
put?: never;
|
|
2881
|
+
post?: never;
|
|
2882
|
+
delete?: never;
|
|
2883
|
+
options?: never;
|
|
2884
|
+
head?: never;
|
|
2885
|
+
patch?: never;
|
|
2886
|
+
trace?: never;
|
|
2887
|
+
};
|
|
2690
2888
|
"/api/v1/pitpass/rewards/balance": {
|
|
2691
2889
|
parameters: {
|
|
2692
2890
|
query?: never;
|
|
@@ -2729,7 +2927,8 @@ export interface paths {
|
|
|
2729
2927
|
* trading balance under the authenticated application, making it tradeable
|
|
2730
2928
|
* immediately. Ledger-only (one shared vault + one backend ledger) — no
|
|
2731
2929
|
* on-chain transaction and no gas. Fails with 402 when the rewards balance is
|
|
2732
|
-
* insufficient.
|
|
2930
|
+
* insufficient. It spends the per-user movement budget withdrawals and
|
|
2931
|
+
* collateral transfers share.
|
|
2733
2932
|
*/
|
|
2734
2933
|
post: operations["transfer_rewards"];
|
|
2735
2934
|
delete?: never;
|
|
@@ -2769,7 +2968,13 @@ export interface paths {
|
|
|
2769
2968
|
* Submits a MARKET reduce-only close for every open position owned by the
|
|
2770
2969
|
* caller, optionally filtered to a single trading pair. Best-effort and
|
|
2771
2970
|
* partial: each position closes independently and per-position failures are
|
|
2772
|
-
* reported in `results` rather than aborting the batch.
|
|
2971
|
+
* reported in `results` rather than aborting the batch. Each close draws
|
|
2972
|
+
* one item from the risk-reduction rate limit (an empty call draws one).
|
|
2973
|
+
* The first 100 are charged before anything is sent: over budget, the
|
|
2974
|
+
* whole call is refused with 429 and nothing is closed. Past 100 open
|
|
2975
|
+
* positions the rest are charged 100 at a time as the call reaches them,
|
|
2976
|
+
* and those the budget does not cover are not sent: they come back in
|
|
2977
|
+
* `results` with `RATE_LIMIT_EXCEEDED`, to be retried.
|
|
2773
2978
|
*/
|
|
2774
2979
|
post: operations["batch_close_all_positions"];
|
|
2775
2980
|
delete?: never;
|
|
@@ -3285,28 +3490,16 @@ export interface components {
|
|
|
3285
3490
|
* @example master
|
|
3286
3491
|
*/
|
|
3287
3492
|
accountType?: string | null;
|
|
3288
|
-
/**
|
|
3289
|
-
* @description Whether the user is allowed to withdraw
|
|
3290
|
-
* @example true
|
|
3291
|
-
*/
|
|
3292
|
-
canWithdraw?: boolean | null;
|
|
3293
3493
|
/**
|
|
3294
3494
|
* @description Account creation timestamp (ISO 8601)
|
|
3295
3495
|
* @example 2023-11-13T10:30:00Z
|
|
3296
3496
|
*/
|
|
3297
3497
|
createdAt?: string | null;
|
|
3298
|
-
/** @description Email address */
|
|
3299
|
-
email?: string | null;
|
|
3300
3498
|
/**
|
|
3301
3499
|
* @description Whether the user account is active
|
|
3302
3500
|
* @example true
|
|
3303
3501
|
*/
|
|
3304
3502
|
isActive?: boolean | null;
|
|
3305
|
-
/**
|
|
3306
|
-
* @description Whether the user is banned
|
|
3307
|
-
* @example false
|
|
3308
|
-
*/
|
|
3309
|
-
isBanned?: boolean | null;
|
|
3310
3503
|
/**
|
|
3311
3504
|
* Format: uuid
|
|
3312
3505
|
* @description Master account ID (for sub-accounts)
|
|
@@ -3741,7 +3934,7 @@ export interface components {
|
|
|
3741
3934
|
*/
|
|
3742
3935
|
strategyKey?: string | null;
|
|
3743
3936
|
/**
|
|
3744
|
-
* @description Risk bucket mode for margin orders. Defaults to ISOLATED. Values: ISOLATED, CROSS.
|
|
3937
|
+
* @description Risk bucket mode for margin orders. Defaults to ISOLATED. Values: ISOLATED, CROSS. On an isolated-only market (TradingPairData.isolated_only) a CROSS order that is not reduce-only is rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code CROSS_MARGIN_NOT_ALLOWED.
|
|
3745
3938
|
* @example CROSS
|
|
3746
3939
|
* @enum {string|null}
|
|
3747
3940
|
*/
|
|
@@ -3944,7 +4137,7 @@ export interface components {
|
|
|
3944
4137
|
amount?: string | null;
|
|
3945
4138
|
/**
|
|
3946
4139
|
* Format: int32
|
|
3947
|
-
* @description
|
|
4140
|
+
* @description Basis-point rate applied to this credit. For `BUILDER_FEE`, this is the normalized builder-fee rate charged to the taker. For `REVENUE_SHARE`, it is the realized whole-basis-point rate after the Monaco-floor clamp and can be lower than the configured BuilderCodes budget.
|
|
3948
4141
|
* @example 1000
|
|
3949
4142
|
*/
|
|
3950
4143
|
appliedBps?: number | null;
|
|
@@ -3954,7 +4147,7 @@ export interface components {
|
|
|
3954
4147
|
*/
|
|
3955
4148
|
createdAt?: string | null;
|
|
3956
4149
|
/**
|
|
3957
|
-
* @description Payout category for this credit
|
|
4150
|
+
* @description Payout category for this credit: `REVENUE_SHARE` for Monaco revenue sharing or `BUILDER_FEE` for an ordinary builder fee charged to the taker.
|
|
3958
4151
|
* @example REVENUE_SHARE
|
|
3959
4152
|
* @enum {string|null}
|
|
3960
4153
|
*/
|
|
@@ -4271,6 +4464,16 @@ export interface components {
|
|
|
4271
4464
|
message?: string | null;
|
|
4272
4465
|
submittedQuantity?: string | null;
|
|
4273
4466
|
};
|
|
4467
|
+
CloseSubAccountRequest: {
|
|
4468
|
+
marginAccountId?: string | null;
|
|
4469
|
+
};
|
|
4470
|
+
CloseSubAccountResponse: {
|
|
4471
|
+
marginAccountId?: string | null;
|
|
4472
|
+
/** @description The default margin account that received the remaining collateral. */
|
|
4473
|
+
defaultMarginAccountId?: string | null;
|
|
4474
|
+
/** @description Collateral moved to the default margin account. */
|
|
4475
|
+
amount?: string | null;
|
|
4476
|
+
};
|
|
4274
4477
|
ClosedTrade: {
|
|
4275
4478
|
/**
|
|
4276
4479
|
* Format: uuid
|
|
@@ -4299,6 +4502,17 @@ export interface components {
|
|
|
4299
4502
|
/** @description Execution time (RFC 3339) */
|
|
4300
4503
|
closedAt?: string | null;
|
|
4301
4504
|
};
|
|
4505
|
+
/**
|
|
4506
|
+
* @description One side of a `TransferCollateral`: the spot wallet, or a margin account
|
|
4507
|
+
* and optionally one of its risk buckets.
|
|
4508
|
+
*/
|
|
4509
|
+
CollateralTransferEndpoint: {
|
|
4510
|
+
/** @description The spot wallet. Set exactly one of `wallet` and `margin_account_id`. */
|
|
4511
|
+
wallet?: boolean | null;
|
|
4512
|
+
marginAccountId?: string | null;
|
|
4513
|
+
/** @description A risk bucket of `margin_account_id`. */
|
|
4514
|
+
riskBucketId?: string | null;
|
|
4515
|
+
};
|
|
4302
4516
|
ConditionalOrder: {
|
|
4303
4517
|
conditionalOrderId?: string | null;
|
|
4304
4518
|
/** Format: uuid */
|
|
@@ -4521,7 +4735,7 @@ export interface components {
|
|
|
4521
4735
|
*/
|
|
4522
4736
|
strategyKey?: string | null;
|
|
4523
4737
|
/**
|
|
4524
|
-
* @description Risk bucket mode for margin orders. Defaults to ISOLATED. Values: ISOLATED, CROSS.
|
|
4738
|
+
* @description Risk bucket mode for margin orders. Defaults to ISOLATED. Values: ISOLATED, CROSS. On an isolated-only market (TradingPairData.isolated_only) a CROSS order that is not reduce-only is rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code CROSS_MARGIN_NOT_ALLOWED.
|
|
4525
4739
|
* @example CROSS
|
|
4526
4740
|
* @enum {string|null}
|
|
4527
4741
|
*/
|
|
@@ -4598,6 +4812,23 @@ export interface components {
|
|
|
4598
4812
|
*/
|
|
4599
4813
|
trailingStopOrderId?: string | null;
|
|
4600
4814
|
};
|
|
4815
|
+
CreateSubAccountRequest: {
|
|
4816
|
+
/**
|
|
4817
|
+
* @description Sub-account key: up to 64 letters, digits, `_`, `-`, `.` or `:`. Keys
|
|
4818
|
+
* starting with `copy:` are reserved, and `default` names the default
|
|
4819
|
+
* margin account.
|
|
4820
|
+
*/
|
|
4821
|
+
subaccountKey?: string | null;
|
|
4822
|
+
/** @description Optional display label. */
|
|
4823
|
+
label?: string | null;
|
|
4824
|
+
};
|
|
4825
|
+
CreateSubAccountResponse: {
|
|
4826
|
+
marginAccountId?: string | null;
|
|
4827
|
+
subaccountKey?: string | null;
|
|
4828
|
+
/** @description Values: ACTIVE. */
|
|
4829
|
+
marginAccountState?: string | null;
|
|
4830
|
+
label?: string | null;
|
|
4831
|
+
};
|
|
4601
4832
|
CreateTwapOrderRequest: {
|
|
4602
4833
|
/**
|
|
4603
4834
|
* Format: uuid
|
|
@@ -4670,7 +4901,7 @@ export interface components {
|
|
|
4670
4901
|
*/
|
|
4671
4902
|
riskBucketId?: string | null;
|
|
4672
4903
|
/**
|
|
4673
|
-
* @description Risk bucket mode for margin TWAP orders. Defaults to ISOLATED. Values: ISOLATED, CROSS.
|
|
4904
|
+
* @description Risk bucket mode for margin TWAP orders. Defaults to ISOLATED. Values: ISOLATED, CROSS. On an isolated-only market (TradingPairData.isolated_only) a CROSS order that is not reduce-only is rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code CROSS_MARGIN_NOT_ALLOWED.
|
|
4674
4905
|
* @example CROSS
|
|
4675
4906
|
* @enum {string|null}
|
|
4676
4907
|
*/
|
|
@@ -4811,6 +5042,8 @@ export interface components {
|
|
|
4811
5042
|
* @description Legacy field; no concurrent open-order cap is enforced. New or updated policies leave it unset.
|
|
4812
5043
|
*/
|
|
4813
5044
|
maxOpenOrders?: number | null;
|
|
5045
|
+
/** @description IP addresses and CIDR ranges the agent may create its delegated session from, normalized. Empty allows any address. */
|
|
5046
|
+
ipAllowlist?: string[] | null;
|
|
4814
5047
|
};
|
|
4815
5048
|
DelegatedAgentOwner: {
|
|
4816
5049
|
/**
|
|
@@ -5144,12 +5377,13 @@ export interface components {
|
|
|
5144
5377
|
* margin account yet.
|
|
5145
5378
|
*
|
|
5146
5379
|
* This is NOT trading headroom for existing cross exposure. It is bounded
|
|
5147
|
-
* by allocation (
|
|
5380
|
+
* by allocation (net deposits plus settled realized PnL not allocated to
|
|
5381
|
+
* risk buckets) as well as by
|
|
5148
5382
|
* margin requirements, and an unrealized gain does not raise it: a
|
|
5149
5383
|
* mark-to-market gain is initial margin against existing cross exposure but
|
|
5150
5384
|
* may not fund an exit. `MarginAccountSummary.free_collateral` credits that
|
|
5151
5385
|
* gain in full and remains the trading-margin headroom for existing cross
|
|
5152
|
-
* exposure — but a NEW isolated or first-use position allocates
|
|
5386
|
+
* exposure — but a NEW isolated or first-use position allocates collateral
|
|
5153
5387
|
* through the same gate this field measures, so size those from this field.
|
|
5154
5388
|
*
|
|
5155
5389
|
* Note the two `margin_*` fields answer opposite questions:
|
|
@@ -5231,12 +5465,6 @@ export interface components {
|
|
|
5231
5465
|
* @example 5
|
|
5232
5466
|
*/
|
|
5233
5467
|
total?: number | null;
|
|
5234
|
-
/**
|
|
5235
|
-
* Format: uint32
|
|
5236
|
-
* @description Current page number
|
|
5237
|
-
* @example 1
|
|
5238
|
-
*/
|
|
5239
|
-
page?: number | null;
|
|
5240
5468
|
/**
|
|
5241
5469
|
* Format: uint32
|
|
5242
5470
|
* @description Items per page
|
|
@@ -5249,6 +5477,12 @@ export interface components {
|
|
|
5249
5477
|
* @example 1
|
|
5250
5478
|
*/
|
|
5251
5479
|
totalPages?: number | null;
|
|
5480
|
+
/**
|
|
5481
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
5482
|
+
* page. The whole set is already in memory, so over-fetching is free and an
|
|
5483
|
+
* empty token is the definitive end of the walk.
|
|
5484
|
+
*/
|
|
5485
|
+
nextPageToken?: string | null;
|
|
5252
5486
|
};
|
|
5253
5487
|
GetBuildercodePayoutSummaryResponse: {
|
|
5254
5488
|
/**
|
|
@@ -5434,20 +5668,31 @@ export interface components {
|
|
|
5434
5668
|
};
|
|
5435
5669
|
GetMarginAccountMovementsResponse: {
|
|
5436
5670
|
movements?: components["schemas"]["MarginAccountMovement"][] | null;
|
|
5437
|
-
/**
|
|
5438
|
-
* Format: uint32
|
|
5439
|
-
* @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 caller with more movements than the listing can page through reads the cap, not its lifetime total.
|
|
5440
|
-
* @example 150
|
|
5441
|
-
*/
|
|
5442
|
-
total?: number | null;
|
|
5443
|
-
/** Format: uint32 */
|
|
5444
|
-
page?: number | null;
|
|
5445
5671
|
/** Format: uint32 */
|
|
5446
5672
|
pageSize?: number | null;
|
|
5673
|
+
/**
|
|
5674
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
5675
|
+
* page: this listing is one SQL statement with one global ORDER BY, so a
|
|
5676
|
+
* page shorter than `pageSize` proves the walk is exhausted and this is
|
|
5677
|
+
* empty. A non-empty token always has at least one further row behind it.
|
|
5678
|
+
*/
|
|
5679
|
+
nextPageToken?: string | null;
|
|
5680
|
+
};
|
|
5681
|
+
GetMarginAccountPnlResponse: {
|
|
5682
|
+
marginAccountId?: string | null;
|
|
5683
|
+
/**
|
|
5684
|
+
* @description Decimal string: settled on the account plus still held in its open risk
|
|
5685
|
+
* buckets.
|
|
5686
|
+
*/
|
|
5687
|
+
realizedPnl?: string | null;
|
|
5688
|
+
/**
|
|
5689
|
+
* @description Decimal string: the account's open positions repriced at the latest risk
|
|
5690
|
+
* marks.
|
|
5691
|
+
*/
|
|
5692
|
+
unrealizedPnl?: string | null;
|
|
5447
5693
|
};
|
|
5448
5694
|
GetMarginAccountSummaryResponse: {
|
|
5449
5695
|
marginAccountId?: string | null;
|
|
5450
|
-
accountState?: string | null;
|
|
5451
5696
|
equity?: string | null;
|
|
5452
5697
|
initialMarginRequired?: string | null;
|
|
5453
5698
|
maintenanceMarginRequired?: string | null;
|
|
@@ -5456,23 +5701,26 @@ export interface components {
|
|
|
5456
5701
|
* @description The largest amount a transfer-out of this scope will actually accept.
|
|
5457
5702
|
*
|
|
5458
5703
|
* NOT a clamped `free_collateral`. Free collateral is equity headroom, and
|
|
5459
|
-
* equity includes
|
|
5460
|
-
*
|
|
5461
|
-
*
|
|
5704
|
+
* equity includes mark-to-market gains that a transfer cannot move — so
|
|
5705
|
+
* the two can differ without limit. An unrealized gain never counts toward
|
|
5706
|
+
* this figure.
|
|
5707
|
+
*
|
|
5708
|
+
* For a risk bucket this is the bucket's allocated collateral plus its
|
|
5709
|
+
* realized PnL, less what its positions and resting orders require (the
|
|
5710
|
+
* bucket's allocation may go negative, which is how realized profit leaves
|
|
5711
|
+
* a live bucket); for a parent margin account, net deposits plus settled
|
|
5712
|
+
* realized PnL that no risk bucket has allocated.
|
|
5462
5713
|
*
|
|
5463
|
-
*
|
|
5464
|
-
*
|
|
5465
|
-
*
|
|
5714
|
+
* This is the largest accepted transfer-out, and every smaller amount is
|
|
5715
|
+
* accepted too. It is zero on a risk bucket that is not `NORMAL` (under
|
|
5716
|
+
* liquidation or frozen as bad debt), whose allocation cannot be released,
|
|
5717
|
+
* and on a risk bucket whose realized loss has used up its allocation: that
|
|
5718
|
+
* bucket cannot be released at all, and the parent margin account is
|
|
5719
|
+
* charged at most its allocation, the loss past it being the insurance
|
|
5720
|
+
* fund's.
|
|
5466
5721
|
*
|
|
5467
|
-
*
|
|
5468
|
-
*
|
|
5469
|
-
* bucket whose realized loss exceeds its remaining value accepts the full
|
|
5470
|
-
* close-out reported here — which settles that loss to the parent margin
|
|
5471
|
-
* account — while refusing a partial withdrawal that would leave the bucket
|
|
5472
|
-
* holding less collateral than the loss it has already taken. For such a
|
|
5473
|
-
* bucket the accepted amounts are everything up to its equity, plus this
|
|
5474
|
-
* figure itself, with a gap in between. Size a transfer directly from this
|
|
5475
|
-
* field rather than shaving a margin off it.
|
|
5722
|
+
* Printed truncated toward zero at the quote asset's precision, so the
|
|
5723
|
+
* printed amount itself is always accepted.
|
|
5476
5724
|
*/
|
|
5477
5725
|
withdrawableCollateral?: string | null;
|
|
5478
5726
|
totalPositionNotional?: string | null;
|
|
@@ -5507,6 +5755,16 @@ export interface components {
|
|
|
5507
5755
|
copyFollowId?: string | null;
|
|
5508
5756
|
/** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
|
|
5509
5757
|
copyLeaderHandle?: string | null;
|
|
5758
|
+
/**
|
|
5759
|
+
* @description The risk bucket's lifecycle state. Present only for risk-bucket rows;
|
|
5760
|
+
* a parent margin account has no lifecycle of its own. Values: NORMAL,
|
|
5761
|
+
* PENDING_LIQUIDATION, LIQUIDATING, BAD_DEBT, CLOSED.
|
|
5762
|
+
*/
|
|
5763
|
+
riskBucketState?: string | null;
|
|
5764
|
+
/** @description See `MarginAccountSummary.subaccount_key`. */
|
|
5765
|
+
subaccountKey?: string | null;
|
|
5766
|
+
/** @description See `MarginAccountSummary.margin_account_state`. */
|
|
5767
|
+
marginAccountState?: string | null;
|
|
5510
5768
|
};
|
|
5511
5769
|
GetMarkPriceResponse: {
|
|
5512
5770
|
/** Format: uuid */
|
|
@@ -5634,16 +5892,10 @@ export interface components {
|
|
|
5634
5892
|
movements?: components["schemas"]["LedgerMovement"][] | null;
|
|
5635
5893
|
/**
|
|
5636
5894
|
* Format: uint32
|
|
5637
|
-
* @description
|
|
5895
|
+
* @description Number of movements matching the filter, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
5638
5896
|
* @example 150
|
|
5639
5897
|
*/
|
|
5640
5898
|
total?: number | null;
|
|
5641
|
-
/**
|
|
5642
|
-
* Format: uint32
|
|
5643
|
-
* @description Current page number
|
|
5644
|
-
* @example 1
|
|
5645
|
-
*/
|
|
5646
|
-
page?: number | null;
|
|
5647
5899
|
/**
|
|
5648
5900
|
* Format: uint32
|
|
5649
5901
|
* @description Items per page
|
|
@@ -5652,15 +5904,28 @@ export interface components {
|
|
|
5652
5904
|
pageSize?: number | null;
|
|
5653
5905
|
/**
|
|
5654
5906
|
* Format: uint32
|
|
5655
|
-
* @description Number of pages at
|
|
5907
|
+
* @description Number of pages at this pageSize, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
5656
5908
|
* @example 8
|
|
5657
5909
|
*/
|
|
5658
5910
|
totalPages?: number | null;
|
|
5911
|
+
/**
|
|
5912
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
5913
|
+
* page. Each arm of the union is cut at the same over-fetched depth and the
|
|
5914
|
+
* outer query orders the merged rows, so a page shorter than `pageSize`
|
|
5915
|
+
* means both arms are exhausted and this is empty — a non-empty token always
|
|
5916
|
+
* has at least one further row behind it.
|
|
5917
|
+
*/
|
|
5918
|
+
nextPageToken?: string | null;
|
|
5919
|
+
/**
|
|
5920
|
+
* @description True when more than the server ceiling of movements matched, so the count stopped at the ceiling and total/totalPages are a lower bound. False when total is exact, including exactly the ceiling.
|
|
5921
|
+
* @example false
|
|
5922
|
+
*/
|
|
5923
|
+
totalCapped?: boolean | null;
|
|
5659
5924
|
};
|
|
5660
5925
|
GetMyFeeTierResponse: {
|
|
5661
5926
|
/**
|
|
5662
5927
|
* Format: int32
|
|
5663
|
-
* @description Caller's resolved tier (1–6) from their wallet's
|
|
5928
|
+
* @description Caller's resolved tier (1–6) from the higher of their wallet's weighted 14-day volume and any volume floor set on the wallet. A floor that is set or changed counts once it applies to the wallet's fills, usually within a minute, and likewise for an account the wallet opens in a new application; a removed or expired floor stops counting at once
|
|
5664
5929
|
* @example 2
|
|
5665
5930
|
*/
|
|
5666
5931
|
currentTierLevel?: number | null;
|
|
@@ -5680,7 +5945,7 @@ export interface components {
|
|
|
5680
5945
|
*/
|
|
5681
5946
|
perpVolume14d?: string | null;
|
|
5682
5947
|
/**
|
|
5683
|
-
* @description Additional weighted volume needed to reach the next tier; omitted at tier 6
|
|
5948
|
+
* @description Additional weighted volume needed to reach the next tier, counted from the volume the current tier resolved from; omitted at tier 6
|
|
5684
5949
|
* @example 17500000
|
|
5685
5950
|
*/
|
|
5686
5951
|
volumeToNextTier?: string | null;
|
|
@@ -5694,16 +5959,18 @@ export interface components {
|
|
|
5694
5959
|
feeSchedule?: components["schemas"]["FeeTierScheduleRow"][] | null;
|
|
5695
5960
|
};
|
|
5696
5961
|
GetMyReferralDownlineResponse: {
|
|
5697
|
-
/** @description One
|
|
5962
|
+
/** @description One page of rows, one per (source account, level, token) the caller earns from, across every reward level, ordered by each source account's own total, largest first. A wallet that traded through several applications has one account per application: its rows within a page are merged into one row at the position of its first (largest) part, so a merged row can sit below a smaller one, and the wallet can appear again on a later page. Paged by `pageSize` / `pageToken`; follow `nextPageToken` for the rest. Comes from the caller's maintained reward totals — no tree walk. */
|
|
5698
5963
|
earningsBySource?: components["schemas"]["ReferralEarningsSource"][] | null;
|
|
5699
|
-
/** @description The caller's direct (L1) referees, newest first, including referees who have not traded yet (0 earned). Bounded to the most recent 500 EFFECTIVE referees (after per-wallet dedupe and the winning-edge filter). The
|
|
5964
|
+
/** @description The caller's direct (L1) referees, newest first, including referees who have not traded yet (0 earned). Bounded to the most recent 500 EFFECTIVE referees (after per-wallet dedupe and the winning-edge filter). The summary counts every level and source and `earnings_by_source` pages through every row, so a caller past the roster cap still sees their full earnings; only this roster listing is capped. */
|
|
5700
5965
|
directReferees?: components["schemas"]["ReferralDirectReferee"][] | null;
|
|
5701
|
-
/** @description Total earned broken down by level
|
|
5966
|
+
/** @description Total earned broken down by level. Covers every level and source regardless of the `earnings_by_source` page. */
|
|
5702
5967
|
summary?: components["schemas"]["ReferralEarningsSummary"] | null;
|
|
5968
|
+
/** @description Cursor for the next `earningsBySource` page; empty when there are no more rows. */
|
|
5969
|
+
nextPageToken?: string | null;
|
|
5703
5970
|
};
|
|
5704
5971
|
GetMyReferralPositionResponse: {
|
|
5705
5972
|
/**
|
|
5706
|
-
* @description Public wallet address of the caller's direct (L1) referrer — who referred them. Empty when the caller was not referred.
|
|
5973
|
+
* @description Public wallet address of the caller's direct (L1) referrer — who referred them. Empty when the caller was not referred. The same wallet as the first `upline` entry; never an internal id.
|
|
5707
5974
|
* @example 0x0000000000000000000000000000000000000002
|
|
5708
5975
|
*/
|
|
5709
5976
|
referrer?: string | null;
|
|
@@ -5719,6 +5986,21 @@ export interface components {
|
|
|
5719
5986
|
referrerDisplay?: string | null;
|
|
5720
5987
|
/** @description The caller's most recent reward rows, newest first. Bounded server-side — not the full history. */
|
|
5721
5988
|
rewards?: components["schemas"]["ReferralRewardEntry"][] | null;
|
|
5989
|
+
/** @description The caller's referral chain upward, nearest first: L1 (who referred the caller), then L2 (who referred them), and so on. At most as many entries as PitPass currently rewards levels (at most 10); shorter when the chain ends, empty when the caller was not referred. These are the wallets the caller's own trades pay referral rewards to. */
|
|
5990
|
+
upline?: components["schemas"]["ReferralUplineEntry"][] | null;
|
|
5991
|
+
};
|
|
5992
|
+
GetMyReferralTreeResponse: {
|
|
5993
|
+
/** @description Wallet address whose referees `nodes` lists — the caller's own wallet when the request omitted `parent`. */
|
|
5994
|
+
parent?: string | null;
|
|
5995
|
+
/**
|
|
5996
|
+
* Format: int32
|
|
5997
|
+
* @description Depth of `parent` below the caller: 0 for the caller, otherwise the level of the referee being expanded. Every node is one level deeper.
|
|
5998
|
+
*/
|
|
5999
|
+
parentLevel?: number | null;
|
|
6000
|
+
/** @description The wallets `parent` referred, newest first. A wallet that signed up under several referrers (one per app) appears only under the referrer the reward engine pays. */
|
|
6001
|
+
nodes?: components["schemas"]["ReferralTreeNode"][] | null;
|
|
6002
|
+
/** @description Cursor for the next page; empty when there are no more. */
|
|
6003
|
+
nextPageToken?: string | null;
|
|
5722
6004
|
};
|
|
5723
6005
|
/** @description Latest public open interest for a trading pair. */
|
|
5724
6006
|
GetOpenInterestResponse: {
|
|
@@ -5763,7 +6045,7 @@ export interface components {
|
|
|
5763
6045
|
*/
|
|
5764
6046
|
tradingPairId?: string | null;
|
|
5765
6047
|
/**
|
|
5766
|
-
* @description
|
|
6048
|
+
* @description Order type: LIMIT or MARKET
|
|
5767
6049
|
* @example LIMIT
|
|
5768
6050
|
*/
|
|
5769
6051
|
orderType?: string | null;
|
|
@@ -5773,7 +6055,7 @@ export interface components {
|
|
|
5773
6055
|
*/
|
|
5774
6056
|
side?: string | null;
|
|
5775
6057
|
/**
|
|
5776
|
-
* @description Limit price (null for market orders)
|
|
6058
|
+
* @description Limit price (null for market orders)
|
|
5777
6059
|
* @example 35000.00
|
|
5778
6060
|
*/
|
|
5779
6061
|
price?: string | null;
|
|
@@ -5956,7 +6238,7 @@ export interface components {
|
|
|
5956
6238
|
*/
|
|
5957
6239
|
batchId?: string | null;
|
|
5958
6240
|
/**
|
|
5959
|
-
* @description Stable terminal cause for a cancelled order: USER_REQUESTED, REPLACED, LIQUIDATION, INSUFFICIENT_MARGIN, REDUCE_ONLY_EXHAUSTED, POSITION_CLOSED, OCO_SIBLING_TRIGGERED, or SYSTEM
|
|
6241
|
+
* @description Stable terminal cause for a cancelled order: USER_REQUESTED, REPLACED, LIQUIDATION, INSUFFICIENT_MARGIN, REDUCE_ONLY_EXHAUSTED, POSITION_CLOSED, OCO_SIBLING_TRIGGERED, SELF_TRADE_PREVENTION, AUTO_DELEVERAGING, PRICE_BAND, SLIPPAGE_TOLERANCE, or SYSTEM. AUTO_DELEVERAGING means auto-deleveraging closed the position your risk bucket held and this resting order was cancelled with it; you were deleveraged as a counterparty, not liquidated. PRICE_BAND means the exchange's protective price band stopped the order and its remainder was cancelled; SLIPPAGE_TOLERANCE means your own slippageToleranceBps did.
|
|
5960
6242
|
* @example REDUCE_ONLY_EXHAUSTED
|
|
5961
6243
|
*/
|
|
5962
6244
|
terminalReason?: string | null;
|
|
@@ -5965,10 +6247,6 @@ export interface components {
|
|
|
5965
6247
|
* @example false
|
|
5966
6248
|
*/
|
|
5967
6249
|
postOnly?: boolean | null;
|
|
5968
|
-
/** @description Present only when orderType is TWAP: the full TWAP parent, identical to what GET /api/v1/orders/twap/{twapOrderId} returns — schedule, slice counters, progress, and terminal reason. The row's shared fields mirror it: quantity is the parent's total quantity, filledQuantity its executed quantity, and status maps its state onto the order statuses. */
|
|
5969
|
-
twap?: components["schemas"]["TwapOrder"] | null;
|
|
5970
|
-
/** @description Present only when orderType is CONDITIONAL: the full conditional order, identical to what the conditional-order endpoints return — trigger price and direction, condition type, linked group, and the order it triggers into. The row's shared fields mirror it, with status mapping its state onto the order statuses. */
|
|
5971
|
-
conditional?: components["schemas"]["ConditionalOrder"] | null;
|
|
5972
6250
|
/**
|
|
5973
6251
|
* Format: int64
|
|
5974
6252
|
* @description Opaque, compare-only revision counter for this order's state: the sequencer step that wrote it. A strictly higher value is strictly newer state for that order. The SAME counter is carried on every order WebSocket event and on the `orders` snapshot frame, so a reconnecting client reconciles on `(id, version)` — take the REST row when `snapshot.version >= local.version`, else keep local state. Note `>=`, not `>`: on the stream, equal versions mean the SAME STEP rather than identical state, because one step emits several events for one order (an `OrderPlaced` and then its fills) and a batch shares one step across every item. A REST row is that step's FINAL state, so it wins a tie. Between two REST reads the comparison is simpler — equal there does mean identical state. Do not read anything else into the number: it is not a count of updates, consecutive values are not expected (it is drawn from a global sequence shared by every order, so per-order values are sparse and gaps are normal), and it is not comparable across different orders. Absent means unknown: an order last written before this field existed. Fall back to a full field comparison for those rather than treating absent as version zero — and note that a comparison against an absent value is false in both directions, so an order held locally without one is never refreshed by the merge above; take the REST row unconditionally for those. Reconciling on this counter does NOT on its own close a reconnect gap: an order that filled or was cancelled while the socket was down appears in neither the resting snapshot nor the stream, so recover fills from `listUserTrades` (ordered by execution time) and resolve anything your local state believes is resting that the snapshot no longer lists with a targeted `getOrder`. Unlike `updatedAt`, this value is identical on every REST endpoint that serves the same order state, and never advances without a state change.
|
|
@@ -6141,6 +6419,18 @@ export interface components {
|
|
|
6141
6419
|
total?: components["schemas"]["PortfolioMarginTotal"];
|
|
6142
6420
|
positions?: components["schemas"]["PortfolioMarginPositionCounts"];
|
|
6143
6421
|
riskBuckets?: components["schemas"]["PortfolioRiskBucket"][] | null;
|
|
6422
|
+
/**
|
|
6423
|
+
* @description The margin account `total`, `positions` and `risk_buckets` describe;
|
|
6424
|
+
* absent when the caller has no margin account yet.
|
|
6425
|
+
*/
|
|
6426
|
+
marginAccountId?: string | null;
|
|
6427
|
+
/**
|
|
6428
|
+
* @description With `include_accounts`: every open margin account of the caller, the
|
|
6429
|
+
* default one first, then sub-accounts by key.
|
|
6430
|
+
*/
|
|
6431
|
+
accounts?: components["schemas"]["PortfolioMarginAccount"][] | null;
|
|
6432
|
+
/** @description With `include_accounts`: the sum of `accounts`' totals. */
|
|
6433
|
+
ownerTotal?: components["schemas"]["PortfolioMarginTotal"] | null;
|
|
6144
6434
|
};
|
|
6145
6435
|
GetPortfolioPerformanceResponse: {
|
|
6146
6436
|
window?: components["schemas"]["PortfolioSeriesWindow"];
|
|
@@ -6394,10 +6684,15 @@ export interface components {
|
|
|
6394
6684
|
cumFees?: string | null;
|
|
6395
6685
|
/**
|
|
6396
6686
|
* Format: int64
|
|
6397
|
-
* @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
|
|
6687
|
+
* @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, non-zero funding settlements, terminal closes/liquidations/ADL, direct isolated-position margin adds/reductions, and copy-position margin adds; each uses captured post-command state, and terminal frames retain the stored size and exact CLOSED/LIQUIDATED classification. After restart, a terminal frame rebuilt from legacy reduction history omits the version when that history lacks the margin fields needed to reconstruct complete lifetime allocated margin. 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. Wallet IN/OUT and plain isolated allocation send no position frame. Transfer and funding 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.
|
|
6398
6688
|
* @example 918342
|
|
6399
6689
|
*/
|
|
6400
6690
|
version?: number | null;
|
|
6691
|
+
/**
|
|
6692
|
+
* @description RFC 3339 instant at which this position opened. Same contract as
|
|
6693
|
+
* `Position.opened_at` above.
|
|
6694
|
+
*/
|
|
6695
|
+
openedAt?: string | null;
|
|
6401
6696
|
};
|
|
6402
6697
|
GetPositionRiskResponse: {
|
|
6403
6698
|
positionId?: string | null;
|
|
@@ -7003,29 +7298,50 @@ export interface components {
|
|
|
7003
7298
|
*/
|
|
7004
7299
|
balanceId?: string | null;
|
|
7005
7300
|
};
|
|
7301
|
+
/** @description What the caller has earned at one referral level. */
|
|
7302
|
+
LevelEarnings: {
|
|
7303
|
+
/**
|
|
7304
|
+
* Format: int32
|
|
7305
|
+
* @description Referral level: 1 for direct referees, 2 for their referees, and so on (at most 10).
|
|
7306
|
+
* @example 1
|
|
7307
|
+
*/
|
|
7308
|
+
level?: number | null;
|
|
7309
|
+
/**
|
|
7310
|
+
* @description All-time credited earnings at this level, in the reward token's RAW atomic units.
|
|
7311
|
+
* @example 900000
|
|
7312
|
+
*/
|
|
7313
|
+
earned?: string | null;
|
|
7314
|
+
};
|
|
7006
7315
|
ListAllFundingHistoryResponse: {
|
|
7007
7316
|
records?: components["schemas"]["FundingRecord"][] | null;
|
|
7008
|
-
/**
|
|
7317
|
+
/**
|
|
7318
|
+
* Format: uint32
|
|
7319
|
+
* @description Settlements matching the filter, bounded by the server count ceiling — see
|
|
7320
|
+
* `totalCapped`. A lower bound when `totalCapped` is true.
|
|
7321
|
+
*/
|
|
7009
7322
|
total?: number | null;
|
|
7010
7323
|
/** Format: uint32 */
|
|
7011
|
-
page?: number | null;
|
|
7012
|
-
/** Format: uint32 */
|
|
7013
7324
|
pageSize?: number | null;
|
|
7325
|
+
/**
|
|
7326
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7327
|
+
* page: this listing is one ordered read, so a page shorter than
|
|
7328
|
+
* `pageSize` proves the walk is exhausted and this is empty.
|
|
7329
|
+
*/
|
|
7330
|
+
nextPageToken?: string | null;
|
|
7331
|
+
/**
|
|
7332
|
+
* @description True when MORE than the server ceiling matched, so the count stopped at
|
|
7333
|
+
* the ceiling and `total` is a lower bound.
|
|
7334
|
+
*/
|
|
7335
|
+
totalCapped?: boolean | null;
|
|
7014
7336
|
};
|
|
7015
7337
|
ListAppBalancesResponse: {
|
|
7016
7338
|
balances?: components["schemas"]["ApplicationBalance"][] | null;
|
|
7017
7339
|
/**
|
|
7018
7340
|
* Format: uint32
|
|
7019
|
-
* @description
|
|
7341
|
+
* @description Number of balances matching the filter, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
7020
7342
|
* @example 50
|
|
7021
7343
|
*/
|
|
7022
7344
|
total?: number | null;
|
|
7023
|
-
/**
|
|
7024
|
-
* Format: uint32
|
|
7025
|
-
* @description Current page number
|
|
7026
|
-
* @example 1
|
|
7027
|
-
*/
|
|
7028
|
-
page?: number | null;
|
|
7029
7345
|
/**
|
|
7030
7346
|
* Format: uint32
|
|
7031
7347
|
* @description Items per page
|
|
@@ -7034,25 +7350,39 @@ export interface components {
|
|
|
7034
7350
|
pageSize?: number | null;
|
|
7035
7351
|
/**
|
|
7036
7352
|
* Format: uint32
|
|
7037
|
-
* @description
|
|
7353
|
+
* @description Number of pages at this pageSize, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
7038
7354
|
* @example 3
|
|
7039
7355
|
*/
|
|
7040
7356
|
totalPages?: number | null;
|
|
7357
|
+
/**
|
|
7358
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7359
|
+
* page: this listing is one ordered read, so a page shorter than
|
|
7360
|
+
* `pageSize` proves the walk is exhausted and this is empty.
|
|
7361
|
+
*/
|
|
7362
|
+
nextPageToken?: string | null;
|
|
7363
|
+
/**
|
|
7364
|
+
* @description True when more than the server ceiling of balances matched, so the count stopped at the ceiling and total/totalPages are a lower bound.
|
|
7365
|
+
* @example false
|
|
7366
|
+
*/
|
|
7367
|
+
totalCapped?: boolean | null;
|
|
7041
7368
|
};
|
|
7042
7369
|
ListAppMovementsResponse: {
|
|
7043
7370
|
movements?: components["schemas"]["ApplicationMovement"][] | null;
|
|
7044
7371
|
/**
|
|
7045
7372
|
* Format: uint32
|
|
7046
|
-
* @description
|
|
7047
|
-
* @example
|
|
7373
|
+
* @description Items per page
|
|
7374
|
+
* @example 20
|
|
7048
7375
|
*/
|
|
7049
|
-
|
|
7376
|
+
pageSize?: number | null;
|
|
7050
7377
|
/**
|
|
7051
|
-
*
|
|
7052
|
-
*
|
|
7053
|
-
*
|
|
7378
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7379
|
+
* page: this listing is one ordered read, so a page shorter than
|
|
7380
|
+
* `pageSize` proves the walk is exhausted and this is empty.
|
|
7054
7381
|
*/
|
|
7055
|
-
|
|
7382
|
+
nextPageToken?: string | null;
|
|
7383
|
+
};
|
|
7384
|
+
ListAppOrdersResponse: {
|
|
7385
|
+
orders?: components["schemas"]["ApplicationOrder"][] | null;
|
|
7056
7386
|
/**
|
|
7057
7387
|
* Format: uint32
|
|
7058
7388
|
* @description Items per page
|
|
@@ -7060,26 +7390,20 @@ export interface components {
|
|
|
7060
7390
|
*/
|
|
7061
7391
|
pageSize?: number | null;
|
|
7062
7392
|
/**
|
|
7063
|
-
*
|
|
7064
|
-
*
|
|
7065
|
-
*
|
|
7393
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7394
|
+
* page: this listing is one ordered read, so a page shorter than
|
|
7395
|
+
* `pageSize` proves the walk is exhausted and this is empty.
|
|
7066
7396
|
*/
|
|
7067
|
-
|
|
7397
|
+
nextPageToken?: string | null;
|
|
7068
7398
|
};
|
|
7069
|
-
|
|
7070
|
-
|
|
7399
|
+
ListAppUsersResponse: {
|
|
7400
|
+
users?: components["schemas"]["AppUser"][] | null;
|
|
7071
7401
|
/**
|
|
7072
7402
|
* Format: uint32
|
|
7073
|
-
* @description
|
|
7074
|
-
* @example
|
|
7403
|
+
* @description Number of users matching the filter, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
7404
|
+
* @example 50
|
|
7075
7405
|
*/
|
|
7076
7406
|
total?: number | null;
|
|
7077
|
-
/**
|
|
7078
|
-
* Format: uint32
|
|
7079
|
-
* @description Current page number
|
|
7080
|
-
* @example 1
|
|
7081
|
-
*/
|
|
7082
|
-
page?: number | null;
|
|
7083
7407
|
/**
|
|
7084
7408
|
* Format: uint32
|
|
7085
7409
|
* @description Items per page
|
|
@@ -7088,37 +7412,21 @@ export interface components {
|
|
|
7088
7412
|
pageSize?: number | null;
|
|
7089
7413
|
/**
|
|
7090
7414
|
* Format: uint32
|
|
7091
|
-
* @description Number of pages at
|
|
7092
|
-
* @example
|
|
7415
|
+
* @description Number of pages at this pageSize, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
7416
|
+
* @example 3
|
|
7093
7417
|
*/
|
|
7094
7418
|
totalPages?: number | null;
|
|
7095
|
-
};
|
|
7096
|
-
ListAppUsersResponse: {
|
|
7097
|
-
users?: components["schemas"]["AppUser"][] | null;
|
|
7098
|
-
/**
|
|
7099
|
-
* Format: uint32
|
|
7100
|
-
* @description Total number of users
|
|
7101
|
-
* @example 50
|
|
7102
|
-
*/
|
|
7103
|
-
total?: number | null;
|
|
7104
7419
|
/**
|
|
7105
|
-
*
|
|
7106
|
-
*
|
|
7107
|
-
*
|
|
7108
|
-
*/
|
|
7109
|
-
page?: number | null;
|
|
7110
|
-
/**
|
|
7111
|
-
* Format: uint32
|
|
7112
|
-
* @description Items per page
|
|
7113
|
-
* @example 20
|
|
7420
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7421
|
+
* page: this listing is one ordered read, so a page shorter than
|
|
7422
|
+
* `pageSize` proves the walk is exhausted and this is empty.
|
|
7114
7423
|
*/
|
|
7115
|
-
|
|
7424
|
+
nextPageToken?: string | null;
|
|
7116
7425
|
/**
|
|
7117
|
-
*
|
|
7118
|
-
* @
|
|
7119
|
-
* @example 3
|
|
7426
|
+
* @description True when more than the server ceiling of users matched, so the count stopped at the ceiling and total/totalPages are a lower bound.
|
|
7427
|
+
* @example false
|
|
7120
7428
|
*/
|
|
7121
|
-
|
|
7429
|
+
totalCapped?: boolean | null;
|
|
7122
7430
|
};
|
|
7123
7431
|
ListBuilderFeeChangesResponse: {
|
|
7124
7432
|
/** @description Builder-fee changes, newest first. */
|
|
@@ -7185,27 +7493,34 @@ export interface components {
|
|
|
7185
7493
|
};
|
|
7186
7494
|
ListFundingHistoryResponse: {
|
|
7187
7495
|
records?: components["schemas"]["FundingRecord"][] | null;
|
|
7188
|
-
/**
|
|
7496
|
+
/**
|
|
7497
|
+
* Format: uint32
|
|
7498
|
+
* @description Settlements matching the filter, bounded by the server count ceiling — see
|
|
7499
|
+
* `totalCapped`. A lower bound when `totalCapped` is true.
|
|
7500
|
+
*/
|
|
7189
7501
|
total?: number | null;
|
|
7190
7502
|
/** Format: uint32 */
|
|
7191
|
-
page?: number | null;
|
|
7192
|
-
/** Format: uint32 */
|
|
7193
7503
|
pageSize?: number | null;
|
|
7504
|
+
/**
|
|
7505
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7506
|
+
* page: this listing is one ordered read, so a page shorter than
|
|
7507
|
+
* `pageSize` proves the walk is exhausted and this is empty.
|
|
7508
|
+
*/
|
|
7509
|
+
nextPageToken?: string | null;
|
|
7510
|
+
/**
|
|
7511
|
+
* @description True when MORE than the server ceiling matched, so the count stopped at
|
|
7512
|
+
* the ceiling and `total` is a lower bound.
|
|
7513
|
+
*/
|
|
7514
|
+
totalCapped?: boolean | null;
|
|
7194
7515
|
};
|
|
7195
7516
|
ListFundingPaymentsResponse: {
|
|
7196
7517
|
records?: components["schemas"]["FundingPaymentRecord"][] | null;
|
|
7197
7518
|
/**
|
|
7198
7519
|
* Format: uint32
|
|
7199
|
-
* @description
|
|
7520
|
+
* @description Number of funding payments matching the filter, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
7200
7521
|
* @example 2
|
|
7201
7522
|
*/
|
|
7202
7523
|
total?: number | null;
|
|
7203
|
-
/**
|
|
7204
|
-
* Format: uint32
|
|
7205
|
-
* @description Current page number
|
|
7206
|
-
* @example 1
|
|
7207
|
-
*/
|
|
7208
|
-
page?: number | null;
|
|
7209
7524
|
/**
|
|
7210
7525
|
* Format: uint32
|
|
7211
7526
|
* @description Items per page
|
|
@@ -7214,10 +7529,21 @@ export interface components {
|
|
|
7214
7529
|
pageSize?: number | null;
|
|
7215
7530
|
/**
|
|
7216
7531
|
* Format: uint32
|
|
7217
|
-
* @description Number of pages at
|
|
7532
|
+
* @description Number of pages at this pageSize, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
7218
7533
|
* @example 1
|
|
7219
7534
|
*/
|
|
7220
7535
|
totalPages?: number | null;
|
|
7536
|
+
/**
|
|
7537
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7538
|
+
* page: this listing is one ordered read, so a page shorter than
|
|
7539
|
+
* `pageSize` proves the walk is exhausted and this is empty.
|
|
7540
|
+
*/
|
|
7541
|
+
nextPageToken?: string | null;
|
|
7542
|
+
/**
|
|
7543
|
+
* @description True when more than the server ceiling of payments matched, so the count stopped at the ceiling and total/totalPages are a lower bound.
|
|
7544
|
+
* @example false
|
|
7545
|
+
*/
|
|
7546
|
+
totalCapped?: boolean | null;
|
|
7221
7547
|
};
|
|
7222
7548
|
ListLeadTraderClosedTradesResponse: {
|
|
7223
7549
|
closedTrades?: components["schemas"]["ClosedTrade"][] | null;
|
|
@@ -7247,12 +7573,20 @@ export interface components {
|
|
|
7247
7573
|
};
|
|
7248
7574
|
ListMarginAccountsResponse: {
|
|
7249
7575
|
accounts?: components["schemas"]["MarginAccountSummary"][] | null;
|
|
7250
|
-
/**
|
|
7576
|
+
/**
|
|
7577
|
+
* Format: uint32
|
|
7578
|
+
* @description Exact: a user's margin accounts and risk buckets are a small bounded set,
|
|
7579
|
+
* counted in memory after the repricing pass.
|
|
7580
|
+
*/
|
|
7251
7581
|
total?: number | null;
|
|
7252
7582
|
/** Format: uint32 */
|
|
7253
|
-
page?: number | null;
|
|
7254
|
-
/** Format: uint32 */
|
|
7255
7583
|
pageSize?: number | null;
|
|
7584
|
+
/**
|
|
7585
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7586
|
+
* page. The whole set is already in memory, so over-fetching is free and an
|
|
7587
|
+
* empty token is the definitive end of the walk.
|
|
7588
|
+
*/
|
|
7589
|
+
nextPageToken?: string | null;
|
|
7256
7590
|
};
|
|
7257
7591
|
ListMyFollowersResponse: {
|
|
7258
7592
|
followers?: components["schemas"]["Follower"][] | null;
|
|
@@ -7328,29 +7662,38 @@ export interface components {
|
|
|
7328
7662
|
};
|
|
7329
7663
|
ListPositionHistoryResponse: {
|
|
7330
7664
|
events?: components["schemas"]["PositionHistoryEvent"][] | null;
|
|
7331
|
-
/**
|
|
7332
|
-
* Format: uint32
|
|
7333
|
-
* @description Matching position-history events. 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 history than the listing can page through reads the cap, not its lifetime total.
|
|
7334
|
-
* @example 150
|
|
7335
|
-
*/
|
|
7336
|
-
total?: number | null;
|
|
7337
|
-
/** Format: uint32 */
|
|
7338
|
-
page?: number | null;
|
|
7339
7665
|
/** Format: uint32 */
|
|
7340
7666
|
pageSize?: number | null;
|
|
7667
|
+
/**
|
|
7668
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7669
|
+
* page: this listing is one SQL statement with one global ORDER BY, so a
|
|
7670
|
+
* page shorter than `pageSize` proves the walk is exhausted and this is
|
|
7671
|
+
* empty. A non-empty token always has at least one further row behind it.
|
|
7672
|
+
*/
|
|
7673
|
+
nextPageToken?: string | null;
|
|
7341
7674
|
};
|
|
7342
7675
|
ListPositionsResponse: {
|
|
7343
7676
|
positions?: components["schemas"]["Position"][] | null;
|
|
7344
7677
|
/**
|
|
7345
7678
|
* Format: uint32
|
|
7346
|
-
* @description
|
|
7679
|
+
* @description Number of positions matching the filter, bounded by the server ceiling — a lower bound when totalCapped is true.
|
|
7347
7680
|
* @example 150
|
|
7348
7681
|
*/
|
|
7349
7682
|
total?: number | null;
|
|
7350
7683
|
/** Format: uint32 */
|
|
7351
|
-
page?: number | null;
|
|
7352
|
-
/** Format: uint32 */
|
|
7353
7684
|
pageSize?: number | null;
|
|
7685
|
+
/**
|
|
7686
|
+
* @description Cursor for the next page, minted from the last row of an over-fetched
|
|
7687
|
+
* page: this listing is one SQL statement with one global ORDER BY, so a
|
|
7688
|
+
* page shorter than `pageSize` proves the walk is exhausted and this is
|
|
7689
|
+
* empty. A non-empty token always has at least one further row behind it.
|
|
7690
|
+
*/
|
|
7691
|
+
nextPageToken?: string | null;
|
|
7692
|
+
/**
|
|
7693
|
+
* @description True when more than the server ceiling of positions matched, so the count stopped at the ceiling and total is a lower bound. False when total is exact, including exactly the ceiling.
|
|
7694
|
+
* @example false
|
|
7695
|
+
*/
|
|
7696
|
+
totalCapped?: boolean | null;
|
|
7354
7697
|
};
|
|
7355
7698
|
ListSubAccountsResponse: {
|
|
7356
7699
|
subAccounts?: components["schemas"]["SubAccount"][] | null;
|
|
@@ -7461,7 +7804,6 @@ export interface components {
|
|
|
7461
7804
|
MarginAccountSummary: {
|
|
7462
7805
|
/** @description Parent margin account UUID. */
|
|
7463
7806
|
marginAccountId?: string | null;
|
|
7464
|
-
accountState?: string | null;
|
|
7465
7807
|
equity?: string | null;
|
|
7466
7808
|
initialMarginRequired?: string | null;
|
|
7467
7809
|
maintenanceMarginRequired?: string | null;
|
|
@@ -7470,23 +7812,26 @@ export interface components {
|
|
|
7470
7812
|
* @description The largest amount a transfer-out of this scope will actually accept.
|
|
7471
7813
|
*
|
|
7472
7814
|
* NOT a clamped `free_collateral`. Free collateral is equity headroom, and
|
|
7473
|
-
* equity includes
|
|
7474
|
-
*
|
|
7475
|
-
*
|
|
7815
|
+
* equity includes mark-to-market gains that a transfer cannot move — so
|
|
7816
|
+
* the two can differ without limit. An unrealized gain never counts toward
|
|
7817
|
+
* this figure.
|
|
7476
7818
|
*
|
|
7477
|
-
* For a risk bucket this is
|
|
7478
|
-
*
|
|
7479
|
-
*
|
|
7819
|
+
* For a risk bucket this is the bucket's allocated collateral plus its
|
|
7820
|
+
* realized PnL, less what its positions and resting orders require (the
|
|
7821
|
+
* bucket's allocation may go negative, which is how realized profit leaves
|
|
7822
|
+
* a live bucket); for a parent margin account, net deposits plus settled
|
|
7823
|
+
* realized PnL that no risk bucket has allocated.
|
|
7480
7824
|
*
|
|
7481
|
-
* This is the largest accepted transfer-out,
|
|
7482
|
-
*
|
|
7483
|
-
*
|
|
7484
|
-
*
|
|
7485
|
-
*
|
|
7486
|
-
*
|
|
7487
|
-
*
|
|
7488
|
-
*
|
|
7489
|
-
*
|
|
7825
|
+
* This is the largest accepted transfer-out, and every smaller amount is
|
|
7826
|
+
* accepted too. It is zero on a risk bucket that is not `NORMAL` (under
|
|
7827
|
+
* liquidation or frozen as bad debt), whose allocation cannot be released,
|
|
7828
|
+
* and on a risk bucket whose realized loss has used up its allocation: that
|
|
7829
|
+
* bucket cannot be released at all, and the parent margin account is
|
|
7830
|
+
* charged at most its allocation, the loss past it being the insurance
|
|
7831
|
+
* fund's.
|
|
7832
|
+
*
|
|
7833
|
+
* Printed truncated toward zero at the quote asset's precision, so the
|
|
7834
|
+
* printed amount itself is always accepted.
|
|
7490
7835
|
*/
|
|
7491
7836
|
withdrawableCollateral?: string | null;
|
|
7492
7837
|
totalPositionNotional?: string | null;
|
|
@@ -7542,7 +7887,8 @@ export interface components {
|
|
|
7542
7887
|
*
|
|
7543
7888
|
* Present only on risk-bucket summary rows served from a live risk engine
|
|
7544
7889
|
* snapshot; absent on parent rows and on persisted-fallback reads, where
|
|
7545
|
-
* neither of the gate's terms is reconstructable.
|
|
7890
|
+
* neither of the gate's terms is reconstructable. Printed truncated toward
|
|
7891
|
+
* zero at the quote asset's precision, like `withdrawable_collateral`.
|
|
7546
7892
|
*/
|
|
7547
7893
|
availableOrderCollateral?: string | null;
|
|
7548
7894
|
/**
|
|
@@ -7552,6 +7898,22 @@ export interface components {
|
|
|
7552
7898
|
copyFollowId?: string | null;
|
|
7553
7899
|
/** @description On a copy risk bucket row, the followed leader's custom TraderCode handle, when they still hold one */
|
|
7554
7900
|
copyLeaderHandle?: string | null;
|
|
7901
|
+
/**
|
|
7902
|
+
* @description The risk bucket's lifecycle state. Present only for risk-bucket rows;
|
|
7903
|
+
* a parent margin account has no lifecycle of its own. Values: NORMAL,
|
|
7904
|
+
* PENDING_LIQUIDATION, LIQUIDATING, BAD_DEBT, CLOSED.
|
|
7905
|
+
*/
|
|
7906
|
+
riskBucketState?: string | null;
|
|
7907
|
+
/**
|
|
7908
|
+
* @description The margin account's sub-account key; `default` is the default margin
|
|
7909
|
+
* account.
|
|
7910
|
+
*/
|
|
7911
|
+
subaccountKey?: string | null;
|
|
7912
|
+
/**
|
|
7913
|
+
* @description The margin account's state. Values: ACTIVE, CLOSED (a closed
|
|
7914
|
+
* sub-account).
|
|
7915
|
+
*/
|
|
7916
|
+
marginAccountState?: string | null;
|
|
7555
7917
|
};
|
|
7556
7918
|
MatchResult: {
|
|
7557
7919
|
/**
|
|
@@ -7872,6 +8234,17 @@ export interface components {
|
|
|
7872
8234
|
*/
|
|
7873
8235
|
positions?: string | null;
|
|
7874
8236
|
};
|
|
8237
|
+
/** @description One of the caller's open margin accounts in the owner rollup. */
|
|
8238
|
+
PortfolioMarginAccount: {
|
|
8239
|
+
marginAccountId?: string | null;
|
|
8240
|
+
/** @description `default` for the default margin account, else the sub-account's key. */
|
|
8241
|
+
subaccountKey?: string | null;
|
|
8242
|
+
/**
|
|
8243
|
+
* @description The account's totals. `withdrawable_collateral` here is the persisted
|
|
8244
|
+
* reconstruction of the engine's bound.
|
|
8245
|
+
*/
|
|
8246
|
+
total?: components["schemas"]["PortfolioMarginTotal"] | null;
|
|
8247
|
+
};
|
|
7875
8248
|
PortfolioMarginPositionCounts: {
|
|
7876
8249
|
total?: string | null;
|
|
7877
8250
|
cross?: string | null;
|
|
@@ -7889,21 +8262,19 @@ export interface components {
|
|
|
7889
8262
|
* the bound the engine enforces on transfers-out and withdrawals, and
|
|
7890
8263
|
* therefore also the effective ceiling on funding new isolated or
|
|
7891
8264
|
* first-use order capacity, because allocating collateral to a risk
|
|
7892
|
-
* bucket passes through the same
|
|
8265
|
+
* bucket passes through the same capacity-gated door.
|
|
7893
8266
|
*
|
|
7894
8267
|
* NOT a clamped `parent_available_collateral`. That field is
|
|
7895
|
-
* `free_collateral`, an equity figure: it credits
|
|
7896
|
-
*
|
|
7897
|
-
* move, so the two can differ without limit. This bound never credits an
|
|
7898
|
-
* unrealized gain.
|
|
7899
|
-
*
|
|
7900
|
-
* `min(
|
|
7901
|
-
* free_collateral - max(unrealized_pnl, 0))`, floored at zero.
|
|
7902
|
-
* the engine's
|
|
7903
|
-
*
|
|
7904
|
-
*
|
|
7905
|
-
* truncation: this surface truncates toward zero at the quote asset's
|
|
7906
|
-
* precision, while the margin-accounts surface may carry sub-tick tails.
|
|
8268
|
+
* `free_collateral`, an equity figure: it credits mark-to-market gains
|
|
8269
|
+
* and realized PnL still held in open risk buckets, which a transfer-out
|
|
8270
|
+
* of the parent cannot move, so the two can differ without limit. This bound never credits an
|
|
8271
|
+
* unrealized gain. It counts net deposits plus the account's settled
|
|
8272
|
+
* realized PnL and funding, less what risk buckets have allocated:
|
|
8273
|
+
* `min(net deposits + settled realized PnL - bucket allocations,
|
|
8274
|
+
* free_collateral - max(unrealized_pnl, 0))`, floored at zero. This is the
|
|
8275
|
+
* bound the engine's gates actually enforce. The same figure as
|
|
8276
|
+
* `MarginAccountSummary.withdrawable_collateral`: both surfaces truncate it
|
|
8277
|
+
* toward zero at the quote asset's precision.
|
|
7907
8278
|
*
|
|
7908
8279
|
* Size transfers-out, withdrawals, and new isolated/first-use positions
|
|
7909
8280
|
* from this field; `parent_available_collateral` remains the trading-margin
|
|
@@ -7954,17 +8325,16 @@ export interface components {
|
|
|
7954
8325
|
* accept — the bound enforced on bucket collateral withdrawals.
|
|
7955
8326
|
*
|
|
7956
8327
|
* NOT a clamped `free_collateral`: free collateral is equity headroom and
|
|
7957
|
-
* credits
|
|
7958
|
-
*
|
|
7959
|
-
*
|
|
7960
|
-
*
|
|
8328
|
+
* credits mark-to-market gains that a transfer-out cannot move. This bound
|
|
8329
|
+
* is the bucket's allocated collateral plus its realized PnL, less funding
|
|
8330
|
+
* paid, unrealized losses and the margin its positions and resting orders
|
|
8331
|
+
* require. Realized profit can leave a live bucket this way (the bucket's
|
|
8332
|
+
* allocation may go negative); an unrealized gain never raises it.
|
|
7961
8333
|
*
|
|
7962
|
-
* This is the largest accepted transfer-out,
|
|
7963
|
-
*
|
|
7964
|
-
*
|
|
7965
|
-
* risk-bucket rows' `MarginAccountSummary.withdrawable_collateral
|
|
7966
|
-
* quote-decimal truncation (this surface truncates toward zero; that one
|
|
7967
|
-
* may carry sub-tick tails).
|
|
8334
|
+
* This is the largest accepted transfer-out, and every smaller amount is
|
|
8335
|
+
* accepted too. It is zero on a risk bucket that is not `NORMAL` and on one
|
|
8336
|
+
* whose realized loss has used up its allocation. The same figure as the
|
|
8337
|
+
* risk-bucket rows' `MarginAccountSummary.withdrawable_collateral`.
|
|
7968
8338
|
*/
|
|
7969
8339
|
withdrawableCollateral?: string | null;
|
|
7970
8340
|
/**
|
|
@@ -8211,10 +8581,38 @@ export interface components {
|
|
|
8211
8581
|
cumFees?: string | null;
|
|
8212
8582
|
/**
|
|
8213
8583
|
* Format: int64
|
|
8214
|
-
* @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
|
|
8584
|
+
* @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, non-zero funding settlements, terminal closes/liquidations/ADL, direct isolated-position margin adds/reductions, and copy-position margin adds; each uses captured post-command state, and terminal frames retain the stored size and exact CLOSED/LIQUIDATED classification. After restart, a terminal frame rebuilt from legacy reduction history omits the version when that history lacks the margin fields needed to reconstruct complete lifetime allocated margin. 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. Wallet IN/OUT and plain isolated allocation send no position frame. Transfer and funding 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.
|
|
8215
8585
|
* @example 918342
|
|
8216
8586
|
*/
|
|
8217
8587
|
version?: number | null;
|
|
8588
|
+
/**
|
|
8589
|
+
* @description RFC 3339 instant at which this position OPENED: the fill that took its
|
|
8590
|
+
* exposure from zero to non-zero. Time held is now minus opened_at for an
|
|
8591
|
+
* OPEN position, and updated_at minus opened_at for a terminal one. It never
|
|
8592
|
+
* changes for the life of the position id; a flip closes the position and
|
|
8593
|
+
* opens a new one, with a new id and its own opened_at.
|
|
8594
|
+
*
|
|
8595
|
+
* Served from the matching engine's record of the opening fill while the
|
|
8596
|
+
* engine holds the position, and from the persisted row otherwise. The row
|
|
8597
|
+
* is written from the same fill's durable stamp, which comes from the
|
|
8598
|
+
* sequencer's non-decreasing stamp clock rather than the engine's wall
|
|
8599
|
+
* clock. The two readings normally agree to within one sequencer step, but
|
|
8600
|
+
* while the stamp clock is held ahead of a lagging host clock they differ by
|
|
8601
|
+
* that lead (`matching_engine_stamp_clock_live_lead_ms`), so a position's
|
|
8602
|
+
* value can move by it when the engine restarts and re-reads the row. Clamp
|
|
8603
|
+
* a computed time held at zero.
|
|
8604
|
+
*
|
|
8605
|
+
* Absent when the opening instant is unknown, never filled with the read
|
|
8606
|
+
* instant. Positions opened before this field existed carry the persisted
|
|
8607
|
+
* row's value, which can trail the opening fill by the persistence lag
|
|
8608
|
+
* where the fill could not be recovered.
|
|
8609
|
+
*
|
|
8610
|
+
* Not versioned, and not guaranteed constant at a given `version`: a
|
|
8611
|
+
* one-off operator correction can move it earlier without advancing the
|
|
8612
|
+
* version. Take it from the newest payload rather than skipping it on an
|
|
8613
|
+
* equal version.
|
|
8614
|
+
*/
|
|
8615
|
+
openedAt?: string | null;
|
|
8218
8616
|
};
|
|
8219
8617
|
PositionHistoryEvent: {
|
|
8220
8618
|
id?: string | null;
|
|
@@ -8524,7 +8922,7 @@ export interface components {
|
|
|
8524
8922
|
source?: string | null;
|
|
8525
8923
|
/**
|
|
8526
8924
|
* Format: int32
|
|
8527
|
-
* @description Referral level the caller earns from this source at: 1 (direct), 2,
|
|
8925
|
+
* @description Referral level the caller earns from this source at: 1 (direct), 2, and so on (at most 10). Rows at a level deeper than PitPass rewards today are earlier earnings, kept as history.
|
|
8528
8926
|
* @example 1
|
|
8529
8927
|
*/
|
|
8530
8928
|
level?: number | null;
|
|
@@ -8557,6 +8955,10 @@ export interface components {
|
|
|
8557
8955
|
* ever pays in more than one reward token, atomic units across tokens are not
|
|
8558
8956
|
* additive, so read the per-token `earnings_by_source` rows for a correct
|
|
8559
8957
|
* breakdown.
|
|
8958
|
+
*
|
|
8959
|
+
* `by_level` covers every level with earnings. `level1_earned`,
|
|
8960
|
+
* `level2_earned` and `level3_earned` are deprecated: they carry levels 1 to 3
|
|
8961
|
+
* for older clients and say nothing about deeper levels.
|
|
8560
8962
|
*/
|
|
8561
8963
|
ReferralEarningsSummary: {
|
|
8562
8964
|
/**
|
|
@@ -8565,20 +8967,25 @@ export interface components {
|
|
|
8565
8967
|
*/
|
|
8566
8968
|
totalEarned?: string | null;
|
|
8567
8969
|
/**
|
|
8568
|
-
* @
|
|
8970
|
+
* @deprecated
|
|
8971
|
+
* @description DEPRECATED: use `byLevel`. Total earned from direct (L1) referees, in RAW atomic units.
|
|
8569
8972
|
* @example 900000
|
|
8570
8973
|
*/
|
|
8571
8974
|
level1Earned?: string | null;
|
|
8572
8975
|
/**
|
|
8573
|
-
* @
|
|
8976
|
+
* @deprecated
|
|
8977
|
+
* @description DEPRECATED: use `byLevel`. Total earned from L2 downline, in RAW atomic units.
|
|
8574
8978
|
* @example 400000
|
|
8575
8979
|
*/
|
|
8576
8980
|
level2Earned?: string | null;
|
|
8577
8981
|
/**
|
|
8578
|
-
* @
|
|
8982
|
+
* @deprecated
|
|
8983
|
+
* @description DEPRECATED: use `byLevel`. Total earned from L3 downline, in RAW atomic units.
|
|
8579
8984
|
* @example 100000
|
|
8580
8985
|
*/
|
|
8581
8986
|
level3Earned?: string | null;
|
|
8987
|
+
/** @description All-time credited earnings per referral level, ascending by level, one entry per level the caller has earned at (levels with nothing earned are omitted). Covers every level, including levels deeper than PitPass rewards today. */
|
|
8988
|
+
byLevel?: components["schemas"]["LevelEarnings"][] | null;
|
|
8582
8989
|
};
|
|
8583
8990
|
/** @description A single reward the caller has earned, one row per referred trade × level. */
|
|
8584
8991
|
ReferralRewardEntry: {
|
|
@@ -8589,7 +8996,7 @@ export interface components {
|
|
|
8589
8996
|
source?: string | null;
|
|
8590
8997
|
/**
|
|
8591
8998
|
* Format: int32
|
|
8592
|
-
* @description Referral level this reward was paid at: 1
|
|
8999
|
+
* @description Referral level this reward was paid at: 1 for the direct referrer, 2 for the referrer's referrer, and so on (at most 10).
|
|
8593
9000
|
* @example 1
|
|
8594
9001
|
*/
|
|
8595
9002
|
level?: number | null;
|
|
@@ -8619,6 +9026,50 @@ export interface components {
|
|
|
8619
9026
|
*/
|
|
8620
9027
|
sourceDisplay?: string | null;
|
|
8621
9028
|
};
|
|
9029
|
+
/** @description One wallet in the caller's referral tree. */
|
|
9030
|
+
ReferralTreeNode: {
|
|
9031
|
+
/**
|
|
9032
|
+
* @description Public wallet address of this referee. Never an internal id.
|
|
9033
|
+
* @example 0x0000000000000000000000000000000000000004
|
|
9034
|
+
*/
|
|
9035
|
+
wallet?: string | null;
|
|
9036
|
+
/** @description Human-facing name for this referee: their custom TraderCode handle when they have claimed one, otherwise the wallet address (same as `wallet`). Render this instead of raw hex. */
|
|
9037
|
+
display?: string | null;
|
|
9038
|
+
/**
|
|
9039
|
+
* Format: int32
|
|
9040
|
+
* @description Depth below the caller: 1 (the caller referred this wallet), 2, and so on up to the configured reward depth (at most 10).
|
|
9041
|
+
*/
|
|
9042
|
+
level?: number | null;
|
|
9043
|
+
/** @description Wallet address of the referrer of this node — the caller for a level-1 node. */
|
|
9044
|
+
parent?: string | null;
|
|
9045
|
+
/**
|
|
9046
|
+
* Format: date-time
|
|
9047
|
+
* @description RFC 3339 time this wallet signed up under its parent.
|
|
9048
|
+
*/
|
|
9049
|
+
referredAt?: string | null;
|
|
9050
|
+
/**
|
|
9051
|
+
* Format: uint32
|
|
9052
|
+
* @description How many wallets this node has referred. Expand the node (request it as `parent`) when this is above 0. Always 0 at the deepest rewarded level, the deepest level shown.
|
|
9053
|
+
*/
|
|
9054
|
+
refereeCount?: number | null;
|
|
9055
|
+
/** @description What the caller has earned from this wallet's own trades, across every token, in RAW atomic units. `0` for a wallet that has not traded yet. */
|
|
9056
|
+
totalEarned?: string | null;
|
|
9057
|
+
};
|
|
9058
|
+
/** @description One ancestor in the caller's referral chain. */
|
|
9059
|
+
ReferralUplineEntry: {
|
|
9060
|
+
/**
|
|
9061
|
+
* @description Public wallet address of the ancestor. Never an internal id.
|
|
9062
|
+
* @example 0x0000000000000000000000000000000000000002
|
|
9063
|
+
*/
|
|
9064
|
+
wallet?: string | null;
|
|
9065
|
+
/** @description Human-facing name for the ancestor: their custom TraderCode handle when they have claimed one, otherwise the wallet address (same as `wallet`). Render this instead of raw hex. */
|
|
9066
|
+
display?: string | null;
|
|
9067
|
+
/**
|
|
9068
|
+
* Format: int32
|
|
9069
|
+
* @description How far above the caller this ancestor is: 1 (the caller's direct referrer), 2, and so on up to the configured reward depth (at most 10).
|
|
9070
|
+
*/
|
|
9071
|
+
level?: number | null;
|
|
9072
|
+
};
|
|
8622
9073
|
RefreshManagedMarketQuotesRequest: {
|
|
8623
9074
|
launchId?: string | null;
|
|
8624
9075
|
ownerId?: string | null;
|
|
@@ -9278,6 +9729,12 @@ export interface components {
|
|
|
9278
9729
|
* @description MARKET only: client slippage tolerance in basis points, 0..1000, the same rule placement enforces — a LIMIT or IOC preview carrying it is rejected. Tightens the previewed walk to the band the real order will run under and never widens it; omit for the placement default.
|
|
9279
9730
|
*/
|
|
9280
9731
|
slippageToleranceBps?: number | null;
|
|
9732
|
+
/**
|
|
9733
|
+
* @description The margin account the preview runs against: the default margin account
|
|
9734
|
+
* (the default) or any of the caller's open sub-accounts, previewing that
|
|
9735
|
+
* account's own risk buckets.
|
|
9736
|
+
*/
|
|
9737
|
+
marginAccountId?: string | null;
|
|
9281
9738
|
};
|
|
9282
9739
|
StopFollowResponse: {
|
|
9283
9740
|
/**
|
|
@@ -9676,6 +10133,11 @@ export interface components {
|
|
|
9676
10133
|
* @example USDC
|
|
9677
10134
|
*/
|
|
9678
10135
|
quoteAssetName?: string | null;
|
|
10136
|
+
/**
|
|
10137
|
+
* @description Isolated-only market: cross margin may only reduce a position here. An order from a CROSS risk bucket that is not reduce-only is rejected with the error code CROSS_MARGIN_NOT_ALLOWED; open the position with margin_mode ISOLATED instead
|
|
10138
|
+
* @example false
|
|
10139
|
+
*/
|
|
10140
|
+
isolatedOnly?: boolean | null;
|
|
9679
10141
|
};
|
|
9680
10142
|
/**
|
|
9681
10143
|
* @description Trailing stop leg (0XM-2827). Reduce-only MARKET close whose trigger trails
|
|
@@ -9744,7 +10206,8 @@ export interface components {
|
|
|
9744
10206
|
/**
|
|
9745
10207
|
* @description The largest amount a further transfer-out will accept after this one.
|
|
9746
10208
|
* See `MarginAccountSummary.withdrawable_collateral`: this is an
|
|
9747
|
-
* allocation-bounded figure, not clamped equity headroom.
|
|
10209
|
+
* allocation-bounded figure, not clamped equity headroom. Truncated toward
|
|
10210
|
+
* zero at the collateral asset's precision.
|
|
9748
10211
|
*/
|
|
9749
10212
|
newWithdrawableCollateral?: string | null;
|
|
9750
10213
|
strategyKey?: string | null;
|
|
@@ -9753,6 +10216,30 @@ export interface components {
|
|
|
9753
10216
|
asset?: string | null;
|
|
9754
10217
|
amount?: string | null;
|
|
9755
10218
|
};
|
|
10219
|
+
TransferCollateralFromSubAccountRequest: {
|
|
10220
|
+
/** @description The caller's sub-account the collateral leaves. */
|
|
10221
|
+
marginAccountId?: string | null;
|
|
10222
|
+
amount?: string | null;
|
|
10223
|
+
};
|
|
10224
|
+
TransferCollateralRequest: {
|
|
10225
|
+
/** @description Collateral asset symbol or address. */
|
|
10226
|
+
asset?: string | null;
|
|
10227
|
+
amount?: string | null;
|
|
10228
|
+
/** @description Where the collateral comes from. */
|
|
10229
|
+
from?: components["schemas"]["CollateralTransferEndpoint"] | null;
|
|
10230
|
+
/** @description Where the collateral goes. */
|
|
10231
|
+
to?: components["schemas"]["CollateralTransferEndpoint"] | null;
|
|
10232
|
+
};
|
|
10233
|
+
TransferCollateralResponse: {
|
|
10234
|
+
movementId?: string | null;
|
|
10235
|
+
amount?: string | null;
|
|
10236
|
+
/** @description The source margin account, when the source is one. */
|
|
10237
|
+
fromMarginAccountId?: string | null;
|
|
10238
|
+
/** @description The destination margin account, when the destination is one. */
|
|
10239
|
+
toMarginAccountId?: string | null;
|
|
10240
|
+
/** @description The destination risk bucket, when the destination is one. */
|
|
10241
|
+
toRiskBucketId?: string | null;
|
|
10242
|
+
};
|
|
9756
10243
|
TransferCollateralToMarginAccountRequest: {
|
|
9757
10244
|
/** @description Parent margin account UUID that receives collateral. */
|
|
9758
10245
|
marginAccountId?: string | null;
|
|
@@ -9779,7 +10266,8 @@ export interface components {
|
|
|
9779
10266
|
/**
|
|
9780
10267
|
* @description The largest amount a further transfer-out will accept after this one.
|
|
9781
10268
|
* See `MarginAccountSummary.withdrawable_collateral`: this is an
|
|
9782
|
-
* allocation-bounded figure, not clamped equity headroom.
|
|
10269
|
+
* allocation-bounded figure, not clamped equity headroom. Truncated toward
|
|
10270
|
+
* zero at the collateral asset's precision.
|
|
9783
10271
|
*/
|
|
9784
10272
|
newWithdrawableCollateral?: string | null;
|
|
9785
10273
|
strategyKey?: string | null;
|
|
@@ -9857,6 +10345,18 @@ export interface components {
|
|
|
9857
10345
|
* row is stale (close/reopen race).
|
|
9858
10346
|
*/
|
|
9859
10347
|
applyToPositionMargin?: boolean | null;
|
|
10348
|
+
/**
|
|
10349
|
+
* @description The margin account whose risk bucket is funded: the default margin
|
|
10350
|
+
* account (the default) or any of the caller's open sub-accounts, which
|
|
10351
|
+
* fund their own risk buckets from their own collateral. A copy-trading
|
|
10352
|
+
* sub-account's buckets belong to its follow and are refused.
|
|
10353
|
+
*/
|
|
10354
|
+
marginAccountId?: string | null;
|
|
10355
|
+
};
|
|
10356
|
+
TransferCollateralToSubAccountRequest: {
|
|
10357
|
+
/** @description The caller's sub-account that receives the collateral. */
|
|
10358
|
+
marginAccountId?: string | null;
|
|
10359
|
+
amount?: string | null;
|
|
9860
10360
|
};
|
|
9861
10361
|
TransferRewardsRequest: {
|
|
9862
10362
|
/**
|
|
@@ -10147,21 +10647,21 @@ export interface components {
|
|
|
10147
10647
|
*/
|
|
10148
10648
|
name?: string | null;
|
|
10149
10649
|
/**
|
|
10150
|
-
* @description
|
|
10650
|
+
* @description Delegation expiry timestamp (ISO 8601). Ends delegated reads, trading, and session refresh. Omit for the default of 14 days from now; at most 180 days ahead.
|
|
10151
10651
|
* @example 2026-12-31T23:59:59Z
|
|
10152
10652
|
*/
|
|
10153
10653
|
expiresAt?: string | null;
|
|
10154
10654
|
/**
|
|
10155
|
-
* @description Required JSON array of actions the agent may perform: CREATE_ORDER, CANCEL_ORDER, REPLACE_ORDER.
|
|
10655
|
+
* @description Required JSON array of actions the agent may perform: CREATE_ORDER, CANCEL_ORDER, REPLACE_ORDER, READ, MANAGE_RISK_BUCKETS. Every delegated session may read the owner's data; a policy listing only READ, or no action, is a read-only key. MANAGE_RISK_BUCKETS lets the agent move a margin account's free collateral into that account's own risk buckets (POST /api/v1/margin/risk-buckets/collateral/transfer-in), only for an account listed in allowedMarginAccountIds and, if the policy lists markets, only into an isolated risk bucket on a listed market. No action lets an agent move collateral any other way. Any other value is rejected.
|
|
10156
10656
|
* @example [
|
|
10157
10657
|
* "CREATE_ORDER",
|
|
10158
10658
|
* "CANCEL_ORDER"
|
|
10159
10659
|
* ]
|
|
10160
10660
|
*/
|
|
10161
10661
|
allowedActions: string[];
|
|
10162
|
-
/** @description Required JSON array of trading pair UUIDs.
|
|
10662
|
+
/** @description Required JSON array of trading pair UUIDs. Each listed scope must match: with markets and margin accounts both listed, an order needs a listed market AND a listed account. Send [] for account-only scope; both scopes empty permit no orders. */
|
|
10163
10663
|
allowedTradingPairIds: string[];
|
|
10164
|
-
/** @description Optional JSON array of
|
|
10664
|
+
/** @description Optional JSON array of margin account UUIDs the agent is bound to. When listed, an order must be on one of these accounts (and on a listed market, if any are listed). Omitted, null, or [] leaves the account unrestricted; both scopes empty permit no orders. */
|
|
10165
10665
|
allowedMarginAccountIds?: string[] | null;
|
|
10166
10666
|
/**
|
|
10167
10667
|
* @description Optional JSON array of permitted order types (LIMIT, MARKET). Omitted, null, or [] means unrestricted order types.
|
|
@@ -10192,6 +10692,13 @@ export interface components {
|
|
|
10192
10692
|
* @description Unsupported legacy field. Requests that set maxOpenOrders are rejected; no concurrent open-order cap is enforced. Omit this field.
|
|
10193
10693
|
*/
|
|
10194
10694
|
maxOpenOrders?: number | null;
|
|
10695
|
+
/**
|
|
10696
|
+
* @description Optional JSON array of up to 20 IP addresses or CIDR ranges the agent may create its delegated session from. Omitted, null, or [] allows any address.
|
|
10697
|
+
* @example [
|
|
10698
|
+
* "203.0.113.0/24"
|
|
10699
|
+
* ]
|
|
10700
|
+
*/
|
|
10701
|
+
ipAllowlist?: string[] | null;
|
|
10195
10702
|
};
|
|
10196
10703
|
UpsertFollowRequest: {
|
|
10197
10704
|
/**
|
|
@@ -10414,10 +10921,26 @@ export interface operations {
|
|
|
10414
10921
|
get_user_balances: {
|
|
10415
10922
|
parameters: {
|
|
10416
10923
|
query?: {
|
|
10417
|
-
/** @description
|
|
10418
|
-
page?: number;
|
|
10419
|
-
/** @description Items per page (max 100) */
|
|
10924
|
+
/** @description Items per page (max 1000) */
|
|
10420
10925
|
pageSize?: number;
|
|
10926
|
+
/**
|
|
10927
|
+
* @description Pagination cursor with two states:
|
|
10928
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
10929
|
+
* position, from the lowest token address.
|
|
10930
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
10931
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
10932
|
+
*
|
|
10933
|
+
* This listing has no database page to walk: it reads every balance row,
|
|
10934
|
+
* overlays the matching engine's authoritative amounts (which can add rows
|
|
10935
|
+
* the projection has not written yet and drop rows the engine has zeroed),
|
|
10936
|
+
* and pages that in-memory set. The walk therefore seeks by KEY on
|
|
10937
|
+
* `(token, asset_id)` — immutable, present on every row including a
|
|
10938
|
+
* live-only one — rather than by index, so a balance that appears or
|
|
10939
|
+
* vanishes mid-walk no longer shifts the rows behind it across the resume
|
|
10940
|
+
* point and duplicate or skipped rows. `total` and `totalPages` are exact:
|
|
10941
|
+
* the set is bounded by the asset universe, so there is nothing to cap.
|
|
10942
|
+
*/
|
|
10943
|
+
pageToken?: string;
|
|
10421
10944
|
};
|
|
10422
10945
|
header?: never;
|
|
10423
10946
|
path?: never;
|
|
@@ -10529,10 +11052,28 @@ export interface operations {
|
|
|
10529
11052
|
tradingPairId?: string;
|
|
10530
11053
|
positionId?: string;
|
|
10531
11054
|
marginAccountId?: string;
|
|
10532
|
-
/** @description
|
|
10533
|
-
page?: number;
|
|
10534
|
-
/** @description Items per page (max 100) */
|
|
11055
|
+
/** @description Items per page (max 1000) */
|
|
10535
11056
|
pageSize?: number;
|
|
11057
|
+
/**
|
|
11058
|
+
* @description Pagination cursor with two states:
|
|
11059
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
11060
|
+
* position, from the newest payment.
|
|
11061
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
11062
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
11063
|
+
*
|
|
11064
|
+
* The walk seeks on `(created_at, id)` descending. Not `period_end`, which
|
|
11065
|
+
* the removed page-number mode led its sort with: that column is nullable
|
|
11066
|
+
* and the risk engine leaves it unset when a payment carries no window,
|
|
11067
|
+
* while `created_at` is always stamped (it falls back to the settlement
|
|
11068
|
+
* instant). The `id` tie-break is new — the removed order had none, so a
|
|
11069
|
+
* page boundary inside one funding window could already repeat or drop a
|
|
11070
|
+
* payment.
|
|
11071
|
+
*
|
|
11072
|
+
* `total` and `totalPages` are populated — bounded by the server count
|
|
11073
|
+
* ceiling, see `totalCapped`. Filters must match the request that produced
|
|
11074
|
+
* the token, or the request is rejected 400.
|
|
11075
|
+
*/
|
|
11076
|
+
pageToken?: string;
|
|
10536
11077
|
};
|
|
10537
11078
|
header?: never;
|
|
10538
11079
|
path?: never;
|
|
@@ -10808,7 +11349,19 @@ export interface operations {
|
|
|
10808
11349
|
};
|
|
10809
11350
|
get_portfolio_margin: {
|
|
10810
11351
|
parameters: {
|
|
10811
|
-
query?:
|
|
11352
|
+
query?: {
|
|
11353
|
+
/**
|
|
11354
|
+
* @description One of the caller's margin accounts (the default one or a sub-account) to
|
|
11355
|
+
* describe instead of the default one: `total`, `positions` and
|
|
11356
|
+
* `risk_buckets` are then that account's own.
|
|
11357
|
+
*/
|
|
11358
|
+
marginAccountId?: string;
|
|
11359
|
+
/**
|
|
11360
|
+
* @description Also return `accounts`, one row per open margin account of the caller,
|
|
11361
|
+
* and `owner_total`, their sum: the owner rollup across sub-accounts.
|
|
11362
|
+
*/
|
|
11363
|
+
includeAccounts?: boolean;
|
|
11364
|
+
};
|
|
10812
11365
|
header?: never;
|
|
10813
11366
|
path?: never;
|
|
10814
11367
|
cookie?: never;
|
|
@@ -11028,9 +11581,7 @@ export interface operations {
|
|
|
11028
11581
|
get_user_movements: {
|
|
11029
11582
|
parameters: {
|
|
11030
11583
|
query?: {
|
|
11031
|
-
/** @description
|
|
11032
|
-
page?: number;
|
|
11033
|
-
/** @description Items per page (max 100) */
|
|
11584
|
+
/** @description Items per page (max 1000) */
|
|
11034
11585
|
pageSize?: number;
|
|
11035
11586
|
/** @description Transaction type */
|
|
11036
11587
|
transactionType?: "DEPOSIT" | "WITHDRAWAL" | "TRADE" | "FEE" | "FUNDING" | "LIQUIDATION" | "INTEREST" | "REWARD" | "CHAIN_SYNC";
|
|
@@ -11040,6 +11591,19 @@ export interface operations {
|
|
|
11040
11591
|
assetId?: string;
|
|
11041
11592
|
/** @description Sort direction for createdAt */
|
|
11042
11593
|
orderBy?: "ASC" | "DESC";
|
|
11594
|
+
/**
|
|
11595
|
+
* @description Pagination cursor with two states:
|
|
11596
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
11597
|
+
* position, from the newest row (or the oldest, when `orderBy` is ASC).
|
|
11598
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
11599
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
11600
|
+
*
|
|
11601
|
+
* Every walk covers the ledger and funding arms merged. `total` and
|
|
11602
|
+
* `totalPages` are populated — bounded by the server count ceiling, see
|
|
11603
|
+
* `totalCapped`. Filters and `orderBy` must match the request that produced
|
|
11604
|
+
* the token, or the request is rejected 400.
|
|
11605
|
+
*/
|
|
11606
|
+
pageToken?: string;
|
|
11043
11607
|
};
|
|
11044
11608
|
header?: never;
|
|
11045
11609
|
path?: never;
|
|
@@ -11170,6 +11734,13 @@ export interface operations {
|
|
|
11170
11734
|
};
|
|
11171
11735
|
content?: never;
|
|
11172
11736
|
};
|
|
11737
|
+
/** @description Settings write rate limit exceeded — the lead trader profile, follow create/edit and self-trade-prevention default share a per-account budget (and the budget the account family shares); retry after the interval in details.retryAfter */
|
|
11738
|
+
429: {
|
|
11739
|
+
headers: {
|
|
11740
|
+
[name: string]: unknown;
|
|
11741
|
+
};
|
|
11742
|
+
content?: never;
|
|
11743
|
+
};
|
|
11173
11744
|
/** @description Internal server error */
|
|
11174
11745
|
500: {
|
|
11175
11746
|
headers: {
|
|
@@ -11499,7 +12070,7 @@ export interface operations {
|
|
|
11499
12070
|
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
11500
12071
|
* position, from the newest row.
|
|
11501
12072
|
* - Non-empty: an opaque cursor from a previous response's
|
|
11502
|
-
* `
|
|
12073
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
11503
12074
|
*
|
|
11504
12075
|
* Every walk covers full trade history — hot and archived rows merged. The
|
|
11505
12076
|
* response carries no item count: this listing's table is too large to count
|
|
@@ -11554,15 +12125,34 @@ export interface operations {
|
|
|
11554
12125
|
};
|
|
11555
12126
|
list_application_balances: {
|
|
11556
12127
|
parameters: {
|
|
11557
|
-
query
|
|
11558
|
-
/** @description
|
|
11559
|
-
page?: number;
|
|
11560
|
-
/** @description Items per page (max 100) */
|
|
12128
|
+
query: {
|
|
12129
|
+
/** @description Items per page (max 1000) */
|
|
11561
12130
|
pageSize?: number;
|
|
11562
12131
|
/** @description User identifier (UUID) */
|
|
11563
12132
|
userId?: string;
|
|
11564
12133
|
/** @description Asset identifier (UUID) */
|
|
11565
12134
|
assetId?: string;
|
|
12135
|
+
/**
|
|
12136
|
+
* @description Pagination cursor with two states:
|
|
12137
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
12138
|
+
* position.
|
|
12139
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
12140
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
12141
|
+
*
|
|
12142
|
+
* Ordered by balance id ascending. NOT by `updated_at`, which the removed
|
|
12143
|
+
* offset mode sorted on: that column changes on every balance movement, so
|
|
12144
|
+
* a walk over it could repeat or skip rows with no concurrent insert at
|
|
12145
|
+
* all.
|
|
12146
|
+
*
|
|
12147
|
+
* `total` and `totalPages` are populated — bounded by the server count
|
|
12148
|
+
* ceiling, see `totalCapped`.
|
|
12149
|
+
*
|
|
12150
|
+
* Filters must match the request that produced the token, or the request
|
|
12151
|
+
* is rejected 400.
|
|
12152
|
+
*/
|
|
12153
|
+
pageToken?: string;
|
|
12154
|
+
/** @description Application client ID */
|
|
12155
|
+
clientId: string;
|
|
11566
12156
|
};
|
|
11567
12157
|
header?: never;
|
|
11568
12158
|
path?: never;
|
|
@@ -11579,15 +12169,22 @@ export interface operations {
|
|
|
11579
12169
|
"application/json": components["schemas"]["ListAppBalancesResponse"];
|
|
11580
12170
|
};
|
|
11581
12171
|
};
|
|
11582
|
-
/** @description Bad request */
|
|
12172
|
+
/** @description Bad request (missing client_id, invalid filter or page token) */
|
|
11583
12173
|
400: {
|
|
11584
12174
|
headers: {
|
|
11585
12175
|
[name: string]: unknown;
|
|
11586
12176
|
};
|
|
11587
12177
|
content?: never;
|
|
11588
12178
|
};
|
|
11589
|
-
/** @description
|
|
11590
|
-
|
|
12179
|
+
/** @description No active application has this client_id */
|
|
12180
|
+
404: {
|
|
12181
|
+
headers: {
|
|
12182
|
+
[name: string]: unknown;
|
|
12183
|
+
};
|
|
12184
|
+
content?: never;
|
|
12185
|
+
};
|
|
12186
|
+
/** @description Public read rate limit exceeded for this client IP; retry after the interval in details.retryAfter */
|
|
12187
|
+
429: {
|
|
11591
12188
|
headers: {
|
|
11592
12189
|
[name: string]: unknown;
|
|
11593
12190
|
};
|
|
@@ -11659,10 +12256,8 @@ export interface operations {
|
|
|
11659
12256
|
};
|
|
11660
12257
|
list_application_movements: {
|
|
11661
12258
|
parameters: {
|
|
11662
|
-
query
|
|
11663
|
-
/** @description
|
|
11664
|
-
page?: number;
|
|
11665
|
-
/** @description Items per page (max 100) */
|
|
12259
|
+
query: {
|
|
12260
|
+
/** @description Items per page (max 1000) */
|
|
11666
12261
|
pageSize?: number;
|
|
11667
12262
|
/** @description User identifier (UUID) */
|
|
11668
12263
|
userId?: string;
|
|
@@ -11672,6 +12267,23 @@ export interface operations {
|
|
|
11672
12267
|
entryType?: "CREDIT" | "DEBIT" | "LOCK" | "UNLOCK" | "FEE";
|
|
11673
12268
|
/** @description Asset identifier (UUID) */
|
|
11674
12269
|
assetId?: string;
|
|
12270
|
+
/**
|
|
12271
|
+
* @description Pagination cursor with two states:
|
|
12272
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
12273
|
+
* position, from the newest movement.
|
|
12274
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
12275
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
12276
|
+
*
|
|
12277
|
+
* The response carries no item count: `user_ledger` is too large to count
|
|
12278
|
+
* behind a filter. A movement with no recorded timestamp is not listed —
|
|
12279
|
+
* the column is nullable, and a NULL has no position in the sort key.
|
|
12280
|
+
*
|
|
12281
|
+
* Filters must match the request that produced the token, or the request
|
|
12282
|
+
* is rejected 400.
|
|
12283
|
+
*/
|
|
12284
|
+
pageToken?: string;
|
|
12285
|
+
/** @description Application client ID */
|
|
12286
|
+
clientId: string;
|
|
11675
12287
|
};
|
|
11676
12288
|
header?: never;
|
|
11677
12289
|
path?: never;
|
|
@@ -11688,15 +12300,22 @@ export interface operations {
|
|
|
11688
12300
|
"application/json": components["schemas"]["ListAppMovementsResponse"];
|
|
11689
12301
|
};
|
|
11690
12302
|
};
|
|
11691
|
-
/** @description Bad request */
|
|
12303
|
+
/** @description Bad request (missing client_id, invalid filter or page token) */
|
|
11692
12304
|
400: {
|
|
11693
12305
|
headers: {
|
|
11694
12306
|
[name: string]: unknown;
|
|
11695
12307
|
};
|
|
11696
12308
|
content?: never;
|
|
11697
12309
|
};
|
|
11698
|
-
/** @description
|
|
11699
|
-
|
|
12310
|
+
/** @description No active application has this client_id */
|
|
12311
|
+
404: {
|
|
12312
|
+
headers: {
|
|
12313
|
+
[name: string]: unknown;
|
|
12314
|
+
};
|
|
12315
|
+
content?: never;
|
|
12316
|
+
};
|
|
12317
|
+
/** @description Public read rate limit exceeded for this client IP; retry after the interval in details.retryAfter */
|
|
12318
|
+
429: {
|
|
11700
12319
|
headers: {
|
|
11701
12320
|
[name: string]: unknown;
|
|
11702
12321
|
};
|
|
@@ -11713,10 +12332,8 @@ export interface operations {
|
|
|
11713
12332
|
};
|
|
11714
12333
|
list_application_orders: {
|
|
11715
12334
|
parameters: {
|
|
11716
|
-
query
|
|
11717
|
-
/** @description
|
|
11718
|
-
page?: number;
|
|
11719
|
-
/** @description Items per page (max 100) */
|
|
12335
|
+
query: {
|
|
12336
|
+
/** @description Items per page (max 1000) */
|
|
11720
12337
|
pageSize?: number;
|
|
11721
12338
|
/** @description Order status (single value or comma-separated list) */
|
|
11722
12339
|
status?: string;
|
|
@@ -11728,6 +12345,23 @@ export interface operations {
|
|
|
11728
12345
|
side?: "BUY" | "SELL";
|
|
11729
12346
|
/** @description Order type */
|
|
11730
12347
|
orderType?: "LIMIT" | "MARKET" | "STOP_LOSS" | "TAKE_PROFIT" | "STOP_LIMIT" | "TRAILING_STOP";
|
|
12348
|
+
/**
|
|
12349
|
+
* @description Pagination cursor with two states:
|
|
12350
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
12351
|
+
* position.
|
|
12352
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
12353
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
12354
|
+
*
|
|
12355
|
+
* Every walk covers full order history — hot and archived rows merged.
|
|
12356
|
+
* The response carries no item count: `orders_all` is too large to count
|
|
12357
|
+
* behind a filter.
|
|
12358
|
+
*
|
|
12359
|
+
* Filters must match the request that produced the token, or the request
|
|
12360
|
+
* is rejected 400.
|
|
12361
|
+
*/
|
|
12362
|
+
pageToken?: string;
|
|
12363
|
+
/** @description Application client ID */
|
|
12364
|
+
clientId: string;
|
|
11731
12365
|
};
|
|
11732
12366
|
header?: never;
|
|
11733
12367
|
path?: never;
|
|
@@ -11744,15 +12378,22 @@ export interface operations {
|
|
|
11744
12378
|
"application/json": components["schemas"]["ListAppOrdersResponse"];
|
|
11745
12379
|
};
|
|
11746
12380
|
};
|
|
11747
|
-
/** @description Bad request */
|
|
12381
|
+
/** @description Bad request (missing client_id, invalid filter or page token) */
|
|
11748
12382
|
400: {
|
|
11749
12383
|
headers: {
|
|
11750
12384
|
[name: string]: unknown;
|
|
11751
12385
|
};
|
|
11752
12386
|
content?: never;
|
|
11753
12387
|
};
|
|
11754
|
-
/** @description
|
|
11755
|
-
|
|
12388
|
+
/** @description No active application has this client_id */
|
|
12389
|
+
404: {
|
|
12390
|
+
headers: {
|
|
12391
|
+
[name: string]: unknown;
|
|
12392
|
+
};
|
|
12393
|
+
content?: never;
|
|
12394
|
+
};
|
|
12395
|
+
/** @description Public read rate limit exceeded for this client IP; retry after the interval in details.retryAfter */
|
|
12396
|
+
429: {
|
|
11756
12397
|
headers: {
|
|
11757
12398
|
[name: string]: unknown;
|
|
11758
12399
|
};
|
|
@@ -11769,8 +12410,10 @@ export interface operations {
|
|
|
11769
12410
|
};
|
|
11770
12411
|
get_application_stats: {
|
|
11771
12412
|
parameters: {
|
|
11772
|
-
query
|
|
12413
|
+
query: {
|
|
11773
12414
|
since?: string;
|
|
12415
|
+
/** @description Application client ID */
|
|
12416
|
+
clientId: string;
|
|
11774
12417
|
};
|
|
11775
12418
|
header?: never;
|
|
11776
12419
|
path?: never;
|
|
@@ -11787,15 +12430,22 @@ export interface operations {
|
|
|
11787
12430
|
"application/json": components["schemas"]["GetAppStatsResponse"];
|
|
11788
12431
|
};
|
|
11789
12432
|
};
|
|
11790
|
-
/** @description Bad request */
|
|
12433
|
+
/** @description Bad request (missing client_id, invalid filter or page token) */
|
|
11791
12434
|
400: {
|
|
11792
12435
|
headers: {
|
|
11793
12436
|
[name: string]: unknown;
|
|
11794
12437
|
};
|
|
11795
12438
|
content?: never;
|
|
11796
12439
|
};
|
|
11797
|
-
/** @description
|
|
11798
|
-
|
|
12440
|
+
/** @description No active application has this client_id */
|
|
12441
|
+
404: {
|
|
12442
|
+
headers: {
|
|
12443
|
+
[name: string]: unknown;
|
|
12444
|
+
};
|
|
12445
|
+
content?: never;
|
|
12446
|
+
};
|
|
12447
|
+
/** @description Public read rate limit exceeded for this client IP; retry after the interval in details.retryAfter */
|
|
12448
|
+
429: {
|
|
11799
12449
|
headers: {
|
|
11800
12450
|
[name: string]: unknown;
|
|
11801
12451
|
};
|
|
@@ -11813,15 +12463,34 @@ export interface operations {
|
|
|
11813
12463
|
list_application_users: {
|
|
11814
12464
|
parameters: {
|
|
11815
12465
|
query: {
|
|
11816
|
-
/** @description
|
|
11817
|
-
page?: number;
|
|
11818
|
-
/** @description Items per page (max 100) */
|
|
12466
|
+
/** @description Items per page (max 1000) */
|
|
11819
12467
|
pageSize?: number;
|
|
11820
12468
|
isActive?: boolean;
|
|
11821
12469
|
/** @description Account type filter */
|
|
11822
12470
|
accountType?: "master" | "sub";
|
|
11823
12471
|
/** @description Wallet address */
|
|
11824
12472
|
address: string;
|
|
12473
|
+
/**
|
|
12474
|
+
* @description Pagination cursor with two states:
|
|
12475
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
12476
|
+
* position.
|
|
12477
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
12478
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
12479
|
+
*
|
|
12480
|
+
* Ordered by user id ascending, NOT newest-first: `users.created_at` is
|
|
12481
|
+
* nullable, so it cannot be a total keyset key, and excluding the rows
|
|
12482
|
+
* without one would hide users from the listing an application
|
|
12483
|
+
* reconciles against.
|
|
12484
|
+
*
|
|
12485
|
+
* `total` and `totalPages` are populated — bounded by the server count
|
|
12486
|
+
* ceiling, see `totalCapped`.
|
|
12487
|
+
*
|
|
12488
|
+
* Filters must match the request that produced the token, or the request
|
|
12489
|
+
* is rejected 400.
|
|
12490
|
+
*/
|
|
12491
|
+
pageToken?: string;
|
|
12492
|
+
/** @description Application client ID */
|
|
12493
|
+
clientId: string;
|
|
11825
12494
|
};
|
|
11826
12495
|
header?: never;
|
|
11827
12496
|
path?: never;
|
|
@@ -11838,15 +12507,22 @@ export interface operations {
|
|
|
11838
12507
|
"application/json": components["schemas"]["ListAppUsersResponse"];
|
|
11839
12508
|
};
|
|
11840
12509
|
};
|
|
11841
|
-
/** @description Bad request */
|
|
12510
|
+
/** @description Bad request (missing client_id, invalid filter or page token) */
|
|
11842
12511
|
400: {
|
|
11843
12512
|
headers: {
|
|
11844
12513
|
[name: string]: unknown;
|
|
11845
12514
|
};
|
|
11846
12515
|
content?: never;
|
|
11847
12516
|
};
|
|
11848
|
-
/** @description
|
|
11849
|
-
|
|
12517
|
+
/** @description No active application has this client_id */
|
|
12518
|
+
404: {
|
|
12519
|
+
headers: {
|
|
12520
|
+
[name: string]: unknown;
|
|
12521
|
+
};
|
|
12522
|
+
content?: never;
|
|
12523
|
+
};
|
|
12524
|
+
/** @description Public read rate limit exceeded for this client IP; retry after the interval in details.retryAfter */
|
|
12525
|
+
429: {
|
|
11850
12526
|
headers: {
|
|
11851
12527
|
[name: string]: unknown;
|
|
11852
12528
|
};
|
|
@@ -12274,7 +12950,7 @@ export interface operations {
|
|
|
12274
12950
|
page?: number;
|
|
12275
12951
|
/** @description Items per page (max 100) */
|
|
12276
12952
|
pageSize?: number;
|
|
12277
|
-
/** @description Only return BuilderCodes payouts of this payout kind: REVENUE_SHARE (the frontend's share of Monaco's fee) or BUILDER_FEE (
|
|
12953
|
+
/** @description Only return BuilderCodes payouts of this payout kind: REVENUE_SHARE (the frontend's share of Monaco's fee) or BUILDER_FEE (ordinary builder fees charged to takers and credited to enrolled applications). Omit for every kind. */
|
|
12278
12954
|
kind?: "REVENUE_SHARE" | "BUILDER_FEE";
|
|
12279
12955
|
};
|
|
12280
12956
|
header?: never;
|
|
@@ -12468,6 +13144,13 @@ export interface operations {
|
|
|
12468
13144
|
};
|
|
12469
13145
|
content?: never;
|
|
12470
13146
|
};
|
|
13147
|
+
/** @description Movement rate limit exceeded — withdrawals, collateral transfers and reward transfers share a per-user budget; refused before the claim reaches the sequencer, so nothing committed; retry after the interval in details.retryAfter (gRPC: RESOURCE_EXHAUSTED) */
|
|
13148
|
+
429: {
|
|
13149
|
+
headers: {
|
|
13150
|
+
[name: string]: unknown;
|
|
13151
|
+
};
|
|
13152
|
+
content?: never;
|
|
13153
|
+
};
|
|
12471
13154
|
/** @description Internal server error */
|
|
12472
13155
|
500: {
|
|
12473
13156
|
headers: {
|
|
@@ -12597,6 +13280,13 @@ export interface operations {
|
|
|
12597
13280
|
};
|
|
12598
13281
|
content?: never;
|
|
12599
13282
|
};
|
|
13283
|
+
/** @description Settings write rate limit exceeded — the lead trader profile, follow create/edit and self-trade-prevention default share a per-account budget; retry after the interval in details.retryAfter */
|
|
13284
|
+
429: {
|
|
13285
|
+
headers: {
|
|
13286
|
+
[name: string]: unknown;
|
|
13287
|
+
};
|
|
13288
|
+
content?: never;
|
|
13289
|
+
};
|
|
12600
13290
|
/** @description Internal server error */
|
|
12601
13291
|
500: {
|
|
12602
13292
|
headers: {
|
|
@@ -12992,7 +13682,7 @@ export interface operations {
|
|
|
12992
13682
|
"application/json": components["schemas"]["AddFollowPositionMarginResponse"];
|
|
12993
13683
|
};
|
|
12994
13684
|
};
|
|
12995
|
-
/** @description Invalid follow id, trading pair or amount, or refused
|
|
13685
|
+
/** @description Invalid follow id, trading pair or amount, or refused with code COPY_TRADING_REJECTED (no isolated copy position on the pair, the copy position is being liquidated or is in bad debt, or more than the copy account can put in; the message names the rule) */
|
|
12996
13686
|
400: {
|
|
12997
13687
|
headers: {
|
|
12998
13688
|
[name: string]: unknown;
|
|
@@ -13020,7 +13710,7 @@ export interface operations {
|
|
|
13020
13710
|
};
|
|
13021
13711
|
content?: never;
|
|
13022
13712
|
};
|
|
13023
|
-
/** @description The follow is stopping or stopped
|
|
13713
|
+
/** @description The follow is stopping or stopped */
|
|
13024
13714
|
409: {
|
|
13025
13715
|
headers: {
|
|
13026
13716
|
[name: string]: unknown;
|
|
@@ -13098,6 +13788,13 @@ export interface operations {
|
|
|
13098
13788
|
};
|
|
13099
13789
|
content?: never;
|
|
13100
13790
|
};
|
|
13791
|
+
/** @description Follow stop rate limit exceeded; retry after the interval in details.retryAfter */
|
|
13792
|
+
429: {
|
|
13793
|
+
headers: {
|
|
13794
|
+
[name: string]: unknown;
|
|
13795
|
+
};
|
|
13796
|
+
content?: never;
|
|
13797
|
+
};
|
|
13101
13798
|
/** @description Internal server error */
|
|
13102
13799
|
500: {
|
|
13103
13800
|
headers: {
|
|
@@ -13258,6 +13955,13 @@ export interface operations {
|
|
|
13258
13955
|
};
|
|
13259
13956
|
content?: never;
|
|
13260
13957
|
};
|
|
13958
|
+
/** @description Settings write rate limit exceeded — the lead trader profile, follow create/edit and self-trade-prevention default share a per-account budget; retry after the interval in details.retryAfter */
|
|
13959
|
+
429: {
|
|
13960
|
+
headers: {
|
|
13961
|
+
[name: string]: unknown;
|
|
13962
|
+
};
|
|
13963
|
+
content?: never;
|
|
13964
|
+
};
|
|
13261
13965
|
/** @description Internal server error */
|
|
13262
13966
|
500: {
|
|
13263
13967
|
headers: {
|
|
@@ -14072,13 +14776,43 @@ export interface operations {
|
|
|
14072
14776
|
list_margin_accounts: {
|
|
14073
14777
|
parameters: {
|
|
14074
14778
|
query?: {
|
|
14075
|
-
/** @description
|
|
14076
|
-
page?: number;
|
|
14077
|
-
/** @description Items per page (max 100) */
|
|
14779
|
+
/** @description Items per page (max 1000) */
|
|
14078
14780
|
pageSize?: number;
|
|
14781
|
+
/**
|
|
14782
|
+
* @description Keep only risk-bucket rows in this state (see `risk_bucket_state`). A
|
|
14783
|
+
* parent margin account row has no state, so any filter excludes it.
|
|
14784
|
+
*/
|
|
14079
14785
|
state?: string;
|
|
14080
14786
|
/** @description Trading pair identifier (UUID) */
|
|
14081
14787
|
tradingPairId?: string;
|
|
14788
|
+
/**
|
|
14789
|
+
* @description Pagination cursor with two states:
|
|
14790
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
14791
|
+
* position, from the lowest margin account id.
|
|
14792
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
14793
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
14794
|
+
*
|
|
14795
|
+
* This listing has no database page to walk: one row is a margin account
|
|
14796
|
+
* and one row is a risk bucket, each repriced against live marks and the
|
|
14797
|
+
* engine's bounds, so the set is built in memory and paged there. The walk
|
|
14798
|
+
* seeks by KEY on
|
|
14799
|
+
* `(margin_account_id, trading_pair_id, risk_bucket_id, strategy_key)` —
|
|
14800
|
+
* every component immutable for the row's lifetime, the parent row sorting
|
|
14801
|
+
* ahead of its buckets — rather than by index, so a bucket that opens or
|
|
14802
|
+
* closes mid-walk no longer shifts the rows behind it across the resume
|
|
14803
|
+
* point. The strategy key is part of the key because an auto bucket the
|
|
14804
|
+
* engine has not materialized yet carries no `risk_bucket_id`, and one
|
|
14805
|
+
* account and pair can hold several strategies; such a row sorts under the
|
|
14806
|
+
* id its bucket will carry once the engine projects it, derived from the
|
|
14807
|
+
* account and pair, so provisioning completing mid-walk cannot move the row
|
|
14808
|
+
* across the resume point and serve the same risk bucket twice. `total` is
|
|
14809
|
+
* exact: a user's accounts and buckets are a small bounded set, counted in
|
|
14810
|
+
* memory.
|
|
14811
|
+
*
|
|
14812
|
+
* Filters must match the request that produced the token, or the request is
|
|
14813
|
+
* rejected 400.
|
|
14814
|
+
*/
|
|
14815
|
+
pageToken?: string;
|
|
14082
14816
|
};
|
|
14083
14817
|
header?: never;
|
|
14084
14818
|
path?: never;
|
|
@@ -14218,10 +14952,21 @@ export interface operations {
|
|
|
14218
14952
|
parameters: {
|
|
14219
14953
|
query?: {
|
|
14220
14954
|
movementType?: string;
|
|
14221
|
-
/** @description
|
|
14222
|
-
page?: number;
|
|
14223
|
-
/** @description Items per page (max 100) */
|
|
14955
|
+
/** @description Items per page (max 1000) */
|
|
14224
14956
|
pageSize?: number;
|
|
14957
|
+
/**
|
|
14958
|
+
* @description Pagination cursor with two states:
|
|
14959
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
14960
|
+
* position, from the newest movement — this listing always sorts
|
|
14961
|
+
* newest-first.
|
|
14962
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
14963
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
14964
|
+
*
|
|
14965
|
+
* The response carries no item count: the underlying ledger is too large to
|
|
14966
|
+
* count behind a filter. `movementType` must match the request that produced
|
|
14967
|
+
* the token, or the request is rejected 400.
|
|
14968
|
+
*/
|
|
14969
|
+
pageToken?: string;
|
|
14225
14970
|
};
|
|
14226
14971
|
header?: never;
|
|
14227
14972
|
path: {
|
|
@@ -14253,6 +14998,39 @@ export interface operations {
|
|
|
14253
14998
|
};
|
|
14254
14999
|
};
|
|
14255
15000
|
};
|
|
15001
|
+
get_margin_account_pnl: {
|
|
15002
|
+
parameters: {
|
|
15003
|
+
query?: never;
|
|
15004
|
+
header?: never;
|
|
15005
|
+
path: {
|
|
15006
|
+
/**
|
|
15007
|
+
* @description One of the caller's margin accounts: the default one or a sub-account.
|
|
15008
|
+
* @example 2b1a5f9c-0000-4000-8000-000000000001
|
|
15009
|
+
*/
|
|
15010
|
+
marginAccountId: string;
|
|
15011
|
+
};
|
|
15012
|
+
cookie?: never;
|
|
15013
|
+
};
|
|
15014
|
+
requestBody?: never;
|
|
15015
|
+
responses: {
|
|
15016
|
+
/** @description OK */
|
|
15017
|
+
200: {
|
|
15018
|
+
headers: {
|
|
15019
|
+
[name: string]: unknown;
|
|
15020
|
+
};
|
|
15021
|
+
content: {
|
|
15022
|
+
"application/json": components["schemas"]["GetMarginAccountPnlResponse"];
|
|
15023
|
+
};
|
|
15024
|
+
};
|
|
15025
|
+
/** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
|
|
15026
|
+
429: {
|
|
15027
|
+
headers: {
|
|
15028
|
+
[name: string]: unknown;
|
|
15029
|
+
};
|
|
15030
|
+
content?: never;
|
|
15031
|
+
};
|
|
15032
|
+
};
|
|
15033
|
+
};
|
|
14256
15034
|
simulate_order_risk: {
|
|
14257
15035
|
parameters: {
|
|
14258
15036
|
query?: never;
|
|
@@ -14319,6 +15097,37 @@ export interface operations {
|
|
|
14319
15097
|
};
|
|
14320
15098
|
};
|
|
14321
15099
|
};
|
|
15100
|
+
transfer_collateral: {
|
|
15101
|
+
parameters: {
|
|
15102
|
+
query?: never;
|
|
15103
|
+
header?: never;
|
|
15104
|
+
path?: never;
|
|
15105
|
+
cookie?: never;
|
|
15106
|
+
};
|
|
15107
|
+
requestBody: {
|
|
15108
|
+
content: {
|
|
15109
|
+
"application/json": components["schemas"]["TransferCollateralRequest"];
|
|
15110
|
+
};
|
|
15111
|
+
};
|
|
15112
|
+
responses: {
|
|
15113
|
+
/** @description OK */
|
|
15114
|
+
200: {
|
|
15115
|
+
headers: {
|
|
15116
|
+
[name: string]: unknown;
|
|
15117
|
+
};
|
|
15118
|
+
content: {
|
|
15119
|
+
"application/json": components["schemas"]["TransferCollateralResponse"];
|
|
15120
|
+
};
|
|
15121
|
+
};
|
|
15122
|
+
/** @description Movement rate limit exceeded — withdrawals and collateral transfers share a per-user budget; retry after the interval in details.retryAfter */
|
|
15123
|
+
429: {
|
|
15124
|
+
headers: {
|
|
15125
|
+
[name: string]: unknown;
|
|
15126
|
+
};
|
|
15127
|
+
content?: never;
|
|
15128
|
+
};
|
|
15129
|
+
};
|
|
15130
|
+
};
|
|
14322
15131
|
get_parent_margin_account_summary: {
|
|
14323
15132
|
parameters: {
|
|
14324
15133
|
query?: {
|
|
@@ -14415,10 +15224,13 @@ export interface operations {
|
|
|
14415
15224
|
parameters: {
|
|
14416
15225
|
query?: {
|
|
14417
15226
|
movementType?: string;
|
|
14418
|
-
/** @description
|
|
14419
|
-
page?: number;
|
|
14420
|
-
/** @description Items per page (max 100) */
|
|
15227
|
+
/** @description Items per page (max 1000) */
|
|
14421
15228
|
pageSize?: number;
|
|
15229
|
+
/**
|
|
15230
|
+
* @description See `GetMarginAccountMovementsRequest.page_token`: the same cursor walk,
|
|
15231
|
+
* scoped to the caller's parent margin account.
|
|
15232
|
+
*/
|
|
15233
|
+
pageToken?: string;
|
|
14422
15234
|
};
|
|
14423
15235
|
header?: never;
|
|
14424
15236
|
path?: never;
|
|
@@ -14537,6 +15349,145 @@ export interface operations {
|
|
|
14537
15349
|
};
|
|
14538
15350
|
};
|
|
14539
15351
|
};
|
|
15352
|
+
create_sub_account: {
|
|
15353
|
+
parameters: {
|
|
15354
|
+
query?: never;
|
|
15355
|
+
header?: never;
|
|
15356
|
+
path?: never;
|
|
15357
|
+
cookie?: never;
|
|
15358
|
+
};
|
|
15359
|
+
requestBody: {
|
|
15360
|
+
content: {
|
|
15361
|
+
"application/json": components["schemas"]["CreateSubAccountRequest"];
|
|
15362
|
+
};
|
|
15363
|
+
};
|
|
15364
|
+
responses: {
|
|
15365
|
+
/** @description OK */
|
|
15366
|
+
200: {
|
|
15367
|
+
headers: {
|
|
15368
|
+
[name: string]: unknown;
|
|
15369
|
+
};
|
|
15370
|
+
content: {
|
|
15371
|
+
"application/json": components["schemas"]["CreateSubAccountResponse"];
|
|
15372
|
+
};
|
|
15373
|
+
};
|
|
15374
|
+
/** @description Movement rate limit exceeded — withdrawals and collateral transfers share a per-user budget; retry after the interval in details.retryAfter */
|
|
15375
|
+
429: {
|
|
15376
|
+
headers: {
|
|
15377
|
+
[name: string]: unknown;
|
|
15378
|
+
};
|
|
15379
|
+
content?: never;
|
|
15380
|
+
};
|
|
15381
|
+
};
|
|
15382
|
+
};
|
|
15383
|
+
close_sub_account: {
|
|
15384
|
+
parameters: {
|
|
15385
|
+
query?: never;
|
|
15386
|
+
header?: never;
|
|
15387
|
+
path: {
|
|
15388
|
+
/** @example 2b1a5f9c-0000-4000-8000-000000000001 */
|
|
15389
|
+
marginAccountId: string;
|
|
15390
|
+
};
|
|
15391
|
+
cookie?: never;
|
|
15392
|
+
};
|
|
15393
|
+
requestBody: {
|
|
15394
|
+
content: {
|
|
15395
|
+
"application/json": components["schemas"]["CloseSubAccountRequest"];
|
|
15396
|
+
};
|
|
15397
|
+
};
|
|
15398
|
+
responses: {
|
|
15399
|
+
/** @description OK */
|
|
15400
|
+
200: {
|
|
15401
|
+
headers: {
|
|
15402
|
+
[name: string]: unknown;
|
|
15403
|
+
};
|
|
15404
|
+
content: {
|
|
15405
|
+
"application/json": components["schemas"]["CloseSubAccountResponse"];
|
|
15406
|
+
};
|
|
15407
|
+
};
|
|
15408
|
+
/** @description Movement rate limit exceeded — withdrawals and collateral transfers share a per-user budget; retry after the interval in details.retryAfter */
|
|
15409
|
+
429: {
|
|
15410
|
+
headers: {
|
|
15411
|
+
[name: string]: unknown;
|
|
15412
|
+
};
|
|
15413
|
+
content?: never;
|
|
15414
|
+
};
|
|
15415
|
+
};
|
|
15416
|
+
};
|
|
15417
|
+
transfer_collateral_to_sub_account: {
|
|
15418
|
+
parameters: {
|
|
15419
|
+
query?: never;
|
|
15420
|
+
header?: never;
|
|
15421
|
+
path: {
|
|
15422
|
+
/**
|
|
15423
|
+
* @description The caller's sub-account that receives the collateral.
|
|
15424
|
+
* @example 2b1a5f9c-0000-4000-8000-000000000001
|
|
15425
|
+
*/
|
|
15426
|
+
marginAccountId: string;
|
|
15427
|
+
};
|
|
15428
|
+
cookie?: never;
|
|
15429
|
+
};
|
|
15430
|
+
requestBody: {
|
|
15431
|
+
content: {
|
|
15432
|
+
"application/json": components["schemas"]["TransferCollateralToSubAccountRequest"];
|
|
15433
|
+
};
|
|
15434
|
+
};
|
|
15435
|
+
responses: {
|
|
15436
|
+
/** @description OK */
|
|
15437
|
+
200: {
|
|
15438
|
+
headers: {
|
|
15439
|
+
[name: string]: unknown;
|
|
15440
|
+
};
|
|
15441
|
+
content: {
|
|
15442
|
+
"application/json": components["schemas"]["TransferCollateralResponse"];
|
|
15443
|
+
};
|
|
15444
|
+
};
|
|
15445
|
+
/** @description Movement rate limit exceeded — withdrawals and collateral transfers share a per-user budget; retry after the interval in details.retryAfter */
|
|
15446
|
+
429: {
|
|
15447
|
+
headers: {
|
|
15448
|
+
[name: string]: unknown;
|
|
15449
|
+
};
|
|
15450
|
+
content?: never;
|
|
15451
|
+
};
|
|
15452
|
+
};
|
|
15453
|
+
};
|
|
15454
|
+
transfer_collateral_from_sub_account: {
|
|
15455
|
+
parameters: {
|
|
15456
|
+
query?: never;
|
|
15457
|
+
header?: never;
|
|
15458
|
+
path: {
|
|
15459
|
+
/**
|
|
15460
|
+
* @description The caller's sub-account the collateral leaves.
|
|
15461
|
+
* @example 2b1a5f9c-0000-4000-8000-000000000001
|
|
15462
|
+
*/
|
|
15463
|
+
marginAccountId: string;
|
|
15464
|
+
};
|
|
15465
|
+
cookie?: never;
|
|
15466
|
+
};
|
|
15467
|
+
requestBody: {
|
|
15468
|
+
content: {
|
|
15469
|
+
"application/json": components["schemas"]["TransferCollateralFromSubAccountRequest"];
|
|
15470
|
+
};
|
|
15471
|
+
};
|
|
15472
|
+
responses: {
|
|
15473
|
+
/** @description OK */
|
|
15474
|
+
200: {
|
|
15475
|
+
headers: {
|
|
15476
|
+
[name: string]: unknown;
|
|
15477
|
+
};
|
|
15478
|
+
content: {
|
|
15479
|
+
"application/json": components["schemas"]["TransferCollateralResponse"];
|
|
15480
|
+
};
|
|
15481
|
+
};
|
|
15482
|
+
/** @description Movement rate limit exceeded — withdrawals and collateral transfers share a per-user budget; retry after the interval in details.retryAfter */
|
|
15483
|
+
429: {
|
|
15484
|
+
headers: {
|
|
15485
|
+
[name: string]: unknown;
|
|
15486
|
+
};
|
|
15487
|
+
content?: never;
|
|
15488
|
+
};
|
|
15489
|
+
};
|
|
15490
|
+
};
|
|
14540
15491
|
list_all_funding_history: {
|
|
14541
15492
|
parameters: {
|
|
14542
15493
|
query?: {
|
|
@@ -14544,12 +15495,30 @@ export interface operations {
|
|
|
14544
15495
|
startTime?: number;
|
|
14545
15496
|
/** @description End time as Unix timestamp (milliseconds) */
|
|
14546
15497
|
endTime?: number;
|
|
14547
|
-
/** @description
|
|
14548
|
-
page?: number;
|
|
14549
|
-
/** @description Items per page (max 100) */
|
|
15498
|
+
/** @description Items per page (max 1000) */
|
|
14550
15499
|
pageSize?: number;
|
|
14551
15500
|
/** @description Sort direction for settledAt */
|
|
14552
15501
|
orderBy?: "ASC" | "DESC";
|
|
15502
|
+
/**
|
|
15503
|
+
* @description Pagination cursor with two states:
|
|
15504
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
15505
|
+
* position, from the newest settlement (the oldest when `orderBy` is
|
|
15506
|
+
* ASC).
|
|
15507
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
15508
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
15509
|
+
*
|
|
15510
|
+
* The walk seeks on `(settled_at, id)` in the requested direction.
|
|
15511
|
+
* `settled_at` is NOT NULL and never changes once a window settles, and the
|
|
15512
|
+
* `id` tie-break makes the key total — the removed page-number mode ordered
|
|
15513
|
+
* by `(settled_at, trading_pair_id, epoch)` with no tie-break, so a page
|
|
15514
|
+
* boundary between two settlements sharing that triple could repeat or drop
|
|
15515
|
+
* a row.
|
|
15516
|
+
*
|
|
15517
|
+
* `total` is populated — bounded by the server count ceiling, see
|
|
15518
|
+
* `totalCapped`. Filters and `orderBy` must match the request that produced
|
|
15519
|
+
* the token, or the request is rejected 400.
|
|
15520
|
+
*/
|
|
15521
|
+
pageToken?: string;
|
|
14553
15522
|
};
|
|
14554
15523
|
header?: never;
|
|
14555
15524
|
path?: never;
|
|
@@ -14735,12 +15704,29 @@ export interface operations {
|
|
|
14735
15704
|
startTime?: number;
|
|
14736
15705
|
/** @description End time as Unix timestamp (milliseconds) */
|
|
14737
15706
|
endTime?: number;
|
|
14738
|
-
/** @description
|
|
14739
|
-
page?: number;
|
|
14740
|
-
/** @description Items per page (max 100) */
|
|
15707
|
+
/** @description Items per page (max 1000) */
|
|
14741
15708
|
pageSize?: number;
|
|
14742
|
-
/** @description Sort direction for
|
|
15709
|
+
/** @description Sort direction for settledAt */
|
|
14743
15710
|
orderBy?: "ASC" | "DESC";
|
|
15711
|
+
/**
|
|
15712
|
+
* @description Pagination cursor with two states:
|
|
15713
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
15714
|
+
* position, from the newest settlement (the oldest when `orderBy` is
|
|
15715
|
+
* ASC).
|
|
15716
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
15717
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
15718
|
+
*
|
|
15719
|
+
* The walk seeks on `(settled_at, id)` in the requested direction.
|
|
15720
|
+
* `settled_at` is NOT NULL and never changes once a window settles, and the
|
|
15721
|
+
* `id` tie-break makes the key total — the removed page-number mode ordered
|
|
15722
|
+
* by `epoch` with no tie-break, so a page boundary between two
|
|
15723
|
+
* settlements sharing it could repeat or drop a row.
|
|
15724
|
+
*
|
|
15725
|
+
* `total` is populated — bounded by the server count ceiling, see
|
|
15726
|
+
* `totalCapped`. Filters and `orderBy` must match the request that produced
|
|
15727
|
+
* the token, or the request is rejected 400.
|
|
15728
|
+
*/
|
|
15729
|
+
pageToken?: string;
|
|
14744
15730
|
};
|
|
14745
15731
|
header?: never;
|
|
14746
15732
|
path: {
|
|
@@ -16308,7 +17294,15 @@ export interface operations {
|
|
|
16308
17294
|
};
|
|
16309
17295
|
get_my_referral_downline: {
|
|
16310
17296
|
parameters: {
|
|
16311
|
-
query?:
|
|
17297
|
+
query?: {
|
|
17298
|
+
/** @description `earningsBySource` rows per page (max 500) */
|
|
17299
|
+
pageSize?: number;
|
|
17300
|
+
/**
|
|
17301
|
+
* @description Opaque cursor from a previous response's `nextPageToken`; omit or send an
|
|
17302
|
+
* empty string for the first page.
|
|
17303
|
+
*/
|
|
17304
|
+
pageToken?: string;
|
|
17305
|
+
};
|
|
16312
17306
|
header?: never;
|
|
16313
17307
|
path?: never;
|
|
16314
17308
|
cookie?: never;
|
|
@@ -16347,6 +17341,70 @@ export interface operations {
|
|
|
16347
17341
|
};
|
|
16348
17342
|
};
|
|
16349
17343
|
};
|
|
17344
|
+
get_my_referral_tree: {
|
|
17345
|
+
parameters: {
|
|
17346
|
+
query?: {
|
|
17347
|
+
parent?: string;
|
|
17348
|
+
/** @description Nodes per page (max 200) */
|
|
17349
|
+
pageSize?: number;
|
|
17350
|
+
/**
|
|
17351
|
+
* @description Opaque cursor from a previous response's `nextPageToken`; omit or send an
|
|
17352
|
+
* empty string for the first page. Only valid with the same `parent`.
|
|
17353
|
+
*/
|
|
17354
|
+
pageToken?: string;
|
|
17355
|
+
};
|
|
17356
|
+
header?: never;
|
|
17357
|
+
path?: never;
|
|
17358
|
+
cookie?: never;
|
|
17359
|
+
};
|
|
17360
|
+
requestBody?: never;
|
|
17361
|
+
responses: {
|
|
17362
|
+
/** @description OK */
|
|
17363
|
+
200: {
|
|
17364
|
+
headers: {
|
|
17365
|
+
[name: string]: unknown;
|
|
17366
|
+
};
|
|
17367
|
+
content: {
|
|
17368
|
+
"application/json": components["schemas"]["GetMyReferralTreeResponse"];
|
|
17369
|
+
};
|
|
17370
|
+
};
|
|
17371
|
+
/** @description Invalid `parent` wallet address, `pageSize`, or `pageToken` */
|
|
17372
|
+
400: {
|
|
17373
|
+
headers: {
|
|
17374
|
+
[name: string]: unknown;
|
|
17375
|
+
};
|
|
17376
|
+
content?: never;
|
|
17377
|
+
};
|
|
17378
|
+
/** @description Authentication required */
|
|
17379
|
+
401: {
|
|
17380
|
+
headers: {
|
|
17381
|
+
[name: string]: unknown;
|
|
17382
|
+
};
|
|
17383
|
+
content?: never;
|
|
17384
|
+
};
|
|
17385
|
+
/** @description `parent` is not the caller or one of the caller's own expandable referees */
|
|
17386
|
+
404: {
|
|
17387
|
+
headers: {
|
|
17388
|
+
[name: string]: unknown;
|
|
17389
|
+
};
|
|
17390
|
+
content?: never;
|
|
17391
|
+
};
|
|
17392
|
+
/** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
|
|
17393
|
+
429: {
|
|
17394
|
+
headers: {
|
|
17395
|
+
[name: string]: unknown;
|
|
17396
|
+
};
|
|
17397
|
+
content?: never;
|
|
17398
|
+
};
|
|
17399
|
+
/** @description Internal server error */
|
|
17400
|
+
500: {
|
|
17401
|
+
headers: {
|
|
17402
|
+
[name: string]: unknown;
|
|
17403
|
+
};
|
|
17404
|
+
content?: never;
|
|
17405
|
+
};
|
|
17406
|
+
};
|
|
17407
|
+
};
|
|
16350
17408
|
get_rewards_balance: {
|
|
16351
17409
|
parameters: {
|
|
16352
17410
|
query?: never;
|
|
@@ -16431,6 +17489,13 @@ export interface operations {
|
|
|
16431
17489
|
};
|
|
16432
17490
|
content?: never;
|
|
16433
17491
|
};
|
|
17492
|
+
/** @description Movement rate limit exceeded — withdrawals, collateral transfers and reward transfers share a per-user budget; retry after the interval in details.retryAfter */
|
|
17493
|
+
429: {
|
|
17494
|
+
headers: {
|
|
17495
|
+
[name: string]: unknown;
|
|
17496
|
+
};
|
|
17497
|
+
content?: never;
|
|
17498
|
+
};
|
|
16434
17499
|
/** @description Internal server error */
|
|
16435
17500
|
500: {
|
|
16436
17501
|
headers: {
|
|
@@ -16449,10 +17514,53 @@ export interface operations {
|
|
|
16449
17514
|
tradingPairId?: string;
|
|
16450
17515
|
/** @description Order status (single value or comma-separated list) */
|
|
16451
17516
|
status?: string;
|
|
16452
|
-
/** @description
|
|
16453
|
-
page?: number;
|
|
16454
|
-
/** @description Items per page (max 100) */
|
|
17517
|
+
/** @description Items per page (max 1000) */
|
|
16455
17518
|
pageSize?: number;
|
|
17519
|
+
/**
|
|
17520
|
+
* @description Pagination cursor with two states:
|
|
17521
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
17522
|
+
* position.
|
|
17523
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
17524
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
17525
|
+
*
|
|
17526
|
+
* ORDER DEPENDS ON THE FILTER, because the two cases are served from
|
|
17527
|
+
* different places:
|
|
17528
|
+
*
|
|
17529
|
+
* - `status=OPEN` is answered from the matching engine's live view, which
|
|
17530
|
+
* carries no timestamps for a position the persistor has not written
|
|
17531
|
+
* yet. It is ordered by `(marginAccountId, tradingPairId, positionId)`
|
|
17532
|
+
* ascending — stable and total, but UUID order, NOT newest-first.
|
|
17533
|
+
* - Every other filter reads persisted rows, ordered by the IMMUTABLE
|
|
17534
|
+
* `(opened_at, id)` descending: newest-opened first. The removed
|
|
17535
|
+
* page-number mode sorted on `COALESCE(closed_at, last_funding_at,
|
|
17536
|
+
* opened_at)`, which *advances* whenever a position takes a funding
|
|
17537
|
+
* payment or closes, so rows moved across a resume point mid-walk;
|
|
17538
|
+
* `opened_at` never changes after the insert. Order therefore differs
|
|
17539
|
+
* from the removed mode's. One exception: an operator correction may
|
|
17540
|
+
* move an OPEN position's `opened_at` EARLIER, never later, to its
|
|
17541
|
+
* opening fill. A walk in flight while that runs can return such a
|
|
17542
|
+
* position a second time, but cannot skip one: dedupe on `positionId`.
|
|
17543
|
+
*
|
|
17544
|
+
* Those are two separate cursor spaces, so a token is only valid in the one
|
|
17545
|
+
* that minted it, and crossing between them is ASYMMETRIC:
|
|
17546
|
+
*
|
|
17547
|
+
* - A PERSISTED token offered to `status=OPEN` while the engine is
|
|
17548
|
+
* reachable is served: the live branch does not recognise it, declines,
|
|
17549
|
+
* and the persisted walk answers. That is what keeps a walk going which
|
|
17550
|
+
* started on persisted rows because the engine was down at the time and
|
|
17551
|
+
* has since come back.
|
|
17552
|
+
* - A LIVE token offered after the engine becomes unreachable is NOT
|
|
17553
|
+
* served. The live branch cannot answer at all, and the persisted
|
|
17554
|
+
* decoder rejects the `src=live` token, so the request is a 400 and the
|
|
17555
|
+
* walk has to start over. There is no way to carry a live position into
|
|
17556
|
+
* the persisted ordering: the two relations do not share a sort key, and
|
|
17557
|
+
* resuming at a key from the wrong one would skip or repeat rows
|
|
17558
|
+
* silently, which is worse than the restart.
|
|
17559
|
+
*
|
|
17560
|
+
* A token neither relation recognises is rejected 400, and so is one minted
|
|
17561
|
+
* under different filters.
|
|
17562
|
+
*/
|
|
17563
|
+
pageToken?: string;
|
|
16456
17564
|
};
|
|
16457
17565
|
header?: never;
|
|
16458
17566
|
path?: never;
|
|
@@ -16500,6 +17608,13 @@ export interface operations {
|
|
|
16500
17608
|
"application/json": components["schemas"]["BatchCloseAllResponse"];
|
|
16501
17609
|
};
|
|
16502
17610
|
};
|
|
17611
|
+
/** @description Order rate limit exceeded — each call draws one item per open position it closes (at least 1) from the per-account risk-reduction budget it shares with cancels (and the budget the account family shares). Returned when the first 100 closes do not fit; positions past 100 that do not fit are reported per position as RATE_LIMIT_EXCEEDED instead. Retry after the interval in details.retryAfter */
|
|
17612
|
+
429: {
|
|
17613
|
+
headers: {
|
|
17614
|
+
[name: string]: unknown;
|
|
17615
|
+
};
|
|
17616
|
+
content?: never;
|
|
17617
|
+
};
|
|
16503
17618
|
};
|
|
16504
17619
|
};
|
|
16505
17620
|
list_position_history: {
|
|
@@ -16509,12 +17624,24 @@ export interface operations {
|
|
|
16509
17624
|
marginAccountId?: string;
|
|
16510
17625
|
/** @description Trading pair identifier (UUID) */
|
|
16511
17626
|
tradingPairId?: string;
|
|
16512
|
-
/** @description
|
|
16513
|
-
page?: number;
|
|
16514
|
-
/** @description Items per page (max 100) */
|
|
17627
|
+
/** @description Items per page (max 1000) */
|
|
16515
17628
|
pageSize?: number;
|
|
16516
17629
|
/** @description When true, return only DECREASE, CLOSE, and LIQUIDATE execution rows. */
|
|
16517
17630
|
reductionOnly?: boolean;
|
|
17631
|
+
/**
|
|
17632
|
+
* @description Pagination cursor with two states:
|
|
17633
|
+
* - Omitted or empty string (""): start a cursor walk with no prior
|
|
17634
|
+
* position, from the newest event — this listing always sorts
|
|
17635
|
+
* newest-first.
|
|
17636
|
+
* - Non-empty: an opaque cursor from a previous response's
|
|
17637
|
+
* `nextPageToken`; results resume immediately after that position.
|
|
17638
|
+
*
|
|
17639
|
+
* Every walk covers full position history — hot and archived rows merged.
|
|
17640
|
+
* The response carries no item count: this listing's relation is too large
|
|
17641
|
+
* to count behind a filter. Filters must match the request that produced the
|
|
17642
|
+
* token, or the request is rejected 400.
|
|
17643
|
+
*/
|
|
17644
|
+
pageToken?: string;
|
|
16518
17645
|
};
|
|
16519
17646
|
header?: never;
|
|
16520
17647
|
path?: never;
|
|
@@ -16595,6 +17722,13 @@ export interface operations {
|
|
|
16595
17722
|
"application/json": components["schemas"]["ClosePositionResponse"];
|
|
16596
17723
|
};
|
|
16597
17724
|
};
|
|
17725
|
+
/** @description Order rate limit exceeded — each close draws one item from the per-account risk-reduction budget it shares with cancels (and the budget the account family shares); retry after the interval in details.retryAfter */
|
|
17726
|
+
429: {
|
|
17727
|
+
headers: {
|
|
17728
|
+
[name: string]: unknown;
|
|
17729
|
+
};
|
|
17730
|
+
content?: never;
|
|
17731
|
+
};
|
|
16598
17732
|
};
|
|
16599
17733
|
};
|
|
16600
17734
|
get_position_pnl_history: {
|