@0xmonaco/types 1.0.64 → 1.0.65

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.
@@ -230,6 +230,12 @@ export interface MarginAccountMovement {
230
230
  }
231
231
  export interface GetMarginAccountMovementsResponse {
232
232
  movements: MarginAccountMovement[];
233
+ /**
234
+ * Matching movements. Exact up to 10,000 pages of the requested page size
235
+ * (`pageSize` x 10,000 rows) and saturates there, so a caller with more
236
+ * movements than the listing can page through reads the cap, not its
237
+ * lifetime total. `page` is capped at 10,000.
238
+ */
233
239
  total: number;
234
240
  page: number;
235
241
  pageSize: number;
@@ -149,6 +149,12 @@ export interface ListPositionsParams {
149
149
  }
150
150
  export interface ListPositionsResponse {
151
151
  positions: Position[];
152
+ /**
153
+ * Matching positions. Exact up to 10,000 pages of the requested page size
154
+ * (`pageSize` x 10,000 rows) and saturates there, so a caller with more
155
+ * matching positions than the listing can page through reads the cap, not
156
+ * its lifetime total. `page` is capped at 10,000.
157
+ */
152
158
  total: number;
153
159
  page: number;
154
160
  pageSize: number;
@@ -304,6 +310,12 @@ export interface PositionHistoryEvent {
304
310
  }
305
311
  export interface ListPositionHistoryResponse {
306
312
  events: PositionHistoryEvent[];
313
+ /**
314
+ * Matching position-history events. Exact up to 10,000 pages of the
315
+ * requested page size (`pageSize` x 10,000 rows) and saturates there, so a
316
+ * caller with more history than the listing can page through reads the cap,
317
+ * not its lifetime total. `page` is capped at 10,000.
318
+ */
307
319
  total: number;
308
320
  page: number;
309
321
  pageSize: number;
@@ -292,14 +292,17 @@ export interface GetUserTradesResponse {
292
292
  /** Items per page */
293
293
  pageSize: number;
294
294
  /**
295
- * Total number of trades.
295
+ * Total matching trades. In page-number mode it is exact up to
296
+ * `pageSize` × 10,000 rows and saturates there, so a wallet with more history
297
+ * than legacy mode can page through reads the cap, not its lifetime total.
296
298
  *
297
299
  * @deprecated Only populated by legacy page-number (offset) responses; 0 in
298
300
  * cursor mode, which has no exact total. Walk `nextPageToken` instead.
299
301
  */
300
302
  total: number;
301
303
  /**
302
- * Total number of pages.
304
+ * Total pages at this `pageSize`. Exact up to 10,000 in page-number mode and
305
+ * saturates there, the last page legacy mode can reach.
303
306
  *
304
307
  * @deprecated Only populated by legacy page-number (offset) responses; 0 in
305
308
  * cursor mode, which has no exact total. Walk `nextPageToken` instead.
@@ -556,6 +556,12 @@ export interface ConditionalOrder {
556
556
  }
557
557
  export interface ListConditionalOrdersResponse {
558
558
  orders: ConditionalOrder[];
559
+ /**
560
+ * Matching conditional orders. Exact up to 10,000 pages of the requested
561
+ * page size (`pageSize` x 10,000 rows) and saturates there, so a caller with
562
+ * more matching conditional orders than the listing can page through reads
563
+ * the cap, not its lifetime total. `page` is capped at 10,000.
564
+ */
559
565
  total: number;
560
566
  page: number;
561
567
  pageSize: number;
@@ -824,7 +830,12 @@ export interface ListTwapOrdersParams {
824
830
  */
825
831
  export interface ListTwapOrdersResponse {
826
832
  orders: TwapOrder[];
827
- /** Total number of TWAP orders matching the filter */
833
+ /**
834
+ * Matching TWAP orders. Exact up to 10,000 pages of the requested page size
835
+ * (`pageSize` x 10,000 rows) and saturates there, so a caller with more
836
+ * matching TWAP orders than the listing can page through reads the cap, not
837
+ * its lifetime total. `page` is capped at 10,000.
838
+ */
828
839
  total: number;
829
840
  /** Current page number */
830
841
  page: number;
@@ -18,6 +18,10 @@
18
18
  * Perp-only fields (`maxLeverage`, `initialMarginRate`, `maintenanceMarginRate`)
19
19
  * are optional and omitted on the wire for spot markets, which have no leverage
20
20
  * or margin parameters. All numeric quantities are decimal strings.
21
+ *
22
+ * Every frame (snapshot and live) carries `baseIconUrl` and `quoteIconUrl` for
23
+ * the market's two assets, each `null` when that asset has no icon configured,
24
+ * so a client can render a position's asset icons from the instrument row alone.
21
25
  */
22
26
  /**
23
27
  * The kind of instrument change a frame reports.
@@ -65,6 +69,20 @@ export interface InstrumentEventData {
65
69
  marketType: string;
66
70
  /** Asset-class category, e.g. "crypto", "equities", "commodities" */
67
71
  category: string;
72
+ /**
73
+ * Base asset icon URL, or `null` when the asset has no icon configured.
74
+ * The server sends this on every market (spot and perp) as an explicit `null`
75
+ * when absent, unlike the perp-only fields that are omitted — but the property
76
+ * is declared **optional** so that adding it stays a non-breaking change for
77
+ * code that constructs or mocks this shape. Never a synthesized URL. Join a
78
+ * position's `tradingPairId` to this row to render the icon without a REST call.
79
+ */
80
+ baseIconUrl?: string | null;
81
+ /**
82
+ * Quote asset icon URL, or `null` when the asset has no icon configured. See
83
+ * {@link InstrumentEventData.baseIconUrl}.
84
+ */
85
+ quoteIconUrl?: string | null;
68
86
  /** Maximum leverage (decimal string). Perp-only; omitted for spot. */
69
87
  maxLeverage?: string;
70
88
  /** Initial margin rate (decimal string). Perp-only; omitted for spot. */
@@ -18,4 +18,8 @@
18
18
  * Perp-only fields (`maxLeverage`, `initialMarginRate`, `maintenanceMarginRate`)
19
19
  * are optional and omitted on the wire for spot markets, which have no leverage
20
20
  * or margin parameters. All numeric quantities are decimal strings.
21
+ *
22
+ * Every frame (snapshot and live) carries `baseIconUrl` and `quoteIconUrl` for
23
+ * the market's two assets, each `null` when that asset has no icon configured,
24
+ * so a client can render a position's asset icons from the instrument row alone.
21
25
  */
@@ -4624,7 +4624,11 @@ export interface components {
4624
4624
  };
4625
4625
  GetMarginAccountMovementsResponse: {
4626
4626
  movements?: components["schemas"]["MarginAccountMovement"][] | null;
4627
- /** Format: uint32 */
4627
+ /**
4628
+ * Format: uint32
4629
+ * @description Matching movements. Exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more movements than the listing can page through reads the cap, not its lifetime total.
4630
+ * @example 150
4631
+ */
4628
4632
  total?: number | null;
4629
4633
  /** Format: uint32 */
4630
4634
  page?: number | null;
@@ -5882,13 +5886,13 @@ export interface components {
5882
5886
  pageSize?: string | null;
5883
5887
  /**
5884
5888
  * @deprecated
5885
- * @description Deprecated: total number of trades (legacy offset mode only; 0 in cursor mode)
5889
+ * @description Deprecated: total matching trades (legacy page-number mode only; 0 in cursor mode). Exact up to pageSize x 10,000 rows and saturates there. Use pageToken cursor pagination instead.
5886
5890
  * @example 150
5887
5891
  */
5888
5892
  total?: string | null;
5889
5893
  /**
5890
5894
  * @deprecated
5891
- * @description Deprecated: total number of pages (legacy offset mode only; 0 in cursor mode)
5895
+ * @description Deprecated: total pages at this pageSize (legacy page-number mode only; 0 in cursor mode). Exact up to 10,000 and saturates there. Use pageToken cursor pagination instead.
5892
5896
  * @example 8
5893
5897
  */
5894
5898
  totalPages?: string | null;
@@ -6213,7 +6217,11 @@ export interface components {
6213
6217
  };
6214
6218
  ListConditionalOrdersResponse: {
6215
6219
  orders?: components["schemas"]["ConditionalOrder"][] | null;
6216
- /** Format: uint32 */
6220
+ /**
6221
+ * Format: uint32
6222
+ * @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.
6223
+ * @example 3
6224
+ */
6217
6225
  total?: number | null;
6218
6226
  /** Format: uint32 */
6219
6227
  page?: number | null;
@@ -6362,7 +6370,11 @@ export interface components {
6362
6370
  };
6363
6371
  ListPositionHistoryResponse: {
6364
6372
  events?: components["schemas"]["PositionHistoryEvent"][] | null;
6365
- /** Format: uint32 */
6373
+ /**
6374
+ * Format: uint32
6375
+ * @description Matching position-history events. Exact up to 10,000 pages of the requested page size (page_size x 10,000 rows) and saturates there, so a caller with more history than the listing can page through reads the cap, not its lifetime total.
6376
+ * @example 150
6377
+ */
6366
6378
  total?: number | null;
6367
6379
  /** Format: uint32 */
6368
6380
  page?: number | null;
@@ -6371,7 +6383,11 @@ export interface components {
6371
6383
  };
6372
6384
  ListPositionsResponse: {
6373
6385
  positions?: components["schemas"]["Position"][] | null;
6374
- /** Format: uint32 */
6386
+ /**
6387
+ * Format: uint32
6388
+ * @description Matching positions. 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 positions than the listing can page through reads the cap, not its lifetime total.
6389
+ * @example 150
6390
+ */
6375
6391
  total?: number | null;
6376
6392
  /** Format: uint32 */
6377
6393
  page?: number | null;
@@ -6419,7 +6435,7 @@ export interface components {
6419
6435
  orders?: components["schemas"]["TwapOrder"][] | null;
6420
6436
  /**
6421
6437
  * Format: uint32
6422
- * @description Total number of TWAP orders matching the filter
6438
+ * @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.
6423
6439
  * @example 3
6424
6440
  */
6425
6441
  total?: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.64",
3
+ "version": "1.0.65",
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.64",
19
+ "@0xmonaco/contracts": "1.0.65",
20
20
  "zod": "^4.1.12"
21
21
  },
22
22
  "peerDependencies": {