Developer Docs

API Documentation

Integrate BotPrimeX into your applications. Full REST API with webhook support for real-time trade events.

REST API

Clean, predictable endpoints

API Key Auth

Secure token-based access

Webhooks

Real-time trade events

Rate Limited

100 requests/min per key

Authentication

All API requests require authentication via an API key. Generate your key from Dashboard → Settings → API Keys. Include your key in the Authorization header.

bash
curl -X GET "https://api.botprimex.com/v1/bots" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

API keys have the same permissions as your account. Keep them secret. Rotate keys regularly.

Base URL

text
https://api.botprimex.com/v1

All endpoints are relative to this base URL. Responses are in JSON format.

Endpoints

Bots

GET/bots
GET/bots/:id
POST/bots
PATCH/bots/:id
POST/bots/:id/start
POST/bots/:id/stop
DELETE/bots/:id

Portfolio & Trades

GET/portfolio
GET/portfolio/history
GET/trades
GET/trades/:id
GET/bots/:id/trades

Account & Settings

GET/account
GET/account/subscription
GET/exchanges
POST/exchanges
DELETE/exchanges/:id

Example: Create a Bot

bash
curl -X POST "https://api.botprimex.com/v1/bots" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "BTC DCA Bot",
    "exchange": "binance",
    "pair": "BTC/USDT",
    "strategy": "dca",
    "stake_amount": 50,
    "max_open_trades": 5,
    "stop_loss": -10,
    "dry_run": true
  }'

Response:

json
{
  "id": "bot_a1b2c3d4",
  "name": "BTC DCA Bot",
  "status": "stopped",
  "exchange": "binance",
  "pair": "BTC/USDT",
  "strategy": "dca",
  "dry_run": true,
  "created_at": "2026-04-01T12:00:00Z"
}

Webhooks

Configure webhook URLs in Dashboard → Settings → Webhooks to receive real-time notifications for trade events.

Available Events:

bot.started
bot.stopped
trade.opened
trade.closed
trade.stoploss
bot.error
subscription.changed
payout.processed

Example webhook payload:

json
{
  "event": "trade.closed",
  "timestamp": "2026-04-01T14:30:00Z",
  "data": {
    "bot_id": "bot_a1b2c3d4",
    "trade_id": "trade_x9y8z7",
    "pair": "BTC/USDT",
    "side": "sell",
    "profit_pct": 2.4,
    "profit_usd": 12.50
  }
}

Rate Limits & Errors

Rate Limits

  • Standard100 req/min
  • Pro Plan300 req/min
  • Enterprise1000 req/min

Exceeding limits returns HTTP 429. Retry after the Retry-After header value.

Error Codes

  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 429Rate Limited
  • 500Server Error

SDKs Coming Soon

Official Python and JavaScript/TypeScript SDKs are in development. Sign up for early access and get notified when they launch.

Get Early Access