@0xmonaco/types 1.0.96 → 1.0.98

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.
@@ -137,9 +137,12 @@ export interface GetCandlesticksParams {
137
137
  * Price series to chart. `"trade"` (default) returns the trade-derived OHLCV
138
138
  * series; `"mark"` returns the mark-price series (margin pairs only), where
139
139
  * each candle's open/high/low/close are the bucket's closing mark and volume
140
- * is 0. Omit for the trade series.
140
+ * is 0; `"reference"` returns full OHLC of the mark price over each bucket
141
+ * (margin pairs only), with volume, quote volume and trade count always 0,
142
+ * for charting markets with little trading. A margin pair with no reference
143
+ * history returns no candles. Omit for the trade series.
141
144
  */
142
- priceType?: "trade" | "mark";
145
+ priceType?: "trade" | "mark" | "reference";
143
146
  }
144
147
  /**
145
148
  * Query parameters for fetching trading pairs
@@ -47,7 +47,7 @@ export declare const TraderCodeAvailabilityResponseSchema: z.ZodObject<{
47
47
  taken: "taken";
48
48
  too_long: "too_long";
49
49
  too_short: "too_short";
50
- }>>>;
50
+ }>>, unknown>;
51
51
  }, z.core.$strip>;
52
52
  /** Schema for the set-custom-TraderCode request params (claim or edit). */
53
53
  export declare const SetTraderCodeParamsSchema: z.ZodObject<{
@@ -184,7 +184,7 @@ export interface Order {
184
184
  version?: number;
185
185
  }
186
186
  /** Stable terminal causes for accepted orders that end as CANCELLED. */
187
- export type OrderTerminalReason = "USER_REQUESTED" | "REPLACED" | "LIQUIDATION" | "INSUFFICIENT_MARGIN" | "REDUCE_ONLY_EXHAUSTED" | "POSITION_CLOSED" | "OCO_SIBLING_TRIGGERED" | "SELF_TRADE_PREVENTION" | "AUTO_DELEVERAGING" | "PRICE_BAND" | "SLIPPAGE_TOLERANCE" | "SYSTEM";
187
+ export type OrderTerminalReason = "USER_REQUESTED" | "REPLACED" | "LIQUIDATION" | "INSUFFICIENT_MARGIN" | "REDUCE_ONLY_EXHAUSTED" | "POSITION_CLOSED" | "OCO_SIBLING_TRIGGERED" | "SELF_TRADE_PREVENTION" | "AUTO_DELEVERAGING" | "PRICE_BAND" | "SLIPPAGE_TOLERANCE" | "BANKRUPTCY_PRICE" | "SYSTEM";
188
188
  /**
189
189
  * Role of the creator or order
190
190
  */
@@ -173,6 +173,7 @@ export declare const GetCandlesticksByPairIdSchema: z.ZodObject<{
173
173
  limit: z.ZodOptional<z.ZodNumber>;
174
174
  priceType: z.ZodOptional<z.ZodEnum<{
175
175
  mark: "mark";
176
+ reference: "reference";
176
177
  trade: "trade";
177
178
  }>>;
178
179
  }, z.core.$strip>;
@@ -197,6 +198,7 @@ export declare const GetCandlesticksBySymbolSchema: z.ZodObject<{
197
198
  limit: z.ZodOptional<z.ZodNumber>;
198
199
  priceType: z.ZodOptional<z.ZodEnum<{
199
200
  mark: "mark";
201
+ reference: "reference";
200
202
  trade: "trade";
201
203
  }>>;
202
204
  }, z.core.$strip>;
@@ -188,7 +188,7 @@ export const GetCandlesticksByPairIdSchema = z
188
188
  startTime: TimestampSchema.optional(),
189
189
  endTime: TimestampSchema.optional(),
190
190
  limit: CandlestickLimitSchema,
191
- priceType: z.enum(["trade", "mark"]).optional(),
191
+ priceType: z.enum(["trade", "mark", "reference"]).optional(),
192
192
  })
