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
  • Current data
  • Historic data
  • Platform Week Data
  • Platform Day Data

Was this helpful?

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

Platform data

PreviousQuery ExamplesNextToken Data

Last updated 2 years ago

Was this helpful?

Platform data refers to data points about the Aktionariat protocol as a whole. Some examples of platform data points are total value locked in the protocol, total brokerbots deployed, or total transaction counts. Thus, to query platform data you must pass in the Aktionariat Registry address 0xcB3e482df38d62E73A7aE0E15a2605caDcc5aE98 and select the desired fields. Reference the full r to see all possible fields.

The Registry address for Optimism is 0x2C9b9b9143A9Ef5051A299EF3CC8039b06927093

Current data

An example querying total transaction count, token count, total volume in USD and XCHF:

{
  registry(id: "0xcb3e482df38d62e73a7ae0e15a2605cadcc5ae98"){
    txCount
    tokenCount
    totalVolumeUSD
    totalVolumeXCHF
    totalRaisedUSD
  }
}

Historic data

You can also query historical data by specifying a block number.

{
  registry(
   id: "0xcb3e482df38d62e73a7ae0e15a2605cadcc5ae98",
   block: {number: 16877453})
   {
    txCount
    marketCount
    tokenCount
    totalVolumeUSD
    totalVolumeXCHF
    totalValueLockedUSD
    totalValueLockedXCHF
    lastUpdate
  }
}

Platform Week Data

If you want to get the latest weekly data to generate graphs, you can use this query

{
    aktionariatWeekDatas(first: 5, orderBy: id, orderDirection: desc)
    {
        id
        txCount
        volumeUSD 
    }
}

Platform Day Data

If you want to get the latest daily data to generate graphs, you can use this query

{
    aktionariatDayDatas(first : 5, orderBy: id, orderDirection: desc)
    {
        id
        txCount
        volumeUSD 
    }
}
🛠️
📊
egistry schema