Choose the API by the question

A data pipeline can be perfectly healthy and still answer the wrong question. The fix is often not a new query; it is choosing the API that owns the fact you need.

Polymarket's API overview separates discovery, trading, account analysis, wallet transactions, and live channels into distinct surfaces.

Start with discovery

The Gamma API provides event and market metadata. Use it to learn what a market is and to obtain identifiers needed by later steps, not to infer whether an order filled.

Keeping discovery records separate from execution records prevents a market description from being mistaken for an account state.

Use the CLOB for execution

The CLOB API is the surface for prices, order books, and placing or managing orders. Its responses describe executable liquidity and order state, not a complete history of every wallet action.

When the question is ‘what can I trade?’ or ‘what happened to this order?’, start with the CLOB record and preserve its identifiers.

Use the Data and Relayer surfaces for different account facts

The Data API is documented for positions, activity, and participation analysis. The Relayer API submits wallet transactions without requiring the account to hold POL for gas. Those are different operations with different audit trails.

A wallet transaction can change state without being an order-book event, and an order-book event can exist before settlement is final. Keep the records linked rather than flattening them into one table.

Match streams to the audience

The public market channel follows order-book and market lifecycle updates. The authenticated user channel follows an account's orders and trades. Choose the channel before writing the reconnect logic or the alert rule.

The useful question is not whether a response arrived. It is which system owns that response and whether it is the right evidence for the decision being made.

Further reading: API overview · Market details · Real-time order updates.

Explore the markets: Open Polymarket (referral link).

A note on risk

Prices can change and positions can lose their full value. Examples are educational, not promises of returns.