@0xmonaco/types 1.0.66 → 1.0.67

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.
@@ -191,6 +191,8 @@ export interface ScreenerSnapshotPoint {
191
191
  quoteVolume: string;
192
192
  /** Percent price change (close - open) / open * 100 for the day */
193
193
  priceChangePercent: string;
194
+ /** Daily average of the valued completed-UTC-minute open interest notionals; null for spot or when fewer than 95% of the day's 1440 minutes (1368) are valued */
195
+ openInterestNotionalAvg: string | null;
194
196
  }
195
197
  /**
196
198
  * Per-pair screener row. Window fields are null when there is insufficient history.
@@ -251,6 +253,12 @@ export interface ScreenerItem {
251
253
  * getOpenInterest
252
254
  */
253
255
  openInterestNotional: string | null;
256
+ /** Average of the valued completed-UTC-minute gross open-interest notionals over the last 60 minutes; null for spot or when fewer than 95% of them (57) are valued */
257
+ openInterestNotionalAvg1h: string | null;
258
+ /** Average of the valued completed-UTC-minute gross open-interest notionals over the last 1440 minutes; null for spot or when fewer than 95% of them (1368) are valued */
259
+ openInterestNotionalAvg24h: string | null;
260
+ /** Average of the valued completed-UTC-minute gross open-interest notionals over the last 10080 minutes; null for spot or when fewer than 95% of them (9576) are valued */
261
+ openInterestNotionalAvg7d: string | null;
254
262
  }
255
263
  /**
256
264
  * Paginated screener response, sorted by quoteVolume24h desc (nulls last)
@@ -32,16 +32,13 @@ export interface Position {
32
32
  unrealizedPnl: string;
33
33
  realizedPnl: string;
34
34
  /**
35
- * Open ISOLATED rows: the position's current backing — its risk bucket's
36
- * allocated collateral adjusted by settled realized PnL and funding paid,
37
- * net of collateral reserved for the bucket's open orders, clamped at zero
38
- * (0XM-2558). Partial closes shrink the posted margin pro-rata while the
39
- * realized loss stays in the bucket, so this is the unrealized-return
40
- * denominator. Not a hard -100% bound: liquidation measures the bucket's
41
- * whole equity, order reserves included, and a mark can gap past the
42
- * backing. Open CROSS rows: the position's posted margin. Terminal rows:
43
- * total initial margin allocated across the position's reducing executions
44
- * when available — the margin basis for lifetime realized return.
35
+ * Open ISOLATED rows: principal committed to the filled position, adjusted
36
+ * by settled realized PnL, fees and funding, clamped at zero. Unfilled-order
37
+ * collateral is excluded. This is the unrealized-return denominator and
38
+ * the same backing used by isolated liquidation, on live and persisted reads.
39
+ * A price gap can pass the backing before asynchronous liquidation occurs.
40
+ * Open CROSS rows: posted margin. Terminal rows: total initial margin
41
+ * allocated across reducing executions, the lifetime-return denominator.
45
42
  */
46
43
  isolatedMargin: string;
47
44
  leverage?: string;
