@0xmonaco/types 1.0.42 → 1.0.43
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/portfolio/index.d.ts +22 -0
- package/dist/positions/index.d.ts +19 -1
- package/dist/profile/index.d.ts +6 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/trading/index.d.ts +34 -4
- package/dist/trading/orders.d.ts +8 -0
- package/dist/trading/responses.d.ts +191 -1
- package/dist/validation/trading.d.ts +60 -0
- package/dist/validation/trading.js +94 -0
- package/dist/websocket/events/account-events.d.ts +6 -2
- package/dist/websocket/events/index.d.ts +1 -0
- package/dist/websocket/events/index.js +1 -0
- package/dist/websocket/events/ohlcv-events.d.ts +15 -0
- package/dist/websocket/events/orders-events.d.ts +28 -2
- package/dist/websocket/events/twap-order-events.d.ts +64 -0
- package/dist/websocket/events/twap-order-events.js +0 -0
- package/dist/wire/operations.d.ts +1 -1
- package/dist/wire/operations.js +4 -0
- package/dist/wire/schema.d.ts +656 -0
- package/package.json +2 -2
package/dist/wire/schema.d.ts
CHANGED
|
@@ -1573,6 +1573,85 @@ export interface paths {
|
|
|
1573
1573
|
patch?: never;
|
|
1574
1574
|
trace?: never;
|
|
1575
1575
|
};
|
|
1576
|
+
"/api/v1/orders/twap": {
|
|
1577
|
+
parameters: {
|
|
1578
|
+
query?: never;
|
|
1579
|
+
header?: never;
|
|
1580
|
+
path?: never;
|
|
1581
|
+
cookie?: never;
|
|
1582
|
+
};
|
|
1583
|
+
/**
|
|
1584
|
+
* List TWAP orders
|
|
1585
|
+
* @description List TWAP orders.
|
|
1586
|
+
*
|
|
1587
|
+
* List TWAP parent orders for the authenticated user with pagination and
|
|
1588
|
+
* optional filtering by state and trading pair.
|
|
1589
|
+
*/
|
|
1590
|
+
get: operations["list_twap_orders"];
|
|
1591
|
+
put?: never;
|
|
1592
|
+
/**
|
|
1593
|
+
* Create TWAP order
|
|
1594
|
+
* @description Create TWAP order.
|
|
1595
|
+
*
|
|
1596
|
+
* Create a server-side TWAP (time-weighted average price) parent order. The
|
|
1597
|
+
* matching engine executes it as a schedule of MARKET child orders with
|
|
1598
|
+
* seeded size/timing randomization across the requested window, then stops
|
|
1599
|
+
* hard at the end time — any unfilled remainder is reported as shortfall,
|
|
1600
|
+
* never traded past the window. Delegated-agent sessions are rejected.
|
|
1601
|
+
*/
|
|
1602
|
+
post: operations["create_twap_order"];
|
|
1603
|
+
delete?: never;
|
|
1604
|
+
options?: never;
|
|
1605
|
+
head?: never;
|
|
1606
|
+
patch?: never;
|
|
1607
|
+
trace?: never;
|
|
1608
|
+
};
|
|
1609
|
+
"/api/v1/orders/twap/{twapOrderId}": {
|
|
1610
|
+
parameters: {
|
|
1611
|
+
query?: never;
|
|
1612
|
+
header?: never;
|
|
1613
|
+
path?: never;
|
|
1614
|
+
cookie?: never;
|
|
1615
|
+
};
|
|
1616
|
+
/**
|
|
1617
|
+
* Get TWAP order by ID
|
|
1618
|
+
* @description Get TWAP order by ID.
|
|
1619
|
+
*
|
|
1620
|
+
* Get a single TWAP parent order by its ID. Users can only access their own
|
|
1621
|
+
* TWAP orders.
|
|
1622
|
+
*/
|
|
1623
|
+
get: operations["get_twap_order"];
|
|
1624
|
+
put?: never;
|
|
1625
|
+
post?: never;
|
|
1626
|
+
delete?: never;
|
|
1627
|
+
options?: never;
|
|
1628
|
+
head?: never;
|
|
1629
|
+
patch?: never;
|
|
1630
|
+
trace?: never;
|
|
1631
|
+
};
|
|
1632
|
+
"/api/v1/orders/twap/{twapOrderId}/cancel": {
|
|
1633
|
+
parameters: {
|
|
1634
|
+
query?: never;
|
|
1635
|
+
header?: never;
|
|
1636
|
+
path?: never;
|
|
1637
|
+
cookie?: never;
|
|
1638
|
+
};
|
|
1639
|
+
get?: never;
|
|
1640
|
+
put?: never;
|
|
1641
|
+
/**
|
|
1642
|
+
* Cancel TWAP order
|
|
1643
|
+
* @description Cancel TWAP order.
|
|
1644
|
+
*
|
|
1645
|
+
* Cancel a TWAP parent order. Child orders are IOC and never rest, so the
|
|
1646
|
+
* cancel is atomic and immediate; already-executed quantity stands.
|
|
1647
|
+
*/
|
|
1648
|
+
post: operations["cancel_twap_order"];
|
|
1649
|
+
delete?: never;
|
|
1650
|
+
options?: never;
|
|
1651
|
+
head?: never;
|
|
1652
|
+
patch?: never;
|
|
1653
|
+
trace?: never;
|
|
1654
|
+
};
|
|
1576
1655
|
"/api/v1/orders/{orderId}": {
|
|
1577
1656
|
parameters: {
|
|
1578
1657
|
query?: never;
|
|
@@ -2191,6 +2270,11 @@ export interface components {
|
|
|
2191
2270
|
* @example 1050750000
|
|
2192
2271
|
*/
|
|
2193
2272
|
totalBalanceRaw?: string | null;
|
|
2273
|
+
/**
|
|
2274
|
+
* @description True when this asset is the chain's wrapped-native token (e.g. WSEI): vault deposits can be made in native coin via depositNative (the vault wraps on entry) and withdrawals pay out native
|
|
2275
|
+
* @example true
|
|
2276
|
+
*/
|
|
2277
|
+
wrappedNative?: boolean | null;
|
|
2194
2278
|
};
|
|
2195
2279
|
AppUser: {
|
|
2196
2280
|
/**
|
|
@@ -2821,6 +2905,11 @@ export interface components {
|
|
|
2821
2905
|
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
2822
2906
|
*/
|
|
2823
2907
|
orderId: string;
|
|
2908
|
+
/**
|
|
2909
|
+
* @description Partial cancel: reduce the resting order in place to this remaining quantity, keeping its queue position. A target ("leave this much resting"), not an amount to remove, so a retried request converges. Must be a positive multiple of the market's quantity step, strictly below the order's current remaining quantity; the delta is released exactly as a cancel releases it (spot unlock / margin reserve). Omit for a full cancel.
|
|
2910
|
+
* @example 0.5
|
|
2911
|
+
*/
|
|
2912
|
+
remainingQuantityTarget?: string | null;
|
|
2824
2913
|
};
|
|
2825
2914
|
CancelOrderResponse: {
|
|
2826
2915
|
/**
|
|
@@ -2840,6 +2929,24 @@ export interface components {
|
|
|
2840
2929
|
*/
|
|
2841
2930
|
message?: string | null;
|
|
2842
2931
|
};
|
|
2932
|
+
CancelTwapOrderResponse: {
|
|
2933
|
+
/**
|
|
2934
|
+
* Format: uuid
|
|
2935
|
+
* @description Cancelled TWAP parent order UUID
|
|
2936
|
+
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
2937
|
+
*/
|
|
2938
|
+
twapOrderId?: string | null;
|
|
2939
|
+
/**
|
|
2940
|
+
* @description Result status: SUCCESS or FAILED
|
|
2941
|
+
* @example SUCCESS
|
|
2942
|
+
*/
|
|
2943
|
+
status?: string | null;
|
|
2944
|
+
/**
|
|
2945
|
+
* @description Human-readable status message
|
|
2946
|
+
* @example TWAP order cancelled successfully
|
|
2947
|
+
*/
|
|
2948
|
+
message?: string | null;
|
|
2949
|
+
};
|
|
2843
2950
|
Candle: {
|
|
2844
2951
|
/**
|
|
2845
2952
|
* @description Unix timestamp for the start of the candle period in milliseconds
|
|
@@ -3209,6 +3316,153 @@ export interface components {
|
|
|
3209
3316
|
*/
|
|
3210
3317
|
delegationId?: string | null;
|
|
3211
3318
|
};
|
|
3319
|
+
CreateTwapOrderRequest: {
|
|
3320
|
+
/**
|
|
3321
|
+
* Format: uuid
|
|
3322
|
+
* @description Trading pair UUID
|
|
3323
|
+
* @example afae0e16-2d05-4ee9-9ee8-afae0e162d05
|
|
3324
|
+
*/
|
|
3325
|
+
tradingPairId: string;
|
|
3326
|
+
/**
|
|
3327
|
+
* @description Order side: BUY or SELL
|
|
3328
|
+
* @example BUY
|
|
3329
|
+
*/
|
|
3330
|
+
side: string;
|
|
3331
|
+
/**
|
|
3332
|
+
* @description Total quantity to execute across the window as decimal string. Must be at least 2x the pair's minimum order size so it can be sliced, and small enough that the window's slice budget can carry it with every child at or below the pair's maximum order size.
|
|
3333
|
+
* @example 10
|
|
3334
|
+
*/
|
|
3335
|
+
quantity: string;
|
|
3336
|
+
/**
|
|
3337
|
+
* Format: int64
|
|
3338
|
+
* @description Execution window length in seconds from launch. Exactly one of durationSeconds or endTime must be set. Bounds (env-tunable defaults): 60 to 2592000 (1 minute to 30 days).
|
|
3339
|
+
* @example 3600
|
|
3340
|
+
*/
|
|
3341
|
+
durationSeconds?: number | null;
|
|
3342
|
+
/**
|
|
3343
|
+
* @description Window start (RFC 3339, UTC only — use a Z suffix; non-UTC offsets are rejected). Only valid together with endTime; defaults to now.
|
|
3344
|
+
* @example 2026-08-01T10:00:00Z
|
|
3345
|
+
*/
|
|
3346
|
+
startTime?: string | null;
|
|
3347
|
+
/**
|
|
3348
|
+
* @description Window end (RFC 3339, UTC only — use a Z suffix; non-UTC offsets are rejected). Exactly one of durationSeconds or endTime must be set. The effective window must satisfy the same duration bounds. Execution stops hard at this time; any unfilled remainder is reported as shortfall.
|
|
3349
|
+
* @example 2026-08-01T11:00:00Z
|
|
3350
|
+
*/
|
|
3351
|
+
endTime?: string | null;
|
|
3352
|
+
/**
|
|
3353
|
+
* @description Optional parent-level limit price as decimal string. BUY child orders never execute above it, SELL children never below it. Omitted: slippage band protection only.
|
|
3354
|
+
* @example 35000.00
|
|
3355
|
+
*/
|
|
3356
|
+
limitPrice?: string | null;
|
|
3357
|
+
/**
|
|
3358
|
+
* Format: int32
|
|
3359
|
+
* @description Per-slice protective price band in basis points around the reference price (default 100 = 1%, maximum 500 = 5% — deliberately tighter than the standalone market-order cap; TWAP slices never sweep deep)
|
|
3360
|
+
* @example 100
|
|
3361
|
+
*/
|
|
3362
|
+
slippageToleranceBps?: number | null;
|
|
3363
|
+
/**
|
|
3364
|
+
* @description Apply seeded randomization to slice sizes and timing (default true). The seed is recorded for audit, so the schedule is reproducible to compliance but unpredictable to the market.
|
|
3365
|
+
* @example true
|
|
3366
|
+
*/
|
|
3367
|
+
randomize?: boolean | null;
|
|
3368
|
+
/**
|
|
3369
|
+
* @description Whether the TWAP parent is reduce-only (margin only). Child orders inherit it and clamp to the live position.
|
|
3370
|
+
* @example false
|
|
3371
|
+
*/
|
|
3372
|
+
reduceOnly?: boolean | null;
|
|
3373
|
+
/**
|
|
3374
|
+
* @description Trading mode: SPOT or MARGIN (default: SPOT)
|
|
3375
|
+
* @example SPOT
|
|
3376
|
+
*/
|
|
3377
|
+
tradingMode?: string | null;
|
|
3378
|
+
/**
|
|
3379
|
+
* Format: uuid
|
|
3380
|
+
* @description Margin account UUID for margin TWAP orders. Resolved once at creation and reused by every child order.
|
|
3381
|
+
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
3382
|
+
*/
|
|
3383
|
+
marginAccountId?: string | null;
|
|
3384
|
+
/**
|
|
3385
|
+
* Format: uuid
|
|
3386
|
+
* @description Existing isolated risk bucket UUID for risk-bucket-scoped margin TWAP orders. Snapshot at creation.
|
|
3387
|
+
* @example 123e4567-e89b-12d3-a456-426614174001
|
|
3388
|
+
*/
|
|
3389
|
+
riskBucketId?: string | null;
|
|
3390
|
+
/**
|
|
3391
|
+
* @description Risk bucket mode for margin TWAP orders. Defaults to ISOLATED. Values: ISOLATED, CROSS.
|
|
3392
|
+
* @example CROSS
|
|
3393
|
+
* @enum {string|null}
|
|
3394
|
+
*/
|
|
3395
|
+
marginMode?: "ISOLATED" | "CROSS" | null;
|
|
3396
|
+
/**
|
|
3397
|
+
* @description Leverage multiplier as a decimal string. Required for normal margin TWAP orders; optional and ignored for reduce-only.
|
|
3398
|
+
* @example 5
|
|
3399
|
+
*/
|
|
3400
|
+
leverage?: string | null;
|
|
3401
|
+
/**
|
|
3402
|
+
* @description Strategy key used to group risk buckets for margin orders
|
|
3403
|
+
* @example my-strategy
|
|
3404
|
+
*/
|
|
3405
|
+
strategyKey?: string | null;
|
|
3406
|
+
/**
|
|
3407
|
+
* @description Use master account balance for sub-account orders
|
|
3408
|
+
* @example false
|
|
3409
|
+
*/
|
|
3410
|
+
useMasterBalance?: boolean | null;
|
|
3411
|
+
/**
|
|
3412
|
+
* @description Client-assigned idempotency key (max 36 chars), unique per user and application. A duplicate is rejected with 409.
|
|
3413
|
+
* @example oms-3f6a1c
|
|
3414
|
+
*/
|
|
3415
|
+
clientTwapId?: string | null;
|
|
3416
|
+
};
|
|
3417
|
+
CreateTwapOrderResponse: {
|
|
3418
|
+
/**
|
|
3419
|
+
* Format: uuid
|
|
3420
|
+
* @description Created TWAP parent order UUID
|
|
3421
|
+
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
3422
|
+
*/
|
|
3423
|
+
twapOrderId?: string | null;
|
|
3424
|
+
/**
|
|
3425
|
+
* @description Result status: SUCCESS or FAILED. SUCCESS means the parent is durably recorded; execution itself is best-effort within the window.
|
|
3426
|
+
* @example SUCCESS
|
|
3427
|
+
*/
|
|
3428
|
+
status?: string | null;
|
|
3429
|
+
/**
|
|
3430
|
+
* @description Human-readable status message
|
|
3431
|
+
* @example TWAP order created successfully
|
|
3432
|
+
*/
|
|
3433
|
+
message?: string | null;
|
|
3434
|
+
/**
|
|
3435
|
+
* @description Initial parent state: always PENDING at create; the parent activates on its first attempted slice
|
|
3436
|
+
* @example PENDING
|
|
3437
|
+
*/
|
|
3438
|
+
state?: string | null;
|
|
3439
|
+
/**
|
|
3440
|
+
* Format: uuid
|
|
3441
|
+
* @description Resolved margin account UUID for margin TWAP orders
|
|
3442
|
+
*/
|
|
3443
|
+
marginAccountId?: string | null;
|
|
3444
|
+
/**
|
|
3445
|
+
* Format: uuid
|
|
3446
|
+
* @description Resolved isolated risk bucket UUID for risk-bucket-scoped margin TWAP orders
|
|
3447
|
+
*/
|
|
3448
|
+
riskBucketId?: string | null;
|
|
3449
|
+
/**
|
|
3450
|
+
* Format: int32
|
|
3451
|
+
* @description Number of slices in the planned schedule
|
|
3452
|
+
* @example 120
|
|
3453
|
+
*/
|
|
3454
|
+
plannedSlices?: number | null;
|
|
3455
|
+
/**
|
|
3456
|
+
* @description Planned time of the first slice (ISO 8601)
|
|
3457
|
+
* @example 2026-08-01T10:00:27Z
|
|
3458
|
+
*/
|
|
3459
|
+
firstSliceAt?: string | null;
|
|
3460
|
+
/**
|
|
3461
|
+
* @description Resolved window end (ISO 8601). Execution never continues past it.
|
|
3462
|
+
* @example 2026-08-01T11:00:00Z
|
|
3463
|
+
*/
|
|
3464
|
+
endTime?: string | null;
|
|
3465
|
+
};
|
|
3212
3466
|
DelegatedAgent: {
|
|
3213
3467
|
/**
|
|
3214
3468
|
* Format: uuid
|
|
@@ -3571,6 +3825,11 @@ export interface components {
|
|
|
3571
3825
|
* @example 1050750000
|
|
3572
3826
|
*/
|
|
3573
3827
|
totalBalanceRaw?: string | null;
|
|
3828
|
+
/**
|
|
3829
|
+
* @description True when this asset is the chain's wrapped-native token (e.g. WSEI): vault deposits can be made in native coin via depositNative (the vault wraps on entry) and withdrawals pay out native
|
|
3830
|
+
* @example true
|
|
3831
|
+
*/
|
|
3832
|
+
wrappedNative?: boolean | null;
|
|
3574
3833
|
};
|
|
3575
3834
|
GetBalancesResponse: {
|
|
3576
3835
|
balances?: components["schemas"]["AccountBalance"][] | null;
|
|
@@ -4528,6 +4787,15 @@ export interface components {
|
|
|
4528
4787
|
* as unavailable, never as zero.
|
|
4529
4788
|
*/
|
|
4530
4789
|
liquidationPrice?: string | null;
|
|
4790
|
+
/**
|
|
4791
|
+
* @description Account distress ratio: maintenance margin required divided by equity
|
|
4792
|
+
* (higher is closer to liquidation). Equity that is zero or negative has no
|
|
4793
|
+
* meaningful quotient, so an account that still owes a maintenance requirement
|
|
4794
|
+
* reports the maximum-decimal sentinel (79228162514264337593543950335,
|
|
4795
|
+
* maximal distress) rather than zero or a negative value, and an account with
|
|
4796
|
+
* no open maintenance requirement reports zero. Clamp the sentinel before
|
|
4797
|
+
* display.
|
|
4798
|
+
*/
|
|
4531
4799
|
marginRatio?: string | null;
|
|
4532
4800
|
/**
|
|
4533
4801
|
* @description Maintenance margin required by this position at mark_price using the
|
|
@@ -5210,6 +5478,27 @@ export interface components {
|
|
|
5210
5478
|
*/
|
|
5211
5479
|
totalPages?: number | null;
|
|
5212
5480
|
};
|
|
5481
|
+
ListTwapOrdersResponse: {
|
|
5482
|
+
orders?: components["schemas"]["TwapOrder"][] | null;
|
|
5483
|
+
/**
|
|
5484
|
+
* Format: uint32
|
|
5485
|
+
* @description Total number of TWAP orders matching the filter
|
|
5486
|
+
* @example 3
|
|
5487
|
+
*/
|
|
5488
|
+
total?: number | null;
|
|
5489
|
+
/**
|
|
5490
|
+
* Format: uint32
|
|
5491
|
+
* @description Current page number
|
|
5492
|
+
* @example 1
|
|
5493
|
+
*/
|
|
5494
|
+
page?: number | null;
|
|
5495
|
+
/**
|
|
5496
|
+
* Format: uint32
|
|
5497
|
+
* @description Items per page
|
|
5498
|
+
* @example 20
|
|
5499
|
+
*/
|
|
5500
|
+
pageSize?: number | null;
|
|
5501
|
+
};
|
|
5213
5502
|
MarginAccountMovement: {
|
|
5214
5503
|
id?: string | null;
|
|
5215
5504
|
movementType?: string | null;
|
|
@@ -5502,6 +5791,14 @@ export interface components {
|
|
|
5502
5791
|
priceAsOf?: string | null;
|
|
5503
5792
|
/** @enum {string|null} */
|
|
5504
5793
|
pricingStatus?: "priced" | "unpriced" | null;
|
|
5794
|
+
/** @description Weighted-average cost per unit of the holding, quote-denominated, from the spot cost-basis engine. Deposits are marked at the last-traded price at deposit time. Present only when a cost-basis checkpoint exists for the asset. */
|
|
5795
|
+
avgCost?: string | null;
|
|
5796
|
+
/** @description Unrealized PnL for the holding: costBasisQuantity x (markPrice - avgCost), quote-denominated. Uses the cost-basis engine's folded quantity so it agrees with the portfolio summary headline. Present only when both a cost-basis checkpoint and a mark price exist. */
|
|
5797
|
+
unrealizedPnl?: string | null;
|
|
5798
|
+
/** @description Unrealized return on the holding's cost basis, as a percentage: unrealizedPnl / (costBasisQuantity x avgCost) x 100. Present only when unrealizedPnl is present and the cost basis is non-zero. */
|
|
5799
|
+
unrealizedRoe?: string | null;
|
|
5800
|
+
/** @description Cumulative realized PnL booked against this holding over its lifetime, gross of fees, quote-denominated. Present only when a cost-basis checkpoint exists for the asset. */
|
|
5801
|
+
cumRealized?: string | null;
|
|
5505
5802
|
};
|
|
5506
5803
|
PortfolioAssetsPerformance: {
|
|
5507
5804
|
pnl?: string | null;
|
|
@@ -6503,6 +6800,15 @@ export interface components {
|
|
|
6503
6800
|
* @description Resolve the full live position size when triggered. Mutually exclusive
|
|
6504
6801
|
* with quantity. For compatibility, omitting both quantity and this field
|
|
6505
6802
|
* also means full-position close.
|
|
6803
|
+
*
|
|
6804
|
+
* Attaching a full-close leg to a position SUPERSEDES that position's
|
|
6805
|
+
* previously active full-close legs of the same condition type: they are
|
|
6806
|
+
* cancelled in the same engine step that creates the replacement, so moving
|
|
6807
|
+
* a take-profit or stop-loss is one call with no window in which the
|
|
6808
|
+
* position holds both levels or neither. Fixed-quantity legs never
|
|
6809
|
+
* participate — laddered partial exits stack — and a superseded leg's
|
|
6810
|
+
* OCO sibling is left active rather than dropped. Legs attached to an entry
|
|
6811
|
+
* order are excluded on both sides.
|
|
6506
6812
|
*/
|
|
6507
6813
|
closePosition?: boolean | null;
|
|
6508
6814
|
};
|
|
@@ -6825,6 +7131,155 @@ export interface components {
|
|
|
6825
7131
|
*/
|
|
6826
7132
|
tradingBalance?: string | null;
|
|
6827
7133
|
};
|
|
7134
|
+
TwapOrder: {
|
|
7135
|
+
/**
|
|
7136
|
+
* Format: uuid
|
|
7137
|
+
* @description TWAP parent order UUID
|
|
7138
|
+
*/
|
|
7139
|
+
twapOrderId?: string | null;
|
|
7140
|
+
/**
|
|
7141
|
+
* Format: uuid
|
|
7142
|
+
* @description Trading pair UUID
|
|
7143
|
+
*/
|
|
7144
|
+
tradingPairId?: string | null;
|
|
7145
|
+
/**
|
|
7146
|
+
* @description Order side: BUY or SELL
|
|
7147
|
+
* @example BUY
|
|
7148
|
+
*/
|
|
7149
|
+
side?: string | null;
|
|
7150
|
+
/**
|
|
7151
|
+
* @description Trading mode: SPOT or MARGIN
|
|
7152
|
+
* @example SPOT
|
|
7153
|
+
*/
|
|
7154
|
+
tradingMode?: string | null;
|
|
7155
|
+
/**
|
|
7156
|
+
* @description Total quantity requested
|
|
7157
|
+
* @example 10
|
|
7158
|
+
*/
|
|
7159
|
+
totalQuantity?: string | null;
|
|
7160
|
+
/**
|
|
7161
|
+
* @description Quantity executed so far across all child orders
|
|
7162
|
+
* @example 4.5
|
|
7163
|
+
*/
|
|
7164
|
+
executedQuantity?: string | null;
|
|
7165
|
+
/**
|
|
7166
|
+
* @description Notional (quote) value executed so far
|
|
7167
|
+
* @example 157500.00
|
|
7168
|
+
*/
|
|
7169
|
+
executedNotional?: string | null;
|
|
7170
|
+
/**
|
|
7171
|
+
* @description Volume-weighted average fill price (executedNotional / executedQuantity); absent until the first fill
|
|
7172
|
+
* @example 35000.00
|
|
7173
|
+
*/
|
|
7174
|
+
averageFillPrice?: string | null;
|
|
7175
|
+
/**
|
|
7176
|
+
* @description Execution progress as a decimal fraction (executedQuantity / totalQuantity, 0 to 1)
|
|
7177
|
+
* @example 0.45
|
|
7178
|
+
*/
|
|
7179
|
+
progress?: string | null;
|
|
7180
|
+
/**
|
|
7181
|
+
* @description Parent-level limit price; absent when only the slippage band protects child orders
|
|
7182
|
+
* @example 35000.00
|
|
7183
|
+
*/
|
|
7184
|
+
limitPrice?: string | null;
|
|
7185
|
+
/**
|
|
7186
|
+
* Format: int32
|
|
7187
|
+
* @description Per-slice protective price band in basis points
|
|
7188
|
+
* @example 100
|
|
7189
|
+
*/
|
|
7190
|
+
slippageToleranceBps?: number | null;
|
|
7191
|
+
/**
|
|
7192
|
+
* @description Whether the parent is reduce-only
|
|
7193
|
+
* @example false
|
|
7194
|
+
*/
|
|
7195
|
+
reduceOnly?: boolean | null;
|
|
7196
|
+
/**
|
|
7197
|
+
* Format: uuid
|
|
7198
|
+
* @description Margin account UUID for margin TWAP orders
|
|
7199
|
+
*/
|
|
7200
|
+
marginAccountId?: string | null;
|
|
7201
|
+
/**
|
|
7202
|
+
* Format: uuid
|
|
7203
|
+
* @description Isolated risk bucket UUID for risk-bucket-scoped margin TWAP orders
|
|
7204
|
+
*/
|
|
7205
|
+
riskBucketId?: string | null;
|
|
7206
|
+
/**
|
|
7207
|
+
* @description Leverage for margin TWAP orders
|
|
7208
|
+
* @example 5
|
|
7209
|
+
*/
|
|
7210
|
+
leverage?: string | null;
|
|
7211
|
+
/**
|
|
7212
|
+
* @description Whether child orders use the master account balance
|
|
7213
|
+
* @example false
|
|
7214
|
+
*/
|
|
7215
|
+
useMasterBalance?: boolean | null;
|
|
7216
|
+
/** @description Strategy key used to group risk buckets */
|
|
7217
|
+
strategyKey?: string | null;
|
|
7218
|
+
/** @description Client-assigned idempotency key */
|
|
7219
|
+
clientTwapId?: string | null;
|
|
7220
|
+
/**
|
|
7221
|
+
* @description Whether seeded size/timing randomization is applied to the schedule
|
|
7222
|
+
* @example true
|
|
7223
|
+
*/
|
|
7224
|
+
randomize?: boolean | null;
|
|
7225
|
+
/**
|
|
7226
|
+
* @description Window start (ISO 8601)
|
|
7227
|
+
* @example 2026-08-01T10:00:00Z
|
|
7228
|
+
*/
|
|
7229
|
+
startTime?: string | null;
|
|
7230
|
+
/**
|
|
7231
|
+
* @description Window end (ISO 8601). Execution stops hard at this time.
|
|
7232
|
+
* @example 2026-08-01T11:00:00Z
|
|
7233
|
+
*/
|
|
7234
|
+
endTime?: string | null;
|
|
7235
|
+
/**
|
|
7236
|
+
* Format: int64
|
|
7237
|
+
* @description Derived base slice interval in milliseconds (stored for audit)
|
|
7238
|
+
* @example 30000
|
|
7239
|
+
*/
|
|
7240
|
+
intervalMs?: number | null;
|
|
7241
|
+
/**
|
|
7242
|
+
* Format: int32
|
|
7243
|
+
* @description Number of slices in the planned schedule
|
|
7244
|
+
* @example 120
|
|
7245
|
+
*/
|
|
7246
|
+
plannedSlices?: number | null;
|
|
7247
|
+
/**
|
|
7248
|
+
* Format: int32
|
|
7249
|
+
* @description Number of child orders placed so far
|
|
7250
|
+
* @example 54
|
|
7251
|
+
*/
|
|
7252
|
+
slicesPlaced?: number | null;
|
|
7253
|
+
/**
|
|
7254
|
+
* Format: int32
|
|
7255
|
+
* @description Number of slices skipped or failed so far (limit price through the market, self-trade prevention, halted market, failed admission). Skips never terminate the parent; the deficit flows into catch-up.
|
|
7256
|
+
* @example 2
|
|
7257
|
+
*/
|
|
7258
|
+
slicesSkipped?: number | null;
|
|
7259
|
+
/**
|
|
7260
|
+
* @description Planned time of the next slice (ISO 8601); absent once the parent is terminal
|
|
7261
|
+
* @example 2026-08-01T10:27:30Z
|
|
7262
|
+
*/
|
|
7263
|
+
nextSliceAt?: string | null;
|
|
7264
|
+
/**
|
|
7265
|
+
* @description Parent state: PENDING, ACTIVE, COMPLETED, or CANCELLED
|
|
7266
|
+
* @example ACTIVE
|
|
7267
|
+
*/
|
|
7268
|
+
state?: string | null;
|
|
7269
|
+
/** @description Terminal cause detail, e.g. an end-of-window shortfall ('ended with shortfall <qty>'); absent for non-terminal parents */
|
|
7270
|
+
terminalReason?: string | null;
|
|
7271
|
+
/**
|
|
7272
|
+
* @description Creation timestamp (ISO 8601)
|
|
7273
|
+
* @example 2026-08-01T09:59:58Z
|
|
7274
|
+
*/
|
|
7275
|
+
createdAt?: string | null;
|
|
7276
|
+
/** @description Last update timestamp (ISO 8601) */
|
|
7277
|
+
updatedAt?: string | null;
|
|
7278
|
+
/** @description Cancellation timestamp (ISO 8601) */
|
|
7279
|
+
cancelledAt?: string | null;
|
|
7280
|
+
/** @description Completion timestamp (ISO 8601) */
|
|
7281
|
+
completedAt?: string | null;
|
|
7282
|
+
};
|
|
6828
7283
|
UpdateLimitRequest: {
|
|
6829
7284
|
/**
|
|
6830
7285
|
* Format: uuid
|
|
@@ -10301,6 +10756,207 @@ export interface operations {
|
|
|
10301
10756
|
};
|
|
10302
10757
|
};
|
|
10303
10758
|
};
|
|
10759
|
+
list_twap_orders: {
|
|
10760
|
+
parameters: {
|
|
10761
|
+
query?: {
|
|
10762
|
+
/** @description Page number (1-indexed) */
|
|
10763
|
+
page?: number;
|
|
10764
|
+
/** @description Items per page (max 100) */
|
|
10765
|
+
pageSize?: number;
|
|
10766
|
+
state?: string;
|
|
10767
|
+
/** @description Trading pair identifier (UUID) */
|
|
10768
|
+
tradingPairId?: string;
|
|
10769
|
+
};
|
|
10770
|
+
header?: never;
|
|
10771
|
+
path?: never;
|
|
10772
|
+
cookie?: never;
|
|
10773
|
+
};
|
|
10774
|
+
requestBody?: never;
|
|
10775
|
+
responses: {
|
|
10776
|
+
/** @description OK */
|
|
10777
|
+
200: {
|
|
10778
|
+
headers: {
|
|
10779
|
+
[name: string]: unknown;
|
|
10780
|
+
};
|
|
10781
|
+
content: {
|
|
10782
|
+
"application/json": components["schemas"]["ListTwapOrdersResponse"];
|
|
10783
|
+
};
|
|
10784
|
+
};
|
|
10785
|
+
/** @description Invalid query parameters */
|
|
10786
|
+
400: {
|
|
10787
|
+
headers: {
|
|
10788
|
+
[name: string]: unknown;
|
|
10789
|
+
};
|
|
10790
|
+
content?: never;
|
|
10791
|
+
};
|
|
10792
|
+
/** @description Authentication required */
|
|
10793
|
+
401: {
|
|
10794
|
+
headers: {
|
|
10795
|
+
[name: string]: unknown;
|
|
10796
|
+
};
|
|
10797
|
+
content?: never;
|
|
10798
|
+
};
|
|
10799
|
+
/** @description Internal server error */
|
|
10800
|
+
500: {
|
|
10801
|
+
headers: {
|
|
10802
|
+
[name: string]: unknown;
|
|
10803
|
+
};
|
|
10804
|
+
content?: never;
|
|
10805
|
+
};
|
|
10806
|
+
};
|
|
10807
|
+
};
|
|
10808
|
+
create_twap_order: {
|
|
10809
|
+
parameters: {
|
|
10810
|
+
query?: never;
|
|
10811
|
+
header?: never;
|
|
10812
|
+
path?: never;
|
|
10813
|
+
cookie?: never;
|
|
10814
|
+
};
|
|
10815
|
+
requestBody: {
|
|
10816
|
+
content: {
|
|
10817
|
+
"application/json": components["schemas"]["CreateTwapOrderRequest"];
|
|
10818
|
+
};
|
|
10819
|
+
};
|
|
10820
|
+
responses: {
|
|
10821
|
+
/** @description OK */
|
|
10822
|
+
200: {
|
|
10823
|
+
headers: {
|
|
10824
|
+
[name: string]: unknown;
|
|
10825
|
+
};
|
|
10826
|
+
content: {
|
|
10827
|
+
"application/json": components["schemas"]["CreateTwapOrderResponse"];
|
|
10828
|
+
};
|
|
10829
|
+
};
|
|
10830
|
+
/** @description Invalid TWAP parameters (window bounds, quantity too small or too large to slice, margin field mismatch) or per-user active TWAP cap reached */
|
|
10831
|
+
400: {
|
|
10832
|
+
headers: {
|
|
10833
|
+
[name: string]: unknown;
|
|
10834
|
+
};
|
|
10835
|
+
content?: never;
|
|
10836
|
+
};
|
|
10837
|
+
/** @description Authentication required or delegated-agent session (rejected for TWAP) */
|
|
10838
|
+
401: {
|
|
10839
|
+
headers: {
|
|
10840
|
+
[name: string]: unknown;
|
|
10841
|
+
};
|
|
10842
|
+
content?: never;
|
|
10843
|
+
};
|
|
10844
|
+
/** @description Duplicate clientTwapId for this user and application */
|
|
10845
|
+
409: {
|
|
10846
|
+
headers: {
|
|
10847
|
+
[name: string]: unknown;
|
|
10848
|
+
};
|
|
10849
|
+
content?: never;
|
|
10850
|
+
};
|
|
10851
|
+
/** @description Internal server error or matching engine failure */
|
|
10852
|
+
500: {
|
|
10853
|
+
headers: {
|
|
10854
|
+
[name: string]: unknown;
|
|
10855
|
+
};
|
|
10856
|
+
content?: never;
|
|
10857
|
+
};
|
|
10858
|
+
};
|
|
10859
|
+
};
|
|
10860
|
+
get_twap_order: {
|
|
10861
|
+
parameters: {
|
|
10862
|
+
query?: never;
|
|
10863
|
+
header?: never;
|
|
10864
|
+
path: {
|
|
10865
|
+
twapOrderId: string;
|
|
10866
|
+
};
|
|
10867
|
+
cookie?: never;
|
|
10868
|
+
};
|
|
10869
|
+
requestBody?: never;
|
|
10870
|
+
responses: {
|
|
10871
|
+
/** @description OK */
|
|
10872
|
+
200: {
|
|
10873
|
+
headers: {
|
|
10874
|
+
[name: string]: unknown;
|
|
10875
|
+
};
|
|
10876
|
+
content: {
|
|
10877
|
+
"application/json": components["schemas"]["TwapOrder"];
|
|
10878
|
+
};
|
|
10879
|
+
};
|
|
10880
|
+
/** @description Invalid TWAP order ID format */
|
|
10881
|
+
400: {
|
|
10882
|
+
headers: {
|
|
10883
|
+
[name: string]: unknown;
|
|
10884
|
+
};
|
|
10885
|
+
content?: never;
|
|
10886
|
+
};
|
|
10887
|
+
/** @description Authentication required */
|
|
10888
|
+
401: {
|
|
10889
|
+
headers: {
|
|
10890
|
+
[name: string]: unknown;
|
|
10891
|
+
};
|
|
10892
|
+
content?: never;
|
|
10893
|
+
};
|
|
10894
|
+
/** @description TWAP order not found */
|
|
10895
|
+
404: {
|
|
10896
|
+
headers: {
|
|
10897
|
+
[name: string]: unknown;
|
|
10898
|
+
};
|
|
10899
|
+
content?: never;
|
|
10900
|
+
};
|
|
10901
|
+
/** @description Internal server error */
|
|
10902
|
+
500: {
|
|
10903
|
+
headers: {
|
|
10904
|
+
[name: string]: unknown;
|
|
10905
|
+
};
|
|
10906
|
+
content?: never;
|
|
10907
|
+
};
|
|
10908
|
+
};
|
|
10909
|
+
};
|
|
10910
|
+
cancel_twap_order: {
|
|
10911
|
+
parameters: {
|
|
10912
|
+
query?: never;
|
|
10913
|
+
header?: never;
|
|
10914
|
+
path: {
|
|
10915
|
+
twapOrderId: string;
|
|
10916
|
+
};
|
|
10917
|
+
cookie?: never;
|
|
10918
|
+
};
|
|
10919
|
+
requestBody?: never;
|
|
10920
|
+
responses: {
|
|
10921
|
+
/** @description OK */
|
|
10922
|
+
200: {
|
|
10923
|
+
headers: {
|
|
10924
|
+
[name: string]: unknown;
|
|
10925
|
+
};
|
|
10926
|
+
content: {
|
|
10927
|
+
"application/json": components["schemas"]["CancelTwapOrderResponse"];
|
|
10928
|
+
};
|
|
10929
|
+
};
|
|
10930
|
+
/** @description Invalid TWAP order ID or order already terminal */
|
|
10931
|
+
400: {
|
|
10932
|
+
headers: {
|
|
10933
|
+
[name: string]: unknown;
|
|
10934
|
+
};
|
|
10935
|
+
content?: never;
|
|
10936
|
+
};
|
|
10937
|
+
/** @description Authentication required or delegated-agent session (rejected for TWAP) */
|
|
10938
|
+
401: {
|
|
10939
|
+
headers: {
|
|
10940
|
+
[name: string]: unknown;
|
|
10941
|
+
};
|
|
10942
|
+
content?: never;
|
|
10943
|
+
};
|
|
10944
|
+
/** @description TWAP order not found */
|
|
10945
|
+
404: {
|
|
10946
|
+
headers: {
|
|
10947
|
+
[name: string]: unknown;
|
|
10948
|
+
};
|
|
10949
|
+
content?: never;
|
|
10950
|
+
};
|
|
10951
|
+
/** @description Internal server error */
|
|
10952
|
+
500: {
|
|
10953
|
+
headers: {
|
|
10954
|
+
[name: string]: unknown;
|
|
10955
|
+
};
|
|
10956
|
+
content?: never;
|
|
10957
|
+
};
|
|
10958
|
+
};
|
|
10959
|
+
};
|
|
10304
10960
|
get_order_by_id: {
|
|
10305
10961
|
parameters: {
|
|
10306
10962
|
query?: never;
|