@0xarchive/sdk 0.8.1 → 0.8.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.
package/dist/index.mjs CHANGED
@@ -1006,9 +1006,10 @@ var OpenInterestResource = class {
1006
1006
 
1007
1007
  // src/resources/candles.ts
1008
1008
  var CandlesResource = class {
1009
- constructor(http, basePath = "/v1") {
1009
+ constructor(http, basePath = "/v1", coinTransform = (c) => c.toUpperCase()) {
1010
1010
  this.http = http;
1011
1011
  this.basePath = basePath;
1012
+ this.coinTransform = coinTransform;
1012
1013
  }
1013
1014
  /**
1014
1015
  * Get historical OHLCV candle data with cursor-based pagination
@@ -1019,7 +1020,7 @@ var CandlesResource = class {
1019
1020
  */
1020
1021
  async history(coin, params) {
1021
1022
  const response = await this.http.get(
1022
- `${this.basePath}/candles/${coin.toUpperCase()}`,
1023
+ `${this.basePath}/candles/${this.coinTransform(coin)}`,
1023
1024
  params,
1024
1025
  this.http.validationEnabled ? CandleArrayResponseSchema : void 0
1025
1026
  );
@@ -1304,7 +1305,7 @@ var HyperliquidClient = class {
1304
1305
  */
1305
1306
  liquidations;
1306
1307
  /**
1307
- * HIP-3 builder-deployed perpetuals (Pro+ only, February 2026+)
1308
+ * HIP-3 builder-deployed perpetuals (February 2026+)
1308
1309
  */
1309
1310
  hip3;
1310
1311
  constructor(http) {
@@ -1340,6 +1341,10 @@ var Hip3Client = class {
1340
1341
  * Open interest
1341
1342
  */
1342
1343
  openInterest;
1344
+ /**
1345
+ * OHLCV candle data
1346
+ */
1347
+ candles;
1343
1348
  constructor(http) {
1344
1349
  const basePath = "/v1/hyperliquid/hip3";
1345
1350
  const coinTransform = (c) => c;
@@ -1348,6 +1353,7 @@ var Hip3Client = class {
1348
1353
  this.trades = new TradesResource(http, basePath, coinTransform);
1349
1354
  this.funding = new FundingResource(http, basePath, coinTransform);
1350
1355
  this.openInterest = new OpenInterestResource(http, basePath, coinTransform);
1356
+ this.candles = new CandlesResource(http, basePath, coinTransform);
1351
1357
  }
1352
1358
  };
1353
1359
  var LighterClient = class {