Add dex parameter to user_fills, user_fills_by_time, meta_and_asset_ctxs - #310
Add dex parameter to user_fills, user_fills_by_time, meta_and_asset_ctxs#310takinanton 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.
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