Prediction Markets
Trade prediction markets on Polymarket through the Suwappu API. Browse events, check prices, and place orders on binary outcome markets.
Public Endpoints
GET /v1/agent/predict/markets
Search and browse active prediction markets.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | Search term |
category | string | No | Filter by category (e.g., "crypto", "politics") |
limit | number | No | Results per page (default 20) |
offset | number | No | Pagination offset |
-kw">curl -str">"https://api.suwappu.bot/v1/agent/predict/markets?category=crypto&limit=5" \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
Response:
{
"hl-key">"success": true,
"hl-key">"markets": [
{
"hl-key">"id": "0x1234abcd",
"hl-key">"question": "Will ETH reach $5,000 by June 2026?",
"hl-key">"category": "crypto",
"hl-key">"endDate": "2026-06-30T00:00:00Z",
"hl-key">"volume": "2450000",
"hl-key">"liquidity": "890000",
"hl-key">"outcomes": [
{ "hl-key">"name": "Yes", "hl-key">"price": 0.42 },
{ "hl-key">"name": "No", "hl-key">"price": 0.58 }
]
}
]
}
GET /v1/agent/predict/events
Browse prediction events with filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | Search term |
limit | number | No | Results per page |
offset | number | No | Pagination offset |
-kw">curl -str">"https://api.suwappu.bot/v1/agent/predict/events?query=bitcoin" \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
GET /v1/agent/predict/market/:id
Get detailed information about a specific market.
-kw">curl https://api.suwappu.bot/v1/agent/predict/market/0x1234abcd \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
GET /v1/agent/predict/market/:id/book
Get the order book for a market.
-kw">curl https://api.suwappu.bot/v1/agent/predict/market/0x1234abcd/book \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
GET /v1/agent/predict/market/:id/price
Get the current midpoint price for a market.
-kw">curl https://api.suwappu.bot/v1/agent/predict/market/0x1234abcd/price \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
GET /v1/agent/predict/market/:id/trades
Get recent trades for a market.
-kw">curl https://api.suwappu.bot/v1/agent/predict/market/0x1234abcd/trades \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
Authenticated Endpoints
POST /v1/agent/predict/order
Place an order on a prediction market.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenId | string | Yes | Outcome token ID |
price | number | Yes | Price between 0 and 1 (e.g., 0.42 for 42 cents) |
size | number | Yes | Number of shares |
side | string | Yes | "BUY" or "SELL" |
-kw">curl -X POST https://api.suwappu.bot/v1/agent/predict/order \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY" \
-H -str">"Content-Type: application/json" \
-d -str">'{
-str">"tokenId": -str">"71321044878958750425140208824424590210...",
-str">"price": 0.42,
-str">"size": 100,
-str">"side": -str">"BUY"
}'
Response:
{
"hl-key">"success": true,
"hl-key">"order": {
"hl-key">"id": "ord_abc123",
"hl-key">"tokenId": "71321044878958750425140208824424590210...",
"hl-key">"side": "BUY",
"hl-key">"price": 0.42,
"hl-key">"size": 100,
"hl-key">"status": "open",
"hl-key">"created_at": "2026-03-29T12:00:00Z"
}
}
DELETE /v1/agent/predict/order/:id
Cancel an open order.
-kw">curl -X DELETE https://api.suwappu.bot/v1/agent/predict/order/ord_abc123 \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
GET /v1/agent/predict/positions
List your open prediction market positions.
-kw">curl https://api.suwappu.bot/v1/agent/predict/positions \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"
GET /v1/agent/predict/orders
List your orders (open and filled).
-kw">curl https://api.suwappu.bot/v1/agent/predict/orders \
-H -str">"Authorization: Bearer suwappu_sk_YOUR_KEY"