curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-trades?start_time=2015-01-08T20:55:00Z&end_time=2015-01-08T21:00:00Z&paging_from=start&markets=coinbase-btc-usd-spot&pretty=true&api_key=<your_key>"{
"data": [
{
"time": "2015-01-08T20:55:00.028749000Z",
"market": "coinbase-btc-usd-spot",
"coin_metrics_id": "100",
"amount": "1000.01",
"price": "10.61",
"database_time": "2016-06-08T20:55:00.256754000Z",
"side": "buy"
},
{
"time": "2021-06-08T20:55:00.758178000Z",
"market": "coinbase-btc-usd-spot",
"coin_metrics_id": "200000000",
"amount": "1000.01",
"price": "1000000.61",
"database_time": "2021-06-08T20:55:01.053472000Z",
"side": "sell"
}
],
"next_page_token": "0.MjAyMC0wNi0wOFQyMTowMzowNi40OTM1OTZafDk0MjMzMjAz",
"next_page_url": "https://api.coinmetrics.io/v4/timeseries/market-trades?markets=coinbase-btc-usd-spot&api_key=<your_key>&pretty=true&page_size=2&next_page_token=0.MjAyMC0wNi0wOFQyMTowMzowNi40OTM1OTZafDk0MjMzMjAz"
}Market trades
Returns trades for specified markets.
Regular-market results are ordered by tuple (market, time, coin_metrics_id). When type=event_contract, results are ordered by tuple (exchange, raw market symbol, time, numeric coin_metrics_id); the exchange and raw-symbol components are those used to construct the rendered market value.
To fetch the next page of results use next_page_url JSON response field.
curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-trades?start_time=2015-01-08T20:55:00Z&end_time=2015-01-08T21:00:00Z&paging_from=start&markets=coinbase-btc-usd-spot&pretty=true&api_key=<your_key>"{
"data": [
{
"time": "2015-01-08T20:55:00.028749000Z",
"market": "coinbase-btc-usd-spot",
"coin_metrics_id": "100",
"amount": "1000.01",
"price": "10.61",
"database_time": "2016-06-08T20:55:00.256754000Z",
"side": "buy"
},
{
"time": "2021-06-08T20:55:00.758178000Z",
"market": "coinbase-btc-usd-spot",
"coin_metrics_id": "200000000",
"amount": "1000.01",
"price": "1000000.61",
"database_time": "2021-06-08T20:55:01.053472000Z",
"side": "sell"
}
],
"next_page_token": "0.MjAyMC0wNi0wOFQyMTowMzowNi40OTM1OTZafDk0MjMzMjAz",
"next_page_url": "https://api.coinmetrics.io/v4/timeseries/market-trades?markets=coinbase-btc-usd-spot&api_key=<your_key>&pretty=true&page_size=2&next_page_token=0.MjAyMC0wNi0wOFQyMTowMzowNi40OTM1OTZafDk0MjMzMjAz"
}Authorizations
Query Parameters
Start of the time interval.
This field refers to the time field in the response.
Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120.
Inclusive by default.
UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it.
If start_time is omitted, response will include time series from the earliest time available.
End of the time interval.
This field refers to the time field in the response.
Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120.
Inclusive by default.
UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it.
If end_time is omitted, response will include time series up to the latest time available.
Timezone name for start_time and end_time timestamps.
This parameter does not modify the output times, which are always UTC.
Format is defined by TZ database.
"America/New_York"
Specifies how many blocks behind the chain tip trades are based on. Default is 2. For example, a min_confirmations of 0 means trades are being collected for all blocks up to the block at the tip of the chain (the latest block received by our node), whereas a min_confirmations of 6 means that trades are being collected for all blocks up to the block that is 6 blocks behind the chain tip (i.e., the 7th block if the chain tip is block 1). Currently available only for DeFi markets. It cannot be supplied when type=event_contract; that combination returns a 400 response.
0 <= x <= 99
