@lightconexyz/lightcone-sdk 0.2.2 → 0.2.3

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.
@@ -1,13 +1,21 @@
1
- import type { Resolution } from "../../shared";
1
+ import { Resolution } from "../../shared";
2
2
  import { type LightconeHttp } from "../../http";
3
3
  import type { DepositTokenPriceHistoryResponse } from "./wire";
4
4
  interface ClientContext {
5
5
  http: LightconeHttp;
6
6
  }
7
+ export interface DepositPriceHistoryQuery {
8
+ resolution?: Resolution;
9
+ from?: number;
10
+ to?: number;
11
+ cursor?: number;
12
+ limit?: number;
13
+ }
7
14
  export declare class DepositPriceClient {
8
15
  private readonly client;
9
16
  constructor(client: ClientContext);
10
- get(depositAsset: string, resolution: Resolution, from?: number, to?: number, cursor?: number, limit?: number): Promise<DepositTokenPriceHistoryResponse>;
17
+ get(depositAsset: string, resolution?: Resolution, from?: number, to?: number, cursor?: number, limit?: number): Promise<DepositTokenPriceHistoryResponse>;
18
+ get(depositAsset: string, query?: DepositPriceHistoryQuery): Promise<DepositTokenPriceHistoryResponse>;
11
19
  }
12
20
  export {};
13
21
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/domain/deposit_price/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,QAAQ,CAAC;AAE/D,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAE5C,GAAG,CACP,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,UAAU,EACtB,IAAI,CAAC,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,gCAAgC,CAAC;CAa7C"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/domain/deposit_price/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,QAAQ,CAAC;AAE/D,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAE5C,GAAG,CACP,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,UAAU,EACvB,IAAI,CAAC,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,gCAAgC,CAAC;IAEtC,GAAG,CACP,YAAY,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,wBAAwB,GAC/B,OAAO,CAAC,gCAAgC,CAAC;CAqC7C"}
@@ -1,28 +1,68 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DepositPriceClient = void 0;
4
+ const error_1 = require("../../error");
5
+ const shared_1 = require("../../shared");
4
6
  const http_1 = require("../../http");
