Aktionariat Documentation
  • Introduction to Aktionariat
    • ⚡Quick Start
  • 🛠️APIs
    • 📊Subgraph
      • Schema
      • Query Examples
        • Platform data
        • Token Data
        • Brokerbot Data
        • Swaps Data
    • ⚙️External API
      • ⚙️External API (Gitbook)
  • 🌐Web
    • Integrate with Ethers.js
      • Brokerbot Quoter
    • Integrate Aktionariat Widgets
  • ⛓️Smart Contracts
    • 📔Contracts Overview
    • 👷‍♂️Guides
      • Implement A Trade
        • Direct Trades
        • Multihop Trades
      • Get Brokerbot Contract for Token
      • Buy Shares
      • Sell Shares
    • Technical Reference
      • Allowlist
      • Brokerbot
      • Drag-Along
      • Infinite Allowances
      • Multi-Signature Contract
      • Recovery
      • Shareholder Registry
  • 📖Reference
    • Brokerbot Architecture
    • Github
    • Whitepaper
    • Brokerbot Analytics
  • 💬Socials
    • Twitter
    • Telegram
    • LinkedIn
    • Youtube
Powered by GitBook
On this page
  • All Brokerbots
  • General Brokerbot Data by Id
  • Brokerbot Weekly / Daily / Hourly Aggregated Data

Was this helpful?

Edit on GitHub
  1. APIs
  2. Subgraph
  3. Query Examples

Brokerbot Data

PreviousToken DataNextSwaps Data

Last updated 2 years ago

Was this helpful?

To get data about a certain brokerbot, pass in the brokerbot address. Reference the full 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

{
    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
    }
}

You can fetch aggregate data about a specific brokerbot over different periods. This query gets the last 10 entries for , and aggregated data for the current active DAKS brokerbot.

🛠️
📊
brokerbot schema
Weekly
Daily
Hourly