跳转到主要内容
POST
Get candles

请求规范

  • 方法与路径: POST /apis/v1/api-exchange-coinbase-com/markets/get-candles
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/api-exchange-coinbase-com/markets/get-candles
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

按实际用量收费。 默认请求预估费用:$0.0005 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
product_id
string
必填

Trading pair id BASE-QUOTE as listed by list_products, e.g. BTC-USD, USELESS-USD. Case-insensitive; the canonical upper-case id is returned. Pattern: ^[A-Za-z0-9]{1,20}-[A-Za-z0-9]{1,20}$.

end
string

Inclusive range end, same forms as start. Defaults to now.

granularity
number
默认值:60

Bucket length in seconds: 60, 300, 900, 3600, 21600 or 86400.

Provider reference: allowed values ["60", "300", "900", "3600", "21600", "86400"]; default 60.

max_candles
number
默认值:300

Upper bound on buckets fetched in this call (300 per upstream request; requests are made sequentially to respect the 10 req/s public limit).

Provider reference: minimum 1; maximum 3000; default 300.

start
string

Inclusive range start: RFC 3339 (2026-07-24T00:00:00Z) or a date (2026-07-24, midnight UTC). Defaults to end minus max_candles buckets.

响应

Historical OHLCV candles for one trading pair (GET /products/{product_id}/candles) at 1m, 5m, 15m, 1h, 6h or 1d granularity, oldest first. The exchange serves at most 300 buckets per request, so a wider start..end range is walked in consecutive 300-bucket windows, up to max_candles (default 300, max 3000 = 10 upstream requests) per call; next_start continues where the call stopped. Buckets without trades are omitted by the exchange (thin markets return fewer rows than the window length; a sparse_buckets warning says so). Values are numbers as the exchange sends them.

The response contains the tool result directly.

The provider identifies candles as the primary payload key.

These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.