The PolyCopyBot REST API gives you full programmatic control over the platform. All endpoints return JSON, accept JSON request bodies, and authenticate via a Bearer token in the Authorization header.
Sub-80ms
Average API response time globally via edge caching.
TLS 1.3
All connections are encrypted. HTTP requests are redirected.
Versioned
Current stable version is v1. Legacy versions kept for 12 months.
JSON Only
All responses are application/json with consistent envelope format.
{ "success": true, "data": {...}, "meta": {...} }. On error: { "success": false, "error": { "code": "...", "message": "..." } }.PolyCopyBot uses Bearer token authentication. Generate your API key from the Dashboard → Settings → API Keys tab. Include it in every request header.
# Pass your API key as a Bearer token in the Authorization header curl -X GET "https://api.polycopybot.app/v1/wallets" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
const API_KEY = 'YOUR_API_KEY'; const res = await fetch('https://api.polycopybot.app/v1/wallets', { headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' } }); const data = await res.json(); console.log(data);
import requests API_KEY = "YOUR_API_KEY" headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" } response = requests.get( "https://api.polycopybot.app/v1/wallets", headers=headers ) data = response.json() print(data)
<?php $apiKey = 'YOUR_API_KEY'; $ch = curl_init('https://api.polycopybot.app/v1/wallets'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => [ "Authorization: Bearer {$apiKey}", 'Content-Type: application/json' ], CURLOPT_RETURNTRANSFER => true ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
Requests are throttled per API key per plan. Exceeding the limit returns HTTP 429 Too Many Requests with a Retry-After header indicating seconds to wait.
Rate limit headers are returned with every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (Unix timestamp).
PolyCopyBot uses conventional HTTP response codes. Errors include a machine-readable code string and a human-readable message.
| HTTP Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded. Data in data field. |
| 400 | Bad Request | Missing or invalid parameters. Check error.fields for field-level detail. |
| 401 | Unauthorized | Missing, invalid or expired API key. |
| 403 | Forbidden | Valid key but insufficient plan permissions for this endpoint. |
| 404 | Not Found | Resource doesn't exist or doesn't belong to your account. |
| 429 | Too Many Requests | Rate limit exceeded. Respect Retry-After header. |
| 500 | Server Error | Unexpected server-side issue. Automatically logged; retries are safe. |
Query the PolyCopyBot-tracked wallet database. Filter by score, ROI, win-rate and more. Used internally by the dashboard leaderboard.
Returns a paginated list of wallets tracked by the PolyCopyBot scoring engine. Sorted by AI score descending by default.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | optional | Page number, default 1. |
| limit | integer | optional | Results per page, 1–100, default 20. |
| sort | string | optional | score | roi_7d | roi_30d | win_rate. Default: score. |
| min_score | number | optional | Filter wallets with AI score ≥ this value (0–100). |
| network | string | optional | polygon | ethereum | arbitrum | bnb. Omit for all. |
Retrieve full details for a specific wallet address including score breakdown, recent trade history and market exposure.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| address | string | required | Ethereum-compatible wallet address (0x…). |
Returns all currently open positions for a tracked wallet. Useful for real-time market exposure analysis.
Daily OHLC-style portfolio data for charts. Returns up to 365 daily data points.
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | string | optional | 7d | 30d | 90d | 365d. Default: 30d. |
Start, stop and configure your copy-trading bot programmatically. Bot endpoints require an active subscription.
403 Forbidden.Activates the bot using current saved settings. No request body required. Returns error if bot is already running or private key is not configured.
curl -X POST "https://api.polycopybot.app/v1/bot/start" \ -H "Authorization: Bearer YOUR_API_KEY"
const res = await fetch('https://api.polycopybot.app/v1/bot/start', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }); const data = await res.json();
response = requests.post( "https://api.polycopybot.app/v1/bot/start", headers=headers )
Gracefully stops the bot. Open positions are not automatically closed; they remain until manually resolved or the bot restarts.
Partial update supported — only send the fields you want to change. Settings take effect on the next bot action (or immediately if bot is running).
| Field | Type | Required | Description |
|---|---|---|---|
| network | string | optional | polygon | ethereum | arbitrum | bnb |
| max_position_usdc | number | optional | Max USDC per single position. Min: 10. |
| stop_loss_pct | number | optional | Stop-loss threshold, 1–100. |
| take_profit_pct | number | optional | Take-profit threshold, 1–100. |
| min_wallet_score | number | optional | Minimum AI wallet score to copy, 0–100. |
| max_open_positions | integer | optional | Concurrent open positions cap, 1–50. |
curl -X PUT "https://api.polycopybot.app/v1/bot/settings" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"stop_loss_pct": 20, "take_profit_pct": 50}'
const res = await fetch('https://api.polycopybot.app/v1/bot/settings', { method: 'PUT', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ stop_loss_pct: 20, take_profit_pct: 50 }) });
response = requests.put( "https://api.polycopybot.app/v1/bot/settings", headers=headers, json={"stop_loss_pct": 20, "take_profit_pct": 50} )
$payload = json_encode(['stop_loss_pct' => 20, 'take_profit_pct' => 50]); $ch = curl_init('https://api.polycopybot.app/v1/bot/settings'); curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $payload, CURLOPT_HTTPHEADER => ["Authorization: Bearer {$apiKey}", 'Content-Type: application/json'], CURLOPT_RETURNTRANSFER => true ]);
Inspect and manage orders placed by your bot. Orders represent individual copy trades executed on Polymarket.
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | optional | open | filled | cancelled | all. Default: all. |
| from | string | optional | ISO 8601 date filter start, e.g. 2025-04-01. |
| to | string | optional | ISO 8601 date filter end. |
| limit | integer | optional | Max results, 1–100, default 20. |
Returns full detail for a single order including execution price, gas used and PnL if closed.
Cancels an order that is in open state. Returns 400 if the order is already filled or cancelled.
Aggregate view of your copy-trading account: balances, PnL, performance over time.
Daily snapshots of portfolio value. Useful for rendering equity curves. Returns up to 365 data points.
| Parameter | Type | Required | Description |
|---|---|---|---|
| period | string | optional | 7d | 30d | 90d | 365d. Default 30d. |
Retrieve active plan details, limits and expiry for the authenticated API key's account.
Stream real-time events from your bot and the wallet tracker. The WebSocket endpoint is available on Pro and Enterprise plans.
wss://ws.polycopybot.app/v1?token=YOUR_API_KEY — authenticate via query param on initial connection.Subscribe to channels
const ws = new WebSocket('wss://ws.polycopybot.app/v1?token=YOUR_API_KEY'); ws.onopen = () => { // Subscribe to bot events and live wallet feed ws.send(JSON.stringify({ type: 'subscribe', channels: ['bot.events', 'wallet.trades'] })); }; ws.onmessage = (event) => { const msg = JSON.parse(event.data); console.log(msg.type, msg.data); };
import asyncio, websockets, json async def main(): url = "wss://ws.polycopybot.app/v1?token=YOUR_API_KEY" async with websockets.connect(url) as ws: await ws.send(json.dumps({ "type": "subscribe", "channels": ["bot.events", "wallet.trades"] })) async for msg in ws: print(json.loads(msg)) asyncio.run(main())
Available Channels
Official client libraries to get started faster. Community SDKs welcome — open a PR on GitHub.
Quick install
npm install @polycopybot/sdk
pip install polycopybot
composer require polycopybot/sdk
API version history and release notes. Breaking changes are announced 30 days in advance.
- NEWWebSocket
portfolio.updateschannel added - NEW
GET /v1/wallets/{address}/statsendpoint - IMPRate limit headers now included on all responses
- FIXEdge case where
roi_90dreturned null for new wallets
- NEW
DELETE /v1/orders/{id}— cancel open orders via API - NEW
networkfilter onGET /v1/wallets - IMPResponse times improved by 22% via edge caching
- NEWPortfolio history endpoint with daily equity curve data
- NEWSDK packages for JavaScript and Python
- FIXPagination meta returning incorrect
totalcount
- NEWREST API public launch — Wallets, Bot, Orders, Portfolio
- NEWWebSocket streams for real-time event delivery
- NEWBearer token authentication with per-plan rate limits