Back to Docs

Making API Calls

How to interact with the CIDER REST API.

Base URL

All API requests are made to:

https://cider.trade/api/v1/

Request Format

All requests should include the Content-Type: application/json header for POST/PUT/PATCH requests. Responses are always JSON.

Example: GET request
curl https://cider.trade/api/v1/bots \
  -H "Authorization: Bearer YOUR_API_KEY"
Example: POST request
curl -X POST https://cider.trade/api/v1/otc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"offerToken":"USDT","offerAmount":1000,"requestToken":"ETH","requestAmount":0.5}'

Response Format

All successful responses include a data field. List endpoints also include a pagination field.

Successful response
{
  "data": {
    "id": "abc123",
    "name": "Golden Tree Alpha",
    "strategy": "Momentum",
    ...
  }
}
List response with pagination
{
  "data": [ ... ],
  "pagination": {
    "total": 48,
    "limit": 20,
    "offset": 0
  }
}
Error response
{
  "error": "Unauthorized",
  "details": "Invalid or expired API key"
}

Pagination

List endpoints support pagination via limit and offset query parameters. Maximum limit is 100 per request.

GET /api/v1/bots?limit=20&offset=40