Skip to content

Unified SDK gaps for production migration: threshold-safe taker FAK semantics and missing user stream events #107

Description

@kevinwtl

Summary

We are evaluating the official Python client (polymarket-client==0.1.0b7) for migrating a live trading system from the legacy CLOB client. The main production migration blocker on our side is threshold-safe taker FAK semantics.

I also include one user-stream observation below as a request for guidance, but I no longer want to overstate that point publicly as a confirmed SDK gap because it may still be a usage or subscription-shape issue on our side.

1. Market-order FAK does not expose explicit worst-price / threshold semantics

Current legacy path uses an explicit threshold-safe market order equivalent to:

MarketOrderArgsV2(
    token_id=...,
    amount=...,
    side=BUY,
    price=threshold_price,
    order_type=FAK,
)

In the unified SDK, AsyncSecureClient.create_market_order / place_market_order expose:

  • amount
  • shares
  • max_spend
  • order_type (FAK / FOK)

but no explicit price, threshold_price, or limit_price.

We inspected the SDK source and found that market orders resolve an estimated market price internally, and max_spend only adjusts BUY amount for fees/total spend after that price is chosen. That does not appear to be equivalent to a signed worst-price guard.

Questions:

  • Is there currently any supported way in py-sdk to express threshold-safe taker FAK semantics equivalent to the legacy client's explicit price cap?
  • If not, is explicit price / threshold_price / limit_price support planned for market FAK orders?

2. Secondary observation: unified user stream guidance

In one controlled live smoke test, we observed legacy CLOB user WS events for live taker orders while the unified user stream produced 0 events for the same test window.

However, I want to be careful here: we have not concluded yet that this is necessarily an SDK defect. It may still be a usage issue, subscription-shape issue, or a misunderstanding on our side.

So the narrower question is:

  • Is there any recommended or required subscription pattern for authenticated user events beyond UserSpec() or UserSpec(markets=[condition_id]) when validating live taker fills?

Why this matters

The main migration blocker is the first item:

  • without threshold-safe taker semantics, migrated market FAK orders weaken execution safety

The second item is currently just a request for implementation guidance while we continue testing.

Happy to provide more concrete reproduction details if useful.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions