Powerful RESTful API to integrate arbitrage detection and automated trading into your applications.
API access is exclusively available to Titan package subscribers. Upgrade to unlock unlimited API calls, real-time arbitrage data, and priority support.
The Polymarket Arbitrage API provides programmatic access to real-time arbitrage opportunities, automated trading execution, and comprehensive portfolio management. Built with REST principles, our API uses predictable resource-oriented URLs and returns JSON-encoded responses.
https://api.arbitragebot.org/v1
All API responses are JSON-encoded
All requests must be made over HTTPS
Authenticate your API requests using your API key. Include it in the Authorization header of every request.
Authorization: Bearer YOUR_API_KEY
curl -X GET "https://api.arbitragebot.org/v1/opportunities" \
-H "Authorization: Bearer sk_live_1234567890abcdef" \
-H "Content-Type: application/json"
const apiKey = 'sk_live_1234567890abcdef';
const baseUrl = 'https://api.arbitragebot.org/v1';
fetch(`${baseUrl}/opportunities`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
import requests
api_key = 'sk_live_1234567890abcdef'
base_url = 'https://api.arbitragebot.org/v1'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
response = requests.get(f'{base_url}/opportunities', headers=headers)
data = response.json()
print(data)
API rate limits ensure fair usage and system stability. Titan package subscribers enjoy higher limits.
| Endpoint | Rate Limit | Window |
|---|---|---|
| /opportunities | 1000 requests | Per minute |
| /trades | 500 requests | Per minute |
| /portfolio | 200 requests | Per minute |
Every API response includes rate limit information:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640000000
Access real-time arbitrage opportunities detected across Polymarket markets.
/opportunities
Retrieve a list of current arbitrage opportunities with profitability metrics.
min_profit
optional
Minimum profit percentage (default: 0.5)
market_type
optional
Filter by market type (binary, categorical)
limit
optional
Number of results (default: 50, max: 100)
curl -X GET "https://api.arbitragebot.org/v1/opportunities?min_profit=1.0&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"opportunities": [
{
"id": "arb_7x9k2p4m",
"market_id": "0x123abc...",
"market_name": "Will Bitcoin reach $100k by 2024?",
"market_type": "binary",
"opportunity_type": "price_discrepancy",
"profit_percentage": 2.34,
"estimated_profit_usd": 47.82,
"required_capital_usd": 2043.50,
"confidence_score": 0.94,
"execution_time_estimate": 12,
"side_a": {
"outcome": "Yes",
"price": 0.52,
"exchange": "clob"
},
"side_b": {
"outcome": "No",
"price": 0.46,
"exchange": "amm"
},
"detected_at": "2024-01-15T10:30:45Z",
"expires_at": "2024-01-15T10:35:45Z",
"status": "active"
}
],
"total_count": 23,
"page": 1,
"per_page": 10
},
"timestamp": "2024-01-15T10:30:47Z"
}
/opportunities/:id
Retrieve detailed information about a specific arbitrage opportunity.
curl -X GET "https://api.arbitragebot.org/v1/opportunities/arb_7x9k2p4m" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": "arb_7x9k2p4m",
"market_id": "0x123abc...",
"market_name": "Will Bitcoin reach $100k by 2024?",
"profit_percentage": 2.34,
"estimated_profit_usd": 47.82,
"required_capital_usd": 2043.50,
"execution_steps": [
{
"step": 1,
"action": "buy",
"outcome": "Yes",
"price": 0.52,
"amount": 100,
"exchange": "clob"
},
{
"step": 2,
"action": "sell",
"outcome": "No",
"price": 0.46,
"amount": 100,
"exchange": "amm"
}
],
"risk_assessment": {
"liquidity_risk": "low",
"execution_risk": "medium",
"market_volatility": 0.15
},
"historical_success_rate": 0.89
}
}
Execute arbitrage trades programmatically with our automated trading API.
/trades/execute
Execute an arbitrage trade based on a detected opportunity.
opportunity_id
required
ID of the arbitrage opportunity
amount_usd
required
Trading amount in USD
slippage_tolerance
optional
Max slippage percentage (default: 0.5)
auto_execute
optional
Execute immediately (default: true)
curl -X POST "https://api.arbitragebot.org/v1/trades/execute" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"opportunity_id": "arb_7x9k2p4m",
"amount_usd": 1000,
"slippage_tolerance": 0.5,
"auto_execute": true
}'
{
"success": true,
"data": {
"trade_id": "trade_9m2k4x7p",
"opportunity_id": "arb_7x9k2p4m",
"status": "executed",
"executed_at": "2024-01-15T10:31:22Z",
"transactions": [
{
"tx_hash": "0xabc123...",
"type": "buy",
"outcome": "Yes",
"amount": 100,
"price": 0.52,
"total_usd": 1000,
"gas_fee_usd": 2.34
},
{
"tx_hash": "0xdef456...",
"type": "sell",
"outcome": "No",
"amount": 100,
"price": 0.46,
"total_usd": 1023.40,
"gas_fee_usd": 1.89
}
],
"profit": {
"gross_usd": 23.40,
"fees_usd": 4.23,
"net_usd": 19.17,
"roi_percentage": 1.92
}
}
}
/trades/history
Retrieve your trading history with detailed performance metrics.
start_date
optional
Filter from date (ISO 8601)
end_date
optional
Filter to date (ISO 8601)
status
optional
Filter by status (executed, pending, failed)
curl -X GET "https://api.arbitragebot.org/v1/trades/history?limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"
Monitor your portfolio performance and active positions.
/portfolio/summary
Get a comprehensive overview of your portfolio performance.
{
"success": true,
"data": {
"total_value_usd": 15234.67,
"available_balance_usd": 8500.00,
"locked_in_trades_usd": 6734.67,
"total_profit_usd": 1234.67,
"total_profit_percentage": 8.82,
"active_positions": 5,
"total_trades": 127,
"win_rate": 0.94,
"daily_performance": {
"profit_usd": 123.45,
"trades": 8,
"win_rate": 1.0
},
"monthly_performance": {
"profit_usd": 2345.67,
"trades": 234,
"win_rate": 0.93
}
}
}
/portfolio/positions
List all your active trading positions.
{
"success": true,
"data": {
"positions": [
{
"position_id": "pos_3k7m9x2p",
"market_name": "Will Bitcoin reach $100k by 2024?",
"outcome": "Yes",
"entry_price": 0.52,
"current_price": 0.54,
"amount": 100,
"value_usd": 1000,
"unrealized_pnl_usd": 38.46,
"unrealized_pnl_percentage": 3.85,
"opened_at": "2024-01-15T09:00:00Z"
}
],
"total_positions": 5
}
}
Receive real-time notifications when arbitrage opportunities are detected or trades are executed.
opportunity.detected
Triggered when a new arbitrage opportunity is found
trade.executed
Triggered when a trade is successfully executed
trade.failed
Triggered when a trade execution fails
portfolio.update
Triggered when your portfolio value changes significantly
{
"event": "opportunity.detected",
"timestamp": "2024-01-15T10:30:45Z",
"data": {
"id": "arb_7x9k2p4m",
"market_name": "Will Bitcoin reach $100k by 2024?",
"profit_percentage": 2.34,
"estimated_profit_usd": 47.82,
"expires_at": "2024-01-15T10:35:45Z"
}
}
Each webhook request includes a signature in the X-Webhook-Signature header.
Verify this signature to ensure the request came from our servers.
const crypto = require('crypto');
function verifyWebhookSignature(payload, signature, secret) {
const hmac = crypto.createHmac('sha256', secret);
const digest = hmac.update(payload).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(digest)
);
}
Our API uses standard HTTP status codes and returns detailed error messages.
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Titan package required |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error occurred |
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "The provided API key is invalid or has been revoked",
"details": {
"key_prefix": "sk_live_1234"
}
},
"timestamp": "2024-01-15T10:30:45Z"
}
Official SDKs to integrate our API into your applications quickly.
npm install @arbitragebot/api
const ArbitrageBot = require('@arbitragebot/api');
const client = new ArbitrageBot({
apiKey: 'YOUR_API_KEY'
});
const opportunities = await client
.opportunities
.list({ min_profit: 1.0 });
pip install arbitragebot-python
from arbitragebot import Client
client = Client(
api_key='YOUR_API_KEY'
)
opportunities = client.opportunities.list(
min_profit=1.0
)
Hi there! We're currently offline, but leave us a message and we'll get back to you as soon as possible.