You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
user_fills and user_fills_by_time missing dex parameter for HIP-3 support #287
Feedback from an HIP-3 MM bot operator. We needed per-DEX fill data for cost efficiency analysis and had to use raw HTTP as a workaround.
Problem
user_fills and user_fills_by_time don't accept a dex parameter, making it impossible to retrieve fill history for HIP-3 (builder-deployed perpetuals) markets through the SDK.
Current code
# info.py line 199 — no dex parameterdefuser_fills(self, address: str) ->Any:
returnself.post("/info", {"type": "userFills", "user": address})
# info.py line 228 — no dex parameterdefuser_fills_by_time(self, address, start_time, end_time=None, aggregate_by_time=False):
returnself.post("/info", {"type": "userFillsByTime", "user": address, ...})
Comparison with other methods
Other methods already support dex:
user_state(address, dex="") ✅
open_orders(address, dex="") ✅
all_mids(dex="") ✅
meta(dex="") ✅
user_fills(address) ❌ — no dex parameter
user_fills_by_time(address, ...) ❌ — no dex parameter
Impact
HIP-3 bot operators cannot track per-DEX fill history through the SDK. We had to use raw HTTP calls as a workaround:
Update after digging into this while preparing #288, because it changes the picture.
I tested the live mainnet /info endpoint directly, and dex appears to have no effect on userFills / userFillsByTime:
userFills for one address returned an identical result set whether dex was omitted, dex="", dex="xyz" (a real HIP-3 dex from perpDexs), or dex="<invalid>". A valid HIP-3 dex did not change the results, and an invalid dex was not rejected.
By contrast, openOrders, clearinghouseState, and metaAndAssetCtxsreject an invalid dex with HTTP 500 and return dex-specific data for a valid one, which confirms the test methodology.
So unlike the sibling endpoints, userFills/userFillsByTime don't appear to honor dex server-side today. Adding the parameter to the SDK would document per-DEX fill filtering it can't actually provide, so I've scoped #288 down to the docstring fix for the methods that already accept dex (#286).
If per-DEX fill history is exposed another way (or this is planned), happy to revisit — but as of today the SDK can't offer a reliable server-side per-dex fill query.
@mifth thanks for the pointer. I checked metaAndAssetCtxs against the live API and it's a real gap, and unlike the fill endpoints it genuinely honors dex: dex="xyz" returns the xyz perp-dex universe (xyz:TSLA, xyz:NVDA, ...) and an invalid dex is rejected with HTTP 500. So #278 is valid.
Your PR #282 already adds the param correctly, so I'd rather not duplicate it here and step on your contribution. Best for that credit to stay with you. I'm keeping #288 scoped to the docstring fix (#286), and a docstring-only change can only document params that already exist, so meta_and_asset_ctxs is out of scope here until #282 lands the param. Happy to give #282 a review.
Activity
mifth commentedon Apr 12, 2026
Good find. As an addition the Info.meta_and_asset_ctxs() has also no dex parameter.
#278
claygeo commentedon Jun 19, 2026
Update after digging into this while preparing #288, because it changes the picture.
I tested the live mainnet
/infoendpoint directly, anddexappears to have no effect onuserFills/userFillsByTime:userFillsfor one address returned an identical result set whetherdexwas omitted,dex="",dex="xyz"(a real HIP-3 dex fromperpDexs), ordex="<invalid>". A valid HIP-3 dex did not change the results, and an invaliddexwas not rejected.openOrders,clearinghouseState, andmetaAndAssetCtxsreject an invaliddexwith HTTP 500 and return dex-specific data for a valid one, which confirms the test methodology.So unlike the sibling endpoints,
userFills/userFillsByTimedon't appear to honordexserver-side today. Adding the parameter to the SDK would document per-DEX fill filtering it can't actually provide, so I've scoped #288 down to the docstring fix for the methods that already acceptdex(#286).If per-DEX fill history is exposed another way (or this is planned), happy to revisit — but as of today the SDK can't offer a reliable server-side per-dex fill query.
mifth commentedon Jun 19, 2026
@claygeo could you please add to your commit the #278 please?
claygeo commentedon Jun 19, 2026
@mifth thanks for the pointer. I checked
metaAndAssetCtxsagainst the live API and it's a real gap, and unlike the fill endpoints it genuinely honorsdex:dex="xyz"returns the xyz perp-dex universe (xyz:TSLA,xyz:NVDA, ...) and an invaliddexis rejected with HTTP 500. So #278 is valid.Your PR #282 already adds the param correctly, so I'd rather not duplicate it here and step on your contribution. Best for that credit to stay with you. I'm keeping #288 scoped to the docstring fix (#286), and a docstring-only change can only document params that already exist, so
meta_and_asset_ctxsis out of scope here until #282 lands the param. Happy to give #282 a review.