DOCS/EXAMPLES

Examples

Copy-paste examples for common queries.

Get Address Balances

Fetch all currency balances for any address

query {
  addressBalances(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    address: "RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA"
  ) {
    balances {
      currencyName
      balance
      totalReceived
      totalSent
    }
  }
}

Search Identities

Find VerusIDs by name pattern

query {
  identities(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    search: "mike"
    limit: 10
  ) {
    identities {
      name
      identityAddress
      primaryAddresses
    }
  }
}

Get Currency State

Fetch current price and reserves for basket currencies

query {
  currencyState(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    currencyId: "iBridgeCurrencyId..."
  ) {
    supply
    reserves
    conversionPrice
  }
}

Rich List

Get top holders for any currency

query {
  richList(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    limit: 20
  ) {
    entries {
      rank
      address
      balance
      percentage
    }
    totalHolders
  }
}

Transaction History

Get transactions for an address

query {
  addressTransactions(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    address: "RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA"
    limit: 20
  ) {
    transactions {
      txid
      blockHeight
      timestamp
      netChange
    }
  }
}

Identity History

Get all revisions of an identity

query {
  identityHistory(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    identityAddress: "iAddress..."
  ) {
    version
    operation
    blockHeight
    primaryAddresses
    contentMap
  }
}