Crypto market data API: exchange klines & candlesticks · Surf
Retrieve exchange OHLCV candles for one trading pair. Returns trading-pair OHLCV candles and available period boundaries, extremes, volume and candle count. Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0072 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Up to 0.0072 credits / call
The final charge is based on confirmed usage. Unused reserved credits return to your available balance.
Surf
Crypto market data API: exchange klines & candlesticks · Surf
Retrieve exchange OHLCV candles for one trading pair. Returns trading-pair OHLCV candles and available period boundaries, extremes, volume and candle count. Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0072 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
You receive
Returns trading-pair OHLCV candles and available period boundaries, extremes, volume and candle count. Prices use the requested pair's quote currency; BTC/USDT values are USDT, not automatically USD. Volume units depend on the documented fields.
Start with your task
Show the price and trading volume of [Bitcoin] in [Tether] on [Binance], every [4 hours] over the past [7 days].
Inputs & outputs
Inspect the current inputs, availability, and maximum charge before starting.
Input schema
Input schema
Field / Path
Type
Requirement
Meaning
queryParamsqueryParams
object
Required
Required fields
pair
fromqueryParams.from
string
Optional
Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601). Example: 2026-03-01.
Minimum length
1
pairqueryParams.pair
string
Required
Trading pair (e.g. BTC/USDT). Example: BTC/USDT.
Minimum length
1
typequeryParams.type
string
Optional
Market type: spot for spot trading, swap/perpetual/perp for perpetual contracts. Example: spot. Defaults to "spot".
Default
spot
Options
spot, swap, perpetual, perp
limitqueryParams.limit
integer
Optional
Max number of candles to return. Exchange may cap lower (e.g. 200-1000). For longer ranges, paginate using the last returned timestamp as the next from value. Example: 100. Defaults to 100.
Default
100
Minimum
1
Maximum
1000
exchangequeryParams.exchange
string
Optional
Exchange identifier. Note: hyperliquid uses USDC-settled perps (e.g. BTC/USDC:USDC); pass USDC-quoted pairs when querying hyperliquid. Example: binance. Defaults to "binance".
Candle size — bucket duration for each returned OHLCV row. This endpoint uses interval only; it does NOT accept time_range. Use from + limit to control the window. Example: 1h. Defaults to "1h".
queryParams.type (Optional): Market type: spot for spot trading, swap/perpetual/perp for perpetual contracts. Example: spot. Defaults to "spot".
queryParams.limit (Optional): Max number of candles to return. Exchange may cap lower (e.g. 200-1000). For longer ranges, paginate using the last returned timestamp as the next from value. Example: 100. Defaults to 100.
queryParams.interval (Optional): Candle size — bucket duration for each returned OHLCV row. This endpoint uses interval only; it does NOT accept time_range. Use from + limit to control the window. Example: 1h. Defaults to "1h".
What this Tool returns
Returns trading-pair OHLCV candles and available period boundaries, extremes, volume and candle count.
Response fields and how to read them
The table follows the official response contract, including nested fields and useful response metadata. [] denotes an array item. Required means required within its parent object, not that a conditional parent always exists. A nullable type permits null; an optional field can be absent. Use the documented conditions below to distinguish missing, empty and zero values. Units and reporting windows apply only where explicitly documented.
Field, type and presence
Meaning and conditions
data.[].candles
array | null; Required within parent
OHLCV candles
data.[].candles.[].close
number; Required within parent; format: double
Closing price
data.[].candles.[].high
number; Required within parent; format: double
Highest price during the interval
data.[].candles.[].low
number; Required within parent; format: double
Lowest price during the interval
data.[].candles.[].open
number; Required within parent; format: double
Opening price
data.[].candles.[].timestamp
integer | null; Required within parent; format: int64
Candle open time in Unix seconds
data.[].candles.[].volume
number; Required within parent; format: double
Trading volume in base currency units
data.[].count
integer; Required within parent; format: int64
Number of candles
data.[].exchange
string; Required within parent
Exchange identifier
data.[].interval
string; Required within parent
Candle interval
data.[].pair
string; Required within parent
Trading pair
data.[].period_end
string | null; Required within parent
Last candle datetime
data.[].period_high
number | null; Required within parent; format: double
Highest price in period
data.[].period_low
number | null; Required within parent; format: double
Lowest price in period
data.[].period_start
string | null; Required within parent
First candle datetime
data.[].period_volume
number | null; Required within parent; format: double
Total volume in period
meta.cached
boolean; Required within parent
Whether this response was served from cache
meta.credits_used
integer; Required within parent; format: int64
Credits deducted for this request
meta.empty_reason
string; Optional within parent
Hint explaining why the data array is empty, when applicable
Coverage, units and freshness
Prices use the requested pair's quote currency; BTC/USDT values are USDT, not automatically USD. Volume units depend on the documented fields.
Inspect any returned observation time, cache status, watermark, pagination and errors using their documented meanings. A successful request alone does not establish complete coverage. Where no freshness or completeness guarantee is documented, treat it as unknown. Saved Examples are historical and viewing them does not refresh data or execute a new call.
Data source and references
Surf supplies this endpoint through its Data API. Response contract and deployed Tool inputs reviewed on 2026-10-03 against official OpenAPI v0.2.102. This is a contract review date, not a data observation time. Coverage depends on the selected endpoint and request.
Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0072 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Hourly recent history
Example request: Show [Bitcoin] prices and trading volume in [Tether] on [Binance] for the past [3 days], with one result every [1 hour].
Tell me the coin and the money you want its price shown in, such as [Bitcoin] in [Tether]. Name an exchange such as [Binance] if you have one in mind; otherwise [Binance] is used. You can also say how far back to look and how often to show a result, for example [7 days] and every [4 hours]. Results are hourly by default. Regular buy/sell markets are used unless you ask for [perpetual contracts]. If the coin or currency name is unclear, I will ask. You do not need to enter a trading-pair code.
Returns trading-pair OHLCV candles and available period boundaries, extremes, volume and candle count.
Prices use the requested pair's quote currency; BTC/USDT values are USDT, not automatically USD. Volume units depend on the documented fields.
Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0072 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Ask your agent to Retrieve exchange OHLCV candles for one trading pair. Provide the required inputs above. If Toolmu is already connected, reuse that connection; otherwise use the setup instructions on this page. Before a paid execution, the agent must read the current Tool contract and check availability, the credit ceiling, balance, budget and your authorization. It should then execute the Tool and explain the returned fields and limitations.
Inspect any returned observation time, cache status, watermark, pagination and errors using their documented meanings. A successful request alone does not establish complete coverage. Where no freshness or completeness guarantee is documented, treat it as unknown. Saved Examples are historical and viewing them does not refresh data or execute a new call.