@0xmonaco/types 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +1 -3
  2. package/dist/analytics/builders.d.ts +135 -0
  3. package/dist/analytics/builders.js +11 -0
  4. package/dist/analytics/index.d.ts +153 -0
  5. package/dist/analytics/index.js +27 -0
  6. package/dist/analytics/wallets.d.ts +205 -0
  7. package/dist/analytics/wallets.js +16 -0
  8. package/dist/applications/requests.d.ts +5 -5
  9. package/dist/buildercodes/index.d.ts +13 -11
  10. package/dist/buildercodes/responses.d.ts +1 -0
  11. package/dist/buildercodes/responses.js +10 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +1 -0
  14. package/dist/margin-accounts/index.d.ts +7 -2
  15. package/dist/market/index.d.ts +19 -20
  16. package/dist/profile/index.d.ts +10 -17
  17. package/dist/rfq/responses.d.ts +145 -0
  18. package/dist/rfq/responses.js +102 -0
  19. package/dist/sdk/index.d.ts +4 -1
  20. package/dist/trading/index.d.ts +7 -3
  21. package/dist/trading/orders.d.ts +11 -0
  22. package/dist/trading/responses.d.ts +9 -3
  23. package/dist/validation/margin-accounts.d.ts +2 -2
  24. package/dist/validation/margin-accounts.js +5 -5
  25. package/dist/validation/trading.d.ts +15 -0
  26. package/dist/validation/trading.js +34 -42
  27. package/dist/websocket/base.d.ts +40 -10
  28. package/dist/websocket/client.d.ts +32 -4
  29. package/dist/websocket/depth.d.ts +142 -0
  30. package/dist/websocket/depth.js +13 -0
  31. package/dist/websocket/events/market-stats-events.d.ts +19 -0
  32. package/dist/websocket/events/orderbook-events.d.ts +41 -1
  33. package/dist/websocket/events/position-events.d.ts +3 -2
  34. package/dist/websocket/events/rfq-events.d.ts +51 -1
  35. package/dist/websocket/events/trade-events.d.ts +37 -0
  36. package/dist/websocket/index.d.ts +1 -0
  37. package/dist/websocket/index.js +1 -0
  38. package/dist/websocket/snapshots.d.ts +23 -1
  39. package/dist/wire/operations.d.ts +1 -1
  40. package/dist/wire/operations.js +16 -0
  41. package/dist/wire/schema.d.ts +2485 -308
  42. package/package.json +2 -2
@@ -434,6 +434,329 @@ export interface paths {
434
434
  patch?: never;
435
435
  trace?: never;
436
436
  };
