Download OpenAPI specification:Download
This API is designed to enable clients to efficiently query information on the RadixDLT ledger, and allow clients to build and submit transactions to the network. It is designed for use by wallets and explorers.
This document is an API reference documentation, visit User Guide to learn more about different usage scenarios.
The Gateway API is implemented by the Network Gateway, which is configured to read from full node(s) to extract and index data from the network.
The Gateway API is split into 4 sub APIs:
/status/*
) - For status and configuration details for the Gateway / Network./transaction/*
) - For transaction construction, preview, submission, and monitoring the status of an individual transaction./transaction/*
) - For reading committed transactions./state/*
, /entity/*
and /non-fungible/*
) - For reading the current or past ledger state of the network.Interacting with this API effectively may require knowledge about the Radix Babylon Transaction Model and the State Model.
We share some very high-level details below, but please see the official documentation for more details on this.
User transactions are formed of a core "intent", which is then signed by 0+ signatories, before being notarized. The output is called a notarized payload. It is this notarized transaction payload which is submitted to the network.
For most users, this construction process will generally happen in their Radix Wallet. If you wish to construct transactions programmatically or offline, you will need to integrate the Radix Engine Toolkit into your application for construction and finalization.
Once submitted, a transaction payload can end up being either rejected or committed. Transactions get rejected if they fail to pass certain criteria at the given time. A transaction payload can be marked as a:
A given intent typically is only part of one submitted notarized payload, but it's possible for a notary to notarize and submit multiple payloads for the same intent. The Radix Engine ensures that any intent can only be committed once.
A committed transaction is either committed with an outcome of "Success" or "Failure":
Only committed transactions appear on ledger.
The gateway will attempt to submit your transaction to nodes on the network. If it gets temporarily rejected, the error message will be recorded against the transaction, but the Gateway will retry submission for a limited time. During this time, the status will be reported as pending.
The Radix Engine consists of "global entities". A global entity has a Bech32m Address, with a human-readable-prefix (and prefix byte) matching the entity type.
As an example, entities include concepts like Components, Packages, Vaults, Resource Managers and Key-Value Stores.
Each entity owns substates which store data, and these substates can own other entities. For example, an Account Component has a struct substate which owns a Key-Value Store. This Key-Value store has an entry for each resoure the Account owns, and each Key-Value Store Entry owns a corresponding Vault.
For each global entity, the Gateway aggregates its owned resources by looking at the contents of Vaults in the subtree of entities under that global entity.
The API is designed in a JSON-RPC-like style, using HTTP as a transport layer, which means that:
code
type
discriminator, allowing for structured error interpretation in client software.Collections can grow in size therefore every dynamic-length collection is a subject to pagination where a generic data struct is used to represent a chunk (page) of underlying data. Gateway API uses cursor-based pagination model where the sole existence of the cursor indicates that next chunk (page) of the underlying collection is available.
collection {
int64? total_count,
string? next_cursor,
string? previous_cursor,
T[] items
}
total_count
(optional) if present specifies the overall size of the underlying collection,next_cursor
(optional) if present indicates that the next chunk (page) exists and can be fetched using collection-specific endpoint and cursor value,previous_cursor
(optional) if present indicates that the previous chunk (page) exists and can be fetched using collection-specific endpoint and cursor value,items
a chunk (page) of unerlying collection items.Returns the Gateway API version, current ledger state and well-known network addresses.
Network Gateway Information
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "known_target": {
- "state_version": 0
}, - "release_info": {
- "release_version": "string",
- "open_api_schema_version": "string"
}, - "well_known_addresses": {
- "account_package": "string",
- "faucet": "string",
- "epoch_manager": "string",
- "clock": "string",
- "ecdsa_secp256k1": "string",
- "eddsa_ed25519": "string",
- "xrd": "string"
}
}
Returns information needed to construct a new transaction including current epoch
number.
Returns information needed to construct transaction.
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}
}
Previews transaction against the network.
This endpoint is effectively a proxy towards CoreApi's /v0/transaction/preview
endpoint. See CoreApi's documentation for more details.
Refer to #/components/schemas/TransactionPreviewRequest
of CoreApi for more details.
Successful Preview
Client-originated request error
{ }
{ }
Submits a signed transaction payload to the network.
Successful Submission
Client-originated request error
{- "notarized_transaction_hex": "string"
}
{- "duplicate": true
}
Returns the committed details and receipt of the transaction for a given transaction identifier.
Transaction identifiers which don't correspond to a committed transaction will return a TransactionNotFoundError
.
object or null (LedgerStateSelector) Optional. This allows for a request to be made against a historic state. If a constraint is specified, the Gateway will resolve the request against the ledger state at that time. If not specified, requests will be made with respect to the top of the committed ledger. | |
required | object (TransactionCommittedDetailsRequestIdentifier) |
Transaction Status
Client-originated request error
{- "transaction_identifier": {
- "type": "payload_hash",
- "value_hex": "<transaction-payload-hash>"
}
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "transaction": {
- "state_version": 0,
- "transaction_status": "unknown",
- "payload_hash_hex": "string",
- "intent_hash_hex": "string",
- "fee_paid": {
- "value": "string",
- "address": "string"
}, - "confirmed_at": "2019-08-24T14:15:22Z",
- "error_message": "string"
}, - "details": {
- "raw_hex": "string",
- "receipt": { },
- "referenced_global_entities": [
- "string"
], - "message_hex": "string"
}
}
Returns overall transaction status and all of its known payloads based on supplied intent hash.
Transaction Status
Client-originated request error
{- "intent_hash_hex": "<transaction-intent-hash>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "status": "unknown",
- "known_payloads": [
- {
- "payload_hash_hex": "string",
- "status": "unknown",
- "error_message": "string"
}
], - "error_message": "string"
}
Returns user-initiated transactions which have been committed to the ledger. The returned response is in a paginated format, ordered by most recently committed.
Recent Transactions (paginated)
Client-originated request error
{- "limit": 5
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "state_version": 0,
- "transaction_status": "unknown",
- "payload_hash_hex": "string",
- "intent_hash_hex": "string",
- "fee_paid": {
- "value": "string",
- "address": "string"
}, - "confirmed_at": "2019-08-24T14:15:22Z",
- "error_message": "string"
}
]
}
Returns basic information (incomplete metadata) for a given collection of entities. This endpoint is intended to be used for populating screens which contain a small bit of information about multiple entities.
Entities Overview
Client-originated request error
{- "addresses": [
- "<entity-address>"
]
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "entities": [
- {
- "address": "string",
- "metadata": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "key": "string",
- "value": "string"
}
]
}
}
]
}
Returns detailed information for a single entity.
Entity Details
Client-originated request error
{- "address": "<entity-address>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "metadata": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "key": "string",
- "value": "string"
}
]
}, - "details": {
- "discriminator": "fungible_resource",
- "access_rules_chain": { },
- "vault_access_rules_chain": { },
- "divisibility": 0,
- "total_supply": "string",
- "total_minted": "string",
- "total_burnt": "string"
}
}
Returns the total amount of each fungible and non-fungible resources owned by a given global entity.
The response for fungibles and non-fungibles is paginated, and only the first page of each is returned.
The returned lists are ordered by the resource's first appearance on the ledger.
For further pages, use the entity/fungibles
and entity/non-fungibles
endpoints.
To get the owned non-fungible ids (instead of just the amount), use the entity/non-fungible-ids
endpoint.
Entity Resources
Client-originated request error
{- "address": "<component-entity-address>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "fungible_resources": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "address": "string",
- "amount": {
- "value": "string",
- "address": "string"
}
}
]
}, - "non_fungible_resources": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "address": "string",
- "amount": 0
}
]
}
}
Returns all the metadata properties associated with a given global entity. The returned response is in a paginated format, ordered by first appearance on the ledger.
Entity Metadata (paginated)
Client-originated request error
{- "address": "<entity-address>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "metadata": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "key": "string",
- "value": "string"
}
]
}
}
Returns the total amount of each fungible resource owned by a given global entity. The returned response is in a paginated format, ordered by the resource's first appearance on the ledger.
Entity Fungibles (paginated)
Client-originated request error
{- "address": "<component-entity-address>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "fungibles": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "address": "string",
- "amount": {
- "value": "string",
- "address": "string"
}
}
]
}
}
Returns the total amount of each non-fungible resource owned by a given global entity. The returned response is in a paginated format, ordered by the resource's first appearance on the ledger.
Entity Non-Fungibles (paginated)
Client-originated request error
{- "address": "<component-entity-address>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "non_fungibles": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "address": "string",
- "amount": 0
}
]
}
}
Returns all non-fungible IDs of a given non-fungible resource owned by a given entity. The returned response is in a paginated format, ordered by the resource's first appearence on the ledger.
Entity Non-Fungible IDs (paginated)
Client-originated request error
{- "address": "<component-entity-address>",
- "resource_address": "<non-fungible-resource-entity-address>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "resource_address": "string",
- "non_fungible_ids": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "non_fungible_id": "string"
}
]
}
}
Returns the non-fungible IDs of a given non-fungible resource. Returned response is in a paginated format, ordered by their first appearance on the ledger.
Non-Fungible IDs (paginated)
Client-originated request error
{- "address": "<non-fungible-entity-address>"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "non_fungible_ids": {
- "total_count": 0,
- "previous_cursor": "string",
- "next_cursor": "string",
- "items": [
- {
- "non_fungible_id": "string"
}
]
}
}
Returns data associated with a given non-fungible ID of a given non-fungible resource.
Non-Fungible ID Data
Client-originated request error
{- "address": "<non-fungible-entity-address>",
- "non_fungible_id": "0a0100000000"
}
{- "ledger_state": {
- "network": "string",
- "state_version": 0,
- "proposer_round_timestamp": "string",
- "epoch": 0,
- "round": 0
}, - "address": "string",
- "non_fungible_id_type": "string",
- "non_fungible_id": "string",
- "mutable_data_hex": "string",
- "immutable_data_hex": "string"
}