Skip to content

fix(ts-sdk): add missing fee field to UserTrade (#1983) - #2019

Open
duna-akin wants to merge 1 commit into
pmxt-dev:mainfrom
duna-akin:fix/1983-ts-usertrade-fee
Open

fix(ts-sdk): add missing fee field to UserTrade (#1983)#2019
duna-akin wants to merge 1 commit into
pmxt-dev:mainfrom
duna-akin:fix/1983-ts-usertrade-fee

Conversation

@duna-akin

Copy link
Copy Markdown

The core engine (core/src/types.ts:215) and the Python SDK
(sdks/python/pmxt/models.py:404) both expose UserTrade.fee, and the
generated sdks/typescript/API_REFERENCE.md:1804 already documents it -- only
the TypeScript interface was missing it.

The value already arrives at runtime, since convertUserTrade() spreads the raw
response, so TypeScript users could not reach a field that was in fact present.
Hyperliquid populates it today (core/src/exchanges/hyperliquid/normalizer.ts).

Placed between marketId and txHash to match the field order in core and the
Python SDK.

Testing

  • npm test --workspace=pmxtjs 17/17 suites, 93 tests pass.
  • npx tsc --noEmit clean.
  • No codegen drift: generate:docs, generate:openapi and
    generate-client-methods.js all produce a byte-identical tree.
    (models.ts is hand-written, not generated.)

Closes #1983

The core engine (core/src/types.ts) and the Python SDK both expose
UserTrade.fee, and the generated sdks/typescript/API_REFERENCE.md already
documents it, but the TypeScript interface omitted it.

The value already arrives at runtime -- convertUserTrade() spreads the raw
response -- so TypeScript users could not reach a field that was in fact
present. Hyperliquid populates it today.

Placed between marketId and txHash to match the field order in core and the
Python SDK.

Closes pmxt-dev#1983
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.

TypeScript SDK UserTrade type is missing the fee field

1 participant