@@ -32,6 +32,7 @@ export interface TradingAPI extends BaseAPI {
32
32
  marginAccountId?: string;
33
33
  marginMode?: MarginMode;
34
34
  riskBucketId?: string;
35
+ /** Initial order budget; unfilled funds do not back the isolated position. */
35
36
  riskBucketCollateral?: string;
36
37
  strategyKey?: string;
37
38
  /** @deprecated Order side is authoritative. */
@@ -85,6 +86,7 @@ export interface TradingAPI extends BaseAPI {
85
86
  marginAccountId?: string;
86
87
  marginMode?: MarginMode;
87
88
  riskBucketId?: string;
89
+ /** Initial order budget; unfilled funds do not back the isolated position. */
88
90
  riskBucketCollateral?: string;
89
91
  strategyKey?: string;
90
92
  /** @deprecated Order side is authoritative. */
@@ -487,8 +487,31 @@ export interface ListConditionalOrdersParams {
487
487
  marginAccountId?: string;
488
488
  tradingPairId?: string;
489
489
  state?: ConditionalOrderState;
490
+ /**
491
+ * Page number for legacy offset pagination.
492
+ *
493
+ * @deprecated Use cursor pagination (`pageToken`) instead. Passing `page`
494
+ * selects legacy page-number mode; omitting both `page` and `pageToken`
495
+ * drives cursor mode.
496
+ */
490
497
  page?: number;
498
+ /** Items per page (max 100 in page-number mode, up to 1000 when `pageToken` is present) */
491
499
  pageSize?: number;
500
+ /**
501
+ * Pagination cursor with three distinct states:
502
+ * - Omitted (`undefined`): the SDK starts a cursor walk (it sends
503
+ * `pageToken=""`) unless the deprecated `page` param was passed, in which
504
+ * case the request uses legacy page-number pagination.
505
+ * - Empty string (`""`): start a cursor walk with no prior position, from
506
+ * the newest conditional order.
507
+ * - Non-empty: an opaque cursor from a previous response's `nextPageToken`;
508
+ * results resume immediately after that position.
509
+ *
510
+ * In either cursor-walk state, `page` and `total` come back as 0 — cursor
511
+ * mode runs no COUNT (AIP-158). Follow `nextPageToken` until it comes back
512
+ * empty. Filters must match the request that produced the token.
513
+ */
514
+ pageToken?: string;
492
515
  }
493
516
  /**
494
517
  * What the order a conditional fired into has done so far — a projection of
@@ -618,14 +641,28 @@ export interface ConditionalOrder {
618
641
  export interface ListConditionalOrdersResponse {
619
642
  orders: ConditionalOrder[];
620
643
  /**
621
- * Matching conditional orders. Exact up to 10,000 pages of the requested
622
- * page size (`pageSize` x 10,000 rows) and saturates there, so a caller with
623
- * more matching conditional orders than the listing can page through reads
624
- * the cap, not its lifetime total. `page` is capped at 10,000.
644
+ * Matching conditional orders in page-number (offset) mode: exact up to
645
+ * 10,000 pages of the requested page size (`pageSize` x 10,000 rows) and
646
+ * saturates there, so a caller with more matching conditional orders than the
647
+ * listing can page through reads the cap, not its lifetime total. `0` in
648
+ * cursor (`pageToken`) mode, which runs no COUNT (AIP-158).
625
649
  */
626
650
  total: number;
651
+ /**
652
+ * Current page number in legacy offset mode; `0` in cursor mode.
653
+ *
654
+ * @deprecated Use cursor pagination (`pageToken`/`nextPageToken`) instead.
655
+ */
627
656
  page: number;
628
657
  pageSize: number;
658
+ /**
659
+ * Cursor for the next page, minted only while a further page exists (the read
660
+ * over-fetches one row to decide). Empty on every page-number response and on
661
+ * the final cursor page — an empty token is the definitive end of the walk,
662
+ * so no extra request is needed. Do not feed the empty token back as
663
+ * `pageToken`; an empty input restarts the walk from the newest row.
664
+ */
665
+ nextPageToken: string;
629
666
  }
630
667
  /**
631
668
  * Options for creating a server-side TWAP parent order.
@@ -881,10 +918,31 @@ export interface ListTwapOrdersParams {
881
918
  state?: TwapOrderState;
882
919
  /** Filter by trading pair UUID */
883
920
  tradingPairId?: string;
884
- /** Page number (1-indexed) */
921
+ /**
922
+ * Page number for legacy offset pagination.
923
+ *
924
+ * @deprecated Use cursor pagination (`pageToken`) instead. Passing `page`
925
+ * selects legacy page-number mode; omitting both `page` and `pageToken`
926
+ * drives cursor mode.
927
+ */
885
928
  page?: number;
886
- /** Items per page (max 100) */
929
+ /** Items per page (max 100 in page-number mode, up to 1000 when `pageToken` is present) */
887
930
  pageSize?: number;
931
+ /**
932
+ * Pagination cursor with three distinct states:
933
+ * - Omitted (`undefined`): the SDK starts a cursor walk (it sends
934
+ * `pageToken=""`) unless the deprecated `page` param was passed, in which
935
+ * case the request uses legacy page-number pagination.
936
+ * - Empty string (`""`): start a cursor walk with no prior position, from
937
+ * the newest TWAP parent.
938
+ * - Non-empty: an opaque cursor from a previous response's `nextPageToken`;
939
+ * results resume immediately after that position.
940
+ *
941
+ * In either cursor-walk state, `page` and `total` come back as 0 — cursor
942
+ * mode runs no COUNT (AIP-158). Follow `nextPageToken` until it comes back
943
+ * empty. Filters must match the request that produced the token.
944
+ */
945
+ pageToken?: string;
888
946
  }
