AIXBT Docs
REST APIReference

Price Candles (OHLCV)

GET
/v2/projects/{id}/candles

Returns OHLCV candlestick data from TimescaleDB metric history. Each candle is an array: [timestamp_ms, open, high, low, close, volume24h].

volume24h is the rolling 24-hour volume at candle close, not per-interval volume.

Interval defaults and caps:

IntervalDefault rangeMax range
5m24 hours48 hours
1h7 days14 days
1d30 days90 days

If the requested range exceeds the max, start is clamped forward (most recent candles are returned).

Authorization

ApiKeyAuth
x-api-key<token>

API key to authorize requests

In: header

Path Parameters

id*string

MongoDB ObjectId of the project

Query Parameters

interval*string

Candle interval

Value in"5m" | "1h" | "1d"
start?string

Start timestamp (ISO 8601). Defaults to interval-dependent lookback from end.

Formatdate-time
end?string

End timestamp (ISO 8601). Defaults to now.

Formatdate-time
at?string

Historical anchor timestamp (ISO 8601). Caps end and shifts the default lookback. Must be in the past.

When used:

  • If end is not provided, at sets the end of the window
  • If end is provided, at acts as a ceiling — end is capped to whichever is earlier
  • If start is not provided, it defaults to the interval's default lookback before at
Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v2/projects/string/candles?interval=5m&at=2026-03-25T12%3A00%3A00Z"
{
  "status": 200,
  "meta": {
    "upgrade": {
      "description": "string",
      "url": "https://aixbt.tech/subscribe"
    }
  },
  "data": {
    "projectId": "507f1f77bcf86cd799439011",
    "projectName": "Bitcoin",
    "interval": "1h",
    "candles": [
      [
        1709395200000,
        0.0523,
        0.0531,
        0.0519,
        0.0527,
        1234567
      ]
    ]
  }
}
{
  "error": "string",
  "message": "string",
  "code": "string",
  "status": 0,
  "data": null,
  "meta": {},
  "details": {},
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalCount": 0,
    "hasMore": true
  },
  "limitType": "minute",
  "retryAfterMs": 0,
  "limits": {
    "minute": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    },
    "day": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    }
  },
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "message": "string",
  "code": "string",
  "status": 0,
  "data": null,
  "meta": {},
  "details": {},
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalCount": 0,
    "hasMore": true
  },
  "limitType": "minute",
  "retryAfterMs": 0,
  "limits": {
    "minute": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    },
    "day": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    }
  },
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "message": "string",
  "code": "string",
  "status": 0,
  "data": null,
  "meta": {},
  "details": {},
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalCount": 0,
    "hasMore": true
  },
  "limitType": "minute",
  "retryAfterMs": 0,
  "limits": {
    "minute": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    },
    "day": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    }
  },
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "message": "string",
  "code": "string",
  "status": 0,
  "data": null,
  "meta": {},
  "details": {},
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalCount": 0,
    "hasMore": true
  },
  "limitType": "minute",
  "retryAfterMs": 0,
  "limits": {
    "minute": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    },
    "day": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    }
  },
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}
{
  "error": "string",
  "message": "string",
  "code": "string",
  "status": 0,
  "data": null,
  "meta": {},
  "details": {},
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalCount": 0,
    "hasMore": true
  },
  "limitType": "minute",
  "retryAfterMs": 0,
  "limits": {
    "minute": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    },
    "day": {
      "limit": 0,
      "remaining": 0,
      "resetAt": "2019-08-24T14:15:22Z"
    }
  },
  "issues": [
    {
      "path": "string",
      "message": "string"
    }
  ]
}