import { HeatmapDepth, HeatmapInterval, HeatmapQuantityMode } from "../../gen/marketdata/v1/heatmap_pb.js"; import { DecodedEnum } from "../../utils/types.js"; import { SdkScales } from "../../shared/decimal-surface.js"; import * as v from "valibot"; //#region src/services/heatmap/heatmap.schemas.d.ts type HeatmapTimeRangeInit = { startTime?: TimestampInit; endTime?: TimestampInit; }; type TimestampInit = { seconds: bigint; nanos: number; }; declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly interval: v.SchemaWithPipe, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>; readonly depth: v.SchemaWithPipe, 50>, v.TransformAction<1 | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50, HeatmapDepth>]>; readonly quantityMode: v.SchemaWithPipe, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>; readonly limit: v.SchemaWithPipe, v.IntegerAction, v.GtValueAction, v.MaxValueAction]>; readonly startTsSec: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction, v.TransformAction]>, undefined>; readonly endTsSec: v.OptionalSchema, v.IntegerAction, v.MinValueAction, v.MaxValueAction, v.TransformAction]>, undefined>; readonly pageToken: v.OptionalSchema, v.TrimAction]>, "">; }, undefined>, v.CheckAction<{ symbolId: number; interval: HeatmapInterval; depth: HeatmapDepth; quantityMode: HeatmapQuantityMode; limit: number; startTsSec?: bigint | undefined; endTsSec?: bigint | undefined; pageToken: string; }, "pageToken, startTsSec, or endTsSec is required">, v.TransformAction<{ symbolId: number; interval: HeatmapInterval; depth: HeatmapDepth; quantityMode: HeatmapQuantityMode; limit: number; startTsSec?: bigint | undefined; endTsSec?: bigint | undefined; pageToken: string; }, { symbolId: number; interval: HeatmapInterval; depth: HeatmapDepth; quantityMode: HeatmapQuantityMode; limit: number; pageToken: string; timeRange: HeatmapTimeRangeInit | undefined; }>]>; declare const OrderbookHeatmapLevelsRawSchema: v.ObjectSchema<{ readonly priceTicks: v.ArraySchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>; type OrderbookHeatmapLevelsRaw = v.InferOutput; declare function convertHeatmapLevels(levels: OrderbookHeatmapLevelsRaw, priceScale: number, qtyScale: number): { price: string[]; qty: string[]; }; type OrderbookHeatmapLevels = ReturnType; type OrderbookHeatmapDeltaLevels = OrderbookHeatmapLevels; declare const OrderbookHeatmapKeyframeRawSchema: v.ObjectSchema<{ readonly tsSec: v.SchemaWithPipe, v.TransformAction]>; readonly bestBidTicks: v.BigintSchema; readonly bestAskTicks: v.BigintSchema; readonly midTicks: v.BigintSchema; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly bookSeq: v.SchemaWithPipe, v.TransformAction]>; }, undefined>; type OrderbookHeatmapKeyframeRaw = v.InferOutput; declare function convertHeatmapKeyframe(keyframe: OrderbookHeatmapKeyframeRaw, priceScale: number, qtyScale: number): { tsSec: number; bestBid: string; bestAsk: string; mid: string; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; bookSeq: string; }; type OrderbookHeatmapKeyframe = ReturnType; declare const OrderbookHeatmapDeltaBucketRawSchema: v.ObjectSchema<{ readonly tsSec: v.SchemaWithPipe, v.TransformAction]>; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly updatesInBucket: v.NumberSchema; readonly bookSeqStart: v.SchemaWithPipe, v.TransformAction]>; readonly bookSeqEnd: v.SchemaWithPipe, v.TransformAction]>; }, undefined>; type OrderbookHeatmapDeltaBucketRaw = v.InferOutput; declare function convertHeatmapDeltaBucket(bucket: OrderbookHeatmapDeltaBucketRaw, priceScale: number, qtyScale: number): { tsSec: number; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; updatesInBucket: number; bookSeqStart: string; bookSeqEnd: string; }; type OrderbookHeatmapDeltaBucket = ReturnType; declare const OrderbookHeatmapLiveBucketRawSchema: v.ObjectSchema<{ readonly symbolId: v.NumberSchema; readonly interval: v.SchemaWithPipe, v.TransformAction>]>; readonly tsSec: v.SchemaWithPipe, v.TransformAction]>; readonly isFinal: v.BooleanSchema; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly updatesInBucket: v.NumberSchema; readonly bookSeqStart: v.SchemaWithPipe, v.TransformAction]>; readonly bookSeqEnd: v.SchemaWithPipe, v.TransformAction]>; readonly quantityMode: v.SchemaWithPipe, v.TransformAction>]>; readonly effectiveBinTicks: v.BigintSchema; }, undefined>; type OrderbookHeatmapLiveBucketRaw = v.InferOutput; declare function convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales): { symbolId: number; interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">; tsSec: number; isFinal: boolean; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; updatesInBucket: number; bookSeqStart: string; bookSeqEnd: string; quantityMode: DecodedEnum<"close" | "peak">; effectiveBinSize: string; }; type OrderbookHeatmapLiveBucket = ReturnType; declare const OrderbookHeatmapDeltaChainRawSchema: v.ObjectSchema<{ readonly baseKeyframe: v.OptionalSchema, v.TransformAction]>; readonly bestBidTicks: v.BigintSchema; readonly bestAskTicks: v.BigintSchema; readonly midTicks: v.BigintSchema; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly bookSeq: v.SchemaWithPipe, v.TransformAction]>; }, undefined>, undefined>; readonly deltas: v.OptionalSchema, v.TransformAction]>; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly updatesInBucket: v.NumberSchema; readonly bookSeqStart: v.SchemaWithPipe, v.TransformAction]>; readonly bookSeqEnd: v.SchemaWithPipe, v.TransformAction]>; }, undefined>, undefined>, readonly []>; }, undefined>; type OrderbookHeatmapDeltaChainRaw = v.InferOutput; declare function convertHeatmapDeltaChain(chain: OrderbookHeatmapDeltaChainRaw, priceScale: number, qtyScale: number): { baseKeyframe: { tsSec: number; bestBid: string; bestAsk: string; mid: string; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; bookSeq: string; } | undefined; deltas: { tsSec: number; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; updatesInBucket: number; bookSeqStart: string; bookSeqEnd: string; }[]; }; type OrderbookHeatmapDeltaChain = ReturnType; declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe; readonly interval: v.SchemaWithPipe, v.TransformAction>]>; readonly depth: v.SchemaWithPipe, v.TransformAction]>; readonly chain: v.OptionalSchema, v.TransformAction]>; readonly bestBidTicks: v.BigintSchema; readonly bestAskTicks: v.BigintSchema; readonly midTicks: v.BigintSchema; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly bookSeq: v.SchemaWithPipe, v.TransformAction]>; }, undefined>, undefined>; readonly deltas: v.OptionalSchema, v.TransformAction]>; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly updatesInBucket: v.NumberSchema; readonly bookSeqStart: v.SchemaWithPipe, v.TransformAction]>; readonly bookSeqEnd: v.SchemaWithPipe, v.TransformAction]>; }, undefined>, undefined>, readonly []>; }, undefined>, undefined>; readonly lastPersistedTsSec: v.SchemaWithPipe, v.TransformAction]>; readonly liveFromBookSeqEnd: v.SchemaWithPipe, v.TransformAction]>; readonly hasLiveAnchor: v.BooleanSchema; readonly nextPageToken: v.OptionalSchema, "">; readonly serverTimeSec: v.SchemaWithPipe, v.TransformAction]>; readonly quantityMode: v.SchemaWithPipe, v.TransformAction>]>; readonly liveBucket: v.OptionalSchema; readonly interval: v.SchemaWithPipe, v.TransformAction>]>; readonly tsSec: v.SchemaWithPipe, v.TransformAction]>; readonly isFinal: v.BooleanSchema; readonly bids: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly asks: v.OptionalSchema, undefined>; readonly qtyScaled: v.ArraySchema, undefined>; }, undefined>, undefined>; readonly updatesInBucket: v.NumberSchema; readonly bookSeqStart: v.SchemaWithPipe, v.TransformAction]>; readonly bookSeqEnd: v.SchemaWithPipe, v.TransformAction]>; readonly quantityMode: v.SchemaWithPipe, v.TransformAction>]>; readonly effectiveBinTicks: v.BigintSchema; }, undefined>, undefined>; }, undefined>, v.TransformAction<{ symbolId: number; interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">; depth: 1 | "unspecified" | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50; chain?: { baseKeyframe?: { tsSec: number; bestBidTicks: bigint; bestAskTicks: bigint; midTicks: bigint; bids?: { priceTicks: bigint[]; qtyScaled: bigint[]; } | undefined; asks?: { priceTicks: bigint[]; qtyScaled: bigint[]; } | undefined; bookSeq: string; } | undefined; deltas: { tsSec: number; bids?: { priceTicks: bigint[]; qtyScaled: bigint[]; } | undefined; asks?: { priceTicks: bigint[]; qtyScaled: bigint[]; } | undefined; updatesInBucket: number; bookSeqStart: string; bookSeqEnd: string; }[]; } | undefined; lastPersistedTsSec: number; liveFromBookSeqEnd: string; hasLiveAnchor: boolean; nextPageToken: string; serverTimeSec: number; quantityMode: DecodedEnum<"close" | "peak">; liveBucket?: { symbolId: number; interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">; tsSec: number; isFinal: boolean; bids?: { priceTicks: bigint[]; qtyScaled: bigint[]; } | undefined; asks?: { priceTicks: bigint[]; qtyScaled: bigint[]; } | undefined; updatesInBucket: number; bookSeqStart: string; bookSeqEnd: string; quantityMode: DecodedEnum<"close" | "peak">; effectiveBinTicks: bigint; } | undefined; }, { symbolId: number; interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">; depth: 1 | "unspecified" | 10 | 5 | 20 | 100 | 200 | 500 | 1000 | 50; chain: { baseKeyframe: { tsSec: number; bestBid: string; bestAsk: string; mid: string; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; bookSeq: string; } | undefined; deltas: { tsSec: number; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; updatesInBucket: number; bookSeqStart: string; bookSeqEnd: string; }[]; } | undefined; lastPersistedTsSec: number; liveFromBookSeqEnd: string; hasLiveAnchor: boolean; nextPageToken: string; serverTimeSec: number; quantityMode: DecodedEnum<"close" | "peak">; liveBucket: { symbolId: number; interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">; tsSec: number; isFinal: boolean; bids: { price: string[]; qty: string[]; } | undefined; asks: { price: string[]; qty: string[]; } | undefined; updatesInBucket: number; bookSeqStart: string; bookSeqEnd: string; quantityMode: DecodedEnum<"close" | "peak">; effectiveBinSize: string; } | undefined; }>]>; type GetOrderbookHeatmapInput = v.InferInput; type OrderbookHeatmapResponse = v.InferOutput>; //#endregion export { GetOrderbookHeatmapInput, GetOrderbookHeatmapInputSchema, OrderbookHeatmapDeltaBucket, OrderbookHeatmapDeltaChain, OrderbookHeatmapDeltaLevels, OrderbookHeatmapKeyframe, OrderbookHeatmapLevels, OrderbookHeatmapLiveBucket, OrderbookHeatmapResponse, createOrderbookHeatmapResponseSchema }; //# sourceMappingURL=heatmap.schemas.d.ts.map