Binance DEX address trades by pairs
by bitquery
HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bitquery/[email protected]/dist/assets/css/widgets.css">
<script src="https://cdn.jsdelivr.net/gh/bitquery/[email protected]/dist/widgets.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<h1>
Address Trades By Pairs
</h1>
<div id="trades_by_currencies"></div>
<p>Trades by address bnb1qu59r9degdxqtzvhsqupcrnnwtr6qdv3n3usgg in Binance DEX blockchain
</p>
CSS
body {
background-color: #10202F;
}
h1,p {
color: grey
}
JavaScript
widgets.init('https://graphql.bitquery.io', 'apikey', {locale: 'en', theme: 'dark'});
var query = new widgets.query(`
query ($address: String!, $from: ISO8601DateTime, $till: ISO8601DateTime, $limit: Int!, $offset: Int!){
binance {
trades(from: $from, till: $till, options: {limit: $limit, offset: $offset}){
trades_as_buyer: count(buyer: {
address: $address
}, uniq:trades)
trades_as_seller: count(seller: {
address: $address
}, uniq:trades)
buyQuoteAmount: quoteAmount(buyer: {
address: $address
})
sellQuoteAmount: quoteAmount(seller: {
address: $address
})
buyBaseAmount: baseAmount(buyer: {
address: $address
})
sellBaseAmount:baseAmount(seller: {
address: $address
})
baseCurrency{ symbol }
quoteCurrency{ symbol }
}
}
}
`);
var wdts = new widgets.trades_by_currencies('#trades_by_currencies', query, 'binance.trades');
query.request({"limit": 10, "offset": 0, "address": "bnb1qu59r9degdxqtzvhsqupcrnnwtr6qdv3n3usgg", "from": null, "till": null});