Skip to content

Add dex parameter to user_fills, user_fills_by_time, meta_and_asset_ctxs - #310

Open
takinanton wants to merge 1 commit into
hyperliquid-dex:masterfrom
takinanton:add-dex-param-fills-metactxs
Open

Add dex parameter to user_fills, user_fills_by_time, meta_and_asset_ctxs#310
takinanton wants to merge 1 commit into
hyperliquid-dex:masterfrom
takinanton:add-dex-param-fills-metactxs

Conversation

@takinanton

Copy link
Copy Markdown

user_state, open_orders, all_mids, and meta all take an optional dex
parameter 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 pattern
already used elsewhere in Info, so default behavior (main dex) is
unchanged for existing callers.

Closes #278, #287

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 koriyoshi2041 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Info.meta_and_asset_ctxs() has no dex input

2 participants