889
947
  /**
890
948
  * Response from listing TWAP parent orders.
@@ -892,14 +950,27 @@ export interface ListTwapOrdersParams {
892
950
  export interface ListTwapOrdersResponse {
893
951
  orders: TwapOrder[];
894
952
  /**
895
- * Matching TWAP orders. Exact up to 10,000 pages of the requested page size
896
- * (`pageSize` x 10,000 rows) and saturates there, so a caller with more
897
- * matching TWAP orders than the listing can page through reads the cap, not
898
- * its lifetime total. `page` is capped at 10,000.
953
+ * Matching TWAP orders in page-number (offset) mode: exact up to 10,000 pages
954
+ * of the requested page size (`pageSize` x 10,000 rows) and saturates there,
955
+ * so a caller with more matching TWAP orders than the listing can page through
956
+ * reads the cap, not its lifetime total. `0` in cursor (`pageToken`) mode,
957
+ * which runs no COUNT (AIP-158).
899
958
  */
900
959
  total: number;
901
- /** Current page number */
960
+ /**
961
+ * Current page number in legacy offset mode; `0` in cursor mode.
962
+ *
963
+ * @deprecated Use cursor pagination (`pageToken`/`nextPageToken`) instead.
964
+ */
902
965
  page: number;
903
966
  /** Items per page */
904
967
  pageSize: number;
968
+ /**
969
+ * Cursor for the next page, minted only while a further page exists (the read
970
+ * over-fetches one row to decide). Empty on every page-number response and on
971
+ * the final cursor page — an empty token is the definitive end of the walk,
972
+ * so no extra request is needed. Do not feed the empty token back as
973
+ * `pageToken`; an empty input restarts the walk from the newest row.
974
+ */
975
+ nextPageToken: string;
905
976
  }
@@ -403,6 +403,7 @@ export declare const ListConditionalOrdersSchema: z.ZodObject<{
403
403
  }>>;
404
404
  page: z.ZodOptional<z.ZodNumber>;
405
405
  pageSize: z.ZodOptional<z.ZodNumber>;
406
+ pageToken: z.ZodOptional<z.ZodString>;
406
407
  }, z.core.$strip>;
