K-line candlestick and OHLCV price data for DEX pairs.
OHLCV Latest
Returns the latest OHLCV (Open, High, Low, Close, Volume) market values for one or more spot pairs for the current UTC day. Since the current UTC day is still active these values are updated frequently. You can find the final calculated OHLCV values for the last completed UTC day along with all historic days using /dex/pairs/ohlcv/historical.
query Parameters
contract_addressOne or more comma-separated contract addresses.
network_idOne or more CoinMarketCap cryptocurrency network ids
network_slugAlternatively, one network names in URL friendly shorthand "slug" format (all lowercase, spaces replaced with hyphens).
auxDefault:""
Valid values: "pool_created" "percent_pooled_base_asset" "num_transactions_24h" "pool_base_asset" "pool_quote_asset" "24h_volume_quote_asset" "total_supply_quote_asset" "total_supply_base_asset" "holders" "buy_tax" "sell_tax" "security_scan" "24h_no_of_buys" "24h_no_of_sells" "24h_buy_volume" "24h_sell_volume"
Optionally specify a comma-separated list of supplemental data fields to return.
convert_idOptionally calculate market quotes by CoinMarketCap ID instead of symbol. This option is identical to convert outside of ID format. Ex: convert_id=1,2781 would replace convert=BTC,USD in your query. This parameter cannot be used when convert is used.
skip_invalidPass true to relax request validation rules. When requesting records on multiple spot pairs an error is returned if no match is found for 1 or more requested spot pairs. If set to true, invalid lookups will be skipped allowing valid spot pairs to still be returned.
reverse_orderPass true to invert the order of a spot pair. For example, a trading pair is set up as Token B/Token A in the contract and is commonly referred to as Token A/Token B. Using reverse_order would change the order to reflect the true Token B/Token A pairing as it exists in the pool.
Headers
X-CMC_PRO_API_KEYYour CoinMarketCap Pro API key
OHLCV Latest › Responses
OK
OHLCV Historical
Returns historical OHLCV (Open, High, Low, Close, Volume) data along with market cap for any spot pairs using time interval parameters.
query Parameters
contract_addressOne contract address. Example:"0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640". If network/dex/base asset/quote asset information is passed, contract address cannot be passed. Note: contract_address is case sensitive for all non-EVM chains and not case sensitive for all EVM chains. EVM chains contract address addresses begin with 0x, and are followed by 40 alphanumeric characters(numerals and letters)
network_idOne or more CoinMarketCap cryptocurrency network ids
network_slugAlternatively, one network names in URL friendly shorthand "slug" format (all lowercase, spaces replaced with hyphens).
time_periodDefault:"daily"
Valid values: "daily" "hourly" "1m" "5m" "15m" "4h"
Time period to return OHLCV data for. If hourly, the open will be 01:00 and the close will be 01:59. If daily, the open will be 00:00:00 for the day and close will be 23:59:99 for the same day. See the main endpoint description for details.
time_startTimestamp (Unix or ISO 8601) to start returning OHLCV time periods for. Only the date portion of the timestamp is used for daily OHLCV so it's recommended to send an ISO date format like "2018-09-19" without time.
time_endTimestamp (Unix or ISO 8601) to stop returning OHLCV time periods for (inclusive). Optional, if not passed we'll default to the current time. Only the date portion of the timestamp is used for daily OHLCV so it's recommended to send an ISO date format like "2018-09-19" without time.
countOptionally limit the number of time periods to return results for. The default is 10 items. The current query limit is 500 items.
intervalDefault:"daily"
Valid values: "1m" "5m" "15m" "30m" "1h" "4h" "8h" "12h" "daily" "weekly" "monthly"
Optionally adjust the interval that "time_period" is sampled. For example with interval=monthly&time_period=daily you will see a daily OHLCV record for January, February, March and so on. See main endpoint description for available options.
auxDefault:""
Valid values: "pool_created" "percent_pooled_base_asset" "num_transactions_24h" "pool_base_asset" "pool_quote_asset" "24h_volume_quote_asset" "total_supply_quote_asset" "total_supply_base_asset" "holders" "buy_tax" "sell_tax" "security_scan" "24h_no_of_buys" "24h_no_of_sells" "24h_buy_volume" "24h_sell_volume"
Optionally specify a comma-separated list of supplemental data fields to return.
convert_idOptionally calculate market quotes by CoinMarketCap ID instead of symbol. This option is identical to convert outside of ID format. Ex: convert_id=1,2781 would replace convert=BTC,USD in your query. This parameter cannot be used when convert is used.
skip_invalidPass true to relax request validation rules. When requesting records on multiple spot pairs an error is returned if no match is found for 1 or more requested spot pairs. If set to true, invalid lookups will be skipped allowing valid spot pairs to still be returned.
reverse_orderPass true to invert the order of a spot pair. For example, a trading pair is set up as Token B/Token A in the contract and is commonly referred to as Token A/Token B. Using reverse_order would change the order to reflect the true Token B/Token A pairing as it exists in the pool.
Headers
X-CMC_PRO_API_KEYYour CoinMarketCap Pro API key
OHLCV Historical › Responses
OK
Get K-line points
Get K-line price points for a token.
Response Format: Each point is an array with 3 elements:
- [0] price: Token price
- [1] volume: Trading volume
- [2] timestamp: UNIX timestamp (seconds)
Example: [[1.23, 50000, 1705363200], ...]
query Parameters
platformPlatform name or id
addressToken or pool address
intervalKline interval: 1s/5s/30s/1min/3min/5min/15min/30min/1h/2h/4h/6h/8h/12h/1d/3d/1w/1m
fromStart timestamp (UNIX epoch)
toEnd timestamp (UNIX epoch)
unitKline unit: usd, native, quote
limitNumber of points to load
pmKline type: p (price), m (marketcap)
Headers
X-CMC_PRO_API_KEYYour CoinMarketCap Pro API key
Get K-line points › Responses
OK
Get K-line candles
Get K-line candle (OHLCV) data for a token.
Response Format: Each candle is an array with 7 elements:
- [0] open: Opening price
- [1] high: Highest price
- [2] low: Lowest price
- [3] close: Closing price
- [4] volume: Trading volume
- [5] timestamp: UNIX timestamp (seconds)
- [6] traders: Number of unique traders
Example: [[1.23, 1.45, 1.20, 1.40, 50000, 1705363200, 128], ...]
query Parameters
platformPlatform name or id
addressToken or pool address
intervalKline interval: 1s/5s/30s/1min/3min/5min/15min/30min/1h/2h/4h/6h/8h/12h/1d/3d/1w/1m
fromStart timestamp (UNIX epoch)
toEnd timestamp (UNIX epoch)
unitKline unit: usd, native, quote
limitNumber of candles to load
pmKline type: p (price), m (marketcap)
Headers
X-CMC_PRO_API_KEYYour CoinMarketCap Pro API key
Get K-line candles › Responses
OK