Our Trades Endpoint can be used for obtaining the live trades of every coin.
Supported chains
About endpoint
Each trade contains info about:
Timestamp (and Block Number) POST https://api.coinbrain.com/public/{chain_id}/coin/{coin_address}/trades
Pagination
You can change the position from which you’d like to obtain the trades by using the following GET parameters:
after and before (you can use with endCursor or startCursor ) Basic Request Example
Getting the last 2 trades of ETH coin.
curl --request POST \
--url ''
Response
{
"items": [
{
"side": "BUY",
"to": "0x0b82eb24e53b3ee22b1961c4c1c5a22484534180",
"pricePerTokenUsd": 3318.849055664515,
"baseAmount": 0.001454879780900193,
"targetAmount": 0.01113193061554777,
"timestamp": "2022-03-28T06:11:19Z",
"transactionHash": "0x6462b36ae76667976a6190c0c3051d2dbd6030f58720c39c470cac67c0dac9c1",
"blockNumber": 16444992,
"liquidityPool": {
"address": "0x74e4716e431f45807dcf19f284c7aa99f18a4fbc",
"exchange": {
"address": "0xca143ce32fe78f1f7019d7d551a6402fc5350c73",
"fullName": "PancakeSwap v2",
"web": ""
}
},
"baseToken": {
"name": "Ethereum Token",
"symbol": "ETH",
"address": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",
"decimals": 18
},
"targetToken": {
"name": "Wrapped BNB",
"symbol": "WBNB",
"address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
"decimals": 18
}
},
{
"side": "SELL",
"to": "0x6bf835573ea6b05a4c72be04f62e6c95b569748b",
"pricePerTokenUsd": 3303.3364094245057,
"baseAmount": 0.002648216934939112,
"targetAmount": 8.747951421238936,
"timestamp": "2022-03-28T06:11:13Z",
"transactionHash": "0x1e00553e9a550c4badefa1d16b7b9a08b4e562e3cdca4bf8c8201fb84819b827",
"blockNumber": 16444990,
"liquidityPool": {
"address": "0x7213a321f1855cf1779f42c0cd85d3d95291d34c",
"exchange": {
"address": "0xca143ce32fe78f1f7019d7d551a6402fc5350c73",
"fullName": "PancakeSwap v2",
"web": ""
}
},
"baseToken": {
"name": "BUSD Token",
"symbol": "BUSD",
"address": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
"decimals": 18
},
"targetToken": {
"name": "Ethereum Token",
"symbol": "ETH",
"address": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",
"decimals": 18
}
}
],
"hasNextPage": true,
"hasPreviousPage": false,
"startCursor": "16444992,597,2170ed0880ac9a755fd29b2688956bd959f933f8",
"endCursor": "16444990,1459,e9e7cea3dedca5984780bafc599bd69add087d56"
}
Request Example with Pagination
Getting the last 2 trades by using after parameter and endCursor
curl --request POST \