Skip to content

Commit 80f4893

Browse files
authored
Merge pull request #45 from zknpr/master
Added metaAndAssetCtxs function
2 parents f8bbb7e + 42b1893 commit 80f4893

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

hyperliquid/info.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,41 @@ def meta(self) -> Meta:
171171
}
172172
"""
173173
return cast(Meta, self.post("/info", {"type": "meta"}))
174+
175+
def metaAndAssetCtxs(self) -> Any:
176+
"""Retrieve exchange MetaAndAssetCtxs
177+
178+
POST /info
179+
180+
Returns:
181+
[
182+
{
183+
universe: [
184+
{
185+
'maxLeverage': int,
186+
'name': str,
187+
'onlyIsolated': bool,
188+
'szDecimals': int
189+
},
190+
...
191+
]
192+
},
193+
[
194+
{
195+
"dayNtlVlm": str,
196+
"funding": str,
197+
"impactPxs": [str, str],
198+
"markPx": str,
199+
"midPx": str,
200+
"openInterest": str,
201+
"oraclePx": str,
202+
"premium": str,
203+
"prevDayPx": str
204+
},
205+
...
206+
]
207+
"""
208+
return self.post("/info", {"type": "metaAndAssetCtxs"})
174209

175210
def spot_meta(self) -> SpotMeta:
176211
"""Retrieve exchange spot metadata

0 commit comments

Comments
 (0)