193
193
  .refine((data) => {
194
194
  // Only validate startTime < endTime if both are provided
@@ -11,9 +11,12 @@ import type { TradingMode } from "../../trading";
11
11
  * - `trade` — the trade-derived candles (the default when the token is omitted).
12
12
  * - `mark` — the close-only mark-price series (open = high = low = close = mark,
13
13
  * zero volume), published on `1m` for margin pairs.
14
- * - `*` — both series.
14
+ * - `reference` — full OHLC of the mark price over each bucket (unlike the
15
+ * close-only `mark`), zero volume and trades, on every interval for margin
16
+ * pairs. Meant for charting markets with little trading.
17
+ * - `*` — every series.
15
18
  */
16
- export type OHLCVPriceType = "trade" | "mark" | "*";
19
+ export type OHLCVPriceType = "trade" | "mark" | "reference" | "*";
17
20
  /**
18
21
  * OHLCV update event
19
22
  */
@@ -26,15 +29,15 @@ export interface OHLCVEvent {
26
29
  tradingMode: TradingMode | (string & {});
27
30
  /**
28
31
  * Price series this candle belongs to. Always a concrete series on the wire
29
- * (`trade` or `mark`, never the `*` selector); lets a wildcard subscriber
30
- * tell the two streams apart. Absent only on legacy frames that omit it.
32
+ * (`trade`, `mark` or `reference`, never the `*` selector); lets a wildcard
33
+ * subscriber tell the streams apart. Absent only on legacy frames that omit it.
31
34
  *
32
- * Widened past the two known values on purpose: a wildcard subscription
35
+ * Widened past the known values on purpose: a wildcard subscription
33
36
  * matches any suffix, so a series added server-side after this version still
34
37
  * arrives here, and telling the streams apart is the entire point of the
35
38
  * field. Match it with a `default` branch.
36
39
  */
37
- priceType?: "trade" | "mark" | (string & {});
40
+ priceType?: "trade" | "mark" | "reference" | (string & {});
38
41
  /** OHLCV candlestick data */
39
42
  candlestick: Candlestick;
40
43
  }
@@ -6619,7 +6619,7 @@ export interface components {
6619
6619
  */
6620
6620
  batchId?: string | null;
6621
6621
  /**
6622
- * @description Stable terminal cause for a cancelled order: USER_REQUESTED, REPLACED, LIQUIDATION, INSUFFICIENT_MARGIN, REDUCE_ONLY_EXHAUSTED, POSITION_CLOSED, OCO_SIBLING_TRIGGERED, SELF_TRADE_PREVENTION, AUTO_DELEVERAGING, PRICE_BAND, SLIPPAGE_TOLERANCE, or SYSTEM. AUTO_DELEVERAGING means auto-deleveraging closed the position your risk bucket held and this resting order was cancelled with it; you were deleveraged as a counterparty, not liquidated. PRICE_BAND means the exchange's protective price band stopped the order and its remainder was cancelled, or, on a resting perp order, that the mark moved the order past the band, where no taker may trade with it; SLIPPAGE_TOLERANCE means your own slippageToleranceBps did.
6622
+ * @description Stable terminal cause for a cancelled order: USER_REQUESTED, REPLACED, LIQUIDATION, INSUFFICIENT_MARGIN, REDUCE_ONLY_EXHAUSTED, POSITION_CLOSED, OCO_SIBLING_TRIGGERED, SELF_TRADE_PREVENTION, AUTO_DELEVERAGING, PRICE_BAND, SLIPPAGE_TOLERANCE, BANKRUPTCY_PRICE, or SYSTEM. AUTO_DELEVERAGING means auto-deleveraging closed the position your risk bucket held and this resting order was cancelled with it; you were deleveraged as a counterparty, not liquidated. PRICE_BAND means the exchange's protective price band stopped the order and its remainder was cancelled, or, on a resting perp order, that the mark moved the order past the band, where no taker may trade with it; SLIPPAGE_TOLERANCE means your own slippageToleranceBps did. BANKRUPTCY_PRICE means a resting order was cancelled because filling it would have taken its risk bucket below zero equity in liquidation zero mode (its bankruptcy price).
6623
6623
  * @example REDUCE_ONLY_EXHAUSTED
6624
6624
  */
6625
6625
  terminalReason?: string | null;
@@ -16847,8 +16847,8 @@ export interface operations {
16847
16847
  endTime?: number;
16848
16848
  /** @description Max candles to return (max 1000) */
16849
16849
  limit?: number;
16850
- /** @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) */
16851
- priceType?: "trade" | "mark";
16850
+ /** @description Price series to chart: trade (default, trade-derived OHLCV), mark (mark-price series, margin pairs only; each candle's open/high/low/close are the bucket's closing mark and volume is 0) or reference (full OHLC of the mark price over each bucket, margin pairs only; volume and trade count are always 0; for charting thin markets) */
16851
+ priceType?: "trade" | "mark" | "reference";
16852
16852
  };
16853
16853
  header?: never;
16854
16854
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/types",
3
- "version": "1.0.96",
3
+ "version": "1.0.98",
4
4
  "type": "module",
5
5
  "homepage": "https://docs.0xmonaco.com/sdk/typescript",
6
6
  "main": "./dist/index.js",
@@ -16,8 +16,8 @@
16
16
  "lint": "biome lint ."
17
17
  },
18
18
  "dependencies": {
19
- "@0xmonaco/contracts": "1.0.96",
20
- "zod": "^4.1.12"
19
+ "@0xmonaco/contracts": "1.0.98",
20
+ "zod": "^4.6.7"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "viem": "^2.45.2"