Chain Explorer API
Overview
Liberland is running a chain indexer & explorer with publicly available GraphQL API. This API allows fetching & filtering historical information about the chain, especially data about past events and extrinsics (transactions).
For interacting with the API, you can use one of many GraphQL clients or run raw HTTP queries.
Endpoints & reference docs
API & GraphQL Playground endpoints:
Liberland Mainnet: https://archive.mainnet.liberland.org/
Bastiat (Liberland Testnet): https://archive.testchain.liberland.org/graphql
Visit the Playground to see up-to-date reference schema and docs.
Paging
Queries can use first
param to limit the amount of returned entries and after
param to get next page of data. Use hasNextPage
and endCursor
values of pageInfo
entity to populate them. You can also use totalCount
value to know total number of entries.
Entities
assetTransfer
assetTransfer
All transfers of any pallet-assets-based assets. Includes LLM (which is asset 1
), but not LLD. Contains following values:
id
- unique identifier of this transfer - based onblockNumber
andeventIndex
asset
- ID of the asset being transferred. See list of assets on Polkadot.js Apps.fromId
- Address of the account that sent the assettoId
- Address of the account that received the assetvalue
- Amount of the asset transferred. Subject to decimals config of given asset (so value1000000000000
for LLM asset means1 LLM
)blockId
- Hash of the block containing this transferblockNumber
- Number of the block containing this transferextrinsicIndex
- Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.eventIndex
- Index of the transfer event in the block.block
- Additional details about the block, including timestamp.
merit
merit
All transfers of the LLM token. Contains following values:
id
- unique identifier of this transfer - based onblockNumber
andeventIndex
fromId
- Address of the account that sent the assettoId
- Address of the account that received the assetvalue
- Amount of the asset transferred. Subject to decimals config of given asset (so value1000000000000
for LLM asset means1 LLM
)blockId
- Hash of the block containing this transferblockNumber
- Number of the block containing this transferextrinsicIndex
- Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.eventIndex
- Index of the transfer event in the block.block
- Additional details about the block, including timestamp.
transfer
transfer
All transfers of the LLD token. Doesn't include actions like staking or transaction fees. Contains following values:
id
- unique identifier of this transfer - based onblockNumber
andeventIndex
fromId
- Address of the account that sent the assettoId
- Address of the account that received the assetvalue
- Amount of the asset transferred. Subject to decimals (so value1000000000000
for means1 LLD
)blockId
- Hash of the block containing this transferblockNumber
- Number of the block containing this transferextrinsicIndex
- Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.eventIndex
- Index of the transfer event in the block.block
- Additional details about the block, including timestamp.
staking
staking
LLD staking events. Contains following values:
id
- unique identifier of this staking event - based onblockNumber
andeventIndex
userId
- Address of the account that this event refers tovalue
- Amount of the asset transferred. Subject to decimals (so value1000000000000
for means1 LLD
)method
- Method that triggered this event. Possible values:Bonded
- User staked LLDWithdrawn
- User unstaked LLDRewarded
- User got rewarded with interest
blockId
- Hash of the block containing this transferblockNumber
- Number of the block containing this transferextrinsicIndex
- Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.eventIndex
- Index of the transfer event in the block.block
- Additional details about the block, including timestamp.
Sample GraphQL queries
Fetching LLD transfers of given user
Includes paging, fetches 50 entries per page.
Sample raw queries
Fetching LLD transfers of a given user
URL: https://archive.mainnet.liberland.org/
Method: POST
Payload:
To fetch next page, pass endCursor
from previous call as cursor
variable.
Fetching LLD transfers of a given user since block number
URL: https://archive.mainnet.liberland.org/
Method: POST
Payload:
To fetch next page, pass endCursor
from previous call as cursor
variable.
Fetching LLM transfers of a given user
URL: https://archive.mainnet.liberland.org/
Method: POST
Payload:
To fetch next page, pass endCursor
from previous call as cursor
variable.
Fetching asset transfers of a given user
URL: https://archive.mainnet.liberland.org/
Method: POST
Payload:
To fetch next page, pass endCursor
from previous call as cursor
variable.
Fetching staking events of a given user
URL: https://archive.mainnet.liberland.org/
Method: POST
Payload:
To fetch next page, pass endCursor
from previous call as cursor
variable.
Last updated