@lifi/perps-sdk 17.0.0 → 17.0.1
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/README.md +4 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/types/provider.d.ts +4 -4
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/types/provider.d.ts +4 -4
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/types/provider.ts +4 -4
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -117,8 +117,10 @@ displays read the account-scoped figure.
|
|
|
117
117
|
|
|
118
118
|
Providers that publish a per-market figure answer it directly. Hyperliquid
|
|
119
119
|
reads it from `activeAssetData`, and also streams it on the `availableToTrade`
|
|
120
|
-
WebSocket channel.
|
|
121
|
-
|
|
120
|
+
WebSocket channel. Ondo reads it from `/v1/perps/max_order_size` over REST
|
|
121
|
+
only, and needs a session. Without an Ondo session, and for every other
|
|
122
|
+
provider, the client falls back to the account summary, so `buy` and `sell`
|
|
123
|
+
both equal `availableMargin`.
|
|
122
124
|
|
|
123
125
|
```ts
|
|
124
126
|
const availableToTrade = await client.getAvailableToTrade({
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -374,10 +374,10 @@ export interface PerpsProviderPlugin {
|
|
|
374
374
|
/**
|
|
375
375
|
* The amounts the account can still buy and sell on one market, in that
|
|
376
376
|
* market's margin asset. Optional because venues expose this unevenly:
|
|
377
|
-
* Hyperliquid
|
|
378
|
-
* only an account-scoped figure. `undefined`
|
|
379
|
-
* to read for this market, and the caller falls
|
|
380
|
-
* summary.
|
|
377
|
+
* Hyperliquid (`activeAssetData`) and Ondo (`max_order_size`) read it
|
|
378
|
+
* directly, other venues publish only an account-scoped figure. `undefined`
|
|
379
|
+
* means the venue has nothing to read for this market, and the caller falls
|
|
380
|
+
* back to the account summary.
|
|
381
381
|
*/
|
|
382
382
|
getAvailableToTrade?(params: ProviderGetAvailableToTradeParams, options?: SDKRequestOptions): Promise<AvailableToTrade | undefined>;
|
|
383
383
|
getOrders(params: ProviderGetOrdersParams, options?: SDKRequestOptions): Promise<OrdersResponse>;
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
|
@@ -374,10 +374,10 @@ export interface PerpsProviderPlugin {
|
|
|
374
374
|
/**
|
|
375
375
|
* The amounts the account can still buy and sell on one market, in that
|
|
376
376
|
* market's margin asset. Optional because venues expose this unevenly:
|
|
377
|
-
* Hyperliquid
|
|
378
|
-
* only an account-scoped figure. `undefined`
|
|
379
|
-
* to read for this market, and the caller falls
|
|
380
|
-
* summary.
|
|
377
|
+
* Hyperliquid (`activeAssetData`) and Ondo (`max_order_size`) read it
|
|
378
|
+
* directly, other venues publish only an account-scoped figure. `undefined`
|
|
379
|
+
* means the venue has nothing to read for this market, and the caller falls
|
|
380
|
+
* back to the account summary.
|
|
381
381
|
*/
|
|
382
382
|
getAvailableToTrade?(params: ProviderGetAvailableToTradeParams, options?: SDKRequestOptions): Promise<AvailableToTrade | undefined>;
|
|
383
383
|
getOrders(params: ProviderGetOrdersParams, options?: SDKRequestOptions): Promise<OrdersResponse>;
|
package/dist/types/version.d.ts
CHANGED
package/package.json
CHANGED
package/src/types/provider.ts
CHANGED
|
@@ -456,10 +456,10 @@ export interface PerpsProviderPlugin {
|
|
|
456
456
|
/**
|
|
457
457
|
* The amounts the account can still buy and sell on one market, in that
|
|
458
458
|
* market's margin asset. Optional because venues expose this unevenly:
|
|
459
|
-
* Hyperliquid
|
|
460
|
-
* only an account-scoped figure. `undefined`
|
|
461
|
-
* to read for this market, and the caller falls
|
|
462
|
-
* summary.
|
|
459
|
+
* Hyperliquid (`activeAssetData`) and Ondo (`max_order_size`) read it
|
|
460
|
+
* directly, other venues publish only an account-scoped figure. `undefined`
|
|
461
|
+
* means the venue has nothing to read for this market, and the caller falls
|
|
462
|
+
* back to the account summary.
|
|
463
463
|
*/
|
|
464
464
|
getAvailableToTrade?(
|
|
465
465
|
params: ProviderGetAvailableToTradeParams,
|
package/src/version.ts
CHANGED