Skip to content

feat(client): support PolyV2 position orders - #104

Draft
cesarenaldi wants to merge 1 commit into
mainfrom
codex/dev-549-position-id-orders
Draft

feat(client): support PolyV2 position orders#104
cesarenaldi wants to merge 1 commit into
mainfrom
codex/dev-549-position-id-orders

Conversation

@cesarenaldi

Copy link
Copy Markdown
Collaborator

Summary

  • accept exactly one of tokenID or positionID on limit and market order inputs
  • use positionID to select Exchange V3 signing automatically while preserving existing token-order version selection
  • carry the selected identifier through tick-size, order-book, fee, metadata, and order-construction paths
  • retain the protocol-defined signed and wire field name tokenId
  • document position-backed order placement

Why

PolyV2 markets expose position IDs instead of CTF token IDs. The client already supported Exchange V3 signing, but callers had to pass the position through tokenID and explicitly select version 3. The identifier field now serves as the protocol discriminator, matching the unified TypeScript SDK while retaining existing token-ID and Combo/RFQ compatibility.

Linear: DEV-549

Verification

  • pnpm lint
  • pnpm test — 303 tests
  • pnpm build

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.

1 participant