437
+ "/api/v1/analytics/builder-leaderboard": {
438
+ parameters: {
439
+ query?: never;
440
+ header?: never;
441
+ path?: never;
442
+ cookie?: never;
443
+ };
444
+ /**
445
+ * Builder leaderboard
446
+ * @description Displayed builders ranked by volume over a window, largest first.
447
+ */
448
+ get: operations["list_builder_leaderboard"];
449
+ put?: never;
450
+ post?: never;
451
+ delete?: never;
452
+ options?: never;
453
+ head?: never;
454
+ patch?: never;
455
+ trace?: never;
456
+ };
457
+ "/api/v1/analytics/builders": {
458
+ parameters: {
459
+ query?: never;
460
+ header?: never;
461
+ path?: never;
462
+ cookie?: never;
463
+ };
464
+ /**
465
+ * Builders
466
+ * @description Every displayed builder, by name. Archived applications are left out.
467
+ */
468
+ get: operations["list_builders"];
469
+ put?: never;
470
+ post?: never;
471
+ delete?: never;
472
+ options?: never;
473
+ head?: never;
474
+ patch?: never;
475
+ trace?: never;
476
+ };
477
+ "/api/v1/analytics/builders/{builder}": {
478
+ parameters: {
479
+ query?: never;
480
+ header?: never;
481
+ path?: never;
482
+ cookie?: never;
483
+ };
484
+ /**
485
+ * Builder
486
+ * @description One builder, by application or group uuid, code, or application client id.
487
+ */
488
+ get: operations["get_builder"];
489
+ put?: never;
490
+ post?: never;
491
+ delete?: never;
492
+ options?: never;
493
+ head?: never;
494
+ patch?: never;
495
+ trace?: never;
496
+ };
497
+ "/api/v1/analytics/builders/{builder}/series": {
498
+ parameters: {
499
+ query?: never;
500
+ header?: never;
501
+ path?: never;
502
+ cookie?: never;
503
+ };
504
+ /**
505
+ * Builder series
506
+ * @description One builder's figures per bucket over a window, oldest first.
507
+ */
508
+ get: operations["get_builder_series"];
509
+ put?: never;
510
+ post?: never;
511
+ delete?: never;
512
+ options?: never;
513
+ head?: never;
514
+ patch?: never;
515
+ trace?: never;
516
+ };
517
+ "/api/v1/analytics/builders/{builder}/totals": {
518
+ parameters: {
519
+ query?: never;
520
+ header?: never;
521
+ path?: never;
522
+ cookie?: never;
523
+ };
524
+ /**
525
+ * Builder totals
526
+ * @description One builder's figures over a window.
527
+ */
528
+ get: operations["get_builder_totals"];
529
+ put?: never;
530
+ post?: never;
531
+ delete?: never;
532
+ options?: never;
533
+ head?: never;
534
+ patch?: never;
535
+ trace?: never;
536
+ };
537
+ "/api/v1/analytics/deposits": {
538
+ parameters: {
539
+ query?: never;
540
+ header?: never;
541
+ path?: never;
542
+ cookie?: never;
543
+ };
544
+ /**
545
+ * Vault deposits
546
+ * @description Deposits, newest first.
547
+ */
548
+ get: operations["list_vault_deposits"];
549
+ put?: never;
550
+ post?: never;
551
+ delete?: never;
552
+ options?: never;
553
+ head?: never;
554
+ patch?: never;
555
+ trace?: never;
556
+ };
557
+ "/api/v1/analytics/markets/volume": {
558
+ parameters: {
559
+ query?: never;
560
+ header?: never;
561
+ path?: never;
562
+ cookie?: never;
563
+ };
564
+ /**
565
+ * Market volumes
566
+ * @description Volume per market over a window, largest first.
567
+ */
568
+ get: operations["list_market_volumes"];
569
+ put?: never;
570
+ post?: never;
571
+ delete?: never;
572
+ options?: never;
573
+ head?: never;
574
+ patch?: never;
575
+ trace?: never;
576
+ };
577
+ "/api/v1/analytics/protocol/series": {
578
+ parameters: {
579
+ query?: never;
580
+ header?: never;
581
+ path?: never;
582
+ cookie?: never;
583
+ };
584
+ /**
585
+ * Protocol series
586
+ * @description Protocol figures per bucket over a window, oldest first.
587
+ */
588
+ get: operations["get_protocol_series"];
589
+ put?: never;
590
+ post?: never;
591
+ delete?: never;
592
+ options?: never;
593
+ head?: never;
594
+ patch?: never;
595
+ trace?: never;
596
+ };
597
+ "/api/v1/analytics/protocol/totals": {
598
+ parameters: {
599
+ query?: never;
600
+ header?: never;
601
+ path?: never;
602
+ cookie?: never;
603
+ };
604
+ /**
605
+ * Protocol totals
606
+ * @description Protocol totals over a window.
607
+ */
608
+ get: operations["get_protocol_totals"];
609
+ put?: never;
610
+ post?: never;
611
+ delete?: never;
612
+ options?: never;
613
+ head?: never;
614
+ patch?: never;
615
+ trace?: never;
616
+ };
617
+ "/api/v1/analytics/tokens": {
618
+ parameters: {
619
+ query?: never;
620
+ header?: never;
621
+ path?: never;
622
+ cookie?: never;
623
+ };
624
+ /**
625
+ * Token custody
626
+ * @description Custody per token and the total value locked.
627
+ */
628
+ get: operations["list_token_custody"];
629
+ put?: never;
630
+ post?: never;
631
+ delete?: never;
632
+ options?: never;
633
+ head?: never;
634
+ patch?: never;
635
+ trace?: never;
636
+ };
637
+ "/api/v1/analytics/tokens/{token}": {
638
+ parameters: {
639
+ query?: never;
640
+ header?: never;
641
+ path?: never;
642
+ cookie?: never;
643
+ };
644
+ /**
645
+ * Token custody detail
646
+ * @description One token's custody, by symbol, asset UUID or contract address.
647
+ */
648
+ get: operations["get_token_custody"];
649
+ put?: never;
650
+ post?: never;
651
+ delete?: never;
652
+ options?: never;
653
+ head?: never;
654
+ patch?: never;
655
+ trace?: never;
656
+ };
657
+ "/api/v1/analytics/treasury/net-fees": {
658
+ parameters: {
659
+ query?: never;
660
+ header?: never;
661
+ path?: never;
662
+ cookie?: never;
663
+ };
664
+ /**
665
+ * Treasury net fees
666
+ * @description The treasury's all-time net fees.
667
+ */
668
+ get: operations["get_treasury_net_fees"];
669
+ put?: never;
670
+ post?: never;
671
+ delete?: never;
672
+ options?: never;
673
+ head?: never;
674
+ patch?: never;
675
+ trace?: never;
676
+ };
677
+ "/api/v1/analytics/wallet-leaderboard": {
678
+ parameters: {
679
+ query?: never;
680
+ header?: never;
681
+ path?: never;
682
+ cookie?: never;
683
+ };
684
+ /**
685
+ * Wallet leaderboard
686
+ * @description Wallets ranked by all-time taker volume, largest first. One row per
687
+ * wallet, every builder counted.
688
+ */
689
+ get: operations["list_wallet_leaderboard"];
690
+ put?: never;
691
+ post?: never;
692
+ delete?: never;
693
+ options?: never;
694
+ head?: never;
695
+ patch?: never;
696
+ trace?: never;
697
+ };
698
+ "/api/v1/analytics/wallets/{wallet}": {
699
+ parameters: {
700
+ query?: never;
701
+ header?: never;
702
+ path?: never;
703
+ cookie?: never;
704
+ };
705
+ /**
706
+ * Wallet summary
707
+ * @description One wallet's all-time taker volume and trades, per displayed builder,
708
+ * and its liquidation count. A wallet that never traded answers with
709
+ * empty figures.
710
+ */
711
+ get: operations["get_wallet_summary"];
712
+ put?: never;
713
+ post?: never;
714
+ delete?: never;
715
+ options?: never;
716
+ head?: never;
717
+ patch?: never;
718
+ trace?: never;
719
+ };
720
+ "/api/v1/analytics/wallets/{wallet}/liquidations": {
721
+ parameters: {
722
+ query?: never;
723
+ header?: never;
724
+ path?: never;
725
+ cookie?: never;
726
+ };
727
+ /**
728
+ * Wallet liquidations
729
+ * @description One wallet's liquidation events across every market, newest first.
730
+ */
731
+ get: operations["list_wallet_liquidations"];
732
+ put?: never;
733
+ post?: never;
734
+ delete?: never;
735
+ options?: never;
736
+ head?: never;
737
+ patch?: never;
738
+ trace?: never;
739
+ };
740
+ "/api/v1/analytics/withdrawals": {
741
+ parameters: {
742
+ query?: never;
743
+ header?: never;
744
+ path?: never;
745
+ cookie?: never;
746
+ };
747
+ /**
748
+ * Vault withdrawals
749
+ * @description Withdrawals, newest first.
750
+ */
751
+ get: operations["list_vault_withdrawals"];
752
+ put?: never;
753
+ post?: never;
754
+ delete?: never;
755
+ options?: never;
756
+ head?: never;
757
+ patch?: never;
758
+ trace?: never;
759
+ };
437
760
  "/api/v1/applications/balances": {
438
761
  parameters: {
439
762
  query?: never;
@@ -938,12 +1261,25 @@ export interface paths {
938
1261
  *
939
1262
  * A claim can also fail as **HTTP 503** / **UNAVAILABLE** when the matching
940
1263
  * engine is unreachable, restarting, or slow to answer. Treat that as an
941
- * UNKNOWN outcome, NOT a rejection. The request is admitted to the sequencer
1264
+ * UNKNOWN outcome, NOT a rejection: the request is admitted to the sequencer
942
1265
  * before its reply is sent, so a claim that timed out in transit may still
943
- * commit, and there is no idempotency key — a blind retry can claim a SECOND
944
- * time. Do NOT retry automatically, and do not settle it with a balance
945
- * read: an admitted claim can still be sitting in the sequencer queue when
946
- * the balance is read, so an unchanged balance does not prove the claim will
1266
+ * commit.
1267
+ *
1268
+ * Send an `idempotencyKey` to make that retry safe. Retrying the same key
1269
+ * and request within 15 minutes of the original acceptance returns the
1270
+ * original claim's result without moving money again, including when the
1271
+ * original is still queued, so the retry waits for it. The same key with a
1272
+ * different request, or a key already used on another endpoint, is refused
1273
+ * with `IDEMPOTENCY_KEY_CONFLICT` (**HTTP 409** / **ALREADY_EXISTS**).
1274
+ * `ORDER_SUBMISSION_UNAVAILABLE` and `ORDER_SUBMISSION_CAPACITY_EXCEEDED`
1275
+ * (**HTTP 503** / **UNAVAILABLE**) mean the outcome is held but cannot be
1276
+ * read, or no new key can be accepted: retry with the same key and request.
1277
+ * The window does not extend on retries; after it the key claims again.
1278
+ *
1279
+ * Without a key, a blind retry can claim a SECOND time.
1280
+ * Do NOT retry automatically, and do not settle it with a balance read: an
1281
+ * admitted claim can still be sitting in the sequencer queue when the
1282
+ * balance is read, so an unchanged balance does not prove the claim will
947
1283
  * not commit. Treat the claim as PENDING rather than failed, re-check once
948
1284
  * the engine is healthy again, and reconcile before issuing another claim.
949
1285
  *
@@ -2544,9 +2880,10 @@ export interface paths {
2544
2880
  * Orderbook Snapshot
2545
2881
  * @description Orderbook Snapshot
2546
2882
  *
2547
- * Get the complete orderbook snapshot for a trading pair showing all bids
2548
- * and asks with their price levels. This is a public endpoint that does
2549
- * not require authentication.
2883
+ * Get a point-in-time orderbook snapshot for a trading pair: the top bid
2884
+ * and ask price levels, up to 1000 per side. Above 100 levels the snapshot
2885
+ * is read from the market-data service and carries bookSeq. This is a
2886
+ * public endpoint that does not require authentication.
2550
2887
  */
2551
2888
  get: operations["get_orderbook_snapshot"];
2552
2889
  put?: never;
@@ -2601,8 +2938,17 @@ export interface paths {
2601
2938
  * Batch cancel specific orders
2602
2939
  * @description Batch cancel specific orders.
2603
2940
  *
2604
- * Cancel multiple specific orders by their IDs. For canceling all orders,
2605
- * use /batch-cancel-all or /batch-cancel-all/{tradingPairId}.
2941
+ * Cancel multiple specific orders by their IDs. Every requested ID gets one
2942
+ * entry in `results`, in request order (a repeated ID is answered at each
2943
+ * occurrence), and the totals count every requested ID, so
2944
+ * `totalRequested == totalCancelled + totalFailed`. An ID that is not one of
2945
+ * your live orders (unknown, another user's, or already filled or
2946
+ * cancelled) is a failed entry with code `ORDER_NOT_FOUND`. An order the
2947
+ * matching engine accepted is cancellable as soon as it is acknowledged.
2948
+ * A delegated session's cancel policy is checked against each order's
2949
+ * persisted fields: an ID with no persisted order yet is a failed entry
2950
+ * (`BAD_REQUEST`) and is not cancelled. For canceling all orders, use
2951
+ * /batch-cancel-all or /batch-cancel-all/{tradingPairId}.
2606
2952
  */
2607
2953
  post: operations["batch_cancel_orders"];
2608
2954
  delete?: never;
@@ -4047,6 +4393,27 @@ export interface components {
4047
4393
  */
4048
4394
  copyAccountAvailable?: string | null;
4049
4395
  };
4396
+ /** @description The window a response covers, as the server resolved it. */
4397
+ AnalyticsWindow: {
4398
+ /**
4399
+ * Format: int64
4400
+ * @description Window start as Unix milliseconds. Buckets starting at or after it count.
4401
+ * @example 1762041600000
4402
+ */
4403
+ startTime?: number | null;
4404
+ /**
4405
+ * Format: int64
4406
+ * @description Window end as Unix milliseconds. Buckets starting at or before it count, so the bucket holding it (usually partial) is included.
4407
+ * @example 1762128000000
4408
+ */
4409
+ endTime?: number | null;
4410
+ /**
4411
+ * @description Bucket size the window is counted in: hour up to 2.5 days, day up to 45 days, week beyond. UTC; weeks start Monday.
4412
+ * @example hour
4413
+ * @enum {string|null}
4414
+ */
4415
+ granularity?: "hour" | "day" | "week" | null;
4416
+ };
4050
4417
  AppUser: {
4051
4418
  /**
4052
4419
  * Format: uuid
@@ -4322,22 +4689,23 @@ export interface components {
4322
4689
  BatchCancelOrdersResponse: {
4323
4690
  /**
4324
4691
  * Format: int32
4325
- * @description Number of orders requested to cancel
4692
+ * @description Number of order IDs in the request, repeats included. Always equals totalCancelled + totalFailed and the length of results.
4326
4693
  * @example 5
4327
4694
  */
4328
4695
  totalRequested?: number | null;
4329
4696
  /**
4330
4697
  * Format: int32
4331
- * @description Number of orders successfully cancelled
4698
+ * @description Number of results with cancelledAt and no error
4332
4699
  * @example 4
4333
4700
  */
4334
4701
  totalCancelled?: number | null;
4335
4702
  /**
4336
4703
  * Format: int32
4337
- * @description Number of cancellations that failed
4704
+ * @description Number of results with an error, including IDs that are unknown or not yours (ORDER_NOT_FOUND)
4338
4705
  * @example 1
4339
4706
  */
4340
4707
  totalFailed?: number | null;
4708
+ /** @description One result per requested order ID, in request order */
4341
4709
  results?: components["schemas"]["BatchCancelResult"][] | null;
4342
4710
  };
4343
4711
  BatchCancelResult: {
@@ -4465,7 +4833,7 @@ export interface components {
4465
4833
  */
4466
4834
  quantity: string;
4467
4835
  /**
4468
- * @description Trading mode: SPOT or MARGIN (default: SPOT)
4836
+ * @description Trading mode: SPOT or MARGIN. Omitted, it takes the trading pair market type
4469
4837
  * @example SPOT
4470
4838
  */
4471
4839
  tradingMode?: string | null;
@@ -4525,8 +4893,8 @@ export interface components {
4525
4893
  */
4526
4894
  reduceOnly?: boolean | null;
4527
4895
  /**
4528
- * @description Strategy key used to group risk buckets for delegated/margin orders
4529
- * @example my-strategy
4896
+ * @description Sub-account key of the margin account the order trades on, like marginAccountId (`default` is the default margin account). Refused when it is not a valid sub-account key or disagrees with marginAccountId; a key naming none of the caller's open sub-accounts is refused by the matching engine.
4897
+ * @example hedge
4530
4898
  */
4531
4899
  strategyKey?: string | null;
4532
4900
  /**
@@ -4541,7 +4909,7 @@ export interface components {
4541
4909
  */
4542
4910
  postOnly?: boolean | null;
4543
4911
  /**
4544
- * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: an item reusing a value another of your resting orders still holds fails that item alone — the batch itself returns 2xx / OK and the offending item's result slot carries error.code CLIENT_ORDER_ID_CONFLICT; no transport-level 409 / ALREADY_EXISTS is raised. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key: resubmitting after a lost response can execute a second time. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and its fan-out is non-persistent Core NATS: the service can re-establish an ended upstream subscription without closing your socket, so events can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. Rejections split in two: an item rejected before acceptance (malformed, post-only would cross, handle conflict, a plain MARKET submit with no liquidity, rejected during pricing) fails only that item — a per-item error in an otherwise-successful response — emits no event and is never written to order history (an item rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent); an accepted LIMIT with IOC or FOK that cannot fill, or an accepted MARKET order whose apparent liquidity is invalidated by maker-risk revalidation, reports matchResult.status REJECTED in its result slot and emits OrderPlaced then OrderRejected, both carrying this value. Neither the batch's 2xx nor a populated result slot therefore means the order executed. Where no surface is conclusive, do not resubmit.
4912
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: an item reusing a value another of your resting orders still holds fails that item alone — the batch itself returns 2xx / OK and the offending item's result slot carries error.code CLIENT_ORDER_ID_CONFLICT; no transport-level 409 / ALREADY_EXISTS is raised. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key: resubmitting after a lost response can execute a second time. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and events are not persisted for redelivery, so one can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. Rejections split in two: an item rejected before acceptance (malformed, post-only would cross, handle conflict, a plain MARKET submit with no liquidity, rejected during pricing) fails only that item — a per-item error in an otherwise-successful response — emits no event and is never written to order history (an item rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent); an accepted LIMIT with IOC or FOK that cannot fill, or an accepted MARKET order whose apparent liquidity is invalidated by maker-risk revalidation, reports matchResult.status REJECTED in its result slot and emits OrderPlaced then OrderRejected, both carrying this value. Neither the batch's 2xx nor a populated result slot therefore means the order executed. Where no surface is conclusive, do not resubmit.
4545
4913
  * @example quote-btc-1130-a
4546
4914
  */
4547
4915
  clientOrderId?: string | null;
@@ -4628,7 +4996,7 @@ export interface components {
4628
4996
  */
4629
4997
  postOnly?: boolean | null;
4630
4998
  /**
4631
- * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: an item reusing a value another of your resting orders still holds fails that item alone — the batch itself returns 2xx / OK and the offending item's result slot carries error.code CLIENT_ORDER_ID_CONFLICT; no transport-level 409 / ALREADY_EXISTS is raised. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key, though on this replace path a retry cannot double-execute: the request names the original order id, and the sequencer revalidates that original in memory and on the book at sequence time, so once the first replacement succeeds the original is gone and a retry is rejected with ORDER_NOT_FOUND rather than placing a second order. That code is itself ambiguous — the original may instead have filled or been cancelled — so the risk here is acting on a stale view, not duplicate execution. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and its fan-out is non-persistent Core NATS: the service can re-establish an ended upstream subscription without closing your socket, so events can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. A replace item carries no order type or time-in-force and its original must still be RESTING, so the IOC/FOK and MARKET post-acceptance rejection shapes are unreachable here. Failures split by WHEN they occur, and the difference decides whether your original survives. Before sequencing: every validation failure — a malformed value included — fails ITS ITEM alone with a structured error.code (INVALID_CLIENT_ORDER_ID for a malformed handle, the same code batch-create uses) and no mutation and no event, batch-create parity; the whole request 400s only for an empty or oversize batch. (Earlier releases rejected the whole batch for a malformed value here.) A pre-cancel gate then drops two more classes before anything is cancelled — a handle conflict, and a post-only replacement that would cross the book as it will stand once this batch's originals are cancelled — so in the ordinary POST_ONLY_WOULD_CROSS case the item fails with its original still RESTING and untouched. After that the endpoint is CANCEL-FIRST: the original is cancelled in pass 1, so a residual placement failure then — a self-trade rejection, or a crossing that only became apparent in pass 2 — leaves the original CANCELLED and emits its cancellation events (terminal reason 'replaced') while the item reports the placement error and no replacement is placed. Never assume a failed item left your original resting; read results[] and the stream. Single ReplaceOrder differs: it is atomic, and a rejected replacement leaves the original untouched. Where no surface is conclusive, do not resubmit. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
4999
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: an item reusing a value another of your resting orders still holds fails that item alone — the batch itself returns 2xx / OK and the offending item's result slot carries error.code CLIENT_ORDER_ID_CONFLICT; no transport-level 409 / ALREADY_EXISTS is raised. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key, though on this replace path a retry cannot double-execute: the request names the original order id, and the sequencer revalidates that original in memory and on the book at sequence time, so once the first replacement succeeds the original is gone and a retry is rejected with ORDER_NOT_FOUND rather than placing a second order. That code is itself ambiguous — the original may instead have filled or been cancelled — so the risk here is acting on a stale view, not duplicate execution. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and events are not persisted for redelivery, so one can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. A replace item carries no order type or time-in-force and its original must still be RESTING, so the IOC/FOK and MARKET post-acceptance rejection shapes are unreachable here. Failures split by WHEN they occur, and the difference decides whether your original survives. Before sequencing: every validation failure — a malformed value included — fails ITS ITEM alone with a structured error.code (INVALID_CLIENT_ORDER_ID for a malformed handle, the same code batch-create uses) and no mutation and no event, batch-create parity; the whole request 400s only for an empty or oversize batch. (Earlier releases rejected the whole batch for a malformed value here.) A pre-cancel gate then drops two more classes before anything is cancelled — a handle conflict, and a post-only replacement that would cross the book as it will stand once this batch's originals are cancelled — so in the ordinary POST_ONLY_WOULD_CROSS case the item fails with its original still RESTING and untouched. After that the endpoint is CANCEL-FIRST: the original is cancelled in pass 1, so a residual placement failure then — a self-trade rejection, or a crossing that only became apparent in pass 2 — leaves the original CANCELLED and emits its cancellation events (terminal reason 'replaced') while the item reports the placement error and no replacement is placed. Never assume a failed item left your original resting; read results[] and the stream. Single ReplaceOrder differs: it is atomic, and a rejected replacement leaves the original untouched. Where no surface is conclusive, do not resubmit. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
4632
5000
  * @example quote-btc-1130-a
4633
5001
  */
4634
5002
  clientOrderId?: string | null;
@@ -4680,6 +5048,100 @@ export interface components {
4680
5048
  matchResult?: components["schemas"]["MatchResult"];
4681
5049
  error?: components["schemas"]["BatchReplaceError"];
4682
5050
  };
5051
+ /** @description A builder's identity: an application, or a display group of applications. */
5052
+ Builder: {
5053
+ /**
5054
+ * Format: uuid
5055
+ * @description Application UUID, or display group UUID when kind is group
5056
+ * @example 789e0123-e45b-12d3-a456-426614174000
5057
+ */
5058
+ id?: string | null;
5059
+ /**
5060
+ * @description application: one application. group: a display group of several applications shown as one builder.
5061
+ * @example application
5062
+ * @enum {string|null}
5063
+ */
5064
+ kind?: "application" | "group" | null;
5065
+ /**
5066
+ * @description Display name
5067
+ * @example Monaco SDK
5068
+ */
5069
+ name?: string | null;
5070
+ /**
5071
+ * @description Short display code, if set; also a lookup key
5072
+ * @example MON
5073
+ */
5074
+ code?: string | null;
5075
+ /**
5076
+ * @description Display color, #rrggbb or #rrggbbaa, if set
5077
+ * @example #112233
5078
+ */
5079
+ color?: string | null;
5080
+ /**
5081
+ * @description Shown as verified
5082
+ * @example true
5083
+ */
5084
+ verified?: boolean | null;
5085
+ /**
5086
+ * @description The display group an application is shown under on the directory and the
5087
+ * leaderboard, when it has one. Unset for a group and for an ungrouped
5088
+ * application.
5089
+ */
5090
+ group?: components["schemas"]["BuilderGroupRef"] | null;
5091
+ /**
5092
+ * @description The application itself (kind application), or the group's displayed
5093
+ * applications (kind group). Builder attribution on other responses (wallet
5094
+ * summaries, deposit and withdrawal feeds) may send this empty: there the
5095
+ * builder is an identity only.
5096
+ */
5097
+ applications?: components["schemas"]["BuilderApplication"][] | null;
5098
+ };
5099
+ /** @description One application behind a builder. */
5100
+ BuilderApplication: {
5101
+ /**
5102
+ * Format: uuid
5103
+ * @description Application UUID
5104
+ * @example 789e0123-e45b-12d3-a456-426614174000
5105
+ */
5106
+ id?: string | null;
5107
+ /**
5108
+ * @description Application name
5109
+ * @example Monaco SDK
5110
+ */
5111
+ name?: string | null;
5112
+ /**
5113
+ * @description On-chain client id the application's deposits carry
5114
+ * @example 6fe0da813f1a4adcbe675d52ca530a43
5115
+ */
5116
+ clientId?: string | null;
5117
+ /**
5118
+ * @description Whether the application can place new orders. An inactive builder keeps the volume it routed.
5119
+ * @example true
5120
+ */
5121
+ active?: boolean | null;
5122
+ /**
5123
+ * @description Whether the application is archived. Archived applications are left out of the builder directory but keep their figures.
5124
+ * @example false
5125
+ */
5126
+ archived?: boolean | null;
5127
+ /**
5128
+ * Format: int32
5129
+ * @description Taker add-on the application charges, in basis points
5130
+ * @example 0
5131
+ */
5132
+ additionalTakerFeeBps?: number | null;
5133
+ /**
5134
+ * Format: int32
5135
+ * @description Maker add-on the application charges, in basis points
5136
+ * @example 0
5137
+ */
5138
+ additionalMakerFeeBps?: number | null;
5139
+ /**
5140
+ * @description Whether this is the exchange's default application: the one a sign-in that names no client id is placed under
5141
+ * @example false
5142
+ */
5143
+ isDefault?: boolean | null;
5144
+ };
4683
5145
  BuilderFeeChange: {
4684
5146
  /**
4685
5147
  * @description Who made the change: `BUILDER` (this application's payout wallet) or `ADMIN` (Monaco, on the application's behalf).
@@ -4722,6 +5184,162 @@ export interface components {
4722
5184
  */
4723
5185
  newMakerBps?: number | null;
4724
5186
  };
5187
+ /** @description A group's identity, for an application shown under a display group. */
5188
+ BuilderGroupRef: {
5189
+ /**
5190
+ * Format: uuid
5191
+ * @description Display group UUID; GET /api/v1/analytics/builders/{id} answers the group
5192
+ * @example 5b1e2c9a-0f6d-4e8b-9a71-3c2d4e5f6a7b
5193
+ */
5194
+ id?: string | null;
5195
+ /**
5196
+ * @description The group's display name
5197
+ * @example Monaco
5198
+ */
5199
+ name?: string | null;
5200
+ /**
5201
+ * @description The group's display code, if it has one
5202
+ * @example MON
5203
+ */
5204
+ code?: string | null;
5205
+ };
5206
+ BuilderLeaderboardRow: {
5207
+ builder?: components["schemas"]["Builder"];
5208
+ /**
5209
+ * @description Taker volume in USD (USDC 1:1) of the trades the builder's applications took
5210
+ * @example 25000
5211
+ */
5212
+ volumeUsd?: string | null;
5213
+ /**
5214
+ * @description The spot part of volumeUsd
5215
+ * @example 0
5216
+ */
5217
+ spotVolumeUsd?: string | null;
5218
+ /**
5219
+ * @description The perpetual (margin) part of volumeUsd
5220
+ * @example 25000
5221
+ */
5222
+ perpVolumeUsd?: string | null;
5223
+ /**
5224
+ * Format: int64
5225
+ * @description Trades the builder's applications took
5226
+ * @example 120
5227
+ */
5228
+ tradesCount?: number | null;
5229
+ /**
5230
+ * @description The builder's own fee revenue in USD: taker add-ons on the trades it took plus maker add-ons on the trades it made. Never the protocol taker fee.
5231
+ * @example 12.5
5232
+ */
5233
+ feesUsd?: string | null;
5234
+ /**
5235
+ * @description The taker add-on part of feesUsd
5236
+ * @example 10
5237
+ */
5238
+ takerFeesUsd?: string | null;
5239
+ /**
5240
+ * @description The maker add-on part of feesUsd, earned on trades the builder's applications made, whoever took them
5241
+ * @example 2.5
5242
+ */
5243
+ makerFeesUsd?: string | null;
5244
+ /**
5245
+ * Format: int64
5246
+ * @description Wallets whose first trade through one of the builder's applications fell in the window, counted once per (application, wallet)
5247
+ * @example 4
5248
+ */
5249
+ newTraders?: number | null;
5250
+ /**
5251
+ * Format: int64
5252
+ * @description Distinct taker wallets that traded through the builder in the window, each once however many buckets or applications it traded in. With window=all, every wallet that ever traded through it. Null for a window counted in hours that starts before the 90 days its hourly sets are kept.
5253
+ * @example 18
5254
+ */
5255
+ activeTakers?: number | null;
5256
+ /**
5257
+ * @description USDC deposited through the builder's applications in the window, in USD (1:1). Other tokens are unvalued and not counted.
5258
+ * @example 15000
5259
+ */
5260
+ depositsUsd?: string | null;
5261
+ /**
5262
+ * @description USDC withdrawals initiated through the builder's applications in the window, in USD (1:1). Attributed by the application that initiated the withdrawal; other tokens are unvalued and not counted.
5263
+ * @example 4000
5264
+ */
5265
+ withdrawalsUsd?: string | null;
5266
+ /**
5267
+ * @description depositsUsd less withdrawalsUsd; negative when more left than arrived
5268
+ * @example 11000
5269
+ */
5270
+ netFlowUsd?: string | null;
5271
+ };
5272
+ BuilderSeriesPoint: {
5273
+ /**
5274
+ * Format: int64
5275
+ * @description Bucket start as Unix milliseconds (UTC; weeks start Monday)
5276
+ * @example 1762038000000
5277
+ */
5278
+ bucketStart?: number | null;
5279
+ /**
5280
+ * @description Taker volume in USD (USDC 1:1) of the trades the builder's applications took
5281
+ * @example 1200
5282
+ */
5283
+ volumeUsd?: string | null;
5284
+ /**
5285
+ * @description The spot part of volumeUsd
5286
+ * @example 0
5287
+ */
5288
+ spotVolumeUsd?: string | null;
5289
+ /**
5290
+ * @description The perpetual (margin) part of volumeUsd
5291
+ * @example 1200
5292
+ */
5293
+ perpVolumeUsd?: string | null;
5294
+ /**
5295
+ * Format: int64
5296
+ * @description Trades the builder's applications took
5297
+ * @example 120
5298
+ */
5299
+ tradesCount?: number | null;
5300
+ /**
5301
+ * @description The builder's own fee revenue in USD: taker add-ons on the trades it took plus maker add-ons on the trades it made. Never the protocol taker fee.
5302
+ * @example 12.5
5303
+ */
5304
+ feesUsd?: string | null;
5305
+ /**
5306
+ * @description The taker add-on part of feesUsd
5307
+ * @example 10
5308
+ */
5309
+ takerFeesUsd?: string | null;
5310
+ /**
5311
+ * @description The maker add-on part of feesUsd, earned on trades the builder's applications made, whoever took them
5312
+ * @example 2.5
5313
+ */
5314
+ makerFeesUsd?: string | null;
5315
+ /**
5316
+ * Format: int64
5317
+ * @description Distinct taker wallets that traded through the builder in the bucket
5318
+ * @example 3
5319
+ */
5320
+ activeTakers?: number | null;
5321
+ /**
5322
+ * Format: int64
5323
+ * @description Wallets whose first trade through one of the builder's applications fell in the bucket, counted once per (application, wallet)
5324
+ * @example 1
5325
+ */
5326
+ newTraders?: number | null;
5327
+ /**
5328
+ * @description USDC deposited through the builder's applications in the bucket, in USD (1:1)
5329
+ * @example 500
5330
+ */
5331
+ depositsUsd?: string | null;
5332
+ /**
5333
+ * @description USDC withdrawals initiated through the builder's applications in the bucket, in USD (1:1). Attributed by the application that initiated the withdrawal; other tokens are unvalued and not counted.
5334
+ * @example 4000
5335
+ */
5336
+ withdrawalsUsd?: string | null;
5337
+ /**
5338
+ * @description depositsUsd less withdrawalsUsd; negative when more left than arrived
5339
+ * @example 11000
5340
+ */
5341
+ netFlowUsd?: string | null;
5342
+ };
4725
5343
  BuildercodePayout: {
4726
5344
  /**
4727
5345
  * Format: uuid
@@ -4992,7 +5610,7 @@ export interface components {
4992
5610
  */
4993
5611
  clientId?: string | null;
4994
5612
  /**
4995
- * @description Optional chain ID supplied by SDK clients
5613
+ * @description Optional EVM chain ID supplied by SDK clients, as a JSON number or a decimal string (for example 1329 or "1329")
4996
5614
  * @example 1328
4997
5615
  */
4998
5616
  chainId?: string | null;
@@ -5055,6 +5673,11 @@ export interface components {
5055
5673
  * @example 1000000
5056
5674
  */
5057
5675
  amount: string;
5676
+ /**
5677
+ * @description Optional submission identity, shared with order create (same 1-64 characters from [A-Za-z0-9._:-], same per user and application namespace). Retrying the same key and request within 15 minutes of the original acceptance returns the original claim's result without moving money again; its payoutBalance and tradingBalance are the original claim's. The same key with a different request, or a key already used on another endpoint, returns IDEMPOTENCY_KEY_CONFLICT (HTTP 409 / gRPC ALREADY_EXISTS). ORDER_SUBMISSION_UNAVAILABLE and ORDER_SUBMISSION_CAPACITY_EXCEEDED (HTTP 503 / gRPC UNAVAILABLE) mean the outcome is held but cannot be read, or no new key can be accepted: retry with the same key and request. The window does not extend on retries; after it the key claims again. Generate a fresh key for each intended claim and keep it across retries of that claim.
5678
+ * @example claim-2026-10-28-001
5679
+ */
5680
+ idempotencyKey?: string | null;
5058
5681
  };
5059
5682
  ClaimBuildercodeRewardsResponse: {
5060
5683
  /**
@@ -5322,7 +5945,7 @@ export interface components {
5322
5945
  */
5323
5946
  quantity: string;
5324
5947
  /**
5325
- * @description Trading mode: SPOT or MARGIN (default: SPOT)
5948
+ * @description Trading mode: SPOT or MARGIN. Omitted, it takes the trading pair market type
5326
5949
  * @example SPOT
5327
5950
  */
5328
5951
  tradingMode?: string | null;
@@ -5384,8 +6007,8 @@ export interface components {
5384
6007
  takeProfit?: components["schemas"]["ParentTpSlLeg"];
5385
6008
  stopLoss?: components["schemas"]["ParentTpSlLeg"];
5386
6009
  /**
5387
- * @description Strategy key used to group risk buckets for delegated/margin orders
5388
- * @example my-strategy
6010
+ * @description Sub-account key of the margin account the order trades on, like marginAccountId (`default` is the default margin account). Refused when it is not a valid sub-account key or disagrees with marginAccountId; a key naming none of the caller's open sub-accounts is refused by the matching engine.
6011
+ * @example hedge
5389
6012
  */
5390
6013
  strategyKey?: string | null;
5391
6014
  /**
@@ -5400,7 +6023,7 @@ export interface components {
5400
6023
  */
5401
6024
  postOnly?: boolean | null;
5402
6025
  /**
5403
- * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: a create or replace reusing a value another of your resting orders still holds is rejected with HTTP 409 / gRPC ALREADY_EXISTS and the code CLIENT_ORDER_ID_CONFLICT. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key: resubmitting after a lost response can execute a second time. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and its fan-out is non-persistent Core NATS: the service can re-establish an ended upstream subscription without closing your socket, so events can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. Rejections split in two: one rejected before acceptance (malformed, post-only would cross, handle conflict, a plain MARKET submit with no liquidity, rejected during pricing) fails the request, emits no event and is never written to order history (an order rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent); an accepted LIMIT with IOC or FOK that cannot fill, or an accepted MARKET order whose apparent liquidity is invalidated by maker-risk revalidation, returns 2xx with matchResult.status REJECTED and emits OrderPlaced then OrderRejected, both carrying this value. A 2xx therefore does not mean the order executed. Where no surface is conclusive, do not resubmit.
6026
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: a create or replace reusing a value another of your resting orders still holds is rejected with HTTP 409 / gRPC ALREADY_EXISTS and the code CLIENT_ORDER_ID_CONFLICT. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key: resubmitting after a lost response can execute a second time. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and events are not persisted for redelivery, so one can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. Rejections split in two: one rejected before acceptance (malformed, post-only would cross, handle conflict, a plain MARKET submit with no liquidity, rejected during pricing) fails the request, emits no event and is never written to order history (an order rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent); an accepted LIMIT with IOC or FOK that cannot fill, or an accepted MARKET order whose apparent liquidity is invalidated by maker-risk revalidation, returns 2xx with matchResult.status REJECTED and emits OrderPlaced then OrderRejected, both carrying this value. A 2xx therefore does not mean the order executed. Where no surface is conclusive, do not resubmit.
5404
6027
  * @example quote-btc-1130-a
5405
6028
  */
5406
6029
  clientOrderId?: string | null;
@@ -5453,7 +6076,7 @@ export interface components {
5453
6076
  * @description Resolved isolated risk bucket UUID for risk-bucket-scoped margin orders
5454
6077
  */
5455
6078
  riskBucketId?: string | null;
5456
- /** @description Client strategy key carried for compatibility */
6079
+ /** @description The request's strategyKey (the sub-account key), echoed */
5457
6080
  strategyKey?: string | null;
5458
6081
  /**
5459
6082
  * Format: uuid
@@ -5566,7 +6189,7 @@ export interface components {
5566
6189
  */
5567
6190
  reduceOnly?: boolean | null;
5568
6191
  /**
5569
- * @description Trading mode: SPOT or MARGIN (default: SPOT)
6192
+ * @description Trading mode: SPOT or MARGIN. Omitted, it takes the trading pair market type. A mode that does not match the pair is rejected
5570
6193
  * @example SPOT
5571
6194
  */
5572
6195
  tradingMode?: string | null;
@@ -5594,8 +6217,8 @@ export interface components {
5594
6217
  */
5595
6218
  leverage?: string | null;
5596
6219
  /**
5597
- * @description Strategy key used to group risk buckets for margin orders
5598
- * @example my-strategy
6220
+ * @description Sub-account key of the margin account the order trades on, like marginAccountId (`default` is the default margin account). Refused when it is not a valid sub-account key or disagrees with marginAccountId; a key naming none of the caller's open sub-accounts is refused by the matching engine.
6221
+ * @example hedge
5599
6222
  */
5600
6223
  strategyKey?: string | null;
5601
6224
  /**
@@ -6176,6 +6799,85 @@ export interface components {
6176
6799
  */
6177
6800
  nextPageToken?: string | null;
6178
6801
  };
6802
+ GetBuilderResponse: {
6803
+ builder?: components["schemas"]["Builder"];
6804
+ };
6805
+ GetBuilderSeriesResponse: {
6806
+ window?: components["schemas"]["AnalyticsWindow"];
6807
+ builder?: components["schemas"]["Builder"];
6808
+ /**
6809
+ * @description One point per bucket of the window, oldest first. A bucket without
6810
+ * trades is present with zeros.
6811
+ */
6812
+ points?: components["schemas"]["BuilderSeriesPoint"][] | null;
6813
+ };
6814
+ GetBuilderTotalsResponse: {
6815
+ window?: components["schemas"]["AnalyticsWindow"];
6816
+ builder?: components["schemas"]["Builder"];
6817
+ /**
6818
+ * @description Taker volume in USD (USDC 1:1) of the trades the builder's applications took
6819
+ * @example 25000
6820
+ */
6821
+ volumeUsd?: string | null;
6822
+ /**
6823
+ * @description The spot part of volumeUsd
6824
+ * @example 0
6825
+ */
6826
+ spotVolumeUsd?: string | null;
6827
+ /**
6828
+ * @description The perpetual (margin) part of volumeUsd
6829
+ * @example 25000
6830
+ */
6831
+ perpVolumeUsd?: string | null;
6832
+ /**
6833
+ * Format: int64
6834
+ * @description Trades the builder's applications took
6835
+ * @example 120
6836
+ */
6837
+ tradesCount?: number | null;
6838
+ /**
6839
+ * @description The builder's own fee revenue in USD: taker add-ons on the trades it took plus maker add-ons on the trades it made. Never the protocol taker fee.
6840
+ * @example 12.5
6841
+ */
6842
+ feesUsd?: string | null;
6843
+ /**
6844
+ * @description The taker add-on part of feesUsd
6845
+ * @example 10
6846
+ */
6847
+ takerFeesUsd?: string | null;
6848
+ /**
6849
+ * @description The maker add-on part of feesUsd, earned on trades the builder's applications made, whoever took them
6850
+ * @example 2.5
6851
+ */
6852
+ makerFeesUsd?: string | null;
6853
+ /**
6854
+ * Format: int64
6855
+ * @description Distinct taker wallets that traded through the builder in the window, each once however many buckets or applications it traded in
6856
+ * @example 18
6857
+ */
6858
+ activeTakers?: number | null;
6859
+ /**
6860
+ * Format: int64
6861
+ * @description Wallets whose first trade through one of the builder's applications fell in the window, counted once per (application, wallet)
6862
+ * @example 4
6863
+ */
6864
+ newTraders?: number | null;
6865
+ /**
6866
+ * @description USDC deposited through the builder's applications in the window, in USD (1:1). Other tokens are unvalued and not counted.
6867
+ * @example 15000
6868
+ */
6869
+ depositsUsd?: string | null;
6870
+ /**
6871
+ * @description USDC withdrawals initiated through the builder's applications in the window, in USD (1:1). Attributed by the application that initiated the withdrawal; other tokens are unvalued and not counted.
6872
+ * @example 4000
6873
+ */
6874
+ withdrawalsUsd?: string | null;
6875
+ /**
6876
+ * @description depositsUsd less withdrawalsUsd; negative when more left than arrived
6877
+ * @example 11000
6878
+ */
6879
+ netFlowUsd?: string | null;
6880
+ };
6179
6881
  GetBuildercodePayoutSummaryResponse: {
6180
6882
  /**
6181
6883
  * Format: int64
@@ -6484,6 +7186,7 @@ export interface components {
6484
7186
  label?: string | null;
6485
7187
  /** Format: uuid */
6486
7188
  tradingPairId?: string | null;
7189
+ /** @description The margin account's sub-account key (`default` for the default account). */
6487
7190
  strategyKey?: string | null;
6488
7191
  riskBucketId?: string | null;
6489
7192
  marginMode?: string | null;
@@ -6631,6 +7334,7 @@ export interface components {
6631
7334
  * @example 117845632.18
6632
7335
  */
6633
7336
  quoteVolume24h?: string | null;
7337
+ volume24hBySource?: components["schemas"]["Volume24hBySource"];
6634
7338
  };
6635
7339
  /** @description Exchange-wide life-to-date cumulative market statistics across all trading pairs. */
6636
7340
  GetMarketStatsResponse: {
@@ -7037,6 +7741,16 @@ export interface components {
7037
7741
  * @example -0.1
7038
7742
  */
7039
7743
  placementMakerFeeBps?: string | null;
7744
+ /**
7745
+ * Format: uuid
7746
+ * @description The RFQ (block trade) this order filled in: set on RFQ orders only (origin RFQ). Read the RFQ itself with GetRfq.
7747
+ */
7748
+ rfqId?: string | null;
7749
+ /**
7750
+ * Format: uuid
7751
+ * @description Set on a maker's RFQ quote order only: the quote version's internal engine id the order rested for. It is not the public quoteId; the taker's order, which fills from several quotes, carries none.
7752
+ */
7753
+ rfqQuoteId?: string | null;
7040
7754
  };
7041
7755
  /** @description Orderbook snapshot with token metadata and sequence number. */
7042
7756
  GetOrderbookResponse: {
@@ -7081,7 +7795,7 @@ export interface components {
7081
7795
  quoteToken?: string | null;
7082
7796
  /**
7083
7797
  * Format: uint32
7084
- * @description Orderbook sequence number
7798
+ * @description Legacy orderbook sequence number; not a book version, and its basis can change, so do not compare it across snapshots. Always 0 above 100 levels, where bookSeq versions the snapshot; at 100 or fewer levels no field versions it.
7085
7799
  * @example 12345
7086
7800
  */
7087
7801
  sequenceNumber?: number | null;
@@ -7095,6 +7809,11 @@ export interface components {
7095
7809
  * @example Spot
7096
7810
  */
7097
7811
  tradingMode?: string | null;
7812
+ /**
7813
+ * @description Durable-log sequence this snapshot is exact as of, as a decimal string. Present only above 100 levels. A point-in-time read and staleness check, not a base for applying WebSocket deltas: for a live local book use the depth WebSocket channel, whose snapshot is the handoff base. A side that returns as many levels as requested may hold more.
7814
+ * @example 184467
7815
+ */
7816
+ bookSeq?: string | null;
7098
7817
  };
7099
7818
  GetPerpMarketConfigResponse: {
7100
7819
  /** Format: uuid */
@@ -7364,8 +8083,9 @@ export interface components {
7364
8083
  maintenanceMarginRequired?: string | null;
7365
8084
  /**
7366
8085
  * @description Initial margin required by this position at mark_price, honoring both its
7367
- * effective leverage and the market initial-margin floor. Zero when the
7368
- * position has no open exposure.
8086
+ * effective leverage and the market initial-margin floor. Each unit keeps
8087
+ * the leverage of the order that opened it. Zero when the position has no
8088
+ * open exposure.
7369
8089
  */
7370
8090
  initialMarginRequired?: string | null;
7371
8091
  /**
@@ -7520,8 +8240,9 @@ export interface components {
7520
8240
  maintenanceMarginRequired?: string | null;
7521
8241
  /**
7522
8242
  * @description Initial margin required by this position at mark_price, honoring both its
7523
- * effective leverage and the market initial-margin floor. Zero when the
7524
- * position has no open exposure.
8243
+ * effective leverage and the market initial-margin floor. Each unit keeps
8244
+ * the leverage of the order that opened it. Zero when the position has no
8245
+ * open exposure.
7525
8246
  */
7526
8247
  initialMarginRequired?: string | null;
7527
8248
  /**
@@ -7584,20 +8305,6 @@ export interface components {
7584
8305
  * @example 2023-11-13T10:30:00Z
7585
8306
  */
7586
8307
  createdAt?: string | null;
7587
- /**
7588
- * Format: int32
7589
- * @deprecated
7590
- * @description DEPRECATED: legacy flat maker fee in bps echoed from the trading pair. Does NOT reflect the tiered fee actually charged, which is per-user and fractional. Call GET /api/v1/fees/tier for the caller's real rate. Will be removed in a later release.
7591
- * @example -1
7592
- */
7593
- makerFeeBps?: number | null;
7594
- /**
7595
- * Format: int32
7596
- * @deprecated
7597
- * @description DEPRECATED: legacy flat taker fee in bps echoed from the trading pair. Does NOT reflect the tiered fee actually charged, which is per-user and fractional. Call GET /api/v1/fees/tier for the caller's real rate. Will be removed in a later release.
7598
- * @example 5
7599
- */
7600
- takerFeeBps?: number | null;
7601
8308
  /**
7602
8309
  * Format: int32
7603
8310
  * @description Additional taker fee in basis points from application
@@ -7611,45 +8318,127 @@ export interface components {
7611
8318
  */
7612
8319
  applicationMakerFeeBps?: number | null;
7613
8320
  };
7614
- GetPulseResponse: {
8321
+ GetProtocolSeriesResponse: {
8322
+ /** @description The window the series covers */
8323
+ window?: components["schemas"]["AnalyticsWindow"] | null;
7615
8324
  /**
7616
- * @description When this snapshot was produced upstream, ISO-8601 UTC; also serves as the response ETag value
7617
- * @example 2026-07-22T15:17:14Z
8325
+ * @description One point per bucket of the window, oldest first. A bucket without
8326
+ * trades is present with zeros.
7618
8327
  */
7619
- generatedAt?: string | null;
8328
+ points?: components["schemas"]["ProtocolSeriesPoint"][] | null;
8329
+ };
8330
+ GetProtocolTotalsResponse: {
8331
+ /** @description The window these totals cover */
8332
+ window?: components["schemas"]["AnalyticsWindow"] | null;
7620
8333
  /**
7621
- * @description Asset universe this snapshot was synthesized against
7622
- * @example [
7623
- * "BTC",
7624
- * "ETH",
7625
- * "SOL",
7626
- * "SEI",
7627
- * "HYPE"
7628
- * ]
8334
+ * @description Taker volume in USD (USDC 1:1) routed by the builders the explorer displays. Trades of hidden builders are not counted.
8335
+ * @example 1250000.5
7629
8336
  */
7630
- watchlist?: string[] | null;
7631
- /** @description Pulse items, pre-sorted: watchlist order first, MARKET last, most-recent-first within each asset. Items with unverified figures are removed server-side. */
7632
- items?: components["schemas"]["PulseItem"][] | null;
7633
- };
7634
- GetRegionStatusResponse: {
8337
+ volumeUsd?: string | null;
7635
8338
  /**
7636
- * @description True when trading is not available in the caller's region; writes other than signing in and withdrawing then answer 451 REGION_RESTRICTED
7637
- * @example false
8339
+ * @description The spot part of volumeUsd (displayed builders only)
8340
+ * @example 250000.5
7638
8341
  */
7639
- restricted?: boolean | null;
8342
+ spotVolumeUsd?: string | null;
7640
8343
  /**
7641
- * @description The caller's ISO 3166-1 alpha-2 country code as the edge geolocated it (T1 for Tor, XX for unknown); empty when the request carried no location
7642
- * @example JP
8344
+ * @description The perpetual (margin) part of volumeUsd (displayed builders only)
8345
+ * @example 1000000
7643
8346
  */
7644
- country?: string | null;
7645
- };
7646
- GetRewardsBalanceResponse: {
7647
- /** @description One entry per reward token that has a non-zero available balance. */
7648
- balances?: components["schemas"]["RewardsBalanceEntry"][] | null;
7649
- };
7650
- GetRfqCapabilitiesResponse: {
7651
- /** Format: uint32 */
7652
- protocolVersion?: number | null;
8347
+ perpVolumeUsd?: string | null;
8348
+ /**
8349
+ * Format: int64
8350
+ * @description Trades routed by the displayed builders
8351
+ * @example 4210
8352
+ */
8353
+ tradesCount?: number | null;
8354
+ /**
8355
+ * @description Protocol taker fees in USD over every trade, all builders included. Excludes builder add-ons and maker fees.
8356
+ * @example 625.25
8357
+ */
8358
+ protocolFeesUsd?: string | null;
8359
+ /**
8360
+ * Format: int64
8361
+ * @description Distinct taker wallets that traded in the window (each wallet once however many buckets it traded in), all builders included
8362
+ * @example 312
8363
+ */
8364
+ activeTakers?: number | null;
8365
+ /**
8366
+ * Format: int64
8367
+ * @description Wallets whose first trade through a builder fell in the window, counted once per (builder, wallet), all builders included
8368
+ * @example 27
8369
+ */
8370
+ newTraders?: number | null;
8371
+ /**
8372
+ * @description Total value locked in USD at the end of the window (the end of the bucket holding endTime): USDC custody (the opening custody plus deposits less initiated withdrawals), valued 1:1. Null when no custody had been folded by then.
8373
+ * @example 536172600
8374
+ */
8375
+ tvlUsd?: string | null;
8376
+ /**
8377
+ * @description Total value locked in USD at the start of the window (the start of its first bucket). tvlUsd less openingTvlUsd is the window's change. Null when no custody had been folded by then.
8378
+ * @example 535000000
8379
+ */
8380
+ openingTvlUsd?: string | null;
8381
+ /**
8382
+ * @description USDC deposited in the window, in USD (1:1). Other tokens are unvalued and not counted.
8383
+ * @example 1250000
8384
+ */
8385
+ depositsUsd?: string | null;
8386
+ /**
8387
+ * @description USDC withdrawals initiated in the window, in USD (1:1). Other tokens are unvalued and not counted.
8388
+ * @example 78000
8389
+ */
8390
+ withdrawalsUsd?: string | null;
8391
+ /**
8392
+ * @description depositsUsd less withdrawalsUsd; negative when more left than arrived
8393
+ * @example 1172000
8394
+ */
8395
+ netFlowUsd?: string | null;
8396
+ /**
8397
+ * Format: int64
8398
+ * @description Distinct wallets active in the window, each once: wallets that took a trade, received a deposit, or were paid out a withdrawal initiated in it (by payout address), all builders included
8399
+ * @example 418
8400
+ */
8401
+ activeAccounts?: number | null;
8402
+ };
8403
+ GetPulseResponse: {
8404
+ /**
8405
+ * @description When this snapshot was produced upstream, ISO-8601 UTC; also serves as the response ETag value
8406
+ * @example 2026-07-22T15:17:14Z
8407
+ */
8408
+ generatedAt?: string | null;
8409
+ /**
8410
+ * @description Asset universe this snapshot was synthesized against
8411
+ * @example [
8412
+ * "BTC",
8413
+ * "ETH",
8414
+ * "SOL",
8415
+ * "SEI",
8416
+ * "HYPE"
8417
+ * ]
8418
+ */
8419
+ watchlist?: string[] | null;
8420
+ /** @description Pulse items, pre-sorted: watchlist order first, MARKET last, most-recent-first within each asset. Items with unverified figures are removed server-side. */
8421
+ items?: components["schemas"]["PulseItem"][] | null;
8422
+ };
8423
+ GetRegionStatusResponse: {
8424
+ /**
8425
+ * @description True when trading is not available in the caller's region; writes other than signing in and withdrawing then answer 451 REGION_RESTRICTED
8426
+ * @example false
8427
+ */
8428
+ restricted?: boolean | null;
8429
+ /**
8430
+ * @description The caller's ISO 3166-1 alpha-2 country code as the edge geolocated it (T1 for Tor, XX for unknown); empty when the request carried no location
8431
+ * @example JP
8432
+ */
8433
+ country?: string | null;
8434
+ };
8435
+ GetRewardsBalanceResponse: {
8436
+ /** @description One entry per reward token that has a non-zero available balance. */
8437
+ balances?: components["schemas"]["RewardsBalanceEntry"][] | null;
8438
+ };
8439
+ GetRfqCapabilitiesResponse: {
8440
+ /** Format: uint32 */
8441
+ protocolVersion?: number | null;
7653
8442
  /** @description Whether RFQ is enabled for the caller */
7654
8443
  enabled?: boolean | null;
7655
8444
  markets?: components["schemas"]["RfqMarketCapability"][] | null;
@@ -7701,6 +8490,9 @@ export interface components {
7701
8490
  */
7702
8491
  totalPages?: number | null;
7703
8492
  };
8493
+ GetTokenCustodyResponse: {
8494
+ token?: components["schemas"]["TokenCustody"];
8495
+ };
7704
8496
  /** @description A single trade. */
7705
8497
  GetTradeByIdResponse: {
7706
8498
  data?: components["schemas"]["TradeData"];
@@ -7823,6 +8615,20 @@ export interface components {
7823
8615
  GetTradingPairResponse: {
7824
8616
  tradingPair?: components["schemas"]["TradingPairData"];
7825
8617
  };
8618
+ /** @description The treasury's all-time net fees. Not windowed: the treasury keeps only running totals. */
8619
+ GetTreasuryNetFeesResponse: {
8620
+ /**
8621
+ * @description All-time net protocol fees in USD (USDC 1:1): the treasury's net protocol fee (taker fees less maker rebates) plus the insurance fund's liquidation fees, less BuilderCodes payouts and TraderCodes rewards. Negative when payouts exceed fees; "0" before any fee. The definition may widen to more fee sources without a contract change.
8622
+ * @example 260.37
8623
+ */
8624
+ netFeesUsd?: string | null;
8625
+ /**
8626
+ * Format: int64
8627
+ * @description When the first counted fee landed, as Unix milliseconds; null before any
8628
+ * @example 1750000000000
8629
+ */
8630
+ countingSince?: number | null;
8631
+ };
7826
8632
  GetTwapOrderTcaResponse: {
7827
8633
  /**
7828
8634
  * Format: uuid
@@ -7934,6 +8740,33 @@ export interface components {
7934
8740
  */
7935
8741
  totalCapped?: boolean | null;
7936
8742
  };
8743
+ GetWalletSummaryResponse: {
8744
+ /**
8745
+ * @description The wallet, lowercase
8746
+ * @example 0x1234567890abcdef1234567890abcdef12345678
8747
+ */
8748
+ wallet?: string | null;
8749
+ /**
8750
+ * @description All-time totals over every builder; null when the wallet never took a
8751
+ * trade.
8752
+ */
8753
+ totals?: components["schemas"]["WalletVolume"] | null;
8754
+ /** @description Per displayed builder, largest volume first (ties by builder id). */
8755
+ builders?: components["schemas"]["WalletBuilderVolume"][] | null;
8756
+ /** @description What hidden builders carried; null when they carried nothing. */
8757
+ unattributed?: components["schemas"]["WithheldVolume"] | null;
8758
+ /**
8759
+ * Format: int64
8760
+ * @description Liquidation events of the wallet, every market
8761
+ * @example 2
8762
+ */
8763
+ liquidationsCount?: number | null;
8764
+ /**
8765
+ * @description Sum of each event's position size times its event-time mark price, in each market's quote units (every market is USDC-quoted today); "0" when never liquidated
8766
+ * @example 23852.5625
8767
+ */
8768
+ liquidationsNotional?: string | null;
8769
+ };
7937
8770
  IndexComponent: {
7938
8771
  provider?: string | null;
7939
8772
  price?: string | null;
@@ -8511,6 +9344,15 @@ export interface components {
8511
9344
  /** @description Cursor for the next page; empty when there are no more. */
8512
9345
  nextPageToken?: string | null;
8513
9346
  };
9347
+ ListBuilderLeaderboardResponse: {
9348
+ window?: components["schemas"]["AnalyticsWindow"];
9349
+ /**
9350
+ * @description Displayed builders with figures in the window, largest volume first
9351
+ * (ties by builder id), up to limit. A builder that only earned maker
9352
+ * add-ons, or only took deposits, ranks with zero volume.
9353
+ */
9354
+ rows?: components["schemas"]["BuilderLeaderboardRow"][] | null;
9355
+ };
8514
9356
  ListBuildercodePayoutsResponse: {
8515
9357
  /** @description Per-trade credits, newest first. */
8516
9358
  payouts?: components["schemas"]["BuildercodePayout"][] | null;
@@ -8536,6 +9378,13 @@ export interface components {
8536
9378
  */
8537
9379
  nextPageToken?: string | null;
8538
9380
  };
9381
+ ListBuildersResponse: {
9382
+ /**
9383
+ * @description Every displayed builder, by name (case-insensitive) then id. A display
9384
+ * group is listed once; its applications are not listed on their own.
9385
+ */
9386
+ builders?: components["schemas"]["Builder"][] | null;
9387
+ };
8539
9388
  ListConditionalOrdersResponse: {
8540
9389
  orders?: components["schemas"]["ConditionalOrder"][] | null;
8541
9390
  /**
@@ -8727,6 +9576,15 @@ export interface components {
8727
9576
  */
8728
9577
  nextPageToken?: string | null;
8729
9578
  };
9579
+ ListMarketVolumesResponse: {
9580
+ /** @description The window these volumes cover */
9581
+ window?: components["schemas"]["AnalyticsWindow"] | null;
9582
+ /**
9583
+ * @description Markets that traded in the window, largest volume first (ties by
9584
+ * trading pair id), up to limit.
9585
+ */
9586
+ markets?: components["schemas"]["MarketVolume"][] | null;
9587
+ };
8730
9588
  ListMyFollowersResponse: {
8731
9589
  followers?: components["schemas"]["Follower"][] | null;
8732
9590
  /** @description Cursor for the next page; empty when there are no more. */
@@ -8843,6 +9701,18 @@ export interface components {
8843
9701
  */
8844
9702
  total?: number | null;
8845
9703
  };
9704
+ ListTokenCustodyResponse: {
9705
+ /**
9706
+ * @description Listed assets by symbol, then tokens with custody flow but no listed
9707
+ * asset, by contract address.
9708
+ */
9709
+ tokens?: components["schemas"]["TokenCustody"][] | null;
9710
+ /**
9711
+ * @description Total value locked in USD: the custodyUsd of the tokens that count toward it
9712
+ * @example 536172600
9713
+ */
9714
+ tvlUsd?: string | null;
9715
+ };
8846
9716
  /** @description One page of the trade feed, newest first. */
8847
9717
  ListTradesResponse: {
8848
9718
  trades?: components["schemas"]["PublicTrade"][] | null;
@@ -8935,6 +9805,44 @@ export interface components {
8935
9805
  */
8936
9806
  nextPageToken?: string | null;
8937
9807
  };
9808
+ ListVaultDepositsResponse: {
9809
+ deposits?: components["schemas"]["VaultDeposit"][] | null;
9810
+ /**
9811
+ * Format: uint32
9812
+ * @description Number of deposits requested for this page
9813
+ * @example 50
9814
+ */
9815
+ pageSize?: number | null;
9816
+ /** @description Opaque cursor for the next page; empty when the page is the end of the ordered result */
9817
+ nextPageToken?: string | null;
9818
+ };
9819
+ ListVaultWithdrawalsResponse: {
9820
+ withdrawals?: components["schemas"]["VaultWithdrawal"][] | null;
9821
+ /**
9822
+ * Format: uint32
9823
+ * @description Number of withdrawals requested for this page
9824
+ * @example 50
9825
+ */
9826
+ pageSize?: number | null;
9827
+ /** @description Opaque cursor for the next page; empty when the page is the end of the ordered result */
9828
+ nextPageToken?: string | null;
9829
+ };
9830
+ ListWalletLeaderboardResponse: {
9831
+ /** @description Wallets by all-time volume, largest first (ties by wallet), up to limit. */
9832
+ wallets?: components["schemas"]["WalletVolume"][] | null;
9833
+ };
9834
+ ListWalletLiquidationsResponse: {
9835
+ /** @description The wallet's events in reverse chronological order, every market. */
9836
+ events?: components["schemas"]["LiquidationEvent"][] | null;
9837
+ /**
9838
+ * Format: uint32
9839
+ * @description Number of events requested for this page
9840
+ * @example 50
9841
+ */
9842
+ pageSize?: number | null;
9843
+ /** @description Opaque cursor for the next page; empty when the page is the end of the ordered result */
9844
+ nextPageToken?: string | null;
9845
+ };
8938
9846
  ManagedMarketAssignment: {
8939
9847
  launchId?: string | null;
8940
9848
  /** Format: uuid */
@@ -9028,6 +9936,7 @@ export interface components {
9028
9936
  label?: string | null;
9029
9937
  /** Format: uuid */
9030
9938
  tradingPairId?: string | null;
9939
+ /** @description The margin account's sub-account key (`default` for the default account). */
9031
9940
  strategyKey?: string | null;
9032
9941
  /** @description Present only for risk-bucket summary rows. */
9033
9942
  riskBucketId?: string | null;
@@ -9124,6 +10033,31 @@ export interface components {
9124
10033
  */
9125
10034
  maxRemovableCollateral?: string | null;
9126
10035
  };
10036
+ /** @description One market's figures over the window, all builders included. Resolve the symbol from the trading pairs listing. */
10037
+ MarketVolume: {
10038
+ /**
10039
+ * Format: uuid
10040
+ * @description Trading pair UUID
10041
+ * @example 123e4567-e89b-12d3-a456-426614174000
10042
+ */
10043
+ tradingPairId?: string | null;
10044
+ /**
10045
+ * @description Taker volume in USD over every trade in the market
10046
+ * @example 830000
10047
+ */
10048
+ volumeUsd?: string | null;
10049
+ /**
10050
+ * @description Protocol taker fees in USD
10051
+ * @example 415
10052
+ */
10053
+ protocolFeesUsd?: string | null;
10054
+ /**
10055
+ * Format: int64
10056
+ * @description Trades in the market
10057
+ * @example 2100
10058
+ */
10059
+ tradesCount?: number | null;
10060
+ };
9127
10061
  MatchResult: {
9128
10062
  /**
9129
10063
  * Format: int32
@@ -9706,8 +10640,9 @@ export interface components {
9706
10640
  maintenanceMarginRequired?: string | null;
9707
10641
  /**
9708
10642
  * @description Initial margin required by this position at mark_price, honoring both its
9709
- * effective leverage and the market initial-margin floor. Zero when the
9710
- * position has no open exposure.
10643
+ * effective leverage and the market initial-margin floor. Each unit keeps
10644
+ * the leverage of the order that opened it. Zero when the position has no
10645
+ * open exposure.
9711
10646
  */
9712
10647
  initialMarginRequired?: string | null;
9713
10648
  /**
@@ -10047,6 +10982,72 @@ export interface components {
10047
10982
  */
10048
10983
  orderCount?: number | null;
10049
10984
  };
10985
+ ProtocolSeriesPoint: {
10986
+ /**
10987
+ * Format: int64
10988
+ * @description Bucket start as Unix milliseconds (UTC; weeks start Monday)
10989
+ * @example 1762038000000
10990
+ */
10991
+ bucketStart?: number | null;
10992
+ /**
10993
+ * @description Taker volume in USD routed by the displayed builders. Trades of hidden builders are not counted.
10994
+ * @example 52000
10995
+ */
10996
+ volumeUsd?: string | null;
10997
+ /**
10998
+ * @description The spot part of volumeUsd (displayed builders only)
10999
+ * @example 12000
11000
+ */
11001
+ spotVolumeUsd?: string | null;
11002
+ /**
11003
+ * @description The perpetual (margin) part of volumeUsd (displayed builders only)
11004
+ * @example 40000
11005
+ */
11006
+ perpVolumeUsd?: string | null;
11007
+ /**
11008
+ * Format: int64
11009
+ * @description Trades routed by the displayed builders
11010
+ * @example 180
11011
+ */
11012
+ tradesCount?: number | null;
11013
+ /**
11014
+ * @description Protocol taker fees in USD over every trade, all builders included
11015
+ * @example 26
11016
+ */
11017
+ protocolFeesUsd?: string | null;
11018
+ /**
11019
+ * Format: int64
11020
+ * @description Distinct taker wallets that traded in the bucket, all builders included
11021
+ * @example 41
11022
+ */
11023
+ activeTakers?: number | null;
11024
+ /**
11025
+ * Format: int64
11026
+ * @description Wallets whose first trade through a builder fell in the bucket, counted once per (builder, wallet), all builders included
11027
+ * @example 3
11028
+ */
11029
+ newTraders?: number | null;
11030
+ /**
11031
+ * @description Total value locked in USD at the end of the bucket: USDC custody (the opening custody plus deposits less initiated withdrawals), valued 1:1. Carried across buckets without custody movement; null before the first folded custody hour.
11032
+ * @example 536172600
11033
+ */
11034
+ tvlUsd?: string | null;
11035
+ /**
11036
+ * @description USDC deposited in the bucket, in USD (1:1)
11037
+ * @example 52000
11038
+ */
11039
+ depositsUsd?: string | null;
11040
+ /**
11041
+ * @description USDC withdrawals initiated in the bucket, in USD (1:1)
11042
+ * @example 3000
11043
+ */
11044
+ withdrawalsUsd?: string | null;
11045
+ /**
11046
+ * @description depositsUsd less withdrawalsUsd; negative when more left than arrived
11047
+ * @example 49000
11048
+ */
11049
+ netFlowUsd?: string | null;
11050
+ };
10050
11051
  PublicHealthCheckResponse: {
10051
11052
  /**
10052
11053
  * @description Health status: healthy or unhealthy
@@ -10394,7 +11395,7 @@ export interface components {
10394
11395
  */
10395
11396
  postOnly?: boolean | null;
10396
11397
  /**
10397
- * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: a create or replace reusing a value another of your resting orders still holds is rejected with HTTP 409 / gRPC ALREADY_EXISTS and the code CLIENT_ORDER_ID_CONFLICT. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key, though on this replace path a retry cannot double-execute: the request names the original order id, and the sequencer revalidates that original in memory and on the book at sequence time, so once the first replacement succeeds the original is gone and a retry is rejected with ORDER_NOT_FOUND rather than placing a second order. That code is itself ambiguous — the original may instead have filled or been cancelled — so the risk here is acting on a stale view, not duplicate execution. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and its fan-out is non-persistent Core NATS: the service can re-establish an ended upstream subscription without closing your socket, so events can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. A replacement carries no order type or time-in-force and its original must still be RESTING, so the post-acceptance rejection shapes are unreachable here: the reachable failures are all pre-acceptance — malformed, post-only would cross, handle conflict, or the original no longer resting (ORDER_NOT_FOUND) — and each fails the request, emits no event and is never written to order history (an order rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent). Where no surface is conclusive, do not resubmit. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
11398
+ * @description Client-assigned correlation handle, echoed back on order reads (detail and list) and on order WebSocket events. At most 64 characters from [A-Za-z0-9._:-]; surrounding whitespace is trimmed before storage, and a blank or whitespace-only value is treated as absent. Uniqueness is enforced only among your orders that are RESTING on the book: a create or replace reusing a value another of your resting orders still holds is rejected with HTTP 409 / gRPC ALREADY_EXISTS and the code CLIENT_ORDER_ID_CONFLICT. An order that never rests — MARKET, IOC/FOK, or a LIMIT that fills completely on arrival — does not take the handle, and the value is released the moment any order reaches a terminal state. It is therefore NOT an idempotency key, though on this replace path a retry cannot double-execute: the request names the original order id, and the sequencer revalidates that original in memory and on the book at sequence time, so once the first replacement succeeds the original is gone and a retry is rejected with ORDER_NOT_FOUND rather than placing a second order. That code is itself ambiguous — the original may instead have filled or been cancelled — so the risk here is acting on a stale view, not duplicate execution. Reconcile a lost response against the order WebSocket stream, which carries this value on the submit acknowledgement and on fills, including for orders that never rest; order history is replica-backed and can omit an order that did land. The stream is not replayable and has no sequence number to backfill from, and events are not persisted for redelivery, so one can be missed while your connection still looks healthy. A matching event is therefore positive proof the order was accepted, but silence is NEVER evidence it was not, and no client-observable condition makes it so. Absent positive evidence the outcome is unresolved: hold and escalate rather than resubmitting. A replacement carries no order type or time-in-force and its original must still be RESTING, so the post-acceptance rejection shapes are unreachable here: the reachable failures are all pre-acceptance — malformed, post-only would cross, handle conflict, or the original no longer resting (ORDER_NOT_FOUND) — and each fails the request, emits no event and is never written to order history (an order rejected AFTER acceptance is persisted with status REJECTED, so only the pre-acceptance class is absent). Where no surface is conclusive, do not resubmit. A replacement is a new order with a new id, so it carries its own value and inherits nothing from the original — restate it to keep the handle.
10398
11399
  * @example quote-btc-1130-a
10399
11400
  */
10400
11401
  clientOrderId?: string | null;
@@ -10527,12 +11528,82 @@ export interface components {
10527
11528
  */
10528
11529
  available?: string | null;
10529
11530
  };
11531
+ /** @description What your view showed on the accepted side when you accepted. */
11532
+ RfqAcceptanceRecord: {
11533
+ /**
11534
+ * Format: int64
11535
+ * @description The view version you accepted
11536
+ */
11537
+ viewVersion?: number | null;
11538
+ /**
11539
+ * Format: int64
11540
+ * @description When you accepted, Unix milliseconds
11541
+ */
11542
+ acceptedAtMs?: number | null;
11543
+ /** @description All-in VWAP shown for the accepted side, fees included */
11544
+ vwap?: string | null;
11545
+ /** @description VWAP shown before fees */
11546
+ grossVwap?: string | null;
11547
+ /** @description Quantity the shown allocation filled */
11548
+ availableQuantity?: string | null;
11549
+ /**
11550
+ * Format: int32
11551
+ * @description Your Monaco fee rate frozen at acceptance, in centi-bps
11552
+ */
11553
+ monacoFeeCbps?: number | null;
11554
+ /**
11555
+ * Format: int32
11556
+ * @description Your builder fee rate frozen at acceptance, in centi-bps
11557
+ */
11558
+ builderFeeCbps?: number | null;
11559
+ book?: components["schemas"]["RfqBookComparison"];
11560
+ /** @description Whether that snapshot filled the whole size; absent when no snapshot at most 500 ms old was held at acceptance */
11561
+ bookFullSize?: boolean | null;
11562
+ };
11563
+ /** @description The taker's requested size priced against the public order book. */
11564
+ RfqBookComparison: {
11565
+ /** @description All-in book VWAP with the same fee rates as the view: cost per unit when buying, net proceeds per unit when selling */
11566
+ vwap?: string | null;
11567
+ /** @description Book VWAP before fees */
11568
+ grossVwap?: string | null;
11569
+ /**
11570
+ * Format: int64
11571
+ * @description When the book snapshot was read, Unix milliseconds
11572
+ */
11573
+ asOfMs?: number | null;
11574
+ /**
11575
+ * Format: uint32
11576
+ * @description Price levels the size walked
11577
+ */
11578
+ levels?: number | null;
11579
+ };
10530
11580
  /** @description One fill of an executed RFQ. */
10531
11581
  RfqFill: {
10532
11582
  executionId?: string | null;
10533
11583
  price?: string | null;
10534
11584
  quantity?: string | null;
11585
+ /** @description The taker's whole fee on this fill: monacoFee plus builderFee */
11586
+ fee?: string | null;
11587
+ /** @description The Monaco part of fee */
11588
+ monacoFee?: string | null;
11589
+ /** @description The builder part of fee */
11590
+ builderFee?: string | null;
11591
+ };
11592
+ /** @description One fill of the calling maker's quote. */
11593
+ RfqMakerFill: {
11594
+ /**
11595
+ * Format: uuid
11596
+ * @description The trade id
11597
+ */
11598
+ executionId?: string | null;
11599
+ price?: string | null;
11600
+ quantity?: string | null;
11601
+ /** @description Your whole fee on this fill as charged: monacoFee plus builderFee; negative for a net rebate. Unset until trade history has the fill */
10535
11602
  fee?: string | null;
11603
+ /** @description Your Monaco maker fee as charged; negative is a rebate */
11604
+ monacoFee?: string | null;
11605
+ /** @description The builder add-on your frontend charged, as charged (0 when none) */
11606
+ builderFee?: string | null;
10536
11607
  };
10537
11608
  /** @description A selected maker's own part of an acceptance, for answering last look. */
10538
11609
  RfqMakerSelection: {
@@ -10548,6 +11619,18 @@ export interface components {
10548
11619
  frozenTerms?: components["schemas"]["RfqQuoteTerms"];
10549
11620
  /** Format: int64 */
10550
11621
  lastLookDeadlineAtMs?: number | null;
11622
+ /**
11623
+ * Format: int32
11624
+ * @description Your Monaco maker fee rate in centi-bps, frozen at acceptance; negative for a rebate
11625
+ */
11626
+ monacoFeeCbps?: number | null;
11627
+ /**
11628
+ * Format: int32
11629
+ * @description The MOST your frontend's builder add-on charges on this fill, in centi-bps: the rate stored on your quote order. A fill charges this rate or nothing, never more; the receipt shows what was charged. An IMPROVE re-places the quote at the rate configured then. Absent when it could not be read
11630
+ */
11631
+ maxBuilderFeeCbps?: number | null;
11632
+ /** @description Estimated net at the selected quantity and frozen price, in the quote asset, at monacoFeeCbps plus the maximum builder add-on: the least you receive when selling, the most you pay when buying. Absent with maxBuilderFeeCbps */
11633
+ estimatedNet?: string | null;
10551
11634
  };
10552
11635
  /** @description A market RFQ is offered on. */
10553
11636
  RfqMarketCapability: {
@@ -10564,6 +11647,11 @@ export interface components {
10564
11647
  unfilledQuantity?: string | null;
10565
11648
  vwap?: string | null;
10566
11649
  fills?: components["schemas"]["RfqFill"][] | null;
11650
+ /** @description Your all-in VWAP: notional plus your whole fee for a buy, minus it for a sell, over the executed quantity. Empty when nothing filled */
11651
+ allInVwap?: string | null;
11652
+ bookAtFill?: components["schemas"]["RfqBookComparison"];
11653
+ /** @description Whether a fresh book snapshot filled the executed quantity then; absent when none was fresh */
11654
+ bookAtFillFullSize?: boolean | null;
10567
11655
  };
10568
11656
  /** @description A quote's price and capacity. */
10569
11657
  RfqQuoteTerms: {
@@ -10651,6 +11739,15 @@ export interface components {
10651
11739
  vwap?: string | null;
10652
11740
  /** @description Quantity the allocation fills */
10653
11741
  availableQuantity?: string | null;
11742
+ /** @description VWAP before fees */
11743
+ grossVwap?: string | null;
11744
+ /** @description Estimated Monaco taker fee on available_quantity, in the quote asset */
11745
+ estimatedMonacoFee?: string | null;
11746
+ /** @description Estimated builder fee on available_quantity, in the quote asset */
11747
+ estimatedBuilderFee?: string | null;
11748
+ /** @description Estimated total taker fee on available_quantity, in the quote asset */
11749
+ estimatedTotalFee?: string | null;
11750
+ book?: components["schemas"]["RfqBookComparison"];
10654
11751
  };
10655
11752
  /** @description Authoritative RFQ status. */
10656
11753
  RfqStatus: {
@@ -10675,6 +11772,9 @@ export interface components {
10675
11772
  outcome?: components["schemas"]["RfqOutcome"];
10676
11773
  /** Format: int64 */
10677
11774
  durableSequence?: number | null;
11775
+ /** @description Maker only: your own fills once the RFQ settled, never another maker's */
11776
+ ownFills?: components["schemas"]["RfqMakerFill"][] | null;
11777
+ acceptance?: components["schemas"]["RfqAcceptanceRecord"];
10678
11778
  };
10679
11779
  /** @description The taker's current view of the quotes. */
10680
11780
  RfqView: {
@@ -10690,6 +11790,16 @@ export interface components {
10690
11790
  * @description View time, Unix milliseconds
10691
11791
  */
10692
11792
  asOfMs?: number | null;
11793
+ /**
11794
+ * Format: int32
11795
+ * @description The taker's Monaco fee rate in this view, in centi-bps
11796
+ */
11797
+ monacoFeeCbps?: number | null;
11798
+ /**
11799
+ * Format: int32
11800
+ * @description The taker's builder fee rate in this view, in centi-bps
11801
+ */
11802
+ builderFeeCbps?: number | null;
10693
11803
  };
10694
11804
  /**
10695
11805
  * @description One notional bracket of a market's margin ladder. Brackets are MARGINAL:
@@ -11124,7 +12234,10 @@ export interface components {
11124
12234
  * useful for auto-resolved buckets where the caller didn't supply the id.
11125
12235
  */
11126
12236
  marginAccountId?: string | null;
11127
- /** @description Populated when the simulated account is an auto-resolved bucket. */
12237
+ /**
12238
+ * @description The request's strategyKey (the sub-account key) on an isolated risk-bucket
12239
+ * preview, `default` when it sent none.
12240
+ */
11128
12241
  strategyKey?: string | null;
11129
12242
  /** @description Present when the simulation resolved against a risk bucket. */
11130
12243
  riskBucketId?: string | null;
@@ -11225,6 +12338,12 @@ export interface components {
11225
12338
  SimulateRiskBucketOrderRiskRequest: {
11226
12339
  /** Format: uuid */
11227
12340
  tradingPairId?: string | null;
12341
+ /**
12342
+ * @description Sub-account key of the margin account whose risk bucket this names, like
12343
+ * marginAccountId (`default` is the default margin account). Refused when it is
12344
+ * not a valid sub-account key, names none of the caller's open sub-accounts, or
12345
+ * disagrees with marginAccountId.
12346
+ */
11228
12347
  strategyKey?: string | null;
11229
12348
  side?: string | null;
11230
12349
  /** @description Deprecated compatibility value; `side` is authoritative. */
@@ -11470,36 +12589,119 @@ export interface components {
11470
12589
  /** @description When the sweeper last observed progress on the deposit */
11471
12590
  updatedAt?: string | null;
11472
12591
  };
11473
- TpSlLeg: {
11474
- triggerPrice?: string | null;
11475
- orderType?: string | null;
11476
- limitPrice?: string | null;
11477
- quantity?: string | null;
11478
- timeInForce?: string | null;
11479
- /** Format: int32 */
11480
- slippageToleranceBps?: number | null;
11481
- expiresAt?: string | null;
12592
+ /** @description What the vault holds of one token. Amounts are raw token units. Custody is openingRaw plus depositedRaw less withdrawnRaw. Withdrawals count when initiated; the vault's physical balance is custodyRaw plus pendingWithdrawalsRaw. Custody is folded from the trade and transfer stream into the aux database while pendingWithdrawalsRaw is read from core, so the two can disagree briefly while the fold lags. */
12593
+ TokenCustody: {
11482
12594
  /**
11483
- * @description Resolve the full live position size when triggered. Mutually exclusive
11484
- * with quantity. For compatibility, omitting both quantity and this field
11485
- * also means full-position close.
11486
- *
11487
- * Attaching a full-close leg to a position SUPERSEDES that position's
11488
- * previously active full-close legs of the same condition type: they are
11489
- * cancelled in the same engine step that creates the replacement, so moving
11490
- * a take-profit or stop-loss is one call with no window in which the
11491
- * position holds both levels or neither. Fixed-quantity legs never
11492
- * participate — laddered partial exits stack — and a superseded leg's
11493
- * OCO sibling is left active rather than dropped. An entry order's
11494
- * full-close legs compete for the same slot once armed: the leg set most
11495
- * recently wins. So an attach retires an armed entry-order leg, leaves one
11496
- * still pending on an unfilled order alone, and when that order fills its
11497
- * leg is cancelled instead of armed if this attach came later.
12595
+ * Format: uuid
12596
+ * @description Asset UUID; null for a token with custody flow but no listed asset
11498
12597
  */
11499
- closePosition?: boolean | null;
11500
- };
11501
- /** @description Core fields of a single executed trade, nested under `data` in the public trade event envelope. */
11502
- TradeData: {
12598
+ assetId?: string | null;
12599
+ /**
12600
+ * @description Asset symbol; null when unlisted
12601
+ * @example USDC
12602
+ */
12603
+ symbol?: string | null;
12604
+ /**
12605
+ * @description Asset name; null when unlisted
12606
+ * @example USD Coin
12607
+ */
12608
+ name?: string | null;
12609
+ /**
12610
+ * Format: uint32
12611
+ * @description Token decimals; null when unlisted
12612
+ * @example 6
12613
+ */
12614
+ decimals?: number | null;
12615
+ /** @description Asset icon URL; null when unlisted */
12616
+ iconUrl?: string | null;
12617
+ /**
12618
+ * @description Token contract address, lowercase
12619
+ * @example 0x23e459c24c4925ba89205c400dceca7abc11723d
12620
+ */
12621
+ contractAddress?: string | null;
12622
+ /**
12623
+ * @description Deposits since the explorer's history starts, in raw token units
12624
+ * @example 536172601000000
12625
+ */
12626
+ depositedRaw?: string | null;
12627
+ /**
12628
+ * @description Withdrawals initiated since the explorer's history starts, in raw token units
12629
+ * @example 1000000
12630
+ */
12631
+ withdrawnRaw?: string | null;
12632
+ /**
12633
+ * Format: int64
12634
+ * @description Deposits of the token
12635
+ * @example 1200
12636
+ */
12637
+ depositsCount?: number | null;
12638
+ /**
12639
+ * Format: int64
12640
+ * @description Initiated withdrawals of the token
12641
+ * @example 310
12642
+ */
12643
+ withdrawalsCount?: number | null;
12644
+ /**
12645
+ * @description openingRaw plus deposits less initiated withdrawals, in raw token units; null when not positive (never zero: a token held in no amount and one not indexed are different facts)
12646
+ * @example 536172600000000
12647
+ */
12648
+ custodyRaw?: string | null;
12649
+ /**
12650
+ * @description Withdrawals initiated but not yet executed on-chain, in raw token units; still physically in the vault
12651
+ * @example 250000000
12652
+ */
12653
+ pendingWithdrawalsRaw?: string | null;
12654
+ /**
12655
+ * @description USD price the custody is valued at: 1 for USDC, null for every other token
12656
+ * @example 1
12657
+ */
12658
+ referencePriceUsd?: string | null;
12659
+ /**
12660
+ * @description custodyRaw in USD at referencePriceUsd; null without a price or a positive custody
12661
+ * @example 536172600
12662
+ */
12663
+ custodyUsd?: string | null;
12664
+ /**
12665
+ * @description Whether custodyUsd is summed into tvlUsd (USDC only)
12666
+ * @example true
12667
+ */
12668
+ countsTowardTvl?: boolean | null;
12669
+ /**
12670
+ * @description What the vault held before the explorer's history starts, in raw token units: 0 where the history starts at the exchange's first event, the measured balance carried in where it starts later
12671
+ * @example 924746312510000
12672
+ */
12673
+ openingRaw?: string | null;
12674
+ };
12675
+ TpSlLeg: {
12676
+ triggerPrice?: string | null;
12677
+ orderType?: string | null;
12678
+ limitPrice?: string | null;
12679
+ quantity?: string | null;
12680
+ timeInForce?: string | null;
12681
+ /** Format: int32 */
12682
+ slippageToleranceBps?: number | null;
12683
+ expiresAt?: string | null;
12684
+ /**
12685
+ * @description Resolve the full live position size when triggered. Mutually exclusive
12686
+ * with quantity. For compatibility, omitting both quantity and this field
12687
+ * also means full-position close.
12688
+ *
12689
+ * Attaching a full-close leg to a position SUPERSEDES that position's
12690
+ * previously active full-close legs of the same condition type: they are
12691
+ * cancelled in the same engine step that creates the replacement, so moving
12692
+ * a take-profit or stop-loss is one call with no window in which the
12693
+ * position holds both levels or neither. Fixed-quantity legs never
12694
+ * participate — laddered partial exits stack — and a superseded leg's
12695
+ * OCO sibling is left active rather than dropped. An entry order's
12696
+ * full-close legs compete for the same slot once armed: the leg set most
12697
+ * recently wins. So an attach retires an armed entry-order leg, leaves one
12698
+ * still pending on an unfilled order alone, and when that order fills its
12699
+ * leg is cancelled instead of armed if this attach came later.
12700
+ */
12701
+ closePosition?: boolean | null;
12702
+ };
12703
+ /** @description Core fields of a single executed trade, nested under `data` in the public trade event envelope. */
12704
+ TradeData: {
11503
12705
  /**
11504
12706
  * @description Trade execution timestamp (ISO 8601). Omitted when the trade has no execution time.
11505
12707
  * @example 2023-11-13T10:30:00Z
@@ -11562,6 +12764,11 @@ export interface components {
11562
12764
  * @example 789e0123-e45b-12d3-a456-426614174000
11563
12765
  */
11564
12766
  takerApplicationId?: string | null;
12767
+ /**
12768
+ * @description The taker's builder fee: the add-on the taker's application (frontend) charged on the trade, in raw quote-asset units (the asset's smallest unit), on top of takerFeeRaw. "0" when it charged none.
12769
+ * @example 4375
12770
+ */
12771
+ builderFeeRaw?: string | null;
11565
12772
  };
11566
12773
  TradeFlowBucket: {
11567
12774
  /**
@@ -11652,13 +12859,6 @@ export interface components {
11652
12859
  * @example true
11653
12860
  */
11654
12861
  isActive?: boolean | null;
11655
- /**
11656
- * Format: int32
11657
- * @deprecated
11658
- * @description DEPRECATED: legacy flat maker fee in bps (negative = rebate). This is the pre-tiered pair-level rate and does NOT reflect the tiered fee actually charged, which is per-user and fractional. Do not display this as the user's fee — call GET /api/v1/fees/tier for the caller's real rate. Will be removed in a later release.
11659
- * @example -2
11660
- */
11661
- makerFeeBps?: number | null;
11662
12862
  /**
11663
12863
  * @description Market type: SPOT or MARGIN
11664
12864
  * @example SPOT
@@ -11706,13 +12906,6 @@ export interface components {
11706
12906
  * @example BTC/USDC
11707
12907
  */
11708
12908
  symbol?: string | null;
11709
- /**
11710
- * Format: int32
11711
- * @deprecated
11712
- * @description DEPRECATED: legacy flat taker fee in bps. This is the pre-tiered pair-level rate and does NOT reflect the tiered fee actually charged, which is per-user and fractional. Do not display this as the user's fee — call GET /api/v1/fees/tier for the caller's real rate. Will be removed in a later release.
11713
- * @example 10
11714
- */
11715
- takerFeeBps?: number | null;
11716
12909
  /**
11717
12910
  * @description Minimum price increment
11718
12911
  * @example 0.01
@@ -11801,7 +12994,10 @@ export interface components {
11801
12994
  * the parent margin account only.
11802
12995
  */
11803
12996
  tradingPairId?: string | null;
11804
- /** @description Optional strategy key echoed in responses when callers scope a risk bucket. */
12997
+ /**
12998
+ * @description Sub-account key of the margin account in the path, if sent: refused when it
12999
+ * names another account. Echoed on the response.
13000
+ */
11805
13001
  strategyKey?: string | null;
11806
13002
  /**
11807
13003
  * @description Risk bucket mode. Defaults to ISOLATED, which is selected by tradingPairId.
@@ -11827,6 +13023,7 @@ export interface components {
11827
13023
  * zero at the collateral asset's precision.
11828
13024
  */
11829
13025
  newWithdrawableCollateral?: string | null;
13026
+ /** @description The request's strategyKey (the sub-account key), echoed. */
11830
13027
  strategyKey?: string | null;
11831
13028
  };
11832
13029
  TransferCollateralFromParentMarginAccountRequest: {
@@ -11875,7 +13072,10 @@ export interface components {
11875
13072
  * the parent margin account only.
11876
13073
  */
11877
13074
  tradingPairId?: string | null;
11878
- /** @description Optional strategy key echoed in responses when callers scope a risk bucket. */
13075
+ /**
13076
+ * @description Sub-account key of the margin account in the path, if sent: refused when it
13077
+ * names another account. Echoed on the response.
13078
+ */
11879
13079
  strategyKey?: string | null;
11880
13080
  /** @description Optional submission identity, shared with order create (same 1-64 characters from [A-Za-z0-9._:-], same per user and application namespace). Retrying the same key and request within 15 minutes of the original acceptance returns the original transfer result, including its movementId, without moving money again; balance figures in a replayed response are as of the retry. The same key with a different request, or a key already used on another endpoint, returns IDEMPOTENCY_KEY_CONFLICT (HTTP 409 / gRPC ALREADY_EXISTS). ORDER_SUBMISSION_UNAVAILABLE and ORDER_SUBMISSION_CAPACITY_EXCEEDED (HTTP 503 / gRPC UNAVAILABLE) mean the outcome is held but cannot be read, or no new key can be accepted: retry with the same key and request. The window does not extend on retries; after it the key moves money again. Generate a fresh key for each intended transfer and keep it across retries of that transfer. */
11881
13081
  idempotencyKey?: string | null;
@@ -11895,6 +13095,10 @@ export interface components {
11895
13095
  * zero at the collateral asset's precision.
11896
13096
  */
11897
13097
  newWithdrawableCollateral?: string | null;
13098
+ /**
13099
+ * @description The request's strategyKey (the sub-account key), echoed; a risk-bucket
13100
+ * transfer-in that sent none reports `default`.
13101
+ */
11898
13102
  strategyKey?: string | null;
11899
13103
  /** @description Present when collateral was allocated to a risk bucket. */
11900
13104
  riskBucketId?: string | null;
@@ -11932,6 +13136,12 @@ export interface components {
11932
13136
  * Required for isolated risk buckets; omitted for cross risk buckets.
11933
13137
  */
11934
13138
  tradingPairId?: string | null;
13139
+ /**
13140
+ * @description Sub-account key of the margin account whose risk bucket this names, like
13141
+ * marginAccountId (`default` is the default margin account). Refused when it is
13142
+ * not a valid sub-account key, names none of the caller's open sub-accounts, or
13143
+ * disagrees with marginAccountId.
13144
+ */
11935
13145
  strategyKey?: string | null;
11936
13146
  /**
11937
13147
  * @description Risk bucket mode. Defaults to ISOLATED. Values: ISOLATED, CROSS. A CROSS
@@ -12139,7 +13349,7 @@ export interface components {
12139
13349
  * @example false
12140
13350
  */
12141
13351
  useMasterBalance?: boolean | null;
12142
- /** @description Strategy key used to group risk buckets */
13352
+ /** @description The strategyKey the parent was created with (the sub-account key) */
12143
13353
  strategyKey?: string | null;
12144
13354
  /** @description Client-assigned idempotency key */
12145
13355
  clientTwapId?: string | null;
@@ -12577,6 +13787,128 @@ export interface components {
12577
13787
  * @example TAKER
12578
13788
  */
12579
13789
  liquidityRole?: string | null;
13790
+ /**
13791
+ * Format: uuid
13792
+ * @description The RFQ (block trade) this user's own order filled in; absent on an order-book fill. Read the RFQ with GetRfq.
13793
+ */
13794
+ rfqId?: string | null;
13795
+ /**
13796
+ * Format: uuid
13797
+ * @description Set on a maker's RFQ fill only: the internal engine id of the quote version the maker's order rested for. It is not the public quoteId.
13798
+ */
13799
+ rfqQuoteId?: string | null;
13800
+ };
13801
+ /** @description One deposit into the vault */
13802
+ VaultDeposit: {
13803
+ /**
13804
+ * Format: int64
13805
+ * @description The deposit's on-chain index; the feed's order
13806
+ * @example 1042
13807
+ */
13808
+ onChainIndex?: number | null;
13809
+ /**
13810
+ * @description Deposit transaction hash
13811
+ * @example 0x5f2c...
13812
+ */
13813
+ txHash?: string | null;
13814
+ /**
13815
+ * Format: int64
13816
+ * @description Block the deposit landed in
13817
+ * @example 18273645
13818
+ */
13819
+ blockNumber?: number | null;
13820
+ /**
13821
+ * @description Token contract address, lowercase
13822
+ * @example 0x23e459c24c4925ba89205c400dceca7abc11723d
13823
+ */
13824
+ token?: string | null;
13825
+ /**
13826
+ * Format: uuid
13827
+ * @description Asset UUID, when the token is listed
13828
+ */
13829
+ assetId?: string | null;
13830
+ /**
13831
+ * @description Asset symbol, when the token is listed
13832
+ * @example USDC
13833
+ */
13834
+ symbol?: string | null;
13835
+ /**
13836
+ * @description Amount in raw token units
13837
+ * @example 5000000
13838
+ */
13839
+ amountRaw?: string | null;
13840
+ /**
13841
+ * @description Account credited, lowercase
13842
+ * @example 0x1234567890abcdef1234567890abcdef12345678
13843
+ */
13844
+ destination?: string | null;
13845
+ /**
13846
+ * @description Account type credited
13847
+ * @example SPOT
13848
+ */
13849
+ targetAccountType?: string | null;
13850
+ /**
13851
+ * Format: int64
13852
+ * @description When the deposit was processed, as Unix milliseconds
13853
+ * @example 1762041600000
13854
+ */
13855
+ depositedAt?: number | null;
13856
+ /**
13857
+ * @description The displayed builder the deposit came through; null when the builder is
13858
+ * hidden or the deposit names none. applications is empty.
13859
+ */
13860
+ builder?: components["schemas"]["Builder"] | null;
13861
+ };
13862
+ /** @description One withdrawal from the vault, from initiation on */
13863
+ VaultWithdrawal: {
13864
+ /**
13865
+ * Format: int64
13866
+ * @description Withdrawal index, allocated in request order; the feed's order
13867
+ * @example 42
13868
+ */
13869
+ withdrawalIndex?: number | null;
13870
+ /**
13871
+ * @description Token contract address, lowercase
13872
+ * @example 0x23e459c24c4925ba89205c400dceca7abc11723d
13873
+ */
13874
+ token?: string | null;
13875
+ /**
13876
+ * Format: uuid
13877
+ * @description Asset UUID, when the token is listed
13878
+ */
13879
+ assetId?: string | null;
13880
+ /**
13881
+ * @description Asset symbol, when the token is listed
13882
+ * @example USDC
13883
+ */
13884
+ symbol?: string | null;
13885
+ /**
13886
+ * @description Amount in raw token units
13887
+ * @example 5000000
13888
+ */
13889
+ amountRaw?: string | null;
13890
+ /**
13891
+ * @description Address the tokens are paid out to
13892
+ * @example 0x1234567890abcdef1234567890abcdef12345678
13893
+ */
13894
+ destination?: string | null;
13895
+ /**
13896
+ * @description pending: initiated. confirmed: its proof is ready to execute. executed: paid out on-chain.
13897
+ * @example executed
13898
+ * @enum {string|null}
13899
+ */
13900
+ status?: "pending" | "confirmed" | "executed" | null;
13901
+ /**
13902
+ * Format: int64
13903
+ * @description When the withdrawal was initiated, as Unix milliseconds
13904
+ * @example 1762041600000
13905
+ */
13906
+ initiatedAt?: number | null;
13907
+ /**
13908
+ * @description The displayed builder the withdrawal came through; null when the builder
13909
+ * is hidden. applications is empty.
13910
+ */
13911
+ builder?: components["schemas"]["Builder"] | null;
12580
13912
  };
12581
13913
  VerifyRequest: {
12582
13914
  /**
@@ -12600,7 +13932,7 @@ export interface components {
12600
13932
  */
12601
13933
  clientId?: string | null;
12602
13934
  /**
12603
- * @description Optional chain ID supplied by SDK clients
13935
+ * @description Optional EVM chain ID supplied by SDK clients, as a JSON number or a decimal string (for example 1329 or "1329")
12604
13936
  * @example 1328
12605
13937
  */
12606
13938
  chainId?: string | null;
@@ -12647,6 +13979,91 @@ export interface components {
12647
13979
  */
12648
13980
  referralNotAppliedReason?: "REFERRAL_NOT_APPLIED_REASON_UNSPECIFIED" | "REFERRAL_NOT_APPLIED_REASON_ALREADY_REFERRED" | "REFERRAL_NOT_APPLIED_REASON_UNKNOWN_CODE" | "REFERRAL_NOT_APPLIED_REASON_SELF_REFERRAL" | null;
12649
13981
  };
13982
+ /**
13983
+ * @description A market's rolling 24h volume split by execution source (RFQ-17). Each
13984
+ * total is the order-book part plus the RFQ part.
13985
+ */
13986
+ Volume24hBySource: {
13987
+ /**
13988
+ * @description Base-token volume filled on the order book in the last 24 hours
13989
+ * @example 1200.50000000
13990
+ */
13991
+ orderBookBaseVolume?: string | null;
13992
+ /**
13993
+ * @description Base-token volume filled by RFQ block trades in the last 24 hours
13994
+ * @example 34.00000000
13995
+ */
13996
+ rfqBaseVolume?: string | null;
13997
+ /**
13998
+ * @description Quote-token volume filled on the order book in the last 24 hours; null when the 24h quote volume is unavailable
13999
+ * @example 91000000.00
14000
+ */
14001
+ orderBookQuoteVolume?: string | null;
14002
+ /**
14003
+ * @description Quote-token volume filled by RFQ block trades in the last 24 hours; null when the 24h quote volume is unavailable
14004
+ * @example 2580000.00
14005
+ */
14006
+ rfqQuoteVolume?: string | null;
14007
+ };
14008
+ /** @description A wallet's figures through one displayed builder. A display group's applications fold into one row under the group. */
14009
+ WalletBuilderVolume: {
14010
+ /** @description The builder the figures are reported under; applications is empty. */
14011
+ builder?: components["schemas"]["Builder"] | null;
14012
+ /**
14013
+ * @description All-time taker volume in USD through this builder
14014
+ * @example 52000
14015
+ */
14016
+ volumeUsd?: string | null;
14017
+ /**
14018
+ * Format: int64
14019
+ * @description Trades through this builder
14020
+ * @example 180
14021
+ */
14022
+ tradesCount?: number | null;
14023
+ /**
14024
+ * Format: int64
14025
+ * @description First taker trade through this builder as Unix milliseconds
14026
+ * @example 1758000000000
14027
+ */
14028
+ firstTradedAt?: number | null;
14029
+ /**
14030
+ * Format: int64
14031
+ * @description Latest taker trade through this builder as Unix milliseconds
14032
+ * @example 1762041600000
14033
+ */
14034
+ lastTradedAt?: number | null;
14035
+ };
14036
+ /** @description One wallet's all-time taker figures, every builder included */
14037
+ WalletVolume: {
14038
+ /**
14039
+ * @description Wallet address, lowercase
14040
+ * @example 0x1234567890abcdef1234567890abcdef12345678
14041
+ */
14042
+ wallet?: string | null;
14043
+ /**
14044
+ * @description All-time taker volume in USD (USDC 1:1)
14045
+ * @example 125000.5
14046
+ */
14047
+ volumeUsd?: string | null;
14048
+ /**
14049
+ * Format: int64
14050
+ * @description Trades the wallet took
14051
+ * @example 412
14052
+ */
14053
+ tradesCount?: number | null;
14054
+ /**
14055
+ * Format: int64
14056
+ * @description The wallet's first taker trade as Unix milliseconds
14057
+ * @example 1758000000000
14058
+ */
14059
+ firstTradedAt?: number | null;
14060
+ /**
14061
+ * Format: int64
14062
+ * @description The wallet's latest taker trade as Unix milliseconds
14063
+ * @example 1762041600000
14064
+ */
14065
+ lastTradedAt?: number | null;
14066
+ };
12650
14067
  WithdrawRfqQuoteRequest: {
12651
14068
  /**
12652
14069
  * Format: int64
@@ -12678,6 +14095,20 @@ export interface components {
12678
14095
  /** @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 */
12679
14096
  calldata?: string | null;
12680
14097
  };
14098
+ /** @description What the wallet traded through builders the explorer does not display, so the builder rows and the wallet total reconcile */
14099
+ WithheldVolume: {
14100
+ /**
14101
+ * @description Taker volume in USD through hidden builders
14102
+ * @example 1500
14103
+ */
14104
+ volumeUsd?: string | null;
14105
+ /**
14106
+ * Format: int64
14107
+ * @description Trades through hidden builders
14108
+ * @example 12
14109
+ */
14110
+ tradesCount?: number | null;
14111
+ };
12681
14112
  };
12682
14113
  responses: never;
12683
14114
  parameters: never;
@@ -13460,18 +14891,811 @@ export interface operations {
13460
14891
  };
13461
14892
  };
13462
14893
  };
13463
- set_self_trade_prevention_default: {
14894
+ set_self_trade_prevention_default: {
14895
+ parameters: {
14896
+ query?: never;
14897
+ header?: never;
14898
+ path?: never;
14899
+ cookie?: never;
14900
+ };
14901
+ requestBody: {
14902
+ content: {
14903
+ "application/json": components["schemas"]["SetSelfTradePreventionDefaultRequest"];
14904
+ };
14905
+ };
14906
+ responses: {
14907
+ /** @description OK */
14908
+ 200: {
14909
+ headers: {
14910
+ [name: string]: unknown;
14911
+ };
14912
+ content: {
14913
+ "application/json": components["schemas"]["SelfTradePreventionDefaultResponse"];
14914
+ };
14915
+ };
14916
+ /** @description Unknown mode */
14917
+ 400: {
14918
+ headers: {
14919
+ [name: string]: unknown;
14920
+ };
14921
+ content?: never;
14922
+ };
14923
+ /** @description Authentication required */
14924
+ 401: {
14925
+ headers: {
14926
+ [name: string]: unknown;
14927
+ };
14928
+ content?: never;
14929
+ };
14930
+ /** @description Delegated-agent sessions cannot change account settings */
14931
+ 403: {
14932
+ headers: {
14933
+ [name: string]: unknown;
14934
+ };
14935
+ content?: never;
14936
+ };
14937
+ /** @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 */
14938
+ 429: {
14939
+ headers: {
14940
+ [name: string]: unknown;
14941
+ };
14942
+ content?: never;
14943
+ };
14944
+ /** @description Internal server error */
14945
+ 500: {
14946
+ headers: {
14947
+ [name: string]: unknown;
14948
+ };
14949
+ content?: never;
14950
+ };
14951
+ };
14952
+ };
14953
+ list_sub_accounts_with_balances: {
14954
+ parameters: {
14955
+ query?: never;
14956
+ header?: never;
14957
+ path?: never;
14958
+ cookie?: never;
14959
+ };
14960
+ requestBody?: never;
14961
+ responses: {
14962
+ /** @description OK */
14963
+ 200: {
14964
+ headers: {
14965
+ [name: string]: unknown;
14966
+ };
14967
+ content: {
14968
+ "application/json": components["schemas"]["ListSubAccountsResponse"];
14969
+ };
14970
+ };
14971
+ /** @description Invalid request */
14972
+ 400: {
14973
+ headers: {
14974
+ [name: string]: unknown;
14975
+ };
14976
+ content?: never;
14977
+ };
14978
+ /** @description Authentication required */
14979
+ 401: {
14980
+ headers: {
14981
+ [name: string]: unknown;
14982
+ };
14983
+ content?: never;
14984
+ };
14985
+ /** @description Only master accounts can view sub-accounts */
14986
+ 403: {
14987
+ headers: {
14988
+ [name: string]: unknown;
14989
+ };
14990
+ content?: never;
14991
+ };
14992
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
14993
+ 429: {
14994
+ headers: {
14995
+ [name: string]: unknown;
14996
+ };
14997
+ content?: never;
14998
+ };
14999
+ /** @description Internal server error */
15000
+ 500: {
15001
+ headers: {
15002
+ [name: string]: unknown;
15003
+ };
15004
+ content?: never;
15005
+ };
15006
+ };
15007
+ };
15008
+ create_sub_account_limit: {
15009
+ parameters: {
15010
+ query?: never;
15011
+ header?: never;
15012
+ path?: never;
15013
+ cookie?: never;
15014
+ };
15015
+ requestBody: {
15016
+ content: {
15017
+ "application/json": components["schemas"]["CreateLimitRequest"];
15018
+ };
15019
+ };
15020
+ responses: {
15021
+ /** @description OK */
15022
+ 200: {
15023
+ headers: {
15024
+ [name: string]: unknown;
15025
+ };
15026
+ content: {
15027
+ "application/json": components["schemas"]["CreateLimitResponse"];
15028
+ };
15029
+ };
15030
+ /** @description Limit created successfully */
15031
+ 201: {
15032
+ headers: {
15033
+ [name: string]: unknown;
15034
+ };
15035
+ content: {
15036
+ "application/json": components["schemas"]["CreateLimitResponse"];
15037
+ };
15038
+ };
15039
+ /** @description Invalid request or limit already exists */
15040
+ 400: {
15041
+ headers: {
15042
+ [name: string]: unknown;
15043
+ };
15044
+ content?: never;
15045
+ };
15046
+ /** @description Authentication required */
15047
+ 401: {
15048
+ headers: {
15049
+ [name: string]: unknown;
15050
+ };
15051
+ content?: never;
15052
+ };
15053
+ /** @description Only master accounts can set sub-account limits */
15054
+ 403: {
15055
+ headers: {
15056
+ [name: string]: unknown;
15057
+ };
15058
+ content?: never;
15059
+ };
15060
+ /** @description Sub-account relationship not found or asset not found */
15061
+ 404: {
15062
+ headers: {
15063
+ [name: string]: unknown;
15064
+ };
15065
+ content?: never;
15066
+ };
15067
+ /** @description Internal server error */
15068
+ 500: {
15069
+ headers: {
15070
+ [name: string]: unknown;
15071
+ };
15072
+ content?: never;
15073
+ };
15074
+ };
15075
+ };
15076
+ get_sub_account_limits: {
15077
+ parameters: {
15078
+ query?: never;
15079
+ header?: never;
15080
+ path: {
15081
+ /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
15082
+ subAccountId: string;
15083
+ };
15084
+ cookie?: never;
15085
+ };
15086
+ requestBody?: never;
15087
+ responses: {
15088
+ /** @description OK */
15089
+ 200: {
15090
+ headers: {
15091
+ [name: string]: unknown;
15092
+ };
15093
+ content: {
15094
+ "application/json": components["schemas"]["GetLimitsResponse"];
15095
+ };
15096
+ };
15097
+ /** @description Invalid request */
15098
+ 400: {
15099
+ headers: {
15100
+ [name: string]: unknown;
15101
+ };
15102
+ content?: never;
15103
+ };
15104
+ /** @description Authentication required */
15105
+ 401: {
15106
+ headers: {
15107
+ [name: string]: unknown;
15108
+ };
15109
+ content?: never;
15110
+ };
15111
+ /** @description Sub-account not found */
15112
+ 404: {
15113
+ headers: {
15114
+ [name: string]: unknown;
15115
+ };
15116
+ content?: never;
15117
+ };
15118
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
15119
+ 429: {
15120
+ headers: {
15121
+ [name: string]: unknown;
15122
+ };
15123
+ content?: never;
15124
+ };
15125
+ /** @description Internal server error */
15126
+ 500: {
15127
+ headers: {
15128
+ [name: string]: unknown;
15129
+ };
15130
+ content?: never;
15131
+ };
15132
+ };
15133
+ };
15134
+ update_sub_account_limit: {
15135
+ parameters: {
15136
+ query?: never;
15137
+ header?: never;
15138
+ path: {
15139
+ /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
15140
+ subAccountId: string;
15141
+ /** @example 1905d968-cc65-4cc7-b77c-1905d968cc65 */
15142
+ assetId: string;
15143
+ };
15144
+ cookie?: never;
15145
+ };
15146
+ requestBody: {
15147
+ content: {
15148
+ "application/json": components["schemas"]["UpdateLimitRequest"];
15149
+ };
15150
+ };
15151
+ responses: {
15152
+ /** @description OK */
15153
+ 200: {
15154
+ headers: {
15155
+ [name: string]: unknown;
15156
+ };
15157
+ content: {
15158
+ "application/json": components["schemas"]["UpdateLimitResponse"];
15159
+ };
15160
+ };
15161
+ /** @description Invalid request */
15162
+ 400: {
15163
+ headers: {
15164
+ [name: string]: unknown;
15165
+ };
15166
+ content?: never;
15167
+ };
15168
+ /** @description Authentication required */
15169
+ 401: {
15170
+ headers: {
15171
+ [name: string]: unknown;
15172
+ };
15173
+ content?: never;
15174
+ };
15175
+ /** @description Only master accounts can update sub-account limits */
15176
+ 403: {
15177
+ headers: {
15178
+ [name: string]: unknown;
15179
+ };
15180
+ content?: never;
15181
+ };
15182
+ /** @description Limit not found */
15183
+ 404: {
15184
+ headers: {
15185
+ [name: string]: unknown;
15186
+ };
15187
+ content?: never;
15188
+ };
15189
+ /** @description Internal server error */
15190
+ 500: {
15191
+ headers: {
15192
+ [name: string]: unknown;
15193
+ };
15194
+ content?: never;
15195
+ };
15196
+ };
15197
+ };
15198
+ delete_sub_account_limit: {
15199
+ parameters: {
15200
+ query?: {
15201
+ /** @description Limit identifier (UUID) */
15202
+ limitId?: string;
15203
+ };
15204
+ header?: never;
15205
+ path: {
15206
+ /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
15207
+ subAccountId: string;
15208
+ /** @example 1905d968-cc65-4cc7-b77c-1905d968cc65 */
15209
+ assetId: string;
15210
+ };
15211
+ cookie?: never;
15212
+ };
15213
+ requestBody?: never;
15214
+ responses: {
15215
+ /** @description OK */
15216
+ 200: {
15217
+ headers: {
15218
+ [name: string]: unknown;
15219
+ };
15220
+ content: {
15221
+ "application/json": components["schemas"]["DeleteLimitResponse"];
15222
+ };
15223
+ };
15224
+ /** @description Invalid request */
15225
+ 400: {
15226
+ headers: {
15227
+ [name: string]: unknown;
15228
+ };
15229
+ content?: never;
15230
+ };
15231
+ /** @description Authentication required */
15232
+ 401: {
15233
+ headers: {
15234
+ [name: string]: unknown;
15235
+ };
15236
+ content?: never;
15237
+ };
15238
+ /** @description Only master accounts can delete sub-account limits */
15239
+ 403: {
15240
+ headers: {
15241
+ [name: string]: unknown;
15242
+ };
15243
+ content?: never;
15244
+ };
15245
+ /** @description Limit not found */
15246
+ 404: {
15247
+ headers: {
15248
+ [name: string]: unknown;
15249
+ };
15250
+ content?: never;
15251
+ };
15252
+ /** @description Internal server error */
15253
+ 500: {
15254
+ headers: {
15255
+ [name: string]: unknown;
15256
+ };
15257
+ content?: never;
15258
+ };
15259
+ };
15260
+ };
15261
+ get_user_trades: {
15262
+ parameters: {
15263
+ query?: {
15264
+ /** @description Items per page (max: 100 in page-number mode; up to 1000 when pageToken is present) */
15265
+ pageSize?: number;
15266
+ /** @description Trading pair identifier (UUID) */
15267
+ tradingPairId?: string;
15268
+ /**
15269
+ * @description Pagination cursor with two states:
15270
+ * - Omitted or empty string (""): start a cursor walk with no prior
15271
+ * position, from the newest row.
15272
+ * - Non-empty: an opaque cursor from a previous response's
15273
+ * `nextPageToken`; results resume immediately after that position.
15274
+ *
15275
+ * Every walk covers full trade history — hot and archived rows merged. An
15276
+ * unfiltered response carries a bounded item count (`total`); a response
15277
+ * filtered by `trading_pair_id` carries none. Filters must match the request
15278
+ * that produced the token.
15279
+ */
15280
+ pageToken?: string;
15281
+ /**
15282
+ * @description Optional margin account UUID filter: only trades where this user's side of
15283
+ * the fill was placed from this margin account. A self-trade is read as its
15284
+ * maker side, so it matches through its maker order's account. Like
15285
+ * `trading_pair_id`, a filtered response carries no `total`, and the filter
15286
+ * must match the request that produced a `page_token`.
15287
+ */
15288
+ marginAccountId?: string;
15289
+ /**
15290
+ * @description Optional order UUID filter: only trades where this user's side of the
15291
+ * fill was placed by this order. A self-trade is read as its maker side, so
15292
+ * it matches its maker order only. A filtered response carries no `total`,
15293
+ * and the filter must match the request that produced a `page_token`.
15294
+ */
15295
+ orderId?: string;
15296
+ };
15297
+ header?: never;
15298
+ path?: never;
15299
+ cookie?: never;
15300
+ };
15301
+ requestBody?: never;
15302
+ responses: {
15303
+ /** @description OK */
15304
+ 200: {
15305
+ headers: {
15306
+ [name: string]: unknown;
15307
+ };
15308
+ content: {
15309
+ "application/json": components["schemas"]["GetUserTradesResponse"];
15310
+ };
15311
+ };
15312
+ /** @description Invalid request */
15313
+ 400: {
15314
+ headers: {
15315
+ [name: string]: unknown;
15316
+ };
15317
+ content?: never;
15318
+ };
15319
+ /** @description Authentication required */
15320
+ 401: {
15321
+ headers: {
15322
+ [name: string]: unknown;
15323
+ };
15324
+ content?: never;
15325
+ };
15326
+ /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
15327
+ 429: {
15328
+ headers: {
15329
+ [name: string]: unknown;
15330
+ };
15331
+ content?: never;
15332
+ };
15333
+ /** @description Internal server error */
15334
+ 500: {
15335
+ headers: {
15336
+ [name: string]: unknown;
15337
+ };
15338
+ content?: never;
15339
+ };
15340
+ };
15341
+ };
15342
+ list_builder_leaderboard: {
15343
+ parameters: {
15344
+ query?: {
15345
+ /** @description Window: the last 24 hours, 7 days or 30 days before endTime, all time, or custom (startTime to endTime) */
15346
+ window?: "24h" | "7d" | "30d" | "all" | "custom";
15347
+ /** @description Custom window start as Unix milliseconds. Required with window=custom and rejected otherwise. */
15348
+ startTime?: number;
15349
+ /** @description Window end as Unix milliseconds; defaults to now. Buckets starting at or before it count. A window counted in hours (2.5 days or shorter) must start within the last 90 days. */
15350
+ endTime?: number;
15351
+ /** @description Builders to return, largest volume first (max 100) */
15352
+ limit?: number;
15353
+ };
15354
+ header?: never;
15355
+ path?: never;
15356
+ cookie?: never;
15357
+ };
15358
+ requestBody?: never;
15359
+ responses: {
15360
+ /** @description OK */
15361
+ 200: {
15362
+ headers: {
15363
+ [name: string]: unknown;
15364
+ };
15365
+ content: {
15366
+ "application/json": components["schemas"]["ListBuilderLeaderboardResponse"];
15367
+ };
15368
+ };
15369
+ /** @description Invalid window or limit */
15370
+ 400: {
15371
+ headers: {
15372
+ [name: string]: unknown;
15373
+ };
15374
+ content?: never;
15375
+ };
15376
+ /** @description Public read rate limit exceeded for this client */
15377
+ 429: {
15378
+ headers: {
15379
+ [name: string]: unknown;
15380
+ };
15381
+ content?: never;
15382
+ };
15383
+ /** @description Internal server error */
15384
+ 500: {
15385
+ headers: {
15386
+ [name: string]: unknown;
15387
+ };
15388
+ content?: never;
15389
+ };
15390
+ };
15391
+ };
15392
+ list_builders: {
15393
+ parameters: {
15394
+ query?: never;
15395
+ header?: never;
15396
+ path?: never;
15397
+ cookie?: never;
15398
+ };
15399
+ requestBody?: never;
15400
+ responses: {
15401
+ /** @description OK */
15402
+ 200: {
15403
+ headers: {
15404
+ [name: string]: unknown;
15405
+ };
15406
+ content: {
15407
+ "application/json": components["schemas"]["ListBuildersResponse"];
15408
+ };
15409
+ };
15410
+ /** @description Public read rate limit exceeded for this client */
15411
+ 429: {
15412
+ headers: {
15413
+ [name: string]: unknown;
15414
+ };
15415
+ content?: never;
15416
+ };
15417
+ /** @description Internal server error */
15418
+ 500: {
15419
+ headers: {
15420
+ [name: string]: unknown;
15421
+ };
15422
+ content?: never;
15423
+ };
15424
+ };
15425
+ };
15426
+ get_builder: {
15427
+ parameters: {
15428
+ query?: never;
15429
+ header?: never;
15430
+ path: {
15431
+ /** @example 2fcec460c89c4bedb06781d4072db931 */
15432
+ builder: string;
15433
+ };
15434
+ cookie?: never;
15435
+ };
15436
+ requestBody?: never;
15437
+ responses: {
15438
+ /** @description OK */
15439
+ 200: {
15440
+ headers: {
15441
+ [name: string]: unknown;
15442
+ };
15443
+ content: {
15444
+ "application/json": components["schemas"]["GetBuilderResponse"];
15445
+ };
15446
+ };
15447
+ /** @description No displayed builder answers to this key */
15448
+ 404: {
15449
+ headers: {
15450
+ [name: string]: unknown;
15451
+ };
15452
+ content?: never;
15453
+ };
15454
+ /** @description Public read rate limit exceeded for this client */
15455
+ 429: {
15456
+ headers: {
15457
+ [name: string]: unknown;
15458
+ };
15459
+ content?: never;
15460
+ };
15461
+ /** @description Internal server error */
15462
+ 500: {
15463
+ headers: {
15464
+ [name: string]: unknown;
15465
+ };
15466
+ content?: never;
15467
+ };
15468
+ };
15469
+ };
15470
+ get_builder_series: {
15471
+ parameters: {
15472
+ query?: {
15473
+ /** @description Window: the last 24 hours, 7 days or 30 days before endTime, all time, or custom (startTime to endTime) */
15474
+ window?: "24h" | "7d" | "30d" | "all" | "custom";
15475
+ /** @description Custom window start as Unix milliseconds. Required with window=custom and rejected otherwise. */
15476
+ startTime?: number;
15477
+ /** @description Window end as Unix milliseconds; defaults to now. Buckets starting at or before it count. A window counted in hours (2.5 days or shorter) must start within the last 90 days. */
15478
+ endTime?: number;
15479
+ };
15480
+ header?: never;
15481
+ path: {
15482
+ /** @example 2fcec460c89c4bedb06781d4072db931 */
15483
+ builder: string;
15484
+ };
15485
+ cookie?: never;
15486
+ };
15487
+ requestBody?: never;
15488
+ responses: {
15489
+ /** @description OK */
15490
+ 200: {
15491
+ headers: {
15492
+ [name: string]: unknown;
15493
+ };
15494
+ content: {
15495
+ "application/json": components["schemas"]["GetBuilderSeriesResponse"];
15496
+ };
15497
+ };
15498
+ /** @description Invalid window */
15499
+ 400: {
15500
+ headers: {
15501
+ [name: string]: unknown;
15502
+ };
15503
+ content?: never;
15504
+ };
15505
+ /** @description No displayed builder answers to this key */
15506
+ 404: {
15507
+ headers: {
15508
+ [name: string]: unknown;
15509
+ };
15510
+ content?: never;
15511
+ };
15512
+ /** @description Public read rate limit exceeded for this client */
15513
+ 429: {
15514
+ headers: {
15515
+ [name: string]: unknown;
15516
+ };
15517
+ content?: never;
15518
+ };
15519
+ /** @description Internal server error */
15520
+ 500: {
15521
+ headers: {
15522
+ [name: string]: unknown;
15523
+ };
15524
+ content?: never;
15525
+ };
15526
+ };
15527
+ };
15528
+ get_builder_totals: {
15529
+ parameters: {
15530
+ query?: {
15531
+ /** @description Window: the last 24 hours, 7 days or 30 days before endTime, all time, or custom (startTime to endTime) */
15532
+ window?: "24h" | "7d" | "30d" | "all" | "custom";
15533
+ /** @description Custom window start as Unix milliseconds. Required with window=custom and rejected otherwise. */
15534
+ startTime?: number;
15535
+ /** @description Window end as Unix milliseconds; defaults to now. Buckets starting at or before it count. A window counted in hours (2.5 days or shorter) must start within the last 90 days. */
15536
+ endTime?: number;
15537
+ };
15538
+ header?: never;
15539
+ path: {
15540
+ /** @example 2fcec460c89c4bedb06781d4072db931 */
15541
+ builder: string;
15542
+ };
15543
+ cookie?: never;
15544
+ };
15545
+ requestBody?: never;
15546
+ responses: {
15547
+ /** @description OK */
15548
+ 200: {
15549
+ headers: {
15550
+ [name: string]: unknown;
15551
+ };
15552
+ content: {
15553
+ "application/json": components["schemas"]["GetBuilderTotalsResponse"];
15554
+ };
15555
+ };
15556
+ /** @description Invalid window */
15557
+ 400: {
15558
+ headers: {
15559
+ [name: string]: unknown;
15560
+ };
15561
+ content?: never;
15562
+ };
15563
+ /** @description No displayed builder answers to this key */
15564
+ 404: {
15565
+ headers: {
15566
+ [name: string]: unknown;
15567
+ };
15568
+ content?: never;
15569
+ };
15570
+ /** @description Public read rate limit exceeded for this client */
15571
+ 429: {
15572
+ headers: {
15573
+ [name: string]: unknown;
15574
+ };
15575
+ content?: never;
15576
+ };
15577
+ /** @description Internal server error */
15578
+ 500: {
15579
+ headers: {
15580
+ [name: string]: unknown;
15581
+ };
15582
+ content?: never;
15583
+ };
15584
+ };
15585
+ };
15586
+ list_vault_deposits: {
15587
+ parameters: {
15588
+ query?: {
15589
+ /** @description Deposits per page (max 1000) */
15590
+ pageSize?: number;
15591
+ /** @description Opaque keyset cursor from the previous response, bound to the filters. */
15592
+ pageToken?: string;
15593
+ token?: string;
15594
+ wallet?: string;
15595
+ };
15596
+ header?: never;
15597
+ path?: never;
15598
+ cookie?: never;
15599
+ };
15600
+ requestBody?: never;
15601
+ responses: {
15602
+ /** @description OK */
15603
+ 200: {
15604
+ headers: {
15605
+ [name: string]: unknown;
15606
+ };
15607
+ content: {
15608
+ "application/json": components["schemas"]["ListVaultDepositsResponse"];
15609
+ };
15610
+ };
15611
+ /** @description Invalid page size or page token */
15612
+ 400: {
15613
+ headers: {
15614
+ [name: string]: unknown;
15615
+ };
15616
+ content?: never;
15617
+ };
15618
+ /** @description Public read rate limit exceeded for this client */
15619
+ 429: {
15620
+ headers: {
15621
+ [name: string]: unknown;
15622
+ };
15623
+ content?: never;
15624
+ };
15625
+ /** @description Internal server error */
15626
+ 500: {
15627
+ headers: {
15628
+ [name: string]: unknown;
15629
+ };
15630
+ content?: never;
15631
+ };
15632
+ };
15633
+ };
15634
+ list_market_volumes: {
15635
+ parameters: {
15636
+ query?: {
15637
+ /** @description Window: the last 24 hours, 7 days or 30 days before endTime, all time, or custom (startTime to endTime) */
15638
+ window?: "24h" | "7d" | "30d" | "all" | "custom";
15639
+ /** @description Custom window start as Unix milliseconds. Required with window=custom and rejected otherwise. */
15640
+ startTime?: number;
15641
+ /** @description Window end as Unix milliseconds; defaults to now. Buckets starting at or before it count. A window counted in hours (2.5 days or shorter) must start within the last 90 days. */
15642
+ endTime?: number;
15643
+ /** @description Markets to return, largest volume first (max 100) */
15644
+ limit?: number;
15645
+ };
15646
+ header?: never;
15647
+ path?: never;
15648
+ cookie?: never;
15649
+ };
15650
+ requestBody?: never;
15651
+ responses: {
15652
+ /** @description OK */
15653
+ 200: {
15654
+ headers: {
15655
+ [name: string]: unknown;
15656
+ };
15657
+ content: {
15658
+ "application/json": components["schemas"]["ListMarketVolumesResponse"];
15659
+ };
15660
+ };
15661
+ /** @description Invalid window or limit */
15662
+ 400: {
15663
+ headers: {
15664
+ [name: string]: unknown;
15665
+ };
15666
+ content?: never;
15667
+ };
15668
+ /** @description Public read rate limit exceeded for this client */
15669
+ 429: {
15670
+ headers: {
15671
+ [name: string]: unknown;
15672
+ };
15673
+ content?: never;
15674
+ };
15675
+ /** @description Internal server error */
15676
+ 500: {
15677
+ headers: {
15678
+ [name: string]: unknown;
15679
+ };
15680
+ content?: never;
15681
+ };
15682
+ };
15683
+ };
15684
+ get_protocol_series: {
13464
15685
  parameters: {
13465
- query?: never;
15686
+ query?: {
15687
+ /** @description Window: the last 24 hours, 7 days or 30 days before endTime, all time, or custom (startTime to endTime) */
15688
+ window?: "24h" | "7d" | "30d" | "all" | "custom";
15689
+ /** @description Custom window start as Unix milliseconds. Required with window=custom and rejected otherwise. */
15690
+ startTime?: number;
15691
+ /** @description Window end as Unix milliseconds; defaults to now. Buckets starting at or before it count. A window counted in hours (2.5 days or shorter) must start within the last 90 days. */
15692
+ endTime?: number;
15693
+ };
13466
15694
  header?: never;
13467
15695
  path?: never;
13468
15696
  cookie?: never;
13469
15697
  };
13470
- requestBody: {
13471
- content: {
13472
- "application/json": components["schemas"]["SetSelfTradePreventionDefaultRequest"];
13473
- };
13474
- };
15698
+ requestBody?: never;
13475
15699
  responses: {
13476
15700
  /** @description OK */
13477
15701
  200: {
@@ -13479,31 +15703,17 @@ export interface operations {
13479
15703
  [name: string]: unknown;
13480
15704
  };
13481
15705
  content: {
13482
- "application/json": components["schemas"]["SelfTradePreventionDefaultResponse"];
15706
+ "application/json": components["schemas"]["GetProtocolSeriesResponse"];
13483
15707
  };
13484
15708
  };
13485
- /** @description Unknown mode */
15709
+ /** @description Invalid window */
13486
15710
  400: {
13487
15711
  headers: {
13488
15712
  [name: string]: unknown;
13489
15713
  };
13490
15714
  content?: never;
13491
15715
  };
13492
- /** @description Authentication required */
13493
- 401: {
13494
- headers: {
13495
- [name: string]: unknown;
13496
- };
13497
- content?: never;
13498
- };
13499
- /** @description Delegated-agent sessions cannot change account settings */
13500
- 403: {
13501
- headers: {
13502
- [name: string]: unknown;
13503
- };
13504
- content?: never;
13505
- };
13506
- /** @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 */
15716
+ /** @description Public read rate limit exceeded for this client */
13507
15717
  429: {
13508
15718
  headers: {
13509
15719
  [name: string]: unknown;
@@ -13519,9 +15729,16 @@ export interface operations {
13519
15729
  };
13520
15730
  };
13521
15731
  };
13522
- list_sub_accounts_with_balances: {
15732
+ get_protocol_totals: {
13523
15733
  parameters: {
13524
- query?: never;
15734
+ query?: {
15735
+ /** @description Window: the last 24 hours, 7 days or 30 days before endTime, all time, or custom (startTime to endTime) */
15736
+ window?: "24h" | "7d" | "30d" | "all" | "custom";
15737
+ /** @description Custom window start as Unix milliseconds. Required with window=custom and rejected otherwise. */
15738
+ startTime?: number;
15739
+ /** @description Window end as Unix milliseconds; defaults to now. Buckets starting at or before it count. A window counted in hours (2.5 days or shorter) must start within the last 90 days. */
15740
+ endTime?: number;
15741
+ };
13525
15742
  header?: never;
13526
15743
  path?: never;
13527
15744
  cookie?: never;
@@ -13534,31 +15751,17 @@ export interface operations {
13534
15751
  [name: string]: unknown;
13535
15752
  };
13536
15753
  content: {
13537
- "application/json": components["schemas"]["ListSubAccountsResponse"];
15754
+ "application/json": components["schemas"]["GetProtocolTotalsResponse"];
13538
15755
  };
13539
15756
  };
13540
- /** @description Invalid request */
15757
+ /** @description Invalid window */
13541
15758
  400: {
13542
15759
  headers: {
13543
15760
  [name: string]: unknown;
13544
15761
  };
13545
15762
  content?: never;
13546
15763
  };
13547
- /** @description Authentication required */
13548
- 401: {
13549
- headers: {
13550
- [name: string]: unknown;
13551
- };
13552
- content?: never;
13553
- };
13554
- /** @description Only master accounts can view sub-accounts */
13555
- 403: {
13556
- headers: {
13557
- [name: string]: unknown;
13558
- };
13559
- content?: never;
13560
- };
13561
- /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
15764
+ /** @description Public read rate limit exceeded for this client */
13562
15765
  429: {
13563
15766
  headers: {
13564
15767
  [name: string]: unknown;
@@ -13574,18 +15777,14 @@ export interface operations {
13574
15777
  };
13575
15778
  };
13576
15779
  };
13577
- create_sub_account_limit: {
15780
+ list_token_custody: {
13578
15781
  parameters: {
13579
15782
  query?: never;
13580
15783
  header?: never;
13581
15784
  path?: never;
13582
15785
  cookie?: never;
13583
15786
  };
13584
- requestBody: {
13585
- content: {
13586
- "application/json": components["schemas"]["CreateLimitRequest"];
13587
- };
13588
- };
15787
+ requestBody?: never;
13589
15788
  responses: {
13590
15789
  /** @description OK */
13591
15790
  200: {
@@ -13593,41 +15792,54 @@ export interface operations {
13593
15792
  [name: string]: unknown;
13594
15793
  };
13595
15794
  content: {
13596
- "application/json": components["schemas"]["CreateLimitResponse"];
15795
+ "application/json": components["schemas"]["ListTokenCustodyResponse"];
13597
15796
  };
13598
15797
  };
13599
- /** @description Limit created successfully */
13600
- 201: {
15798
+ /** @description Public read rate limit exceeded for this client */
15799
+ 429: {
13601
15800
  headers: {
13602
15801
  [name: string]: unknown;
13603
15802
  };
13604
- content: {
13605
- "application/json": components["schemas"]["CreateLimitResponse"];
13606
- };
15803
+ content?: never;
13607
15804
  };
13608
- /** @description Invalid request or limit already exists */
13609
- 400: {
15805
+ /** @description Internal server error */
15806
+ 500: {
13610
15807
  headers: {
13611
15808
  [name: string]: unknown;
13612
15809
  };
13613
15810
  content?: never;
13614
15811
  };
13615
- /** @description Authentication required */
13616
- 401: {
15812
+ };
15813
+ };
15814
+ get_token_custody: {
15815
+ parameters: {
15816
+ query?: never;
15817
+ header?: never;
15818
+ path: {
15819
+ token: string;
15820
+ };
15821
+ cookie?: never;
15822
+ };
15823
+ requestBody?: never;
15824
+ responses: {
15825
+ /** @description OK */
15826
+ 200: {
13617
15827
  headers: {
13618
15828
  [name: string]: unknown;
13619
15829
  };
13620
- content?: never;
15830
+ content: {
15831
+ "application/json": components["schemas"]["GetTokenCustodyResponse"];
15832
+ };
13621
15833
  };
13622
- /** @description Only master accounts can set sub-account limits */
13623
- 403: {
15834
+ /** @description No token answers to this symbol, UUID or address */
15835
+ 404: {
13624
15836
  headers: {
13625
15837
  [name: string]: unknown;
13626
15838
  };
13627
15839
  content?: never;
13628
15840
  };
13629
- /** @description Sub-account relationship not found or asset not found */
13630
- 404: {
15841
+ /** @description Public read rate limit exceeded for this client */
15842
+ 429: {
13631
15843
  headers: {
13632
15844
  [name: string]: unknown;
13633
15845
  };
@@ -13642,14 +15854,11 @@ export interface operations {
13642
15854
  };
13643
15855
  };
13644
15856
  };
13645
- get_sub_account_limits: {
15857
+ get_treasury_net_fees: {
13646
15858
  parameters: {
13647
15859
  query?: never;
13648
15860
  header?: never;
13649
- path: {
13650
- /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
13651
- subAccountId: string;
13652
- };
15861
+ path?: never;
13653
15862
  cookie?: never;
13654
15863
  };
13655
15864
  requestBody?: never;
@@ -13660,31 +15869,54 @@ export interface operations {
13660
15869
  [name: string]: unknown;
13661
15870
  };
13662
15871
  content: {
13663
- "application/json": components["schemas"]["GetLimitsResponse"];
15872
+ "application/json": components["schemas"]["GetTreasuryNetFeesResponse"];
13664
15873
  };
13665
15874
  };
13666
- /** @description Invalid request */
13667
- 400: {
15875
+ /** @description Public read rate limit exceeded for this client */
15876
+ 429: {
13668
15877
  headers: {
13669
15878
  [name: string]: unknown;
13670
15879
  };
13671
15880
  content?: never;
13672
15881
  };
13673
- /** @description Authentication required */
13674
- 401: {
15882
+ /** @description Internal server error */
15883
+ 500: {
13675
15884
  headers: {
13676
15885
  [name: string]: unknown;
13677
15886
  };
13678
15887
  content?: never;
13679
15888
  };
13680
- /** @description Sub-account not found */
13681
- 404: {
15889
+ };
15890
+ };
15891
+ list_wallet_leaderboard: {
15892
+ parameters: {
15893
+ query?: {
15894
+ /** @description Wallets to return, largest volume first (max 100) */
15895
+ limit?: number;
15896
+ };
15897
+ header?: never;
15898
+ path?: never;
15899
+ cookie?: never;
15900
+ };
15901
+ requestBody?: never;
15902
+ responses: {
15903
+ /** @description OK */
15904
+ 200: {
15905
+ headers: {
15906
+ [name: string]: unknown;
15907
+ };
15908
+ content: {
15909
+ "application/json": components["schemas"]["ListWalletLeaderboardResponse"];
15910
+ };
15911
+ };
15912
+ /** @description Invalid limit */
15913
+ 400: {
13682
15914
  headers: {
13683
15915
  [name: string]: unknown;
13684
15916
  };
13685
15917
  content?: never;
13686
15918
  };
13687
- /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
15919
+ /** @description Public read rate limit exceeded for this client */
13688
15920
  429: {
13689
15921
  headers: {
13690
15922
  [name: string]: unknown;
@@ -13700,23 +15932,16 @@ export interface operations {
13700
15932
  };
13701
15933
  };
13702
15934
  };
13703
- update_sub_account_limit: {
15935
+ get_wallet_summary: {
13704
15936
  parameters: {
13705
15937
  query?: never;
13706
15938
  header?: never;
13707
15939
  path: {
13708
- /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
13709
- subAccountId: string;
13710
- /** @example 1905d968-cc65-4cc7-b77c-1905d968cc65 */
13711
- assetId: string;
15940
+ wallet: string;
13712
15941
  };
13713
15942
  cookie?: never;
13714
15943
  };
13715
- requestBody: {
13716
- content: {
13717
- "application/json": components["schemas"]["UpdateLimitRequest"];
13718
- };
13719
- };
15944
+ requestBody?: never;
13720
15945
  responses: {
13721
15946
  /** @description OK */
13722
15947
  200: {
@@ -13724,32 +15949,18 @@ export interface operations {
13724
15949
  [name: string]: unknown;
13725
15950
  };
13726
15951
  content: {
13727
- "application/json": components["schemas"]["UpdateLimitResponse"];
15952
+ "application/json": components["schemas"]["GetWalletSummaryResponse"];
13728
15953
  };
13729
15954
  };
13730
- /** @description Invalid request */
15955
+ /** @description Invalid wallet address */
13731
15956
  400: {
13732
15957
  headers: {
13733
15958
  [name: string]: unknown;
13734
15959
  };
13735
15960
  content?: never;
13736
15961
  };
13737
- /** @description Authentication required */
13738
- 401: {
13739
- headers: {
13740
- [name: string]: unknown;
13741
- };
13742
- content?: never;
13743
- };
13744
- /** @description Only master accounts can update sub-account limits */
13745
- 403: {
13746
- headers: {
13747
- [name: string]: unknown;
13748
- };
13749
- content?: never;
13750
- };
13751
- /** @description Limit not found */
13752
- 404: {
15962
+ /** @description Public read rate limit exceeded for this client */
15963
+ 429: {
13753
15964
  headers: {
13754
15965
  [name: string]: unknown;
13755
15966
  };
@@ -13764,18 +15975,17 @@ export interface operations {
13764
15975
  };
13765
15976
  };
13766
15977
  };
13767
- delete_sub_account_limit: {
15978
+ list_wallet_liquidations: {
13768
15979
  parameters: {
13769
15980
  query?: {
13770
- /** @description Limit identifier (UUID) */
13771
- limitId?: string;
15981
+ /** @description Events per page (max 1000) */
15982
+ pageSize?: number;
15983
+ /** @description Opaque keyset cursor from the previous response, bound to the wallet. */
15984
+ pageToken?: string;
13772
15985
  };
13773
15986
  header?: never;
13774
15987
  path: {
13775
- /** @example 2b1a5f9c-0000-4000-8000-000000000005 */
13776
- subAccountId: string;
13777
- /** @example 1905d968-cc65-4cc7-b77c-1905d968cc65 */
13778
- assetId: string;
15988
+ wallet: string;
13779
15989
  };
13780
15990
  cookie?: never;
13781
15991
  };
@@ -13787,32 +15997,18 @@ export interface operations {
13787
15997
  [name: string]: unknown;
13788
15998
  };
13789
15999
  content: {
13790
- "application/json": components["schemas"]["DeleteLimitResponse"];
16000
+ "application/json": components["schemas"]["ListWalletLiquidationsResponse"];
13791
16001
  };
13792
16002
  };
13793
- /** @description Invalid request */
16003
+ /** @description Invalid wallet address, page size or page token */
13794
16004
  400: {
13795
16005
  headers: {
13796
16006
  [name: string]: unknown;
13797
16007
  };
13798
16008
  content?: never;
13799
16009
  };
13800
- /** @description Authentication required */
13801
- 401: {
13802
- headers: {
13803
- [name: string]: unknown;
13804
- };
13805
- content?: never;
13806
- };
13807
- /** @description Only master accounts can delete sub-account limits */
13808
- 403: {
13809
- headers: {
13810
- [name: string]: unknown;
13811
- };
13812
- content?: never;
13813
- };
13814
- /** @description Limit not found */
13815
- 404: {
16010
+ /** @description Public read rate limit exceeded for this client */
16011
+ 429: {
13816
16012
  headers: {
13817
16013
  [name: string]: unknown;
13818
16014
  };
@@ -13827,41 +16023,15 @@ export interface operations {
13827
16023
  };
13828
16024
  };
13829
16025
  };
13830
- get_user_trades: {
16026
+ list_vault_withdrawals: {
13831
16027
  parameters: {
13832
16028
  query?: {
13833
- /** @description Items per page (max: 100 in page-number mode; up to 1000 when pageToken is present) */
16029
+ /** @description Withdrawals per page (max 1000) */
13834
16030
  pageSize?: number;
13835
- /** @description Trading pair identifier (UUID) */
13836
- tradingPairId?: string;
13837
- /**
13838
- * @description Pagination cursor with two states:
13839
- * - Omitted or empty string (""): start a cursor walk with no prior
13840
- * position, from the newest row.
13841
- * - Non-empty: an opaque cursor from a previous response's
13842
- * `nextPageToken`; results resume immediately after that position.
13843
- *
13844
- * Every walk covers full trade history — hot and archived rows merged. An
13845
- * unfiltered response carries a bounded item count (`total`); a response
13846
- * filtered by `trading_pair_id` carries none. Filters must match the request
13847
- * that produced the token.
13848
- */
16031
+ /** @description Opaque keyset cursor from the previous response, bound to the filters. */
13849
16032
  pageToken?: string;
13850
- /**
13851
- * @description Optional margin account UUID filter: only trades where this user's side of
13852
- * the fill was placed from this margin account. A self-trade is read as its
13853
- * maker side, so it matches through its maker order's account. Like
13854
- * `trading_pair_id`, a filtered response carries no `total`, and the filter
13855
- * must match the request that produced a `page_token`.
13856
- */
13857
- marginAccountId?: string;
13858
- /**
13859
- * @description Optional order UUID filter: only trades where this user's side of the
13860
- * fill was placed by this order. A self-trade is read as its maker side, so
13861
- * it matches its maker order only. A filtered response carries no `total`,
13862
- * and the filter must match the request that produced a `page_token`.
13863
- */
13864
- orderId?: string;
16033
+ token?: string;
16034
+ wallet?: string;
13865
16035
  };
13866
16036
  header?: never;
13867
16037
  path?: never;
@@ -13875,24 +16045,17 @@ export interface operations {
13875
16045
  [name: string]: unknown;
13876
16046
  };
13877
16047
  content: {
13878
- "application/json": components["schemas"]["GetUserTradesResponse"];
16048
+ "application/json": components["schemas"]["ListVaultWithdrawalsResponse"];
13879
16049
  };
13880
16050
  };
13881
- /** @description Invalid request */
16051
+ /** @description Invalid page size or page token */
13882
16052
  400: {
13883
16053
  headers: {
13884
16054
  [name: string]: unknown;
13885
16055
  };
13886
16056
  content?: never;
13887
16057
  };
13888
- /** @description Authentication required */
13889
- 401: {
13890
- headers: {
13891
- [name: string]: unknown;
13892
- };
13893
- content?: never;
13894
- };
13895
- /** @description Read rate limit exceeded — every authenticated read draws one request from the account's read budget; retry after the interval in details.retryAfter */
16058
+ /** @description Public read rate limit exceeded for this client */
13896
16059
  429: {
13897
16060
  headers: {
13898
16061
  [name: string]: unknown;
@@ -13961,7 +16124,7 @@ export interface operations {
13961
16124
  };
13962
16125
  content?: never;
13963
16126
  };
13964
- /** @description No active application has this client_id */
16127
+ /** @description No active, displayed application has this client_id (unknown, inactive and hidden builders read alike) */
13965
16128
  404: {
13966
16129
  headers: {
13967
16130
  [name: string]: unknown;
@@ -14092,7 +16255,7 @@ export interface operations {
14092
16255
  };
14093
16256
  content?: never;
14094
16257
  };
14095
- /** @description No active application has this client_id */
16258
+ /** @description No active, displayed application has this client_id (unknown, inactive and hidden builders read alike) */
14096
16259
  404: {
14097
16260
  headers: {
14098
16261
  [name: string]: unknown;
@@ -14170,7 +16333,7 @@ export interface operations {
14170
16333
  };
14171
16334
  content?: never;
14172
16335
  };
14173
- /** @description No active application has this client_id */
16336
+ /** @description No active, displayed application has this client_id (unknown, inactive and hidden builders read alike) */
14174
16337
  404: {
14175
16338
  headers: {
14176
16339
  [name: string]: unknown;
@@ -14222,7 +16385,7 @@ export interface operations {
14222
16385
  };
14223
16386
  content?: never;
14224
16387
  };
14225
- /** @description No active application has this client_id */
16388
+ /** @description No active, displayed application has this client_id (unknown, inactive and hidden builders read alike) */
14226
16389
  404: {
14227
16390
  headers: {
14228
16391
  [name: string]: unknown;
@@ -14299,7 +16462,7 @@ export interface operations {
14299
16462
  };
14300
16463
  content?: never;
14301
16464
  };
14302
- /** @description No active application has this client_id */
16465
+ /** @description No active, displayed application has this client_id (unknown, inactive and hidden builders read alike) */
14303
16466
  404: {
14304
16467
  headers: {
14305
16468
  [name: string]: unknown;
@@ -14960,7 +17123,7 @@ export interface operations {
14960
17123
  };
14961
17124
  content?: never;
14962
17125
  };
14963
- /** @description Insufficient BuilderCodes payout balance, including a wallet that never accrued one (gRPC: FAILED_PRECONDITION) */
17126
+ /** @description Insufficient BuilderCodes payout balance, including a wallet that never accrued one (gRPC: FAILED_PRECONDITION); or `code: IDEMPOTENCY_KEY_CONFLICT`, the idempotencyKey already names a different request (gRPC: ALREADY_EXISTS) */
14964
17127
  409: {
14965
17128
  headers: {
14966
17129
  [name: string]: unknown;
@@ -14981,7 +17144,7 @@ export interface operations {
14981
17144
  };
14982
17145
  content?: never;
14983
17146
  };
14984
- /** @description Matching engine unavailable or slow to answer. Outcome UNKNOWN, not a rejection — the claim may still commit and there is no idempotency key, so treat it as pending and do not retry automatically; a balance read does not settle it, because an admitted claim may still be queued. Two tagged cases are the exception, both refused before the claim can be admitted and so provably non-committing, and both safe to retry: a maintenance block (`error: OPERATIONS_BLOCKED`; gRPC metadata `x-maintenance-blocked: true`) and a sequencer overload (`code: OVERLOADED`) (gRPC: UNAVAILABLE) */
17147
+ /** @description Matching engine unavailable or slow to answer. Outcome UNKNOWN, not a rejection — the claim may still commit. With an idempotencyKey, retry with the same key and request within 15 minutes; `code: ORDER_SUBMISSION_UNAVAILABLE` or `ORDER_SUBMISSION_CAPACITY_EXCEEDED` asks for exactly that. Without one, treat it as pending and do not retry automatically; a balance read does not settle it, because an admitted claim may still be queued. Two tagged cases are the exception, both refused before the claim can be admitted and so provably non-committing, and both safe to retry: a maintenance block (`error: OPERATIONS_BLOCKED`; gRPC metadata `x-maintenance-blocked: true`) and a sequencer overload (`code: OVERLOADED`) (gRPC: UNAVAILABLE) */
14985
17148
  503: {
14986
17149
  headers: {
14987
17150
  [name: string]: unknown;
@@ -18290,7 +20453,7 @@ export interface operations {
18290
20453
  get_orderbook_snapshot: {
18291
20454
  parameters: {
18292
20455
  query?: {
18293
- /** @description Number of price levels (max 100) */
20456
+ /** @description Number of price levels per side (max 1000). Above 100 the snapshot comes from the market-data book and carries bookSeq */
18294
20457
  levels?: number;
18295
20458
  /** @description Trading mode */
18296
20459
  tradingMode?: "SPOT" | "MARGIN";
@@ -18317,7 +20480,7 @@ export interface operations {
18317
20480
  "application/json": components["schemas"]["GetOrderbookResponse"];
18318
20481
  };
18319
20482
  };
18320
- /** @description Invalid magnitude or denomination value */
20483
+ /** @description levels outside 1 to 1000, a tradingMode that is invalid or not the pair's, or an invalid magnitude or denomination value */
18321
20484
  400: {
18322
20485
  headers: {
18323
20486
  [name: string]: unknown;
@@ -18331,13 +20494,27 @@ export interface operations {
18331
20494
  };
18332
20495
  content?: never;
18333
20496
  };
18334
- /** @description Matching engine not initialized or internal error */
20497
+ /** @description Deep orderbook read budget exceeded for this client IP on the public ingress (reads above 100 levels cost ceil(levels/100) units; PrivateLink is not metered); retry after the interval in details.retryAfter */
20498
+ 429: {
20499
+ headers: {
20500
+ [name: string]: unknown;
20501
+ };
20502
+ content?: never;
20503
+ };
20504
+ /** @description Internal error */
18335
20505
  500: {
18336
20506
  headers: {
18337
20507
  [name: string]: unknown;
18338
20508
  };
18339
20509
  content?: never;
18340
20510
  };
20511
+ /** @description The book cannot be read right now: the market-data service above 100 levels, the matching engine at 100 or fewer, or the gateway's matching-engine client is not ready (at any depth); retry */
20512
+ 503: {
20513
+ headers: {
20514
+ [name: string]: unknown;
20515
+ };
20516
+ content?: never;
20517
+ };
18341
20518
  };
18342
20519
  };
18343
20520
  get_orders: {