{"uid":"cap_XenWJ6FYn76V_yZOWXBO_","slug":"crypto-market-data-recent-historical-klines-23260467","name":"Crypto Market Data – Recent Historical Klines","description":"A crypto market data agent that exposes live symbols, market metadata, and historical Binance candlesticks.","url":"https://crypto-market-data.up.railway.app/historical-klines/recent","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","default":100,"maximum":1000,"description":"Number of most recent klines to fetch (max 1000).","exclusiveMinimum":0},"symbol":{"type":"string","pattern":"^[A-Z0-9]+$","examples":["BTCUSDT"],"description":"Trading symbol, e.g. BTCUSDT."},"interval":{"enum":["1m","3m","5m","15m","30m","1h","2h","4h","6h","8h","12h","1d","3d","1w","1M"],"type":"string","title":"KlineInterval","default":"1h","description":"Candlestick interval."}}},"responseSchema":{"type":"json","example":{"klines":[{"volume":45.5,"low_price":2240,"open_time":"2024-01-15T10:00:00","close_time":"2024-01-15T10:15:00","high_price":2265,"open_price":2250,"close_price":2260,"amount_trades":420,"quote_asset_volume":102847.5,"taker_buy_base_volume":22.1,"taker_buy_quote_volume":50002}],"symbol":"ETHUSDT","interval":"15m"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cnpLk229QXPXs1qXwBCEG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches the most recent N historical candlestick (OHLCV) data points for a given crypto trading pair from Binance at a specified interval.","exampleAgentPrompt":"Pull the last 200 hourly candlesticks for BTCUSDT from the Binance market data agent so I can analyze recent price action.","exampleUseCases":[{"title":"Algorithmic trading signal generation","prompt":"Fetch the last 500 15-minute candles for ETHUSDT so I can run my RSI and MACD indicators and decide whether to enter a trade."},{"title":"Portfolio performance review","prompt":"Get me the last 100 daily candlesticks for SOLUSDT — I want to see the open, close, high, and low prices over the past few months to review how my position has performed."},{"title":"Volatility spike detection","prompt":"Grab the most recent 50 one-hour klines for BTCUSDT so I can check whether there's been any unusual price volatility or volume spikes in the last two days."}],"resultDescription":"Returns a JSON object containing the requested symbol and interval, along with an array of kline objects each including open/close/high/low prices, volume, quote asset volume, taker buy base and quote volumes, number of trades, and open/close timestamps.","failureModes":["Invalid or unsupported trading symbol returns an error or empty klines array","Requesting more than 1000 klines triggers a validation error","Invalid interval value not in the allowed enum causes a 400-style error","Binance upstream unavailability may cause timeouts or partial data","Requesting n=0 or negative values fails due to exclusiveMinimum constraint"],"whenToPreferThis":"Choose this endpoint when you need recent historical OHLCV candlestick data from Binance for a specific trading pair and time interval, especially for technical analysis, backtesting, or charting. It is ideal for fetching a rolling window of recent candles rather than arbitrary date-range queries. Prefer it over generic market data APIs when Binance-sourced data is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:35:37.877Z","isFirstParty":false}