API ReferenceToken APIGet Token PricesGet OHLCV by Pair AddressGet OHLCV by Pair Address Mainnet OnlyNeed a candlestick chart for your website?Embed our free chart widget directly on your site in just a few clicksEmbed ChartLooking for OHLCV data on Solana?Access OHLCV data by pair address on Solana using our API.Explore Solana APIGEThttps://deep-index.moralis.io/api/v2.2/pairs/:address/ohlcvGet the OHLCV candle stick by using pair addressPATH PARAMSaddressstringrequiredThe pair addressQUERY PARAMSchainstringThe chain to queryeth0x1sepolia0xaa36a7holesky0x4268polygon0x89polygon amoy0x13882bsc0x38bsc testnet0x61avalanche0xa86afantom0xfacronos0x19arbitrum0xa4b1gnosis0x64gnosis testnet0x27d8chiliz0x15b38chiliz testnet0x15b32base0x2105base sepolia0x14a34optimism0xalinea0xe708linea sepolia0xe705moonbeam0x504moonriver0x505moonbase0x507flow0x2ebflow-testnet0x221ronin0x7e4ronin-testnet0x7e5lisk0x46flisk-sepolia0x106apulse0x171timeframestringrequiredThe timeframe1s10s30s1min5min10min30min1h4h12h1d1w1McurrencystringrequiredThe currencyusdnativefromDatestringrequiredThe starting date (format in seconds or datestring accepted by momentjs)Provide the param 'fromBlock' or 'fromDate'If 'fromDate' and 'fromBlock' are provided, 'fromBlock' will be used.toDatestringrequiredThe ending date (format in seconds or datestring accepted by momentjs)Provide the param 'toBlock' or 'toDate'If 'toDate' and 'toBlock' are provided, 'toBlock' will be used.limitnumberThe number of results to returncursorstringThe cursor returned in the previous response (used for getting the next page)Responses200Returns the OHLCV data.400Bad Request404Not Found429Too Many Requests500Internal Server ErrorAPI KEYTest Live APIcURLNode.jsPythonGoPHPcurl --request GET \ --url 'https://deep-index.moralis.io/api/v2.2/pairs/0xa43fe16908251ee70ef74718545e4fe6c5ccec9f/ohlcv?chain=eth&timeframe=1h¤cy=usd&fromDate=2025-01-01T10%3A00%3A00.000&toDate=2025-01-02T10%3A00%3A00.000&limit=25' \ --header 'accept: application/json' \ --header 'X-API-Key: YOUR_API_KEY' // Node.js v18+ has native fetch support// No additional dependencies requiredconst options = { method: 'GET', headers: { accept: 'application/json', 'X-API-Key': 'YOUR_API_KEY' },};fetch('https://deep-index.moralis.io/api/v2.2/pairs/0xa43fe16908251ee70ef74718545e4fe6c5ccec9f/ohlcv?chain=eth&timeframe=1h¤cy=usd&fromDate=2025-01-01T10%3A00%3A00.000&toDate=2025-01-02T10%3A00%3A00.000&limit=25', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));# Dependencies to install:# $ python -m pip install requestsimport requestsurl = "https://deep-index.moralis.io/api/v2.2/pairs/0xa43fe16908251ee70ef74718545e4fe6c5ccec9f/ohlcv?chain=eth&timeframe=1h¤cy=usd&fromDate=2025-01-01T10%3A00%3A00.000&toDate=2025-01-02T10%3A00%3A00.000&limit=25"headers = { "Accept": "application/json", "X-API-Key": "YOUR_API_KEY"}response = requests.request("GET", url, headers=headers)print(response.text)package mainimport ( "fmt" "net/http" "io")func main() { url := "https://deep-index.moralis.io/api/v2.2/pairs/0xa43fe16908251ee70ef74718545e4fe6c5ccec9f/ohlcv?chain=eth&timeframe=1h¤cy=usd&fromDate=2025-01-01T10%3A00%3A00.000&toDate=2025-01-02T10%3A00%3A00.000&limit=25" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") req.Header.Add("X-API-Key", "YOUR_API_KEY") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://deep-index.moralis.io/api/v2.2/pairs/0xa43fe16908251ee70ef74718545e4fe6c5ccec9f/ohlcv?chain=eth&timeframe=1h¤cy=usd&fromDate=2025-01-01T10%3A00%3A00.000&toDate=2025-01-02T10%3A00%3A00.000&limit=25', [ 'headers' => [ 'Accept' => 'application/json', 'X-API-Key' => 'YOUR_API_KEY', ],]);echo $response->getBody();Response Example200 Returns the OHLCV data.{ "cursor": "string", "page": 1, "pairAddress": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", "tokenAddress": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", "timeframe": "1h", "currency": "usd", "result": [ { "timestamp": "2024-02-14T00:00:00.000Z", "open": 253.82, "high": 255.14, "low": 252.91, "close": 253.95, "volume": 23544.27541795, "swaps": 48 } ]}