@0xmonaco/types 0.8.11 → 0.8.14
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/applications/responses.d.ts +5 -4
- package/dist/auth/responses.d.ts +2 -1
- package/dist/contracts/balances.d.ts +1 -1
- package/dist/delegated-agents/index.d.ts +3 -2
- package/dist/margin-accounts/index.d.ts +37 -5
- package/dist/market/index.d.ts +15 -11
- package/dist/positions/index.d.ts +23 -1
- package/dist/profile/index.d.ts +7 -4
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sub-accounts/index.d.ts +3 -2
- package/dist/trading/index.d.ts +4 -4
- package/dist/trading/responses.d.ts +6 -6
- package/dist/validation/margin-accounts.d.ts +44 -2
- package/dist/validation/margin-accounts.js +32 -6
- package/dist/validation/positions.d.ts +4 -0
- package/dist/validation/positions.js +4 -0
- package/dist/validation/trading.d.ts +8 -8
- package/dist/validation/trading.js +27 -27
- package/dist/validation/vault.d.ts +4 -0
- package/dist/validation/vault.js +1 -0
- package/dist/vault/index.d.ts +33 -12
- package/dist/vault/responses.d.ts +50 -12
- package/dist/websocket/events/balance-events.d.ts +2 -1
- package/dist/websocket/events/movement-events.d.ts +2 -1
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +8 -2
- package/dist/wire/schema.d.ts +416 -66
- package/dist/withdrawals/index.d.ts +27 -9
- package/package.json +2 -2
package/dist/wire/schema.d.ts
CHANGED
|
@@ -816,7 +816,71 @@ export interface paths {
|
|
|
816
816
|
patch?: never;
|
|
817
817
|
trace?: never;
|
|
818
818
|
};
|
|
819
|
-
"/api/v1/margin/
|
|
819
|
+
"/api/v1/margin/parent-margin-account": {
|
|
820
|
+
parameters: {
|
|
821
|
+
query?: never;
|
|
822
|
+
header?: never;
|
|
823
|
+
path?: never;
|
|
824
|
+
cookie?: never;
|
|
825
|
+
};
|
|
826
|
+
get: operations["get_parent_margin_account_summary"];
|
|
827
|
+
put?: never;
|
|
828
|
+
post?: never;
|
|
829
|
+
delete?: never;
|
|
830
|
+
options?: never;
|
|
831
|
+
head?: never;
|
|
832
|
+
patch?: never;
|
|
833
|
+
trace?: never;
|
|
834
|
+
};
|
|
835
|
+
"/api/v1/margin/parent-margin-account/collateral/transfer-in": {
|
|
836
|
+
parameters: {
|
|
837
|
+
query?: never;
|
|
838
|
+
header?: never;
|
|
839
|
+
path?: never;
|
|
840
|
+
cookie?: never;
|
|
841
|
+
};
|
|
842
|
+
get?: never;
|
|
843
|
+
put?: never;
|
|
844
|
+
post: operations["transfer_collateral_to_parent_margin_account"];
|
|
845
|
+
delete?: never;
|
|
846
|
+
options?: never;
|
|
847
|
+
head?: never;
|
|
848
|
+
patch?: never;
|
|
849
|
+
trace?: never;
|
|
850
|
+
};
|
|
851
|
+
"/api/v1/margin/parent-margin-account/collateral/transfer-out": {
|
|
852
|
+
parameters: {
|
|
853
|
+
query?: never;
|
|
854
|
+
header?: never;
|
|
855
|
+
path?: never;
|
|
856
|
+
cookie?: never;
|
|
857
|
+
};
|
|
858
|
+
get?: never;
|
|
859
|
+
put?: never;
|
|
860
|
+
post: operations["transfer_collateral_from_parent_margin_account"];
|
|
861
|
+
delete?: never;
|
|
862
|
+
options?: never;
|
|
863
|
+
head?: never;
|
|
864
|
+
patch?: never;
|
|
865
|
+
trace?: never;
|
|
866
|
+
};
|
|
867
|
+
"/api/v1/margin/parent-margin-account/movements": {
|
|
868
|
+
parameters: {
|
|
869
|
+
query?: never;
|
|
870
|
+
header?: never;
|
|
871
|
+
path?: never;
|
|
872
|
+
cookie?: never;
|
|
873
|
+
};
|
|
874
|
+
get: operations["get_parent_margin_account_movements"];
|
|
875
|
+
put?: never;
|
|
876
|
+
post?: never;
|
|
877
|
+
delete?: never;
|
|
878
|
+
options?: never;
|
|
879
|
+
head?: never;
|
|
880
|
+
patch?: never;
|
|
881
|
+
trace?: never;
|
|
882
|
+
};
|
|
883
|
+
"/api/v1/margin/parent-margin-account/simulate-order-risk": {
|
|
820
884
|
parameters: {
|
|
821
885
|
query?: never;
|
|
822
886
|
header?: never;
|
|
@@ -825,14 +889,14 @@ export interface paths {
|
|
|
825
889
|
};
|
|
826
890
|
get?: never;
|
|
827
891
|
put?: never;
|
|
828
|
-
post: operations["
|
|
892
|
+
post: operations["simulate_parent_margin_order_risk"];
|
|
829
893
|
delete?: never;
|
|
830
894
|
options?: never;
|
|
831
895
|
head?: never;
|
|
832
896
|
patch?: never;
|
|
833
897
|
trace?: never;
|
|
834
898
|
};
|
|
835
|
-
"/api/v1/margin/
|
|
899
|
+
"/api/v1/margin/risk-buckets/collateral/transfer-in": {
|
|
836
900
|
parameters: {
|
|
837
901
|
query?: never;
|
|
838
902
|
header?: never;
|
|
@@ -841,7 +905,23 @@ export interface paths {
|
|
|
841
905
|
};
|
|
842
906
|
get?: never;
|
|
843
907
|
put?: never;
|
|
844
|
-
post: operations["
|
|
908
|
+
post: operations["transfer_collateral_to_risk_bucket"];
|
|
909
|
+
delete?: never;
|
|
910
|
+
options?: never;
|
|
911
|
+
head?: never;
|
|
912
|
+
patch?: never;
|
|
913
|
+
trace?: never;
|
|
914
|
+
};
|
|
915
|
+
"/api/v1/margin/risk-buckets/simulate-order-risk": {
|
|
916
|
+
parameters: {
|
|
917
|
+
query?: never;
|
|
918
|
+
header?: never;
|
|
919
|
+
path?: never;
|
|
920
|
+
cookie?: never;
|
|
921
|
+
};
|
|
922
|
+
get?: never;
|
|
923
|
+
put?: never;
|
|
924
|
+
post: operations["simulate_risk_bucket_order_risk"];
|
|
845
925
|
delete?: never;
|
|
846
926
|
options?: never;
|
|
847
927
|
head?: never;
|
|
@@ -1385,6 +1465,30 @@ export interface paths {
|
|
|
1385
1465
|
patch?: never;
|
|
1386
1466
|
trace?: never;
|
|
1387
1467
|
};
|
|
1468
|
+
"/api/v1/positions/batch-close-all": {
|
|
1469
|
+
parameters: {
|
|
1470
|
+
query?: never;
|
|
1471
|
+
header?: never;
|
|
1472
|
+
path?: never;
|
|
1473
|
+
cookie?: never;
|
|
1474
|
+
};
|
|
1475
|
+
get?: never;
|
|
1476
|
+
put?: never;
|
|
1477
|
+
/**
|
|
1478
|
+
* @description Close all open positions in a single batch ("panic close").
|
|
1479
|
+
*
|
|
1480
|
+
* Submits a MARKET reduce-only close for every open position owned by the
|
|
1481
|
+
* caller, optionally filtered to a single trading pair. Best-effort and
|
|
1482
|
+
* partial: each position closes independently and per-position failures are
|
|
1483
|
+
* reported in `results` rather than aborting the batch.
|
|
1484
|
+
*/
|
|
1485
|
+
post: operations["batch_close_all_positions"];
|
|
1486
|
+
delete?: never;
|
|
1487
|
+
options?: never;
|
|
1488
|
+
head?: never;
|
|
1489
|
+
patch?: never;
|
|
1490
|
+
trace?: never;
|
|
1491
|
+
};
|
|
1388
1492
|
"/api/v1/positions/history": {
|
|
1389
1493
|
parameters: {
|
|
1390
1494
|
query?: never;
|
|
@@ -1579,9 +1683,10 @@ export interface paths {
|
|
|
1579
1683
|
*
|
|
1580
1684
|
* Master accounts with the withdraw permission only. Routes through the
|
|
1581
1685
|
* matching engine to debit the balance and allocate a `withdrawal_index`,
|
|
1582
|
-
* then returns the target vault address
|
|
1583
|
-
* `
|
|
1584
|
-
*
|
|
1686
|
+
* then returns it plus the target vault address. The `calldata` field is
|
|
1687
|
+
* empty: `executeWithdrawal` requires the merkle proof, which only exists
|
|
1688
|
+
* after the withdrawal's root is confirmed on-chain. Poll GetWithdrawal to
|
|
1689
|
+
* obtain the calldata once it is ready.
|
|
1585
1690
|
*/
|
|
1586
1691
|
post: operations["initiate_withdrawal"];
|
|
1587
1692
|
delete?: never;
|
|
@@ -1599,13 +1704,15 @@ export interface paths {
|
|
|
1599
1704
|
};
|
|
1600
1705
|
/**
|
|
1601
1706
|
* Get withdrawal
|
|
1602
|
-
* @description
|
|
1707
|
+
* @description Fetch a withdrawal's executable calldata by index.
|
|
1603
1708
|
*
|
|
1604
|
-
* Public lookup — no auth. Returns the
|
|
1605
|
-
*
|
|
1606
|
-
* calldata is
|
|
1607
|
-
*
|
|
1608
|
-
*
|
|
1709
|
+
* Public lookup — no auth. Returns the vault address and ABI-encoded
|
|
1710
|
+
* `executeWithdrawal(...)` calldata for a previously-initiated
|
|
1711
|
+
* `withdrawal_index`. The calldata is bound to the fixed
|
|
1712
|
+
* (index, metadata, owner, destination, token, amount) tuple persisted for
|
|
1713
|
+
* the withdrawal, so re-fetching it cannot redirect funds. Returns 409 while
|
|
1714
|
+
* the withdrawal's root has not been confirmed on-chain yet (proof not
|
|
1715
|
+
* available) — clients poll this endpoint until it succeeds.
|
|
1609
1716
|
*/
|
|
1610
1717
|
get: operations["get_withdrawal"];
|
|
1611
1718
|
put?: never;
|
|
@@ -1688,6 +1795,11 @@ export interface components {
|
|
|
1688
1795
|
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
1689
1796
|
*/
|
|
1690
1797
|
asset_id?: string | null;
|
|
1798
|
+
/**
|
|
1799
|
+
* @description Raw total balance (available + locked) in smallest token unit
|
|
1800
|
+
* @example 1050750000
|
|
1801
|
+
*/
|
|
1802
|
+
total_balance_raw?: string | null;
|
|
1691
1803
|
};
|
|
1692
1804
|
AddPositionMarginRequest: {
|
|
1693
1805
|
/** @description Collateral asset to move into the isolated bucket. USDC is the current v1 path. */
|
|
@@ -2031,6 +2143,60 @@ export interface components {
|
|
|
2031
2143
|
cancelled_at?: string | null;
|
|
2032
2144
|
error?: components["schemas"]["BatchCancelError"];
|
|
2033
2145
|
};
|
|
2146
|
+
BatchCloseAllRequest: {
|
|
2147
|
+
/**
|
|
2148
|
+
* Format: uuid
|
|
2149
|
+
* @description Optional trading-pair filter. When set, only open positions on this
|
|
2150
|
+
* trading pair are closed; otherwise every open position is closed.
|
|
2151
|
+
*/
|
|
2152
|
+
trading_pair_id?: string | null;
|
|
2153
|
+
/**
|
|
2154
|
+
* Format: int32
|
|
2155
|
+
* @description Optional slippage tolerance (basis points) applied to each MARKET close.
|
|
2156
|
+
*/
|
|
2157
|
+
slippage_tolerance_bps?: number | null;
|
|
2158
|
+
};
|
|
2159
|
+
BatchCloseAllResponse: {
|
|
2160
|
+
/**
|
|
2161
|
+
* Format: int32
|
|
2162
|
+
* @description Number of open positions the batch attempted to close.
|
|
2163
|
+
*/
|
|
2164
|
+
total_requested?: number | null;
|
|
2165
|
+
/**
|
|
2166
|
+
* Format: int32
|
|
2167
|
+
* @description Number of positions whose close order was accepted by the matching engine
|
|
2168
|
+
* (SUCCESS, PARTIAL, or PENDING).
|
|
2169
|
+
*/
|
|
2170
|
+
total_closed?: number | null;
|
|
2171
|
+
/**
|
|
2172
|
+
* Format: int32
|
|
2173
|
+
* @description Number of positions whose close failed (validation, lookup, or a rejected
|
|
2174
|
+
* close order).
|
|
2175
|
+
*/
|
|
2176
|
+
total_failed?: number | null;
|
|
2177
|
+
results?: components["schemas"]["BatchCloseResult"][] | null;
|
|
2178
|
+
};
|
|
2179
|
+
BatchCloseError: {
|
|
2180
|
+
/**
|
|
2181
|
+
* @description Machine-readable error code (e.g. POSITION_NOT_FOUND, INVALID_REQUEST,
|
|
2182
|
+
* MATCHING_ENGINE_ERROR).
|
|
2183
|
+
*/
|
|
2184
|
+
code?: string | null;
|
|
2185
|
+
/** @description Human-readable error message. */
|
|
2186
|
+
message?: string | null;
|
|
2187
|
+
};
|
|
2188
|
+
BatchCloseResult: {
|
|
2189
|
+
/** @description Position UUID this result is for. */
|
|
2190
|
+
position_id?: string | null;
|
|
2191
|
+
/** @description Close order UUID. Present when the close order was accepted. */
|
|
2192
|
+
close_order_id?: string | null;
|
|
2193
|
+
/** @description Close outcome: SUCCESS, PARTIAL, or PENDING. Present when accepted. */
|
|
2194
|
+
status?: string | null;
|
|
2195
|
+
/** @description Quantity submitted on the close order. Present when accepted. */
|
|
2196
|
+
submitted_quantity?: string | null;
|
|
2197
|
+
/** @description Failure detail. Present when this position could not be closed. */
|
|
2198
|
+
error?: components["schemas"]["BatchCloseError"] | null;
|
|
2199
|
+
};
|
|
2034
2200
|
BatchCreateError: {
|
|
2035
2201
|
/**
|
|
2036
2202
|
* @description Machine-readable error code
|
|
@@ -2104,15 +2270,15 @@ export interface components {
|
|
|
2104
2270
|
margin_account_id?: string | null;
|
|
2105
2271
|
/**
|
|
2106
2272
|
* Format: uuid
|
|
2107
|
-
* @description Existing isolated
|
|
2273
|
+
* @description Existing isolated risk bucket UUID for risk-bucket-scoped margin orders
|
|
2108
2274
|
* @example 123e4567-e89b-12d3-a456-426614174001
|
|
2109
2275
|
*/
|
|
2110
|
-
|
|
2276
|
+
risk_bucket_id?: string | null;
|
|
2111
2277
|
/**
|
|
2112
|
-
* @description Decimal collateral to allocate into a new isolated
|
|
2278
|
+
* @description Decimal collateral to allocate into a new isolated risk bucket. When provided, the API creates the bucket ID and matching-engine persists the bucket through the durable log.
|
|
2113
2279
|
* @example 1000
|
|
2114
2280
|
*/
|
|
2115
|
-
|
|
2281
|
+
risk_bucket_collateral?: string | null;
|
|
2116
2282
|
/**
|
|
2117
2283
|
* @description Position side for margin orders: LONG, SHORT, or NONE
|
|
2118
2284
|
* @example LONG
|
|
@@ -2130,7 +2296,7 @@ export interface components {
|
|
|
2130
2296
|
*/
|
|
2131
2297
|
reduce_only?: boolean | null;
|
|
2132
2298
|
/**
|
|
2133
|
-
* @description Strategy key used to group
|
|
2299
|
+
* @description Strategy key used to group risk buckets for delegated/margin orders
|
|
2134
2300
|
* @example my-strategy
|
|
2135
2301
|
*/
|
|
2136
2302
|
strategy_key?: string | null;
|
|
@@ -2531,15 +2697,15 @@ export interface components {
|
|
|
2531
2697
|
margin_account_id?: string | null;
|
|
2532
2698
|
/**
|
|
2533
2699
|
* Format: uuid
|
|
2534
|
-
* @description Existing isolated
|
|
2700
|
+
* @description Existing isolated risk bucket UUID for risk-bucket-scoped margin orders
|
|
2535
2701
|
* @example 123e4567-e89b-12d3-a456-426614174001
|
|
2536
2702
|
*/
|
|
2537
|
-
|
|
2703
|
+
risk_bucket_id?: string | null;
|
|
2538
2704
|
/**
|
|
2539
|
-
* @description Decimal collateral to allocate into a new isolated
|
|
2705
|
+
* @description Decimal collateral to allocate into a new isolated risk bucket. When provided, the API creates the bucket ID and matching-engine persists the bucket through the durable log.
|
|
2540
2706
|
* @example 1000
|
|
2541
2707
|
*/
|
|
2542
|
-
|
|
2708
|
+
risk_bucket_collateral?: string | null;
|
|
2543
2709
|
/**
|
|
2544
2710
|
* @description Position side for margin orders: LONG, SHORT, or NONE
|
|
2545
2711
|
* @example LONG
|
|
@@ -2559,7 +2725,7 @@ export interface components {
|
|
|
2559
2725
|
take_profit?: components["schemas"]["ParentTpSlLeg"];
|
|
2560
2726
|
stop_loss?: components["schemas"]["ParentTpSlLeg"];
|
|
2561
2727
|
/**
|
|
2562
|
-
* @description Strategy key used to group
|
|
2728
|
+
* @description Strategy key used to group risk buckets for delegated/margin orders
|
|
2563
2729
|
* @example my-strategy
|
|
2564
2730
|
*/
|
|
2565
2731
|
strategy_key?: string | null;
|
|
@@ -2599,9 +2765,9 @@ export interface components {
|
|
|
2599
2765
|
margin_account_id?: string | null;
|
|
2600
2766
|
/**
|
|
2601
2767
|
* Format: uuid
|
|
2602
|
-
* @description Resolved isolated
|
|
2768
|
+
* @description Resolved isolated risk bucket UUID for risk-bucket-scoped margin orders
|
|
2603
2769
|
*/
|
|
2604
|
-
|
|
2770
|
+
risk_bucket_id?: string | null;
|
|
2605
2771
|
/** @description Client strategy key carried for compatibility */
|
|
2606
2772
|
strategy_key?: string | null;
|
|
2607
2773
|
/**
|
|
@@ -2865,6 +3031,11 @@ export interface components {
|
|
|
2865
3031
|
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
2866
3032
|
*/
|
|
2867
3033
|
asset_id?: string | null;
|
|
3034
|
+
/**
|
|
3035
|
+
* @description Raw total balance (available + locked) in smallest token unit
|
|
3036
|
+
* @example 1050750000
|
|
3037
|
+
*/
|
|
3038
|
+
total_balance_raw?: string | null;
|
|
2868
3039
|
};
|
|
2869
3040
|
GetBalancesResponse: {
|
|
2870
3041
|
balances?: components["schemas"]["AccountBalance"][] | null;
|
|
@@ -2966,7 +3137,7 @@ export interface components {
|
|
|
2966
3137
|
/** Format: uuid */
|
|
2967
3138
|
trading_pair_id?: string | null;
|
|
2968
3139
|
strategy_key?: string | null;
|
|
2969
|
-
|
|
3140
|
+
risk_bucket_id?: string | null;
|
|
2970
3141
|
margin_mode?: string | null;
|
|
2971
3142
|
};
|
|
2972
3143
|
GetMarkPriceResponse: {
|
|
@@ -3521,7 +3692,7 @@ export interface components {
|
|
|
3521
3692
|
liquidation_price?: string | null;
|
|
3522
3693
|
status?: string | null;
|
|
3523
3694
|
updated_at?: string | null;
|
|
3524
|
-
|
|
3695
|
+
risk_bucket_id?: string | null;
|
|
3525
3696
|
};
|
|
3526
3697
|
GetPositionRiskResponse: {
|
|
3527
3698
|
position_id?: string | null;
|
|
@@ -3687,6 +3858,11 @@ export interface components {
|
|
|
3687
3858
|
amount?: string | null;
|
|
3688
3859
|
/** @description On-chain address that will receive the withdrawal (EVM, 42 chars including 0x) */
|
|
3689
3860
|
destination?: string | null;
|
|
3861
|
+
/**
|
|
3862
|
+
* @description Source ledger to withdraw from: "spot" (default) debits spot balance; "margin" directly debits withdrawable collateral from the parent margin account
|
|
3863
|
+
* @example spot
|
|
3864
|
+
*/
|
|
3865
|
+
source?: string | null;
|
|
3690
3866
|
};
|
|
3691
3867
|
LedgerMovement: {
|
|
3692
3868
|
/**
|
|
@@ -4089,7 +4265,7 @@ export interface components {
|
|
|
4089
4265
|
trading_pair_id?: string | null;
|
|
4090
4266
|
strategy_key?: string | null;
|
|
4091
4267
|
/** @description Present only for risk-bucket summary rows. */
|
|
4092
|
-
|
|
4268
|
+
risk_bucket_id?: string | null;
|
|
4093
4269
|
/** @description Present only for risk-bucket summary rows. Values: ISOLATED, CROSS. */
|
|
4094
4270
|
margin_mode?: string | null;
|
|
4095
4271
|
};
|
|
@@ -4243,7 +4419,7 @@ export interface components {
|
|
|
4243
4419
|
liquidation_price?: string | null;
|
|
4244
4420
|
status?: string | null;
|
|
4245
4421
|
updated_at?: string | null;
|
|
4246
|
-
|
|
4422
|
+
risk_bucket_id?: string | null;
|
|
4247
4423
|
};
|
|
4248
4424
|
PositionHistoryEvent: {
|
|
4249
4425
|
id?: string | null;
|
|
@@ -4488,7 +4664,7 @@ export interface components {
|
|
|
4488
4664
|
/** @description Up to 7 UTC-day buckets (oldest first); empty when <1 day of history */
|
|
4489
4665
|
snapshot_7d?: components["schemas"]["ScreenerSnapshotPoint"][] | null;
|
|
4490
4666
|
/**
|
|
4491
|
-
* @description Asset-class category: crypto, equities, or
|
|
4667
|
+
* @description Asset-class category: crypto, equities, commodities, or fx
|
|
4492
4668
|
* @example crypto
|
|
4493
4669
|
*/
|
|
4494
4670
|
category?: string | null;
|
|
@@ -4521,18 +4697,6 @@ export interface components {
|
|
|
4521
4697
|
*/
|
|
4522
4698
|
price_change_percent?: string | null;
|
|
4523
4699
|
};
|
|
4524
|
-
SimulateAutoMarginOrderRiskRequest: {
|
|
4525
|
-
/** Format: uuid */
|
|
4526
|
-
trading_pair_id?: string | null;
|
|
4527
|
-
strategy_key?: string | null;
|
|
4528
|
-
side?: string | null;
|
|
4529
|
-
position_side?: string | null;
|
|
4530
|
-
order_type?: string | null;
|
|
4531
|
-
price?: string | null;
|
|
4532
|
-
quantity?: string | null;
|
|
4533
|
-
leverage?: string | null;
|
|
4534
|
-
reduce_only?: boolean | null;
|
|
4535
|
-
};
|
|
4536
4700
|
SimulateFeesResponse: {
|
|
4537
4701
|
/**
|
|
4538
4702
|
* @description Notional value (price x quantity)
|
|
@@ -4644,6 +4808,29 @@ export interface components {
|
|
|
4644
4808
|
/** @description Populated when the simulated account is an auto-resolved bucket. */
|
|
4645
4809
|
strategy_key?: string | null;
|
|
4646
4810
|
};
|
|
4811
|
+
SimulateParentMarginOrderRiskRequest: {
|
|
4812
|
+
/** Format: uuid */
|
|
4813
|
+
trading_pair_id?: string | null;
|
|
4814
|
+
side?: string | null;
|
|
4815
|
+
position_side?: string | null;
|
|
4816
|
+
order_type?: string | null;
|
|
4817
|
+
price?: string | null;
|
|
4818
|
+
quantity?: string | null;
|
|
4819
|
+
leverage?: string | null;
|
|
4820
|
+
reduce_only?: boolean | null;
|
|
4821
|
+
};
|
|
4822
|
+
SimulateRiskBucketOrderRiskRequest: {
|
|
4823
|
+
/** Format: uuid */
|
|
4824
|
+
trading_pair_id?: string | null;
|
|
4825
|
+
strategy_key?: string | null;
|
|
4826
|
+
side?: string | null;
|
|
4827
|
+
position_side?: string | null;
|
|
4828
|
+
order_type?: string | null;
|
|
4829
|
+
price?: string | null;
|
|
4830
|
+
quantity?: string | null;
|
|
4831
|
+
leverage?: string | null;
|
|
4832
|
+
reduce_only?: boolean | null;
|
|
4833
|
+
};
|
|
4647
4834
|
SubAccount: {
|
|
4648
4835
|
/**
|
|
4649
4836
|
* Format: uuid
|
|
@@ -4913,24 +5100,24 @@ export interface components {
|
|
|
4913
5100
|
*/
|
|
4914
5101
|
max_leverage?: string | null;
|
|
4915
5102
|
/**
|
|
4916
|
-
* @description Asset-class category: crypto, equities, or
|
|
5103
|
+
* @description Asset-class category: crypto, equities, commodities, or fx
|
|
4917
5104
|
* @example crypto
|
|
4918
5105
|
*/
|
|
4919
5106
|
category?: string | null;
|
|
4920
5107
|
};
|
|
4921
5108
|
TransferCollateralFromMarginAccountRequest: {
|
|
4922
|
-
/** @description
|
|
5109
|
+
/** @description Parent margin account UUID that releases collateral. */
|
|
4923
5110
|
margin_account_id?: string | null;
|
|
4924
5111
|
asset?: string | null;
|
|
4925
5112
|
amount?: string | null;
|
|
4926
5113
|
/**
|
|
4927
5114
|
* Format: uuid
|
|
4928
|
-
* @description Optional trading pair UUID used to
|
|
4929
|
-
* under the parent margin account. If omitted, the transfer applies to
|
|
4930
|
-
* parent account
|
|
5115
|
+
* @description Optional trading pair UUID used to release collateral from an isolated risk
|
|
5116
|
+
* bucket under the parent margin account. If omitted, the transfer applies to
|
|
5117
|
+
* the parent margin account only.
|
|
4931
5118
|
*/
|
|
4932
5119
|
trading_pair_id?: string | null;
|
|
4933
|
-
/** @description Optional strategy key echoed in responses when callers scope
|
|
5120
|
+
/** @description Optional strategy key echoed in responses when callers scope a risk bucket. */
|
|
4934
5121
|
strategy_key?: string | null;
|
|
4935
5122
|
};
|
|
4936
5123
|
TransferCollateralFromMarginAccountResponse: {
|
|
@@ -4944,26 +5131,23 @@ export interface components {
|
|
|
4944
5131
|
new_withdrawable_collateral?: string | null;
|
|
4945
5132
|
strategy_key?: string | null;
|
|
4946
5133
|
};
|
|
4947
|
-
|
|
5134
|
+
TransferCollateralFromParentMarginAccountRequest: {
|
|
4948
5135
|
asset?: string | null;
|
|
4949
5136
|
amount?: string | null;
|
|
4950
|
-
/** Format: uuid */
|
|
4951
|
-
trading_pair_id?: string | null;
|
|
4952
|
-
strategy_key?: string | null;
|
|
4953
5137
|
};
|
|
4954
5138
|
TransferCollateralToMarginAccountRequest: {
|
|
4955
|
-
/** @description
|
|
5139
|
+
/** @description Parent margin account UUID that receives collateral. */
|
|
4956
5140
|
margin_account_id?: string | null;
|
|
4957
5141
|
asset?: string | null;
|
|
4958
5142
|
amount?: string | null;
|
|
4959
5143
|
/**
|
|
4960
5144
|
* Format: uuid
|
|
4961
|
-
* @description Optional trading pair UUID used to
|
|
4962
|
-
* under the parent margin account. If omitted, the transfer applies to
|
|
4963
|
-
* parent account
|
|
5145
|
+
* @description Optional trading pair UUID used to allocate collateral to an isolated risk
|
|
5146
|
+
* bucket under the parent margin account. If omitted, the transfer applies to
|
|
5147
|
+
* the parent margin account only.
|
|
4964
5148
|
*/
|
|
4965
5149
|
trading_pair_id?: string | null;
|
|
4966
|
-
/** @description Optional strategy key echoed in responses when callers scope
|
|
5150
|
+
/** @description Optional strategy key echoed in responses when callers scope a risk bucket. */
|
|
4967
5151
|
strategy_key?: string | null;
|
|
4968
5152
|
};
|
|
4969
5153
|
TransferCollateralToMarginAccountResponse: {
|
|
@@ -4977,6 +5161,20 @@ export interface components {
|
|
|
4977
5161
|
new_withdrawable_collateral?: string | null;
|
|
4978
5162
|
strategy_key?: string | null;
|
|
4979
5163
|
};
|
|
5164
|
+
TransferCollateralToParentMarginAccountRequest: {
|
|
5165
|
+
asset?: string | null;
|
|
5166
|
+
amount?: string | null;
|
|
5167
|
+
};
|
|
5168
|
+
TransferCollateralToRiskBucketRequest: {
|
|
5169
|
+
asset?: string | null;
|
|
5170
|
+
amount?: string | null;
|
|
5171
|
+
/**
|
|
5172
|
+
* Format: uuid
|
|
5173
|
+
* @description Trading pair UUID whose risk bucket receives collateral.
|
|
5174
|
+
*/
|
|
5175
|
+
trading_pair_id?: string | null;
|
|
5176
|
+
strategy_key?: string | null;
|
|
5177
|
+
};
|
|
4980
5178
|
UpdateLimitRequest: {
|
|
4981
5179
|
/**
|
|
4982
5180
|
* Format: uuid
|
|
@@ -5140,11 +5338,11 @@ export interface components {
|
|
|
5140
5338
|
user?: components["schemas"]["UserInfo"];
|
|
5141
5339
|
};
|
|
5142
5340
|
Withdrawal: {
|
|
5143
|
-
/** @description Allocated withdrawal index — matches
|
|
5341
|
+
/** @description Allocated withdrawal index — matches executeWithdrawal.index on-chain */
|
|
5144
5342
|
withdrawal_index?: string | null;
|
|
5145
5343
|
/** @description 0x-prefixed lowercase address of the vault contract the calldata is submitted to */
|
|
5146
5344
|
vault_address?: string | null;
|
|
5147
|
-
/** @description 0x-prefixed ABI-encoded
|
|
5345
|
+
/** @description 0x-prefixed ABI-encoded executeWithdrawal(...) calldata; submit as tx.data to the vault. Empty on InitiateWithdrawal (the merkle proof is not available until the withdrawal root is confirmed on-chain) — fetch it from GetWithdrawal once ready */
|
|
5148
5346
|
calldata?: string | null;
|
|
5149
5347
|
};
|
|
5150
5348
|
};
|
|
@@ -6800,7 +6998,7 @@ export interface operations {
|
|
|
6800
6998
|
query?: never;
|
|
6801
6999
|
header?: never;
|
|
6802
7000
|
path: {
|
|
6803
|
-
/** @description
|
|
7001
|
+
/** @description Parent margin account UUID that receives collateral. */
|
|
6804
7002
|
margin_account_id: string;
|
|
6805
7003
|
};
|
|
6806
7004
|
cookie?: never;
|
|
@@ -6827,7 +7025,7 @@ export interface operations {
|
|
|
6827
7025
|
query?: never;
|
|
6828
7026
|
header?: never;
|
|
6829
7027
|
path: {
|
|
6830
|
-
/** @description
|
|
7028
|
+
/** @description Parent margin account UUID that releases collateral. */
|
|
6831
7029
|
margin_account_id: string;
|
|
6832
7030
|
};
|
|
6833
7031
|
cookie?: never;
|
|
@@ -6927,7 +7125,30 @@ export interface operations {
|
|
|
6927
7125
|
};
|
|
6928
7126
|
};
|
|
6929
7127
|
};
|
|
6930
|
-
|
|
7128
|
+
get_parent_margin_account_summary: {
|
|
7129
|
+
parameters: {
|
|
7130
|
+
query?: {
|
|
7131
|
+
/** @description Trading pair identifier (UUID) */
|
|
7132
|
+
trading_pair_id?: string;
|
|
7133
|
+
};
|
|
7134
|
+
header?: never;
|
|
7135
|
+
path?: never;
|
|
7136
|
+
cookie?: never;
|
|
7137
|
+
};
|
|
7138
|
+
requestBody?: never;
|
|
7139
|
+
responses: {
|
|
7140
|
+
/** @description OK */
|
|
7141
|
+
200: {
|
|
7142
|
+
headers: {
|
|
7143
|
+
[name: string]: unknown;
|
|
7144
|
+
};
|
|
7145
|
+
content: {
|
|
7146
|
+
"application/json": components["schemas"]["GetMarginAccountSummaryResponse"];
|
|
7147
|
+
};
|
|
7148
|
+
};
|
|
7149
|
+
};
|
|
7150
|
+
};
|
|
7151
|
+
transfer_collateral_to_parent_margin_account: {
|
|
6931
7152
|
parameters: {
|
|
6932
7153
|
query?: never;
|
|
6933
7154
|
header?: never;
|
|
@@ -6936,7 +7157,7 @@ export interface operations {
|
|
|
6936
7157
|
};
|
|
6937
7158
|
requestBody: {
|
|
6938
7159
|
content: {
|
|
6939
|
-
"application/json": components["schemas"]["
|
|
7160
|
+
"application/json": components["schemas"]["TransferCollateralToParentMarginAccountRequest"];
|
|
6940
7161
|
};
|
|
6941
7162
|
};
|
|
6942
7163
|
responses: {
|
|
@@ -6951,7 +7172,7 @@ export interface operations {
|
|
|
6951
7172
|
};
|
|
6952
7173
|
};
|
|
6953
7174
|
};
|
|
6954
|
-
|
|
7175
|
+
transfer_collateral_from_parent_margin_account: {
|
|
6955
7176
|
parameters: {
|
|
6956
7177
|
query?: never;
|
|
6957
7178
|
header?: never;
|
|
@@ -6960,7 +7181,105 @@ export interface operations {
|
|
|
6960
7181
|
};
|
|
6961
7182
|
requestBody: {
|
|
6962
7183
|
content: {
|
|
6963
|
-
"application/json": components["schemas"]["
|
|
7184
|
+
"application/json": components["schemas"]["TransferCollateralFromParentMarginAccountRequest"];
|
|
7185
|
+
};
|
|
7186
|
+
};
|
|
7187
|
+
responses: {
|
|
7188
|
+
/** @description OK */
|
|
7189
|
+
200: {
|
|
7190
|
+
headers: {
|
|
7191
|
+
[name: string]: unknown;
|
|
7192
|
+
};
|
|
7193
|
+
content: {
|
|
7194
|
+
"application/json": components["schemas"]["TransferCollateralFromMarginAccountResponse"];
|
|
7195
|
+
};
|
|
7196
|
+
};
|
|
7197
|
+
};
|
|
7198
|
+
};
|
|
7199
|
+
get_parent_margin_account_movements: {
|
|
7200
|
+
parameters: {
|
|
7201
|
+
query?: {
|
|
7202
|
+
movement_type?: string;
|
|
7203
|
+
/** @description Page number (1-indexed) */
|
|
7204
|
+
page?: number;
|
|
7205
|
+
/** @description Items per page (max 100) */
|
|
7206
|
+
page_size?: number;
|
|
7207
|
+
};
|
|
7208
|
+
header?: never;
|
|
7209
|
+
path?: never;
|
|
7210
|
+
cookie?: never;
|
|
7211
|
+
};
|
|
7212
|
+
requestBody?: never;
|
|
7213
|
+
responses: {
|
|
7214
|
+
/** @description OK */
|
|
7215
|
+
200: {
|
|
7216
|
+
headers: {
|
|
7217
|
+
[name: string]: unknown;
|
|
7218
|
+
};
|
|
7219
|
+
content: {
|
|
7220
|
+
"application/json": components["schemas"]["GetMarginAccountMovementsResponse"];
|
|
7221
|
+
};
|
|
7222
|
+
};
|
|
7223
|
+
};
|
|
7224
|
+
};
|
|
7225
|
+
simulate_parent_margin_order_risk: {
|
|
7226
|
+
parameters: {
|
|
7227
|
+
query?: never;
|
|
7228
|
+
header?: never;
|
|
7229
|
+
path?: never;
|
|
7230
|
+
cookie?: never;
|
|
7231
|
+
};
|
|
7232
|
+
requestBody: {
|
|
7233
|
+
content: {
|
|
7234
|
+
"application/json": components["schemas"]["SimulateParentMarginOrderRiskRequest"];
|
|
7235
|
+
};
|
|
7236
|
+
};
|
|
7237
|
+
responses: {
|
|
7238
|
+
/** @description OK */
|
|
7239
|
+
200: {
|
|
7240
|
+
headers: {
|
|
7241
|
+
[name: string]: unknown;
|
|
7242
|
+
};
|
|
7243
|
+
content: {
|
|
7244
|
+
"application/json": components["schemas"]["SimulateOrderRiskResponse"];
|
|
7245
|
+
};
|
|
7246
|
+
};
|
|
7247
|
+
};
|
|
7248
|
+
};
|
|
7249
|
+
transfer_collateral_to_risk_bucket: {
|
|
7250
|
+
parameters: {
|
|
7251
|
+
query?: never;
|
|
7252
|
+
header?: never;
|
|
7253
|
+
path?: never;
|
|
7254
|
+
cookie?: never;
|
|
7255
|
+
};
|
|
7256
|
+
requestBody: {
|
|
7257
|
+
content: {
|
|
7258
|
+
"application/json": components["schemas"]["TransferCollateralToRiskBucketRequest"];
|
|
7259
|
+
};
|
|
7260
|
+
};
|
|
7261
|
+
responses: {
|
|
7262
|
+
/** @description OK */
|
|
7263
|
+
200: {
|
|
7264
|
+
headers: {
|
|
7265
|
+
[name: string]: unknown;
|
|
7266
|
+
};
|
|
7267
|
+
content: {
|
|
7268
|
+
"application/json": components["schemas"]["TransferCollateralToMarginAccountResponse"];
|
|
7269
|
+
};
|
|
7270
|
+
};
|
|
7271
|
+
};
|
|
7272
|
+
};
|
|
7273
|
+
simulate_risk_bucket_order_risk: {
|
|
7274
|
+
parameters: {
|
|
7275
|
+
query?: never;
|
|
7276
|
+
header?: never;
|
|
7277
|
+
path?: never;
|
|
7278
|
+
cookie?: never;
|
|
7279
|
+
};
|
|
7280
|
+
requestBody: {
|
|
7281
|
+
content: {
|
|
7282
|
+
"application/json": components["schemas"]["SimulateRiskBucketOrderRiskRequest"];
|
|
6964
7283
|
};
|
|
6965
7284
|
};
|
|
6966
7285
|
responses: {
|
|
@@ -8013,6 +8332,30 @@ export interface operations {
|
|
|
8013
8332
|
};
|
|
8014
8333
|
};
|
|
8015
8334
|
};
|
|
8335
|
+
batch_close_all_positions: {
|
|
8336
|
+
parameters: {
|
|
8337
|
+
query?: never;
|
|
8338
|
+
header?: never;
|
|
8339
|
+
path?: never;
|
|
8340
|
+
cookie?: never;
|
|
8341
|
+
};
|
|
8342
|
+
requestBody: {
|
|
8343
|
+
content: {
|
|
8344
|
+
"application/json": components["schemas"]["BatchCloseAllRequest"];
|
|
8345
|
+
};
|
|
8346
|
+
};
|
|
8347
|
+
responses: {
|
|
8348
|
+
/** @description OK */
|
|
8349
|
+
200: {
|
|
8350
|
+
headers: {
|
|
8351
|
+
[name: string]: unknown;
|
|
8352
|
+
};
|
|
8353
|
+
content: {
|
|
8354
|
+
"application/json": components["schemas"]["BatchCloseAllResponse"];
|
|
8355
|
+
};
|
|
8356
|
+
};
|
|
8357
|
+
};
|
|
8358
|
+
};
|
|
8016
8359
|
list_position_history: {
|
|
8017
8360
|
parameters: {
|
|
8018
8361
|
query?: {
|
|
@@ -8414,13 +8757,20 @@ export interface operations {
|
|
|
8414
8757
|
"application/json": components["schemas"]["Withdrawal"];
|
|
8415
8758
|
};
|
|
8416
8759
|
};
|
|
8417
|
-
/** @description Withdrawal not found */
|
|
8760
|
+
/** @description Withdrawal not found (may not be persisted yet) */
|
|
8418
8761
|
404: {
|
|
8419
8762
|
headers: {
|
|
8420
8763
|
[name: string]: unknown;
|
|
8421
8764
|
};
|
|
8422
8765
|
content?: never;
|
|
8423
8766
|
};
|
|
8767
|
+
/** @description Withdrawal not confirmed on-chain yet; retry shortly */
|
|
8768
|
+
409: {
|
|
8769
|
+
headers: {
|
|
8770
|
+
[name: string]: unknown;
|
|
8771
|
+
};
|
|
8772
|
+
content?: never;
|
|
8773
|
+
};
|
|
8424
8774
|
/** @description Internal server error */
|
|
8425
8775
|
500: {
|
|
8426
8776
|
headers: {
|