MinaSearch
  • Getting Started
    • Overview
    • Data Exploration
  • APIs
    • GraphQL
    • REST
    • HTTP
  • Terminology
    • Definitions
    • Glossary
  • Legal
    • Terms of Service
    • Disclaimer
Powered by GitBook
On this page
  • Location
  • Examples
  • Graphical Playground
  1. APIs

GraphQL

Location

POST https://api.minasearch.com/graphql

Examples

Send JSON as the body of an HTTP request to query objects.

{
  accounts {
    publicKey
    balance
    username
    nonce
    delegate
    timeLocked
    timing {
      initial_minimum_balance
      cliff_time
      cliff_amount
      vesting_period
      vesting_increment
    }
  }
}
{
  blocks(
    limit: 120
    sortBy: BLOCKHEIGHT_ASC
    query: { canonical: true }
  ) {
    stateHash
    txFees
    blockHeight
    canonical
    creator
    dateTime
    receivedTime
    snarkFees
  }
}
{
  transactions(
    limit: 50
    sortBy: BLOCKHEIGHT_ASC
    query: { canonical: true }
  ) {
    blockHeight
    canonical
    amount
    fee
    kind
    to
    from
    nonce
    memo
    hash
    block {
      dateTime
      stateHash
    }
    receiver {
      publicKey
    }
  }
}

Fee Transfers

{
  feetransfers(
    limit: 101
    sortBy: BLOCKHEIGHT_DESC
    query: { canonical: true }
  ) {
    stateHash
    recipient
    fee
    type
    blockHeight
    canonical
    dateTime
  }
}
{
  snarks(
    limit: 10
    sortBy: BLOCKHEIGHT_DESC
    query: { canonical: true }
  ) {
    canonical
    blockHeight
    prover
    fee
    dateTime
    block {
      stateHash
    }
  }
}

By Epoch and Public Key

{
  stakes(
    limit: 2
    sortBy: BALANCE_DESC
    query: {
      epoch: 42
      public_key: "B62qiburnzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzmp7r7UN6X"
    }
  ) {
    balance
    balanceNanomina
    chainId
    delegate
    epoch
    ledgerHash
    nonce
    pk
    public_key
    token
    voting_for
    delegationTotals {
      countDelegates
      totalDelegated
      delegates
    }
  }
}

Top Stakers

{
  topStakers(
    limit: 3
    query: { epoch: 0 }
  ) {
    public_key
    username
    num_blocks_produced
    num_canonical_blocks_produced
    num_supercharged_blocks_produced
    num_slots_produced
  }
}

Graphical Playground

PreviousData ExplorationNextREST

Last updated 7 months ago

More examples can be found in .

You can browse and graphically interact with the GraphQL API in-browser (via ) at .

the hurl tests
GraphiQL
https://api.minasearch.com/graphql