Skip to content

user_fills and user_fills_by_time missing dex parameter for HIP-3 support #287

@keitaj

Description

@keitaj

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 parameter
def user_fills(self, address: str) -> Any:
    return self.post("/info", {"type": "userFills", "user": address})

# info.py line 228 — no dex parameter
def user_fills_by_time(self, address, start_time, end_time=None, aggregate_by_time=False):
    return self.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:

requests.post(API + "/info", json={"type": "userFills", "user": addr, "dex": "xyz"})

Suggestion

Add dex parameter consistent with other methods:

def user_fills(self, address: str, dex: str = "") -> Any:
    return self.post("/info", {"type": "userFills", "user": address, "dex": dex})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions