Skip to content

Batch orders, GTC/GTD/FOK/FAK order types, typed responses, proxy-wallet support, per-page pagination#14

Merged
floor-licker merged 6 commits intofloor-licker:mainfrom
onsails:batch
Feb 17, 2026
Merged

Batch orders, GTC/GTD/FOK/FAK order types, typed responses, proxy-wallet support, per-page pagination#14
floor-licker merged 6 commits intofloor-licker:mainfrom
onsails:batch

Conversation

@onsails
Copy link
Copy Markdown
Contributor

@onsails onsails commented Feb 12, 2026

  • Added GTC/GTD/FOK/FAK order types; for order types, GTC default paths unchanged - api-compatible.
  • added batch orders support
  • typed HTTP responses
  • proxy-wallet support in constructors
  • per-page pagination for cases when client code uses it's own rate-limiter

@onsails onsails marked this pull request as ready for review February 12, 2026 23:25
Copilot AI review requested due to automatic review settings February 12, 2026 23:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for batching order submissions and introduces the FAK order type while keeping existing default (GTC) flows intact.

Changes:

  • Added FAK to OrderType and validated its serde/string representation via a unit test.
  • Implemented post_orders for submitting up to 15 signed orders in a single /orders request.
  • Added convenience helpers to create+post single and multiple orders with an explicit OrderType, preserving existing GTC defaults.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/types.rs Extends OrderType with FAK and adds serde/as_str test coverage.
src/client.rs Adds batch posting API and new create+post helper methods; expands tests for batch posting and FAK support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/client.rs
Comment thread src/client.rs
@onsails onsails changed the title Batch orders and GTC/GTD/FOK/FAK order types Batch orders, GTC/GTD/FOK/FAK order types, typed responses, proxy-wallet support, per-page pagination Feb 13, 2026
@onsails onsails marked this pull request as draft February 13, 2026 15:16
- Add sig_type/funder params to with_l2_headers() for proxy wallet order signing
- Add get_trades_page() and get_orders_page() for per-page cursor pagination
- Refactor get_trades/get_orders to use page methods internally
TradeMessage was severely under-specified compared to the Polymarket WS
API. Add missing fields needed by the engine: taker_order_id,
maker_orders, trader_side, fee_rate_bps, outcome, owner, trade_owner,
transaction_hash. Replace untyped status/msg_type strings with proper
TradeMessageStatus and TradeMessageType enums.
@onsails onsails marked this pull request as ready for review February 15, 2026 21:20
@floor-licker floor-licker merged commit 1725592 into floor-licker:main Feb 17, 2026
3 checks passed
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.

3 participants