@rabby-wallet/hyperliquid-sdk 1.1.2-beta.17 → 1.1.2-beta.19

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.
@@ -247,7 +247,7 @@ class ExchangeClient {
247
247
  sz: (0, number_1.removeTrailingZeros)(params.size),
248
248
  limitPx: px,
249
249
  reduceOnly: params.reduceOnly || false,
250
- orderType: { limit: { tif: 'Ioc' } },
250
+ orderType: { limit: { tif: 'FrontendMarket' } },
251
251
  }];
252
252
  if (params.tpTriggerPx) {
253
253
  const tpOrder = {
@@ -283,9 +283,11 @@ class ExchangeClient {
283
283
  };
284
284
  orders.push(slOrder);
285
285
  }
286
+ const hasTpOrSl = params.slTriggerPx || params.tpTriggerPx;
286
287
  const res = yield this.multiOrder({
287
288
  orders,
288
289
  builder: params.builder,
290
+ grouping: hasTpOrSl ? 'normalTpsl' : 'na',
289
291
  });
290
292
  return res;
291
293
  }
@@ -373,9 +375,11 @@ class ExchangeClient {
373
375
  };
374
376
  orders.push(slOrder);
375
377
  }
378
+ const hasTpOrSl = params.slTriggerPx || params.tpTriggerPx;
376
379
  const res = yield this.multiOrder({
377
380
  orders,
378
381
  builder: params.builder,
382
+ grouping: hasTpOrSl ? 'normalTpsl' : 'na',
379
383
  });
380
384
  return res;
381
385
  }
@@ -52,7 +52,7 @@ class HttpClient {
52
52
  if (error.name === 'AbortError') {
53
53
  throw new Error('Request timeout');
54
54
  }
55
- throw new Error(`API Error: ${error.message}`);
55
+ throw new Error(error.message);
56
56
  }
57
57
  throw new Error('Unknown API error');
58
58
  }
@@ -1,4 +1,4 @@
1
- import type { Meta, AssetCtx, ClearinghouseState, UserFills, CandleSnapshot, AllMids, ExtraAgent, OpenOrder, FeeResponse, UserNonFundingLedgerUpdates, UserHistoricalOrders, ReferralResponse, L2BookSnapshot, UserTwapSliceFill, FundingHistoryItem, UserFunding } from '../types';
1
+ import type { Meta, AssetCtx, ClearinghouseState, CandleSnapshot, AllMids, ExtraAgent, OpenOrder, FeeResponse, UserNonFundingLedgerUpdates, UserHistoricalOrders, ReferralResponse, L2BookSnapshot, UserTwapSliceFill, FundingHistoryItem, UserFunding, WsFill } from '../types';
2
2
  export interface InfoClientConfig {
3
3
  isTestnet?: boolean;
4
4
  timeout?: number;
@@ -29,7 +29,7 @@ export declare class InfoClient {
29
29
  /**
30
30
  * Get user's fill history
31
31
  */
32
- getUserFills(address?: string, aggregateByTime?: boolean): Promise<UserFills>;
32
+ getUserFills(address?: string, aggregateByTime?: boolean): Promise<WsFill[]>;
33
33
  /**
34
34
  * Get user's fill and cancel and other all orders history
35
35
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/hyperliquid-sdk",
3
- "version": "1.1.2-beta.17",
3
+ "version": "1.1.2-beta.19",
4
4
  "description": "Simplified Hyperliquid Perpetuals Trading SDK for Frontend Applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",