Source: https://docs.polymarket.com/api-reference/comments/get-comments-by-comment-id
api-reference/gamma-openapi.json get /comments/{id}
Source: https://docs.polymarket.com/api-reference/comments/get-comments-by-user-address
api-reference/gamma-openapi.json get /comments/user_address/{user_address}
Source: https://docs.polymarket.com/api-reference/comments/list-comments
api-reference/gamma-openapi.json get /comments
Source: https://docs.polymarket.com/api-reference/core/get-closed-positions-for-a-user
api-reference/data-api-openapi.yaml get /closed-positions Fetches closed positions for a user(address)
Source: https://docs.polymarket.com/api-reference/core/get-current-positions-for-a-user
api-reference/data-api-openapi.yaml get /positions Returns positions filtered by user and optional filters.
Source: https://docs.polymarket.com/api-reference/core/get-top-holders-for-markets
api-reference/data-api-openapi.yaml get /holders
Source: https://docs.polymarket.com/api-reference/core/get-total-value-of-a-users-positions
api-reference/data-api-openapi.yaml get /value
Source: https://docs.polymarket.com/api-reference/core/get-trades-for-a-user-or-markets
api-reference/data-api-openapi.yaml get /trades
Source: https://docs.polymarket.com/api-reference/core/get-user-activity
api-reference/data-api-openapi.yaml get /activity Returns on-chain activity for a user.
Source: https://docs.polymarket.com/api-reference/events/get-event-by-id
api-reference/gamma-openapi.json get /events/{id}
Source: https://docs.polymarket.com/api-reference/events/get-event-by-slug
api-reference/gamma-openapi.json get /events/slug/{slug}
Source: https://docs.polymarket.com/api-reference/events/get-event-tags
api-reference/gamma-openapi.json get /events/{id}/tags
Source: https://docs.polymarket.com/api-reference/events/list-events
api-reference/gamma-openapi.json get /events
Source: https://docs.polymarket.com/api-reference/health/health-check
api-reference/data-api-openapi.yaml get /
Source: https://docs.polymarket.com/api-reference/markets/get-market-by-id
api-reference/gamma-openapi.json get /markets/{id}
Source: https://docs.polymarket.com/api-reference/markets/get-market-by-slug
api-reference/gamma-openapi.json get /markets/slug/{slug}
Source: https://docs.polymarket.com/api-reference/markets/get-market-tags-by-id
api-reference/gamma-openapi.json get /markets/{id}/tags
Source: https://docs.polymarket.com/api-reference/markets/list-markets
api-reference/gamma-openapi.json get /markets
Source: https://docs.polymarket.com/api-reference/misc/get-live-volume-for-an-event
api-reference/data-api-openapi.yaml get /live-volume
Source: https://docs.polymarket.com/api-reference/misc/get-open-interest
api-reference/data-api-openapi.yaml get /oi
Source: https://docs.polymarket.com/api-reference/misc/get-total-markets-a-user-has-traded
api-reference/data-api-openapi.yaml get /traded
Source: https://docs.polymarket.com/api-reference/orderbook/get-multiple-order-books-summaries-by-request
api-reference/clob-subset-openapi.yaml post /books Retrieves order book summaries for specified tokens via POST request
Source: https://docs.polymarket.com/api-reference/orderbook/get-order-book-summary
api-reference/clob-subset-openapi.yaml get /book Retrieves the order book summary for a specific token
Source: https://docs.polymarket.com/api-reference/pricing/get-market-price
api-reference/clob-subset-openapi.yaml get /price Retrieves the market price for a specific token and side
Source: https://docs.polymarket.com/api-reference/pricing/get-midpoint-price
api-reference/clob-subset-openapi.yaml get /midpoint Retrieves the midpoint price for a specific token
Source: https://docs.polymarket.com/api-reference/pricing/get-multiple-market-prices
api-reference/clob-subset-openapi.yaml get /prices Retrieves market prices for multiple tokens and sides
Source: https://docs.polymarket.com/api-reference/pricing/get-multiple-market-prices-by-request
api-reference/clob-subset-openapi.yaml post /prices Retrieves market prices for specified tokens and sides via POST request
Source: https://docs.polymarket.com/api-reference/pricing/get-price-history-for-a-traded-token
api-reference/clob-subset-openapi.yaml get /prices-history Fetches historical price data for a specified market token
Source: https://docs.polymarket.com/api-reference/search/search-markets-events-and-profiles
api-reference/gamma-openapi.json get /public-search
Source: https://docs.polymarket.com/api-reference/series/get-series-by-id
api-reference/gamma-openapi.json get /series/{id}
Source: https://docs.polymarket.com/api-reference/series/list-series
api-reference/gamma-openapi.json get /series
Source: https://docs.polymarket.com/api-reference/sports/get-sports-metadata-information
api-reference/gamma-openapi.json get /sports Retrieves metadata for various sports including images, resolution sources, ordering preferences, tags, and series information. This endpoint provides comprehensive sport configuration data used throughout the platform.
Source: https://docs.polymarket.com/api-reference/sports/list-teams
api-reference/gamma-openapi.json get /teams
Source: https://docs.polymarket.com/api-reference/spreads/get-bid-ask-spreads
api-reference/clob-subset-openapi.yaml post /spreads Retrieves bid-ask spreads for multiple tokens
Source: https://docs.polymarket.com/api-reference/tags/get-related-tags-relationships-by-tag-id
api-reference/gamma-openapi.json get /tags/{id}/related-tags
Source: https://docs.polymarket.com/api-reference/tags/get-related-tags-relationships-by-tag-slug
api-reference/gamma-openapi.json get /tags/slug/{slug}/related-tags
Source: https://docs.polymarket.com/api-reference/tags/get-tag-by-id
api-reference/gamma-openapi.json get /tags/{id}
Source: https://docs.polymarket.com/api-reference/tags/get-tag-by-slug
api-reference/gamma-openapi.json get /tags/slug/{slug}
Source: https://docs.polymarket.com/api-reference/tags/get-tags-related-to-a-tag-id
api-reference/gamma-openapi.json get /tags/{id}/related-tags/tags
Source: https://docs.polymarket.com/api-reference/tags/get-tags-related-to-a-tag-slug
api-reference/gamma-openapi.json get /tags/slug/{slug}/related-tags/tags
Source: https://docs.polymarket.com/api-reference/tags/list-tags
api-reference/gamma-openapi.json get /tags
Source: https://docs.polymarket.com/changelog/changelog
Welcome to the Polymarket Changelog. Here you will find any important changes to Polymarket, including but not limited to CLOB, API, UI and Mobile Applications.
limit: 500offset: 1,000
get-book and get-books CLOB endpoints to include key market metadata that previously required separate queries.
min_order_size
neg_risk
tick_size
side field to the MakerOrder portion of the trade object. This field will indicate whether the maker order is a buy or sell, helping to clarify trade events where the maker side was previously ambiguous. For more details, refer to the MakerOrder object on the Get Trades page.
initial_dump
default: true
We’re excited to introduce a new order type soon to be available to all users: Fill and Kill (FAK). FAK orders behave similarly to the well-known Fill or Kil(FOK) orders, but with a key difference:
All API users will enjoy increased rate limits for the CLOB endpoints.
Source: https://docs.polymarket.com/developers/CLOB/authentication
There are two levels of authentication to be considered when using Polymarket’s CLOB.\ All signing can be handled directly by the client libraries. This is information for advanced users who are NOT using our Python or Typescript Clients. Our provided clients handle signing and authentication for you.
The highest level of authentication is via an account’s Polygon private key.\ The private key remains in control of a user’s funds and all trading is non-custodial.\ The operator never has control over users’ funds.
Private key authentication is required for:
| Header | Required? | Description |
|---|---|---|
POLY_ADDRESS |
yes | Polygon address |
POLY_SIGNATURE |
yes | CLOB EIP 712 signature |
POLY_TIMESTAMP |
yes | Current UNIX timestamp |
POLY_NONCE |
yes | Nonce. Default 0 |
The POLY_SIGNATURE is generated by signing the following EIP-712 struct.
Implementations exist in:
domain = {
"name": "ClobAuthDomain",
"version": "1",
"chainId": chainId, # Polygon Chain ID 137
}
types = {
"ClobAuth": [
{"name": "address", "type": "address"},
{"name": "timestamp", "type": "string"},
{"name": "nonce", "type": "uint256"},
{"name": "message", "type": "string"},
]
}
value = {
"address": signingAddress, # The signing address
"timestamp": ts, # The CLOB API server timestamp
"nonce": nonce, # The nonce used
"message": "This message attests that I control the given wallet",
}
sig = await signer._signTypedData(domain, types, value)
const domain = {
name: "ClobAuthDomain",
version: "1",
chainId: chainId, // Polygon Chain ID 137
};
const types = {
ClobAuth: [
{ name: "address", type: "address" },
{ name: "timestamp", type: "string" },
{ name: "nonce", type: "uint256" },
{ name: "message", type: "string" },
],
};
const value = {
address: signingAddress, // The Signing address
timestamp: ts, // The CLOB API server timestamp
nonce: nonce, // The nonce used
message: "This message attests that I control the given wallet", // Static message
};
const sig = await signer._signTypedData(domain, types, value);
The next level of authentication consists of the API key, secret, and passphrase.\ These are used solely to authenticate API requests made to Polymarket’s CLOB, such as posting/canceling orders or retrieving an account’s orders and fills.
When a user on-boards via:
POST /auth/api-key
the server uses the signature as a seed to deterministically generate credentials.\ An API credential includes:
key: UUID identifying the credentialssecret: Secret string used to generate HMACs (not sent with requests)passphrase: Secret string sent with each request, used to encrypt/decrypt the secret (never stored)All private endpoints require an API key signature (L2 Header).
| Header | Required? | Description |
|---|---|---|
POLY_ADDRESS |
yes | Polygon address |
POLY_SIGNATURE |
yes | HMAC signature for request |
POLY_TIMESTAMP |
yes | Current UNIX timestamp |
POLY_API_KEY |
yes | Polymarket API key |
POLY_PASSPHRASE |
yes | Polymarket API key passphrase |
This endpoint requires an L1 Header.
Create new API key credentials for a user.
HTTP Request:
POST {clob-endpoint}/auth/api-key
This endpoint requires an L1 Header.
Derive an existing API key for an address and nonce.
HTTP Request:
GET {clob-endpoint}/auth/derive-api-key
This endpoint requires an L2 Header.
Retrieve all API keys associated with a Polygon address.
HTTP Request:
GET {clob-endpoint}/auth/api-keys
This endpoint requires an L2 Header.
Delete an API key used to authenticate a request.
HTTP Request:
DELETE {clob-endpoint}/auth/api-key
Check the value of cert_required by signer address.
HTTP Request:
GET {clob-endpoint}/auth/access-status
This endpoint requires an L2 Header.
Retrieve the closed-only mode flag status.
HTTP Request:
GET {clob-endpoint}/auth/ban-status/closed-only
Source: https://docs.polymarket.com/developers/CLOB/clients
Polymarket has implemented reference clients that allow programmatic use of the API below:
pip install py-clob-client
from py_clob_client.client import ClobClient
host: str = ""
key: str = ""
chain_id: int = 137
### Initialization of a client that trades directly from an EOA
client = ClobClient(host, key=key, chain_id=chain_id)
### Initialization of a client using a Polymarket Proxy associated with an Email/Magic account
client = ClobClient(host, key=key, chain_id=chain_id, signature_type=1, funder=POLYMARKET_PROXY_ADDRESS)
### Initialization of a client using a Polymarket Proxy associated with a Browser Wallet(Metamask, Coinbase Wallet, etc)
client = ClobClient(host, key=key, chain_id=chain_id, signature_type=2, funder=POLYMARKET_PROXY_ADDRESS)
//npm install @polymarket/clob-client
//npm install ethers
//Client initialization example and dumping API Keys
import { ApiKeyCreds, ClobClient} from "@polymarket/clob-client";
import { Wallet } from "@ethersproject/wallet";
const host = 'https://clob.polymarket.com';
const funder = '';//This is your Polymarket Profile Address, where you send UDSC to.
const signer = new Wallet(""); //This is your Private Key. If using email login export from https://reveal.magic.link/polymarket otherwise export from your Web3 Application
//In general don't create a new API key, always derive or createOrDerive
const creds = new ClobClient(host, 137, signer).createOrDeriveApiKey();
//0: EOA
//1: Magic/Email Login
//2: Metamask
const signatureType = 1;
(async () => {
const clobClient = new ClobClient(host, 137, signer, await creds, signatureType, funder);
})
Polymarket has implemented utility libraries to programmatically sign and generate orders:
Source: https://docs.polymarket.com/developers/CLOB/endpoints
Used for all CLOB REST endpoints, denoted {clob-endpoint}.
An additional endpoint that delivers user data, holdings, and other on-chain activities. https://data-api.polymarket.com/
Used for all CLOB WSS endpoints, denoted {wss-channel}.
wss://ws-subscriptions-clob.polymarket.com/ws/
Used for real-time data streaming including crypto prices and comments, denoted {rtds-endpoint}.
wss://ws-live-data.polymarket.com
Source: https://docs.polymarket.com/developers/CLOB/introduction
Welcome to the Polymarket Order Book API! This documentation provides overviews, explanations, examples, and annotations to simplify interaction with the order book. The following sections detail the Polymarket Order Book and the API usage.
Polymarket's Order Book, or CLOB (Central Limit Order Book), is hybrid-decentralized. It includes an operator for off-chain matching/ordering, with settlement executed on-chain, non-custodially, via signed order messages.
The exchange uses a custom Exchange contract facilitating atomic swaps between binary Outcome Tokens (CTF ERC1155 assets and ERC20 PToken assets) and collateral assets (ERC20), following signed limit orders. Designed for binary markets, the contract enables complementary tokens to match across a unified order book.
Orders are EIP712-signed structured data. Matched orders have one maker and one or more takers, with price improvements benefiting the taker. The operator handles off-chain order management and submits matched trades to the blockchain for on-chain execution.
The Polymarket Order Book API enables market makers and traders to programmatically manage market orders. Orders of any amount can be created, listed, fetched, or read from the market order books. Data includes all available markets, market prices, and order history via REST and WebSocket endpoints.
Polymarket's Exchange contract has been audited by Chainsecurity (View Audit).
The operator's privileges are limited to order matching, non-censorship, and ensuring correct ordering. Operators can't set prices or execute unauthorized trades. Users can cancel orders on-chain independently if trust issues arise.
Subject to change
| Volume Level | Maker Fee Base Rate (bps) | Taker Fee Base Rate (bps) |
|---|---|---|
| >0 USDC | 0 | 0 |
Fees apply symmetrically in output assets (proceeds). This symmetry ensures fairness and market integrity. Fees are calculated differently depending on whether you are buying or selling:
$$ feeQuote = baseRate \times \min(price, 1 - price) \times size $$
$$ feeBase = baseRate \times \min(price, 1 - price) \times \frac{size}{price} $$
Source: https://docs.polymarket.com/developers/CLOB/orders/cancel-orders
Multiple endpoints to cancel a single order, multiple orders, all orders or all orders from a single market.
This endpoint requires a L2 Header.
Cancel an order.
HTTP REQUEST
DELETE /<clob-endpoint>/order
| Name | Required | Type | Description |
|---|---|---|---|
| orderID | yes | string | ID of order to cancel |
| Name | Type | Description |
|---|---|---|
| canceled | string[] | list of canceled orders |
| not_canceled | {} | a order id -> reason map that explains why that order couldn't be canceled |
resp = client.cancel(order_id="0x38a73eed1e6d177545e9ab027abddfb7e08dbe975fa777123b1752d203d6ac88")
print(resp)
async function main() {
// Send it to the server
const resp = await clobClient.cancelOrder({
orderID:
"0x38a73eed1e6d177545e9ab027abddfb7e08dbe975fa777123b1752d203d6ac88",
});
console.log(resp);
console.log(`Done!`);
}
main();
This endpoint requires a L2 Header.
HTTP REQUEST
DELETE /<clob-endpoint>/orders
| Name | Required | Type | Description |
|---|---|---|---|
| null | yes | string[] | IDs of the orders to cancel |
| Name | Type | Description |
|---|---|---|
| canceled | string[] | list of canceled orders |
| not_canceled | {} | a order id -> reason map that explains why that order couldn't be canceled |
resp = client.cancel_orders(["0x38a73eed1e6d177545e9ab027abddfb7e08dbe975fa777123b1752d203d6ac88", "0xaaaa..."])
print(resp)
async function main() {
// Send it to the server
const resp = await clobClient.cancelOrders([
"0x38a73eed1e6d177545e9ab027abddfb7e08dbe975fa777123b1752d203d6ac88",
"0xaaaa...",
]);
console.log(resp);
console.log(`Done!`);
}
main();
This endpoint requires a L2 Header.
Cancel all open orders posted by a user.
HTTP REQUEST
DELETE /<clob-endpoint>/cancel-all
| Name | Type | Description |
|---|---|---|
| canceled | string[] | list of canceled orders |
| not_canceled | {} | a order id -> reason map that explains why that order couldn't be canceled |
resp = client.cancel_all()
print(resp)
print("Done!")
async function main() {
const resp = await clobClient.cancelAll();
console.log(resp);
console.log(`Done!`);
}
main();
This endpoint requires a L2 Header.
Cancel orders from market.
HTTP REQUEST
DELETE /<clob-endpoint>/cancel-market-orders
| Name | Required | Type | Description |
|---|---|---|---|
| market | no | string | condition id of the market |
| asset_id | no | string | id of the asset/token |
| Name | Type | Description |
|---|---|---|
| canceled | string[] | list of canceled orders |
| not_canceled | {} | a order id -> reason map that explains why that order couldn't be canceled |
resp = client.cancel_market_orders(market="0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af", asset_id="52114319501245915516055106046884209969926127482827954674443846427813813222426")
print(resp)
async function main() {
// Send it to the server
const resp = await clobClient.cancelMarketOrders({
market:
"0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
asset_id:
"52114319501245915516055106046884209969926127482827954674443846427813813222426",
});
console.log(resp);
console.log(`Done!`);
}
main();
Source: https://docs.polymarket.com/developers/CLOB/orders/check-scoring
Check if an order is eligble or scoring for Rewards purposes
This endpoint requires a L2 Header.
Returns a boolean value where it is indicated if an order is scoring or not.
HTTP REQUEST
GET /<clob-endpoint>/order-scoring?order_id={...}
| Name | Required | Type | Description |
|---|---|---|---|
| orderId | yes | string | id of order to get information about |
| Name | Type | Description |
|---|---|---|
| null | OrdersScoring | order scoring data |
An OrdersScoring object is of the form:
| Name | Type | Description |
|---|---|---|
| scoring | boolean | indicates if the order is scoring or not |
This endpoint requires a L2 Header.
Returns to a dictionary with boolean value where it is indicated if an order is scoring or not.
HTTP REQUEST
POST /<clob-endpoint>/orders-scoring
| Name | Required | Type | Description |
|---|---|---|---|
| orderIds | yes | string[] | ids of the orders to get information about |
| Name | Type | Description |
|---|---|---|
| null | OrdersScoring | orders scoring data |
An OrdersScoring object is a dictionary that indicates the order by if it score.
scoring = client.is_order_scoring(
OrderScoringParams(
orderId="0x..."
)
)
print(scoring)
scoring = client.are_orders_scoring(
OrdersScoringParams(
orderIds=["0x..."]
)
)
print(scoring)
async function main() {
const scoring = await clobClient.isOrderScoring({
orderId: "0x...",
});
console.log(scoring);
}
main();
async function main() {
const scoring = await clobClient.areOrdersScoring({
orderIds: ["0x..."],
});
console.log(scoring);
}
main();
Source: https://docs.polymarket.com/developers/CLOB/orders/create-order
Detailed instructions for creating, placing, and managing orders using Polymarket's CLOB API.
This endpoint requires a L2 Header
Create and place an order using the Polymarket CLOB API clients. All orders are represented as "limit" orders, but "market" orders are also supported. To place a market order, simply ensure your price is marketable against current resting limit orders, which are executed on input at the best price.
HTTP REQUEST
POST /<clob-endpoint>/order
| Name | Required | Type | Description |
|---|---|---|---|
| order | yes | Order | signed object |
| owner | yes | string | api key of order owner |
| orderType | yes | string | order type ("FOK", "GTC", "GTD") |
An order object is the form:
| Name | Required | Type | Description |
|---|---|---|---|
| salt | yes | integer | random salt used to create unique order |
| maker | yes | string | maker address (funder) |
| signer | yes | string | signing address |
| taker | yes | string | taker address (operator) |
| tokenId | yes | string | ERC1155 token ID of conditional token being traded |
| makerAmount | yes | string | maximum amount maker is willing to spend |
| takerAmount | yes | string | minimum amount taker will pay the maker in return |
| expiration | yes | string | unix expiration timestamp |
| nonce | yes | string | maker's exchange nonce of the order is associated |
| feeRateBps | yes | string | fee rate basis points as required by the operator |
| side | yes | string | buy or sell enum index |
| signatureType | yes | integer | signature type enum index |
| signature | yes | string | hex encoded signature |
| Name | Type | Description |
|---|---|---|
| success | boolean | boolean indicating if server-side err (success = false) -> server-side error |
| errorMsg | string | error message in case of unsuccessful placement (in case success = false, e.g. client-side error, the reason is in errorMsg) |
| orderId | string | id of order |
| orderHashes | string[] | hash of settlement transaction order was marketable and triggered a match |
If the errorMsg field of the response object from placement is not an empty string, the order was not able to be immediately placed. This might be because of a delay or because of a failure. If the success is not true, then there was an issue placing the order. The following errorMessages are possible:
| Error | Success | Message | Description |
|---|---|---|---|
| INVALID_ORDER_MIN_TICK_SIZE | yes | order is invalid. Price breaks minimum tick size rules | order price isn't accurate to correct tick sizing |
| INVALID_ORDER_MIN_SIZE | yes | order is invalid. Size lower than the minimum | order size must meet min size threshold requirement |
| INVALID_ORDER_DUPLICATED | yes | order is invalid. Duplicated. Same order has already been placed, can't be placed again | |
| INVALID_ORDER_NOT_ENOUGH_BALANCE | yes | not enough balance / allowance | funder address doesn't have sufficient balance or allowance for order |
| INVALID_ORDER_EXPIRATION | yes | invalid expiration | expiration field expresses a time before now |
| INVALID_ORDER_ERROR | yes | could not insert order | system error while inserting order |
| EXECUTION_ERROR | yes | could not run the execution | system error while attempting to execute trade |
| ORDER_DELAYED | no | order match delayed due to market conditions | order placement delayed |
| DELAYING_ORDER_ERROR | yes | error delaying the order | system error while delaying order |
| FOK_ORDER_NOT_FILLED_ERROR | yes | order couldn't be fully filled, FOK orders are fully filled/killed | FOK order not fully filled so can't be placed |
| MARKET_NOT_READY | no | the market is not yet ready to process new orders | system not accepting orders for market yet |
When placing an order, a status field is included. The status field provides additional information regarding the order's state as a result of the placement. Possible values include:
| Status | Description |
|---|---|
| matched | order placed and matched with an existing resting order |
| live | order placed and resting on the book |
| delayed | order marketable, but subject to matching delay |
| unmatched | order marketable, but failure delaying, placement successful |
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import OrderArgs, OrderType
from py_clob_client.order_builder.constants import BUY
host: str = "https://clob.polymarket.com"
key: str = "" #This is your Private Key. Export from reveal.polymarket.com or from your Web3 Application
chain_id: int = 137 #No need to adjust this
POLYMARKET_PROXY_ADDRESS: str = '' #This is the address you deposit/send USDC to to FUND your Polymarket account.
#Select from the following 3 initialization options to matches your login method, and remove any unused lines so only one client is initialized.
### Initialization of a client using a Polymarket Proxy associated with an Email/Magic account. If you login with your email use this example.
client = ClobClient(host, key=key, chain_id=chain_id, signature_type=1, funder=POLYMARKET_PROXY_ADDRESS)
### Initialization of a client using a Polymarket Proxy associated with a Browser Wallet(Metamask, Coinbase Wallet, etc)
client = ClobClient(host, key=key, chain_id=chain_id, signature_type=2, funder=POLYMARKET_PROXY_ADDRESS)
### Initialization of a client that trades directly from an EOA.
client = ClobClient(host, key=key, chain_id=chain_id)
## Create and sign a limit order buying 100 YES tokens for 0.50c each
#Refer to the Markets API documentation to locate a tokenID: https://docs.polymarket.com/developers/gamma-markets-api/get-markets
client.set_api_creds(client.create_or_derive_api_creds())
order_args = OrderArgs(
price=0.01,
size=5.0,
side=BUY,
token_id="", #Token ID you want to purchase goes here.
)
signed_order = client.create_order(order_args)
## GTC(Good-Till-Cancelled) Order
resp = client.post_order(signed_order, OrderType.GTC)
print(resp)
// GTC Order example
//
import { Side, OrderType } from "@polymarket/clob-client";
async function main() {
// Create a buy order for 100 YES for 0.50c
// YES: 71321045679252212594626385532706912750332728571942532289631379312455583992563
const order = await clobClient.createOrder({
tokenID:
"71321045679252212594626385532706912750332728571942532289631379312455583992563",
price: 0.5,
side: Side.BUY,
size: 100,
feeRateBps: 0,
nonce: 1,
});
console.log("Created Order", order);
// Send it to the server
// GTC Order
const resp = await clobClient.postOrder(order, OrderType.GTC);
console.log(resp);
}
main();
// GTD Order example
//
import { Side, OrderType } from "@polymarket/clob-client";
async function main() {
// Create a buy order for 100 YES for 0.50c that expires in 1 minute
// YES: 71321045679252212594626385532706912750332728571942532289631379312455583992563
// There is a 1 minute of security threshold for the expiration field.
// If we need the order to expire in 30 seconds the correct expiration value is:
// now + 1 miute + 30 seconds
const oneMinute = 60 * 1000;
const seconds = 30 * 1000;
const expiration = parseInt(
((new Date().getTime() + oneMinute + seconds) / 1000).toString()
);
const order = await clobClient.createOrder({
tokenID:
"71321045679252212594626385532706912750332728571942532289631379312455583992563",
price: 0.5,
side: Side.BUY,
size: 100,
feeRateBps: 0,
nonce: 1,
// There is a 1 minute of security threshold for the expiration field.
// If we need the order to expire in 30 seconds the correct expiration value is:
// now + 1 miute + 30 seconds
expiration: expiration,
});
console.log("Created Order", order);
// Send it to the server
// GTD Order
const resp = await clobClient.postOrder(order, OrderType.GTD);
console.log(resp);
}
main();
// FOK BUY Order example
//
import { Side, OrderType } from "@polymarket/clob-client";
async function main() {
// Create a market buy order for $100
// YES: 71321045679252212594626385532706912750332728571942532289631379312455583992563
const marketOrder = await clobClient.createMarketOrder({
side: Side.BUY,
tokenID:
"71321045679252212594626385532706912750332728571942532289631379312455583992563",
amount: 100, // $$$
feeRateBps: 0,
nonce: 0,
price: 0.5,
});
console.log("Created Order", order);
// Send it to the server
// FOK Order
const resp = await clobClient.postOrder(order, OrderType.FOK);
console.log(resp);
}
main();
// FOK SELL Order example
//
import { Side, OrderType } from "@polymarket/clob-client";
async function main() {
// Create a market sell order for 100 shares
// YES: 71321045679252212594626385532706912750332728571942532289631379312455583992563
const marketOrder = await clobClient.createMarketOrder({
side: Side.SELL,
tokenID:
"71321045679252212594626385532706912750332728571942532289631379312455583992563",
amount: 100, // shares
feeRateBps: 0,
nonce: 0,
price: 0.5,
});
console.log("Created Order", order);
// Send it to the server
// FOK Order
const resp = await clobClient.postOrder(order, OrderType.FOK);
console.log(resp);
}
main();
Source: https://docs.polymarket.com/developers/CLOB/orders/create-order-batch
Instructions for placing multiple orders(Batch)
This endpoint requires a L2 Header
Polymarket’s CLOB supports batch orders, allowing you to place up to 15 orders in a single request. Before using this feature, make sure you're comfortable placing a single order first. You can find the documentation for that here.
HTTP REQUEST
POST /<clob-endpoint>/orders
| Name | Required | Type | Description |
|---|---|---|---|
| PostOrder | yes | PostOrders[] | list of signed order objects (Signed Order + Order Type + Owner) |
A PostOrder object is the form:
| Name | Required | Type | Description |
|---|---|---|---|
| order | yes | order | See below table for details on crafting this object |
| orderType | yes | string | order type ("FOK", "GTC", "GTD", "FAK") |
| owner | yes | string | api key of order owner |
An order object is the form:
| Name | Required | Type | Description |
|---|---|---|---|
| salt | yes | integer | random salt used to create unique order |
| maker | yes | string | maker address (funder) |
| signer | yes | string | signing address |
| taker | yes | string | taker address (operator) |
| tokenId | yes | string | ERC1155 token ID of conditional token being traded |
| makerAmount | yes | string | maximum amount maker is willing to spend |
| takerAmount | yes | string | minimum amount taker will pay the maker in return |
| expiration | yes | string | unix expiration timestamp |
| nonce | yes | string | maker's exchange nonce of the order is associated |
| feeRateBps | yes | string | fee rate basis points as required by the operator |
| side | yes | string | buy or sell enum index |
| signatureType | yes | integer | signature type enum index |
| signature | yes | string | hex encoded signature |
| Name | Type | Description |
|---|---|---|
| success | boolean | boolean indicating if server-side err (success = false) -> server-side error |
| errorMsg | string | error message in case of unsuccessful placement (in case success = false, e.g. client-side error, the reason is in errorMsg) |
| orderId | string | id of order |
| orderHashes | string[] | hash of settlement transaction order was marketable and triggered a match |
If the errorMsg field of the response object from placement is not an empty string, the order was not able to be immediately placed. This might be because of a delay or because of a failure. If the success is not true, then there was an issue placing the order. The following errorMessages are possible:
| Error | Success | Message | Description |
|---|---|---|---|
| INVALID_ORDER_MIN_TICK_SIZE | yes | order is invalid. Price breaks minimum tick size rules | order price isn't accurate to correct tick sizing |
| INVALID_ORDER_MIN_SIZE | yes | order is invalid. Size lower than the minimum | order size must meet min size threshold requirement |
| INVALID_ORDER_DUPLICATED | yes | order is invalid. Duplicated. Same order has already been placed, can't be placed again | |
| INVALID_ORDER_NOT_ENOUGH_BALANCE | yes | not enough balance / allowance | funder address doesn't have sufficient balance or allowance for order |
| INVALID_ORDER_EXPIRATION | yes | invalid expiration | expiration field expresses a time before now |
| INVALID_ORDER_ERROR | yes | could not insert order | system error while inserting order |
| EXECUTION_ERROR | yes | could not run the execution | system error while attempting to execute trade |
| ORDER_DELAYED | no | order match delayed due to market conditions | order placement delayed |
| DELAYING_ORDER_ERROR | yes | error delaying the order | system error while delaying order |
| FOK_ORDER_NOT_FILLED_ERROR | yes | order couldn't be fully filled, FOK orders are fully filled/killed | FOK order not fully filled so can't be placed |
| MARKET_NOT_READY | no | the market is not yet ready to process new orders | system not accepting orders for market yet |
When placing an order, a status field is included. The status field provides additional information regarding the order's state as a result of the placement. Possible values include:
| Status | Description |
|---|---|
| matched | order placed and matched with an existing resting order |
| live | order placed and resting on the book |
| delayed | order marketable, but subject to matching delay |
| unmatched | order marketable, but failure delaying, placement successful |
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import OrderArgs, OrderType, PostOrdersArgs
from py_clob_client.order_builder.constants import BUY
host: str = "https://clob.polymarket.com"
key: str = "" ##This is your Private Key. Export from https://reveal.magic.link/polymarket or from your Web3 Application
chain_id: int = 137 #No need to adjust this
POLYMARKET_PROXY_ADDRESS: str = '' #This is the address listed below your profile picture when using the Polymarket site.
#Select from the following 3 initialization options to matches your login method, and remove any unused lines so only one client is initialized.
### Initialization of a client using a Polymarket Proxy associated with an Email/Magic account. If you login with your email use this example.
client = ClobClient(host, key=key, chain_id=chain_id, signature_type=1, funder=POLYMARKET_PROXY_ADDRESS)
### Initialization of a client using a Polymarket Proxy associated with a Browser Wallet(Metamask, Coinbase Wallet, etc)
client = ClobClient(host, key=key, chain_id=chain_id, signature_type=2, funder=POLYMARKET_PROXY_ADDRESS)
### Initialization of a client that trades directly from an EOA.
client = ClobClient(host, key=key, chain_id=chain_id)
## Create and sign a limit order buying 100 YES tokens for 0.50c each
#Refer to the Markets API documentation to locate a tokenID: https://docs.polymarket.com/developers/gamma-markets-api/get-markets
client.set_api_creds(client.create_or_derive_api_creds())
resp = client.post_orders([
PostOrdersArgs(
# Create and sign a limit order buying 100 YES tokens for 0.50 each
order=client.create_order(OrderArgs(
price=0.01,
size=5,
side=BUY,
token_id="88613172803544318200496156596909968959424174365708473463931555296257475886634",
)),
orderType=OrderType.GTC, # Good 'Til Cancelled
),
PostOrdersArgs(
# Create and sign a limit order selling 200 NO tokens for 0.25 each
order=client.create_order(OrderArgs(
price=0.01,
size=5,
side=BUY,
token_id="93025177978745967226369398316375153283719303181694312089956059680730874301533",
)),
orderType=OrderType.GTC, # Good 'Til Cancelled
)
])
print(resp)
print("Done!")
import { ethers } from "ethers";
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
import { ApiKeyCreds, Chain, ClobClient, OrderType, PostOrdersArgs, Side } from "../src";
dotenvConfig({ path: resolve(__dirname, "../.env") });
async function main() {
const wallet = new ethers.Wallet(`${process.env.PK}`);
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.AMOY}`) as Chain;
console.log(`Address: ${await wallet.getAddress()}, chainId: ${chainId}`);
const host = process.env.CLOB_API_URL || "https://clob.polymarket.com";
const creds: ApiKeyCreds = {
key: `${process.env.CLOB_API_KEY}`,
secret: `${process.env.CLOB_SECRET}`,
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
};
const clobClient = new ClobClient(host, chainId, wallet, creds);
await clobClient.cancelAll();
const YES = "71321045679252212594626385532706912750332728571942532289631379312455583992563";
const orders: PostOrdersArgs[] = [
{
order: await clobClient.createOrder({
tokenID: YES,
price: 0.4,
side: Side.BUY,
size: 100,
}),
orderType: OrderType.GTC,
},
{
order: await clobClient.createOrder({
tokenID: YES,
price: 0.45,
side: Side.BUY,
size: 100,
}),
orderType: OrderType.GTC,
},
{
order: await clobClient.createOrder({
tokenID: YES,
price: 0.55,
side: Side.SELL,
size: 100,
}),
orderType: OrderType.GTC,
},
{
order: await clobClient.createOrder({
tokenID: YES,
price: 0.6,
side: Side.SELL,
size: 100,
}),
orderType: OrderType.GTC,
},
];
// Send it to the server
const resp = await clobClient.postOrders(orders);
console.log(resp);
}
main();
[
{'order': {'salt': 660377097, 'maker': '0x17A9568474b5fc84B1D1C44f081A0a3aDE750B2b', 'signer': '0x17A9568474b5fc84B1D1C44f081A0a3aDE750B2b', 'taker': '0x0000000000000000000000000000000000000000', 'tokenId': '88613172803544318200496156596909968959424174365708473463931555296257475886634', 'makerAmount': '50000', 'takerAmount': '5000000', 'expiration': '0', 'nonce': '0', 'feeRateBps': '0', 'side': 'BUY', 'signatureType': 0, 'signature': '0xccb8d1298d698ebc0859e6a26044c848ac4a4b0e20a391a4574e42b9c9bf237e5fa09fc00743e3e2d2f8e909a21d60f276ce083cc35c6661410b892f5bcbe2291c'}, 'owner': 'PRIVATEKEY', 'orderType': 'GTC'},
{'order': {'salt': 1207111323, 'maker': '0x17A9568474b5fc84B1D1C44f081A0a3aDE750B2b', 'signer': '0x17A9568474b5fc84B1D1C44f081A0a3aDE750B2b', 'taker': '0x0000000000000000000000000000000000000000', 'tokenId': '93025177978745967226369398316375153283719303181694312089956059680730874301533', 'makerAmount': '50000', 'takerAmount': '5000000', 'expiration': '0', 'nonce': '0', 'feeRateBps': '0', 'side': 'BUY', 'signatureType': 0, 'signature': '0x0feca28666283824c27d7bead0bc441dde6df20dd71ef5ff7c84d3d1d5bf8aa4296fa382769dc11a92abe05b6f731d6c32556e9b4fb29e6eb50131af23a9ac941c'}, 'owner': 'PRIVATEKEY', 'orderType': 'GTC'}
]
Source: https://docs.polymarket.com/developers/CLOB/orders/get-active-order
This endpoint requires a L2 Header.
Get active order(s) for a specific market.
HTTP REQUEST
GET /<clob-endpoint>/data/orders
| Name | Required | Type | Description |
|---|---|---|---|
| id | no | string | id of order to get information about |
| market | no | string | condition id of market |
| asset_id | no | string | id of the asset/token |
| Name | Type | Description |
|---|---|---|
| null | OpenOrder[] | list of open orders filtered by the query parameters |
from py_clob_client.clob_types import OpenOrderParams
resp = client.get_orders(
OpenOrderParams(
market="0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
)
)
print(resp)
print("Done!")
async function main() {
const resp = await clobClient.getOpenOrders({
market:
"0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
});
console.log(resp);
console.log(`Done!`);
}
main();
Source: https://docs.polymarket.com/developers/CLOB/orders/get-order
Get information about an existing order
This endpoint requires a L2 Header.
Get single order by id.
HTTP REQUEST
GET /<clob-endpoint>/data/order/<order_hash>
| Name | Required | Type | Description |
|---|---|---|---|
| id | no | string | id of order to get information about |
| Name | Type | Description |
|---|---|---|
| order | OpenOrder | order if it exists |
An OpenOrder object is of the form:
| Name | Type | Description |
|---|---|---|
| associate_trades | string[] | any Trade id the order has been partially included in |
| id | string | order id |
| status | string | order current status |
| market | string | market id (condition id) |
| original_size | string | original order size at placement |
| outcome | string | human readable outcome the order is for |
| maker_address | string | maker address (funder) |
| owner | string | api key |
| price | string | price |
| side | string | buy or sell |
| size_matched | string | size of order that has been matched/filled |
| asset_id | string | token id |
| expiration | string | unix timestamp when the order expired, 0 if it does not expire |
| type | string | order type (GTC, FOK, GTD) |
| created_at | string | unix timestamp when the order was created |
order = clob_client.get_order("0xb816482a5187a3d3db49cbaf6fe3ddf24f53e6c712b5a4bf5e01d0ec7b11dabc")
print(order)
async function main() {
const order = await clobClient.getOrder(
"0xb816482a5187a3d3db49cbaf6fe3ddf24f53e6c712b5a4bf5e01d0ec7b11dabc"
);
console.log(order);
}
main();
Source: https://docs.polymarket.com/developers/CLOB/orders/onchain-order-info
Given an OrderFilled event:
orderHash: a unique hash for the Order being filledmaker: the user generating the order and the source of funds for the ordertaker: the user filling the order OR the Exchange contract if the order fills multiple limit ordersmakerAssetId: id of the asset that is given out. If 0, indicates that the Order is a BUY, giving USDC in exchange for Outcome tokens. Else, indicates that the Order is a SELL, giving Outcome tokens in exchange for USDC.takerAssetId: id of the asset that is received. If 0, indicates that the Order is a SELL, receiving USDC in exchange for Outcome tokens. Else, indicates that the Order is a BUY, receiving Outcome tokens in exchange for USDC.makerAmountFilled: the amount of the asset that is given out.takerAmountFilled: the amount of the asset that is received.fee: the fees paid by the order makerSource: https://docs.polymarket.com/developers/CLOB/orders/orders
Detailed instructions for creating, placing, and managing orders using Polymarket's CLOB API.
All orders are expressed as limit orders (can be marketable). The underlying order primitive must be in the form expected and executable by the on-chain binary limit order protocol contract. Preparing such an order is quite involved (structuring, hashing, signing), thus Polymarket suggests using the open source typescript, python and golang libraries.
To place an order, allowances must be set by the funder address for the specified maker asset for the Exchange contract. When buying, this means the funder must have set a USDC allowance greater than or equal to the spending amount. When selling, the funder must have set an allowance for the conditional token that is greater than or equal to the selling amount. This allows the Exchange contract to execute settlement according to the signed order instructions created by a user and matched by the operator.
Polymarket’s CLOB supports 3 signature types. Orders must identify what signature type they use. The available typescript and python clients abstract the complexity of signing and preparing orders with the following signature types by allowing a funder address and signer type to be specified on initialization. The supported signature types are:
| Type | ID | Description | | ------------------ | -- | ------------------------------------------------------------------------------------------ | | EOA | 0 | EIP712 signature signed by an EOA | | POLY_PROXY | 1 | EIP712 signatures signed by a signer associated with funding Polymarket proxy wallet | | POLY_GNOSIS_SAFE | 2 | EIP712 signatures signed by a signer associated with funding Polymarket gnosis safe wallet |
Orders are continually monitored to make sure they remain valid. Specifically, this includes continually tracking underlying balances, allowances and on-chain order cancellations. Any maker that is caught intentionally abusing these checks (which are essentially real time) will be blacklisted.
Additionally, there are rails on order placement in a market. Specifically, you can only place orders that sum to less than or equal to your available balance for each market. For example if you have 500 USDC in your funding wallet, you can place one order to buy 1000 YES in marketA @ \$.50, then any additional buy orders to that market will be rejected since your entire balance is reserved for the first (and only) buy order. More explicitly the max size you can place for an order is:
$$ \text{maxOrderSize} = \text{underlyingAssetBalance} - \sum(\text{orderSize} - \text{orderFillAmount}) $$
Source: https://docs.polymarket.com/developers/CLOB/status
Check the status of the Polymarket Order Book:
Source: https://docs.polymarket.com/developers/CLOB/trades/trades
This endpoint requires a L2 Header.
Get trades for the authenticated user based on the provided filters.
HTTP REQUEST
GET /<clob-endpoint>/data/trades
| Name | Required | Type | Description |
|---|---|---|---|
| id | no | string | id of trade to fetch |
| taker | no | string | address to get trades for where it is included as a taker |
| maker | no | string | address to get trades for where it is included as a maker |
| market | no | string | market for which to get the trades (condition ID) |
| before | no | string | unix timestamp representing the cutoff up to which trades that happened before then can be included |
| after | no | string | unix timestamp representing the cutoff for which trades that happened after can be included |
| Name | Type | Description |
|---|---|---|
| null | Trade[] | list of trades filtered by query parameters |
A Trade object is of the form:
| Name | Type | Description |
|---|---|---|
| id | string | trade id |
| taker_order_id | string | hash of taker order (market order) that catalyzed the trade |
| market | string | market id (condition id) |
| asset_id | string | asset id (token id) of taker order (market order) |
| side | string | buy or sell |
| size | string | size |
| fee_rate_bps | string | the fees paid for the taker order expressed in basic points |
| price | string | limit price of taker order |
| status | string | trade status (see above) |
| match_time | string | time at which the trade was matched |
| last_update | string | timestamp of last status update |
| outcome | string | human readable outcome of the trade |
| maker_address | string | funder address of the taker of the trade |
| owner | string | api key of taker of the trade |
| transaction_hash | string | hash of the transaction where the trade was executed |
| bucket_index | integer | index of bucket for trade in case trade is executed in multiple transactions |
| maker_orders | MakerOrder[] | list of the maker trades the taker trade was filled against |
| type | string | side of the trade: TAKER or MAKER |
A MakerOrder object is of the form:
| Name | Type | Description |
|---|---|---|
| order_id | string | id of maker order |
| maker_address | string | maker address of the order |
| owner | string | api key of the owner of the order |
| matched_amount | string | size of maker order consumed with this trade |
| fee_rate_bps | string | the fees paid for the taker order expressed in basic points |
| price | string | price of maker order |
| asset_id | string | token/asset id |
| outcome | string | human readable outcome of the maker order |
| side | string | the side of the maker order. Can be buy or sell |
from py_clob_client.clob_types import TradeParams
resp = client.get_trades(
TradeParams(
maker_address=client.get_address(),
market="0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
),
)
print(resp)
print("Done!")
async function main() {
const trades = await clobClient.getTrades({
market:
"0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
maker_address: await wallet.getAddress(),
});
console.log(`trades: `);
console.log(trades);
}
main();
Source: https://docs.polymarket.com/developers/CLOB/trades/trades-overview
All historical trades can be fetched via the Polymarket CLOB REST API. A trade is initiated by a "taker" who creates a marketable limit order. This limit order can be matched against one or more resting limit orders on the associated book. A trade can be in various states as described below. Note: in some cases (due to gas limitations) the execution of a "trade" must be broken into multiple transactions which case separate trade entities will be returned. To associate trade entities, there is a bucket_index field and a match_time field. Trades that have been broken into multiple trade objects can be reconciled by combining trade objects with the same market_order_id, match_time and incrementing bucket_index's into a top level "trade" client side.
| Status | Terminal? | Description |
|---|---|---|
| MATCHED | no | trade has been matched and sent to the executor service by the operator, the executor service submits the trade as a transaction to the Exchange contract |
| MINED | no | trade is observed to be mined into the chain, no finality threshold established |
| CONFIRMED | yes | trade has achieved strong probabilistic finality and was successful |
| RETRYING | no | trade transaction has failed (revert or reorg) and is being retried/resubmitted by the operator |
| FAILED | yes | trade has failed and is not being retried |
Source: https://docs.polymarket.com/developers/CLOB/websocket/market-channel
Public channel for updates related to market updates (level 2 price data).
SUBSCRIBE
<wss-channel> market
Emitted When:
| Name | Type | Description |
|---|---|---|
| event_type | string | "book" |
| asset_id | string | asset ID (token ID) |
| market | string | condition ID of market |
| timestamp | string | unix timestamp the current book generation in milliseconds (1/1,000 second) |
| hash | string | hash summary of the orderbook content |
| buys | OrderSummary[] | list of type (size, price) aggregate book levels for buys |
| sells | OrderSummary[] | list of type (size, price) aggregate book levels for sells |
Where a OrderSummary object is of the form:
| Name | Type | Description |
|---|---|---|
| price | string | size available at that price level |
| size | string | price of the orderbook level |
{
"event_type": "book",
"asset_id": "65818619657568813474341868652308942079804919287380422192892211131408793125422",
"market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
"bids": [
{ "price": ".48", "size": "30" },
{ "price": ".49", "size": "20" },
{ "price": ".50", "size": "15" }
],
"asks": [
{ "price": ".52", "size": "25" },
{ "price": ".53", "size": "60" },
{ "price": ".54", "size": "10" }
],
"timestamp": "123456789000",
"hash": "0x0...."
}
Emitted When:
| Name | Type | Description |
|---|---|---|
| event_type | string | "price_change" |
| market | string | condition ID of market |
| price_changes | PriceChange[] | array of price change objects |
| timestamp | string | unix timestamp in milliseconds |
Where a PriceChange object is of the form:
| Name | Type | Description |
|---|---|---|
| asset_id | string | asset ID (token ID) |
| price | string | price level affected |
| size | string | new aggregate size for price level |
| side | string | "BUY" or "SELL" |
| hash | string | hash of the order |
| best_bid | string | current best bid price |
| best_ask | string | current best ask price |
{
"market": "0x5f65177b394277fd294cd75650044e32ba009a95022d88a0c1d565897d72f8f1",
"price_changes": [
{
"asset_id": "71321045679252212594626385532706912750332728571942532289631379312455583992563",
"price": "0.5",
"size": "200",
"side": "BUY",
"hash": "56621a121a47ed9333273e21c83b660cff37ae50",
"best_bid": "0.5",
"best_ask": "1"
},
{
"asset_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
"price": "0.5",
"size": "200",
"side": "SELL",
"hash": "1895759e4df7a796bf4f1c5a5950b748306923e2",
"best_bid": "0",
"best_ask": "0.5"
}
],
"timestamp": "1757908892351",
"event_type": "price_change"
}
Emitted When:
| Name | Type | Description |
|---|---|---|
| event_type | string | "price_change" |
| asset_id | string | asset ID (token ID) |
| market | string | condition ID of market |
| old_tick_size | string | previous minimum tick size |
| new_tick_size | string | current minimum tick size |
| side | string | buy/sell |
| timestamp | string | time of event |
{
"event_type": "tick_size_change",
"asset_id": "65818619657568813474341868652308942079804919287380422192892211131408793125422",\
"market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
"old_tick_size": "0.01",
"new_tick_size": "0.001",
"timestamp": "100000000"
}
Emitted When:
When a maker and taker order is matched creating a trade event.
{
"asset_id":"114122071509644379678018727908709560226618148003371446110114509806601493071694",
"event_type":"last_trade_price",
"fee_rate_bps":"0",
"market":"0x6a67b9d828d53862160e470329ffea5246f338ecfffdf2cab45211ec578b0347",
"price":"0.456",
"side":"BUY",
"size":"219.217767",
"timestamp":"1750428146322"
}
Source: https://docs.polymarket.com/developers/CLOB/websocket/user-channel
Authenticated channel for updates related to user activities (orders, trades), filtered for authenticated user by apikey.
SUBSCRIBE
<wss-channel> user
Emitted when:
| Name | Type | Description |
|---|---|---|
| asset_id | string | asset id (token ID) of order (market order) |
| event_type | string | "trade" |
| id | string | trade id |
| last_update | string | time of last update to trade |
| maker_orders | MakerOrder[] | array of maker order details |
| market | string | market identifier (condition ID) |
| matchtime | string | time trade was matched |
| outcome | string | outcome |
| owner | string | api key of event owner |
| price | string | price |
| side | string | BUY/SELL |
| size | string | size |
| status | string | trade status |
| taker_order_id | string | id of taker order |
| timestamp | string | time of event |
| trade_owner | string | api key of trade owner |
| type | string | "TRADE" |
Where a MakerOrder object is of the form:
| Name | Type | Description |
|---|---|---|
| asset_id | string | asset of the maker order |
| matched_amount | string | amount of maker order matched in trade |
| order_id | string | maker order ID |
| outcome | string | outcome |
| owner | string | owner of maker order |
| price | string | price of maker order |
{
"asset_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
"event_type": "trade",
"id": "28c4d2eb-bbea-40e7-a9f0-b2fdb56b2c2e",
"last_update": "1672290701",
"maker_orders": [
{
"asset_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
"matched_amount": "10",
"order_id": "0xff354cd7ca7539dfa9c28d90943ab5779a4eac34b9b37a757d7b32bdfb11790b",
"outcome": "YES",
"owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
"price": "0.57"
}
],
"market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
"matchtime": "1672290701",
"outcome": "YES",
"owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
"price": "0.57",
"side": "BUY",
"size": "10",
"status": "MATCHED",
"taker_order_id": "0x06bc63e346ed4ceddce9efd6b3af37c8f8f440c92fe7da6b2d0f9e4ccbc50c42",
"timestamp": "1672290701",
"trade_owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
"type": "TRADE"
}
Emitted when:
| Name | Type | Description |
|---|---|---|
| asset_id | string | asset ID (token ID) of order |
| associate_trades | string[] | array of ids referencing trades that the order has been included in |
| event_type | string | "order" |
| id | string | order id |
| market | string | condition ID of market |
| order_owner | string | owner of order |
| original_size | string | original order size |
| outcome | string | outcome |
| owner | string | owner of orders |
| price | string | price of order |
| side | string | BUY/SELL |
| size_matched | string | size of order that has been matched |
| timestamp | string | time of event |
| type | string | PLACEMENT/UPDATE/CANCELLATION |
{
"asset_id": "52114319501245915516055106046884209969926127482827954674443846427813813222426",
"associate_trades": null,
"event_type": "order",
"id": "0xff354cd7ca7539dfa9c28d90943ab5779a4eac34b9b37a757d7b32bdfb11790b",
"market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
"order_owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
"original_size": "10",
"outcome": "YES",
"owner": "9180014b-33c8-9240-a14b-bdca11c0a465",
"price": "0.57",
"side": "SELL",
"size_matched": "0",
"timestamp": "1672290687",
"type": "PLACEMENT"
}
Source: https://docs.polymarket.com/developers/CLOB/websocket/wss-auth
Only connections to user channel require authentication.
| Field | Optional | Description |
|---|---|---|
| apikey | yes | Polygon account's CLOB api key |
| secret | yes | Polygon account's CLOB api secret |
| passphrase | yes | Polygon account's CLOB api passphrase |
Source: https://docs.polymarket.com/developers/CLOB/websocket/wss-overview
Overview and general information about the Polymarket Websocket
The Polymarket CLOB API provides websocket (wss) channels through which clients can get pushed updates. These endpoints allow clients to maintain almost real-time views of their orders, their trades and markets in general. There are two available channels user and market.
To subscribe send a message including the following authentication and intent information upon opening the connection.
| Field | Type | Description |
|---|---|---|
| auth | Auth | see next page for auth information |
| markets | string[] | array of markets (condition IDs) to receive events for (for user channel) |
| assets_ids | string[] | array of asset ids (token IDs) to receive events for (for market channel) |
| type | string | id of channel to subscribe to (USER or MARKET) |
Where the auth field is of type Auth which has the form described in the WSS Authentication section below.
Source: https://docs.polymarket.com/developers/CTF/deployment-resources
The CTF contract is deployed (and verified) at the following addresses:
| Network | Deployed Address |
|---|---|
| Polygon Mainnet | 0x4D97DCd97eC945f40cF65F87097ACe5EA0476045 |
| Polygon Mainnet | 0x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982E |
Polymarket provides code samples in both Python and TypeScript for interacting with our smart chain contracts. You will need an RPC endpoint to access the blockchain, and you'll be responsible for paying gas fees when executing these RPC/function calls. Please ensure you're using the correct example for your wallet type (Safe Wallet vs Proxy Wallet) when implementing.
Source: https://docs.polymarket.com/developers/CTF/merge
In addition to splitting collateral for a full set, the inverse can also happen; a full set can be "merged" for collateral. This operation can again happen at any time after a condition has been prepared on the CTF contract. One unit of each position in a full set is burned in return for 1 collateral unit. This operation happens via the mergePositions() function on the CTF contract with the following parameters:
collateralToken: IERC20 - The address of the positions' backing collateral token.parentCollectionId: bytes32 - The ID of the outcome collections common to the position being merged and the merge target positions. Null in Polymarket case.conditionId: bytes32 - The ID of the condition to merge on.partition: uint[] - An array of disjoint index sets representing a nontrivial partition of the outcome slots of the given condition. E.G. A|B and C but not A|B and B|C (is not disjoint). Each element's a number which, together with the condition, represents the outcome collection. E.G. 0b110 is A|B, 0b010 is B, etc. In the Polymarket case 1|2.amount - The number of full sets to merge. Also the amount of collateral to receive.Source: https://docs.polymarket.com/developers/CTF/overview
All outcomes on Polymarket are tokenized on the Polygon network. Specifically, Polymarket outcomes shares are binary outcomes (ie "YES" and "NO") using Gnosis' Conditional Token Framework (CTF). They are distinct ERC1155 tokens related to a parent condition and backed by the same collateral. More technically, the binary outcome tokens are referred to as "positionIds" in Gnosis's documentation. "PositionIds" are derived from a collateral token and distinct "collectionIds". "CollectionIds" are derived from a "parentCollectionId", (always bytes32(0) in our case) a "conditionId", and a unique "indexSet".
The "indexSet" is a 256 bit array denoting which outcome slots are in an outcome collection; it MUST be a nonempty proper subset of a condition's outcome slots. In the binary case, which we are interested in, there are two "indexSets", one for the first outcome and one for the second. The first outcome's "indexSet" is 0b01 = 1 and the second's is 0b10 = 2. The parent "conditionId" (shared by both "collectionIds" and therefore "positionIds") is derived from a "questionId" (a hash of the UMA ancillary data), an "oracle" (the UMA adapter V2), and an "outcomeSlotCount" (always 2 in the binary case). The steps for calculating the ERC1155 token ids (positionIds) is as follows:
Get the conditionId
getConditionId(oracle, questionId, outcomeSlotCount)oracle: address - UMA adapter V2questionId: bytes32 - hash of the UMA ancillary dataoutcomeSlotCount: uint - 2 for binary marketsGet the two collectionIds
getCollectionId(parentCollectionId, conditionId, indexSet)parentCollectionId: bytes32 - bytes32(0)conditionId: bytes32 - the conditionId derived from (1)indexSet: uint - 1 (0b01) for the first and 2 (0b10) for the second.Get the two positionIds
getPositionId(collateralToken, collectionId)collateralToken: IERC20 - address of ERC20 token collateral (USDC)collectionId: bytes32 - the two collectionIds derived from (3)Leveraging the relations above, specifically "conditionIds" -> "positionIds" the Gnosis CTF contract allows for "splitting" and "merging" full outcome sets. We explore these actions and provide code examples below.
Source: https://docs.polymarket.com/developers/CTF/redeem
Once a condition has had it's payouts reported (ie by the UMACTFAdapter calling reportPayouts on the CTF contract), users with shares in the winning outcome can redeem them for the underlying collateral. Specifically, users can call the redeemPositions function on the CTF contract which will burn all valuable conditional tokens in return for collateral according to the reported payout vector. This function has the following parameters:
collateralToken: IERC20 - The address of the positions' backing collateral token.parentCollectionId: bytes32 - The ID of the outcome collections common to the position being redeemed. Null in Polymarket case.indexSets: uint[] - The ID of the condition to redeem.indexSets: uint[] - An array of disjoint index sets representing a nontrivial partition of the outcome slots of the given condition. E.G. A|B and C but not A|B and B|C (is not disjoint). Each element's a number which, together with the condition, represents the outcome collection. E.G. 0b110 is A|B, 0b010 is B, etc. In the Polymarket case 1|2.Source: https://docs.polymarket.com/developers/CTF/split
At any time, after a condition has been prepared on the CTF contract (via prepareCondition), it is possible to "split" collateral into a full (position) set. In other words, one unit USDC can be split into 1 YES unit and 1 NO unit. If splitting from the collateral, the CTF contract will attempt to transfer amount collateral from the message sender to itself. If successful, amount stake will be minted in the split target positions. If any of the transfers, mints, or burns fail, the transaction will revert. The transaction will also revert if the given partition is trivial, invalid, or refers to more slots than the condition is prepared with. This operation happens via the splitPosition() function on the CTF contract with the following parameters:
collateralToken: IERC20 - The address of the positions' backing collateral token.parentCollectionId: bytes32 - The ID of the outcome collections common to the position being split and the split target positions. Null in Polymarket case.conditionId: bytes32 - The ID of the condition to split on.partition: uint[] - An array of disjoint index sets representing a nontrivial partition of the outcome slots of the given condition. E.G. A|B and C but not A|B and B|C (is not disjoint). Each element's a number which, together with the condition, represents the outcome collection. E.G. 0b110 is A|B, 0b010 is B, etc. In the Polymarket case 1|2.amount - The amount of collateral or stake to split. Also the number of full sets to receive.Source: https://docs.polymarket.com/developers/RTDS/RTDS-comments
Polymarket provides a Typescript client for interacting with this streaming service. Download and view it's documentation here
The comments subscription provides real-time updates for comment-related events on the Polymarket platform. This includes new comments being created, as well as other comment interactions like reactions and replies.
commentscomment_created (and potentially other comment event types like reaction_created){
"action": "subscribe",
"subscriptions": [
{
"topic": "comments",
"type": "comment_created"
}
]
}
When subscribed to comments, you'll receive messages with the following structure:
{
"topic": "comments",
"type": "comment_created",
"timestamp": 1753454975808,
"payload": {
"body": "do you know what the term encircle means? it means to surround from all sides, Russia has present on only 1 side, that's the opposite of an encirclement",
"createdAt": "2025-07-25T14:49:35.801298Z",
"id": "1763355",
"parentCommentID": "1763325",
"parentEntityID": 18396,
"parentEntityType": "Event",
"profile": {
"baseAddress": "0xce533188d53a16ed580fd5121dedf166d3482677",
"displayUsernamePublic": true,
"name": "salted.caramel",
"proxyWallet": "0x4ca749dcfa93c87e5ee23e2d21ff4422c7a4c1ee",
"pseudonym": "Adored-Disparity"
},
"reactionCount": 0,
"replyAddress": "0x0bda5d16f76cd1d3485bcc7a44bc6fa7db004cdd",
"reportCount": 0,
"userAddress": "0xce533188d53a16ed580fd5121dedf166d3482677"
}
}
Triggered when a user creates a new comment on an event or in reply to another comment.
Triggered when a comment is removed or deleted.
Triggered when a user adds a reaction to an existing comment.
Triggered when a reaction is removed from a comment.
| Field | Type | Description |
|---|---|---|
body |
string | The text content of the comment |
createdAt |
string | ISO 8601 timestamp when the comment was created |
id |
string | Unique identifier for this comment |
parentCommentID |
string | ID of the parent comment if this is a reply (null for top-level comments) |
parentEntityID |
number | ID of the parent entity (event, market, etc.) |
parentEntityType |
string | Type of parent entity (e.g., "Event", "Market") |
profile |
object | Profile information of the user who created the comment |
reactionCount |
number | Current number of reactions on this comment |
replyAddress |
string | Polygon address for replies (may be different from userAddress) |
reportCount |
number | Current number of reports on this comment |
userAddress |
string | Polygon address of the user who created the comment |
| Field | Type | Description |
|---|---|---|
baseAddress |
string | User profile address |
displayUsernamePublic |
boolean | Whether the username should be displayed publicly |
name |
string | User's display name |
proxyWallet |
string | Proxy wallet address used for transactions |
pseudonym |
string | Generated pseudonym for the user |
The following parent entity types are supported:
Event - Comments on prediction eventsMarket - Comments on specific markets{
"topic": "comments",
"type": "comment_created",
"timestamp": 1753454975808,
"payload": {
"body": "do you know what the term encircle means? it means to surround from all sides, Russia has present on only 1 side, that's the opposite of an encirclement",
"createdAt": "2025-07-25T14:49:35.801298Z",
"id": "1763355",
"parentCommentID": "1763325",
"parentEntityID": 18396,
"parentEntityType": "Event",
"profile": {
"baseAddress": "0xce533188d53a16ed580fd5121dedf166d3482677",
"displayUsernamePublic": true,
"name": "salted.caramel",
"proxyWallet": "0x4ca749dcfa93c87e5ee23e2d21ff4422c7a4c1ee",
"pseudonym": "Adored-Disparity"
},
"reactionCount": 0,
"replyAddress": "0x0bda5d16f76cd1d3485bcc7a44bc6fa7db004cdd",
"reportCount": 0,
"userAddress": "0xce533188d53a16ed580fd5121dedf166d3482677"
}
}
{
"topic": "comments",
"type": "comment_created",
"timestamp": 1753454985123,
"payload": {
"body": "That's a good point about the definition of encirclement.",
"createdAt": "2025-07-25T14:49:45.120000Z",
"id": "1763356",
"parentCommentID": "1763355",
"parentEntityID": 18396,
"parentEntityType": "Event",
"profile": {
"baseAddress": "0x1234567890abcdef1234567890abcdef12345678",
"displayUsernamePublic": true,
"name": "trader",
"proxyWallet": "0x9876543210fedcba9876543210fedcba98765432",
"pseudonym": "Bright-Analysis"
},
"reactionCount": 0,
"replyAddress": "0x0bda5d16f76cd1d3485bcc7a44bc6fa7db004cdd",
"reportCount": 0,
"userAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
}
Comments support nested threading:
parentCommentID is null or emptyparentCommentID contains the ID of the parent commentparentEntityID and parentEntityTypereactionCount and reportCountcreatedAt timestamp uses ISO 8601 format with timezone informationtimestamp field represents when the WebSocket message was sentSource: https://docs.polymarket.com/developers/RTDS/RTDS-crypto-prices
Polymarket provides a Typescript client for interacting with this streaming service. Download and view it's documentation here
The crypto prices subscription provides real-time updates for cryptocurrency price data from two different sources:
crypto_prices): Real-time price data from Binance exchangecrypto_prices_chainlink): Price data from Chainlink oracle networksBoth streams deliver current market prices for various cryptocurrency trading pairs, but use different symbol formats and subscription structures.
crypto_prices)crypto_pricesupdatesolusdt, btcusdt){
"action": "subscribe",
"subscriptions": [
{
"topic": "crypto_prices",
"type": "update"
}
]
}
To subscribe to specific cryptocurrency symbols, include a filters parameter:
{
"action": "subscribe",
"subscriptions": [
{
"topic": "crypto_prices",
"type": "update",
"filters": "solusdt,btcusdt,ethusdt"
}
]
}
crypto_prices_chainlink)crypto_prices_chainlink* (all types)eth/usd, btc/usd){
"action": "subscribe",
"subscriptions": [
{
"topic": "crypto_prices_chainlink",
"type": "*",
"filters": ""
}
]
}
To subscribe to specific cryptocurrency symbols, include a JSON filters parameter:
{
"action": "subscribe",
"subscriptions": [
{
"topic": "crypto_prices_chainlink",
"type": "*",
"filters": "{\"symbol\":\"eth/usd\"}"
}
]
}
When subscribed to Binance crypto prices (crypto_prices), you'll receive messages with the following structure:
{
"topic": "crypto_prices",
"type": "update",
"timestamp": 1753314064237,
"payload": {
"symbol": "solusdt",
"timestamp": 1753314064213,
"value": 189.55
}
}
When subscribed to Chainlink crypto prices (crypto_prices_chainlink), you'll receive messages with the following structure:
{
"topic": "crypto_prices_chainlink",
"type": "update",
"timestamp": 1753314064237,
"payload": {
"symbol": "eth/usd",
"timestamp": 1753314064213,
"value": 3456.78
}
}
| Field | Type | Description |
|---|---|---|
symbol |
string | Trading pair symbol Binance: lowercase concatenated (e.g., "solusdt", "btcusdt") Chainlink: slash-separated (e.g., "eth/usd", "btc/usd") |
timestamp |
number | Price timestamp in Unix milliseconds |
value |
number | Current price value in the quote currency |
{
"topic": "crypto_prices",
"type": "update",
"timestamp": 1753314064237,
"payload": {
"symbol": "solusdt",
"timestamp": 1753314064213,
"value": 189.55
}
}
{
"topic": "crypto_prices",
"type": "update",
"timestamp": 1753314088421,
"payload": {
"symbol": "btcusdt",
"timestamp": 1753314088395,
"value": 67234.50
}
}
{
"topic": "crypto_prices_chainlink",
"type": "update",
"timestamp": 1753314064237,
"payload": {
"symbol": "eth/usd",
"timestamp": 1753314064213,
"value": 3456.78
}
}
{
"topic": "crypto_prices_chainlink",
"type": "update",
"timestamp": 1753314088421,
"payload": {
"symbol": "btc/usd",
"timestamp": 1753314088395,
"value": 67234.50
}
}
The Binance source supports various cryptocurrency trading pairs using lowercase concatenated format:
btcusdt - Bitcoin to USDTethusdt - Ethereum to USDTsolusdt - Solana to USDTxrpusdt - XRP to USDTThe Chainlink source supports cryptocurrency trading pairs using slash-separated format:
btc/usd - Bitcoin to USDeth/usd - Ethereum to USDsol/usd - Solana to USDxrp/usd - XRP to USDSource: https://docs.polymarket.com/developers/RTDS/RTDS-overview
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for various Polymarket data streams. The service allows clients to subscribe to multiple data feeds simultaneously and receive live updates as events occur on the platform.
Polymarket provides a Typescript client for interacting with this streaming service. Download and view it's documentation here
wss://ws-live-data.polymarket.comThe RTDS supports two types of authentication depending on the subscription type:
CLOB Authentication: Required for certain trading-related subscriptions
key: API keysecret: API secretpassphrase: API passphraseGamma Authentication: Required for user-specific data
address: User wallet addressThe WebSocket connection supports:
Although this connection technically supports additional activity and subscription types, they are not fully supported at this time. Users are free to use them but there may be some unexpected behavior.
The RTDS currently supports the following subscription types:
All messages received from the WebSocket follow this structure:
{
"topic": "string",
"type": "string",
"timestamp": "number",
"payload": "object"
}
topic: The subscription topic (e.g., "crypto_prices", "comments", "activity")type: The message type/event (e.g., "update", "reaction_created", "orders_matched")timestamp: Unix timestamp in millisecondspayload: Event-specific data objectTo subscribe to data streams, send a JSON message with this structure:
{
"action": "subscribe",
"subscriptions": [
{
"topic": "topic_name",
"type": "message_type",
"filters": "optional_filter_string",
"clob_auth": {
"key": "api_key",
"secret": "api_secret",
"passphrase": "api_passphrase"
},
"gamma_auth": {
"address": "wallet_address"
}
}
]
}
To unsubscribe from data streams, send a similar message with "action": "unsubscribe".
Source: https://docs.polymarket.com/developers/gamma-markets-api/fetch-markets-guide
Both the getEvents and getMarkets are paginated. See pagination section for details. This guide covers the three recommended approaches for fetching market data from the Gamma API, each optimized for different use cases.
There are three main strategies for retrieving market data:
Use Case: When you need to retrieve a specific market or event that you already know about.
Individual markets and events are best fetched using their unique slug identifier. The slug can be found directly in the Polymarket frontend URL.
From any Polymarket URL, the slug is the path segment after /event/ or /market/:
https://polymarket.com/event/fed-decision-in-october?tid=1758818660485
↑
Slug: fed-decision-in-october
For Events: GET /events/slug/{slug}
For Markets: GET /markets/slug/{slug}
curl "https://gamma-api.polymarket.com/events/slug/fed-decision-in-october"
Use Case: When you want to filter markets by category, sport, or topic.
Tags provide a powerful way to categorize and filter markets. You can discover available tags and then use them to filter your market requests.
General Tags: GET /tags
Sports Tags & Metadata: GET /sports
The /sports endpoint returns comprehensive metadata for sports including tag IDs, images, resolution sources, and series information.
Once you have tag IDs, you can use them with the tag_id parameter in both markets and events endpoints.
Markets with Tags: GET /markets
Events with Tags: GET /events
curl "https://gamma-api.polymarket.com/events?tag_id=100381&limit=1&closed=false"
You can also:
related_tags=true to include related tag marketsexclude_tag_idUse Case: When you need to retrieve all available active markets, typically for broader analysis or market discovery.
The most efficient approach is to use the /events endpoint and work backwards, as events contain their associated markets.
Events Endpoint: GET /events
Markets Endpoint: GET /markets
order=id - Order by event IDascending=false - Get newest events firstclosed=false - Only active marketslimit - Control response sizeoffset - For paginationcurl "https://gamma-api.polymarket.com/events?order=id&ascending=false&closed=false&limit=100"
This approach gives you all active markets ordered from newest to oldest, allowing you to systematically process all available trading opportunities.
For large datasets, use pagination with limit and offset parameters:
limit=50 - Return 50 results per pageoffset=0 - Start from the beginning (increment by limit for subsequent pages)Pagination Examples:
# Page 1: First 50 results (offset=0)
curl "https://gamma-api.polymarket.com/events?order=id&ascending=false&closed=false&limit=50&offset=0"
# Page 2: Next 50 results (offset=50)
curl "https://gamma-api.polymarket.com/events?order=id&ascending=false&closed=false&limit=50&offset=50"
# Page 3: Next 50 results (offset=100)
curl "https://gamma-api.polymarket.com/events?order=id&ascending=false&closed=false&limit=50&offset=100"
# Paginating through markets with tag filtering
curl "https://gamma-api.polymarket.com/markets?tag_id=100381&closed=false&limit=25&offset=0"
# Next page of markets with tag filtering
curl "https://gamma-api.polymarket.com/markets?tag_id=100381&closed=false&limit=25&offset=25"
closed=false: Unless you specifically need historical dataSource: https://docs.polymarket.com/developers/gamma-markets-api/gamma-structure
Gamma provides some organizational models. These include events, and markets. The most fundamental element is always markets and the other models simply provide additional organization.
Market
Event
Source: https://docs.polymarket.com/developers/gamma-markets-api/overview
All market data necessary for market resolution is available on-chain (ie ancillaryData in UMA 00 request), but Polymarket also provides a hosted service, Gamma, that indexes this data and provides additional market metadata (ie categorization, indexed volume, etc). This service is made available through a REST API. For public users, this resource read only and can be used to fetch useful information about markets for things like non-profit research projects, alternative trading interfaces, automated trading systems etc.
https://gamma-api.polymarket.com
Source: https://docs.polymarket.com/developers/neg-risk/overview
Certain events which meet the criteria of being "winner-take-all" may be deployed as "negative risk" events/markets. The Gamma API includes a boolean field on events, negRisk, which indicates whether the event is negative risk.
Negative risk allows for increased capital efficiency by relating all markets within events via a convert action. More explicitly, a NO share in any market can be converted into 1 YES share in all other markets. Converts can be exercised via the Negative Adapter. You can read more about negative risk here.
There is a known issue with the negative risk architecture which is that the outcome universe must be complete before conversions are made or otherwise conversion will “cost” something. In most cases, the outcome universe can be made complete by deploying all the named outcomes and then an “other” option. But in some cases this is undesirable as new outcomes can come out of nowhere and you'd rather them be directly named versus grouped together in an “other”.
To fix this, some markets use a system of "augmented negative risk", where named outcomes, a collection of unnamed outcomes, and an other is deployed. When a new outcome needs to be added, an unnamed outcome can be clarified to be the new outcome via the bulletin board. This means the “other” in the case of augmented negative risk can effectively change definitions (outcomes can be taken out of it).
As such, trading should only happen on the named outcomes, and the other outcomes should be ignored until they are named or until resolution occurs. The Polymarket UI will not show unnamed outcomes.
If a market becomes resolvable and the correct outcome is not named (originally or via placeholder clarification), it should resolve to the “other” outcome. An event can be considered “augmented negative risk” when enableNegRisk is true AND negRiskAugmented is true.
The naming conventions are as follows:
Source: https://docs.polymarket.com/developers/proxy-wallet
When a user first uses Polymarket.com to trade they are prompted to create a wallet. When they do this, a 1 of 1 multisig is deployed to Polygon which is controlled/owned by the accessing EOA (either MetaMask wallet or MagicLink wallet). This proxy wallet is where all the user's positions (ERC1155) and USDC (ERC20) are held.
Using proxy wallets allows Polymarket to provide an improved UX where multi-step transactions can be executed atomically and transactions can be relayed by relayers on the gas station network. If you are a developer looking to programmatically access positions you accumulated via the Polymarket.com interface, you can either continue using the smart contract wallet by executing transactions through it from the owner account, or you can transfer these assets to a new address using the owner account.
Each user has their own proxy wallet (and thus proxy wallet address) but the factories are available at the following deployed addresses on the Polygon network:
| Address | Details |
|---|---|
| 0xaacfeea03eb1561c4e67d661e40682bd20e3541b | Gnosis safe factory – Gnosis safes are used for all MetaMask users |
| 0xaB45c54AB0c941a2F231C04C3f49182e1A254052 | Polymarket proxy factory – Polymarket custom proxy contracts are used for all MagicLink users |
Source: https://docs.polymarket.com/developers/resolution/UMA
Polymarket leverages UMA's Optimistic Oracle (OO) to resolve arbitrary questions, permissionlessly. From UMA's docs:
"UMA's Optimistic Oracle allows contracts to quickly request and receive data information ... The Optimistic Oracle acts as a generalized escalation game between contracts that initiate a price request and UMA's dispute resolution system known as the Data Verification Mechanism (DVM). Prices proposed by the Optimistic Oracle will not be sent to the DVM unless it is disputed. If a dispute is raised, a request is sent to the DVM. All contracts built on UMA use the DVM as a backstop to resolve disputes. Disputes sent to the DVM will be resolved within a few days -- after UMA tokenholders vote on what the correct outcome should have been."
To allow CTF markets to be resolved via the OO, Polymarket developed a custom adapter contract called UmaCtfAdapter that provides a way for the two contract systems to interface.
Recent versions (v2+) of the UmaCtfAdapter also include a bulletin board feature that allows market creators to issue "clarifications". Questions that allow updates will include the sentence in their ancillary data:
"Updates made by the question creator via the bulletin board on 0x6A5D0222186C0FceA7547534cC13c3CFd9b7b6A4F74 should be considered. In summary, clarifications that do not impact the question's intent should be considered."
Where the transaction reference outlining what outlining should be considered.
Initiate - Binary CTF markets are initialized via the UmaCtfAdapter's initialize() function. This stores the question parameters on the contract, prepares the CTF and requests a price for a question from the OO. It returns a questionID that is also used to reference on the UmaCtfAdapter. The caller provides:
ancillaryData - data used to resolve a question (i.e the question + clarifications)rewardToken - ERC20 token address used for payment of rewards and feesreward - Reward amount offered to a successful proposer. The caller must have set allowance so that the contract can pull this reward in.proposalBond - Bond required to be posted by OO proposers/disputers. If 0, the default OO bond is used.liveness - UMA liveness period in seconds. If 0, the default liveness period is used.Propose Price - Anyone can then propose a price to the question on the OO. To do this they must post the proposalBond. The liveness period begins after a price is proposed.
Dispute - Anyone that disagrees with the proposed price has the opportunity to dispute the price by posting a counter bond via the OO, this proposed will now be escalated to the DVM for a voter-wide vote.
When the first proposed price is disputed for a questionID on the adapter, a callback is made and posted as the reward for this new proposal. This means a second questionID, making a new questionID to the OO (the reward is returned before the callback is made and posted as the reward for this new proposal). This allows for a second round of resolution, and correspondingly a second dispute is required for it to go to the DVM. The thinking behind this is to doubles the cost of a potential griefing vector (two disputes are required just one) and also allows far-fetched (incorrect) first price proposals to not delay the resolution. As such there are two possible flows:
| Network | Address |
|---|---|
| Polygon Mainnet | 0x2F5e3684cb1F318ec51b00Edba38d79Ac2c0aA9d |
| Network | Address |
|---|---|
| Polygon Mainnet | 0x6A9D0222186C0FceA7547534cC13c3CFd9b7b6A4F74 |
| Network | Address |
|---|---|
| Polygon Mainnet | 0xC8B122858a4EF82C2d4eE2E6A276C719e692995130 |
Source: https://docs.polymarket.com/developers/rewards/overview
Polymarket provides incentives aimed at catalyzing the supply and demand side of the marketplace. Specifically there is a public liquidity rewards program as well as one-off public pnl/volume competitions.
By posting resting limit orders, liquidity providers (makers) are automatically eligible for Polymarket's incentive program. The overall goal of this program is to catalyze a healthy, liquid marketplace. We can further define this as creating incentives that:
This program is heavily inspired by dYdX's liquidity provider rewards which you can read more about here. In fact, the incentive methodology is essentially a copy of dYdX's successful methodology but with some adjustments including specific adaptations for binary contract markets with distinct books, no staking mechanic a slightly modified order utility-relative depth function and reward amounts isolated per market. Rewards are distributed directly to the maker's addresses daily at midnight UTC.
Polymarket liquidity providers will be rewarded based on a formula that rewards participation in markets (complementary consideration!), boosts two-sided depth (single-sided orders still score), and spread (vs. mid-market, adjusted for the size cutoff!). Each market still configure a max spread and min size cutoff within which orders are considered the average of rewards earned is determined by the relative share of each participant's Qn in market m.
| Variable | Description |
|---|---|
| \$ | order position scoring function |
| v | max spread from midpoint (in cents) |
| s | spread from size-cutoff-adjusted midpoint |
| b | in-game multiplier |
| m | market |
| m' | market complement (i.e NO if m = YES) |
| n | trader index |
| u | sample index |
| c | scaling factor (currently 3.0 on all markets) |
| Qne | point total for book one for a sample |
| Qno | point total for book two for a sample |
| Spread% | distance from midpoint (bps or relative) for order n in market m |
| BidSize | share-denominated quantity of bid |
| AskSize | share-denominated quantity of ask |
Equation 1:
$S(v,s)= (\frac{v-s}{v})^2 \cdot b$
Equation 2:
$Q{one}= S(v,Spread{m1}) \cdot BidSize{m1} + S(v,Spread{m2}) \cdot BidSize{m2} + \dots $ $ + S(v, Spread{m^\prime1}) \cdot AskSize{m^\prime1} + S(v, Spread{m^\prime2}) \cdot AskSize{m^\prime_2}$
Equation 3:
$Q{two}= S(v,Spread{m1}) \cdot AskSize{m1} + S(v,Spread{m2}) \cdot AskSize{m2} + \dots $ $ + S(v, Spread{m^\prime1}) \cdot BidSize{m^\prime1} + S(v, Spread{m^\prime2}) \cdot BidSize{m^\prime_2}$
Equation 4:
Equation 4a:
If midpoint is in range [0.10,0.90] allow single sided liq to score:
$Q{\min} = \max(\min({Q{one}, Q{two}}), \max(Q{one}/c, Q_{two}/c))$
Equation 4b:
If midpoint is in either range [0,0.10) or (.90,1.0] require liq to be double sided to score:
$Q{\min} = \min({Q{one}, Q_{two}})$
Equation 5:
$Q{normal} = \frac{Q{min}}{\sum{n=1}^{N}{(Q{min})_n}}$
Equation 6:
$Q{epoch} = \sum{u=1}^{10,080}{(Q_{normal})_u}$
Equation 7:
$Q{final}=\frac{Q{epoch}}{\sum{n=1}^{N}{(Q{epoch})_n}}$
Quadratic scoring rule for an order based on position between the adjusted midpoint and the minimum qualifying spread
Calculate first market side score. Assume a trader has the following open orders:
and assume an adjusted market midpoint of 0.50 and maxSpread config of 3c for both m and m'. Then the trader's score is:
$$ Q_{ne} = \left( \frac{(3-1)}{3} \right)^2 \cdot 100 + \left( \frac{(3-2)}{3} \right)^2 \cdot 200 + \left( \frac{(3-1)}{3} \right)^2 \cdot 100 $$
$Q_{ne}$ is calculated every minute using random sampling
Calculate second market side score. Assume a trader has the following open orders:
and assume an adjusted market midpoint of 0.50 and maxSpread config of 3c for both m and m'. Then the trader's score is:
$$ Q_{no} = \left( \frac{(3-1.5)}{3} \right)^2 \cdot 100 + \left( \frac{(3-2)}{3} \right)^2 \cdot 100 + \left( \frac{(3-.5)}{3} \right)^2 \cdot 200 $$
$Q_{no}$ is calculated every minute using random sampling
Calculated every minute
$Q{normal}$ is the $Q{min}$ of a market maker divided by the sum of all the $Q_{min}$ of other market makers in a given sample
$Q{epoch}$ is the sum of all $Q{normal}$ for a trader in a given epoch
$Q{final}$ normalizes $Q{epoch}$ by dividing it by the sum of all other market maker's $Q_{epoch}$ in a given epoch this value is multiplied by the rewards available for the market to get a trader's reward
Both min_incentive_size and max_incentive_spread can be fetched alongside full market objects via both the CLOB API and Markets API. Reward allocations for an epoch can be fetched via the Markets API.
Source: https://docs.polymarket.com/developers/subgraph/overview
Polymarket has written and open sourced a subgraph that provides, via a GraphQL query interface, useful aggregate calculations and event indexing for things like volume, user position, market and liquidity data. The subgraph updates in real time to be able to be mixed, and match core data from the primary Polymarket interface, providing positional data, activity history and more. The subgraph can be hosted by anyone but is also hosted and made publicly available by a 3rd party provider, Goldsky.
The Polymarket subgraph is entirely open source and can be found on the Polymarket Github.
Note: The available models/schemas can be found in the
schema.graphqlfile.
The subgraphs are hosted on goldsky, each with an accompanying GraphQL playground:
Orders subgraph: https://api.goldsky.com/api/public/project_cl6mb8i9h0003e201j6li0diw/subgraphs/orderbook-subgraph/0.0.1/gn
Positions subgraph: https://api.goldsky.com/api/public/project_cl6mb8i9h0003e201j6li0diw/subgraphs/positions-subgraph/0.0.7/gn
Activity subgraph: https://api.goldsky.com/api/public/project_cl6mb8i9h0003e201j6li0diw/subgraphs/activity-subgraph/0.0.4/gn
Open Interest subgraph: https://api.goldsky.com/api/public/project_cl6mb8i9h0003e201j6li0diw/subgraphs/oi-subgraph/0.0.6/gn
PNL subgraph: https://api.goldsky.com/api/public/project_cl6mb8i9h0003e201j6li0diw/subgraphs/pnl-subgraph/0.0.14/gn
Source: https://docs.polymarket.com/polymarket-learn/FAQ/does-polymarket-have-an-api
Getting data from Polymarket
Yes! Developers can find all the information they need for interacting with Polymarket. This includes documentation on market discovery, resolution, trading etc.
Whether you are an academic researcher a market maker or an indepedent developer, this documentation should provide you what you need to get started. All the code you find linked here and on our GitHub is open source and free to use.
If you have any questions please join our Discord and direct your questions to the #devs channel.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/embeds
Adding market embeds to your Substack or website.
Polymarket allows you to embed a live-updating widget displaying the latest odds for markets in many places around the web.
Navigate to the individual market you want to embed and click the embed (< >) link.
Select light or dark mode, and copy the auto-generated code Paste the code into your code editor or CMS and publish as normal
Navigate to any Polymarket market Copy the URL from your browser Paste the URL into the compose window
The embeds feature currently supports single markets only (eg “USA to Win Most Gold Medals”, not “Most Gold Medals at Paris Olympics’)
To embed a market, navigate on Polymarket.com to the single market you want to embed and click “copy link.”
Navigate to your Substack editor and paste the link directly into the body of your newsletter. The editor will recognize the market and convert it to a widget that automatically refreshes with the latest odds.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/how-to-export-private-key
Exporting your private key on Magic.Link
Exporting your private key gives you direct control and security over your funds. This process is applicable if you’ve signed up via email.
DO NOT share your private key with other parties, platforms, or people. We will never ask for your private key.
Access the Export Link while signed into Polymarket: https://reveal.magic.link/polymarket
Sign-in on Magic.Link
Export Private Key. Once revealed, you should securely store the private key displayed, where others can’t access it.
Log out of Magic.Link
Source: https://docs.polymarket.com/polymarket-learn/FAQ/is-my-money-safe
Yes. Polymarket is non-custodial, so you're in control of your funds.
Polymarket recognizes the importance of a trustworthy environment for managing your funds. To ensure this, Polymarket uses non-custodial wallets, meaning we never take possession of your USDC. This approach gives you full control over your assets, providing protection against potential security threats like hacks, misuse, and unauthorized transactions.
A private key acts like a highly secure password, essential for managing and moving your assets without restrictions. You can export your private key at any time, ensuring sole access to your funds. Learn how to export your private key here.
Do not share your private key with others. While Polymarket provides the infrastructure, the security of your assets depends on how securely you handle your private key and passwords. Losing your private key or passwords can result in losing access to your funds. It's crucial to store this information in a safe and secure environment.
Polymarket aims to give you peace of mind, knowing that your assets are safe and fully under your control at all times. We encourage you to take necessary precautions to secure your digital assets effectively. The ability to manage your private key means you are not reliant on Polymarket to secure your assets; you have the control to ensure your financial security.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/is-polymarket-the-house
No, Polymarket is not the house. All trades happen peer-to-peer (p2p).
Polymarket is a marketplace comprised of traders on both sides of any given market. This means you're always trading with other users, not against a centralized entity or "house." Prices on Polymarket are determined by supply and demand. As traders buy and sell shares in outcomes, prices fluctuate to reflect the collective sentiment and knowledge of market participants.
Unlike bookmakers or wagering operations, Polymarket does not charge deposit/withdrawal fees, or any type of trading fees. This means that Polymarket does not stand to benefit from the outcome of any market or usage of any trader.
Polymarket enables you to sell your position at any time before the market resolves, provided there is a willing buyer of your shares. This offers flexibility and allows you to manage your risk and lock in profits or cut losses as you see fit.
In essence, Polymarket empowers you to trade based on your own knowledge and research, without going up against a "house" with potentially unfair advantages.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/polling
How is Polymarket better than traditional / legacy polling?
While legacy polls capture a snapshot of opinion at a specific moment, they are often outdated by the time they're published—sometimes lagging by several days. In contrast, Polymarket reflects real-time sentiment as events unfold, offering continuous updates and a more dynamic understanding of public opinion.
Studies show that prediction markets like Polymarket tend to outperform traditional pollsters because participants are financially incentivized to be correct. This creates more thoughtful, data-driven predictions. Research by James Surowiecki, author of The Wisdom of Crowds, has highlighted how markets like these can be more accurate than polls due to the "collective intelligence" of diverse participants. Additionally, the Iowa Electronic Markets, an academic research project at the University of Iowa, has consistently demonstrated the superior accuracy of prediction markets like Polymarket over traditional polling in predicting political outcomes.
Polymarket provides a constantly updating picture of public sentiment, offering a degree of accuracy and timeliness that traditional pollsters, who typically report data that is days old, simply cannot match.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/recover-missing-deposit
If you deposited the wrong cryptocurrency on Ethereum or Polygon, use these tools to recover those funds.
Use this tool if you deposited the wrong token on Ethereum.
Go to https://recovery.polymarket.com/ and sign in with your Polymarket account or connect the wallet you use on Polymarket.
Select the asset you incorrectly deposited.
You’ll then see the asset balance displayed, and will have the ability to recover those funds to your specified wallet.
Use this tool if you deposited the wrong token on Polygon.
Go to https://matic-recovery.polymarket.com/ and sign in with your Polymarket account or connect the wallet you use on Polymarket.
Select the asset you incorrectly deposited.
You’ll then see the asset balance displayed, and will have the ability to recover those funds to your specified wallet.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/sell-early
Yes, you can sell or close your position early.
You may sell shares at any point before the market is resolved by either placing a market order to sell shares at the prevailing bid price in the orderbook, or by placing a limit order for how many shares you wish to sell and at what price.
The limit order will only be executed if/when there is a willing buyer for your shares at the price you set.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/support
Polymarket offers technical support through our website chat feature, and through Discord.
To contact support through our website:
Navigate to Polymarket.
Click the blue chat icon in the bottom right and start your chat session.
For technical support on Discord:
Join the Polymarket Discord server
Navigate to the Support sidebar and click #open-a-ticket. This will open a private conversation with a Polymarket team member.
Be aware of numerous scams and malicious links. Polymarket team members will never DM you first or ask for private keys or personal information. Polymarket team members are identified in blue font on Discord.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/wen-token
Polymarket does not have a token.
All trading and liquidity rewards are in USDC, a USD-pegged stablecoin.
Polymarket has not announced plans for any airdrop or token generation event. Be wary of scams claiming airdrops, giveaways, etc.
If in doubt, refer to official Polymarket communication channels:
Source: https://docs.polymarket.com/polymarket-learn/FAQ/what-are-prediction-markets
How people collectively forecast the future.
A prediction market is a platform where people can bet on the outcome of future events. By buying and selling shares in the outcomes, participants collectively forecast the likelihood of events such as sports results, political elections, or entertainment awards.
Market Prices = Probabilities: The price of shares in a prediction market represents the current probability of an event happening. For example, if shares of an event are trading at 20 cents, it indicates a 20% chance of that event occurring.
If you believe the actual probability of an event is higher than the market price suggests, you can buy shares. For instance, if you think a team has a better than 20% chance of winning, you would buy shares at 20 cents. If the event occurs, each share becomes worth \$1, yielding a profit.
You can buy or sell shares at any time before the event concludes, based on new information or changing circumstances. This flexibility allows the market prices to continuously reflect the most current and accurate probabilities.
Prediction markets provide unbiased and accurate probabilities in real time, cutting through the noise of human and media biases. Traditional sources often have their own incentives and slants, but prediction markets operate on the principle of "put your money where your mouth is." Here, participants are financially motivated to provide truthful insights, as their profits depend on the accuracy of their predictions.
In a prediction market, prices reflect the aggregated sentiment of all participants, weighing news, data, expert opinions, and culture to determine the true odds. Unlike media narratives, which can be swayed by various biases, prediction markets offer a transparent view of where people genuinely believe we're heading.
Prediction markets are often more accurate than traditional polls and expert predictions. The collective wisdom of diverse participants, each motivated by the potential for profit, leads to highly reliable forecasts. This makes prediction markets an excellent tool for gauging real-time probabilities of future events.
Polymarket, the world's largest prediction market, offers a user-friendly platform to bet on a wide range of topics, from sports to politics. By participating, you can profit from your knowledge while contributing to the accuracy of market predictions.
Source: https://docs.polymarket.com/polymarket-learn/FAQ/why-do-i-need-crypto
Why Polymarket uses crypto and blockchain technology to create the world’s largest Prediction market.
Polymarket operates on Polygon, a proof-of-stake layer two blockchain built on Ethereum. All transactions are denominated in USDC, a US-dollar pegged stablecoin.
This architecture offers several advantages over traditional prediction markets:
Polymarket denominates trades in USDC, which is pegged 1:1 to the US Dollar. This shields you from the volatility associated with other cryptocurrencies and offers a stable medium for trading.
USDC operates in adherence to regulatory standards and is backed by reserved assets.
Blockchain technology facilitates transparency, as all transactions are recorded publicly.
Research has shown that wide availability of prediction markets increases their accuracy. Using decentralized blockchain technology removes the need for a central authority in trading, which fosters fairness and open participation around the globe.
Source: https://docs.polymarket.com/polymarket-learn/deposits/coinbase
How to buy and deposit USDC to your Polymarket account using Coinbase.
How to buy and deposit USDC to your Polymarket account using Coinbase.
Depositing directly to Polymarket from Coinbase is simple and easy. If you need help creating a Coinbase account, see their guide on Coinbase.com
</p> <p><Steps> <Steps.Step></p> <pre><code>Login to &lt;ExternalLink href=&quot;https://coinbase.com&quot;&gt;Coinbase&lt;/ExternalLink&gt;, and click &quot;**Transfer**&quot; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Select &quot;Deposit Cash&quot; &gt; &quot;Deposit USDC&quot; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Enter the amount you wish to deposit, and connect a payment method under &quot;**Transfer from**&quot; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Click **Preview**, review the Order Preview, then click **Deposit cash now**. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>You'll see a **“Your deposit is pending”** screen. You'll receive a confirmation email from Coinbase when your USDC purchase is successful. </code></pre> <p></Steps.Step> </Steps></p> <p>If something went wrong along the way, we recommend reaching to Coinbase support.</p> <h2>Transfering to Polymarket</h2> <p><VideoPlayer src="https://www.youtube.com/embed/O6HaKdE9d80?si=NwuCGTzcilUhVQwg" /></p> <p><Steps> <Steps.Step></p> <pre><code>Copy your Polymarket USDC (Polygon) wallet address, as shown in your &lt;ExternalLink href=&quot;https://polymarket.com/wallet&quot;&gt;Polymarket wallet&lt;/ExternalLink&gt;. *Ensure you have copied your address for the Polygon network, as depicted below* &lt;Frame&gt; &lt;ExternalLink href=&quot;https://polymarket.com/wallet&quot;&gt; &lt;img className=&quot;hidden h-32 dark:block&quot; src=&quot;https://polymarket-upload.s3.us-east-2.amazonaws.com/PolygonAddress-dark.png&quot; /&gt; &lt;/ExternalLink&gt; &lt;/Frame&gt; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Login to &lt;ExternalLink href=&quot;https://coinbase.com&quot;&gt;Coinbase&lt;/ExternalLink&gt;, and select &quot;Transfer&quot; &gt; &quot;Send Crypto&quot; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Select USDC as the sending asset (note: you may have to search for it), and enter the amount you wish to send (deposit) to Polymarket. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Under **To**, enter your Polymarket deposit address you copied from your &lt;ExternalLink href=&quot;https://polymarket.com/wallet&quot;&gt;Polymarket wallet&lt;/ExternalLink&gt;. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Under **Network**, select Polygon. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Click **Send Now**. Your deposit will be available to trade on Polymarket in a few minutes! </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Back on the Polymarket &lt;ExternalLink href=&quot;https://polymarket.com/wallet&quot;&gt;deposit page&lt;/ExternalLink&gt;, click **&quot;Confirm pending deposit&quot;**. </code></pre> <p></Steps.Step> </Steps></p> <h1>How to Withdraw</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/deposits/how-to-withdraw">https://docs.polymarket.com/polymarket-learn/deposits/how-to-withdraw</a></p> <p>How to withdraw your cash balance from Polymarket.</p> <p>Withdrawing from Polymarket is simple, instant, and free.</p> <p><Steps> <Steps.Step></p> <pre><code>Go to the Polymarket funds page and click on the **Withdraw** button. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Enter the USDC address you wish to withdraw to. Make sure the address supports USDC on the Polygon network. Then, enter the amount you want to withdraw. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Click **Withdraw**. Your funds will be transferred instantly. </code></pre> <p></Steps.Step> </Steps></p> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/fAXn0LCPTgA?si=JsYilGM3h0jSNBZa" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <p><Note> Note: When withdrawing USDC.e (bridged USDC) is swapped through the <a href="https://polygonscan.com/address/0xd36ec33c8bed5a9f7b6630855f1533455b98a418">Uniswap v3 pool</a> for USDC (native) (the UI enforces less than 10bp difference in output amount). At times, this pool may be exhausted and for extremely large deposits there might not be enough liquidity. If you are having withdraw issues, try breaking your withdraw into smaller amounts or waiting for the pool to be rebalanced. Additionally, you can select to withdraw USDC.e directly which does not require any Uniswap liquidity; just be aware that some exchanges no longer allow USDC.e to be deposited directly. </Note></p> <h1>Large Cross Chain Deposits</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/deposits/large-cross-chain-deposits">https://docs.polymarket.com/polymarket-learn/deposits/large-cross-chain-deposits</a></p> <p><strong>For deposits over \$50,000 we recommended to use bridges and ensure minimal fee's (slippage).</strong></p> <h2>Recommended Bridges</h2> <ul> <li><a href="https://app.debridge.finance/?inputChain=1&amp;outputChain=137&amp;inputCurrency=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&amp;outputCurrency=0x3c499c542cef5e3811e1192ce70d8cc03d5c3359&amp;dlnMode=simple">DeBridge</a></li> <li><a href="https://app.across.to/bridge?">Across</a></li> <li><a href="https://portalbridge.com/">Portal</a></li> </ul> <p>For large deposits (&gt;\$50,000) originating from a chain other than Polygon, we recommend using one of the aforementioned bridges. Ensure you bridge to your Polymarket USDC (Polygon) <a href="https://polymarket.com/wallet">deposit address</a> (screenshot below). Please be mindful of potential slippage during the transaction.</p> <p><Warning> Polymarket is not affiliated with, responsible for, or makes any guarantees regarding any third-party bridge. Users are advised to review the Terms of Use or other relevant documentation for third-party bridges. </Warning></p> <h2>Important Notes</h2> <p>You can deposit USDC or USDC.e to your Polymarket Polygon wallet.</p> <p>If you deposit USDC (native), you will be prompted to &quot;activate funds,&quot; which will swap this to USDC.e via the lowest fee Uniswap pool, ensuring slippage of less than 10 basis points (bps).</p> <p>If you encounter any issues with the deposit process, please reach out to us on Discord for assistance.</p> <h1>Deposit Using Your Card</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/deposits/moonpay">https://docs.polymarket.com/polymarket-learn/deposits/moonpay</a></p> <p>Use MoonPay to deposit cash using your Visa, Mastercard, or bank account.</p> <p><strong>Use MoonPay to deposit cash using your Visa, Mastercard, or bank account.</strong></p> <p>Access MoonPay by clicking &quot;Buy USDC&quot; on the <a href="https://polymarket.com/wallet">Deposit Page</a></p> <p>Check out <a href="https://support.moonpay.com/customers/docs/how-to-buy-cryptocurrency-with-moonpay">MoonPay's guide</a> for further instructions.</p> <h1>Deposit by Transfering Crypto</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/deposits/supported-tokens">https://docs.polymarket.com/polymarket-learn/deposits/supported-tokens</a></p> <p>Learn what Tokens and Chains are supported for deposit.</p> <h2><strong>How do I use Transfer Crypto?</strong></h2> <p>The feature was designed to be one of the simplest ways to transfer your tokens into a dApp.</p> <p><img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.comxd.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/b0bfcc917f51f03c422947be7abcc5fc"><code>b0bfcc917f</code></a>" alt="polymarket.comxd.png" title="polymarket.comxd.png" className="mx-auto" style={{ width:"62%" }} data-og-width="760" width="760" data-og-height="1146" height="1146" data-path="images/polymarket.comxd.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.comxd.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/0558e8b116d4e7f8698f3ad49ebed3f1"><code>0558e8b116</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.comxd.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/610193ec185ccf3697a6fb153084cb9c"><code>610193ec18</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.comxd.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/9c0375436b39cb88b23a68ff1660743f"><code>9c0375436b</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.comxd.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/218f394193340e8cb1dc63b996fac84d"><code>218f394193</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.comxd.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/7d11259b246b32b7214213a1f106a1fc"><code>7d11259b24</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.comxd.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/aa6adbb43af08d1f6e1a23e7556796a1"><code>aa6adbb43a</code></a> 2500w" /></p> <ol> <li><strong>Click on the Deposit button</strong> and <strong>select Transfer Crypto</strong> as a source option</li> <li><strong>Select which supported token and chain</strong> your assets are on from the dropdown <ul> <li>Depending on your combination, this <strong>may update the deposit address</strong></li> <li>Only send <strong>supported token-chain combinations</strong> <ul> <li>Sending non-supported tokens may cause an irrecoverable loss</li> </ul></li> </ul></li> <li><strong>Scan the QR code or copy the deposit address</strong> and paste as the recipient in the withdrawal/transfer page of your exchange/wallet <ul> <li>This is where you'll specify how much crypto you're transferring</li> <li>You <strong>must send more than the minimum deposit</strong> amount or the funds will not process</li> <li>Always ensure to <strong>double check the pasted address</strong> versus that is shown on the widget to protect against clickjacking attempts</li> <li>You can click on the <strong>collapsible section at the bottom of the widget</strong> for estimated price impact, slippage, delivery time, and our help guide</li> </ul></li> <li><strong>Withdraw/transfer the tokens</strong> from your exchange/wallet and wait until they're reflected on the dApp <ul> <li>You will receive notifications on the Fun widget as your withdraw/transfer processes and completes as shown below</li> </ul></li> </ol> <p><img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio1.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/43ea11c20e25e45584d3ab0f1c1f0b4c"><code>43ea11c20e</code></a>" alt="polymarket.com_portfolio 1.png" title="polymarket.com_portfolio 1.png" className="mx-auto" style={{ width:"78%" }} data-og-width="760" width="760" data-og-height="500" height="500" data-path="images/polymarket.com_portfolio1.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio1.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/c44d0ee9b9f51028693595529bfe1060"><code>c44d0ee9b9</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio1.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/0de5f6543688d0429d04b7d60e15731f"><code>0de5f65436</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio1.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/812b954f39f91b932c546669b1fdae47"><code>812b954f39</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio1.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/2587143a31ecc3f58f94a13c064fd05b"><code>2587143a31</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio1.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/f09d6918697d145638c21d70bf66161f"><code>f09d691869</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio1.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/dabc2b27d7408a0b606d07cbdcaefb93"><code>dabc2b27d7</code></a> 2500w" /></p> <p><img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio2.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/91e6dfeb4bb5cdada8d9b62fef23f487"><code>91e6dfeb4b</code></a>" alt="polymarket.com_portfolio 2.png" title="polymarket.com_portfolio 2.png" className="mx-auto" style={{ width:"78%" }} data-og-width="760" width="760" data-og-height="499" height="499" data-path="images/polymarket.com_portfolio2.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio2.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/c5e94f023a2679e0d84e43ff61f5fcf4"><code>c5e94f023a</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio2.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/8ded25ed35ceb8493e4469bce4b21740"><code>8ded25ed35</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio2.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/bee694bf666c5d86b5d7aaede5798a48"><code>bee694bf66</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio2.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/17c84cae3c2fbd48e21a48c6e6f84634"><code>17c84cae3c</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio2.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/e2d39c595a4b5a896c55e7cd71c871c9"><code>e2d39c595a</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/polymarket.com_portfolio2.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/7696037ce611263ce4eb1be7bd4ba60e"><code>7696037ce6</code></a> 2500w" /></p> <h2><strong>What can I transfer?</strong></h2> <p>Transfer Crypto is compatible with a range of supported tokens and chains:</p> <table> <thead> <tr> <th align="left"></th> <th align="left"><strong>Ethereum</strong></th> <th align="left"><strong>Polygon</strong></th> <th align="left"><strong>Base</strong></th> <th align="left"><strong>Arbitrum</strong></th> <th align="left"><strong>Solana</strong></th> </tr> </thead> <tbody> <tr> <td align="left"><strong>USDC</strong></td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> </tr> <tr> <td align="left"><strong>USDC.e</strong></td> <td align="left"></td> <td align="left">✅</td> <td align="left"></td> <td align="left"></td> <td align="left"></td> </tr> <tr> <td align="left"><strong>USDT</strong></td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left"></td> </tr> <tr> <td align="left"><strong>DAI</strong></td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left"></td> </tr> <tr> <td align="left"><strong>ETH</strong></td> <td align="left">✅</td> <td align="left"></td> <td align="left">✅</td> <td align="left">✅</td> <td align="left"></td> </tr> <tr> <td align="left"><strong>WETH</strong></td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left">✅</td> <td align="left"></td> </tr> <tr> <td align="left"><strong>MATIC</strong></td> <td align="left">✅</td> <td align="left">✅</td> <td align="left"></td> <td align="left"></td> <td align="left"></td> </tr> <tr> <td align="left"><strong>POL</strong></td> <td align="left">✅</td> <td align="left">✅</td> <td align="left"></td> <td align="left"></td> <td align="left"></td> </tr> <tr> <td align="left"><strong>SOL</strong></td> <td align="left"></td> <td align="left"></td> <td align="left"></td> <td align="left"></td> <td align="left">✅</td> </tr> <tr> <td align="left"><strong>CBBTC</strong></td> <td align="left">✅</td> <td align="left"></td> <td align="left">✅</td> <td align="left"></td> <td align="left"></td> </tr> <tr> <td align="left"><strong>ARB</strong></td> <td align="left"></td> <td align="left"></td> <td align="left"></td> <td align="left">✅</td> <td align="left"></td> </tr> </tbody> </table> <h2>Need help with your deposit?</h2> <p>Please contact us using the live chat button on the bottom right on <a href="http://Polymarket.com"><strong>Polymarket.com</strong></a>** or email us on <a href="mailto:support<a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a>.com">support<a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a>.com</a>**</p> <p><img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/imagee.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/e862c32062cd7b8a7198714241c162dd"><code>e862c32062</code></a>" alt="imagee.png" data-og-width="2556" width="2556" data-og-height="1304" height="1304" data-path="images/imagee.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/imagee.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/ec7b40dddf3c4de102b2106fe30934aa"><code>ec7b40dddf</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/imagee.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/ca51d6f87f78779815cfaf89422725af"><code>ca51d6f87f</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/imagee.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/cc2bf6d79868b05369f3133bd0ab7a57"><code>cc2bf6d798</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/imagee.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/b7a40ad1f76cd5d90875291ff948a4f0"><code>b7a40ad1f7</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/imagee.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/ad31b6cbe24eb83e124df4e9f3cc78f7"><code>ad31b6cbe2</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/images/imagee.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/9be6c9c4bd2f170b92d33e7bac08dbc4"><code>9be6c9c4bd</code></a> 2500w" /></p> <h1>Deposit USDC on Ethereum</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/deposits/usdc-on-eth">https://docs.polymarket.com/polymarket-learn/deposits/usdc-on-eth</a></p> <p>How to deposit USDC on the Ethereum Network to your Polymarket account.</p> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/igx1J2ugFIg?si=gOBDPFnXZTLoRLGM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <p>Depositing USDC on the Ethereum network to Polymarket will automatically bridge your funds to the Polygon network.</p> <p><Steps> <Steps.Step></p> <pre><code>On the Polymarket deposit page, under “Other Methods,” click **USDC (ETH)**. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Copy your unique USDC (ETH) deposit address. &lt;Frame&gt; &lt;img className=&quot;hidden h-32 dark:block&quot; src=&quot;https://polymarket-upload.s3.us-east-2.amazonaws.com/EthAddress-dark.png&quot; /&gt; &lt;/Frame&gt; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Send your USDC to the address you just copied on the Ethereum network. This feature is typically called “send” or “withdraw” on most exchanges and wallets. &lt;Note&gt; Ensure you are sending USDC to your Polymarket Ethereum deposit address on Ethereum network to avoid any issues. &lt;/Note&gt; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Once your deposit is detected, a countdown timer will begin. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>You will see &quot;Deposit Complete&quot; when your funds are ready to trade. &lt;Tip&gt; If your countdown timer resets more than once, or if you encounter any issues, please reach out to support on [Discord](https://discord.com/invite/polymarket) &lt;/Tip&gt; </code></pre> <p></Steps.Step> </Steps></p> <h1>How to Deposit</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/get-started/how-to-deposit">https://docs.polymarket.com/polymarket-learn/get-started/how-to-deposit</a></p> <p>How to add cash to your balance on Polymarket.</p> <h2>Depositing funds on Polymarket</h2> <p>This guide will walk you through the deposit process for Polymarket, covering popular methods and step-by-step instructions for buying and depositing USDC.</p> <p><Note> Need Help? For assistance, reach out to us on <a href="https://discord.gg/polymarket">Discord</a>. </Note></p> <h2>About USDC and Polygon</h2> <p>Polymarket uses <a href="https://circle.com/en/usdc">USDC (USD Coin)</a>, a federally regulated &quot;stable coin&quot; backed by the US dollar.</p> <p>Polymarket utilizes USDC on the Polygon network for transactions. By using USDC on Polygon, Polymarket ensures fast and reliable transactions, enhancing the overall user experience.</p> <h3>How to purchase and deposit USDC</h3> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/IlDLdqT8RjU?si=2f0ze0d-SQznVP_N" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <p>USDC is available on most major exchanges, including Coinbase.</p> <p>If your exchange supports sending or withdrawing to Polygon, we recommend this option for faster and fee-free transactions. Alternatively, you can deposit USDC via the Ethereum network.</p> <h3>Deposit with crypto exchanges</h3> <p>For detailed instructions, check out our guides for purchasing and depositing USDC using popular exchanges:</p> <ul> <li><a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/deposits/coinbase">Deposit from Coinbase</a> (recommended)</li> </ul> <p><Note> If you decide to use an exchange to purchase and send (deposit) USDC to your Polygon deposit address, please ensure you're sending on Polygon Network. If you're unsure, please reach out to support on <a href="https://discord.com/invite/polymarket">Discord</a>. </Note></p> <h3>Deposit with Visa or Mastercard</h3> <p>MoonPay enables you to buy USDC (on Polygon) using your Visa, Mastercard, and select bank cards. Please be aware that payment options and transaction limits may vary depending on your region. <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/deposits/moonpay">How to use MoonPay</a>.</p> <h3>Depositing on Etheruem and Polygon</h3> <p>You can send USDC with your wallet on Ethereum or USDC.e on Polygon to your respective deposit addresses found on the Deposit page. <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/deposits/usdc-on-eth">Learn more</a>.</p> <h1>How to Sign-Up</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/get-started/how-to-signup">https://docs.polymarket.com/polymarket-learn/get-started/how-to-signup</a></p> <p>How to create a Polymarket account.</p> <p><Tip> Need Help? We're available to guide you through the sign-up process on <a href="https://discord.gg/polymarket">Discord</a> </Tip></p> <h3>Email or Google Sign-Up</h3> <p>Signing up for Polymarket with your email address or Google account is quick, simple, and secure.</p> <p><Steps> <Steps.Step></p> <pre><code>Click **Sign Up** on the top right of the Polymarket homepage. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Enter your email address and click **continue**. *You can also use your Google account to sign in and follow the same procedure.* </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>**Copy the security code** provided by Magic. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>You’ll receive an email with the subject “Log in to Polymarket”. Open the email, and click the **Log in to Polymarket** button. In the new window, enter or **paste the security code** from the previous step. &lt;Note&gt;Note: This page will be hosted on auth.magic.link.&lt;/Note&gt; You'll see a Login Complete message. Return to your original Polymarket window. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Back on Polymarket, you'll be signed in. Choose your display name, agree to the terms of service, opt into email updates, and get started trading. </code></pre> <p></Steps.Step> </Steps></p> <h3>Crypto Wallet Sign-Up</h3> <p>Polymarket supports most crypto wallets, including MetaMask, Coinbase Wallet, and others via WalletConnect.</p> <p><Steps> <Steps.Step></p> <pre><code>Click Sign Up on the Polymarket homepage. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Choose your preferred wallet and follow the prompts to connect it to Polymarket. Ensure you are connected to the Polygon Network, your wallet may prompt you to switch networks. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Sign the transaction prompt(s) on your wallet app or extension. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>You're signed in! Choose your display name, agree to the terms of service, opt into email updates, and start trading. </code></pre> <p></Steps.Step> </Steps></p> <p><Note> If you have MetaMask or Coinbase Wallet browser extensions installed but wish to connect using their mobile apps, you'll need to disable the extensions in your browser settings and reload Polymarket. </Note></p> <h1>Making Your First Trade</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/get-started/making-your-first-trade">https://docs.polymarket.com/polymarket-learn/get-started/making-your-first-trade</a></p> <p>How to buy shares.</p> <p>Once you've <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/get-started/how-to-signup">signed up</a> and <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/get-started/how-to-deposit">deposited funds</a>, you're ready to start trading on Polymarket. Here's a step-by-step guide to get you started.</p> <h2>Video guide</h2> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/1lFgkHLqo28?si=i7e61-roRsOVeRMW" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <h2>Walkthrough</h2> <p>Before trading, you'll have to visit the <a href="https://polymarket.com/markets">markets page</a> to see all available markets. Use the search, sort, and filter tools to narrow down your options and find a market that interests you. screen shot.</p> <p><Steps> <Steps.Step></p> <pre><code>### Choose a Market Locate the 'buy' modal, on the right side of the screen. Click the outcome you want to buy (usually Yes or No), then enter the dollar amount you wish to invest. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>### Buy Shares Click **Buy** and confirm the transaction in your wallet. Once your trade goes through, you'll receive a notification confirming its success. &lt;Tip&gt;Congrats, you're officially a Polymarket trader!&lt;/Tip&gt; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>### Share your trade You'll also see a bet slip to share on social media. We love sending \$\$\$ to traders who post their trades on Twitter and tag us! </code></pre> <p></Steps.Step> </Steps></p> <p>Simple, right? If you think you've got the hang of it, it's time to learn about more advanced trading and order types. <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/trading/limit-orders">Limit Orders</a>.</p> <h1>What is Polymarket?</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/get-started/what-is-polymarket">https://docs.polymarket.com/polymarket-learn/get-started/what-is-polymarket</a></p> <p>Polymarket is the world’s largest prediction market, allowing you to stay informed and profit from your knowledge by betting on future events across various topics.</p> <p>Studies show prediction markets are often more accurate than pundits because they combine news, polls, and expert opinions into a single value that represents the market's view of an event's odds. Our markets reflect <em>accurate, unbiased, and real-time probabilities</em> for the events that matter most to you. Markets seek truth.</p> <h2>Quick Overview</h2> <ul> <li><p>On Polymarket, you can <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/making-your-first-trade">buy and sell shares</a> representing future event outcomes (i.e. &quot;Will TikTok be banned in the U.S. this year?&quot;)</p></li> <li><p>Shares in event outcomes are <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/what-is-polymarket/#understanding-prices">always priced</a> between 0.00 and 1.00 <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/FAQ/why-do-i-need-crypto/#why-usdc">USDC</a>, and every pair of event outcomes (i.e. each pair of &quot;YES&quot; + &quot;NO&quot; shares) is fully collateralized by \$1.00 USDC.</p></li> <li><p>Shares are created when <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/trading/limit-orders">opposing sides come to an agreement on odds</a>, such that the sum of what each side is willing to pay is equal to \$1.00.</p></li> <li><p>The shares representing the <em>correct, final outcome</em> are paid out \$1.00 USDC each upon <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/markets/how-are-markets-resolved">market resolution</a>.</p></li> <li><p>Unlike sportsbooks, you are not betting against &quot;the house&quot; – the counterparty to each trade is another Polymarket user. As such:</p> <ul> <li><p>Shares can be sold before the event outcome is known_ (i.e. to lock in profits or cut losses)</p></li> <li><p><em>There is no &quot;house&quot; to ban you for winning too much.</em></p></li> </ul></li> </ul> <h3>Understanding Prices</h3> <p>Prices = Probabilities.</p> <p><VideoPlayer src="https://www.youtube.com/embed/v0CvPEYBzTI?si=9cirMPQ72orQzLyS" /></p> <p><em>Prices (odds) on Polymarket represent the current probability of an event occurring.</em> For example, in a market predicting whether the Miami Heat will win the 2025 NBA Finals, if YES shares are trading at 18 cents, it indicates a 18% chance of Miami winning.</p> <p>These odds are determined by what price other Polymarket users are currently willing to buy &amp; sell those shares at. Just how stock exchanges don't &quot;set&quot; the prices of stocks, Polymarket does not set prices / odds - they're a function of supply &amp; demand.</p> <p><a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/docs/guides/trading/how-are-prices-calculated">Learn more &gt;</a></p> <h3>Making money on markets</h3> <p>In the example above, if you believe Miami's chances of winning are higher than 18%, you would buy “Yes” shares at 18 cents each. If Miami wins, each “Yes” share would be worth \$1, resulting in an 82-cent profit per share. Conversely, any trader who owned “No” shares would see their investment become worthless once the game is over.</p> <p>Since it's a market, you're not locked into your trade. You can sell your shares at any time at the current market price. As the news changes, the supply and demand for shares fluctuates, causing the share price to reflect the new odds for the event.</p> <h3>How accurate are Polymarket odds?</h3> <p>Research shows prediction markets are often more accurate than experts, polls, and pundits. Traders aggregate news, polls, and expert opinions, making informed trades. Their economic incentives ensure market prices adjust to reflect true odds as more knowledgeable participants join.</p> <p>This makes prediction markets the best source of real-time event probabilities. People use Polymarket for the most accurate odds, gaining the ability to make informed decisions about the future.</p> <p>If you're an expert on a certain topic, Polymarket is your opportunity to profit from trading based on your knowledge, while improving the market's accuracy.</p> <h1>How Are Markets Disputed?</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/markets/dispute">https://docs.polymarket.com/polymarket-learn/markets/dispute</a></p> <p><strong>Anyone can dispute a proposed market resolution if they feel it was proposed in error.</strong></p> <p>Once a market is proposed for resolution it goes into a challenge period of 2 hours.</p> <p>If no one challenges the proposal the resolution is deemed valid and the proposer receives their bond back plus the reward.</p> <p>During the 2-hour challenge period, anyone may dispute the proposal on the <a href="https://oracle.uma.xyz/">UMA dapp</a> by posting a challenge bond of the same amount as the proposer bond (usually \$750).</p> <p>This begins the debate period of 24-48 hours (votes happen every other day and there will always be at least 24 hours for discussion). Anyone wishing to contribute evidence to the discussion can do so in the Uma Discord server in the #evidence-rationale and #voting-discussion channels.</p> <p>After the debate period, Uma token holders vote (this process takes approximately 48 hours) and one of four outcomes happens:</p> <h2>Outcomes</h2> <h3>Proposer wins</h3> <p>Proposer receives their bond back plus half the disputer’s bond as a bounty. Disputer loses their bond.</p> <h3>Disputer wins</h3> <p>Disputer receives their bond back plus half the proposer’s bond as a bounty. Proposer loses their bond.</p> <h3>Too Early</h3> <p>This outcome is for proposals for which the underlying event has not yet happened. Eg the result of a sports match that is still ongoing. Disputer receives their bond back plus half the proposer’s bond as a bounty. Proposer loses their bond.</p> <h3>Unknown/50-50</h3> <p>This (rarely used) outcome is for events where none of the other options are appropriate. In this case the market price resolves to 50 yes and 50 no. Disputer receives their bond back plus half the proposer’s bond as a bounty. Proposer loses their bond.</p> <h1>How Are Markets Clarified?</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-clarified">https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-clarified</a></p> <p>How are markets on Polymarket clarified?</p> <h2>Overview</h2> <ul> <li><p>Markets are resolved according to the rules set forth on the market page.</p></li> <li><p>The rules specify the resolution source, the market end date, and they outline how the market should resolve in various edge-cases.</p></li> <li><p>The market title describes the market, but the rules define how it should be resolved.</p></li> </ul> <p><Important>It is important to read the rules before trading in a market. </Important></p> <p><Frame> <img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/market-rules.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/22ee2dab424287bd8ffe4ee8017dff4e"><code>22ee2dab42</code></a>" data-og-width="1684" width="1684" data-og-height="1278" height="1278" data-path="polymarket-learn/markets/market-rules.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/market-rules.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/a18e693ed0ef40b937a20c2f016b9285"><code>a18e693ed0</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/market-rules.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/55f60bb6f0fc6e73dbc79f4ddb89a48b"><code>55f60bb6f0</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/market-rules.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/fd54012529a854f0eaff03c2b8622923"><code>fd54012529</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/market-rules.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/cee1310e052ddc361c2c5f05cb5af08d"><code>cee1310e05</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/market-rules.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/ddcac99c3515d39e8803420fe47c6263"><code>ddcac99c35</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/market-rules.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/d78bcb523db705fe43cf95a9db20b1e0"><code>d78bcb523d</code></a> 2500w" /> </Frame></p> <hr> <h2>Clarifications</h2> <p>In rare cases, circumstances occur that were not foreseen at a market’s creation and it becomes necessary to clarify rules after trading has begun. In these cases Polymarket may issue an “Additional context” update to the rules.</p> <p><Tip>If you believe a clarification is necessary for a market, the best place to request a clarification is in the <a href="https://discord.com/invite/polymarket">Polymarket Discord</a> <strong>#market-review</strong> channel.</Tip></p> <p><Frame caption="An example clarification in the market on what Trump would say during Hannity Town Hall. "> <img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/additional-context.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/c541cfe17203de08a547da32d0995804"><code>c541cfe172</code></a>" data-og-width="940" width="940" data-og-height="482" height="482" data-path="polymarket-learn/markets/additional-context.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/additional-context.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/189aff574aa25f6cc33a2aada719e7ee"><code>189aff574a</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/additional-context.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/cc34b7c65289a0481c23d4f082410684"><code>cc34b7c652</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/additional-context.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/251fd8aff678b616583d1997ce2bcfcf"><code>251fd8aff6</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/additional-context.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/1b11238c8c08383cae76cee0b2747f73"><code>1b11238c8c</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/additional-context.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/358861be6c10816b76e5dd56e3c446d1"><code>358861be6c</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/markets/additional-context.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/1b556681e45977ceefadecd562a61360"><code>1b556681e4</code></a> 2500w" /> </Frame></p> <h1>How Are Markets Created?</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-created">https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-created</a></p> <p>Markets are created by the markets team with input from users and the community.</p> <h2>Can I create my own market?</h2> <p>While users cannot directly create their own markets, they are encouraged to suggest ideas for new markets. In choosing which markets to list, Polymarket considers the following factors:</p> <p><Steps> <Steps.Step></p> <pre><code>Is there enough demand for trading in the market to produce an accurate probability? Polymarket targets \$X in trading volume as a minimum. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Is there social good or news value in understanding the probability generated by the market? </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Can the market be resolved clearly? </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Is there a credible information source for market resolution? *For example, a country’s elections commission can be specified as the official resolution source for an election.* </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Can the market be resolved in a definitive time frame? </code></pre> <p></Steps.Step> </Steps></p> <h3>Submit your market proposal</h3> <p>To give your proposal the best chance of being listed, include as much information as possible, such as:</p> <ul> <li>What is the market title?</li> <li>What is the <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/markets/how-are-markets-resolved">resolution source</a>?</li> <li>Evidence of demand for trading that market</li> </ul> <p>The best ways to propose a new market are:</p> <ul> <li>On <a href="https://discord.com/invite/polymarket">Discord</a> in the <strong>#market-suggestion</strong> channel</li> <li>On Twitter / X by tagging <a href="https://twitter.com/intent/tweet?text=I+have+an+idea+for+a+new+market+<a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a>"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a></a></li> </ul> <h1>How Are Prediction Markets Resolved?</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-resolved">https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-resolved</a></p> <p>Markets are resolved by the UMA Optimistic Oracle, a smart-contract based optimistic oracle.</p> <h2>Overview</h2> <ul> <li><p>When the result of a market becomes clear, the market can be “resolved,” or permanently finalized.</p></li> <li><p>Markets are resolved according to the market's pre-defined rules, which can be found under market's the order book.</p></li> <li><p>When a market is resolved, holders of winning shares receive \$1 per share, losing shares become worthless, and trading of shares is no longer possible.</p></li> <li><p>To resolve a market, an outcome must first be “proposed,” which involves putting up a bond in USDC.e which will be forfeited if the proposal is unsuccessful.</p></li> <li><p>If the proposal is validated as accurate, the proposer will receive a reward for your proposal.</p></li> </ul> <p><Warning> If you propose a market too early, or are unsuccessful in your proposal, you will lose all of your \$750 bond. Do not propose a resolution unless you understand the process and are confident in your view. </Warning></p> <h3>To propose a market resolution</h3> <p><Steps> <Steps.Step></p> <pre><code>Navigate to the market you want to propose and click Resolution &gt; Propose Resolution. &lt;Note&gt;You will be taken to the corresponding UMA oracle page for the market, which shows the bond required and reward for successful proposal.&lt;/Note&gt; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Ensure that you have enough USDC.e in your wallet on Polygon to supply the bond (usually \$750) </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Select the outcome you would like to propose from the drop-down menu. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Connect your wallet and submit the transaction. It will now enter the UMA Oracle’s verification queue. </code></pre> <p></Steps.Step> </Steps></p> <p>Once in the verification process, UMA will review the transaction to ensure it was proposed correctly. If approved, you will receive your bond amount back in your wallet plus the reward. If not approved, it will enter Uma’s dispute resolution process, which is described in detail here.</p> <h3>To dispute a proposed resolution</h3> <p>Once a market is proposed for resolution it goes into a challenge period of 2 hours.</p> <p>If you do not agree with a proposed resolution, you can <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/markets/dispute">dispute the outcome</a>.</p> <h1>Trading Fees</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/fees">https://docs.polymarket.com/polymarket-learn/trading/fees</a></p> <p><strong>Polymarket does not charge any type of fee.</strong></p> <p>There are no fees to deposit or withdraw USDC, although intermediaries such as Coinbase, MoonPay, etc may charge transaction fees.</p> <p>There are no fees to trade shares in any market.</p> <h1>Holding Rewards</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/holding-rewards">https://docs.polymarket.com/polymarket-learn/trading/holding-rewards</a></p> <h2>What are we doing?</h2> <p>To keep long-term pricing accurate, we're paying 4.00% annualized Holding Reward based on your total position value in certain polymarkets. We anticipate rolling out a new reward and oracle-resolution system later this year — at which point there will be a simple 1-click migration.</p> <h2>Reward Rate and Conditions</h2> <p>The current rate is set at 4.00% and applies to all eligible positions. This rate is variable and subject to change at Polymarket's discretion. We also reserve the right to introduce limits to the total amount of rewards paid out at any time. This iteration of rewards is funded through the Polymarket Treasury.</p> <p>Your total position value is randomly sampled once each hour, and the reward is distributed daily. Your rewards are calculated based on the total position value of your eligible positions at the time of evaluation.</p> <h3><strong>Total Position Value Computation</strong></h3> <p>For each eligible polymarket, we calculate the eligible position in the following way:</p> <p><strong>Position Valuation</strong>:</p> <ul> <li>Based on your current &quot;Yes&quot; and &quot;No&quot; shares and the most recent mid-price for each outcome.</li> </ul> <h3><strong>Example</strong></h3> <p>If you hold at time of sample:</p> <ul> <li>30,000 “Yes” shares at a price of <strong>\$0.53</strong></li> <li>10,000 “No” shares at a price of <strong>\$0.45</strong></li> </ul> <p><strong>Total Position Value</strong> =</p> <p>→ <code>(30000 × 0.53) + (10000 × 0.45)</code></p> <p>→ <code>$15,900 + $4,500 = $20,400</code></p> <p><strong>Hourly Holding Reward Calculation</strong> (based on 4.00% Annual Reward):</p> <p>→ <code>$20400 × (0.04 / 365 / 24) ≈ $.09315068493</code></p> <h2>Eligible Events:</h2> <ul> <li><a href="https://polymarket.com/event/presidential-election-winner-2028">Presidential Election Winner 2028</a></li> <li><a href="https://polymarket.com/event/republican-presidential-nominee-2028">Republican Presidential Nominee 2028</a></li> <li><a href="https://polymarket.com/event/democratic-presidential-nominee-2028">Democratic Presidential Nominee 2028</a></li> <li><a href="https://polymarket.com/event/which-party-wins-2028-us-presidential-election">Which party wins 2028 US Presidential Election?</a></li> <li><a href="https://polymarket.com/event/balance-of-power-2026-midterms">Balance of Power: 2026 Midterms</a></li> <li><a href="https://polymarket.com/event/which-party-will-win-the-senate-in-2026">Which party will win the Senate in 2026?</a></li> <li><a href="https://polymarket.com/event/which-party-will-win-the-house-in-2026">Which party will win the House in 2026?</a></li> <li><a href="https://polymarket.com/event/erdoan-out-before-2027">Erdoğan out before 2027?</a></li> <li><a href="https://polymarket.com/event/zelenskyy-out-as-ukraine-president-before-2027">Zelenskyy out as Ukraine president before 2027?</a></li> <li><a href="https://polymarket.com/event/netanyahu-out-before-2027">Netanyahu out before 2027?</a></li> <li><a href="https://polymarket.com/event/xi-jinping-out-before-2027">Xi Jinping out before 2027?</a></li> <li><a href="https://polymarket.com/event/putin-out-before-2027">Putin out as President of Russia before 2027?</a></li> <li><a href="https://polymarket.com/event/russia-x-ukraine-ceasefire-before-2027">Russia x Ukraine ceasefire before 2027?</a></li> </ul> <h1>How Are Prices Calculated?</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/how-are-prices-calculated">https://docs.polymarket.com/polymarket-learn/trading/how-are-prices-calculated</a></p> <p>The prices probabilities displayed on Polymarket are the midpoint of the bid-ask spread in the orderbook.</p> <h2>Initial Price</h2> <ul> <li><p>When a market is created, there are initially zero shares and no pre-defined prices or odds.</p></li> <li><p>Market makers (a fancy term for traders placing limit orders) interested in buying YES or NO shares can place <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/trading/limit-orders">Limit Orders</a> at the price they're willing to pay</p></li> <li><p>When offers for the YES and NO side equal \$1.00, the order is &quot;matched&quot; and that \$1.00 is converted into 1 YES and 1 NO share, each going to their respective buyers.</p></li> </ul> <p>For example, if you place a limit order at \$0.60 for YES, that order is matched when someone places a NO order at \$0.40. <em>This becomes the initial market price.</em></p> <p><Important>Polymarket is not a &quot;bookie&quot; and does not set prices / odds. Prices are set by what Polymarket users are currently willling to buy/sell shares at. All trades are peer-to-peer.</Important></p> <h2>Future Price</h2> <p>The prices displayed on Polymarket are the midpoint of the bid-ask spread in the orderbook — unless that spread is over \$0.10, in which case the last traded price is used.</p> <p>Like the stock market, prices on Polymarket are a function of realtime supply &amp; demand.</p> <p><VideoPlayer src="https://www.youtube.com/embed/v0CvPEYBzTI?si=9cirMPQ72orQzLyS" /></p> <h3>Prices = Probabilities</h3> <p>In the market below, the probability of 37% is the midpoint between the 34¢ bid and 40¢ ask. If the bid-ask spread is wider than 10¢, the probability is shown as the last traded price.</p> <p><Frame> <img className="block w-full h-auto dark:hidden" style={{ maxWidth: '100%', height: 'auto' }} noZoom src="https://polymarket-upload.s3.us-east-2.amazonaws.com/how_are_prices_calculated.png" /> </Frame></p> <p><Note>You may not be able to buy shares at the displayed probability / price because there is a bid-ask spread. In the above example, a trader wanting to buy shares would pay 40¢ for up to 4,200 shares, after which the price would rise to 43¢.</Note></p> <h1>Limit Orders</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/limit-orders">https://docs.polymarket.com/polymarket-learn/trading/limit-orders</a></p> <p>What are limit orders and how to make them.</p> <h2>Video guide</h2> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/_WfpoVGqzbw?si=yvuXC5i08Eik-PnR" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <h2>What are Limit Orders?</h2> <p>Limit orders are open orders (pending trades) that only execute when the market trades at your desired price.</p> <p>For example, if the highest you’re willing to pay for a share of Trump “Yes” in the 2024 Republican Nomination is 72c, but the current market price is 73c, you could create a limit order at 72c and wait until someone is willing to sell Yes shares at your desired price.</p> <p><Note> It’s not necessary for the entire order to execute at once. Limit orders can ‘partially fill’ as individual traders fill parts of your order. </Note></p> <p><Steps> <Steps.Step></p> <pre><code>In the buy modal, select **limit** in the order type dropdown. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Enter the price you are willing to buy (or sell, if you’ve selected to sell) shares at. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Enter the number of shares you want to buy or sell at that price. *Optional: Set an expiration date for your limit order. This means that if the order does not execute at your desired price within this timeframe, it will be canceled.* </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>Click **Buy** and confirm the transaction in your wallet. &lt;Note&gt; Your limited orders that have yet to be filled are called &quot;Open Orders&quot;. &lt;/Note&gt; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>You'll see a **“Your deposit is pending”** screen. You'll receive a confirmation email from Coinbase when your USDC purchase is successful. </code></pre> <p></Steps.Step> </Steps></p> <h2>Managing limit orders</h2> <p>When you have an open order, you'll find it displayed just below the Order Book on the market's page.</p> <p>If you have open orders across multiple markets, you can easily manage and monitor them all from the <a href="https://polymarket.com/portfolio?tab=Open+orders">Portfolio page</a>.</p> <p><Tip> Specifically for sports markets, any outstanding limit orders are automatically cancelled once the game begins, clearing the entire order book at the official start time. Be aware, game start times can shift so it’s important to always monitor your orders closely in case they are not cleared due to game changes or other circumstances. </Tip></p> <p><Tip> Additionally, sports markets include a 3-second delay on the placement of marketable orders. </Tip></p> <h2>Canceling limit orders</h2> <p>When you have an open order, you'll find it displayed just below the Order Book on the market's page.</p> <p>To cancel the order, you can simply click the red <strong>x</strong> button alongside the order.</p> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/KuA2UdUfZls?si=RUpuzqB9lbBB2pl9" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <p>If you have open orders across multiple markets, you can easily manage and monitor them all from the <a href="https://polymarket.com/portfolio?tab=Open+orders">Portfolio page</a>.</p> <p>Nice! You can officially call yourself an advanced trader.</p> <p><Tip> If some of this still isn’t making sense, feel free to reach out to us on <a href="https://discord.com/invite/polymarket">Discord</a>. We’re happy to help get you up to speed. </Tip></p> <h1>Liquidity Rewards</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/liquidity-rewards">https://docs.polymarket.com/polymarket-learn/trading/liquidity-rewards</a></p> <p>Learn how to earn rewards merely by placing trades on Polymarket</p> <p>With Polymarket's Liquidity Rewards Program, you can earn money by placing limit orders that help keep the market active and balanced.</p> <h2>Overview</h2> <ul> <li><p>The closer your orders are to the market's average price, the more you earn.</p></li> <li><p>The reward amount depends on how helpful your orders are in terms of size and pricing compared to others.</p></li> <li><p>The more competitive your limit orders, the more you can make.</p></li> <li><p>You get paid daily based on how much your orders add to the market, and can use our <a href="https://polymarket.com/rewards">Rewards page</a> to check your current earnings for the day, which markets have rewards in place, as well as how much.</p></li> <li><p>The minimum reward payout is \$1; amounts below this will not be paid.</p></li> </ul> <p><Frame> <img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-earnings.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/ebcb693900b79d2c23356b0f087b5941"><code>ebcb693900</code></a>" data-og-width="2000" width="2000" data-og-height="767" height="767" data-path="polymarket-learn/media/liquidity-rewards-earnings.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-earnings.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/9db6070985119ba1a50a442567f0aa60"><code>9db6070985</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-earnings.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/0751971d6bdbf37e5b6199c75667b7df"><code>0751971d6b</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-earnings.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/f202b8060f23a9dfe979a984f6ff7dc2"><code>f202b8060f</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-earnings.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/85fca21bad31dda8a833de3c0ec3ffbf"><code>85fca21bad</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-earnings.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/a1ac5afea3e04a8223d135159792cfbc"><code>a1ac5afea3</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-earnings.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/85b91f7804be348fcea35ccc7981ae6e"><code>85b91f7804</code></a> 2500w" /> </Frame></p> <p>Simply put, the more you help the market by placing good orders, the more rewards you earn!</p> <h2>Seeing Rewards in the Order Book</h2> <h3>Viewing Rewards</h3> <p>The total rewards, max spread, and minimum shares required to earn rewards vary by market. You can view the rewards for a given market in its Order Book.</p> <ul> <li><p>On the Polymarket order book, you can hover over the Rewards text to see the amount of rewards available in total on each market.</p></li> <li><p>The blue highlighted lines correspond to the max spread — meaning the farthest distance your limit order can be from the midpoint of the market to earn rewards.</p></li> <li><p>In the example below, because the max spread is 3c, every order within 3c of the midpoint is eligible for rewards. If the midpoint is &lt; \$0.10, you need to have orders on both sides to qualify.</p></li> </ul> <p><Frame> <img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-market.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/12202bc1af31cdc1935ee816ca00f308"><code>12202bc1af</code></a>" data-og-width="2000" width="2000" data-og-height="1367" height="1367" data-path="polymarket-learn/media/liquidity-rewards-market.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-market.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/b065f81168d3d5f9541857471a041427"><code>b065f81168</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-market.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/35755273beea782b1bb20c11288afb74"><code>35755273be</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-market.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/75f37d73214985f85bdb5c98351a4654"><code>75f37d7321</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-market.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/7b14257457d28ae5209200328093439d"><code>7b14257457</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-market.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/58d5ff89f7f9efe900bdb9602de7b9b1"><code>58d5ff89f7</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/liquidity-rewards-market.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/fa5269ee4ff8c40974c69024a89c2e90"><code>fa5269ee4f</code></a> 2500w" /> </Frame></p> <h3>Earning Rewards</h3> <p>When your orders are earning rewards you’ll see a blue highlight around the clock icon, as shown below:</p> <p><Frame> <img src="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/earning-liquidity-rewards.png?fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/1a0c05e93f37c95c66b4ad67ff66c320"><code>1a0c05e93f</code></a>" data-og-width="2000" width="2000" data-og-height="1631" height="1631" data-path="polymarket-learn/media/earning-liquidity-rewards.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/earning-liquidity-rewards.png?w=280&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/f8423304aac914fefae7361fc2d2c17e"><code>f8423304aa</code></a> 280w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/earning-liquidity-rewards.png?w=560&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/69ee175aab44d11b54ca22e02769c7e7"><code>69ee175aab</code></a> 560w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/earning-liquidity-rewards.png?w=840&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/53a591eb0724fcc6d1bc60ff57d54a4c"><code>53a591eb07</code></a> 840w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/earning-liquidity-rewards.png?w=1100&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/c1360cc0a9aadafee148df76e446dc39"><code>c1360cc0a9</code></a> 1100w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/earning-liquidity-rewards.png?w=1650&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/8c078f355b61a3d8bd09a62ff246fbad"><code>8c078f355b</code></a> 1650w, https://mintcdn.com/polymarket-<a href="/ka-cn/vibe-coding-cn/commit/292d1b1b"><code>292d1b1b</code></a>/YUHnSq4JdekVofRY/polymarket-learn/media/earning-liquidity-rewards.png?w=2500&fit=max&auto=format&n=YUHnSq4JdekVofRY&q=85&s=<a href="/ka-cn/vibe-coding-cn/commit/4cdcf0dc79ea6e6e28dcce1cbf08657e"><code>4cdcf0dc79</code></a> 2500w" /> </Frame></p> <h2>Learn more</h2> <p>Rewards are paid out automatically every day at ~midnight UTC. Your history on your portfolio page will reflect rewards paid to your address.</p> <p>To read more about the specific calculations and formulas that determine rewards, visit our <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/developers/rewards/overview">Rewards Documentation</a>.</p> <h1>Market Orders</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/market-orders">https://docs.polymarket.com/polymarket-learn/trading/market-orders</a></p> <p>How to buy shares.</p> <h1>Market Orders</h1> <p>Once you've <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/get-started/how-to-signup">signed up</a> and <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/get-started/how-to-deposit">deposited funds</a>, you're ready to start trading on Polymarket. Here's a step-by-step guide to get you started.</p> <h2>Video Walkthrough</h2> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/1lFgkHLqo28?si=i7e61-roRsOVeRMW" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <h2>Placing a Market Order</h2> <p>_Before trading, you'll want to visit the <a href="https://polymarket.com/markets">markets page</a> to find a market that interests you.</p> <p><Steps> <Steps.Step></p> <pre><code>### [Choose a market](https://polymarket.com/markets) Locate the 'buy' modal, on the right side of the screen. Click the outcome you want to buy (usually Yes or No), then enter the dollar amount you wish to invest. </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>### Buy shares Click **Buy** and confirm the transaction in your wallet. Once your trade goes through, you'll receive a notification confirming its success. &lt;Tip&gt;Congrats, you're officially a Polymarket trader!&lt;/Tip&gt; </code></pre> <p></Steps.Step></p> <p><Steps.Step></p> <pre><code>### Share your bet slip You'll also see a bet slip to share on social media. We love sending \$\$\$ to traders who post their trades on Twitter and tag us! </code></pre> <p></Steps.Step> </Steps></p> <p>Simple, right? If you think you've got the hang of it, it's time to learn about more advanced trading and order types. <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/trading/limit-orders">Limit Orders</a>.</p> <h1>Does Polymarket Have Trading Limits?</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/no-limits">https://docs.polymarket.com/polymarket-learn/trading/no-limits</a></p> <p>By design, the Polymarket orderbook <strong>does not</strong> have trading size limits. It matches willing buyers and sellers of any amount.</p> <p>However, there is no guarantee that it will be possible to transact a desired amount of shares without impacting the price significantly, or at all if there are no willing counterparties. Before trading in any market, especially in large size, it is valuable to look at the orderbook to understand depth of liquidity, ie how many buyers or sellers are in the market and their desired trade size and price.</p> <h1>Using the Order Book</h1> <p>Source: <a href="https://docs.polymarket.com/polymarket-learn/trading/using-the-orderbook">https://docs.polymarket.com/polymarket-learn/trading/using-the-orderbook</a></p> <p>Understanding the Order Book will help you become an advanced trader.</p> <p>In the Getting Started tutorial on <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/get-started/making-your-first-trade">Making your First Trade</a>, we learned about market orders.</p> <p>In a market order, your trade executes instantly at the current market price.</p> <p>But what if you think the market price is too high and want to set a specific price that you would be willing to accept? These are called <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/trading/limit-orders">Limit Orders</a>.</p> <h2>Viewing the Order Book</h2> <p>The order book is a list of every open order to buy or sell shares in a particular market.</p> <p><Frame> <img className="block w-full h-auto dark:hidden" style={{ maxWidth: '100%', height: 'auto' }} noZoom src="https://polymarket-upload.s3.us-east-2.amazonaws.com/Orderbook-light.png" /> </Frame></p> <p>In this market, <strong>“Presidential Election Winner 2024”</strong>, we are viewing the order book for Trump <span style={{ backgroundColor: '#E5F8E6', color: '#27AE60', padding: '2px 4px', borderRadius: '4px' }}>Yes</span> shares.</p> <p>The green side represents the <span style={{ backgroundColor: '#E5F8E6', color: '#27AE60', padding: '2px 4px', borderRadius: '4px' }}>Bids</span>: the highest price traders are willing to pay to buy Trump <span style={{ backgroundColor: '#E5F8E6', color: '#27AE60', padding: '2px 4px', borderRadius: '4px' }}>Yes</span> shares.</p> <p>The red side represents the <span style={{ backgroundColor: '#FEEEE5', color: '#F55A00', padding: '2px 4px', borderRadius: '4px' }}>Asks</span>: the lowest price traders are willing to accept to sell Trump <span style={{ backgroundColor: '#E5F8E6', color: '#27AE60', padding: '2px 4px', borderRadius: '4px' }}>Yes</span> shares.</p> <p><Tip> Notice that there is a 0.3c gap between the highest bid and the lowest ask price. This is referred to as the spread. </Tip></p> <h2>Managing open orders</h2> <p>When you have an open order, you'll find it displayed just below the Order Book on the market's page.</p> <p>If you have open orders across multiple markets, you can easily manage and monitor them all from the <a href="https://polymarket.com/portfolio?tab=Open+orders">Portfolio page</a>.</p> <h2>Canceling open orders</h2> <p>When you have an open order, you'll find it displayed just below the Order Book on the market's page.</p> <p>To cancel the order, you can simply click the red <strong>x</strong> button alongside the order.</p> <p><iframe width="560" height="315" src="https://www.youtube.com/embed/KuA2UdUfZls?si=RUpuzqB9lbBB2pl9" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen /></p> <p>If you have open orders across multiple markets, you can easily manage and monitor them all from the <a href="https://polymarket.com/portfolio?tab=Open+orders">Portfolio page</a>.</p> <p>Nice! You can officially call yourself an advanced trader.</p> <p><Tip> If some of this still isn’t making sense, feel free to reach out to us on <a href="https://discord.com/invite/polymarket">Discord</a>. We’re happy to help get you up to speed. </Tip></p> <h1>Glossary</h1> <p>Source: <a href="https://docs.polymarket.com/quickstart/introduction/definitions">https://docs.polymarket.com/quickstart/introduction/definitions</a></p> <table> <thead> <tr> <th>Term</th> <th>Definition</th> </tr> </thead> <tbody> <tr> <td><strong>Token</strong></td> <td>A token represents a stake in a specific Yes/No outcome in a Market. The price of a token can fluctuate between $0 - $1 based on the market belief in the outcome. When a market resolves, the token associated with the correct prediction can be redeemed for \$1 USDC. This is also sometimes called an <em>Asset Id</em></td> </tr> <tr> <td><strong>Market</strong></td> <td>A single event outcome. Corresponds to a pair of CLOB token IDs(Yes/No), a market address, a question ID and a condition ID.</td> </tr> <tr> <td><strong>Event</strong></td> <td>A collection of related markets grouped under a common topic or theme.</td> </tr> <tr> <td><strong>SLUG</strong></td> <td>A human readable identification for a market or event. Can be found in the URL of any Polymarket Market or Event. You can use this slug to find more detailed information about a market or event by using it as a parameter in the <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/developers/gamma-markets-api/get-events">Get Events</a> or <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/developers/gamma-markets-api/get-markets">Get Markets</a> endpoints.</td> </tr> <tr> <td><strong>Negative Risk (negrisk)</strong></td> <td>A group of Markets(Event) in which only one Market can resolve as yes. For more detail see <a href="https://docs.polymarket.com/developers/neg-risk/overview">Negrisk Details</a></td> </tr> <tr> <td><strong>Central Limit Order Book</strong></td> <td>The off-chain order matching system. This is where you place resting orders and market orders are matched with existing orders before being sent on-chain.</td> </tr> <tr> <td><strong>Polygon Network</strong></td> <td>A scalable, multi-chain blockchain platform used by Polymarket to facilitate on-chain activities(contract creation, token transfers, etc)</td> </tr> </tbody> </table> <h1>Developer Quickstart</h1> <p>Source: <a href="https://docs.polymarket.com/quickstart/introduction/main">https://docs.polymarket.com/quickstart/introduction/main</a></p> <p>This section of the documentation will provide all the essential resources to help you perform basic trading actions on the Polymarket platform. If you're just getting started, you're in the right place.</p> <p>Everything you need to start building with the Polymarket API is right here. Let’s get started.</p> <p><a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/quickstart/introduction/showcase">Not sure what to build next? Get inspired by checking out real examples from other developers using the API.</a></p> <h1>API Rate Limits</h1> <p>Source: <a href="https://docs.polymarket.com/quickstart/introduction/rate-limits">https://docs.polymarket.com/quickstart/introduction/rate-limits</a></p> <h2>How Rate Limiting Works</h2> <p>All rate limits are enforced using Cloudflare's throttling system. When you exceed the maximum configured rate for any endpoint, requests are throttled rather than immediately rejected. This means:</p> <ul> <li><strong>Throttling</strong>: Requests over the limit are delayed/queued rather than dropped</li> <li><strong>Burst Allowances</strong>: Some endpoints allow short bursts above the sustained rate</li> <li><strong>Time Windows</strong>: Limits reset based on sliding time windows (e.g., per 10 seconds, per minute)</li> </ul> <h2>General Rate Limits</h2> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>General Rate Limiting</td> <td>5000 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>&quot;OK&quot; Endpoint</td> <td>50 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h2>Data API Rate Limits</h2> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>Data API (General)</td> <td>200 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>Data API (Alternative)</td> <td>1200 requests / 1 minute</td> <td>10 minutes block on violation</td> </tr> <tr> <td>Data API <code>/trades</code></td> <td>75 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>Data API &quot;OK&quot; Endpoint</td> <td>10 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h2>GAMMA API Rate Limits</h2> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>GAMMA (General)</td> <td>750 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>GAMMA Get Comments</td> <td>100 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>GAMMA <code>/events</code></td> <td>100 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>GAMMA <code>/markets</code></td> <td>125 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>GAMMA <code>/markets</code> /events listing</td> <td>100 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>GAMMA Tags</td> <td>100 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>GAMMA Search</td> <td>300 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h2>CLOB API Rate Limits</h2> <h3>General CLOB Endpoints</h3> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>CLOB (General)</td> <td>5000 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB GET Balance Allowance</td> <td>125 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB UPDATE Balance Allowance</td> <td>20 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h3>CLOB Market Data</h3> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>CLOB <code>/book</code></td> <td>200 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>/books</code></td> <td>80 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>/price</code></td> <td>200 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>/prices</code></td> <td>80 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>/midprice</code></td> <td>200 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>/midprices</code></td> <td>80 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h3>CLOB Ledger Endpoints</h3> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>CLOB Ledger (<code>/trades</code> <code>/orders</code> <code>/notifications</code> <code>/order</code>)</td> <td>300 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB Ledger <code>/data/orders</code></td> <td>150 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB Ledger <code>/data/trades</code></td> <td>150 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>/notifications</code></td> <td>125 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h3>CLOB Markets &amp; Pricing</h3> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>CLOB Price History</td> <td>100 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB Markets</td> <td>250 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB Market Tick Size</td> <td>50 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>markets/0x</code></td> <td>50 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB <code>/markets</code> listing</td> <td>100 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h3>CLOB Authentication</h3> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>CLOB API Keys</td> <td>50 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h3>CLOB Trading Endpoints</h3> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>CLOB POST <code>/order</code></td> <td>2400 requests / 10s (240/s)</td> <td>BURST - Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB POST <code>/order</code></td> <td>24000 requests / 10 minutes (40/s)</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/order</code></td> <td>2400 requests / 10s (240/s)</td> <td>BURST - Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/order</code></td> <td>24000 requests / 10 minutes (40/s)</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB POST <code>/orders</code></td> <td>800 requests / 10s (80/s)</td> <td>BURST - Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB POST <code>/orders</code></td> <td>12000 requests / 10 minutes (20/s)</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/orders</code></td> <td>800 requests / 10s (80/s)</td> <td>BURST - Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/orders</code></td> <td>12000 requests / 10 minutes (20/s)</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/cancel-all</code></td> <td>200 requests / 10s (20/s)</td> <td>BURST - Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/cancel-all</code></td> <td>3000 requests / 10 minutes (5/s)</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/cancel-market-orders</code></td> <td>800 requests / 10s (80/s)</td> <td>BURST - Throttle requests over the maximum configured rate</td> </tr> <tr> <td>CLOB DELETE <code>/cancel-market-orders</code></td> <td>12000 requests / 10 minutes (20/s)</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h2>Other API Rate Limits</h2> <table> <thead> <tr> <th>Endpoint</th> <th>Limit</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td>RELAYER <code>/submit</code></td> <td>15 requests / 1 minute</td> <td>Throttle requests over the maximum configured rate</td> </tr> <tr> <td>User PNL API</td> <td>100 requests / 10s</td> <td>Throttle requests over the maximum configured rate</td> </tr> </tbody> </table> <h1>Your First Order</h1> <p>Source: <a href="https://docs.polymarket.com/quickstart/orders/first-order">https://docs.polymarket.com/quickstart/orders/first-order</a></p> <p>Placing your first order using one of our two Clients is relatively straightforward.</p> <p>For Python: <code>pip install py-clob-client</code>.</p> <p>For Typescript: <code>npm install polymarket/clob-client</code> &amp; <code>npm install ethers</code>.</p> <p>After installing one of those you will be able to run the below code. Take the time to fill in the constants at the top and ensure you're using the proper signature type based on your login method. <Tip>Many additional examples for the Typescript and Python clients are available <a href="https://github.com/Polymarket/clob-client/tree/main/examples">here(TS)</a> and <a href="https://github.com/Polymarket/py-clob-client/tree/main/examples">here(Python)</a> .</Tip></p> <p><CodeGroup></p> <pre><code class="language-python"> from py_clob_client.client import ClobClient from py_clob_client.clob_types import OrderArgs, OrderType from py_clob_client.order_builder.constants import BUY host: str = &quot;https://clob.polymarket.com&quot; key: str = &quot;&quot; #This is your Private Key. Export from https://reveal.magic.link/polymarket or from your Web3 Extension chain_id: int = 137 #No need to adjust this POLYMARKET_PROXY_ADDRESS: str = '' #This is the address listed below your profile picture when using the Polymarket site. #Select from the following 3 initialization options to match your login method, and remove any unused lines so only one client is initialized. ### Initialization of a client using a Polymarket Proxy associated with an Email/Magic account. If you login with your email use this example. client = ClobClient(host, key=key, chain_id=chain_id, signature_type=1, funder=POLYMARKET_PROXY_ADDRESS) ### Initialization of a client using a Polymarket Proxy associated with a Browser Wallet(Metamask, Coinbase Wallet, etc) client = ClobClient(host, key=key, chain_id=chain_id, signature_type=2, funder=POLYMARKET_PROXY_ADDRESS) ### Initialization of a client that trades directly from an EOA. (If you don't know what this means, you're not using it) client = ClobClient(host, key=key, chain_id=chain_id) ## Create and sign a limit order buying 5 tokens for 0.010c each #Refer to the API documentation to locate a tokenID: https://docs.polymarket.com/developers/gamma-markets-api/fetch-markets-guide client.set_api_creds(client.create_or_derive_api_creds()) order_args = OrderArgs( price=0.01, size=5.0, side=BUY, token_id=&quot;&quot;, #Token ID you want to purchase goes here. Example token: 114304586861386186441621124384163963092522056897081085884483958561365015034812 ( Xi Jinping out in 2025, YES side ) ) signed_order = client.create_order(order_args) ## GTC(Good-Till-Cancelled) Order resp = client.post_order(signed_order, OrderType.GTC) print(resp) </code></pre> <pre><code class="language-typescript"> //npm install <a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a>/clob-client //npm install ethers //Client initialization example and dumping API Keys import { ApiKeyCreds, ClobClient, OrderType, Side, } from &quot;<a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a>/clob-client&quot;; import { Wallet } from &quot;<a href="/ethersproject"><a href="/ethersproject">@ethersproject</a></a>/wallet&quot;; const host = 'https://clob.polymarket.com'; const funder = ''; //This is the address listed below your profile picture when using the Polymarket site. const signer = new Wallet(&quot;&quot;); //This is your Private Key. If using email login export from https://reveal.magic.link/polymarket otherwise export from your Web3 Application //In general don't create a new API key, always derive or createOrDerive const creds = new ClobClient(host, 137, signer).createOrDeriveApiKey(); //1: Magic/Email Login //2: Browser Wallet(Metamask, Coinbase Wallet, etc) //0: EOA (If you don't know what this is you're not using it) const signatureType = 1; (async () =&gt; { const clobClient = new ClobClient(host, 137, signer, await creds, signatureType, funder); const resp2 = await clobClient.createAndPostOrder( { tokenID: &quot;&quot;, //Use https://docs.polymarket.com/developers/gamma-markets-api/get-markets to grab a sample token price: 0.01, side: Side.BUY, size: 5, feeRateBps: 0, }, { tickSize: &quot;0.001&quot;,negRisk: false }, //You'll need to adjust these based on the market. Get the tickSize and negRisk T/F from the get-markets above //Refer to the API documentation to locate a tokenID: https://docs.polymarket.com/developers/gamma-markets-api/fetch-markets-guide //Example token: 114304586861386186441621124384163963092522056897081085884483958561365015034812 ( Xi Jinping out in 2025, YES side ) //{ tickSize: &quot;0.001&quot;,negRisk: true }, OrderType.GTC, ); console.log(resp2) })(); </code></pre> <p></CodeGroup></p> <h4>In addition to detailed comments in the code snippet, here are some more tips to help you get started.</h4> <ul> <li>See the Python example for details on the proper way to initialize a Py-Clob-Client depending on your wallet type. Three exhaustive examples are given. If using a MetaMask wallet or EOA please see the resources <a href="https://github.com/Polymarket/py-clob-client?tab=readme-ov-file">here</a>, for instructions on setting allowances.</li> <li>When buying into a market you purchase a &quot;Token&quot; that token represents either a Yes or No outcome of the event. To easily get required token pairs for a given event we have provided an interactive endpoint <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/developers/gamma-markets-api/get-markets">here</a>.</li> <li>Common pitfalls: <ul> <li>Negrisk Markets require an additional flag in the OrderArgs <code>negrisk=False</code></li> <li><code>invalid signature</code> error, likely due to one of the following.</li> <li>Incorrect Funder and or Private Key</li> <li>Incorrect NegRisk flag in your order arguments</li> <li><code>not enough balance / allowance</code>.</li> <li>Not enough USDC to perform the trade. See the formula at the bottom of <a href="/ka-cn/vibe-coding-cn/src/202512140705/skills/polymarket/references/developers/CLOB/orders/orders">this</a> page for details.</li> <li>If using Metamask / WEB3 wallet go <a href="https://github.com/Polymarket/py-clob-client?tab=readme-ov-file">here</a>, for instructions on setting allowances.</li> </ul></li> </ul> <h1>WSS Quickstart</h1> <p>Source: <a href="https://docs.polymarket.com/quickstart/websocket/WSS-Quickstart">https://docs.polymarket.com/quickstart/websocket/WSS-Quickstart</a></p> <p>The following code samples and explanation will show you how to subsribe to the Marker and User channels of the Websocket. You'll need your API keys to do this so we'll start with that.</p> <h2>Getting your API Keys</h2> <p><CodeGroup></p> <pre><code class="language-python"> from py_clob_client.client import ClobClient host: str = &quot;https://clob.polymarket.com&quot; key: str = &quot;&quot; #This is your Private Key. If using email login export from https://reveal.magic.link/polymarket otherwise export from your Web3 Application chain_id: int = 137 #No need to adjust this POLYMARKET_PROXY_ADDRESS: str = '' #This is the address you deposit/send USDC to to FUND your Polymarket account. #Select from the following 3 initialization options to matches your login method, and remove any unused lines so only one client is initialized. ### Initialization of a client using a Polymarket Proxy associated with an Email/Magic account. If you login with your email use this example. client = ClobClient(host, key=key, chain_id=chain_id, signature_type=1, funder=POLYMARKET_PROXY_ADDRESS) ### Initialization of a client using a Polymarket Proxy associated with a Browser Wallet(Metamask, Coinbase Wallet, etc) client = ClobClient(host, key=key, chain_id=chain_id, signature_type=2, funder=POLYMARKET_PROXY_ADDRESS) ### Initialization of a client that trades directly from an EOA. client = ClobClient(host, key=key, chain_id=chain_id) print( client.derive_api_key() ) </code></pre> <pre><code class="language-javascript"> //npm install <a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a>/clob-client //npm install ethers //Client initialization example and dumping API Keys import {ClobClient, ApiKeyCreds } from &quot;<a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket"><a href="/polymarket">@polymarket</a></a></a></a></a></a>/clob-client&quot;; import { Wallet } from &quot;<a href="/ethersproject"><a href="/ethersproject">@ethersproject</a></a>/wallet&quot;; const host = 'https://clob.polymarket.com'; const signer = new Wallet(&quot;YourPrivateKey&quot;); //This is your Private Key. If using email login export from https://reveal.magic.link/polymarket otherwise export from your Web3 Application // Initialize the clob client // NOTE: the signer must be approved on the CTFExchange contract const clobClient = new ClobClient(host, 137, signer); (async () =&gt; { const apiKey = await clobClient.deriveApiKey(); console.log(apiKey); })(); </code></pre> <p></CodeGroup></p> <h2>Using those keys to connect to the Market or User Websocket</h2> <p><CodeGroup></p> <pre><code class="language-python"> from websocket import WebSocketApp import json import time import threading MARKET_CHANNEL = &quot;market&quot; USER_CHANNEL = &quot;user&quot; class WebSocketOrderBook: def __init__(self, channel_type, url, data, auth, message_callback, verbose): self.channel_type = channel_type self.url = url self.data = data self.auth = auth self.message_callback = message_callback self.verbose = verbose furl = url + &quot;/ws/&quot; + channel_type self.ws = WebSocketApp( furl, on_message=self.on_message, on_error=self.on_error, on_close=self.on_close, on_open=self.on_open, ) self.orderbooks = {} def on_message(self, ws, message): print(message) pass def on_error(self, ws, error): print(&quot;Error: &quot;, error) exit(1) def on_close(self, ws, close_status_code, close_msg): print(&quot;closing&quot;) exit(0) def on_open(self, ws): if self.channel_type == MARKET_CHANNEL: ws.send(json.dumps({&quot;assets_ids&quot;: self.data, &quot;type&quot;: MARKET_CHANNEL})) elif self.channel_type == USER_CHANNEL and self.auth: ws.send( json.dumps( {&quot;markets&quot;: self.data, &quot;type&quot;: USER_CHANNEL, &quot;auth&quot;: self.auth} ) ) else: exit(1) thr = threading.Thread(target=self.ping, args=(ws,)) thr.start() def ping(self, ws): while True: ws.send(&quot;PING&quot;) time.sleep(10) def run(self): self.ws.run_forever() if __name__ == &quot;__main__&quot;: url = &quot;wss://ws-subscriptions-clob.polymarket.com&quot; #Complete these by exporting them from your initialized client. api_key = &quot;&quot; api_secret = &quot;&quot; api_passphrase = &quot;&quot; asset_ids = [ &quot;109681959945973300464568698402968596289258214226684818748321941747028805721376&quot;, ] condition_ids = [] # no really need to filter by this one auth = {&quot;apiKey&quot;: api_key, &quot;secret&quot;: api_secret, &quot;passphrase&quot;: api_passphrase} market_connection = WebSocketOrderBook( MARKET_CHANNEL, url, asset_ids, auth, None, True ) user_connection = WebSocketOrderBook( USER_CHANNEL, url, condition_ids, auth, None, True ) market_connection.run() # user_connection.run() </code></pre> <p></CodeGroup></p>