5
7
  class DepositPriceClient {
6
8
  client;
7
9
  constructor(client) {
8
10
  this.client = client;
9
11
  }
10
- async get(depositAsset, resolution, from, to, cursor, limit) {
12
+ async get(depositAsset, resolutionOrQuery = shared_1.Resolution.Minute1, from, to, cursor, limit) {
13
+ const query = normalizeDepositPriceHistoryQuery(resolutionOrQuery, from, to, cursor, limit);
11
14
  const params = new URLSearchParams({
12
15
  deposit_asset: depositAsset,
13
- resolution,
16
+ resolution: query.resolution,
14
17
  });
15
- if (from !== undefined)
16
- params.set("from", String(from));
17
- if (to !== undefined)
18
- params.set("to", String(to));
19
- if (cursor !== undefined)
20
- params.set("cursor", String(cursor));
21
- if (limit !== undefined)
22
- params.set("limit", String(limit));
18
+ if (query.from !== undefined) {
19
+ params.set("from", String(ensureUnixMilliseconds("from", query.from)));
20
+ }
21
+ if (query.to !== undefined) {
22
+ params.set("to", String(ensureUnixMilliseconds("to", query.to)));
23
+ }
24
+ if (query.cursor !== undefined) {
25
+ params.set("cursor", String(ensureUnixMilliseconds("cursor", query.cursor)));
26
+ }
27
+ if (query.limit !== undefined) {
28
+ params.set("limit", String(ensurePageLimit(query.limit)));
29
+ }
23
30
  const url = `${this.client.http.baseUrl()}/api/price-history?${params.toString()}`;
24
31
  return this.client.http.get(url, http_1.RetryPolicy.Idempotent);
25
32
  }
26
33
  }
27
34
  exports.DepositPriceClient = DepositPriceClient;
35
+ function normalizeDepositPriceHistoryQuery(resolutionOrQuery, from, to, cursor, limit) {
36
+ if (typeof resolutionOrQuery === "string") {
37
+ return {
38
+ resolution: resolutionOrQuery,
39
+ from,
40
+ to,
41
+ cursor,
42
+ limit,
43
+ };
44
+ }
45
+ return {
46
+ resolution: resolutionOrQuery.resolution ?? shared_1.Resolution.Minute1,
47
+ from: resolutionOrQuery.from,
48
+ to: resolutionOrQuery.to,
49
+ cursor: resolutionOrQuery.cursor,
50
+ limit: resolutionOrQuery.limit,
51
+ };
52
+ }
53
+ function ensureUnixMilliseconds(name, value) {
54
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {
55
+ throw error_1.SdkError.validation(`${name} must be a non-negative Unix timestamp in milliseconds`);
56
+ }
57
+ if (value < 10_000_000_000) {
58
+ throw error_1.SdkError.validation(`${name} must be a Unix timestamp in milliseconds, not seconds`);
59
+ }
60
+ return value;
61
+ }
62
+ function ensurePageLimit(value) {
63
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value < 1 || value > 1_000) {
64
+ throw error_1.SdkError.validation("limit must be an integer between 1 and 1000");
65
+ }
66
+ return value;
67
+ }
28
68
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/domain/deposit_price/client.ts"],"names":[],"mappings":";;;AACA,qCAA6D;AAO7D,MAAa,kBAAkB;IACA;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAEtD,KAAK,CAAC,GAAG,CACP,YAAoB,EACpB,UAAsB,EACtB,IAAa,EACb,EAAW,EACX,MAAe,EACf,KAAc;QAEd,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;YACjC,aAAa,EAAE,YAAY;YAC3B,UAAU;SACX,CAAC,CAAC;QACH,IAAI,IAAI,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACzD,IAAI,EAAE,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACnD,IAAI,MAAM,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/D,IAAI,KAAK,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAE5D,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,sBAAsB,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;QACnF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAmC,GAAG,EAAE,kBAAW,CAAC,UAAU,CAAC,CAAC;IAC7F,CAAC;CACF;AAvBD,gDAuBC","sourcesContent":["import type { Resolution } from \"../../shared\";\nimport { RetryPolicy, type LightconeHttp } from \"../../http\";\nimport type { DepositTokenPriceHistoryResponse } from \"./wire\";\n\ninterface ClientContext {\n http: LightconeHttp;\n}\n\nexport class DepositPriceClient {\n constructor(private readonly client: ClientContext) {}\n\n async get(\n depositAsset: string,\n resolution: Resolution,\n from?: number,\n to?: number,\n cursor?: number,\n limit?: number\n ): Promise<DepositTokenPriceHistoryResponse> {\n const params = new URLSearchParams({\n deposit_asset: depositAsset,\n resolution,\n });\n if (from !== undefined) params.set(\"from\", String(from));\n if (to !== undefined) params.set(\"to\", String(to));\n if (cursor !== undefined) params.set(\"cursor\", String(cursor));\n if (limit !== undefined) params.set(\"limit\", String(limit));\n\n const url = `${this.client.http.baseUrl()}/api/price-history?${params.toString()}`;\n return this.client.http.get<DepositTokenPriceHistoryResponse>(url, RetryPolicy.Idempotent);\n }\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/domain/deposit_price/client.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,yCAA0C;AAC1C,qCAA6D;AAe7D,MAAa,kBAAkB;IACA;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAgBtD,KAAK,CAAC,GAAG,CACP,YAAoB,EACpB,oBAA2D,mBAAU,CAAC,OAAO,EAC7E,IAAa,EACb,EAAW,EACX,MAAe,EACf,KAAc;QAEd,MAAM,KAAK,GAAG,iCAAiC,CAC7C,iBAAiB,EACjB,IAAI,EACJ,EAAE,EACF,MAAM,EACN,KAAK,CACN,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;YACjC,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U,EAAE,iBAAiB;YAC7B,IAAI;YACJ,EAAE;YACF,MAAM;YACN,KAAK;SACN,CAAC;IACJ,CAAC;IAED,OAAO;QACL,UAAU,EAAE,iBAAiB,CAAC,UAAU,IAAI,mBAAU,CAAC,OAAO;QAC9D,IAAI,EAAE,iBAAiB,CAAC,IAAI;QAC5B,EAAE,EAAE,iBAAiB,CAAC,EAAE;QACxB,MAAM,EAAE,iBAAiB,CAAC,MAAM;QAChC,KAAK,EAAE,iBAAiB,CAAC,KAAK;KAC/B,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY,EAAE,KAAa;IACzD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACrE,MAAM,gBAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,wDAAwD,CAAC,CAAC;IAC7F,CAAC;IACD,IAAI,KAAK,GAAG,cAAc,EAAE,CAAC;QAC3B,MAAM,gBAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,wDAAwD,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,KAAK,EAAE,CAAC;QACtF,MAAM,gBAAQ,CAAC,UAAU,CAAC,6CAA6C,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { SdkError } from \"../../error\";\nimport { Resolution } from \"../../shared\";\nimport { RetryPolicy, type LightconeHttp } from \"../../http\";\nimport type { DepositTokenPriceHistoryResponse } from \"./wire\";\n\ninterface ClientContext {\n http: LightconeHttp;\n}\n\nexport interface DepositPriceHistoryQuery {\n resolution?: Resolution;\n from?: number;\n to?: number;\n cursor?: number;\n limit?: number;\n}\n\nexport class DepositPriceClient {\n constructor(private readonly client: ClientContext) {}\n\n async get(\n depositAsset: string,\n resolution?: Resolution,\n from?: number,\n to?: number,\n cursor?: number,\n limit?: number\n ): Promise<DepositTokenPriceHistoryResponse>;\n\n async get(\n depositAsset: string,\n query?: DepositPriceHistoryQuery\n ): Promise<DepositTokenPriceHistoryResponse>;\n\n async get(\n depositAsset: string,\n resolutionOrQuery: Resolution | DepositPriceHistoryQuery = Resolution.Minute1,\n from?: number,\n to?: number,\n cursor?: number,\n limit?: number\n ): Promise<DepositTokenPriceHistoryResponse> {\n const query = normalizeDepositPriceHistoryQuery(\n resolutionOrQuery,\n from,\n to,\n cursor,\n limit\n );\n const params = new URLSearchParams({\n deposit_asset: depositAsset,\n resolution: query.resolution,\n });\n if (query.from !== undefined) {\n params.set(\"from\", String(ensureUnixMilliseconds(\"from\", query.from)));\n }\n if (query.to !== undefined) {\n params.set(\"to\", String(ensureUnixMilliseconds(\"to\", query.to)));\n }\n if (query.cursor !== undefined) {\n params.set(\"cursor\", String(ensureUnixMilliseconds(\"cursor\", query.cursor)));\n }\n if (query.limit !== undefined) {\n params.set(\"limit\", String(ensurePageLimit(query.limit)));\n }\n\n const url = `${this.client.http.baseUrl()}/api/price-history?${params.toString()}`;\n return this.client.http.get<DepositTokenPriceHistoryResponse>(url, RetryPolicy.Idempotent);\n }\n}\n\nfunction normalizeDepositPriceHistoryQuery(\n resolutionOrQuery: Resolution | DepositPriceHistoryQuery,\n from?: number,\n to?: number,\n cursor?: number,\n limit?: number\n): Required<Pick<DepositPriceHistoryQuery, \"resolution\">> & Omit<DepositPriceHistoryQuery, \"resolution\"> {\n if (typeof resolutionOrQuery === \"string\") {\n return {\n resolution: resolutionOrQuery,\n from,\n to,\n cursor,\n limit,\n };\n }\n\n return {\n resolution: resolutionOrQuery.resolution ?? Resolution.Minute1,\n from: resolutionOrQuery.from,\n to: resolutionOrQuery.to,\n cursor: resolutionOrQuery.cursor,\n limit: resolutionOrQuery.limit,\n };\n}\n\nfunction ensureUnixMilliseconds(name: string, value: number): number {\n if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw SdkError.validation(`${name} must be a non-negative Unix timestamp in milliseconds`);\n }\n if (value < 10_000_000_000) {\n throw SdkError.validation(`${name} must be a Unix timestamp in milliseconds, not seconds`);\n }\n return value;\n}\n\nfunction ensurePageLimit(value: number): number {\n if (!Number.isFinite(value) || !Number.isInteger(value) || value < 1 || value > 1_000) {\n throw SdkError.validation(\"limit must be an integer between 1 and 1000\");\n }\n return value;\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import type { Resolution } from "../../shared";
1
2
  export interface DepositTokenCandle {
2
3
  t: number;
3
4
  tc: number;
@@ -6,7 +7,7 @@ export interface DepositTokenCandle {
6
7
  export interface DepositPriceSnapshot {
7
8
  event_type: "snapshot";
8
9
  deposit_asset: string;
9
- resolution: string;
10
+ resolution: Resolution;
10
11
  prices: DepositTokenCandle[];
11
12
  }
12
13
  export interface DepositPriceTick {
@@ -18,7 +19,7 @@ export interface DepositPriceTick {
18
19
  export interface DepositPriceCandleUpdate {
19
20
  event_type: "candle";
20
21
  deposit_asset: string;
21
- resolution: string;
22
+ resolution: Resolution;
22
23
  t: number;
23
24
  tc: number;
24
25
  c: string;
@@ -27,8 +28,7 @@ export type DepositPrice = DepositPriceSnapshot | DepositPriceTick | DepositPric
27
28
  export interface DepositTokenPriceHistoryResponse {
28
29
  deposit_asset: string;
29
30
  binance_symbol: string;
30
- quote_asset: string;
31
- resolution: string;
31
+ resolution: Resolution;
32
32
  prices: DepositTokenCandle[];
33
33
  next_cursor: number | null;
34
34
  has_more: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../src/domain/deposit_price/wire.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM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E,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,QAAQ,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,YAAY,GACpB,oBAAoB,GACpB,gBAAgB,GAChB,wBAAwB,CAAC;AAE7B,MAAM,WAAW,gCAAgC;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"wire.js","sourceRoot":"","sources":["../../../src/domain/deposit_price/wire.ts"],"names":[],"mappings":"","sourcesContent":["export interface DepositTokenCandle {\n t: number;\n tc: number;\n c: string;\n}\n\nexport interface DepositPriceSnapshot {\n event_type: \"snapshot\";\n deposit_asset: string;\n resolution: string;\n prices: DepositTokenCandle[];\n}\n\nexport interface DepositPriceTick {\n event_type: \"price\";\n deposit_asset: string;\n price: string;\n event_time: number;\n}\n\nexport interface DepositPriceCandleUpdate {\n event_type: \"candle\";\n deposit_asset: string;\n resolution: string;\n t: number;\n tc: number;\n c: string;\n}\n\nexport type DepositPrice =\n | DepositPriceSnapshot\n | DepositPriceTick\n | DepositPriceCandleUpdate;\n\nexport interface DepositTokenPriceHistoryResponse {\n deposit_asset: string;\n binance_symbol: string;\n quote_asset: string;\n resolution: string;\n prices: DepositTokenCandle[];\n next_cursor: number | null;\n has_more: boolean;\n}\n"]}
1
+ {"version":3,"file":"wire.js","sourceRoot":"","sources":["../../../src/domain/deposit_price/wire.ts"],"names":[],"mappings":"","sourcesContent":["import type { Resolution } from \"../../shared\";\n\nexport interface DepositTokenCandle {\n t: number;\n tc: number;\n c: string;\n}\n\nexport interface DepositPriceSnapshot {\n event_type: \"snapshot\";\n deposit_asset: string;\n resolution: Resolution;\n prices: DepositTokenCandle[];\n}\n\nexport interface DepositPriceTick {\n event_type: \"price\";\n deposit_asset: string;\n price: string;\n event_time: number;\n}\n\nexport interface DepositPriceCandleUpdate {\n event_type: \"candle\";\n deposit_asset: string;\n resolution: Resolution;\n t: number;\n tc: number;\n c: string;\n}\n\nexport type DepositPrice =\n | DepositPriceSnapshot\n | DepositPriceTick\n | DepositPriceCandleUpdate;\n\nexport interface DepositTokenPriceHistoryResponse {\n deposit_asset: string;\n binance_symbol: string;\n resolution: Resolution;\n prices: DepositTokenCandle[];\n next_cursor: number | null;\n has_more: boolean;\n}\n"]}
@@ -1,13 +1,22 @@
1
- import type { Resolution } from "../../shared";
1
+ import { Resolution } from "../../shared";
2
2
  import { type LightconeHttp } from "../../http";
3
- import type { PriceHistoryRestResponse } from "./wire";
3
+ import type { OrderbookPriceHistoryResponse } from "./wire";
4
4
  interface ClientContext {
5
5
  http: LightconeHttp;
6
6
  }
7
+ export interface OrderbookPriceHistoryQuery {
8
+ resolution?: Resolution;
9
+ from?: number;
10
+ to?: number;
11
+ cursor?: number;
12
+ limit?: number;
13
+ includeOhlcv?: boolean;
14
+ }
7
15
  export declare class PriceHistoryClient {
8
16
  private readonly client;
9
17
  constructor(client: ClientContext);
10
- get(orderbookId: string, resolution: Resolution, from?: number, to?: number): Promise<PriceHistoryRestResponse>;
18
+ get(orderbookId: string, resolution?: Resolution, from?: number, to?: number): Promise<OrderbookPriceHistoryResponse>;
19
+ get(orderbookId: string, query?: OrderbookPriceHistoryQuery): Promise<OrderbookPriceHistoryResponse>;
11
20
  }
12
21
  export {};
13
22
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/domain/price_history/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAEvD,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAG5C,GAAG,CACP,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,EACtB,IAAI,CAAC,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,wBAAwB,CAAC;CAWrC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/domain/price_history/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,QAAQ,CAAC;AAE5D,UAAU,aAAa;IACrB,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAE5C,GAAG,CACP,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,UAAU,EACvB,IAAI,CAAC,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,6BAA6B,CAAC;IAEnC,GAAG,CACP,WAAW,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,0BAA0B,GACjC,OAAO,CAAC,6BAA6B,CAAC;CAiC1C"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PriceHistoryClient = void 0;
4
4
  const error_1 = require("../../error");
5
+ const shared_1 = require("../../shared");
5
6
  const http_1 = require("../../http");
6
7
  class PriceHistoryClient {
7
8
  client;
@@ -9,20 +10,49 @@ class PriceHistoryClient {
9
10
  this.client = client;
10
11
  }
11
12
  // `from`/`to` are Unix timestamps in milliseconds.
12
- async get(orderbookId, resolution, from, to) {
13
+ async get(orderbookId, resolutionOrQuery = shared_1.Resolution.Minute1, from, to) {
14
+ const query = normalizeOrderbookPriceHistoryQuery(resolutionOrQuery, from, to);
13
15
  const params = new URLSearchParams({
14
16
  orderbook_id: orderbookId,
15
- resolution,
17
+ resolution: query.resolution,
16
18
  });
17
- if (from !== undefined)
18
- params.set("from", String(ensureUnixMilliseconds("from", from)));
19
- if (to !== undefined)
20
- params.set("to", String(ensureUnixMilliseconds("to", to)));
19
+ if (query.from !== undefined) {
20
+ params.set("from", String(ensureUnixMilliseconds("from", query.from)));
21
+ }
22
+ if (query.to !== undefined) {
23
+ params.set("to", String(ensureUnixMilliseconds("to", query.to)));
24
+ }
25
+ if (query.cursor !== undefined) {
26
+ params.set("cursor", String(ensureUnixMilliseconds("cursor", query.cursor)));
27
+ }
28
+ if (query.limit !== undefined) {
29
+ params.set("limit", String(ensurePageLimit(query.limit)));
30
+ }
31
+ if (query.includeOhlcv !== undefined) {
32
+ params.set("include_ohlcv", String(query.includeOhlcv));
33
+ }
21
34
  const url = `${this.client.http.baseUrl()}/api/price-history?${params.toString()}`;
22
35
  return this.client.http.get(url, http_1.RetryPolicy.Idempotent);
23
36
  }
24
37
  }
25
38
  exports.PriceHistoryClient = PriceHistoryClient;
39
+ function normalizeOrderbookPriceHistoryQuery(resolutionOrQuery, from, to) {
40
+ if (typeof resolutionOrQuery === "string") {
41
+ return {
42
+ resolution: resolutionOrQuery,
43
+ from,
44
+ to,
45
+ };
46
+ }
47
+ return {
48
+ resolution: resolutionOrQuery.resolution ?? shared_1.Resolution.Minute1,
49
+ from: resolutionOrQuery.from,
50
+ to: resolutionOrQuery.to,
51
+ cursor: resolutionOrQuery.cursor,
52
+ limit: resolutionOrQuery.limit,
53
+ includeOhlcv: resolutionOrQuery.includeOhlcv,
54
+ };
55
+ }
26
56
  function ensureUnixMilliseconds(name, value) {
27
57
  if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {
28
58
  throw error_1.SdkError.validation(`${name} must be a non-negative Unix timestamp in milliseconds`);
@@ -32,4 +62,10 @@ function ensureUnixMilliseconds(name, value) {
32
62
  }
33
63
  return value;
34
64
  }
65
+ function ensurePageLimit(value) {
66
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value < 1 || value > 1_000) {
67
+ throw error_1.SdkError.validation("limit must be an integer between 1 and 1000");
68
+ }
69
+ return value;
70
+ }
35
71
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/domain/price_history/client.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAEvC,qCAA6D;AAO7D,MAAa,kBAAkB;IACA;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAEtD,mDAAmD;IACnD,KAAK,CAAC,GAAG,CACP,WAAmB,EACnB,UAAsB,EACtB,IAAa,EACb,EAAW;QAEX,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;YACjC,YAAY,EAAE,WAAW;YACzB,UAAU;SACX,CAAC,CAAC;QACH,IAAI,IAAI,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACzF,IAAI,EAAE,KAAK,SAAS;YAAE,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,sBAAsB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAEjF,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,sBAAsB,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;QACnF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAA2B,GAAG,EAAE,kBAAW,CAAC,UAAU,CAAC,CAAC;IACrF,CAAC;CACF;AApBD,gDAoBC;AAED,SAAS,sBAAsB,CAAC,IAAY,EAAE,KAAa;IACzD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACrE,MAAM,gBAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,wDAAwD,CAAC,CAAC;IAC7F,CAAC;IACD,IAAI,KAAK,GAAG,cAAc,EAAE,CAAC;QAC3B,MAAM,gBAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,wDAAwD,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { SdkError } from \"../../error\";\nimport type { Resolution } from \"../../shared\";\nimport { RetryPolicy, type LightconeHttp } from \"../../http\";\nimport type { PriceHistoryRestResponse } from \"./wire\";\n\ninterface ClientContext {\n http: LightconeHttp;\n}\n\nexport class PriceHistoryClient {\n constructor(private readonly client: ClientContext) {}\n\n // `from`/`to` are Unix timestamps in milliseconds.\n async get(\n orderbookId: string,\n resolution: Resolution,\n from?: number,\n to?: number\n ): Promise<PriceHistoryRestResponse> {\n const params = new URLSearchParams({\n orderbook_id: orderbookId,\n resolution,\n });\n if (from !== undefined) params.set(\"from\", String(ensureUnixMilliseconds(\"from\", from)));\n if (to !== undefined) params.set(\"to\", String(ensureUnixMilliseconds(\"to\", to)));\n\n const url = `${this.client.http.baseUrl()}/api/price-history?${params.toString()}`;\n return this.client.http.get<PriceHistoryRestResponse>(url, RetryPolicy.Idempotent);\n }\n}\n\nfunction ensureUnixMilliseconds(name: string, value: number): number {\n if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw SdkError.validation(`${name} must be a non-negative Unix timestamp in milliseconds`);\n }\n if (value < 10_000_000_000) {\n throw SdkError.validation(`${name} must be a Unix timestamp in milliseconds, not seconds`);\n }\n return value;\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/domain/price_history/client.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,yCAA0C;AAC1C,qCAA6D;AAgB7D,MAAa,kBAAkB;IACA;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IActD,mDAAmD;IACnD,KAAK,CAAC,GAAG,CACP,WAAmB,EACnB,oBAA6D,mBAAU,CAAC,OAAO,EAC/E,IAAa,EACb,EAAW;QAEX,MAAM,KAAK,GAAG,mCAAmC,CAAC,iBAAiB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAC/E,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;YACjC,YAAY,EAAE,WAAW;YACzB,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC,CAAC;QACH,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,sBAAsB,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IACJ,CAAC;IAED,OAAO;QACL,UAAU,EAAE,iBAAiB,CAAC,UAAU,IAAI,mBAAU,CAAC,OAAO;QAC9D,IAAI,EAAE,iBAAiB,CAAC,IAAI;QAC5B,EAAE,EAAE,iBAAiB,CAAC,EAAE;QACxB,MAAM,EAAE,iBAAiB,CAAC,MAAM;QAChC,KAAK,EAAE,iBAAiB,CAAC,KAAK;QAC9B,YAAY,EAAE,iBAAiB,CAAC,YAAY;KAC7C,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY,EAAE,KAAa;IACzD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACrE,MAAM,gBAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,wDAAwD,CAAC,CAAC;IAC7F,CAAC;IACD,IAAI,KAAK,GAAG,cAAc,EAAE,CAAC;QAC3B,MAAM,gBAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,wDAAwD,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,KAAK,EAAE,CAAC;QACtF,MAAM,gBAAQ,CAAC,UAAU,CAAC,6CAA6C,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { SdkError } from \"../../error\";\nimport { Resolution } from \"../../shared\";\nimport { RetryPolicy, type LightconeHttp } from \"../../http\";\nimport type { OrderbookPriceHistoryResponse } from \"./wire\";\n\ninterface ClientContext {\n http: LightconeHttp;\n}\n\nexport interface OrderbookPriceHistoryQuery {\n resolution?: Resolution;\n from?: number;\n to?: number;\n cursor?: number;\n limit?: number;\n includeOhlcv?: boolean;\n}\n\nexport class PriceHistoryClient {\n constructor(private readonly client: ClientContext) {}\n\n async get(\n orderbookId: string,\n resolution?: Resolution,\n from?: number,\n to?: number\n ): Promise<OrderbookPriceHistoryResponse>;\n\n async get(\n orderbookId: string,\n query?: OrderbookPriceHistoryQuery\n ): Promise<OrderbookPriceHistoryResponse>;\n\n // `from`/`to` are Unix timestamps in milliseconds.\n async get(\n orderbookId: string,\n resolutionOrQuery: Resolution | OrderbookPriceHistoryQuery = Resolution.Minute1,\n from?: number,\n to?: number\n ): Promise<OrderbookPriceHistoryResponse> {\n const query = normalizeOrderbookPriceHistoryQuery(resolutionOrQuery, from, to);\n const params = new URLSearchParams({\n orderbook_id: orderbookId,\n resolution: query.resolution,\n });\n if (query.from !== undefined) {\n params.set(\"from\", String(ensureUnixMilliseconds(\"from\", query.from)));\n }\n if (query.to !== undefined) {\n params.set(\"to\", String(ensureUnixMilliseconds(\"to\", query.to)));\n }\n if (query.cursor !== undefined) {\n params.set(\"cursor\", String(ensureUnixMilliseconds(\"cursor\", query.cursor)));\n }\n if (query.limit !== undefined) {\n params.set(\"limit\", String(ensurePageLimit(query.limit)));\n }\n if (query.includeOhlcv !== undefined) {\n params.set(\"include_ohlcv\", String(query.includeOhlcv));\n }\n\n const url = `${this.client.http.baseUrl()}/api/price-history?${params.toString()}`;\n return this.client.http.get<OrderbookPriceHistoryResponse>(url, RetryPolicy.Idempotent);\n }\n}\n\nfunction normalizeOrderbookPriceHistoryQuery(\n resolutionOrQuery: Resolution | OrderbookPriceHistoryQuery,\n from?: number,\n to?: number\n): Required<Pick<OrderbookPriceHistoryQuery, \"resolution\">> & Omit<OrderbookPriceHistoryQuery, \"resolution\"> {\n if (typeof resolutionOrQuery === \"string\") {\n return {\n resolution: resolutionOrQuery,\n from,\n to,\n };\n }\n\n return {\n resolution: resolutionOrQuery.resolution ?? Resolution.Minute1,\n from: resolutionOrQuery.from,\n to: resolutionOrQuery.to,\n cursor: resolutionOrQuery.cursor,\n limit: resolutionOrQuery.limit,\n includeOhlcv: resolutionOrQuery.includeOhlcv,\n };\n}\n\nfunction ensureUnixMilliseconds(name: string, value: number): number {\n if (!Number.isFinite(value) || !Number.isInteger(value) || value < 0) {\n throw SdkError.validation(`${name} must be a non-negative Unix timestamp in milliseconds`);\n }\n if (value < 10_000_000_000) {\n throw SdkError.validation(`${name} must be a Unix timestamp in milliseconds, not seconds`);\n }\n return value;\n}\n\nfunction ensurePageLimit(value: number): number {\n if (!Number.isFinite(value) || !Number.isInteger(value) || value < 1 || value > 1_000) {\n throw SdkError.validation(\"limit must be an integer between 1 and 1000\");\n }\n return value;\n}\n"]}
@@ -1,15 +1,18 @@
1
1
  import type { OrderBookId, Resolution } from "../../shared";
2
- export interface PriceCandle {
2
+ export interface MidpointPriceCandle {
3
3
  t: number;
4
- m?: string;
5
- o?: string;
6
- h?: string;
7
- l?: string;
8
- c?: string;
9
- v?: string;
10
- bb?: string;
11
- ba?: string;
4
+ m: string | null;
12
5
  }
6
+ export interface OhlcvPriceCandle extends MidpointPriceCandle {
7
+ o: string | null;
8
+ h: string | null;
9
+ l: string | null;
10
+ c: string | null;
11
+ v: string;
12
+ bb: string | null;
13
+ ba: string | null;
14
+ }
15
+ export type PriceCandle = MidpointPriceCandle | OhlcvPriceCandle;
13
16
  export interface PriceHistorySnapshot {
14
17
  orderbook_id: OrderBookId;
15
18
  resolution: Resolution;
@@ -42,11 +45,10 @@ export type PriceHistory = ({
42
45
  } & PriceHistoryUpdate) | ({
43
46
  event_type: "heartbeat";
44
47
  } & PriceHistoryHeartbeat);
45
- export interface PriceHistoryRestResponse {
48
+ interface OrderbookPriceHistoryResponseBase<TCandle extends PriceCandle> {
46
49
  orderbook_id: string;
47
- resolution: string;
48
- include_ohlcv: boolean;
49
- prices: PriceCandle[];
50
+ resolution: Resolution;
51
+ prices: TCandle[];
50
52
  next_cursor: number | null;
51
53
  has_more: boolean;
52
54
  decimals: {
@@ -54,17 +56,11 @@ export interface PriceHistoryRestResponse {
54
56
  volume: number;
55
57
  };
56
58
  }
57
- export interface DepositPriceCandle {
58
- t: number;
59
- tc?: number;
60
- c: string;
61
- }
62
- export interface DepositPriceRestResponse {
63
- deposit_asset: string;
64
- binance_symbol: string;
65
- resolution: string;
66
- prices: DepositPriceCandle[];
67
- next_cursor: number | null;
68
- has_more: boolean;
69
- }
59
+ export type OrderbookPriceHistoryResponse = (OrderbookPriceHistoryResponseBase<MidpointPriceCandle> & {
60
+ include_ohlcv: false;
61
+ }) | (OrderbookPriceHistoryResponseBase<OhlcvPriceCandle> & {
62
+ include_ohlcv: true;
63
+ });
64
+ export type PriceHistoryRestResponse = OrderbookPriceHistoryResponse;
65
+ export {};
70
66
  //# sourceMappingURL=wire.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../../src/domain/price_history/wire.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,WAAW,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAA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],"names":[],"mappings":"","sourcesContent":["import type { OrderBookId, Resolution } from \"../../shared\";\n\nexport interface PriceCandle {\n t: number;\n m?: string;\n o?: string;\n h?: string;\n l?: string;\n c?: string;\n v?: string;\n bb?: string;\n ba?: string;\n}\n\nexport interface PriceHistorySnapshot {\n orderbook_id: OrderBookId;\n resolution: Resolution;\n prices: PriceCandle[];\n last_timestamp?: number;\n server_time?: number;\n include_ohlcv?: boolean;\n}\n\nexport interface PriceHistoryUpdate {\n orderbook_id: OrderBookId;\n resolution: Resolution;\n t: number;\n m?: string;\n o?: string;\n h?: string;\n l?: string;\n c?: string;\n v?: string;\n bb?: string;\n ba?: string;\n}\n\nexport interface PriceHistoryHeartbeat {\n server_time: number;\n last_processed?: number;\n}\n\nexport type PriceHistory =\n | ({ event_type: \"snapshot\" } & PriceHistorySnapshot)\n | ({ event_type: \"update\" } & PriceHistoryUpdate)\n | ({ event_type: \"heartbeat\" } & PriceHistoryHeartbeat);\n\nexport interface PriceHistoryRestResponse {\n orderbook_id: string;\n resolution: string;\n include_ohlcv: boolean;\n prices: PriceCandle[];\n next_cursor: number | null;\n has_more: boolean;\n decimals: { price: number; volume: number };\n}\n\nexport interface DepositPriceCandle {\n t: number;\n tc?: number;\n c: string;\n}\n\nexport interface DepositPriceRestResponse {\n deposit_asset: string;\n binance_symbol: string;\n resolution: string;\n prices: DepositPriceCandle[];\n next_cursor: number | null;\n has_more: boolean;\n}\n"]}
1
+ {"version":3,"file":"wire.js","sourceRoot":"","sources":["../../../src/domain/price_history/wire.ts"],"names":[],"mappings":"","sourcesContent":["import type { OrderBookId, Resolution } from \"../../shared\";\n\nexport interface MidpointPriceCandle {\n t: number;\n m: string | null;\n}\n\nexport interface OhlcvPriceCandle extends MidpointPriceCandle {\n o: string | null;\n h: string | null;\n l: string | null;\n c: string | null;\n v: string;\n bb: string | null;\n ba: string | null;\n}\n\nexport type PriceCandle = MidpointPriceCandle | OhlcvPriceCandle;\n\nexport interface PriceHistorySnapshot {\n orderbook_id: OrderBookId;\n resolution: Resolution;\n prices: PriceCandle[];\n last_timestamp?: number;\n server_time?: number;\n include_ohlcv?: boolean;\n}\n\nexport interface PriceHistoryUpdate {\n orderbook_id: OrderBookId;\n resolution: Resolution;\n t: number;\n m?: string;\n o?: string;\n h?: string;\n l?: string;\n c?: string;\n v?: string;\n bb?: string;\n ba?: string;\n}\n\nexport interface PriceHistoryHeartbeat {\n server_time: number;\n last_processed?: number;\n}\n\nexport type PriceHistory =\n | ({ event_type: \"snapshot\" } & PriceHistorySnapshot)\n | ({ event_type: \"update\" } & PriceHistoryUpdate)\n | ({ event_type: \"heartbeat\" } & PriceHistoryHeartbeat);\n\ninterface OrderbookPriceHistoryResponseBase<TCandle extends PriceCandle> {\n orderbook_id: string;\n resolution: Resolution;\n prices: TCandle[];\n next_cursor: number | null;\n has_more: boolean;\n decimals: { price: number; volume: number };\n}\n\nexport type OrderbookPriceHistoryResponse =\n | (OrderbookPriceHistoryResponseBase<MidpointPriceCandle> & { include_ohlcv: false })\n | (OrderbookPriceHistoryResponseBase<OhlcvPriceCandle> & { include_ohlcv: true });\n\nexport type PriceHistoryRestResponse = OrderbookPriceHistoryResponse;\n"]}
package/dist/prelude.d.ts CHANGED
@@ -22,9 +22,9 @@ export type { UserOpenOrders, UserTriggerOrders } from "./domain/order/state";
22
22
  export type { Portfolio, Position, PositionOutcome, WalletHolding, TokenBalance, TokenBalanceComputedBase, TokenBalanceTokenType, DepositAssetMetadata, DepositTokenBalance, } from "./domain/position";
23
23
  export type { Trade, WsTrade } from "./domain/trade";
24
24
  export { TradeHistory } from "./domain/trade/state";
25
- export type { LineData, PriceCandle, PriceHistory, PriceHistorySnapshot, PriceHistoryUpdate, } from "./domain/price_history";
25
+ export type { LineData, MidpointPriceCandle, OhlcvPriceCandle, OrderbookPriceHistoryQuery, OrderbookPriceHistoryResponse, PriceCandle, PriceHistory, PriceHistoryRestResponse, PriceHistorySnapshot, PriceHistoryUpdate, } from "./domain/price_history";
26
26
  export { PriceHistoryState } from "./domain/price_history";
27
- export type { DepositTokenCandle, DepositPrice, DepositPriceSnapshot, DepositPriceTick, DepositPriceCandleUpdate, DepositTokenPriceHistoryResponse, DepositPriceKey, } from "./domain/deposit_price";
27
+ export type { DepositPriceHistoryQuery, DepositTokenCandle, DepositPrice, DepositPriceSnapshot, DepositPriceTick, DepositPriceCandleUpdate, DepositTokenPriceHistoryResponse, DepositPriceKey, } from "./domain/deposit_price";
28
28
  export { DepositPriceState } from "./domain/deposit_price";
29
29
  export type { AuthCredentials, ChainType, EmbeddedWallet, LinkedAccount, LinkedAccountType, User, } from "./auth";
30
30
  export { LimitOrderEnvelope, TriggerOrderEnvelope, type OrderEnvelope, type OrderPayload, } from "./program";
@@ -1 +1 @@
1
- {"version":3,"file":"prelude.d.ts","sourceRoot":"","sources":["../src/prelude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,IAAI,EACJ,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,GACxB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE5D,OAAO,EACL,eAAe,EACf,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,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AAe,OAAA;AAAE,yGAAA,cAAc,OAAA;AAExC,mCAGkB;AAFhB,yGAAA,eAAe,OAAA;AACf,gHAAA,sBAAsB,OAAA;AAGxB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,wCAAuC;AAA9B,8FAAA,KAAK,OAAA;AACd,0CAA0C;AAAjC,iGAAA,OAAO,OAAA;AAChB,gDAAgD;AAAvC,uGAAA,UAAU,OAAA;AACnB,wCAAwC;AAA/B,+FAAA,MAAM,OAAA;AACf,8CAA8C;AAArC,qGAAA,SAAS,OAAA;AAClB,wCAAwC;AAA/B,+FAAA,MAAM,OAAA;AACf,wDAA4D;AAAnD,mHAAA,kBAAkB,OAAA;AAC3B,wDAA4D;AAAnD,mHAAA,kBAAkB,OAAA;AAC3B,sDAAsD;AAA7C,6GAAA,aAAa,OAAA;AACtB,8CAA8C;AAArC,qGAAA,SAAS,OAAA;AAoBlB,gDAA8D;AAArD,qHAAA,wBAAwB,OAAA;AACjC,kDAA6D;AAApD,0GAAA,iBAAiB,OAAA;AAsC1B,8CAAoD;AAA3C,qGAAA,YAAY,OAAA;AAQrB,wDAA2D;AAAlD,kHAAA,iBAAiB,OAAA;AAW1B,wDAA2D;AAAlD,kHAAA,iBAAiB,OAAA;AAW1B,qCAKmB;AAJjB,6GAAA,kBAAkB,OAAA;AAClB,+GAAA,oBAAoB,OAAA;AA4BtB,+BAGgB;AAFd,mGAAA,WAAW,OAAA","sourcesContent":["export {\n asOrderBookId,\n asPubkeyStr,\n DepositSource,\n deriveOrderbookId,\n OrderUpdateType,\n Resolution,\n Side,\n TimeInForce,\n TriggerResultStatus,\n TriggerStatus,\n TriggerType,\n TriggerUpdateType,\n type OrderBookId,\n type PubkeyStr,\n type SubmitOrderRequest,\n} from \"./shared\";\n\nexport { SdkError } from \"./error\";\nexport { DEFAULT_API_URL, DEFAULT_WS_URL } from \"./network\";\n\nexport {\n LightconeClient,\n LightconeClientBuilder,\n} from \"./client\";\n\nexport { Auth } from \"./auth\";\nexport { Admin } from \"./domain/admin\";\nexport { Markets } from \"./domain/market\";\nexport { Orderbooks } from \"./domain/orderbook\";\nexport { Orders } from \"./domain/order\";\nexport { Positions } from \"./domain/position\";\nexport { Trades } from \"./domain/trade\";\nexport { PriceHistoryClient } from \"./domain/price_history\";\nexport { DepositPriceClient } from \"./domain/deposit_price\";\nexport { Notifications } from \"./domain/notification\";\nexport { Referrals } from \"./domain/referral\";\n\nexport type {\n Market,\n Status,\n Outcome,\n ConditionalToken,\n DepositAsset,\n Token,\n TokenMetadata,\n ValidatedTokens,\n} from \"./domain/market\";\n\nexport type {\n OrderBook,\n OrderBookPair,\n OutcomeImpact,\n TickerData,\n WsBookLevel,\n} from \"./domain/orderbook\";\nexport { OrderBookValidationError } from \"./domain/orderbook\";\nexport { OrderbookSnapshot } from \"./domain/orderbook/state\";\n\nexport type {\n CancelAllBody,\n CancelAllSuccess,\n CancelBody,\n CancelSuccess,\n CancelTriggerBody,\n CancelTriggerSuccess,\n ConditionalBalance,\n FillInfo,\n Order,\n OrderEvent,\n OrderStatus,\n OrderType,\n SubmitOrderResponse,\n TriggerOrder,\n TriggerOrderResponse,\n TriggerOrderUpdate,\n UserSnapshotBalance,\n UserSnapshotOrder,\n UserOrdersResponse,\n} from \"./domain/order\";\nexport type { UserOpenOrders, UserTriggerOrders } from \"./domain/order/state\";\n\nexport type {\n Portfolio,\n Position,\n PositionOutcome,\n WalletHolding,\n TokenBalance,\n TokenBalanceComputedBase,\n TokenBalanceTokenType,\n DepositAssetMetadata,\n DepositTokenBalance,\n} from \"./domain/position\";\n\nexport type { Trade, WsTrade } from \"./domain/trade\";\nexport { TradeHistory } from \"./domain/trade/state\";\nexport type {\n LineData,\n PriceCandle,\n PriceHistory,\n PriceHistorySnapshot,\n PriceHistoryUpdate,\n} from \"./domain/price_history\";\nexport { PriceHistoryState } from \"./domain/price_history\";\n\nexport type {\n DepositTokenCandle,\n DepositPrice,\n DepositPriceSnapshot,\n DepositPriceTick,\n DepositPriceCandleUpdate,\n DepositTokenPriceHistoryResponse,\n DepositPriceKey,\n} from \"./domain/deposit_price\";\nexport { DepositPriceState } from \"./domain/deposit_price\";\n\nexport type {\n AuthCredentials,\n ChainType,\n EmbeddedWallet,\n LinkedAccount,\n LinkedAccountType,\n User,\n} from \"./auth\";\n\nexport {\n LimitOrderEnvelope,\n TriggerOrderEnvelope,\n type OrderEnvelope,\n type OrderPayload,\n} from \"./program\";\n\nexport type {\n ExportWalletRequest,\n ExportWalletResponse,\n PrivyOrderEnvelope,\n SignAndSendOrderRequest,\n SignAndSendTxRequest,\n SignAndSendTxResponse,\n} from \"./privy\";\n\nexport type {\n Notification,\n NotificationKind,\n MarketResolvedData,\n OrderFilledData,\n MarketData,\n} from \"./domain/notification\";\n\nexport type {\n RedeemResult,\n ReferralCodeInfo,\n ReferralStatus,\n} from \"./domain/referral\";\n\nexport {\n RetryPolicy,\n type RetryConfig,\n} from \"./http\";\n\nexport type {\n IWsClient,\n Kind,\n MessageIn,\n MessageOut,\n SubscribeParams,\n UnsubscribeParams,\n WsConfig,\n WsEvent,\n} from \"./ws\";\n\nexport type AuthClient = import(\"./auth\").Auth;\nexport type AdminClient = import(\"./domain/admin\").Admin;\nexport type MarketsClient = import(\"./domain/market\").Markets;\nexport type MarketsResult = import(\"./domain/market\").MarketsResult;\nexport type OrderbooksClient = import(\"./domain/orderbook\").Orderbooks;\nexport type OrdersClient = import(\"./domain/order\").Orders;\nexport type PositionsClient = import(\"./domain/position\").Positions;\nexport type TradesClient = import(\"./domain/trade\").Trades;\nexport type PriceHistorySubClient = import(\"./domain/price_history\").PriceHistoryClient;\nexport type DepositPriceSubClient = import(\"./domain/deposit_price\").DepositPriceClient;\nexport type NotificationsClient = import(\"./domain/notification\").Notifications;\nexport type ReferralsClient = import(\"./domain/referral\").Referrals;\n"]}
1
+ {"version":3,"file":"prelude.js","sourceRoot":"","sources":["../src/prelude.ts"],"names":[],"mappings":";;;AAAA,mCAgBkB;AAfhB,uGAAA,aAAa,OA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OAAA","sourcesContent":["export {\n asOrderBookId,\n asPubkeyStr,\n DepositSource,\n deriveOrderbookId,\n OrderUpdateType,\n Resolution,\n Side,\n TimeInForce,\n TriggerResultStatus,\n TriggerStatus,\n TriggerType,\n TriggerUpdateType,\n type OrderBookId,\n type PubkeyStr,\n type SubmitOrderRequest,\n} from \"./shared\";\n\nexport { SdkError } from \"./error\";\nexport { DEFAULT_API_URL, DEFAULT_WS_URL } from \"./network\";\n\nexport {\n LightconeClient,\n LightconeClientBuilder,\n} from \"./client\";\n\nexport { Auth } from \"./auth\";\nexport { Admin } from \"./domain/admin\";\nexport { Markets } from \"./domain/market\";\nexport { Orderbooks } from \"./domain/orderbook\";\nexport { Orders } from \"./domain/order\";\nexport { Positions } from \"./domain/position\";\nexport { Trades } from \"./domain/trade\";\nexport { PriceHistoryClient } from \"./domain/price_history\";\nexport { DepositPriceClient } from \"./domain/deposit_price\";\nexport { Notifications } from \"./domain/notification\";\nexport { Referrals } from \"./domain/referral\";\n\nexport type {\n Market,\n Status,\n Outcome,\n ConditionalToken,\n DepositAsset,\n Token,\n TokenMetadata,\n ValidatedTokens,\n} from \"./domain/market\";\n\nexport type {\n OrderBook,\n OrderBookPair,\n OutcomeImpact,\n TickerData,\n WsBookLevel,\n} from \"./domain/orderbook\";\nexport { OrderBookValidationError } from \"./domain/orderbook\";\nexport { OrderbookSnapshot } from \"./domain/orderbook/state\";\n\nexport type {\n CancelAllBody,\n CancelAllSuccess,\n CancelBody,\n CancelSuccess,\n CancelTriggerBody,\n CancelTriggerSuccess,\n ConditionalBalance,\n FillInfo,\n Order,\n OrderEvent,\n OrderStatus,\n OrderType,\n SubmitOrderResponse,\n TriggerOrder,\n TriggerOrderResponse,\n TriggerOrderUpdate,\n UserSnapshotBalance,\n UserSnapshotOrder,\n UserOrdersResponse,\n} from \"./domain/order\";\nexport type { UserOpenOrders, UserTriggerOrders } from \"./domain/order/state\";\n\nexport type {\n Portfolio,\n Position,\n PositionOutcome,\n WalletHolding,\n TokenBalance,\n TokenBalanceComputedBase,\n TokenBalanceTokenType,\n DepositAssetMetadata,\n DepositTokenBalance,\n} from \"./domain/position\";\n\nexport type { Trade, WsTrade } from \"./domain/trade\";\nexport { TradeHistory } from \"./domain/trade/state\";\nexport type {\n LineData,\n MidpointPriceCandle,\n OhlcvPriceCandle,\n OrderbookPriceHistoryQuery,\n OrderbookPriceHistoryResponse,\n PriceCandle,\n PriceHistory,\n PriceHistoryRestResponse,\n PriceHistorySnapshot,\n PriceHistoryUpdate,\n} from \"./domain/price_history\";\nexport { PriceHistoryState } from \"./domain/price_history\";\n\nexport type {\n DepositPriceHistoryQuery,\n DepositTokenCandle,\n DepositPrice,\n DepositPriceSnapshot,\n DepositPriceTick,\n DepositPriceCandleUpdate,\n DepositTokenPriceHistoryResponse,\n DepositPriceKey,\n} from \"./domain/deposit_price\";\nexport { DepositPriceState } from \"./domain/deposit_price\";\n\nexport type {\n AuthCredentials,\n ChainType,\n EmbeddedWallet,\n LinkedAccount,\n LinkedAccountType,\n User,\n} from \"./auth\";\n\nexport {\n LimitOrderEnvelope,\n TriggerOrderEnvelope,\n type OrderEnvelope,\n type OrderPayload,\n} from \"./program\";\n\nexport type {\n ExportWalletRequest,\n ExportWalletResponse,\n PrivyOrderEnvelope,\n SignAndSendOrderRequest,\n SignAndSendTxRequest,\n SignAndSendTxResponse,\n} from \"./privy\";\n\nexport type {\n Notification,\n NotificationKind,\n MarketResolvedData,\n OrderFilledData,\n MarketData,\n} from \"./domain/notification\";\n\nexport type {\n RedeemResult,\n ReferralCodeInfo,\n ReferralStatus,\n} from \"./domain/referral\";\n\nexport {\n RetryPolicy,\n type RetryConfig,\n} from \"./http\";\n\nexport type {\n IWsClient,\n Kind,\n MessageIn,\n MessageOut,\n SubscribeParams,\n UnsubscribeParams,\n WsConfig,\n WsEvent,\n} from \"./ws\";\n\nexport type AuthClient = import(\"./auth\").Auth;\nexport type AdminClient = import(\"./domain/admin\").Admin;\nexport type MarketsClient = import(\"./domain/market\").Markets;\nexport type MarketsResult = import(\"./domain/market\").MarketsResult;\nexport type OrderbooksClient = import(\"./domain/orderbook\").Orderbooks;\nexport type OrdersClient = import(\"./domain/order\").Orders;\nexport type PositionsClient = import(\"./domain/position\").Positions;\nexport type TradesClient = import(\"./domain/trade\").Trades;\nexport type PriceHistorySubClient = import(\"./domain/price_history\").PriceHistoryClient;\nexport type DepositPriceSubClient = import(\"./domain/deposit_price\").DepositPriceClient;\nexport type NotificationsClient = import(\"./domain/notification\").Notifications;\nexport type ReferralsClient = import(\"./domain/referral\").Referrals;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightconexyz/lightcone-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "TypeScript SDK for Lightcone",
5
5
  "author": "Lightcone",
6
6
  "license": "MIT",