@nightlylabs/dex-sdk 0.3.31 → 0.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -10
- package/dist/index.js +6 -10
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24076,25 +24076,21 @@ var Client = class _Client {
|
|
|
24076
24076
|
this.getChartCandlesInRange = async ({
|
|
24077
24077
|
interval,
|
|
24078
24078
|
marketName,
|
|
24079
|
-
timestampStartMs = Math.round((/* @__PURE__ */ new Date()).getTime()
|
|
24080
|
-
timestampEndMs = Math.round((/* @__PURE__ */ new Date()).getTime()
|
|
24079
|
+
timestampStartMs = Math.round((/* @__PURE__ */ new Date()).getTime()),
|
|
24080
|
+
timestampEndMs = Math.round((/* @__PURE__ */ new Date()).getTime() - 24 * 60 * 60 * 1e3),
|
|
24081
24081
|
// default 24 back
|
|
24082
24082
|
cursor
|
|
24083
24083
|
}) => {
|
|
24084
24084
|
if (timestampEndMs && timestampStartMs && timestampEndMs > timestampStartMs) {
|
|
24085
24085
|
throw new Error("timestampEndMs must be lower than timestampStartMs");
|
|
24086
24086
|
}
|
|
24087
|
-
const
|
|
24087
|
+
const response = await this.sendGetJson("/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */, {
|
|
24088
24088
|
marketName,
|
|
24089
24089
|
interval,
|
|
24090
|
-
|
|
24091
|
-
|
|
24090
|
+
startTimestamp: timestampStartMs.toString(),
|
|
24091
|
+
endTimestamp: timestampEndMs.toString(),
|
|
24092
24092
|
paginationCursor: cursor
|
|
24093
|
-
};
|
|
24094
|
-
const response = await this.sendGetJson(
|
|
24095
|
-
"/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */,
|
|
24096
|
-
request
|
|
24097
|
-
);
|
|
24093
|
+
});
|
|
24098
24094
|
return response;
|
|
24099
24095
|
};
|
|
24100
24096
|
this.getPriceIndexes = async () => {
|
package/dist/index.js
CHANGED
|
@@ -24034,25 +24034,21 @@ var Client = class _Client {
|
|
|
24034
24034
|
this.getChartCandlesInRange = async ({
|
|
24035
24035
|
interval,
|
|
24036
24036
|
marketName,
|
|
24037
|
-
timestampStartMs = Math.round((/* @__PURE__ */ new Date()).getTime()
|
|
24038
|
-
timestampEndMs = Math.round((/* @__PURE__ */ new Date()).getTime()
|
|
24037
|
+
timestampStartMs = Math.round((/* @__PURE__ */ new Date()).getTime()),
|
|
24038
|
+
timestampEndMs = Math.round((/* @__PURE__ */ new Date()).getTime() - 24 * 60 * 60 * 1e3),
|
|
24039
24039
|
// default 24 back
|
|
24040
24040
|
cursor
|
|
24041
24041
|
}) => {
|
|
24042
24042
|
if (timestampEndMs && timestampStartMs && timestampEndMs > timestampStartMs) {
|
|
24043
24043
|
throw new Error("timestampEndMs must be lower than timestampStartMs");
|
|
24044
24044
|
}
|
|
24045
|
-
const
|
|
24045
|
+
const response = await this.sendGetJson("/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */, {
|
|
24046
24046
|
marketName,
|
|
24047
24047
|
interval,
|
|
24048
|
-
|
|
24049
|
-
|
|
24048
|
+
startTimestamp: timestampStartMs.toString(),
|
|
24049
|
+
endTimestamp: timestampEndMs.toString(),
|
|
24050
24050
|
paginationCursor: cursor
|
|
24051
|
-
};
|
|
24052
|
-
const response = await this.sendGetJson(
|
|
24053
|
-
"/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */,
|
|
24054
|
-
request
|
|
24055
|
-
);
|
|
24051
|
+
});
|
|
24056
24052
|
return response;
|
|
24057
24053
|
};
|
|
24058
24054
|
this.getPriceIndexes = async () => {
|