Skip to content

fix(ts-sdk): validate hosted limit order price#1291

Open
realfishsam wants to merge 1 commit into
mainfrom
fix/issue-1287-ts-hosted-price-validation-1782196341
Open

fix(ts-sdk): validate hosted limit order price#1291
realfishsam wants to merge 1 commit into
mainfrom
fix/issue-1287-ts-hosted-price-validation-1782196341

Conversation

@realfishsam

Copy link
Copy Markdown
Contributor

Summary

  • Add TypeScript hosted buildOrder validation for limit-order price presence and positivity.
  • Cover missing/zero limit prices with a regression test that verifies no hosted request is dispatched.

Fixes #1287

Test Plan

  • npm test -- --runTestsByPath tests/hosted-dispatch.test.ts -t "positive price" --runInBand (pass; used local untracked generated/src stubs because this checkout cannot regenerate TypeScript OpenAPI output: java is unavailable)
  • npm test -- --runTestsByPath tests/hosted-dispatch.test.ts --runInBand (blocked by pre-existing/local generated-stub limitations outside this change: fetchBalance empty stub response and NotSupported instanceof mismatch)
  • npm run generate:sdk:typescript --workspace=pmxt-core (blocked locally: java: not found)
  • git diff --check

@realfishsam

Copy link
Copy Markdown
Contributor Author

CI note: the scoped TypeScript hosted price-validation change is covered by the targeted regression test, but generated-sync checks are currently red from unrelated repo-wide drift on main (Hunch exchange surfacing plus generated client/API reference diffs such as market_id/fee trade fields and source_exchange filters). I did not fold that broad drift into this focused fix PR.

Local checks run:

  • npm test -- --runTestsByPath tests/hosted-dispatch.test.ts -t "positive price" --runInBand — PASS (with local untracked generated-client stubs because this checkout cannot regenerate OpenAPI output: java is unavailable)
  • git diff --check — PASS

Blocked checks observed on GitHub:

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.

SDK drift: Python hosted _hosted_build_order_request validates limit-order price presence and positivity; TypeScript _hostedBuildOrderBody does not

1 participant