Programmatic access to prediction markets. Read real-time data, execute trades, and build powerful applications on Grandtake.
The Grandtake API gives you programmatic access to prediction markets - read real-time market data, execute trades, and build powerful applications on top of Grandtake. Everything the app does, you can do through the API.
Market API
Public market data - prices, order books, search and history.
https://api.grandtake.com/v1Trading API
Authenticated - place orders, manage positions and portfolio.
https://api.grandtake.com/v1 · BearerGetting Started / Introduction
Grandtake exposes two complementary surfaces over the same base URL:
1. Market API - https://api.grandtake.com/v1. Public endpoints for market data, prices, order books and search. Great for dashboards and research tools.
2. Trading API - https://api.grandtake.com/v1 (authenticated). Place orders, manage positions and read your portfolio. Requires a Bearer API key.
All responses are JSON. All timestamps are ISO 8601 (UTC). All prices are probabilities in the range 0-1.
Getting Started / Quick Start
curl https://api.grandtake.com/v1/markets \
-H "Authorization: Bearer YOUR_API_KEY"A successful response looks like this:
{
"markets": [
{
"id": "mkt_001",
"question": "Will Arsenal win the Premier League?",
"category": "football",
"subcategory": "epl",
"yesPrice": 0.34,
"noPrice": 0.66,
"volume": 125000,
"endDate": "2025-05-25T23:59:59Z",
"status": "open"
}
],
"total": 51,
"page": 1
}Getting Started / API Keys
API keys authenticate every request. Generate, name and revoke keys from Settings → API Keys. Each key inherits your account’s KYC tier and rate-limit plan.
Getting Started / Environments
Grandtake offers two environments. Generate keys for each independently.
| Environment | Base URL | Settlement |
|---|---|---|
| production | api.grandtake.com/v1 | Base · live USDC |
| sandbox | sandbox.grandtake.com/v1 | Base Sepolia · test USDC |
The Grandtake API uses Bearer token authentication. Pass your API key in the Authorization header on every request:
Authorization: Bearer YOUR_API_KEYFrom JavaScript:
fetch('https://api.grandtake.com/v1/portfolio/positions', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
})⚠️ Keep your key secret. Never expose it in browser code or public repos, and rotate keys regularly. A leaked key can read your portfolio and place trades.
Rate limits are applied per API key. Limits scale with your plan:
| Tier | Requests / min | WebSocket connections |
|---|---|---|
| Free | 60 | 1 |
| Pro | 600 | 5 |
| Enterprise | Unlimited | Unlimited |
Every response includes your current limit state in the headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1718000000REST · Markets / List markets
/v1/marketsReturns a paginated list of markets. Filter by category, subcategory and status, and sort by volume or close date.
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | string | No | e.g. football, basketball, politics, crypto |
| subcategory | string | No | e.g. epl, la-liga, nba |
| status | string | No | open · resolving · resolved |
| sort | string | No | volume · closing · newest |
| page | integer | No | Page number, default 1 |
| limit | integer | No | Results per page, max 100 |
curl "https://api.grandtake.com/v1/markets?category=football&status=open" \
-H "Authorization: Bearer YOUR_API_KEY"{
"markets": [
{
"id": "mkt_001",
"question": "Will Arsenal win the Premier League?",
"category": "football",
"subcategory": "epl",
"yesPrice": 0.34,
"noPrice": 0.66,
"volume": 125000,
"endDate": "2025-05-25T23:59:59Z",
"status": "open"
}
],
"total": 51,
"page": 1
}REST · Markets / Get market
/v1/markets/:idRetrieve a single market by its id, including live prices and 24h volume.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string (path) | Yes | Market id, e.g. mkt_001 |
curl "https://api.grandtake.com/v1/markets/mkt_001" \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "mkt_001",
"question": "Will Arsenal win the Premier League?",
"category": "football",
"subcategory": "epl",
"yesPrice": 0.34,
"noPrice": 0.66,
"volume": 125000,
"liquidity": 48200,
"endDate": "2025-05-25T23:59:59Z",
"status": "open"
}REST · Markets / Price history
/v1/markets/:id/pricesTime series of YES price for a market. Use interval to control resolution.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string (path) | Yes | Market id |
| interval | string | No | 1m · 1h · 1d (default 1h) |
| from | ISO 8601 | No | Start timestamp |
| to | ISO 8601 | No | End timestamp |
curl "https://api.grandtake.com/v1/markets/mkt_001/prices?interval=1h" \
-H "Authorization: Bearer YOUR_API_KEY"{
"marketId": "mkt_001",
"interval": "1h",
"points": [
{ "t": "2025-05-01T10:00:00Z", "yesPrice": 0.31 },
{ "t": "2025-05-01T11:00:00Z", "yesPrice": 0.33 },
{ "t": "2025-05-01T12:00:00Z", "yesPrice": 0.34 }
]
}REST · Markets / Order book
/v1/markets/:id/orderbookCurrent bids and asks for the YES outcome. Prices are in probability (0-1).
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string (path) | Yes | Market id |
| depth | integer | No | Levels per side, default 10 |
curl "https://api.grandtake.com/v1/markets/mkt_001/orderbook?depth=3" \
-H "Authorization: Bearer YOUR_API_KEY"{
"marketId": "mkt_001",
"bids": [
{ "price": 0.33, "shares": 1200 },
{ "price": 0.32, "shares": 3400 }
],
"asks": [
{ "price": 0.35, "shares": 900 },
{ "price": 0.36, "shares": 2100 }
]
}REST · Markets / Search markets
/v1/markets/searchFull-text search across market questions. Optionally scope to a category.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Search query, e.g. "arsenal" |
| category | string | No | Restrict to a category |
| limit | integer | No | Max results, default 20 |
curl "https://api.grandtake.com/v1/markets/search?q=arsenal" \
-H "Authorization: Bearer YOUR_API_KEY"{
"results": [
{
"id": "mkt_001",
"question": "Will Arsenal win the Premier League?",
"category": "football",
"yesPrice": 0.34
}
],
"total": 1
}REST · Trading / Place order
/v1/ordersPlace a market or limit order on a market outcome. Returns the created order with its fill status.
| Parameter | Type | Required | Description |
|---|---|---|---|
| marketId | string | Yes | Target market, e.g. mkt_001 |
| outcome | string | Yes | YES or NO |
| type | string | Yes | market or limit |
| shares | number | Yes | Number of shares to buy |
| limitPrice | number | No | Required for limit orders (0-1) |
curl -X POST "https://api.grandtake.com/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "marketId": "mkt_001", "outcome": "YES", "type": "market", "shares": 100 }'{
"id": "ord_8f21",
"marketId": "mkt_001",
"outcome": "YES",
"type": "market",
"shares": 100,
"avgPrice": 0.34,
"cost": 34.00,
"status": "filled"
}REST · Trading / List orders
/v1/ordersList your orders, newest first. Filter by status or market.
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | open · filled · cancelled |
| marketId | string | No | Restrict to one market |
curl "https://api.grandtake.com/v1/orders?status=open" \
-H "Authorization: Bearer YOUR_API_KEY"{
"orders": [
{
"id": "ord_8f21",
"marketId": "mkt_001",
"outcome": "YES",
"shares": 100,
"limitPrice": 0.33,
"status": "open"
}
],
"total": 1
}REST · Trading / Cancel order
/v1/orders/:idCancel an open order. Filled orders cannot be cancelled.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string (path) | Yes | Order id, e.g. ord_8f21 |
curl -X DELETE "https://api.grandtake.com/v1/orders/ord_8f21" \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "ord_8f21",
"status": "cancelled"
}REST · Portfolio / Open positions
/v1/portfolio/positionsYour current open positions marked to live market prices.
curl "https://api.grandtake.com/v1/portfolio/positions" \
-H "Authorization: Bearer YOUR_API_KEY"{
"positions": [
{
"marketId": "mkt_001",
"question": "Will Arsenal win the Premier League?",
"outcome": "YES",
"shares": 100,
"avgPrice": 0.34,
"markPrice": 0.36,
"unrealizedPnl": 2.00
}
]
}REST · Portfolio / Trade history
/v1/portfolio/historyPaginated history of your filled trades.
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number, default 1 |
| limit | integer | No | Results per page, max 100 |
curl "https://api.grandtake.com/v1/portfolio/history" \
-H "Authorization: Bearer YOUR_API_KEY"{
"trades": [
{
"id": "trd_44a1",
"marketId": "mkt_001",
"outcome": "YES",
"shares": 100,
"price": 0.34,
"side": "buy",
"executedAt": "2025-05-01T12:03:11Z"
}
],
"total": 1,
"page": 1
}REST · Portfolio / Profit and loss
/v1/portfolio/pnlAggregate realized and unrealized P&L across all your markets.
curl "https://api.grandtake.com/v1/portfolio/pnl" \
-H "Authorization: Bearer YOUR_API_KEY"{
"realizedPnl": 128.50,
"unrealizedPnl": 14.00,
"totalVolume": 4200.00,
"winRate": 0.61
}REST · User / Profile
/v1/userThe authenticated user’s public profile and KYC tier.
curl "https://api.grandtake.com/v1/user" \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "usr_19c2",
"username": "naijatrader",
"wallet": "0x23896a...D552",
"kycLevel": 1,
"createdAt": "2025-03-12T09:21:00Z"
}REST · User / Balance
/v1/user/balanceYour trading balance and on-chain wallet balances.
curl "https://api.grandtake.com/v1/user/balance" \
-H "Authorization: Bearer YOUR_API_KEY"{
"tradingBalance": 312.40,
"currency": "USDC",
"wallet": {
"USDC": 50.00,
"USDT": 0.00
}
}REST · Leaderboard / Rankings
/v1/leaderboardTop traders by profit or win rate over a period.
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | string | No | weekly · monthly · all (default weekly) |
| by | string | No | profit · winRate |
| category | string | No | Restrict to a category |
curl "https://api.grandtake.com/v1/leaderboard?period=weekly&by=profit" \
-H "Authorization: Bearer YOUR_API_KEY"{
"period": "weekly",
"by": "profit",
"rankings": [
{ "rank": 1, "username": "naijatrader", "profit": 1240.00 },
{ "rank": 2, "username": "lagoslukas", "profit": 980.50 }
]
}WebSocket API / Connecting
Subscribe to real-time updates over WebSocket at wss://ws.grandtake.com/v1. After connecting, send a subscribe message for the channel you want.
const ws = new WebSocket('wss://ws.grandtake.com/v1');
ws.send(JSON.stringify({
type: 'subscribe',
channel: 'market',
marketId: 'mkt_001'
}));
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Price update:', data.yesPrice, data.noPrice);
};Three channels are available: market (price and volume), trades (live trade feed) and user (your order fills and resolutions - requires authentication).
WebSocket API / Event types
Every WebSocket message has a type field:
| Event | Description |
|---|---|
| market.update | Price and volume update |
| trade.new | New trade executed on a market |
| order.filled | Your order was filled |
| market.resolved | Market resolved with an outcome |
Official SDKs wrap authentication, pagination and types so you can ship faster.
JavaScript / TypeScript
npm install @grandtake/sdkimport { GrandtakeClient } from '@grandtake/sdk';
const client = new GrandtakeClient({ apiKey: 'YOUR_API_KEY' });
const markets = await client.markets.list({ category: 'football' });Python
pip install grandtakefrom grandtake import Client
client = Client(api_key='YOUR_API_KEY')
markets = client.markets.list(category='football')Go, Rust and Java SDKs are on the roadmap.
Trading bots
Automate your prediction strategy with programmatic orders.
Market data dashboards
Build analytics tools on live prices and volume.
Portfolio trackers
Monitor positions and P&L across every market.
Research tools
Analyze market trends, order books and resolution patterns.
Third-party integrations
Embed Grandtake markets directly in your own app.
v1 · Latest
Initial public REST + WebSocket API: markets, trading, portfolio, user and leaderboard.
Upcoming
Webhooks, Go & Rust SDKs, and granular per-key scopes.