Brokerbot Data
To get data about a certain brokerbot, pass in the brokerbot address. Reference the full brokerbot schema and adjust the query fields to retrieve the data points you want.
All Brokerbots
This query gets you all registered brokerbots back. If there are more than 100 tokens you can use the skip parameter for pagination.
{
brokerbots(first: 100, skip: 0) {
id
token {
symbol
id
}
base {
symbol
id
}
}
}
General Brokerbot Data by Id
This query gets a brokerbot by its id (contract address), which in this case is the DAKS brokerbot contract address. It returns the token and base currency entities as well as TVL, volume and current price in the respective denomination of the token, base currency and USD.
{
brokerbot(id: "0xbdde35780e3986a47e54a580017d8213f0d2bb84"){
token {
symbol
id
}
base {
symbol
id
}
reserveBase
reserveToken
totalValueLockedUSD
volumeBase
volumeToken
volumeUSD
basePrice
tokenPrice
priceUSD
}
}
Brokerbot Weekly / Daily / Hourly Aggregated Data
You can fetch aggregate data about a specific brokerbot over different periods. This query gets the last 10 entries for Weekly, Daily and Hourly aggregated data for the current active DAKS brokerbot.
{
week: brokerbotWeekDatas(first: 10, where: {brokerbot: "0xbdde35780e3986a47e54a580017d8213f0d2bb84", date_gt: 1608880000}, orderDirection: desc, orderBy: date){
date
volumeUSD
totalValueLockedUSD
priceUSD
txCount
},
day: brokerbotDayDatas(first: 10, where: {brokerbot: "0xbdde35780e3986a47e54a580017d8213f0d2bb84", date_gt: 1608880000}, orderDirection: desc, orderBy: date){
date
volumeUSD
totalValueLockedUSD
priceUSD
txCount
},
hour: brokerbotHourDatas(first: 10, where: {brokerbot: "0xbdde35780e3986a47e54a580017d8213f0d2bb84", periodStartUnix_gt: 1658880000}, orderDirection: desc, orderBy: periodStartUnix){
periodStartUnix
volumeUSD
totalValueLockedUSD
priceUSD
txCount
}
}
Last updated
Was this helpful?