全面优化实盘对接没有验证

This commit is contained in:
2026-07-14 07:29:03 +08:00
parent a1963e58ed
commit b3f770c55f
391 changed files with 114674 additions and 528 deletions
@@ -0,0 +1,70 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Data Resources
> Access Polymarket on-chain activity for data & analytics
Polymarket data that lands on the blockchain, such as trades, balances, positions, and redeems, is available through various on-chain analytics platforms and blockchain data providers. Polymarket also provides its own APIs and WebSockets. See the [API Endpoints reference](/quickstart/reference/endpoints) for more information.
The purpose of this page is to serve as a public good for Polymarket builders, researches, and analysts alike.
***
## Data
### Goldsky
[Goldsky](https://docs.goldsky.com/chains/polymarket) provides real-time streaming pipelines for Polymarket on-chain activity (i.e. trades, balances, positions, etc...) into your own database/data warehouse.
Goldsky also partnered with [ClickHouse](https://clickhouse.com) to create [CryptoHouse](https://crypto.clickhouse.com), where you can query Polymarket on-chain data using SQL.
### Dune
[Dune](https://dune.com) is a blockchain analytics platform that has Polymarket on-chain activity (i.e. trades, balances, positions, etc...). Query Polymarket data using SQL, create custom dashboards, and more.
Here are a few simple queries to get started:
| Query | Description | Link |
| ------------- | --------------------------------------------- | --------------------------------------------------- |
| Volume | Notional Volume and Maker & Taker USDC Volume | [View Dune Query](https://dune.com/queries/6545441) |
| TVL | USDC locked in Polymarket smart contracts | [View Dune Query](https://dune.com/queries/6588784) |
| Open Interest | Estimated market open interest, and over time | [View Dune Query](https://dune.com/queries/6555478) |
### Allium
[Allium](https://docs.allium.so/historical-data/predictions) is a blockchain analytics platform that has Polymarket on-chain activity (i.e. trades, balances, positions, etc...). Query Polymarket data using SQL, create custom dashboards, and more.
\--
## Dashboards
Third-party blockchain analytics platforms that aggregate and visualize Polymarket data:
<CardGroup cols={4}>
<Card title="Blockworks" img="https://pbs.twimg.com/profile_images/1651677302634483712/7s2FxV2K_400x400.jpg" href="https://blockworks.com/analytics/polymarket" />
<Card title="Artemis" img="https://pbs.twimg.com/profile_images/1896982195723546624/2XeO9mPb_400x400.png" href="https://app.artemisanalytics.com/asset/polymarket?from=assets" />
<Card title="Dune" img="https://pbs.twimg.com/profile_images/1986458079248986112/qq80s3hx_400x400.jpg" href="https://dune.com/discover/content/popular?q=polymarket&resource-type=dashboards" />
<Card title="DeFiLlama" img="https://pbs.twimg.com/profile_images/1915756547705036800/rAeLzZqs_400x400.jpg" href="https://defillama.com/protocol/polymarket" />
<Card title="The Block" img="https://pbs.twimg.com/profile_images/1944749695525425152/9babG7Df_400x400.jpg" href="https://www.theblock.co/data/decentralized-finance/prediction-markets-and-betting" />
<Card title="Token Terminal" img="https://pbs.twimg.com/profile_images/1594678659222306817/SMum_RcQ_400x400.jpg" href="https://tokenterminal.com/explorer/projects/polymarket" />
<Card title="Allium" img="https://pbs.twimg.com/profile_images/1778926940407132160/UEwR3lHt_400x400.jpg" href="https://predictions.allium.so" />
</CardGroup>
### Community Dashboards
Community-created Dune dashboards of Polymarket on-chain analytics:
| Dashboard | Created By | Link |
| ------------------------------------------------- | ----------------------------------------------- | ---------------------------------------------------------------------------- |
| Polymarket Overview | [@datadashboards](https://x.com/datadashboards) | [View Dashboard](https://dune.com/datadashboards/polymarket-overview) |
| Polymarket Volume, OI, Markets, Addresses and TVL | [@hildobby](https://x.com/hildobby) | [View Dashboard](https://dune.com/hildobby/polymarket) |
| Polymarket Historical Accuracy | [@alexmccullaaa](https://x.com/alexmccullaaa) | [View Dashboard](https://dune.com/alexmccullough/how-accurate-is-polymarket) |
| Polymarket Builders Dashboard | [@defioasis](https://x.com/defioasis) | [View Dashboard](https://dune.com/gateresearch/pmbuilders) |
@@ -0,0 +1,100 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Contracts
> All Polymarket smart contract addresses, audits, and security resources
All Polymarket contracts are deployed on **Polygon mainnet** (Chain ID: 137). This is the single source of truth for all contract addresses used across the platform.
***
## Core Trading Contracts
| Contract | Address |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| CTF Exchange | [`0xE111180000d2663C0091e4f400237545B87B996B`](https://polygonscan.com/address/0xE111180000d2663C0091e4f400237545B87B996B) |
| Neg Risk CTF Exchange | [`0xe2222d279d744050d28e00520010520000310F59`](https://polygonscan.com/address/0xe2222d279d744050d28e00520010520000310F59) |
| Neg Risk Adapter | [`0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296`](https://polygonscan.com/address/0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296) |
| Conditional Tokens (CTF) | [`0x4D97DCd97eC945f40cF65F87097ACe5EA0476045`](https://polygonscan.com/address/0x4D97DCd97eC945f40cF65F87097ACe5EA0476045) |
***
## Combos Contracts
| Contract | Address |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| PositionManager (proxy) | [`0x006F54F7f9A22e0000CC2AB60031000000ae9fEF`](https://polygonscan.com/address/0x006F54F7f9A22e0000CC2AB60031000000ae9fEF) |
| PositionManager (impl) | [`0x30c038F0Dae8dcC3E6AD51D016F50821D32Cb87e`](https://polygonscan.com/address/0x30c038F0Dae8dcC3E6AD51D016F50821D32Cb87e) |
| BinaryModule (proxy) | [`0x1000008dD9001B968442c1000017eaE6E0dA00Ba`](https://polygonscan.com/address/0x1000008dD9001B968442c1000017eaE6E0dA00Ba) |
| BinaryModule (impl) | [`0x492FEc596eC347459E1Ebe30b9245EB3B49B1BBa`](https://polygonscan.com/address/0x492FEc596eC347459E1Ebe30b9245EB3B49B1BBa) |
| NegRiskModule (proxy) | [`0x200000900045e3B6259600682756002200028933`](https://polygonscan.com/address/0x200000900045e3B6259600682756002200028933) |
| NegRiskModule (impl) | [`0xA61e7ca374F721D5b9FD5b0FEe6Fb90f27d448d7`](https://polygonscan.com/address/0xA61e7ca374F721D5b9FD5b0FEe6Fb90f27d448d7) |
| CombinatorialModule (proxy) | [`0x30000034706C7d8e12009DAB006Be20000c031A8`](https://polygonscan.com/address/0x30000034706C7d8e12009DAB006Be20000c031A8) |
| CombinatorialModule (impl) | [`0xb529b2430d78868422C47934d9d61cC9D0C53dBb`](https://polygonscan.com/address/0xb529b2430d78868422C47934d9d61cC9D0C53dBb) |
| Exchange (proxy) | [`0xe3333700cA9d93003F00f0F71f8515005F6c00Aa`](https://polygonscan.com/address/0xe3333700cA9d93003F00f0F71f8515005F6c00Aa) |
| Exchange (impl) | [`0x7345C6842b244926125ed4054905cAc49620B5dc`](https://polygonscan.com/address/0x7345C6842b244926125ed4054905cAc49620B5dc) |
| AutoRedeemer (proxy) | [`0xa1200000d0002264C9a1698e001292D00E1b00af`](https://polygonscan.com/address/0xa1200000d0002264C9a1698e001292D00E1b00af) |
| AutoRedeemer (impl) | [`0x64860bFD14fCcaAc09cd36f347784a9616AfB66C`](https://polygonscan.com/address/0x64860bFD14fCcaAc09cd36f347784a9616AfB66C) |
***
## Collateral Contracts
| Contract | Address |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| pUSD — CollateralToken (proxy) | [`0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB`](https://polygonscan.com/address/0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB) |
| pUSD — CollateralToken (impl) | [`0x6bBCef9f7ef3B6C592c99e0f206a0DE94Ad0925f`](https://polygonscan.com/address/0x6bBCef9f7ef3B6C592c99e0f206a0DE94Ad0925f) |
| CollateralOnramp | [`0x93070a847efEf7F70739046A929D47a521F5B8ee`](https://polygonscan.com/address/0x93070a847efEf7F70739046A929D47a521F5B8ee) |
| CollateralOfframp | [`0x2957922Eb93258b93368531d39fAcCA3B4dC5854`](https://polygonscan.com/address/0x2957922Eb93258b93368531d39fAcCA3B4dC5854) |
| PermissionedRamp | [`0xebC2459Ec962869ca4c0bd1E06368272732BCb08`](https://polygonscan.com/address/0xebC2459Ec962869ca4c0bd1E06368272732BCb08) |
| CtfCollateralAdapter | [`0xAdA100Db00Ca00073811820692005400218FcE1f`](https://polygonscan.com/address/0xAdA100Db00Ca00073811820692005400218FcE1f) |
| NegRiskCtfCollateralAdapter | [`0xadA2005600Dec949baf300f4C6120000bDB6eAab`](https://polygonscan.com/address/0xadA2005600Dec949baf300f4C6120000bDB6eAab) |
***
## Wallet Factory Contracts
| Contract | Address |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| Deposit Wallet Factory | [`0x00000000000Fb5C9ADea0298D729A0CB3823Cc07`](https://polygonscan.com/address/0x00000000000Fb5C9ADea0298D729A0CB3823Cc07) |
| Deposit Wallet Beacon | [`0x7A18EDfe055488A3128f01F563e5B479D92ffc3a`](https://polygonscan.com/address/0x7A18EDfe055488A3128f01F563e5B479D92ffc3a) |
| Gnosis Safe Factory | [`0xaacfeea03eb1561c4e67d661e40682bd20e3541b`](https://polygonscan.com/address/0xaacfeea03eb1561c4e67d661e40682bd20e3541b) |
| Polymarket Proxy Factory | [`0xaB45c5A4B0c941a2F231C04C3f49182e1A254052`](https://polygonscan.com/address/0xaB45c5A4B0c941a2F231C04C3f49182e1A254052) |
***
## Resolution Contracts
| Contract | Address |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| UMA Adapter | [`0x6A9D222616C90FcA5754cd1333cFD9b7fb6a4F74`](https://polygonscan.com/address/0x6A9D222616C90FcA5754cd1333cFD9b7fb6a4F74) |
| UMA Optimistic Oracle | [`0xCB1822859cEF82Cd2Eb4E6276C7916e692995130`](https://polygonscan.com/address/0xCB1822859cEF82Cd2Eb4E6276C7916e692995130) |
***
## Security
### Audits
CTF Exchange V2 has been audited by two independent firms:
| Auditor | Report |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Quantstamp | [CTF Exchange V2 — Quantstamp — March 2026](https://github.com/Polymarket/ctf-exchange-v2/blob/main/audits/CTF%20Exchange%20V2%20-%20Quantstamp%20-%20March%202026.pdf) |
| Cantina | [CTF Exchange V2 — Cantina — March 2026](https://github.com/Polymarket/ctf-exchange-v2/blob/main/audits/CTF%20Exchange%20V2%20-%20Cantina%20-%20March%202026.pdf) |
### Bug Bounty
Security vulnerabilities can be reported through the [Cantina bug bounty program](https://cantina.xyz/bounties/ff945ca2-2a6e-4b83-b1b6-7a0cd3b94bea).
***
## Source Code
<CardGroup cols={1}>
<Card title="CTF Exchange V2" icon="github" href="https://github.com/Polymarket/ctf-exchange-v2">
Order matching and settlement contracts
</Card>
</CardGroup>
@@ -0,0 +1,100 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Contracts
> All Polymarket smart contract addresses, audits, and security resources
All Polymarket contracts are deployed on **Polygon mainnet** (Chain ID: 137). This is the single source of truth for all contract addresses used across the platform.
***
## Core Trading Contracts
| Contract | Address |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| CTF Exchange | [`0xE111180000d2663C0091e4f400237545B87B996B`](https://polygonscan.com/address/0xE111180000d2663C0091e4f400237545B87B996B) |
| Neg Risk CTF Exchange | [`0xe2222d279d744050d28e00520010520000310F59`](https://polygonscan.com/address/0xe2222d279d744050d28e00520010520000310F59) |
| Neg Risk Adapter | [`0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296`](https://polygonscan.com/address/0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296) |
| Conditional Tokens (CTF) | [`0x4D97DCd97eC945f40cF65F87097ACe5EA0476045`](https://polygonscan.com/address/0x4D97DCd97eC945f40cF65F87097ACe5EA0476045) |
***
## Combos Contracts
| Contract | Address |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| PositionManager (proxy) | [`0x006F54F7f9A22e0000CC2AB60031000000ae9fEF`](https://polygonscan.com/address/0x006F54F7f9A22e0000CC2AB60031000000ae9fEF) |
| PositionManager (impl) | [`0x30c038F0Dae8dcC3E6AD51D016F50821D32Cb87e`](https://polygonscan.com/address/0x30c038F0Dae8dcC3E6AD51D016F50821D32Cb87e) |
| BinaryModule (proxy) | [`0x1000008dD9001B968442c1000017eaE6E0dA00Ba`](https://polygonscan.com/address/0x1000008dD9001B968442c1000017eaE6E0dA00Ba) |
| BinaryModule (impl) | [`0x492FEc596eC347459E1Ebe30b9245EB3B49B1BBa`](https://polygonscan.com/address/0x492FEc596eC347459E1Ebe30b9245EB3B49B1BBa) |
| NegRiskModule (proxy) | [`0x200000900045e3B6259600682756002200028933`](https://polygonscan.com/address/0x200000900045e3B6259600682756002200028933) |
| NegRiskModule (impl) | [`0xA61e7ca374F721D5b9FD5b0FEe6Fb90f27d448d7`](https://polygonscan.com/address/0xA61e7ca374F721D5b9FD5b0FEe6Fb90f27d448d7) |
| CombinatorialModule (proxy) | [`0x30000034706C7d8e12009DAB006Be20000c031A8`](https://polygonscan.com/address/0x30000034706C7d8e12009DAB006Be20000c031A8) |
| CombinatorialModule (impl) | [`0xb529b2430d78868422C47934d9d61cC9D0C53dBb`](https://polygonscan.com/address/0xb529b2430d78868422C47934d9d61cC9D0C53dBb) |
| Exchange (proxy) | [`0xe3333700cA9d93003F00f0F71f8515005F6c00Aa`](https://polygonscan.com/address/0xe3333700cA9d93003F00f0F71f8515005F6c00Aa) |
| Exchange (impl) | [`0x7345C6842b244926125ed4054905cAc49620B5dc`](https://polygonscan.com/address/0x7345C6842b244926125ed4054905cAc49620B5dc) |
| AutoRedeemer (proxy) | [`0xa1200000d0002264C9a1698e001292D00E1b00af`](https://polygonscan.com/address/0xa1200000d0002264C9a1698e001292D00E1b00af) |
| AutoRedeemer (impl) | [`0x64860bFD14fCcaAc09cd36f347784a9616AfB66C`](https://polygonscan.com/address/0x64860bFD14fCcaAc09cd36f347784a9616AfB66C) |
***
## Collateral Contracts
| Contract | Address |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| pUSD — CollateralToken (proxy) | [`0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB`](https://polygonscan.com/address/0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB) |
| pUSD — CollateralToken (impl) | [`0x6bBCef9f7ef3B6C592c99e0f206a0DE94Ad0925f`](https://polygonscan.com/address/0x6bBCef9f7ef3B6C592c99e0f206a0DE94Ad0925f) |
| CollateralOnramp | [`0x93070a847efEf7F70739046A929D47a521F5B8ee`](https://polygonscan.com/address/0x93070a847efEf7F70739046A929D47a521F5B8ee) |
| CollateralOfframp | [`0x2957922Eb93258b93368531d39fAcCA3B4dC5854`](https://polygonscan.com/address/0x2957922Eb93258b93368531d39fAcCA3B4dC5854) |
| PermissionedRamp | [`0xebC2459Ec962869ca4c0bd1E06368272732BCb08`](https://polygonscan.com/address/0xebC2459Ec962869ca4c0bd1E06368272732BCb08) |
| CtfCollateralAdapter | [`0xAdA100Db00Ca00073811820692005400218FcE1f`](https://polygonscan.com/address/0xAdA100Db00Ca00073811820692005400218FcE1f) |
| NegRiskCtfCollateralAdapter | [`0xadA2005600Dec949baf300f4C6120000bDB6eAab`](https://polygonscan.com/address/0xadA2005600Dec949baf300f4C6120000bDB6eAab) |
***
## Wallet Factory Contracts
| Contract | Address |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| Deposit Wallet Factory | [`0x00000000000Fb5C9ADea0298D729A0CB3823Cc07`](https://polygonscan.com/address/0x00000000000Fb5C9ADea0298D729A0CB3823Cc07) |
| Deposit Wallet Beacon | [`0x7A18EDfe055488A3128f01F563e5B479D92ffc3a`](https://polygonscan.com/address/0x7A18EDfe055488A3128f01F563e5B479D92ffc3a) |
| Gnosis Safe Factory | [`0xaacfeea03eb1561c4e67d661e40682bd20e3541b`](https://polygonscan.com/address/0xaacfeea03eb1561c4e67d661e40682bd20e3541b) |
| Polymarket Proxy Factory | [`0xaB45c5A4B0c941a2F231C04C3f49182e1A254052`](https://polygonscan.com/address/0xaB45c5A4B0c941a2F231C04C3f49182e1A254052) |
***
## Resolution Contracts
| Contract | Address |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| UMA Adapter | [`0x6A9D222616C90FcA5754cd1333cFD9b7fb6a4F74`](https://polygonscan.com/address/0x6A9D222616C90FcA5754cd1333cFD9b7fb6a4F74) |
| UMA Optimistic Oracle | [`0xCB1822859cEF82Cd2Eb4E6276C7916e692995130`](https://polygonscan.com/address/0xCB1822859cEF82Cd2Eb4E6276C7916e692995130) |
***
## Security
### Audits
CTF Exchange V2 has been audited by two independent firms:
| Auditor | Report |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Quantstamp | [CTF Exchange V2 — Quantstamp — March 2026](https://github.com/Polymarket/ctf-exchange-v2/blob/main/audits/CTF%20Exchange%20V2%20-%20Quantstamp%20-%20March%202026.pdf) |
| Cantina | [CTF Exchange V2 — Cantina — March 2026](https://github.com/Polymarket/ctf-exchange-v2/blob/main/audits/CTF%20Exchange%20V2%20-%20Cantina%20-%20March%202026.pdf) |
### Bug Bounty
Security vulnerabilities can be reported through the [Cantina bug bounty program](https://cantina.xyz/bounties/ff945ca2-2a6e-4b83-b1b6-7a0cd3b94bea).
***
## Source Code
<CardGroup cols={1}>
<Card title="CTF Exchange V2" icon="github" href="https://github.com/Polymarket/ctf-exchange-v2">
Order matching and settlement contracts
</Card>
</CardGroup>
@@ -0,0 +1,586 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Error Codes
> Complete reference for CLOB API error responses
All CLOB API errors return a JSON object with a single `error` field:
```json theme={null}
{
"error": "<message>"
}
```
***
## Global Errors
These errors can occur on **any authenticated endpoint**.
<ResponseField name="401" type="Unauthorized">
`Unauthorized/Invalid api key` — Your API key is missing, expired, or invalid. Ensure you're sending all required [authentication headers](/trading/overview#authentication).
</ResponseField>
<ResponseField name="401" type="Unauthorized">
`Invalid L1 Request headers` — Your L1 authentication headers (HMAC signature) are malformed or the signature doesn't match. See [Authentication](/api-reference/authentication).
</ResponseField>
<ResponseField name="503" type="Service Unavailable">
`Trading is currently disabled. Check polymarket.com for updates` — The exchange is temporarily paused. No orders (including cancels) are accepted.
</ResponseField>
<ResponseField name="429" type="Too Many Requests">
`Too Many Requests` — You've exceeded the [rate limit](/api-reference/rate-limits). Back off and retry with exponential backoff.
</ResponseField>
***
## Order Book
Errors from the order book endpoints.
### GET book
<ResponseField name="400" type="Bad Request">
`Invalid token id` — The `token_id` query parameter is missing or not a valid token ID.
</ResponseField>
<ResponseField name="404" type="Not Found">
`No orderbook exists for the requested token id`
</ResponseField>
### POST books
<ResponseField name="400" type="Bad Request">
`Invalid payload` — The request body is malformed or missing required fields.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Payload exceeds the limit` — Too many token IDs in a single request. Reduce the batch size.
</ResponseField>
***
## Pricing
Errors from price, midpoint, and spread endpoints.
### GET price
<ResponseField name="400" type="Bad Request">
`Invalid token id` — The `token_id` parameter is missing or invalid.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Invalid side` — The `side` parameter must be `BUY` or `SELL`.
</ResponseField>
<ResponseField name="404" type="Not Found">
`No orderbook exists for the requested token id`
</ResponseField>
### POST prices
<ResponseField name="400" type="Bad Request">
`Invalid payload` — The request body is malformed or missing required fields.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Invalid side` — The `side` field must be `BUY` or `SELL`.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Payload exceeds the limit` — Too many token IDs in a single request.
</ResponseField>
### GET midpoint
<ResponseField name="400" type="Bad Request">
`Invalid token id` — The `token_id` parameter is missing or invalid.
</ResponseField>
<ResponseField name="404" type="Not Found">
`No orderbook exists for the requested token id`
</ResponseField>
### POST midpoints
<ResponseField name="400" type="Bad Request">
`Invalid payload` — The request body is malformed or missing required fields.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Payload exceeds the limit` — Too many token IDs in a single request.
</ResponseField>
### GET spread
<ResponseField name="400" type="Bad Request">
`Invalid token id` — The `token_id` parameter is missing or invalid.
</ResponseField>
<ResponseField name="404" type="Not Found">
`No orderbook exists for the requested token id`
</ResponseField>
### POST spreads
<ResponseField name="400" type="Bad Request">
`Invalid payload` — The request body is malformed or missing required fields.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Payload exceeds the limit` — Too many token IDs in a single request.
</ResponseField>
***
## Place Orders
Errors from order placement endpoints.
### POST order
<ResponseField name="400" type="Bad Request">
`Invalid order payload` — The request body is malformed, missing required fields, or contains invalid values.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`the order owner has to be the owner of the API KEY` — The `maker` address in the order doesn't match the address associated with your API key.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`the order signer address has to be the address of the API KEY`
</ResponseField>
<ResponseField name="400" type="Bad Request">
`'{address}' address banned` — This address has been banned from trading.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`'{address}' address in closed only mode`
</ResponseField>
<ResponseField name="503" type="Service Unavailable">
`Trading is currently cancel-only. New orders are not accepted, but cancels are allowed.` — The exchange is in cancel-only mode. You can cancel existing orders but cannot place new orders.
</ResponseField>
<ResponseField name="503" type="Service Unavailable">
`post-only mode: only post-only orders and cancels are allowed` — The exchange is in post-only mode. You can cancel orders and place orders with `postOnly: true`; non-post-only orders are rejected. The response includes `code: "post_only_mode"` and `retry_after_seconds`, and the same retry delay is also sent in the `Retry-After` HTTP header.
</ResponseField>
Example response:
```json theme={null}
{
"error": "post-only mode: only post-only orders and cancels are allowed",
"code": "post_only_mode",
"retry_after_seconds": 79
}
```
The retry delay is also sent in the `Retry-After` HTTP header.
### POST orders
All errors from `POST /order` apply, plus:
<ResponseField name="400" type="Bad Request">
`Too many orders in payload: {N}, max allowed: {M}` — The batch contains more orders than the maximum allowed per request.
</ResponseField>
Per-order errors are returned in the `200` response array, with individual error messages for each failed order.
In post-only mode, non-post-only orders in a batch return per-order errors:
```json theme={null}
[
{
"errorMsg": "post-only mode: only post-only orders and cancels are allowed",
"orderID": "",
"takingAmount": "",
"makingAmount": "",
"status": "",
"success": true
},
{
"errorMsg": "post-only mode: only post-only orders and cancels are allowed",
"orderID": "",
"takingAmount": "",
"makingAmount": "",
"status": "",
"success": true
}
]
```
***
## Order Processing Errors
These errors are returned when an order passes initial validation but fails during processing. They appear in the response body of `POST /order` and `POST /orders`.
<ResponseField name="400" type="Bad Request">
`invalid post-only order: order crosses book` — A post-only (maker) order would immediately match. Adjust the price so it rests on the book.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`order {id} is invalid. Price ({price}) breaks minimum tick size rule: {tick}` — The order price doesn't align with the market's tick size. Use [`GET /tick-size`](/api-reference/clob#get-tick-size) to check the valid tick size.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`order {id} is invalid. Size ({size}) lower than the minimum: {min}` — The order size is below the market minimum.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`order {id} is invalid. Duplicated.`
</ResponseField>
<ResponseField name="400" type="Bad Request">
`order {id} crosses the book`
</ResponseField>
<ResponseField name="400" type="Bad Request">
`not enough balance / allowance` — Insufficient pUSD balance or token allowance. Check your balance with [`GET /balance-allowance`](/api-reference/clob#get-balance-allowance) and approve the exchange contract if needed.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`invalid expiration` — The order expiration timestamp is in the past or invalid.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`order canceled in the CTF exchange contract`
</ResponseField>
<ResponseField name="400" type="Bad Request">
`order match delayed due to market conditions`
</ResponseField>
<ResponseField name="400" type="Bad Request">
`order couldn't be fully filled. FOK orders are fully filled or killed.` — A Fill-or-Kill order could not be completely filled by available liquidity. The entire order is rejected.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`no orders found to match with FAK order. FAK orders are partially filled or killed if no match is found.` — A Fill-and-Kill order found no matching orders at all. At least one match is required.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`the market is not yet ready to process new orders`
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`order timed out` — The exchange could not process the order before the request deadline. This typically happens during bursts of concurrent order submissions from the same account. The order was rejected before reaching the order book and can be safely resubmitted.
</ResponseField>
***
## Matching Engine Errors
Internal matching engine errors that may surface during order execution.
<ResponseField name="425" type="Too Early">
The matching engine is restarting. Retry with exponential backoff. See [Matching Engine](/trading/matching-engine) for details on restart schedule and handling.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`there are no matching orders`
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`FOK orders are filled or killed` — A Fill-or-Kill order could not be fully satisfied.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`the trade contains rounding issues`
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`the price of the taker's order has a discrepancy greater than allowed with the worst maker order`
</ResponseField>
***
## Cancel Orders
Errors from order cancellation endpoints.
### DELETE order
<ResponseField name="400" type="Bad Request">
`Invalid order payload` — The request body is malformed.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Invalid orderID` — The provided order ID is not a valid format.
</ResponseField>
### DELETE orders
<ResponseField name="400" type="Bad Request">
`Invalid order payload` — The request body is malformed.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Too many orders in payload, max allowed: {N}` — Too many order IDs in a single cancellation request.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Invalid orderID` — One or more order IDs are not valid.
</ResponseField>
### DELETE cancel-market-orders
<ResponseField name="400" type="Bad Request">
`Invalid order payload` — The request body is malformed or contains invalid filter parameters.
</ResponseField>
***
## Query Orders
Errors from order query endpoints.
### GET order by ID
<ResponseField name="400" type="Bad Request">
`Invalid orderID` — The order ID in the URL path is not valid.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`Internal server error` — An unexpected error occurred while fetching the order.
</ResponseField>
### GET orders
<ResponseField name="400" type="Bad Request">
`invalid order params payload` — The query parameters are malformed or contain invalid values.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`Internal server error` — An unexpected error occurred while fetching orders.
</ResponseField>
***
## Trades
### GET trades
<ResponseField name="400" type="Bad Request">
`Invalid trade params payload` — The query parameters are malformed or contain invalid values.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`Internal server error` — An unexpected error occurred while fetching trades.
</ResponseField>
### GET last-trade-price
<ResponseField name="400" type="Bad Request">
`Invalid token id` — The `token_id` parameter is missing or invalid.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`Internal server error` — An unexpected error occurred while fetching the last trade price.
</ResponseField>
### POST last-trades-prices
<ResponseField name="400" type="Bad Request">
`Invalid payload` — The request body is malformed or missing required fields.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Payload exceeds the limit` — Too many token IDs in a single request.
</ResponseField>
***
## Markets
### GET market by condition ID
<ResponseField name="400" type="Bad Request">
`Invalid market` — The condition ID is not a valid format.
</ResponseField>
<ResponseField name="404" type="Not Found">
`market not found` — No market exists with this condition ID.
</ResponseField>
### GET tick-size
<ResponseField name="400" type="Bad Request">
`Invalid token id` — The token ID is not valid.
</ResponseField>
<ResponseField name="404" type="Not Found">
`market not found` — No market found for this token ID.
</ResponseField>
### GET neg-risk
<ResponseField name="400" type="Bad Request">
`Invalid token id` — The token ID is not valid.
</ResponseField>
<ResponseField name="404" type="Not Found">
`market not found` — No market found for this token ID.
</ResponseField>
***
## Price History
### GET prices-history
<ResponseField name="400" type="Bad Request">
Filter validation errors — One or more query parameters (`market`, `startTs`, `endTs`, `fidelity`) are invalid.
</ResponseField>
### GET ohlc
<ResponseField name="400" type="Bad Request">
`startTs is required` — The `startTs` query parameter is missing.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`asset_id is required` — The `asset_id` query parameter is missing.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`invalid fidelity: {val}` — The `fidelity` parameter must be one of: `1m`, `5m`, `15m`, `30m`, `1h`, `4h`, `1d`, `1w`.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`limit cannot exceed 1000` — Reduce the `limit` parameter to 1000 or below.
</ResponseField>
### GET orderbook-history
<ResponseField name="400" type="Bad Request">
`startTs is required` — The `startTs` query parameter is missing.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`either market or asset_id must be provided` — You must specify either a `market` (condition ID) or `asset_id` (token ID).
</ResponseField>
<ResponseField name="400" type="Bad Request">
`limit cannot exceed 1000` — Reduce the `limit` parameter to 1000 or below.
</ResponseField>
***
## Authentication and API Keys
### POST auth api-key
<ResponseField name="401" type="Unauthorized">
`Invalid L1 Request headers` — L1 authentication headers are missing or invalid.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Could not create api key`
</ResponseField>
### GET auth api-keys
<ResponseField name="500" type="Internal Server Error">
`Could not retrieve API keys` — An unexpected error occurred while fetching your API keys.
</ResponseField>
### DELETE auth api-key
<ResponseField name="500" type="Internal Server Error">
`Could not delete API key` — An unexpected error occurred while deleting the API key.
</ResponseField>
### GET auth derive-api-key
<ResponseField name="401" type="Unauthorized">
`Invalid L1 Request headers` — L1 authentication headers are missing or invalid.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Could not derive api key!`
</ResponseField>
***
## Builder API Keys
### POST auth builder-api-key
<ResponseField name="500" type="Internal Server Error">
`could not create builder api key` — Builder API key creation failed.
</ResponseField>
### GET auth builder-api-key
<ResponseField name="500" type="Internal Server Error">
`could not get builder api keys` — An unexpected error occurred while fetching builder API keys.
</ResponseField>
### DELETE auth builder-api-key
<ResponseField name="400" type="Bad Request">
`invalid revoke builder api key body` — The request body is malformed.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`invalid revoke builder api key headers` — Required authentication headers are missing.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`could not revoke the builder api key: {key}` — An unexpected error occurred while revoking the key.
</ResponseField>
***
## Builder Trades
### GET builder trades
<ResponseField name="400" type="Bad Request">
`invalid builder trade params` — The query parameters are malformed or contain invalid values.
</ResponseField>
<ResponseField name="500" type="Internal Server Error">
`could not fetch builder trades` — An unexpected error occurred while fetching builder trades.
</ResponseField>
***
## Balance and Allowance
### GET balance-allowance
<ResponseField name="400" type="Bad Request">
`Invalid asset type` — The `asset_type` parameter is not a recognized asset type.
</ResponseField>
<ResponseField name="400" type="Bad Request">
`Invalid signature_type` — The `signature_type` parameter must be `EOA`, `POLY_PROXY`, or `GNOSIS_SAFE`.
</ResponseField>
***
## Status Code Reference
| Status | Meaning | Common Causes |
| ------ | --------------------- | --------------------------------------------------------------------------------------------------- |
| `400` | Bad Request | Invalid parameters, malformed payload, business logic violation |
| `401` | Unauthorized | Missing or invalid API key, bad HMAC signature, expired timestamp |
| `404` | Not Found | Market doesn't exist, order not found, token ID not recognized |
| `425` | Too Early | Matching engine is restarting — retry with backoff. See [Matching Engine](/trading/matching-engine) |
| `429` | Too Many Requests | Rate limit exceeded — implement exponential backoff |
| `500` | Internal Server Error | Unexpected server error — retry with backoff |
| `503` | Service Unavailable | Exchange paused, or order placement blocked by cancel-only / post-only mode |
<Note>
The CLOB API has an internal override: any error message containing `"not found"` returns `404`, `"unauthorized"` returns `401`, and `"context canceled"` returns `400`, regardless of the original status code.
</Note>
@@ -0,0 +1,133 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Referral Program
> Refer traders to Polymarket and earn daily pUSD rewards
<Note>
These updated Referral Program terms take effect on **Thursday, May 28, 2026**.
</Note>
Refer traders to Polymarket and earn a share of the net trading fees they generate, paid every day in pUSD.
To start earning, you need at least **\$10,000** in lifetime trading volume on Polymarket.
***
## Eligibility
* You need **\$10,000** in lifetime trading volume to earn referral rewards.
* You can share links before you reach \$10,000, but you only start earning once you cross the threshold.
***
## How to Refer
Share any market or profile page using the share button on that page. When someone clicks your link and signs up, they become your referral.
* **Direct referral:** someone you personally refer.
* **Indirect referral:** someone referred by one of your referrals. For example, if you refer Alice and Alice refers Bob, then Bob is your indirect referral.
To count, a new user must sign up within **30 days** of clicking your link.
***
## Rewards
You earn a share of the **net** trading fees your referrals generate.
| Type | Reward |
| ----------------- | --------------------------- |
| Direct referral | **10%** of net trading fees |
| Indirect referral | **5%** of net trading fees |
<Note>
Net trading fees are what Polymarket keeps after the referred user's own tier
rebate. The more rebate they earn, the more of their fees go back to them
rather than into your referral reward.
</Note>
### The Caps
Referral rewards are bounded two ways. Rewards on a referral end at whichever of these comes first:
1. **Until Platinum.** Rewards apply on your referral's trades from the moment they sign up through every tier up to and including **Gold**. Once they reach **Platinum**, referral rewards on their trades end.
2. **30 days.** Rewards apply only for the first 30 days after a referral signs up.
### Example
You refer a new trader. From their very first trade and through every tier up to **Gold**, you earn **10%** of the net fees from their trades, paid daily. If they trade actively early on, this is when you earn the most. Your rewards on that referral end once they reach **Platinum** or hit 30 days, whichever happens first.
***
## Payouts
* Rewards are **paid every day at midnight UTC** in pUSD, straight to your account.
* You can watch your referral earnings add up **live**.
***
## Notes
* You earn referral rewards based on the **net** trading fees your referrals generate. Net fees are what Polymarket keeps after the referred user's tier rebate.
* Rewards on a referral start with their first trade and end at whichever of these comes first: the referral reaches **Platinum**, or **30 days** since their sign-up.
* Not all markets have fees. You will not earn from referral activity on free markets, including Geopolitical and world events markets.
* A new user must sign up within **30 days** of clicking your link to be attributed to you.
* Reward rates, windows, tier caps, and any other terms are set by Polymarket and can change at any time without notice.
* Polymarket reserves the right, at its sole discretion, to disqualify referrals and withhold or claw back rewards for activity that breaks our Terms of Service, including but not limited to self-referrals, linked accounts, and inauthentic trading.
***
## FAQ
<AccordionGroup>
<Accordion title="Who can earn referral rewards">
Any Polymarket user with at least \$10,000 in lifetime trading volume. You
can share links before reaching the threshold, but rewards only begin once
you cross it.
</Accordion>
<Accordion title="What is the difference between direct and indirect referrals">
A direct referral is someone you personally refer. An indirect referral is
someone referred by one of your referrals. You earn 10% of net fees from
direct referrals and 5% from indirect referrals.
</Accordion>
<Accordion title="What does net fees mean">
Net fees are what Polymarket keeps after the referred user's own tier
rebate. Your referral reward is a percentage of that net amount.
</Accordion>
<Accordion title="When do my referral rewards stop">
Rewards on a referral start with their first trade and end at whichever of
these comes first: the referral reaches the Platinum tier, or 30 days from
their sign-up.
</Accordion>
<Accordion title="When am I paid">
Rewards are paid once a day at midnight UTC in pUSD, directly to your
account.
</Accordion>
<Accordion title="What is not allowed">
Self-referrals, referring accounts you control, and inauthentic trading are
not allowed. Polymarket may disqualify referrals and claw back rewards for
activity that breaks the Terms of Service.
</Accordion>
</AccordionGroup>
***
## Next Steps
<CardGroup cols={2}>
<Card title="Taker Rebate Program" icon="trophy" href="/trading/taker-rebates">
Climb the tiers and earn daily pUSD rebates as you trade.
</Card>
<Card title="Fee Structure" icon="receipt" href="/trading/fees">
See how taker fees are calculated across market categories.
</Card>
</CardGroup>