docs: document HIP-3 dex parameter on Info methods#288
Conversation
e5525ef to
0835976
Compare
|
Rebased onto the latest One scope change worth flagging: I pared it down to the docs-only half, documenting I dropped the original Tests and |
Add the missing `dex` parameter to the Args docstrings of user_state, open_orders, frontend_open_orders, all_mids, and meta -- the five Info methods that already accept and forward a `dex` argument for HIP-3 builder-deployed perpetuals. Improves discoverability of HIP-3 support. Fixes hyperliquid-dex#286.
0835976 to
44952da
Compare
Summary
Adds the missing
dexparameter documentation to the Args docstrings of the fiveInfomethods that already accept and forward adexargument for HIP-3 builder-deployed perpetuals:user_state,open_orders,frontend_open_orders,all_mids, andmeta.Fixes #286.
Why
HIP-3 bot developers don't realize these methods support per-DEX selection, because the
dexparameter is only discoverable by reading the source. Documenting it in the Args section makes HIP-3 support visible.Changes
hyperliquid/info.py: adddexto the Args docstrings of the 5 methods that already accept it. No code or signature changes.Scope note (this PR originally also targeted #287)
This PR initially also added a
dexparameter touser_fillsanduser_fills_by_time. I removed that half after testing the live mainnet/infoAPI:userFills/userFillsByTimereturned an identical result set whetherdexwas omitted, set to a valid HIP-3 dex (xyz), or set to an invalid value (and the invalid value was not rejected) —dexappears to have no effect on those two endpoints. By contrast the sibling endpoints (clearinghouseState,openOrders,metaAndAssetCtxs) validatedex(HTTP 500 on an invalid value) and return dex-specific data. Adding a forwarded-but-ignoreddexto the two fill methods would document filtering the SDK can't actually provide, so it's been dropped. Repro on #287.Backwards compatibility
Docstring-only change. No behavior changes.