407
408
  export declare const TwapOrderStateSchema: z.ZodEnum<{
408
409
  CANCELLED: "CANCELLED";
@@ -464,6 +465,7 @@ export declare const ListTwapOrdersSchema: z.ZodObject<{
464
465
  tradingPairId: z.ZodOptional<z.ZodUUID>;
465
466
  page: z.ZodOptional<z.ZodNumber>;
466
467
  pageSize: z.ZodOptional<z.ZodNumber>;
468
+ pageToken: z.ZodOptional<z.ZodString>;
467
469
  }, z.core.$strip>;
468
470
  /**
469
471
  * Single batch create order item validation schema
@@ -420,12 +420,27 @@ export const ClosePositionSideSchema = z.enum(["LONG", "SHORT"], {
420
420
  export const CancelConditionalOrderSchema = z.object({
421
421
  conditionalOrderId: UUIDSchema,
422
422
  });
423
- export const ListConditionalOrdersSchema = z.object({
423
+ export const ListConditionalOrdersSchema = z
424
+ .object({
424
425
  marginAccountId: UUIDSchema.optional(),
425
426
  tradingPairId: UUIDSchema.optional(),
426
427
  state: ConditionalOrderStateSchema.optional(),
427
428
  page: z.number().int().min(1, "Page must be at least 1").optional(),
428
- pageSize: z.number().int().min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
429
+ pageSize: z.number().int().min(1, "Page size must be at least 1").max(1000, "Page size cannot exceed 1000").optional(),
430
+ pageToken: z.string().optional(),
431
+ })
432
+ .superRefine((params, ctx) => {
433
+ // The higher 1000 cap only applies to cursor (pageToken) requests; the
434
+ // server keeps the 100 cap for page-number requests (offset scans).
435
+ // Legacy page-number mode is selected only by passing `page` without
436
+ // `pageToken` — omitting both starts a cursor walk.
437
+ if (params.page !== undefined && params.pageToken === undefined && params.pageSize !== undefined && params.pageSize > 100) {
438
+ ctx.addIssue({
439
+ code: z.ZodIssueCode.custom,
440
+ message: "Page size cannot exceed 100 in page-number mode (page without pageToken)",
441
+ path: ["pageSize"],
442
+ });
443
+ }
429
444
  });
430
445
  export const TwapOrderStateSchema = z.enum(["PENDING", "ACTIVE", "COMPLETED", "CANCELLED"], {
431
446
  message: "Invalid TWAP order state",
@@ -549,11 +564,26 @@ export const CreateTwapOrderSchema = z
549
564
  export const CancelTwapOrderSchema = z.object({
550
565
  twapOrderId: UUIDSchema,
551
566
  });
552
- export const ListTwapOrdersSchema = z.object({
567
+ export const ListTwapOrdersSchema = z
568
+ .object({
553
569
  state: TwapOrderStateSchema.optional(),
554
570
  tradingPairId: UUIDSchema.optional(),
555
571
  page: z.number().int().min(1, "Page must be at least 1").optional(),
556
- pageSize: z.number().int().min(1, "Page size must be at least 1").max(100, "Page size cannot exceed 100").optional(),
572
+ pageSize: z.number().int().min(1, "Page size must be at least 1").max(1000, "Page size cannot exceed 1000").optional(),
573
+ pageToken: z.string().optional(),
574
+ })
575
+ .superRefine((params, ctx) => {
576
+ // The higher 1000 cap only applies to cursor (pageToken) requests; the
577
+ // server keeps the 100 cap for page-number requests (offset scans).
578
+ // Legacy page-number mode is selected only by passing `page` without
579
+ // `pageToken` — omitting both starts a cursor walk.
580
+ if (params.page !== undefined && params.pageToken === undefined && params.pageSize !== undefined && params.pageSize > 100) {
581
+ ctx.addIssue({
582
+ code: z.ZodIssueCode.custom,
583
+ message: "Page size cannot exceed 100 in page-number mode (page without pageToken)",
584
+ path: ["pageSize"],
585
+ });
586
+ }
557
587
  });
558
588
  /**
559
589
  * Single batch create order item validation schema
@@ -64,9 +64,11 @@ export type WebSocketErrorCode =
64
64
  */
65
65
  | "SNAPSHOT_UNAVAILABLE"
66
66
  /**
67
- * The per-connection inbound message-rate cap was exceeded; the connection
68
- * is closed (1008) after this frame. Batch subscriptions and back off
69
- * before reconnecting — a hot re-subscribe loop trips the cap again.
67
+ * A per-connection inbound cap was exceeded: the message rate, or the byte
68
+ * budget that refuses a burst of very large frames. The connection is
69
+ * closed (1008) after this frame. Batch subscriptions, keep frames small,
70
+ * and back off before reconnecting — a hot re-subscribe loop trips the cap
71
+ * again.
70
72
  */
71
73
  | "MESSAGE_RATE_LIMIT";
72
74
  /**
@@ -117,6 +117,13 @@ export interface ConditionalOrderEventData {
117
117
  * snapshot builds the same shape with `"snapshot"` instead.
118
118
  */
119
119
  reason: string;
120
+ /**
121
+ * When the conditional order was created (ISO 8601): the same string REST
122
+ * returns as `createdAt` for this id, on live updates and snapshot rows
123
+ * alike. Always present from current servers; optional so a frame from an
124
+ * older deployment during a rolling release still parses. Wire: `created_at`.
125
+ */
126
+ createdAt?: string;
120
127
  updatedAt: string;
121
128
  /**
122
129
  * Opaque, compare-only revision counter for this conditional order's state —
@@ -3197,7 +3197,7 @@ export interface components {
3197
3197
  */
3198
3198
  riskBucketId?: string | null;
3199
3199
  /**
3200
- * @description Decimal collateral to allocate into a new isolated risk bucket. When provided, the API creates the bucket ID and matching-engine persists the bucket through the durable log.
3200
+ * @description Decimal collateral allocated as an order budget in a new isolated risk bucket. Fills commit their required margin and paid-fee funding to position backing; unfilled or unused order funds do not protect the position from liquidation. Use position margin adjustment to add liquidation protection. The API creates the bucket ID and the matching engine persists it through the durable log.
3201
3201
  * @example 1000
3202
3202
  */
3203
3203
  riskBucketCollateral?: string | null;
@@ -3831,7 +3831,7 @@ export interface components {
3831
3831
  */
3832
3832
  riskBucketId?: string | null;
3833
3833
  /**
3834
- * @description Decimal collateral to allocate into a new isolated risk bucket. When provided, the API creates the bucket ID and matching-engine persists the bucket through the durable log.
3834
+ * @description Decimal collateral allocated as an order budget in a new isolated risk bucket. Fills commit their required margin and paid-fee funding to position backing; unfilled or unused order funds do not protect the position from liquidation. Use position margin adjustment to add liquidation protection. The API creates the bucket ID and the matching engine persists it through the durable log.
3835
3835
  * @example 1000
3836
3836
  */
3837
3837
  riskBucketCollateral?: string | null;
@@ -5477,22 +5477,16 @@ export interface components {
5477
5477
  unrealizedPnl?: string | null;
5478
5478
  realizedPnl?: string | null;
5479
5479
  /**
5480
- * @description Open ISOLATED rows: the position's current backing — its risk bucket's
5481
- * allocated collateral adjusted by settled realized PnL and funding paid,
5482
- * net of collateral reserved for the bucket's open orders, clamped at zero
5483
- * (0XM-2558). Partial closes and partial liquidations shrink the posted
5484
- * margin pro-rata while the realized loss stays in the bucket, so this,
5485
- * not the posted margin, is the unrealized-return denominator. Not a hard
5486
- * -100% bound: the liquidation trigger and liquidation_price measure the
5487
- * bucket's whole equity, order reserves included, so with a resting order
5488
- * the return can pass -100% by that order's earmark before liquidation
5489
- * lands; a mark can gap past the backing before the asynchronous
5490
- * liquidation; a fully drained bucket serves "0". Served from the live risk
5491
- * engine; when only persisted state is reachable the value is gross of
5492
- * order reserves. Open CROSS rows fall back to the position's posted
5493
- * margin. Terminal rows: total initial margin allocated across the
5494
- * position's reducing executions when available — the margin basis for
5495
- * lifetime realized return.
5480
+ * @description Open ISOLATED rows: principal committed to the filled position, adjusted
5481
+ * by settled realized PnL, fees and funding, clamped at zero. Collateral
5482
+ * allocated to unfilled orders is excluded. This is the unrealized-return
5483
+ * denominator and the same backing used by isolated liquidation. Placing,
5484
+ * cancelling or resizing an unfilled order does not add position backing.
5485
+ * A price gap can pass the backing before asynchronous liquidation occurs.
5486
+ * Live and persisted reads use the same position-principal basis.
5487
+ * Open CROSS rows: the position's posted margin. Terminal rows: total
5488
+ * initial margin allocated across the position's reducing executions when
5489
+ * available, used as the basis for lifetime realized return.
5496
5490
  */
5497
5491
  isolatedMargin?: string | null;
5498
5492
  leverage?: string | null;
@@ -6243,14 +6237,29 @@ export interface components {
6243
6237
  orders?: components["schemas"]["ConditionalOrder"][] | null;
6244
6238
  /**
6245
6239
  * Format: uint32
6246
- * @description Matching conditional orders. Exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more matching conditional orders than the listing can page through reads the cap, not its lifetime total.
6240
+ * @description Matching conditional orders in page-number (offset) mode: exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more matching conditional orders than the listing can page through reads the cap, not its lifetime total. 0 in cursor (pageToken) mode, which runs no COUNT (AIP-158).
6247
6241
  * @example 3
6248
6242
  */
6249
6243
  total?: number | null;
6250
- /** Format: uint32 */
6244
+ /**
6245
+ * Format: uint32
6246
+ * @deprecated
6247
+ * @description Deprecated: current page number (legacy offset mode only; 0 in cursor mode)
6248
+ */
6251
6249
  page?: number | null;
6252
6250
  /** Format: uint32 */
6253
6251
  pageSize?: number | null;
6252
+ /**
6253
+ * @description Cursor for the next page, minted only when a further page exists — the
6254
+ * read over-fetches one row to decide, so there is no "maybe more" state.
6255
+ * Empty on every page-number (legacy) response, and empty on the final
6256
+ * cursor page (including a full final page, since nothing follows it).
6257
+ * Follow it until it comes back empty; that empty token is the definitive
6258
+ * end of the walk, so no extra zero-row request is needed. Do not feed the
6259
+ * empty token back as `page_token` — an empty input `page_token` restarts
6260
+ * the walk from the newest row.
6261
+ */
6262
+ nextPageToken?: string | null;
6254
6263
  };
6255
6264
  ListDelegatedAgentOwnersResponse: {
6256
6265
  /** @description Owners that have an active delegation to the calling agent */
@@ -6459,13 +6468,14 @@ export interface components {
6459
6468
  orders?: components["schemas"]["TwapOrder"][] | null;
6460
6469
  /**
6461
6470
  * Format: uint32
6462
- * @description Matching TWAP orders. Exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more matching TWAP orders than the listing can page through reads the cap, not its lifetime total.
6471
+ * @description Matching TWAP orders in page-number (offset) mode: exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more matching TWAP orders than the listing can page through reads the cap, not its lifetime total. 0 in cursor (pageToken) mode, which runs no COUNT (AIP-158).
6463
6472
  * @example 3
6464
6473
  */
6465
6474
  total?: number | null;
6466
6475
  /**
6467
6476
  * Format: uint32
6468
- * @description Current page number
6477
+ * @deprecated
6478
+ * @description Deprecated: current page number (legacy offset mode only; 0 in cursor mode)
6469
6479
  * @example 1
6470
6480
  */
6471
6481
  page?: number | null;
@@ -6475,6 +6485,17 @@ export interface components {
6475
6485
  * @example 20
6476
6486
  */
6477
6487
  pageSize?: number | null;
6488
+ /**
6489
+ * @description Cursor for the next page, minted only when a further page exists — the
6490
+ * read over-fetches one row to decide, so there is no "maybe more" state.
6491
+ * Empty on every page-number (legacy) response, and empty on the final
6492
+ * cursor page (including a full final page, since nothing follows it).
6493
+ * Follow it until it comes back empty; that empty token is the definitive
6494
+ * end of the walk, so no extra zero-row request is needed. Do not feed the
6495
+ * empty token back as `page_token` — an empty input `page_token` restarts
6496
+ * the walk from the newest row.
6497
+ */
6498
+ nextPageToken?: string | null;
6478
6499
  };
6479
6500
  ManagedMarketAssignment: {
6480
6501
  launchId?: string | null;
@@ -7134,22 +7155,16 @@ export interface components {
7134
7155
  unrealizedPnl?: string | null;
7135
7156
  realizedPnl?: string | null;
7136
7157
  /**
7137
- * @description Open ISOLATED rows: the position's current backing — its risk bucket's
7138
- * allocated collateral adjusted by settled realized PnL and funding paid,
7139
- * net of collateral reserved for the bucket's open orders, clamped at zero
7140
- * (0XM-2558). Partial closes and partial liquidations shrink the posted
7141
- * margin pro-rata while the realized loss stays in the bucket, so this,
7142
- * not the posted margin, is the unrealized-return denominator. Not a hard
7143
- * -100% bound: the liquidation trigger and liquidation_price measure the
7144
- * bucket's whole equity, order reserves included, so with a resting order
7145
- * the return can pass -100% by that order's earmark before liquidation
7146
- * lands; a mark can gap past the backing before the asynchronous
7147
- * liquidation; a fully drained bucket serves "0". Served from the live risk
7148
- * engine; when only persisted state is reachable the value is gross of
7149
- * order reserves. Open CROSS rows fall back to the position's posted
7150
- * margin. Terminal rows: total initial margin allocated across the
7151
- * position's reducing executions when available — the margin basis for
7152
- * lifetime realized return.
7158
+ * @description Open ISOLATED rows: principal committed to the filled position, adjusted
7159
+ * by settled realized PnL, fees and funding, clamped at zero. Collateral
7160
+ * allocated to unfilled orders is excluded. This is the unrealized-return
7161
+ * denominator and the same backing used by isolated liquidation. Placing,
7162
+ * cancelling or resizing an unfilled order does not add position backing.
7163
+ * A price gap can pass the backing before asynchronous liquidation occurs.
7164
+ * Live and persisted reads use the same position-principal basis.
7165
+ * Open CROSS rows: the position's posted margin. Terminal rows: total
7166
+ * initial margin allocated across the position's reducing executions when
7167
+ * available, used as the basis for lifetime realized return.
7153
7168
  */
7154
7169
  isolatedMargin?: string | null;
7155
7170
  leverage?: string | null;
@@ -7869,6 +7884,21 @@ export interface components {
7869
7884
  * @example 1172836500.00
7870
7885
  */
7871
7886
  openInterestNotional?: string | null;
7887
+ /**
7888
+ * @description Arithmetic mean of the valued gross open-interest notional observations (one per completed UTC minute) over the last 60 completed minutes ending at floor(now to minute); published once at least 95% of those minutes (57) carry a valued sample. Null for spot pairs or below that coverage; a minute without a trade price is unvalued, never zero; known zero is "0". Each sample is gross open position size x latest trade price in quote units. No historical backfill; this window warms after deployment.
7889
+ * @example 1172836500.00
7890
+ */
7891
+ openInterestNotionalAvg1h?: string | null;
7892
+ /**
7893
+ * @description Arithmetic mean of the valued gross open-interest notional observations (one per completed UTC minute) over the last 1440 completed minutes ending at floor(now to minute); published once at least 95% of those minutes (1368) carry a valued sample. Null for spot pairs or below that coverage; a minute without a trade price is unvalued, never zero; known zero is "0". Each sample is gross open position size x latest trade price in quote units. No historical backfill; this window warms after deployment.
7894
+ * @example 1172836500.00
7895
+ */
7896
+ openInterestNotionalAvg24h?: string | null;
7897
+ /**
7898
+ * @description Arithmetic mean of the valued gross open-interest notional observations (one per completed UTC minute) over the last 10080 completed minutes ending at floor(now to minute); published once at least 95% of those minutes (9576) carry a valued sample. Null for spot pairs or below that coverage; a minute without a trade price is unvalued, never zero; known zero is "0". Each sample is gross open position size x latest trade price in quote units. No historical backfill; this window warms after deployment.
7899
+ * @example 1172836500.00
7900
+ */
7901
+ openInterestNotionalAvg7d?: string | null;
7872
7902
  };
7873
7903
  /** @description One UTC-day bucket in a pair's 7-day snapshot. */
7874
7904
  ScreenerSnapshotPoint: {
@@ -7887,6 +7917,11 @@ export interface components {
7887
7917
  * @example 0.85
7888
7918
  */
7889
7919
  priceChangePercent?: string | null;
7920
+ /**
7921
+ * @description Arithmetic mean of the valued open-interest notional observations (one per completed UTC minute) in this completed UTC day; published once at least 95% of its 1440 minutes (1368) carry a valued sample, null for spot pairs or below that coverage. Samples use gross open position size x latest trade price in quote units; a minute without a trade price is unvalued, never zero; known zero remains "0". No historical backfill.
7922
+ * @example 1172836500.00
7923
+ */
7924
+ openInterestNotionalAvg?: string | null;
7890
7925
  };
7891
7926
  SelfTradePreventionDefaultResponse: {
7892
7927
  /**
@@ -13211,10 +13246,29 @@ export interface operations {
13211
13246
  /** @description Trading pair identifier (UUID) */
13212
13247
  tradingPairId?: string;
13213
13248
  state?: string;
13214
- /** @description Page number (1-indexed) */
13249
+ /**
13250
+ * @deprecated
13251
+ * @description Deprecated: page number for legacy offset pagination (1-indexed). Use pageToken cursor pagination instead.
13252
+ */
13215
13253
  page?: number;
13216
- /** @description Items per page (max 100) */
13254
+ /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
13217
13255
  pageSize?: number;
13256
+ /**
13257
+ * @description Pagination cursor with three distinct states:
13258
+ * - Omitted: legacy page-number pagination via `page`.
13259
+ * - Empty string (""): start a cursor walk with no prior position, from
13260
+ * the newest conditional order.
13261
+ * - Non-empty: an opaque cursor from a previous response's
13262
+ * `next_page_token`; results resume immediately after that position.
13263
+ *
13264
+ * In either cursor-walk state (empty or non-empty), `page` is ignored and
13265
+ * `total` is not populated — both come back 0, because cursor mode runs no
13266
+ * COUNT (AIP-158). Cursor pages are keyset seeks on `(createdAt, id)`, so a
13267
+ * page size up to 1000 is allowed. Filters must match the request that
13268
+ * produced the token; a token replayed against different filters is
13269
+ * rejected.
13270
+ */
13271
+ pageToken?: string;
13218
13272
  };
13219
13273
  header?: never;
13220
13274
  path?: never;
@@ -13303,13 +13357,32 @@ export interface operations {
13303
13357
  list_twap_orders: {
13304
13358
  parameters: {
13305
13359
  query?: {
13306
- /** @description Page number (1-indexed) */
13360
+ /**
13361
+ * @deprecated
13362
+ * @description Deprecated: page number for legacy offset pagination (1-indexed). Use pageToken cursor pagination instead.
13363
+ */
13307
13364
  page?: number;
13308
- /** @description Items per page (max 100) */
13365
+ /** @description Items per page (max 100 in page-number mode; up to 1000 when pageToken is present) */
13309
13366
  pageSize?: number;
13310
13367
  state?: string;
13311
13368
  /** @description Trading pair identifier (UUID) */
13312
13369
  tradingPairId?: string;
13370
+ /**
13371
+ * @description Pagination cursor with three distinct states:
13372
+ * - Omitted: legacy page-number pagination via `page`.
13373
+ * - Empty string (""): start a cursor walk with no prior position, from
13374
+ * the newest TWAP parent.
13375
+ * - Non-empty: an opaque cursor from a previous response's
13376
+ * `next_page_token`; results resume immediately after that position.
13377
+ *
13378
+ * In either cursor-walk state (empty or non-empty), `page` is ignored and
13379
+ * `total` is not populated — both come back 0, because cursor mode runs no
13380
+ * COUNT (AIP-158). Cursor pages are keyset seeks on `(createdAt, id)`, so a
13381
+ * page size up to 1000 is allowed. Filters must match the request that
13382
+ * produced the token; a token replayed against different filters is
13383
+ * rejected.
13384
+ */
13385
+ pageToken?: string;
13313
13386
  };
13314
13387
  header?: never;
13315
13388
  path?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "type": "module",
5
5
  "homepage": "https://docs.0xmonaco.com/sdk/typescript",
6
6
  "main": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "lint": "biome lint ."
17
17
  },
18
18
  "dependencies": {
19
- "@0xmonaco/contracts": "1.0.66",
19
+ "@0xmonaco/contracts": "1.0.67",
20
20
  "zod": "^4.1.12"
21
21
  },
22
22
  "peerDependencies": {