@polyester/sdk 0.34.0-devnet-20261105175240 → 0.34.0
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/CHANGELOG.md +3 -1
- package/dist/services/balances/balances.d.ts.map +1 -1
- package/dist/services/balances/balances.js +3 -8
- package/dist/services/balances/balances.js.map +1 -1
- package/dist/services/balances/balances.schemas.d.ts +0 -5
- package/dist/services/balances/balances.schemas.d.ts.map +1 -1
- package/dist/services/balances/balances.schemas.js +34 -20
- package/dist/services/balances/balances.schemas.js.map +1 -1
- package/dist/services/candles/candles.d.ts.map +1 -1
- package/dist/services/candles/candles.js +7 -20
- package/dist/services/candles/candles.js.map +1 -1
- package/dist/services/candles/candles.schemas.d.ts +10 -10
- package/dist/services/candles/candles.schemas.d.ts.map +1 -1
- package/dist/services/candles/candles.schemas.js +35 -20
- package/dist/services/candles/candles.schemas.js.map +1 -1
- package/dist/services/changelog/changelog.schemas.d.ts +17 -17
- package/dist/services/checkpoints/checkpoints.schemas.d.ts +2 -2
- package/dist/services/heatmap/heatmap.schemas.d.ts +13 -13
- package/dist/services/lifecycle/lifecycle.schemas.d.ts +39 -39
- package/dist/services/market-data/market-data.d.ts.map +1 -1
- package/dist/services/market-data/market-data.js +3 -6
- package/dist/services/market-data/market-data.js.map +1 -1
- package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
- package/dist/services/market-data/market-data.schemas.js +22 -23
- package/dist/services/market-data/market-data.schemas.js.map +1 -1
- package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
- package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
- package/dist/services/orders/orders-output.schemas.d.ts +4 -3
- package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
- package/dist/services/orders/orders-output.schemas.js +100 -83
- package/dist/services/orders/orders-output.schemas.js.map +1 -1
- package/dist/services/orders/orders.d.ts.map +1 -1
- package/dist/services/orders/orders.js +6 -9
- package/dist/services/orders/orders.js.map +1 -1
- package/dist/services/trades/trades.d.ts.map +1 -1
- package/dist/services/trades/trades.js +3 -5
- package/dist/services/trades/trades.js.map +1 -1
- package/dist/services/trades/trades.schemas.d.ts +3 -2
- package/dist/services/trades/trades.schemas.d.ts.map +1 -1
- package/dist/services/trades/trades.schemas.js +42 -35
- package/dist/services/trades/trades.schemas.js.map +1 -1
- package/dist/services/triggers/triggers-output.schemas.d.ts +12 -12
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ function timestampFromTsSec(tsSec) {
|
|
|
18
18
|
nanos: 0
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
v.object({
|
|
22
22
|
symbolId: v.number(),
|
|
23
23
|
timeframe: v.pipe(v.number(), v.transform((v) => timeframeFromProto(v))),
|
|
24
24
|
tsSec: v.bigint(),
|
|
@@ -30,25 +30,40 @@ const CandleRowRawSchema = v.object({
|
|
|
30
30
|
quoteVolume: v.string(),
|
|
31
31
|
isClosed: v.optional(v.boolean(), false)
|
|
32
32
|
});
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
function toCandleRow(scales, data) {
|
|
34
|
+
const priceScale = scales.price();
|
|
35
|
+
return {
|
|
36
|
+
symbolId: data.symbolId,
|
|
37
|
+
timeframe: data.timeframe,
|
|
38
|
+
time: Number(data.tsSec),
|
|
39
|
+
open: scaledToDecimalOutput(data.open, priceScale),
|
|
40
|
+
high: scaledToDecimalOutput(data.high, priceScale),
|
|
41
|
+
low: scaledToDecimalOutput(data.low, priceScale),
|
|
42
|
+
close: scaledToDecimalOutput(data.close, priceScale),
|
|
43
|
+
volume: scaledToDecimalOutput(data.volume, scales.marketDataVolume(data.symbolId)),
|
|
44
|
+
quoteVolume: data.quoteVolume,
|
|
45
|
+
isClosed: data.isClosed
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Formats a protobuf-decoded candle point like {@link createCandleRowSchema} without
|
|
50
|
+
* re-validating it. `timeframe` is the proto enum value of the series.
|
|
51
|
+
*/
|
|
52
|
+
function formatCandleRow(scales, point, symbolId, timeframe) {
|
|
53
|
+
return toCandleRow(scales, {
|
|
54
|
+
symbolId,
|
|
55
|
+
timeframe: timeframeFromProto(timeframe),
|
|
56
|
+
tsSec: point.tsSec,
|
|
57
|
+
open: point.open,
|
|
58
|
+
high: point.high,
|
|
59
|
+
low: point.low,
|
|
60
|
+
close: point.close,
|
|
61
|
+
volume: point.volume,
|
|
62
|
+
quoteVolume: point.quoteVolume,
|
|
63
|
+
isClosed: point.isClosed ?? false
|
|
64
|
+
});
|
|
49
65
|
}
|
|
50
|
-
|
|
51
|
-
const CandlePointSchema = v.object({
|
|
66
|
+
v.object({
|
|
52
67
|
tsSec: v.bigint(),
|
|
53
68
|
open: v.bigint(),
|
|
54
69
|
high: v.bigint(),
|
|
@@ -156,6 +171,6 @@ const ListCandlesInputSchema = v.pipe(v.object({
|
|
|
156
171
|
pageToken: d.pageToken
|
|
157
172
|
})));
|
|
158
173
|
//#endregion
|
|
159
|
-
export {
|
|
174
|
+
export { ListCandlesInputSchema, TimeframeSchema, createCandleColumnarIntSchema, createCandleColumnarSchema, formatCandleRow };
|
|
160
175
|
|
|
161
176
|
//# sourceMappingURL=candles.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candles.schemas.js","names":[],"sources":["../../../src/services/candles/candles.schemas.ts"],"sourcesContent":["import { SymbolIdInputSchema } from \"../shared.js\";\nimport * as v from \"valibot\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport { OptionalTimestampSecondsInputSchema } from \"../../shared/schemas.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport { TIMEFRAMES, TimeframeCodec } from \"./candles.codecs.js\";\n\nexport const TimeframeSchema = v.picklist(TIMEFRAMES);\n\nexport type Timeframe = v.InferOutput<typeof TimeframeSchema>;\n\nfunction timeframeFromProto(value: number): DecodedEnum<Timeframe> {\n return enumLabel(TimeframeCodec.protoToOutput, value);\n}\n\nconst TimeframeInputSchema = v.pipe(\n TimeframeSchema,\n v.transform((value) => TimeframeCodec.inputToProto[value]),\n);\n\nconst OptionalPositiveNumberSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(10_000)),\n);\n\nconst OptionalBooleanSchema = v.optional(v.boolean(), false);\n\ntype TimestampInit = { seconds: bigint; nanos: number };\n\nfunction timestampFromTsSec(tsSec: bigint): TimestampInit {\n return { seconds: tsSec, nanos: 0 };\n}\n\nconst CandleRowRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.number(),\n v.transform((v) => timeframeFromProto(v)),\n ),\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n quoteVolume: v.string(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nexport function createCandleRowSchema(scales: SdkScales) {\n return v.pipe(\n CandleRowRawSchema,\n v.transform((data) => {\n const priceScale = scales.price();\n return {\n symbolId: data.symbolId,\n timeframe: data.timeframe,\n time: Number(data.tsSec),\n open: scaledToDecimalOutput(data.open, priceScale),\n high: scaledToDecimalOutput(data.high, priceScale),\n low: scaledToDecimalOutput(data.low, priceScale),\n close: scaledToDecimalOutput(data.close, priceScale),\n volume: scaledToDecimalOutput(data.volume, scales.marketDataVolume(data.symbolId)),\n quoteVolume: data.quoteVolume,\n isClosed: data.isClosed,\n };\n }),\n );\n}\n\nexport const createCandleRowIntSchema = createCandleRowSchema;\n\nexport const CandlePointSchema = v.object({\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n quoteVolume: v.string(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nconst CandleColumnarRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.number(),\n v.transform((v) => timeframeFromProto(v)),\n ),\n tsSec: v.array(v.bigint()),\n open: v.array(v.bigint()),\n high: v.array(v.bigint()),\n low: v.array(v.bigint()),\n close: v.array(v.bigint()),\n volume: v.array(v.bigint()),\n quoteVolume: v.array(v.string()),\n referenceTsSec: v.optional(v.array(v.bigint()), []),\n referenceOpen: v.optional(v.array(v.bigint()), []),\n referenceHigh: v.optional(v.array(v.bigint()), []),\n referenceLow: v.optional(v.array(v.bigint()), []),\n referenceClose: v.optional(v.array(v.bigint()), []),\n referenceVolume: v.optional(v.array(v.bigint()), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nfunction scaledArrayToDecimal(values: bigint[], scale: number): string[] {\n return values.map((value) => scaledToDecimalOutput(value, scale));\n}\n\nexport function createCandleColumnarSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const referencePriceScale = scales.referencePrice(d.symbolId);\n const volumeScale = scales.marketDataVolume(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n const hasReference = referenceTsSec.length > 0;\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n time: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n quoteVolume: d.quoteVolume,\n nextPageToken: d.nextPageToken,\n reference: hasReference\n ? {\n time: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.referenceOpen ?? [], referencePriceScale),\n high: scaledArrayToDecimal(d.referenceHigh ?? [], referencePriceScale),\n low: scaledArrayToDecimal(d.referenceLow ?? [], referencePriceScale),\n close: scaledArrayToDecimal(d.referenceClose ?? [], referencePriceScale),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport function createCandleColumnarIntSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const referencePriceScale = scales.referencePrice(d.symbolId);\n const volumeScale = scales.marketDataVolume(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n tsSec: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n quoteVolume: d.quoteVolume,\n nextPageToken: d.nextPageToken,\n reference:\n referenceTsSec.length > 0\n ? {\n tsSec: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(\n d.referenceOpen ?? [],\n referencePriceScale,\n ),\n high: scaledArrayToDecimal(\n d.referenceHigh ?? [],\n referencePriceScale,\n ),\n low: scaledArrayToDecimal(d.referenceLow ?? [], referencePriceScale),\n close: scaledArrayToDecimal(\n d.referenceClose ?? [],\n referencePriceScale,\n ),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport type Candle = v.InferOutput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleInput = v.InferInput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleIntInput = v.InferInput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleInt = v.InferOutput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarInput = v.InferInput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarIntInput = v.InferInput<ReturnType<typeof createCandleColumnarIntSchema>>;\nexport type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;\n\nexport const ListCandlesInputSchema = v.pipe(\n v.object({\n symbolId: SymbolIdInputSchema,\n timeframe: TimeframeInputSchema,\n limit: OptionalPositiveNumberSchema,\n includeIncomplete: v.optional(v.boolean(), false),\n includeReference: OptionalBooleanSchema,\n startTsSec: OptionalTimestampSecondsInputSchema,\n endTsSec: OptionalTimestampSecondsInputSchema,\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform((d) => ({\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n limit: d.limit,\n includeIncomplete: d.includeIncomplete,\n includeReference: d.includeReference,\n startTime: d.startTsSec != null ? timestampFromTsSec(d.startTsSec) : undefined,\n endTime: d.endTsSec != null ? timestampFromTsSec(d.endTsSec) : undefined,\n pageToken: d.pageToken,\n })),\n);\n\nexport function createListCandlesInputSchema() {\n return ListCandlesInputSchema;\n}\n\nexport type GetCandlesInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\nexport const createGetCandlesColumnsInputSchema = createListCandlesInputSchema;\nexport type GetCandlesColumnsInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\n"],"mappings":";;;;;;;AAQA,MAAa,kBAAkB,EAAE,SAAS,UAAU;AAIpD,SAAS,mBAAmB,OAAuC;CAC/D,OAAO,UAAU,eAAe,eAAe,KAAK;AACxD;AAEA,MAAM,uBAAuB,EAAE,KAC3B,iBACA,EAAE,WAAW,UAAU,eAAe,aAAa,MAAM,CAC7D;AAEA,MAAM,+BAA+B,EAAE,SACnC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAM,CAAC,CACpE;AAEA,MAAM,wBAAwB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;AAI3D,SAAS,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UAAU;GAC/C,QAAQ,qBAAqB,EAAE,QAAQ,WAAW;GAClD,aAAa,EAAE;GACf,eAAe,EAAE;GACjB,WACI,eAAe,SAAS,IAClB;IACI,OAAO,eAAe,KAAK,MAAM,OAAO,CAAC,CAAC;IAC1C,MAAM,qBACF,EAAE,iBAAiB,CAAC,GACpB,mBACJ;IACA,MAAM,qBACF,EAAE,iBAAiB,CAAC,GACpB,mBACJ;IACA,KAAK,qBAAqB,EAAE,gBAAgB,CAAC,GAAG,mBAAmB;IACnE,OAAO,qBACH,EAAE,kBAAkB,CAAC,GACrB,mBACJ;IACA,QAAQ,qBAAqB,EAAE,mBAAmB,CAAC,GAAG,WAAW;GACrE,IACA;EACd;CACJ,CAAC,CACL;AACJ;AAWA,MAAa,yBAAyB,EAAE,KACpC,EAAE,OAAO;CACL,UAAU;CACV,WAAW;CACX,OAAO;CACP,mBAAmB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;CAChD,kBAAkB;CAClB,YAAY;CACZ,UAAU;CACV,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AAC1D,CAAC,GACD,EAAE,WAAW,OAAO;CAChB,UAAU,EAAE;CACZ,WAAW,EAAE;CACb,OAAO,EAAE;CACT,mBAAmB,EAAE;CACrB,kBAAkB,EAAE;CACpB,WAAW,EAAE,cAAc,OAAO,mBAAmB,EAAE,UAAU,IAAI,KAAA;CACrE,SAAS,EAAE,YAAY,OAAO,mBAAmB,EAAE,QAAQ,IAAI,KAAA;CAC/D,WAAW,EAAE;AACjB,EAAE,CACN"}
|
|
1
|
+
{"version":3,"file":"candles.schemas.js","names":[],"sources":["../../../src/services/candles/candles.schemas.ts"],"sourcesContent":["import { SymbolIdInputSchema } from \"../shared.js\";\nimport * as v from \"valibot\";\nimport type * as ProtoMarketData from \"../../gen/marketdata/v1/marketdata_pb.js\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport { OptionalTimestampSecondsInputSchema } from \"../../shared/schemas.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport { TIMEFRAMES, TimeframeCodec } from \"./candles.codecs.js\";\n\nexport const TimeframeSchema = v.picklist(TIMEFRAMES);\n\nexport type Timeframe = v.InferOutput<typeof TimeframeSchema>;\n\nfunction timeframeFromProto(value: number): DecodedEnum<Timeframe> {\n return enumLabel(TimeframeCodec.protoToOutput, value);\n}\n\nconst TimeframeInputSchema = v.pipe(\n TimeframeSchema,\n v.transform((value) => TimeframeCodec.inputToProto[value]),\n);\n\nconst OptionalPositiveNumberSchema = v.optional(\n v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(10_000)),\n);\n\nconst OptionalBooleanSchema = v.optional(v.boolean(), false);\n\ntype TimestampInit = { seconds: bigint; nanos: number };\n\nfunction timestampFromTsSec(tsSec: bigint): TimestampInit {\n return { seconds: tsSec, nanos: 0 };\n}\n\nconst CandleRowRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.number(),\n v.transform((v) => timeframeFromProto(v)),\n ),\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n quoteVolume: v.string(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nfunction toCandleRow(scales: SdkScales, data: v.InferOutput<typeof CandleRowRawSchema>) {\n const priceScale = scales.price();\n return {\n symbolId: data.symbolId,\n timeframe: data.timeframe,\n time: Number(data.tsSec),\n open: scaledToDecimalOutput(data.open, priceScale),\n high: scaledToDecimalOutput(data.high, priceScale),\n low: scaledToDecimalOutput(data.low, priceScale),\n close: scaledToDecimalOutput(data.close, priceScale),\n volume: scaledToDecimalOutput(data.volume, scales.marketDataVolume(data.symbolId)),\n quoteVolume: data.quoteVolume,\n isClosed: data.isClosed,\n };\n}\n\nexport function createCandleRowSchema(scales: SdkScales) {\n return v.pipe(\n CandleRowRawSchema,\n v.transform((data) => toCandleRow(scales, data)),\n );\n}\n\n/**\n * Formats a protobuf-decoded candle point like {@link createCandleRowSchema} without\n * re-validating it. `timeframe` is the proto enum value of the series.\n */\nexport function formatCandleRow(\n scales: SdkScales,\n point: ProtoMarketData.CandlePoint,\n symbolId: number,\n timeframe: number,\n): Candle {\n return toCandleRow(scales, {\n symbolId,\n timeframe: timeframeFromProto(timeframe),\n tsSec: point.tsSec,\n open: point.open,\n high: point.high,\n low: point.low,\n close: point.close,\n volume: point.volume,\n quoteVolume: point.quoteVolume,\n isClosed: point.isClosed ?? false,\n });\n}\n\nexport const createCandleRowIntSchema = createCandleRowSchema;\n\nexport const CandlePointSchema = v.object({\n tsSec: v.bigint(),\n open: v.bigint(),\n high: v.bigint(),\n low: v.bigint(),\n close: v.bigint(),\n volume: v.bigint(),\n quoteVolume: v.string(),\n isClosed: v.optional(v.boolean(), false),\n});\n\nconst CandleColumnarRawSchema = v.object({\n symbolId: v.number(),\n timeframe: v.pipe(\n v.number(),\n v.transform((v) => timeframeFromProto(v)),\n ),\n tsSec: v.array(v.bigint()),\n open: v.array(v.bigint()),\n high: v.array(v.bigint()),\n low: v.array(v.bigint()),\n close: v.array(v.bigint()),\n volume: v.array(v.bigint()),\n quoteVolume: v.array(v.string()),\n referenceTsSec: v.optional(v.array(v.bigint()), []),\n referenceOpen: v.optional(v.array(v.bigint()), []),\n referenceHigh: v.optional(v.array(v.bigint()), []),\n referenceLow: v.optional(v.array(v.bigint()), []),\n referenceClose: v.optional(v.array(v.bigint()), []),\n referenceVolume: v.optional(v.array(v.bigint()), []),\n nextPageToken: v.optional(v.string(), \"\"),\n});\n\nfunction scaledArrayToDecimal(values: bigint[], scale: number): string[] {\n return values.map((value) => scaledToDecimalOutput(value, scale));\n}\n\nexport function createCandleColumnarSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const referencePriceScale = scales.referencePrice(d.symbolId);\n const volumeScale = scales.marketDataVolume(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n const hasReference = referenceTsSec.length > 0;\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n time: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n quoteVolume: d.quoteVolume,\n nextPageToken: d.nextPageToken,\n reference: hasReference\n ? {\n time: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.referenceOpen ?? [], referencePriceScale),\n high: scaledArrayToDecimal(d.referenceHigh ?? [], referencePriceScale),\n low: scaledArrayToDecimal(d.referenceLow ?? [], referencePriceScale),\n close: scaledArrayToDecimal(d.referenceClose ?? [], referencePriceScale),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport function createCandleColumnarIntSchema(scales: SdkScales) {\n return v.pipe(\n CandleColumnarRawSchema,\n v.transform((d) => {\n const priceScale = scales.price();\n const referencePriceScale = scales.referencePrice(d.symbolId);\n const volumeScale = scales.marketDataVolume(d.symbolId);\n const referenceTsSec = d.referenceTsSec ?? [];\n return {\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n tsSec: d.tsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(d.open, priceScale),\n high: scaledArrayToDecimal(d.high, priceScale),\n low: scaledArrayToDecimal(d.low, priceScale),\n close: scaledArrayToDecimal(d.close, priceScale),\n volume: scaledArrayToDecimal(d.volume, volumeScale),\n quoteVolume: d.quoteVolume,\n nextPageToken: d.nextPageToken,\n reference:\n referenceTsSec.length > 0\n ? {\n tsSec: referenceTsSec.map((t) => Number(t)),\n open: scaledArrayToDecimal(\n d.referenceOpen ?? [],\n referencePriceScale,\n ),\n high: scaledArrayToDecimal(\n d.referenceHigh ?? [],\n referencePriceScale,\n ),\n low: scaledArrayToDecimal(d.referenceLow ?? [], referencePriceScale),\n close: scaledArrayToDecimal(\n d.referenceClose ?? [],\n referencePriceScale,\n ),\n volume: scaledArrayToDecimal(d.referenceVolume ?? [], volumeScale),\n }\n : null,\n };\n }),\n );\n}\n\nexport type Candle = v.InferOutput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleInput = v.InferInput<ReturnType<typeof createCandleRowSchema>>;\nexport type CandleIntInput = v.InferInput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleInt = v.InferOutput<ReturnType<typeof createCandleRowIntSchema>>;\nexport type CandleColumnar = v.InferOutput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarInput = v.InferInput<ReturnType<typeof createCandleColumnarSchema>>;\nexport type CandleColumnarIntInput = v.InferInput<ReturnType<typeof createCandleColumnarIntSchema>>;\nexport type CandleColumnarInt = v.InferOutput<ReturnType<typeof createCandleColumnarIntSchema>>;\n\nexport const ListCandlesInputSchema = v.pipe(\n v.object({\n symbolId: SymbolIdInputSchema,\n timeframe: TimeframeInputSchema,\n limit: OptionalPositiveNumberSchema,\n includeIncomplete: v.optional(v.boolean(), false),\n includeReference: OptionalBooleanSchema,\n startTsSec: OptionalTimestampSecondsInputSchema,\n endTsSec: OptionalTimestampSecondsInputSchema,\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.transform((d) => ({\n symbolId: d.symbolId,\n timeframe: d.timeframe,\n limit: d.limit,\n includeIncomplete: d.includeIncomplete,\n includeReference: d.includeReference,\n startTime: d.startTsSec != null ? timestampFromTsSec(d.startTsSec) : undefined,\n endTime: d.endTsSec != null ? timestampFromTsSec(d.endTsSec) : undefined,\n pageToken: d.pageToken,\n })),\n);\n\nexport function createListCandlesInputSchema() {\n return ListCandlesInputSchema;\n}\n\nexport type GetCandlesInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\nexport const createGetCandlesColumnsInputSchema = createListCandlesInputSchema;\nexport type GetCandlesColumnsInput = v.InferInput<ReturnType<typeof createListCandlesInputSchema>>;\n"],"mappings":";;;;;;;AASA,MAAa,kBAAkB,EAAE,SAAS,UAAU;AAIpD,SAAS,mBAAmB,OAAuC;CAC/D,OAAO,UAAU,eAAe,eAAe,KAAK;AACxD;AAEA,MAAM,uBAAuB,EAAE,KAC3B,iBACA,EAAE,WAAW,UAAU,eAAe,aAAa,MAAM,CAC7D;AAEA,MAAM,+BAA+B,EAAE,SACnC,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,QAAQ,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,SAAS,GAAM,CAAC,CACpE;AAEA,MAAM,wBAAwB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;AAI3D,SAAS,mBAAmB,OAA8B;CACtD,OAAO;EAAE,SAAS;EAAO,OAAO;CAAE;AACtC;AAE2B,EAAE,OAAO;CAChC,UAAU,EAAE,OAAO;CACnB,WAAW,EAAE,KACT,EAAE,OAAO,GACT,EAAE,WAAW,MAAM,mBAAmB,CAAC,CAAC,CAC5C;CACA,OAAO,EAAE,OAAO;CAChB,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,KAAK,EAAE,OAAO;CACd,OAAO,EAAE,OAAO;CAChB,QAAQ,EAAE,OAAO;CACjB,aAAa,EAAE,OAAO;CACtB,UAAU,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;AAC3C,CAAC;AAED,SAAS,YAAY,QAAmB,MAAgD;CACpF,MAAM,aAAa,OAAO,MAAM;CAChC,OAAO;EACH,UAAU,KAAK;EACf,WAAW,KAAK;EAChB,MAAM,OAAO,KAAK,KAAK;EACvB,MAAM,sBAAsB,KAAK,MAAM,UAAU;EACjD,MAAM,sBAAsB,KAAK,MAAM,UAAU;EACjD,KAAK,sBAAsB,KAAK,KAAK,UAAU;EAC/C,OAAO,sBAAsB,KAAK,OAAO,UAAU;EACnD,QAAQ,sBAAsB,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AG,KAAK;CAChD,kBAAkB;CAClB,YAAY;CACZ,UAAU;CACV,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;AAC1D,CAAC,GACD,EAAE,WAAW,OAAO;CAChB,UAAU,EAAE;CACZ,WAAW,EAAE;CACb,OAAO,EAAE;CACT,mBAAmB,EAAE;CACrB,kBAAkB,EAAE;CACpB,WAAW,EAAE,cAAc,OAAO,mBAAmB,EAAE,UAAU,IAAI,KAAA;CACrE,SAAS,EAAE,YAAY,OAAO,mBAAmB,EAAE,QAAQ,IAAI,KAAA;CAC/D,WAAW,EAAE;AACjB,EAAE,CACN"}
|
|
@@ -31,7 +31,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
|
|
|
31
31
|
}, undefined>, v.CheckAction<{
|
|
32
32
|
categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
|
|
33
33
|
actionRequired?: boolean | undefined;
|
|
34
|
-
surfaces: ("trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
34
|
+
surfaces: ("rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
35
35
|
audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
|
|
36
36
|
startTime?: number | undefined;
|
|
37
37
|
endTime?: number | undefined;
|
|
@@ -42,7 +42,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
|
|
|
42
42
|
}, "endTime: must be after startTime">, v.TransformAction<{
|
|
43
43
|
categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
|
|
44
44
|
actionRequired?: boolean | undefined;
|
|
45
|
-
surfaces: ("trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
45
|
+
surfaces: ("rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
46
46
|
audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
|
|
47
47
|
startTime?: number | undefined;
|
|
48
48
|
endTime?: number | undefined;
|
|
@@ -73,14 +73,14 @@ declare const ChangelogChangeSchema: v.ObjectSchema<{
|
|
|
73
73
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
74
74
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
75
75
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
76
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
76
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
77
77
|
}, undefined>;
|
|
78
78
|
type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;
|
|
79
79
|
/** `surface` is the product area the section covers, `"unspecified"` when it spans several. */
|
|
80
80
|
declare const ChangelogSectionSchema: v.ObjectSchema<{
|
|
81
81
|
readonly heading: v.StringSchema<undefined>;
|
|
82
82
|
readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
83
|
-
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
83
|
+
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
|
|
84
84
|
readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
85
85
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
86
86
|
readonly title: v.StringSchema<undefined>;
|
|
@@ -90,7 +90,7 @@ declare const ChangelogSectionSchema: v.ObjectSchema<{
|
|
|
90
90
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
91
91
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
92
92
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
93
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
93
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
94
94
|
}, undefined>, undefined>, readonly []>;
|
|
95
95
|
}, undefined>;
|
|
96
96
|
type ChangelogSection = v.InferOutput<typeof ChangelogSectionSchema>;
|
|
@@ -179,7 +179,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
179
179
|
readonly sections: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
180
180
|
readonly heading: v.StringSchema<undefined>;
|
|
181
181
|
readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
182
|
-
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
182
|
+
readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
|
|
183
183
|
readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
184
184
|
readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
|
|
185
185
|
readonly title: v.StringSchema<undefined>;
|
|
@@ -189,7 +189,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
189
189
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
190
190
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
191
191
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
192
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
192
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
193
193
|
}, undefined>, undefined>, readonly []>;
|
|
194
194
|
}, undefined>, undefined>, readonly []>;
|
|
195
195
|
}, undefined>, v.TransformAction<{
|
|
@@ -209,7 +209,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
209
209
|
sections: {
|
|
210
210
|
heading: string;
|
|
211
211
|
summary?: string | undefined;
|
|
212
|
-
surface: "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
212
|
+
surface: "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
|
|
213
213
|
changes: {
|
|
214
214
|
id: string;
|
|
215
215
|
title: string;
|
|
@@ -219,14 +219,14 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
219
219
|
actionRequired: boolean;
|
|
220
220
|
migrationGuidance?: string | undefined;
|
|
221
221
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
222
|
-
surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
222
|
+
surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
223
223
|
}[];
|
|
224
224
|
}[];
|
|
225
225
|
}, {
|
|
226
226
|
sections: {
|
|
227
227
|
heading: string;
|
|
228
228
|
summary?: string | undefined;
|
|
229
|
-
surface: "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
229
|
+
surface: "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
|
|
230
230
|
changes: {
|
|
231
231
|
id: string;
|
|
232
232
|
title: string;
|
|
@@ -236,7 +236,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
|
236
236
|
actionRequired: boolean;
|
|
237
237
|
migrationGuidance?: string | undefined;
|
|
238
238
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
239
|
-
surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
239
|
+
surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
240
240
|
}[];
|
|
241
241
|
}[];
|
|
242
242
|
slug: string;
|
|
@@ -262,7 +262,7 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
262
262
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
263
263
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
264
264
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
265
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
265
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
266
266
|
}, undefined>;
|
|
267
267
|
readonly postSlug: v.StringSchema<undefined>;
|
|
268
268
|
readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -283,7 +283,7 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
283
283
|
actionRequired: boolean;
|
|
284
284
|
migrationGuidance?: string | undefined;
|
|
285
285
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
286
|
-
surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
286
|
+
surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
287
287
|
};
|
|
288
288
|
postSlug: string;
|
|
289
289
|
publishedAt: number;
|
|
@@ -300,7 +300,7 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
|
|
|
300
300
|
actionRequired: boolean;
|
|
301
301
|
migrationGuidance?: string | undefined;
|
|
302
302
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
303
|
-
surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
303
|
+
surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
304
304
|
}>]>;
|
|
305
305
|
/** A change with the slug, publication time and section heading of the post that announced it. */
|
|
306
306
|
type ChangelogChangeEntry = v.InferOutput<typeof ChangelogChangeEntrySchema>;
|
|
@@ -315,7 +315,7 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
315
315
|
readonly actionRequired: v.BooleanSchema<undefined>;
|
|
316
316
|
readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
317
317
|
readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
|
|
318
|
-
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
318
|
+
readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
|
|
319
319
|
}, undefined>;
|
|
320
320
|
readonly postSlug: v.StringSchema<undefined>;
|
|
321
321
|
readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
@@ -336,7 +336,7 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
336
336
|
actionRequired: boolean;
|
|
337
337
|
migrationGuidance?: string | undefined;
|
|
338
338
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
339
|
-
surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
339
|
+
surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
340
340
|
};
|
|
341
341
|
postSlug: string;
|
|
342
342
|
publishedAt: number;
|
|
@@ -353,7 +353,7 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
|
|
|
353
353
|
actionRequired: boolean;
|
|
354
354
|
migrationGuidance?: string | undefined;
|
|
355
355
|
audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
|
|
356
|
-
surfaces: ("unspecified" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap"
|
|
356
|
+
surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
|
|
357
357
|
}>]>, undefined>, readonly []>;
|
|
358
358
|
readonly nextPageToken: v.StringSchema<undefined>;
|
|
359
359
|
}, undefined>;
|
|
@@ -49,7 +49,7 @@ declare const CheckpointBiggestTradeSchema: v.SchemaWithPipe<readonly [v.ObjectS
|
|
|
49
49
|
side: number;
|
|
50
50
|
at: number;
|
|
51
51
|
}, {
|
|
52
|
-
side: "
|
|
52
|
+
side: "unspecified" | "buy" | "sell";
|
|
53
53
|
symbolId: number;
|
|
54
54
|
symbol: string;
|
|
55
55
|
at: number;
|
|
@@ -229,7 +229,7 @@ declare const CheckpointSchema: v.ObjectSchema<{
|
|
|
229
229
|
side: number;
|
|
230
230
|
at: number;
|
|
231
231
|
}, {
|
|
232
|
-
side: "
|
|
232
|
+
side: "unspecified" | "buy" | "sell";
|
|
233
233
|
symbolId: number;
|
|
234
234
|
symbol: string;
|
|
235
235
|
at: number;
|
|
@@ -13,8 +13,8 @@ type TimestampInit = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
15
15
|
readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
|
|
16
|
-
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"
|
|
17
|
-
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 | 500 | 1000 |
|
|
16
|
+
readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
|
|
17
|
+
readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 | 500 | 1000 | 200 | 50, HeatmapDepth>]>;
|
|
18
18
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
|
|
19
19
|
readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
|
|
20
20
|
readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
|
|
@@ -122,7 +122,7 @@ declare function convertHeatmapDeltaBucket(bucket: OrderbookHeatmapDeltaBucketRa
|
|
|
122
122
|
type OrderbookHeatmapDeltaBucket = ReturnType<typeof convertHeatmapDeltaBucket>;
|
|
123
123
|
declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
124
124
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
125
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
125
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
126
126
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
127
127
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
128
128
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -142,7 +142,7 @@ declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{
|
|
|
142
142
|
type OrderbookHeatmapLiveBucketRaw = v.InferOutput<typeof OrderbookHeatmapLiveBucketRawSchema>;
|
|
143
143
|
declare function convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales): {
|
|
144
144
|
symbolId: number;
|
|
145
|
-
interval: DecodedEnum<"
|
|
145
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
146
146
|
tsSec: number;
|
|
147
147
|
isFinal: boolean;
|
|
148
148
|
bids: {
|
|
@@ -226,8 +226,8 @@ declare function convertHeatmapDeltaChain(chain: OrderbookHeatmapDeltaChainRaw,
|
|
|
226
226
|
type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
|
|
227
227
|
declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
228
228
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
229
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
230
|
-
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 |
|
|
229
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
230
|
+
readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 | 200 | 50>]>;
|
|
231
231
|
readonly chain: v.OptionalSchema<v.ObjectSchema<{
|
|
232
232
|
readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
|
|
233
233
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
@@ -267,7 +267,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
267
267
|
readonly quantityMode: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"close" | "peak">>]>;
|
|
268
268
|
readonly liveBucket: v.OptionalSchema<v.ObjectSchema<{
|
|
269
269
|
readonly symbolId: v.NumberSchema<undefined>;
|
|
270
|
-
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"
|
|
270
|
+
readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
|
|
271
271
|
readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
|
|
272
272
|
readonly isFinal: v.BooleanSchema<undefined>;
|
|
273
273
|
readonly bids: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -286,8 +286,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
286
286
|
}, undefined>, undefined>;
|
|
287
287
|
}, undefined>, v.TransformAction<{
|
|
288
288
|
symbolId: number;
|
|
289
|
-
interval: DecodedEnum<"
|
|
290
|
-
depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 |
|
|
289
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
290
|
+
depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 | 200 | 50;
|
|
291
291
|
chain?: {
|
|
292
292
|
baseKeyframe?: {
|
|
293
293
|
tsSec: number;
|
|
@@ -327,7 +327,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
327
327
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
328
328
|
liveBucket?: {
|
|
329
329
|
symbolId: number;
|
|
330
|
-
interval: DecodedEnum<"
|
|
330
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
331
331
|
tsSec: number;
|
|
332
332
|
isFinal: boolean;
|
|
333
333
|
bids?: {
|
|
@@ -346,8 +346,8 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
346
346
|
} | undefined;
|
|
347
347
|
}, {
|
|
348
348
|
symbolId: number;
|
|
349
|
-
interval: DecodedEnum<"
|
|
350
|
-
depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 |
|
|
349
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
350
|
+
depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 1000 | 200 | 50;
|
|
351
351
|
chain: {
|
|
352
352
|
baseKeyframe: {
|
|
353
353
|
tsSec: number;
|
|
@@ -387,7 +387,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
|
|
|
387
387
|
quantityMode: DecodedEnum<"close" | "peak">;
|
|
388
388
|
liveBucket: {
|
|
389
389
|
symbolId: number;
|
|
390
|
-
interval: DecodedEnum<"
|
|
390
|
+
interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
|
|
391
391
|
tsSec: number;
|
|
392
392
|
isFinal: boolean;
|
|
393
393
|
bids: {
|