@rabby-wallet/hyperliquid-sdk 1.0.0-beta.19 → 1.0.0-beta.20

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.
@@ -38,7 +38,7 @@ export declare class InfoClient {
38
38
  * Get candlestick data snapshot
39
39
  * Supported intervals: "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "8h", "12h", "1d", "3d", "1w", "1M"
40
40
  */
41
- candleSnapshot(coin: string, interval: string, startTime?: number, endTime?: number): Promise<CandleSnapshot>;
41
+ candleSnapshot(coin: string, interval: string, startTime: number, endTime: number): Promise<CandleSnapshot>;
42
42
  /**
43
43
  * Check max builder fee
44
44
  */
@@ -153,14 +153,13 @@ class InfoClient {
153
153
  return __awaiter(this, void 0, void 0, function* () {
154
154
  // if no time range is specified, default to 24 hours ago
155
155
  const now = Date.now();
156
- const defaultStartTime = now - 24 * 60 * 60 * 1000; // 24 hours ago
157
156
  return this.httpClient.info({
158
157
  type: constants_1.InfoType.CANDLES_SNAPSHOT,
159
158
  req: {
160
159
  coin,
161
160
  interval,
162
- startTime: startTime || defaultStartTime,
163
- endTime: endTime || now,
161
+ startTime: startTime,
162
+ endTime: endTime !== null && endTime !== void 0 ? endTime : now,
164
163
  },
165
164
  });
166
165
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/hyperliquid-sdk",
3
- "version": "1.0.0-beta.19",
3
+ "version": "1.0.0-beta.20",
4
4
  "description": "Simplified Hyperliquid Perpetuals Trading SDK for Frontend Applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",