@0xmonaco/types 1.0.97 → 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.
package/dist/market/index.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
@@ -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
|
-
* -
|
|
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 `
|
|
30
|
-
* tell the
|
|
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
|
|
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
|
}
|
package/dist/wire/schema.d.ts
CHANGED
|
@@ -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)
|
|
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.
|
|
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,7 +16,7 @@
|
|
|
16
16
|
"lint": "biome lint ."
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@0xmonaco/contracts": "1.0.
|
|
19
|
+
"@0xmonaco/contracts": "1.0.98",
|
|
20
20
|
"zod": "^4.6.7"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|