Repository navigation
Add dex parameter to user_fills, user_fills_by_time, meta_and_asset_ctxs - #310
takinanton wants to merge 1 commit into
Conversation
These three Info methods were the last holdouts without a dex parameter for HIP-3 builder-deployed perp dexes, while user_state, open_orders, all_mids, and meta already support it. Defaults to "" (the first/main dex) so existing callers are unaffected. Closes hyperliquid-dex#278, hyperliquid-dex#287
koriyoshi2041
left a comment
There was a problem hiding this comment.
Two parts need to be split before this is mergeable.
meta_and_asset_ctxs(dex=...) is valid and matches the documented API, but #282 already owns that exact change. More importantly, the live-endpoint verification recorded in #287 shows that userFills and userFillsByTime currently ignore dex: valid, invalid, and omitted values return the same data, while endpoints that support per-dex scoping reject an invalid dex. Exposing this parameter would therefore promise filtering the server does not provide.
Please drop the two fill-method changes and leave #278/#282 to the existing PR. If the API behavior has changed since that verification, add a current request/response receipt (including an invalid-dex control) and focused request-body tests.
c761785 to
f4fc1cc
Compare
|
Rechecked on mainnet today. userFills and userFillsByTime return the same 2000 fills with dex omitted, with dex xyz and with a made up dex name. clearinghouseState with that same made up dex answers 500. So you are right that the fills calls ignore dex and the param would promise filtering the server does not do. The meta_and_asset_ctxs half is the same change as #282. Nothing is left here that is not already covered so this one is superseded by #282 and can be closed. |
user_state, open_orders, all_mids, and meta all take an optional
dexparameter for HIP-3 builder-deployed perp dexes. user_fills,
user_fills_by_time, and meta_and_asset_ctxs did not, so callers
tracking fills or asset metadata on a HIP-3 dex had no way to scope
the request.
This adds
dex: str = ""to all three, following the exact patternalready used elsewhere in Info, so default behavior (main dex) is
unchanged for existing callers.
Closes #278, #287