fix(ts-sdk): add missing fee field to UserTrade (#1983) - #2019
Open
duna-akin wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The core engine (
core/src/types.ts:215) and the Python SDK(
sdks/python/pmxt/models.py:404) both exposeUserTrade.fee, and thegenerated
sdks/typescript/API_REFERENCE.md:1804already documents it -- onlythe TypeScript interface was missing it.
The value already arrives at runtime, since
convertUserTrade()spreads the rawresponse, 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
marketIdandtxHashto match the field order in core and thePython SDK.
Testing
npm test --workspace=pmxtjs17/17 suites, 93 tests pass.npx tsc --noEmitclean.generate:docs,generate:openapiandgenerate-client-methods.jsall produce a byte-identical tree.(
models.tsis hand-written, not generated.)Closes #1983