Trades
Get last aggregate returns the latest aggregate bar for a crypto pair.
Get Trades
GEThttps://api.adesic.com/v2/cex/{exchange}/{market}/trades
Returns an object with recent trades for a crypto pair on an exchange.
Path Parameters
| Name | Type | Description |
|---|---|---|
| exchange* | string | Unique exchange identifier used by Adesic. |
| market* | string | Unique Crypto Pair identifier used by the exchange. |
Query Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
| limit | string | Number of results per request. Maximum 50,000. (default 200) |
| since | number | Unix Timestamp from where you want the data to start. (Historical Data) |
200: OK Success
success-response.js
{
"exchange": "coinbasepro",
"market": "BTC/USD",
"trades": [
{
"id": "279352169",
"timestamp": "1644524462830",
"price": 44322.55,
"size": 0.02209576,
"cost": 979.340427388,
"side": "buy"
},
{
"id": "279352170",
"timestamp": "1644524463216",
"price": 44322.55,
"size": 0.00030296,
"cost": 13.427959748000001,
"side": "buy"
},
]
}Copy & Paste Code
cURL
curl-request.sh
curl -H "api-key: API KEY" https://api.adesic.com/v2/cex/coinbasepro/BTC-USD/tradesResponse Object
Example URL: https://api.adesic.com/v2/cex/coinbasepro/BTC-USD/trades
response.json
{
"exchange": "coinbasepro",
"market": "BTC/USD",
"trades": [
{
"id": "279352169",
"timestamp": "1644524462830",
"price": 44322.55,
"size": 0.02209576,
"cost": 979.340427388,
"side": "buy"
},
]
}Response Attributes
| Attribute Name | Data Type | Description |
|---|---|---|
| exchange | string | The exchange id the trade occurred on. |
| market | string | The crypto pair that was traded. |
| trades | array | An array of trades |
| id | string | The exchange specific unique id of the trade. |
| timestamp | string | The Unix timestamp that trade was executed. |
| price | float | The quote currency price of the market. |
| size | float | The quantity traded. |
| cost | float | The quote cost: (size * price). |
| side | string | Whether the trade was a buy or sell. |