Indexer API Documentation

HTTP API documentation for the Mina Indexer API service provided by DataHub

Health

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/health

Path Parameters

NameTypeDescription

string

Status

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/status

Returns the current service status along with node version and sync status

Path Parameters

NameTypeDescription

string

Height

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/height

Path Parameters

NameTypeDescription

string

Block

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/block

Path Parameters

NameTypeDescription

string

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/blocks

Returns a set of blocks that match input parameters.

Query Parameters

NameTypeDescription

min_height

integer

Start height

max_height

integer

End height

creator

string

Block producer public key

limit

integer

Number of blocks to return

sort

string

Sort field

order

string

Sort order

{
  "height": 1490,
  "hash": "3NLF7dmJQpDaheV2KuTcAHXVuLjGorht25jhJN7uJTAPJvv5dWDS",
  "parent_hash": "3NLFdGM1q4CiTTmPUKnYywtqqNL6wdfiTnsi1HBeCBTPTsyXwi47",
  "time": "2021-03-05T21:46:08Z",
  "canonical": true,
  "ledger_hash": "jxt6GQM3CvK1nBYxQpSLhGxsFc9VydTnVdNfUsardf1TEFwpK7K",
  "snarked_ledger_hash": "jxz1rCy4CkDFjHCgjRvZ95m6so35wimW6EaPyBww2ATRcBPoq82",
  "creator": "B62qnG5JpGGtWKSL9S4emeoEjXzUF7dcuZtBY3nwmAPz3M6pTn92kFh",
  "coinbase": "1440000000000",
  "total_currency": "178498400000001000",
  "epoch": 0,
  "slot": 5174,
  "transactions_count": 134,
  "transactions_fees": 0,
  "snarkers_count": 9,
  "snark_jobs_count": 128,
  "snark_jobs_fees": "2632400000"
}

Block Details

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/blocks/{id}

Returns block details and all associated information, like validators, snarkers, transactions.

Path Parameters

NameTypeDescription

id

string

Block number or hash

{
  "block": {
    "height": 6813,
    "hash": "3NL9a89zjZyxBBrsLbGozHMVe7GVthnQxsuBdzAHSzZrvypHZHKN",
    "parent_hash": "3NKPjq2FKRukRRcc76cdRES3XuHdVVoSqV98gqtMQujM5y1J6soE",
    "time": "2021-02-18T05:57:00Z",
    "canonical": true,
    "ledger_hash": "jxVAmBm5YJMkzpZrNyEzDmBZRys9SSULFEZBtjETjC9r4HiNjEv",
    "snarked_ledger_hash": "jxdVnHxmDhhbMNrzEcoMnC862Ft3TRDy1PMZAP2cDraYXMcU5kE",
    "creator": "B62qmyjqEtUEZrsBpUaiz18DCkwh1ovCrJboiHbDhpvH8JEoaag5fUP",
    "coinbase": "400000000000",
    "total_currency": "168372598057001000",
    "epoch": 0,
    "slot": 6439,
    "transactions_count": 2,
    "transactions_fees": 0,
    "snarkers_count": 1,
    "snark_jobs_count": 1,
    "snark_jobs_fees": "10000"
  },
  "creator": {
    "public_key": "B62qmyjqEtUEZrsBpUaiz18DCkwh1ovCrJboiHbDhpvH8JEoaag5fUP",
    "delegate": null,
    "balance": "2524136468248478",
    "balance_unknown": "2524136468248478",
    "stake": null,
    "nonce": 0,
    "start_height": 6535,
    "start_time": "2021-02-14T12:42:00Z",
    "last_height": 6813,
    "last_time": "2021-02-18T05:57:00Z"
  },
  "snark_jobs": [
    {
      "id": 27990,
      "height": 6813,
      "time": "2021-02-18T05:57:00Z",
      "prover": "B62qmo7wZEAZPZoao5AKRVJox9B9fgpvYAsPvYevSH7tWdTS7ny93Uu",
      "fee": "10000",
      "works_count": 2
    }
  ],
  "transactions": [
    {
      "id": 165318,
      "hash": "CkpZ1NULZG56Dbw4iaSy6gacUQHH4jzVb9iwMmGtiyz2n3oqjgY3x-0",
      "type": "coinbase",
      "block_hash": "3NL9a89zjZyxBBrsLbGozHMVe7GVthnQxsuBdzAHSzZrvypHZHKN",
      "block_height": 6813,
      "time": "2021-02-18T05:57:00Z",
      "sender": null,
      "receiver": "B62qmyjqEtUEZrsBpUaiz18DCkwh1ovCrJboiHbDhpvH8JEoaag5fUP",
      "amount": "400000000000",
      "fee": null,
      "nonce": null,
      "memo": null,
      "status": "applied",
      "failure_reason": null,
      "sequence_number": 0,
      "secondary_sequence_number": 0
    }
  ]
}

Block Stats

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/block_stats

Returns aggregated block statistics

Query Parameters

NameTypeDescription

interval

string

Stats interval

period

integer

Stats period

