@rabby-wallet/hyperliquid-sdk 1.0.0-beta.6 → 1.0.0-beta.7
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/types/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,8 +32,10 @@ const sdk = new HyperliquidSDK({
|
|
|
32
32
|
// 获取所有中间价
|
|
33
33
|
const prices = await sdk.info.getAllMids();
|
|
34
34
|
|
|
35
|
-
// 获取市场元数据与资产上下文
|
|
36
|
-
const
|
|
35
|
+
// 获取市场元数据与资产上下文
|
|
36
|
+
const canUseCache = true; //默认使用缓存,多次请求并发去重 ,需要刷新传false
|
|
37
|
+
const [meta, assetCtxs] = await sdk.info.metaAndAssetCtxs(canUseCache);
|
|
38
|
+
|
|
37
39
|
|
|
38
40
|
// 获取账户综合状态
|
|
39
41
|
const account = await sdk.info.getClearingHouseState();
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED