@0xmonaco/types 1.0.39 → 1.0.41-develop.ebb62ed

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.
@@ -1856,38 +1856,6 @@ export interface paths {
1856
1856
  patch?: never;
1857
1857
  trace?: never;
1858
1858
  };
1859
- "/api/v1/positions/{positionId}/margin/add": {
1860
- parameters: {
1861
- query?: never;
1862
- header?: never;
1863
- path?: never;
1864
- cookie?: never;
1865
- };
1866
- get?: never;
1867
- put?: never;
1868
- post: operations["add_position_margin"];
1869
- delete?: never;
1870
- options?: never;
1871
- head?: never;
1872
- patch?: never;
1873
- trace?: never;
1874
- };
1875
- "/api/v1/positions/{positionId}/margin/reduce": {
1876
- parameters: {
1877
- query?: never;
1878
- header?: never;
1879
- path?: never;
1880
- cookie?: never;
1881
- };
1882
- get?: never;
1883
- put?: never;
1884
- post: operations["reduce_position_margin"];
1885
- delete?: never;
1886
- options?: never;
1887
- head?: never;
1888
- patch?: never;
1889
- trace?: never;
1890
- };
1891
1859
  "/api/v1/positions/{positionId}/pnl/history": {
1892
1860
  parameters: {
1893
1861
  query?: never;
@@ -2224,19 +2192,6 @@ export interface components {
2224
2192
  */
2225
2193
  totalBalanceRaw?: string | null;
2226
2194
  };
2227
- AddPositionMarginRequest: {
2228
- /** @description Collateral asset to move into the isolated bucket. USDC is the current v1 path. */
2229
- asset?: string | null;
2230
- amount?: string | null;
2231
- };
2232
- AddPositionMarginResponse: {
2233
- positionId?: string | null;
2234
- /** @description Margin account UUID for the isolated bucket that was adjusted. */
2235
- marginAccountId?: string | null;
2236
- newIsolatedMargin?: string | null;
2237
- status?: string | null;
2238
- message?: string | null;
2239
- };
2240
2195
  AppUser: {
2241
2196
  /**
2242
2197
  * Format: uuid
@@ -2715,10 +2670,15 @@ export interface components {
2715
2670
  */
2716
2671
  marginMode?: "ISOLATED" | "CROSS" | null;
2717
2672
  /**
2718
- * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC/GTD only; rejected on MARKET orders and IOC/FOK.
2673
+ * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC only; rejected on MARKET orders and IOC/FOK.
2719
2674
  * @example false
2720
2675
  */
2721
2676
  postOnly?: boolean | null;
2677
+ /**
2678
+ * @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. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting.
2679
+ * @example quote-btc-1130-a
2680
+ */
2681
+ clientOrderId?: string | null;
2722
2682
  };
2723
2683
  BatchCreateOrdersRequest: {
2724
2684
  orders: components["schemas"]["BatchCreateOrderItem"][];
@@ -2789,10 +2749,15 @@ export interface components {
2789
2749
  */
2790
2750
  useMasterBalance?: boolean | null;
2791
2751
  /**
2792
- * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC/GTD only; rejected on MARKET orders and IOC/FOK.
2752
+ * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC only; rejected on MARKET orders and IOC/FOK.
2793
2753
  * @example false
2794
2754
  */
2795
2755
  postOnly?: boolean | null;
2756
+ /**
2757
+ * @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. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting. 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.
2758
+ * @example quote-btc-1130-a
2759
+ */
2760
+ clientOrderId?: string | null;
2796
2761
  };
2797
2762
  BatchReplaceOrdersRequest: {
2798
2763
  orders: components["schemas"]["BatchReplaceOrderItem"][];
@@ -3188,10 +3153,15 @@ export interface components {
3188
3153
  */
3189
3154
  marginMode?: "ISOLATED" | "CROSS" | null;
3190
3155
  /**
3191
- * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC/GTD only; rejected on MARKET orders and IOC/FOK.
3156
+ * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC only; rejected on MARKET orders and IOC/FOK.
3192
3157
  * @example false
3193
3158
  */
3194
3159
  postOnly?: boolean | null;
3160
+ /**
3161
+ * @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. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting.
3162
+ * @example quote-btc-1130-a
3163
+ */
3164
+ clientOrderId?: string | null;
3195
3165
  };
3196
3166
  CreateOrderResponse: {
3197
3167
  /**
@@ -3873,6 +3843,11 @@ export interface components {
3873
3843
  * @example 482931
3874
3844
  */
3875
3845
  totalTradeCountLtd?: string | null;
3846
+ /**
3847
+ * @description Quote-token (notional) volume summed over the available candles in the rolling 24h window; null when quote volume is unavailable for the window
3848
+ * @example 117845632.18
3849
+ */
3850
+ quoteVolume24h?: string | null;
3876
3851
  };
3877
3852
  /** @description Exchange-wide life-to-date cumulative market statistics across all trading pairs. */
3878
3853
  GetMarketStatsResponse: {
@@ -4130,7 +4105,10 @@ export interface components {
4130
4105
  * @example 300000000
4131
4106
  */
4132
4107
  remainingQuantityRaw?: string | null;
4133
- /** @description Client-assigned order identifier */
4108
+ /**
4109
+ * @description Client-assigned correlation handle as stored: the value supplied on create or replace, with surrounding whitespace trimmed. Absent when the order carried none, including every order placed before the field was accepted on write. Not unique: Monaco neither de-duplicates nor enforces uniqueness, so several orders may share one value and a lookup by it can be ambiguous.
4110
+ * @example quote-btc-1130-a
4111
+ */
4134
4112
  clientOrderId?: string | null;
4135
4113
  /**
4136
4114
  * @description Timestamp when the order was cancelled (ISO 8601)
@@ -4274,9 +4252,17 @@ export interface components {
4274
4252
  indexPrice?: string | null;
4275
4253
  high24h?: string | null;
4276
4254
  low24h?: string | null;
4255
+ /**
4256
+ * @description Base-asset volume in the last 24 hours
4257
+ * @example 1234.5678
4258
+ */
4277
4259
  volume24h?: string | null;
4278
4260
  priceChange24h?: string | null;
4279
4261
  priceChangePercent24h?: string | null;
4262
+ /**
4263
+ * @description Open interest in base-asset units (legacy alias of openInterestBase)
4264
+ * @example 12345.67
4265
+ */
4280
4266
  openInterest?: string | null;
4281
4267
  currentFundingRate?: string | null;
4282
4268
  estimatedNextFundingRate?: string | null;
@@ -4284,6 +4270,21 @@ export interface components {
4284
4270
  marketStatus?: string | null;
4285
4271
  marketRegime?: string | null;
4286
4272
  updatedAt?: string | null;
4273
+ /**
4274
+ * @description Open interest in base-asset units (e.g. BTC)
4275
+ * @example 12345.67
4276
+ */
4277
+ openInterestBase?: string | null;
4278
+ /**
4279
+ * @description Open interest notional in quote units (openInterestBase x mark price, falling back to the last trade price when no mark is available)
4280
+ * @example 1172836500.00
4281
+ */
4282
+ openInterestNotional?: string | null;
4283
+ /**
4284
+ * @description Quote-token (notional) volume summed over the available candles in the rolling 24h window; null when quote volume is unavailable
4285
+ * @example 117845632.18
4286
+ */
4287
+ quoteVolume24h?: string | null;
4287
4288
  };
4288
4289
  GetPortfolioAssetsResponse: {
4289
4290
  window?: components["schemas"]["PortfolioSeriesWindow"];
@@ -5398,6 +5399,16 @@ export interface components {
5398
5399
  * @example 2026-06-01T00:00:00Z
5399
5400
  */
5400
5401
  expiresAt?: string | null;
5402
+ /**
5403
+ * @description Deliberate partial size: this leg closes exactly this much and never resizes, however the position grows. Omit it (or set closePosition=true) to close the whole live position at trigger time. Mutually exclusive with closePosition=true; required when closePosition=false. Same contract as TpSlLeg on the position-attached rail.
5404
+ * @example 0.5
5405
+ */
5406
+ quantity?: string | null;
5407
+ /**
5408
+ * @description Resolve the full live position size when triggered, so the leg keeps covering the position as it grows. Mutually exclusive with quantity. Omitting both also means full-position close.
5409
+ * @example true
5410
+ */
5411
+ closePosition?: boolean | null;
5401
5412
  };
5402
5413
  /**
5403
5414
  * @description A single pending withdrawal in a list response. A lightweight summary — the
@@ -5925,17 +5936,6 @@ export interface components {
5925
5936
  */
5926
5937
  relevance?: number | null;
5927
5938
  };
5928
- ReducePositionMarginRequest: {
5929
- amount?: string | null;
5930
- };
5931
- ReducePositionMarginResponse: {
5932
- positionId?: string | null;
5933
- /** @description Margin account UUID for the isolated bucket that was adjusted. */
5934
- marginAccountId?: string | null;
5935
- newIsolatedMargin?: string | null;
5936
- status?: string | null;
5937
- message?: string | null;
5938
- };
5939
5939
  RefreshRequest: Record<string, never>;
5940
5940
  RefreshResponse: {
5941
5941
  /**
@@ -5977,10 +5977,10 @@ export interface components {
5977
5977
  };
5978
5978
  ReplaceOrderRequest: {
5979
5979
  /**
5980
- * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC/GTD only; rejected on MARKET orders and IOC/FOK.
5981
- * @example false
5980
+ * @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. Monaco stores and returns this value but does NOT de-duplicate on it and does not enforce uniqueness — it correlates a response to a request, it does not make a retry safe. A create whose response was lost must still be reconciled against ListOrders before resubmitting. 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.
5981
+ * @example quote-btc-1130-a
5982
5982
  */
5983
- postOnly?: boolean | null;
5983
+ clientOrderId?: string | null;
5984
5984
  /**
5985
5985
  * @description New limit price (if changing)
5986
5986
  * @example 35500.00
@@ -5996,6 +5996,11 @@ export interface components {
5996
5996
  * @example false
5997
5997
  */
5998
5998
  useMasterBalance?: boolean | null;
5999
+ /**
6000
+ * @description Post-only: reject instead of matching if this limit order would cross the book — rejected with HTTP 400 / gRPC INVALID_ARGUMENT carrying the structured error code POST_ONLY_WOULD_CROSS (REST error-envelope 'code' field; gRPC google.rpc.ErrorInfo reason; batch per-item error.code). Matching the 'post-only order would cross' message substring is a legacy fallback. LIMIT orders with GTC only; rejected on MARKET orders and IOC/FOK.
6001
+ * @example false
6002
+ */
6003
+ postOnly?: boolean | null;
5999
6004
  };
6000
6005
  ReplaceOrderResponse: {
6001
6006
  /**
@@ -6151,6 +6156,16 @@ export interface components {
6151
6156
  * @example 1745308800000
6152
6157
  */
6153
6158
  lastFundingTime?: string | null;
6159
+ /**
6160
+ * @description Open interest in base-asset units (e.g. BTC); null for spot pairs, "0" for a margin pair with no open positions
6161
+ * @example 12345.67
6162
+ */
6163
+ openInterestBase?: string | null;
6164
+ /**
6165
+ * @description Open interest notional in quote units (openInterestBase x latest trade price); null for spot pairs. Valued at the pair's latest trade price (a snapshot); the mark-accurate notional lives on getPerpMarketSummary / getOpenInterest
6166
+ * @example 1172836500.00
6167
+ */
6168
+ openInterestNotional?: string | null;
6154
6169
  };
6155
6170
  /** @description One UTC-day bucket in a pair's 7-day snapshot. */
6156
6171
  ScreenerSnapshotPoint: {
@@ -6703,6 +6718,12 @@ export interface components {
6703
6718
  tradingPairId?: string | null;
6704
6719
  /** @description Optional strategy key echoed in responses when callers scope a risk bucket. */
6705
6720
  strategyKey?: string | null;
6721
+ /**
6722
+ * @description Risk bucket mode. Defaults to ISOLATED, which is selected by tradingPairId.
6723
+ * Pass CROSS to release from the account's cross risk bucket, which has no
6724
+ * trading pair and so cannot be named any other way. Values: ISOLATED, CROSS.
6725
+ */
6726
+ marginMode?: string | null;
6706
6727
  };
6707
6728
  TransferCollateralFromMarginAccountResponse: {
6708
6729
  movementId?: string | null;
@@ -9376,6 +9397,8 @@ export interface operations {
9376
9397
  endTime?: number;
9377
9398
  /** @description Max candles to return (max 1000) */
9378
9399
  limit?: number;
9400
+ /** @description Price series to chart: trade (default, trade-derived OHLCV) or mark (mark-price series, margin pairs only; each candle's open/high/low/close are the bucket's closing mark and volume is 0) */
9401
+ priceType?: "trade" | "mark";
9379
9402
  };
9380
9403
  header?: never;
9381
9404
  path: {
@@ -10834,66 +10857,6 @@ export interface operations {
10834
10857
  };
10835
10858
  };
10836
10859
  };
10837
- add_position_margin: {
10838
- parameters: {
10839
- query?: never;
10840
- header?: never;
10841
- path: {
10842
- /**
10843
- * @description Position UUID for the isolated bucket being adjusted.
10844
- * @example 2b1a5f9c-0000-4000-8000-000000000002
10845
- */
10846
- positionId: string;
10847
- };
10848
- cookie?: never;
10849
- };
10850
- requestBody: {
10851
- content: {
10852
- "application/json": components["schemas"]["AddPositionMarginRequest"];
10853
- };
10854
- };
10855
- responses: {
10856
- /** @description OK */
10857
- 200: {
10858
- headers: {
10859
- [name: string]: unknown;
10860
- };
10861
- content: {
10862
- "application/json": components["schemas"]["AddPositionMarginResponse"];
10863
- };
10864
- };
10865
- };
10866
- };
10867
- reduce_position_margin: {
10868
- parameters: {
10869
- query?: never;
10870
- header?: never;
10871
- path: {
10872
- /**
10873
- * @description Position UUID for the isolated bucket being adjusted.
10874
- * @example 2b1a5f9c-0000-4000-8000-000000000002
10875
- */
10876
- positionId: string;
10877
- };
10878
- cookie?: never;
10879
- };
10880
- requestBody: {
10881
- content: {
10882
- "application/json": components["schemas"]["ReducePositionMarginRequest"];
10883
- };
10884
- };
10885
- responses: {
10886
- /** @description OK */
10887
- 200: {
10888
- headers: {
10889
- [name: string]: unknown;
10890
- };
10891
- content: {
10892
- "application/json": components["schemas"]["ReducePositionMarginResponse"];
10893
- };
10894
- };
10895
- };
10896
- };
10897
10860
  get_position_pnl_history: {
10898
10861
  parameters: {
10899
10862
  query: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.39",
3
+ "version": "1.0.41-develop.ebb62ed",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,7 +20,7 @@
20
20
  "lint": "biome lint ."
21
21
  },
22
22
  "dependencies": {
23
- "@0xmonaco/contracts": "1.0.39",
23
+ "@0xmonaco/contracts": "1.0.41-develop.ebb62ed",
24
24
  "zod": "^4.1.12"
25
25
  },
26
26
  "peerDependencies": {