{
  "time": "2021-02-18T06:00:00+00:00",
  "block_time_avg": 0,
  "blocks_count": 1,
  "validators_count": 1,
  "snarkers_count": 106,
  "jobs_count": 1,
  "jobs_amount": "10000",
  "transactions_count": 1,
  "transactions_amount": "400000000000",
  "payments_count": 0,
  "payments_amount": "0",
  "fee_transfers_count": 0,
  "fee_transfers_amount": "0",
  "coinbase_count": 1,
  "coinbase_amount": "400000000000"
}

Block Times

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/block_times

Returns the average block production time for N latest blocks.

Query Parameters

NameTypeDescription

limit

integer

Number of block to include in calculation

Validators

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/validators

Path Parameters

NameTypeDescription

string

Snarkers

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/snarkers

Path Parameters

NameTypeDescription

string

Validator stats

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/validators/{id}

Returns aggregated validator statistics

Query Parameters

NameTypeDescription

interval

string

Stats interval

period

integer

Stats period

{
  "time": "2021-03-05T21:00:00Z",
  "bucket": "h",
  "blocks_produced_count": 2,
  "delegations_count": 1,
  "delegations_amount": "22500000000000000"
}

Active delegations

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/delegations

Returns active delegations

Query Parameters

NameTypeDescription

public_key

string

Account public key

delegate

string

Delegate account public key

{
  "public_key": "B62qpawbpmboCYmenkXaCQuQDSKBR8PXkDw1MTjkZTUrRcVPLzd6Hnr",
  "delegate": "B62qjAW7anRhWx7P5ikiH1zRSEzoJsfFDyjBC7hKsXcGZb4RTmZJ2Yj",
  "balance": "20000000000000"
}

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/transactions

Returns transactions that match search input parameters.

Query Parameters

NameTypeDescription

height

integer

Block height. Can't be used with block_hash.

block_hash

string

Block hash.

account

string

Transaction sender or receiver.

sender

string

Sender public key.

receiver

string

Receiver public key.

type

string

Transaction type. Supports multiple comma-separate values.

memo

string

Transaction memo.

start_time

string

Period start time. Format YYYY-MM-DD.

end_time

string

Period end time. Format: YYYY-MM-DD

after_id

integer

Start transaction ID. Can't be used with before_id.

before_id

integer

End transaction ID. Can't be used with after_id.

limit

integer

Number of transactions to return

{
  "id": 58413,
  "hash": "CkpZfUe2CmkeXizqiup7hgM2zk2VAPkeY833976QfsSC95yiPVCA8",
  "type": "payment",
  "block_hash": "3NLF7dmJQpDaheV2KuTcAHXVuLjGorht25jhJN7uJTAPJvv5dWDS",
  "block_height": 1490,
  "time": "2021-03-05T21:46:08Z",
  "sender": "B62qjAW7anRhWx7P5ikiH1zRSEzoJsfFDyjBC7hKsXcGZb4RTmZJ2Yj",
  "receiver": "B62qokfNxSDJzYyyDQvqhCMAvURuSxoLxcjSNG92unBdNYt3nSXamsG",
  "amount": "1500000",
  "fee": "87923725",
  "nonce": 4063,
  "memo": "BeepBoop",
  "status": "failed",
  "failure_reason": "Amount_insufficient_to_create_account",
  "sequence_number": 121,
  "secondary_sequence_number": null
}

Transaction Details

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/transactions/{hash}

Returns transaction details

Path Parameters

NameTypeDescription

hash

string

Transaction hash

{
  "id": 58413,
  "hash": "CkpZfUe2CmkeXizqiup7hgM2zk2VAPkeY833976QfsSC95yiPVCA8",
  "type": "payment",
  "block_hash": "3NLF7dmJQpDaheV2KuTcAHXVuLjGorht25jhJN7uJTAPJvv5dWDS",
  "block_height": 1490,
  "time": "2021-03-05T21:46:08Z",
  "sender": "B62qjAW7anRhWx7P5ikiH1zRSEzoJsfFDyjBC7hKsXcGZb4RTmZJ2Yj",
  "receiver": "B62qokfNxSDJzYyyDQvqhCMAvURuSxoLxcjSNG92unBdNYt3nSXamsG",
  "amount": "1500000",
  "fee": "87923725",
  "nonce": 4063,
  "memo": "BeepBoop",
  "status": "failed",
  "failure_reason": "Amount_insufficient_to_create_account",
  "sequence_number": 121,
  "secondary_sequence_number": null
}

Account Details

GET https://mina--devnet--indexer.datahub.figment.io/apikey/YOURAPIKEY/accounts/{id}

Returns information about account

Path Parameters

NameTypeDescription

id

string

Account public key

{
  "public_key": "B62qmL7bWrMRuYr8hCT9p7L7jUho7oajSTohtFYSr8XYM3QoWyf8VL6",
  "delegate": null,
  "balance": "1941653020586758",
  "balance_unknown": "1941653020586758",
  "stake": "1941653020586758",
  "nonce": 0,
  "start_height": 5860,
  "start_time": "2021-02-09T11:51:00-06:00",
  "last_height": 7251,
  "last_time": "2021-02-21T12:06:00-06:00"
}

Last updated