Skip to main content
v1.0.0
OAS 3.0.3

Qubic Query API

API for querying historical Qubic ledger data.

Server:https://rpc.qubic.org/query/v1
Client Libraries

Archive

Archive processing status and coverage information.

Get Last Processed Tick

Get the last processed tick and other processing information from the archive. All data queried from the archive is only fully processed up to this tick. Before calling the service you should check the last processed tick to be sure to get valid data and do not request data for future ticks that are not processed yet. You can use the epoch and initial tick information in the response to switch to a new interval.

Responses
  • 200
    Type: object · GetLastProcessedTickResponse

    GetLastProcessedTickResponse

    • epoch
      Type: integerFormat: uint32

      The epoch the last processed tick is in.

    • intervalInitialTick
      Type: integerFormat: uint32

      The initial tick of the current tick interval.

    • tickNumber
      Type: integerFormat: uint32

      The last processed tick that is available in the archive.

Request Example for get/getLastProcessedTick
curl https://rpc.qubic.org/query/v1/getLastProcessedTick
{
  "tickNumber": 1,
  "epoch": 1,
  "intervalInitialTick": 1
}

Get Processed Tick Intervals

Get the tick intervals that are available in the archive. A new tick interval is typically created on epoch change or network restart within the epoch. Use this endpoint to skip the tick numbers that are not part of the intervals. This endpoint is only necessary for users that need to process all available ticks. For most users it is enough to switch to a new interval by using the get last processed tick endpoint.

Responses
  • 200
    Type: object · GetProcessedTickIntervalsResponse

    GetProcessedTickIntervalsResponse

    • processedTickIntervals
      Type: array object[] · ProcessedTickInterval[]

      A list of tick intervals that were processed.

      ProcessedTickInterval

Request Example for get/getProcessedTickIntervals
curl https://rpc.qubic.org/query/v1/getProcessedTickIntervals
{
  "processedTickIntervals": [
    {
      "epoch": 1,
      "firstTick": 1,
      "lastTick": 1
    }
  ]
}

Network

Network status and computor information.

Get Epoch Computors

Get the list(s) of computors for one epoch. These are the computors (IDs signed by the arbitrator) that are allowed to make quorum decisions. It is possible that this list changes within the epoch in case of arbitrator intervention.

Body
required
application/json

GetComputorListsForEpochRequest

  • epoch
    Type: integerFormat: uint32

    The epoch number to get the computor lists for.

Responses
  • 200
    Type: object · GetComputorListsForEpochResponse

    GetComputorListsForEpochResponse

    • computorsLists
      Type: array object[] · ComputorList[]

      The lists of computors that voted in this epoch.

      ComputorList

Request Example for post/getComputorListsForEpoch
curl https://rpc.qubic.org/query/v1/getComputorListsForEpoch \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "epoch": 1
}'
{
  "computorsLists": [
    {
      "epoch": 1,
      "tickNumber": 1,
      "identities": [
        "string"
      ],
      "signature": "string"
    }
  ]
}

Ticks

Query tick data from the archive.

Ticks Operations

Get Tick Data

Get the tick data for one tick.

Body
required
application/json

GetTickDataRequest

  • tickNumber
    Type: integerFormat: uint32

    The number of tick the tick data is requested for.

Responses
  • 200
    Type: object · GetTickDataResponse

    GetTickDataResponse

    • tickData
      Type: object · TickData

      TickData

Request Example for post/getTickData
curl https://rpc.qubic.org/query/v1/getTickData \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "tickNumber": 1
}'
{
  "tickData": {
    "tickNumber": 1,
    "epoch": 1,
    "computorIndex": 1,
    "timestamp": "string",
    "varStruct": "string",
    "timeLock": "string",
    "transactionHashes": [
      "string"
    ],
    "contractFees": [
      "string"
    ],
    "signature": "string"
  }
}

Transactions

Search and retrieve transaction history.

Get Transaction By Hash

Get a single transaction by its hash.

Body
required
application/json

GetTransactionByHashRequest

  • hash
    Type: string

    The hash of the transaction.

Responses
  • 200
    Type: object · GetTransactionByHashResponse

    GetTransactionByHashResponse

    • transaction
      Type: object · Transaction

      Transaction

Request Example for post/getTransactionByHash
curl https://rpc.qubic.org/query/v1/getTransactionByHash \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "hash": ""
}'
{
  "transaction": {
    "hash": "string",
    "amount": "string",
    "source": "string",
    "destination": "string",
    "tickNumber": 1,
    "timestamp": "string",
    "inputType": 1,
    "inputSize": 1,
    "inputData": "string",
    "signature": "string",
    "moneyFlew": true
  }
}

Get Transactions For Identity

Get the transactions for one identity sorted by tick number descending.

Request structure

Name Type Necessity Description
identity string required 60 characters uppercase identity.
filters map<string,string> optional Filters that restrict results to single value.
ranges map<string,Range> optional Filters that restrict results to a value range.
pagination Pagination optional Allows to specify the first record and the number of records to be retrieved.

Without filters and ranges all transactions from and to that identity ordered by tick number descending are returned.

Filters

Filters restrict the results by single values.

Allowed properties

Name Type Format Description
source string 60 character identity, up to 5, comma separated. Only find transactions that were sent from the specified identities.
source-exclude string 60 character identity, up to 5, comma separated. Only find transactions that were not sent from the specified identities.
destination string 60 character identity, up to 5, comma separated. Only find transactions that were sent to the specified identities.
destination-exclude string 60 character identity, up to 5, comma separated. Only find transactions that were not sent to the specified identities.
amount string Numeric Only find transactions with the specified amount.
inputType string Numeric Only find transactions with the specified input type.
tickNumber string Numeric Only find transactions with the specified tick number.

