JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Gallery
CoinBrain
Share
Explore
Gallery
CoinBrain
CoinBrain
What is CoinBrain
Do Your Own Research
Connect Wallet
Releases
Partners
Help / Feedback / Bugs
For Developers
API
Coin Info
Trade History
Embed Widgets
Trade Widget
Price Chart & Trade History
Lite Profile
Price Bot
Telegram Price Bot
Discord Price Bot
Brand Materials
Features
Trade
Safety Check
Holders Overview
Homepage Filters
Trade History Filters
Multichart
Community Analysis
Watchlist
API
Trade History
Our Trades Endpoint can be used for obtaining the live trades of every coin.
Supported chains
Ethereum (id=1)
BNB Chain (id=56)
XRPL (id=-1)
Polygon (id=137)
Base (id=8453)
Avalanche (id=43114)
Optimism (id=10)
Arbitrum (id=42161)
Fantom (id=250)
Aurora (id=1313161554)
Blast (id=238)
Celo (id=42220)
ZKsync (id=324)
PulseChain (id=369)
About endpoint
Each trade contains info about:
Type: Buy/Sell
Price in USD
Amount
Timestamp (and Block Number)
Transaction Hash
Liquidity Pool
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:
size
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 '
https://api.coinbrain.com/public/56/coin/0x2170ed0880ac9a755fd29b2688956bd959f933f8/trades?size=2
'
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": "
https://pancakeswap.finance/swap
"
}
},
"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": "
https://pancakeswap.finance/swap
"
}
},
"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 \
--url '
https://api.coinbrain.com/public/56/coin/0x2170ed0880ac9a755fd29b2688956bd959f933f8/trades?size=2&after=16444990%2C1459%2Ce9e7cea3dedca5984780bafc599bd69add087d56
'
Gallery
Share
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.