Find a Market
Before placing a trade, you need the token ID for the outcome you want to trade. How you get it depends on the venue.Polymarket
Use the List Markets endpoint to browse active markets:tokenId. You’ll pass this token ID when placing an order.
Predict.fun
Find markets on Predict.fun or via the Predict.fun API. You’ll need two identifiers:marketId— the numeric market ID (e.g.,"46954")tokenId— the on-chain outcome token ID (a large numeric string)
Understand the Identifiers
Every order requires you to tell the API which outcome you’re trading. There are two ways to do this:Option 1: Explicit fields
Passvenue, tokenId, and (for Predict) marketId separately:
Option 2: Market identifier
Use the compositemarketIdentifier string, which is returned in every order and position response:
polymarket:<tokenId> or predict:<marketId>:<tokenId>. This is convenient when re-trading a market you’ve already interacted with — just reuse the marketIdentifier from a previous response.
Choose Your Order Type
Market orders
Execute immediately at the best available price. Use these when you want to get in or out of a position right now.- Market BUY — you specify
amount(how much USDC.e/USDT to spend). The API fills as many shares as possible at the current price. - Market SELL — you specify
size(how many shares to sell). The API sells them at the best available price.
Limit orders
Sit on the orderbook at a specific price until someone takes the other side. Use these when you have a target price in mind and are willing to wait.- Limit BUY — you specify
size(shares) andprice(per share). The order rests until a seller matches it. - Limit SELL — same as limit buy, but on the sell side.
Understand Amount vs Size vs Price
This is the most common source of confusion. The rule is simple:amount= stablecoin to spend (USDC.e or USDT). Only used for market BUY orders.size= number of shares. Used for everything else (market sell, all limit orders).price= price per share. Only used for limit orders.
| Order Type | amount | size | price |
|---|---|---|---|
| Market BUY | Required | Rejected | — |
| Market SELL | Rejected | Required | — |
| Limit BUY | Rejected | Required | Required |
| Limit SELL | Rejected | Required | Required |
400 error with a message indicating which field is expected.
Place an Order
All orders go to the same endpoint:POST /api/users/{userId}/orders. See the reference for Polymarket or Predict.
Polymarket example
Predict.fun example
Limit order example
Venue Differences
The two venues have different constraints and behaviors:| Polymarket | Predict.fun | |
|---|---|---|
| Blockchain | Polygon | BSC |
| Collateral | USDC.e | USDT (BEP-20) |
| Price range | Between 0 and 1 (exclusive) | Between 0 and 1 (exclusive) |
| Min market order | > 1 USDC.e | ~$0.90 USDT |
| Min limit order | > 5 shares | ~$0.90 USDT |
| Extra field | — | marketId required |
| Fees | Configurable partner fee | Exchange fee that varies by market (automatic) |
After Placing an Order
Once your order is placed, you can:- Monitor orders — use Get Orders to check status, or Get Order for a specific order
- Cancel orders — use Cancel Order or Cancel All Orders
- View positions — filled orders become positions visible via Get Positions
- Redeem winnings — when a market resolves, use Redeem Position to cash out