sourceandsource-exclude are mutually exclusive. destination and destination-exclude are mutually exclusive.

Examples

"source": "IIJHZSNPDRYYXCQBWNGKBSWYYDCARTYPOBXGOXZEVEZMMWYHPBVXZLJARRCB",
"destination": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFXIB"
"amount": "1000000"
"inputType": "0"

Ranges

Ranges restrict the results by a range of values. On range per property is supported.

Allowed properties

Name Type Format Description
amount string Numeric Only find transactions in amount range.
tickNumber string Numeric Only find transactions in tick range.
inputType string Numeric Only find transactions in input type range.
timestamp string Numeric (Unix Timestamp in milliseconds) Only find transactions in time range.

Range definition

A range with size of 0 or 1 is not allowed.

Name Type Necessity Description
field string required Name of the field you wish to search for.
gt string optional Greater than.
gte string optional Greater than or equal to.
lt string optional Less than.
lte string optional Less than or equal to.

Only one lower bound and one upper bound can be specified.

Examples

"amount": { "gt": "1000000" }
"tickNumber": { "gte": "25563000", "lte": "28300000" }
"inputType": { "gt": "0" }
"timestamp": { "lt": "1757376000000" }

Pagination

Name Type Necessity Description
offset uint32 optional The offset of the first record to return. Defaults to zero (first record). Maximum offset is 10000.
size uint32 optional Defaults to 10. Maximum size is 1000. Zero value is ignored (uses default).
Body
required
application/json

GetTransactionsForIdentityRequest

  • filters
    Type: object

    Filters restrict the results by single values.

  • identity
    Type: string

    The identity to get the transactions for. Incoming and outgoing transactions are queried by default.

  • pagination
    Type: object · Pagination

    The number of maximum results (offset + size) is limited to 10000.

  • ranges
    Type: object

    Ranges restrict the results by a maximum and minimum value.

Responses
  • 200
    Type: object · GetTransactionsForIdentityResponse

    GetTransactionsForIdentityResponse

    • hits
      Type: object · Hits

      Provides information about the number of results.

    • transactions
      Type: array object[] · Transaction[]

      List of transactions that matched the search criteria.

      Transaction

    • validForTick
      Type: integerFormat: uint32

      The response is valid for this tick number.

Request Example for post/getTransactionsForIdentity
curl https://rpc.qubic.org/query/v1/getTransactionsForIdentity \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "identity": "AFZPUAIYVPNUYGJRQVLUKOPPVLHAZQTGLYAAUUNBXFTVTAMSBKQBLEIEPCVJ",
  "filters": {
    "destination": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFXIB",
    "inputType": "0"
  },
  "ranges": {
    "amount": {
      "gte": "1000000000"
    }
  },
  "pagination": {
    "offset": 0,
    "size": 10
  }
}'
{
  "validForTick": 1,
  "hits": {
    "total": 1,
    "from": 1,
    "size": 1
  },
  "transactions": [
    {
      "hash": "string",
      "amount": "string",
      "source": "string",
      "destination": "string",
      "tickNumber": 1,
      "timestamp": "string",
      "inputType": 1,
      "inputSize": 1,
      "inputData": "string",
      "signature": "string",
      "moneyFlew": true
    }
  ]
}

Get Transactions For Tick

Get the transactions that are in included in one tick.

Request structure

Name Type Necessity Description
identity string required 60 characters uppercase identity.
filters map<string,string> optional Filters that restrict results to single value.
ranges map<string,Range> optional Filters that restrict results to a value range.

Filters

Filters restrict the results by single values.

Allowed properties

Name Type Format Description
source string 60 character identity Only find transactions that were sent from the specified identities.
destination string 60 character identity Only find transactions that were sent to the specified identities.
amount string Numeric Only find transactions with the specified amount.
inputType string Numeric Only find transactions with the specified input type.

Ranges

Ranges restrict the results by a range of values. On range per property is supported.

Allowed properties

Name Type Format Description
amount string Numeric Only find transactions in amount range.
inputType string Numeric Only find transactions in input type range.

Range definition

A range with size of 0 or 1 is not allowed.

Name Type Necessity Description
field string required Name of the field you wish to search for.
gt string optional Greater than.
gte string optional Greater than or equal to.
lt string optional Less than.
lte string optional Less than or equal to.

Only one lower bound and one upper bound can be specified.

For examples how to use filters and ranges see the GetTransactionsForIdentity endpoint documentation.

Body
required
application/json

GetTransactionsForTickRequest

  • filters
    Type: object

    Filters restrict the results by single values. Allowed: source, destination, amount, inputType

  • ranges
    Type: object

    Ranges restrict the results by a maximum and minimum value. Allowed: amount, inputType

  • tickNumber
    Type: integerFormat: uint32

    The tick number to get the transactions for.

Responses
  • 200
    Type: object · GetTransactionsForTickResponse

    GetTransactionsForTickResponse

    • transactions
      Type: array object[] · Transaction[]

      The transactions for the requested tick number.

      Transaction

Request Example for post/getTransactionsForTick
curl https://rpc.qubic.org/query/v1/getTransactionsForTick \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "tickNumber": 42977140,
  "filters": {
    "destination": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFXIB"
  },
  "ranges": {
    "amount": {
      "gte": "1"
    }
  }
}'
{
  "transactions": [
    {
      "hash": "string",
      "amount": "string",
      "source": "string",
      "destination": "string",
      "tickNumber": 1,
      "timestamp": "string",
      "inputType": 1,
      "inputSize": 1,
      "inputData": "string",
      "signature": "string",
      "moneyFlew": true
    }
  ]
}