description |
---|
The mirror node REST API offers the ability to query transaction information. |
Hedera Mirror Nodes store the history of transactions that occurred on mainnet, testnet, and previewnet. Each transaction generates a record that is stored in a record file. The transaction contents can be accessed by the mirror node Rest APIs
To make a request, use the network endpoint and the Rest API of choice. For example, to get a list of transactions on mainnet you would make the following request.
{% embed url="https://mainnet-public.mirrornode.hedera.com/api/v1/transactions" %}
You can also view the Hedera Mirror Node Swagger UI documentation where you can submit requests and view responses for previewnet, testnet, and mainnet.
{% embed url="https://testnet.mirrornode.hedera.com/api/v1/docs#/" %}
{% hint style="info" %}
MAINNET
https://mainnet-public.mirrornode.hedera.com
TESTNET
https://testnet.mirrornode.hedera.com
PREVIEWNET
https://previewnet.mirrornode.hedera.com
You may also check out DragonGlass and Kabuto as alternatives. {% endhint %}
{% hint style="warning" %} Public mainnet mirror node requests are throttled at 100 requests per second (rps). This may change in the future depending upon performance or security considerations. At this time, no authentication is required. {% endhint %}
The accounts object represents the information associated with an account and returns a list of account information.
Account IDs take the following format: 0.0.<account number>.
Example: 0.0.1000
Account IDs can also take the account number as an input value. For example, for account ID 0.0.1000, the number 1000 can be specified in the request.
{% swagger baseUrl="" path=" /api/v1/accounts" method="get" summary="accounts" %} {% swagger-description %} Returns a list of all account entity items on the network {% endswagger-description %}
{% swagger-parameter in="query" name="account.id" type="string" required="false" %} The ID of the account to return account information for {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.balance" type="number" required="false" %} Returns a list of account IDs that have the specified balance {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.publickey" type="string" required="false" %} Returns the account information for the specified public key {% endswagger-parameter %}
{% swagger-parameter in="query" name="balance" type="boolean" required="false" %} Whether to include balance information or not
\
Default value
: true {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The limit of items to return
\
Default value
: 25 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : asc {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
{
"account":"0.0.1",
"auto_renew_period":null,
"balance":{
"balance":0,
"timestamp":"1631864700.327170000",
"tokens":[
]
},
"deleted":null,
"expiry_timestamp":null,
"key":null,
"max_automatic_token_associations":null,
"memo":null,
"receiver_sig_required":null
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
account | The ID of the account |
auto renew period | The period in which the account will auto renew |
balance | The timestamp and account balance of the account |
tokens | The tokens and their balances associated to the specified account |
deleted | Whether the account was deleted or not (Boolean) |
expiry timestamp | The expiry date for the entity as set by a create or update transaction |
key | The public key associated with the account |
max_automatic_token_associations | The number of automatic token associations, if any |
memo | The account memo, if any |
receiver_sig_required | Whether or not the account requires a signature to receive a transfer into the account |
links.next | Hyperlink to the next page of results |
Operator | Example | Description |
---|---|---|
lt (less than) |
/api/v1/accounts?account.id=lt:0.0.1000 |
Returns account IDs less then 1000 |
lte (less than or equal to) |
/api/v1/accounts?account.id=lte:0.0.1000 |
Returns account IDs less than or equal to 1000 |
gt (greater than) |
/api/v1/accounts?account.id=gt:0.0.1000 |
Returns account IDs greater than 1000 |
gte (greater than or equal to) |
/api/v1/accounts?account.id=gte:0.0.1000 |
Returns account IDs greater than or equal to 1000 |
order (order asc or desc values) |
|
Returns account information in ascending order Returns account information in descending order |
Example Requests | Description |
---|---|
/api/v1/accounts?account.id=0.0.1001 |
Returns the account information of account 1001 |
/api/v1/accounts?account.balance=gt:1000 |
Returns all account information that have a balance greater than 1000 tinybars |
/api/v1/accounts?account.publickey=2b60955bcbf0cf5e9ea880b52e5b63f664b08edf6ed 15e301049517438d61864 |
Returns all account information for 2b60955bcbf0cf5e9ea880b52e5b63f664b08edf6ed15e301049517438d61864 public key |
/api/v1/accounts/2?transactionType=cryptotransfer |
Returns the crypto transfer transactions for account 2. |
{% swagger method="get" path="/api/v1/accounts/{AccountIdorAccountAlias}" baseUrl="" summary="account by account ID" %} {% swagger-description %} Return the account transactions and balance information given an account ID or the account alias. {% endswagger-description %}
{% swagger-parameter in="path" name="AccountIdorAccountAlias" type="String" required="true" %} The ID of the account in 0.0.accountNumber format or 0.0.accountAlias format. {% endswagger-parameter %}
{% swagger-parameter in="query" name="transactiontype" type="String" required="false" %} Available values
: CONSENSUSCREATETOPIC, CONSENSUSDELETETOPIC, CONSENSUSSUBMITMESSAGE, CONSENSUSUPDATETOPIC, CONTRACTCALL, CONTRACTCREATEINSTANCE, CONTRACTDELETEINSTANCE, CONTRACTUPDATEINSTANCE, CRYPTOADDLIVEHASH, CRYPTOCREATEACCOUNT, CRYPTODELETE, CRYPTODELETELIVEHASH, CRYPTOTRANSFER, CRYPTOUPDATEACCOUNT, FILEAPPEND, FILECREATE, FILEDELETE, FILEUPDATE, FREEZE, SCHEDULECREATE, SCHEDULEDELETE, SCHEDULESIGN, SYSTEMDELETE, SYSTEMUNDELETE, TOKENASSOCIATE, TOKENBURN, TOKENCREATION, TOKENDELETION, TOKENDISSOCIATE, TOKENFEESCHEDULEUPDATE, TOKENFREEZE, TOKENGRANTKYC, TOKENMINT, TOKENPAUSE, TOKENREVOKEKYC, TOKENUNFREEZE, TOKENUNPAUSE, TOKENUPDATE, TOKENWIPE, UNCHECKEDSUBMIT_Available values_ : CONSENSUSCREATETOPIC, CONSENSUSDELETETOPIC, CONSENSUSSUBMITMESSAGE, CONSENSUSUPDATETOPIC, CONTRACTCALL, CONTRACTCREATEINSTANCE, CONTRACTDELETEINSTANCE, CONTRACTUPDATEINSTANCE, CRYPTOADDLIVEHASH, CRYPTOAPPROVEALLOWANCE, CRYPTOCREATEACCOUNT, CRYPTODELETE, CRYPTODELETEALLOWANCE, CRYPTODELETELIVEHASH, CRYPTOTRANSFER, CRYPTOUPDATEACCOUNT, FILEAPPEND, FILECREATE, FILEDELETE, FILEUPDATE, FREEZE, SCHEDULECREATE, SCHEDULEDELETE, SCHEDULESIGN, SYSTEMDELETE, SYSTEMUNDELETE, TOKENASSOCIATE, TOKENBURN, TOKENCREATION, TOKENDELETION, TOKENDISSOCIATE, TOKENFEESCHEDULEUPDATE, TOKENFREEZE, TOKENGRANTKYC, TOKENMINT, TOKENPAUSE, TOKENREVOKEKYC, TOKENUNFREEZE, TOKENUNPAUSE, TOKENUPDATE, TOKENWIPE, UNCHECKEDSUBMIT {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"transactions": [
{
"bytes": null,
"charged_tx_fee": 7,
"consensus_timestamp": "1234567890.000000007",
"entity_id": "0.0.2281979",
"max_fee": 33,
"memo_base64": null,
"name": "CRYPTOTRANSFER",
"node": "0.0.3",
"nonce": 0,
"parent_consensus_timestamp": "1234567890.000000007",
"result": "SUCCESS",
"scheduled": false,
"transaction_hash": "vigzKe2J7fv4ktHBbNTSzQmKq7Lzdq1/lJMmHT+a2KgvdhAuadlvS4eKeqKjIRmW",
"transaction_id": "0.0.8-1234567890-000000006",
"token_transfers": [
{
"token_id": "0.0.90000",
"account": "0.0.9",
"amount": 1200,
"is_approval": false
},
{
"token_id": "0.0.90000",
"account": "0.0.8",
"amount": -1200,
"is_approval": false
}
],
"transfers": [
{
"account": "0.0.3",
"amount": 2,
"is_approval": false
},
{
"account": "0.0.8",
"amount": -3,
"is_approval": false
},
{
"account": "0.0.98",
"amount": 1,
"is_approval": false
}
],
"valid_duration_seconds": 11,
"valid_start_timestamp": "1234567890.000000006"
}
],
"balance": {
"timestamp": "0.000002345",
"balance": 80,
"tokens": [
{
"token_id": "0.0.200001",
"balance": 8
}
]
},
"account": "0.1.2",
"alias": "HIQQEXWKW53RKN4W6XXC4Q232SYNZ3SZANVZZSUME5B5PRGXL663UAQA",
"expiry_timestamp": "1586567700.453054000",
"auto_renew_period": "string",
"key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"deleted": true,
"max_automatic_token_associations": 0,
"memo": "string",
"receiver_sig_required": true,
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/accounts/{accountId}/nfts" baseUrl="" summary="NFTs by account ID" %} {% swagger-description %} Specify the account ID or account alias you would like to return the NFTs for. Please reference this
for additional filtering guidelines. {% endswagger-description %}
{% swagger-parameter in="query" name="token.id" type="String" required="false" %} The ID of the token to return information for {% endswagger-parameter %}
{% swagger-parameter in="query" name="serialNumber" type="String" required="false" %} The nft serial number (64 bit type). Requires a tokenId value also be populated. {% endswagger-parameter %}
{% swagger-parameter in="path" name="accountAliasOrAccountId" required="true" %} The account ID or account alias (0.0.accountNum or 0.0.accountAlias) {% endswagger-parameter %}
{% swagger-parameter in="query" name="spender.id" %} The account ID of the spender to return information for {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The maximum number of items to return.
Default: 25 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : desc
Example : asc\ {% endswagger-parameter %}
{% swagger-response status="200: OK" description="NFTs for account 0.0.5" %}
{
"nfts": [
{
"account_id": "0.0.5",
"created_timestamp": "1234567890.000000001",
"deleted": false,
"metadata": "VGhpcyBpcyBhIHRlc3QgTkZU",
"modified_timestamp": "1610682445.003266001",
"serial_number": 124,
"token_id": "0.0.222"
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/accounts/{accountAliasOrAccountId}/allowances/crypto" baseUrl="" summary="Hbar allowances for an account" %} {% swagger-description %} Returns hbar allowances for an account. {% endswagger-description %}
{% swagger-parameter in="path" name="accountAliasOrAccountId" required="true" %} The account ID or account alias to return the hbar allowances for. {% endswagger-parameter %}
{% swagger-parameter in="query" name="spender.id" required="false" %} The ID of the spender to return information for. {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The maximum number of items to return
Default value : 25
Example : 2 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : desc {% endswagger-parameter %}
{% swagger-response status="200: OK" description="The hbar allowances returned for account 0.0.1000." %}
{
{
"allowances": [
{
"amount_granted": 10,
"owner": "0.0.1000",
"spender": "0.0.8488",
"timestamp": {
"from": "1633466229.96874612",
"to": "1633466568.31556926"
}
},
{
"amount_granted": 5,
"owner": "0.0.1000",
"spender": "0.0.9857",
"timestamp": {
"from": "1633466229.96874612",
"to": null
}
}
],
"links": {}
}
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/accounts/{accountAliasOrAccountId}/allowances/tokens" baseUrl="" summary="Fungible token allowances for an account" %} {% swagger-description %} Returns information for fungible token allowances for an account. Please refer to
document regarding filtering restrictions. {% endswagger-description %}
{% swagger-parameter in="path" name="accountAliasOrAccountId" type="String" required="true" %} Account ID or account alias to return the fungible token allowances for. {% endswagger-parameter %}
{% swagger-parameter in="query" name="spender.id" type="String" required="false" %} The ID of the spender to return information for. {% endswagger-parameter %}
{% swagger-parameter in="query" name="token.id" type="String" required="false" %} The ID of the token to return information for. {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The maximum number of items to return
Default value : 25
Example : 2 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : asc
Example : desc {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"allowances": [
{
"amount_granted": 100,
"owner": "0.1.2",
"spender": "0.1.2",
"timestamp": {
"from": "1586567700.453054000",
"to": "1586567700.453054000"
},
"token_id": "0.1.2"
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
The balance object represents the balance of accounts on the Hedera network. You can retrieve this to view the most recent balance of all the accounts on the network at that given time. The balances object returns the account ID and the balance in hbars. Balances are checked on a periodic basis and thus return the most recent snapshot of time captured prior to the request.
{% swagger baseUrl="" path=" /api/v1/balances" method="get" summary="account balances" %} {% swagger-description %} Returns a timestamped list of account balances on the network. Balances for an account are updated every 15 minutes. You can refer to the timestamp for when the balance was last updated for the account. If you need to return the balance of an account more frequently you can do so by using the free account balance query via the SDK. {% endswagger-description %}
{% swagger-parameter in="query" name="account.id" type="String" required="false" %} The ID of the account to return the balance for {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.balance" type="String" required="false" %} Returns a list of account IDs that have the specified balance (tinybars) {% endswagger-parameter %}
{% swagger-parameter in="query" name="timestamp" type="array[string]" required="false" %} The timestamp the user would like to return account balances for. The timestamp can be provided in seconds format (15000000000) or in seconds.nanoseconds (15000000000.010000000). {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.publickey" type="String" required="false" %} The account's public key to compare against
Example : 3c3d546321ff6f63d701d2ec5c277095874e19f4a235bee1e6bb19258bf362be {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The limit of items to return
Default value : 25 {% endswagger-parameter %}
{% swagger-response status="200" description="The balance for account 0.0.2004" %}
{
"timestamp": "1602804267.903201001",
"balances": [
{
"account": "0.0.2004",
"balance": 10000000,
"tokens": [
{
"token_id": "0.0.2003",
"balance": 2350
}
]
}
],
"links": {
"next": "/api/v1/balances?limit=1&account.id=lt:0.0.2004"
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
timestamp | The seconds.nanoseconds of the timestamp at which the list of balances for each account are returned |
balances | List of balances for each account |
account | The ID of the account |
balance | The balance of the account |
tokens | The tokens that are associated to this account |
tokens.token_id | The ID of the token associated to this account |
tokens.balance | The token balance for the specified token associated to this account |
links.next | Hyperlink to the next page of results |
Operator | Example | Description |
---|---|---|
lt (less than) |
/api/v1/balances?account.id=lt:0.0.1000 |
Returns the balances of account IDs less than 1,000 |
lte (less than or equal to) |
/api/v1/balances?account.id=lte:0.0.1000 |
Returns the balances account IDs less than or equal to 1,000 |
gt (greater than) |
/api/v1/balances?account.id=gt:0.0.1000 |
Returns the balances of account IDs greater than to 1,000 |
gte (greater than or equal to) |
/api/v1/balances?account.id=gte:0.0.1000 |
Returns the balances of account IDs greater than or equal to 1,000 |
order (order asc or desc values) |
|
Lists balances in ascending order Lists balances in descending order |
Example Requests | Description |
---|---|
/api/v1/balances?account.id=0.0.1000 |
Returns balance for account ID 1,000 |
/api/v1/balances?account.balance=gt:1000 |
Returns all account IDs that have a balance greater than 1000 tinybars |
/api/v1/balances?timestamp=1566562500.040961001 |
Returns all account balances referencing the latest snapshot that occurred prior to 1566562500 seconds and 040961001 nanoseconds |
/api/v1/balances?account.publickey=2b60955bcbf0cf5e9ea880b52e5b6 3f664b08edf6ed15e301049517438d61864 |
Returns balance information for 2b60955bcbf0cf5e9ea880b52e5b63f664b08edf6ed 15e301049517438d61864 public key |
The transaction object represents the transactions processed on the Hedera network. You can retrieve this to view the transaction metadata information including transaction id, timestamp, transaction fee, transfer list, etc. If a transaction was submitted to multiple nodes, the successful transaction and duplicate transaction(s) will be returned as separate entries in the response with the same transaction ID. Duplicate transactions will still be assessed network fees.
{% swagger baseUrl="" path="/api/v1/transactions" method="get" summary="transactions" %} {% swagger-description %} Lists transactions on the network. This includes successful and unsuccessful transactions. {% endswagger-description %}
{% swagger-parameter in="query" name="transactionType" type="String" required="false" %} Filter transactions by transaction type.
Available values
: CONSENSUSCREATETOPIC, CONSENSUSDELETETOPIC, CONSENSUSSUBMITMESSAGE, CONSENSUSUPDATETOPIC, CONTRACTCALL, CONTRACTCREATEINSTANCE, CONTRACTDELETEINSTANCE, CONTRACTUPDATEINSTANCE, CRYPTOADDLIVEHASH, CRYPTOCREATEACCOUNT, CRYPTODELETE, CRYPTODELETELIVEHASH, CRYPTOTRANSFER, CRYPTOUPDATEACCOUNT, FILEAPPEND, FILECREATE, FILEDELETE, FILEUPDATE, FREEZE, SCHEDULECREATE, SCHEDULEDELETE, SCHEDULESIGN, SYSTEMDELETE, SYSTEMUNDELETE, TOKENASSOCIATE, TOKENBURN, TOKENCREATION, TOKENDELETION, TOKENDISSOCIATE, TOKENFEESCHEDULEUPDATE, TOKENFREEZE, TOKENGRANTKYC, TOKENMINT, TOKENPAUSE, TOKENREVOKEKYC, TOKENUNFREEZE, TOKENUNPAUSE, TOKENUPDATE, TOKENWIPE, UNCHECKEDSUBMIT_Available values_ : CONSENSUSCREATETOPIC, CONSENSUSDELETETOPIC, CONSENSUSSUBMITMESSAGE, CONSENSUSUPDATETOPIC, CONTRACTCALL, CONTRACTCREATEINSTANCE, CONTRACTDELETEINSTANCE, CONTRACTUPDATEINSTANCE, CRYPTOADDLIVEHASH, CRYPTOAPPROVEALLOWANCE, CRYPTOCREATEACCOUNT, CRYPTODELETE, CRYPTODELETEALLOWANCE, CRYPTODELETELIVEHASH, CRYPTOTRANSFER, CRYPTOUPDATEACCOUNT, FILEAPPEND, FILECREATE, FILEDELETE, FILEUPDATE, FREEZE, SCHEDULECREATE, SCHEDULEDELETE, SCHEDULESIGN, SYSTEMDELETE, SYSTEMUNDELETE, TOKENASSOCIATE, TOKENBURN, TOKENCREATION, TOKENDELETION, TOKENDISSOCIATE, TOKENFEESCHEDULEUPDATE, TOKENFREEZE, TOKENGRANTKYC, TOKENMINT, TOKENPAUSE, TOKENREVOKEKYC, TOKENUNFREEZE, TOKENUNPAUSE, TOKENUPDATE, TOKENWIPE, UNCHECKEDSUBMIT {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.id" type="String" required="false" %} The ID of the account the user would like to return transactions for within the transferlist. {% endswagger-parameter %}
{% swagger-parameter in="query" name="timestamp" type="array[string]" required="false" %} The specific timestamp the user would like to return transactions for {% endswagger-parameter %}
{% swagger-parameter in="query" name="result" type="" required="false" %} If
result=fail
l the query returns all failed cryptocurrency transactions
If the
result=success
the query returns all successful cryptocurrency transactions {% endswagger-parameter %}
{% swagger-parameter in="query" name="type" type="" required="false" %} If
type=credit
the query returns all transactions that deposited into an account ID
If
type=debit
the query returns all transactions that withdrew from an account ID {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The limit of items to return
Default value : 25 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : desc {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
{
"transactions": [
{
"bytes": null,
"charged_tx_fee": 7,
"consensus_timestamp": "1234567890.000000007",
"entity_id": "0.0.2281979",
"max_fee": 33,
"memo_base64": null,
"name": "CRYPTOTRANSFER",
"node": "0.0.3",
"nonce": 0,
"parent_consensus_timestamp": "1234567890.000000007",
"result": "SUCCESS",
"scheduled": false,
"transaction_hash": "vigzKe2J7fv4ktHBbNTSzQmKq7Lzdq1/lJMmHT+a2KgvdhAuadlvS4eKeqKjIRmW",
"transaction_id": "0.0.8-1234567890-000000006",
"token_transfers": [
{
"token_id": "0.0.90000",
"account": "0.0.9",
"amount": 1200,
"is_approval": false
},
{
"token_id": "0.0.90000",
"account": "0.0.8",
"amount": -1200,
"is_approval": false
}
],
"transfers": [
{
"account": "0.0.3",
"amount": 2,
"is_approval": false
},
{
"account": "0.0.8",
"amount": -3,
"is_approval": false
},
{
"account": "0.0.98",
"amount": 1,
"is_approval": false
}
],
"valid_duration_seconds": 11,
"valid_start_timestamp": "1234567890.000000006"
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
consensus timestamp | The consensus timestamp in seconds.nanoseconds |
transaction hash | The hash value of the transaction processed on the Hedera network |
valid start timestamp | The time the transaction is valid |
charged tx fee | The transaction fee that was charged for that transaction |
transaction id | The ID of the transaction |
memo base64 | The memo attached to the transaction encoded in Base64 format |
result | Whether the cryptocurrency transaction was successful or not |
entity ID | The entity ID that is created from create transactions (AccountCreateTransaction, TopicCreateTransaction, TokenCreateTransaction, ScheduleCreateTransaction, ContractCreateTransaction, FileCreateTransaction). |
name | The type of transaction |
max fee | The maximum transaction fee the client is willing to pay |
valid duration seconds | The seconds for which a submitted transaction is to be deemed valid beyond the start time. The transaction is invalid if consensusTimestamp is greater than transactionValidStart + valid_duration_seconds. |
node | The ID of the node that submitted the transaction to the network |
transfers | A list of the account IDs the crypto transfer occurred between and the amount that was transferred. A negative (-) sign indicates a debit to that account. The transfer list includes the transfers between the from account and to account, the transfer of the node fee, the transfer of the network fee, and the transfer of the service fee for that transaction. If the transaction was not processed, a network fee is still assessed. |
token transfers | The token ID, account, and amount that was transferred to by this account in this transaction. This will not be listed if it did not occur in the transaction |
assessed custom fees | The fees that were charged for a custom fee token transfer |
links.next | A hyperlink to the next page of responses |
Operator | Example | Description |
---|---|---|
lt (less than) |
/api/v1/transactions?account.id=lt:0.0.1000 |
Returns account.id transactions less than 1,000 |
lte (less than or equal to) |
/api/v1/transactions?account.id=lte:0.0.1000 |
Returns account.id transactions less than or equal to 1,000 |
gt (greater than) |
/api/v1/transactions?account.id=gt:0.0.1000 |
Returns account.id transactions greater than 1,000 |
gte (greater than or equal to) |
api/v1/transactions?account.id=gte:0.0.1000 |
Returns account.id transactions greater than or equal to 1,000 |
order (order asc or desc values) |
|
Lists transactions in ascending order Lists transactions descending order |
Note: It is recommended that the account.id query should not select no more than 1000 accounts in a query. If the range specified in the query results in selecting more than 1000 accounts, the API will automatically only search for the first 1000 accounts that match the query in the database and return the transactions for those. For example, if you use ?account.id=gt:0.0.15000
or if you use?account.id=gt:0.0.15000&account.id=lt:0.0.30000
, then the API will only return results or some 1000 accounts in this range that match the rest of the query filters.
A single transaction can also be returned by specifying the transaction ID in the request. If a transaction was submitted to multiple nodes, the response will return entries for the successful transaction along with separate entries for the duplicate transaction(s). The "result" key indicates "success" for the node that processed the transaction and "DUPLICATE_TRANSACTION" for each additional node submission. Duplicate entries are still charged network fees.
Parameter | Description |
---|---|
{transaction_ID} |
A specific transaction can be returned by specifying a transaction ID |
Example Request | Description |
---|---|
/api/v1/transactions/?account.id=0.0.1000 |
Returns transaction for account ID 1,000 |
/api/v1/transactions?timestamp=1565779209.711927001 |
Returns transactions at 1565779209 seconds and 711927001 nanoseconds |
/api/v1/transactions?result=fail |
Returns all transactions that have failed |
/api/v1/transactions?account.id=0.0.13622&type=credit /api/v1/transactions?account.id=0.0.13622&type=debit |
Returns all transactions that deposited into an account ID 0.0.13622 Returns all transactions that withdrew from account ID 0.0.13622 |
/api/v1/transactions?transactionType=cryptotransfer |
Returns all cryptotransfer transactions |
{% swagger method="get" path="/api/v1/transactions/{transactionId}" baseUrl="" summary="transaction by transaction ID" %} {% swagger-description %} Return the information about a specific transaction by specifying the transaction ID {% endswagger-description %}
{% swagger-parameter in="path" name="transactionId" required="true" type="String" %} The transaction ID.
Example
: 0.0.10-1234567890-000000000 {% endswagger-parameter %}
{% swagger-parameter in="query" name="nonce" type="integer" required="false" %} Filter the query result by the nonce of the transaction. The filter honors the last value. If not specified, all transactions with the specified payer account ID and valid start timestamp match. {% endswagger-parameter %}
{% swagger-parameter in="query" name="scheduled" type="boolean" required="false" %} Filter transactions by the scheduled flag. If true, return information for the scheduled transaction. If false, return information for the non-scheduled transaction. If not present, return information for all transactions matching transactionId. {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"transactions": [
{
"consensus_timestamp": "1234567890.000000007",
"transaction_hash": "vigzKe2J7fv4ktHBbNTSzQmKq7Lzdq1/lJMmHT+a2KgvdhAuadlvS4eKeqKjIRmW",
"valid_start_timestamp": "1234567890.000000006",
"charged_tx_fee": 7,
"memo_base64": null,
"bytes": null,
"result": "SUCCESS",
"entity_id": "0.0.2281979",
"name": "CRYPTOTRANSFER",
"nft_transfers": [
{
"receiver_account_id": "0.0.121",
"sender_account_id": "0.0.122",
"serial_number": 1,
"token_id": "0.0.123"
},
{
"receiver_account_id": "0.0.321",
"sender_account_id": "0.0.422",
"serial_number": 2,
"token_id": "0.0.123"
}
],
"max_fee": 33,
"valid_duration_seconds": 11,
"node": "0.0.3",
"transaction_id": "0.0.8-1234567890-000000006",
"scheduled": false,
"transfers": [
{
"account": "0.0.3",
"amount": 2
},
{
"account": "0.0.8",
"amount": -3
},
{
"account": "0.0.98",
"amount": 1
}
],
"token_transfers": [
{
"token_id": "0.0.90000",
"account": "0.0.9",
"amount": 1200
},
{
"token_id": "0.0.90000",
"account": "0.0.8",
"amount": -1200
}
],
"assessed_custom_fees": [
{
"amount": 100,
"collector_account_id": "0.0.10",
"effective_payer_account_ids": [
"0.0.8",
"0.0.72"
],
"token_id": "0.0.90001"
}
]
}
]
}
{% endswagger-response %} {% endswagger %}
{% swagger baseUrl="" path="/api/v1/topics/{topicId}/messages/" method="get" summary="topic messages" %} {% swagger-description %} Returns the list of topic messages for the given topic id. {% endswagger-description %}
{% swagger-parameter in="path" name="topicId" type="string" required="true" %} The ID of the topic in x.y.z or z format {% endswagger-parameter %}
{% swagger-parameter in="query" name="sequenceNumber" type="integer" required="false" %} The sequence number of the message relative to other messages submitted to the same topic {% endswagger-parameter %}
{% swagger-parameter in="query" name="consensusTimestamp" type="array[string]" required="false" %} The consensus timestamp of a message in seconds.nanoseconds {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
"responseJson": {
"consensus_timestamp": "1234567890.000000002",
"topic_id": "0.0.7",
"message": "bWVzc2FnZQ==",
"running_hash": "cnVubmluZ19oYXNo",
"sequence_number": 2
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
consensus_timestamp | The consensus timestamp of the message in seconds.nanoseconds |
topic_id | The ID of the topic the message was submitted to |
message | The content of the message |
running_hash | The new running hash of the topic that received the message |
sequence_number | The sequence number of the message relative to all other messages for the same topic |
{% swagger method="get" path="/api/v1/topics/{topicId}/messages/{sequenceNumber}" baseUrl="" summary="topic message by ID and sequence number" %} {% swagger-description %} Returns a single topic message the given topic id and sequence number. {% endswagger-description %}
{% swagger-parameter in="path" required="true" name="topicId" type="String" %} The topic ID {% endswagger-parameter %}
{% swagger-parameter in="path" required="true" name="sequenceNumber" type="integer" %} Topic message sequence number {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"messages": [
{
"consensus_timestamp": "1234567890.000000001",
"topic_id": "0.0.7",
"message": "bWVzc2FnZQ==",
"running_hash": "cnVubmluZ19oYXNo",
"running_hash_version": 2,
"sequence_number": 1
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/topics/messages/{consensusTimestamp}" baseUrl="" summary="topic messages by consensus timestamp" %} {% swagger-description %} Returns a topic message the given the consensus timestamp {% endswagger-description %}
{% swagger-parameter in="path" required="true" type="String" name="consensusTimestamp" %} The timestamp at which the associated transaction reached consensus {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"consensus_timestamp": "1234567890.000000001",
"topic_id": "0.0.7",
"message": "bWVzc2FnZQ==",
"running_hash": "cnVubmluZ19oYXNo",
"running_hash_version": 2,
"sequence_number": 1
}
{% endswagger-response %} {% endswagger %}
{% swagger baseUrl="" path="/api/v1/tokens" method="get" summary="tokens" %} {% swagger-description %} Returns the list of tokens created in a Hedera network {% endswagger-description %}
{% swagger-parameter in="query" name="publickey" type="String" required="false" %} The public key to return all tokens for {% endswagger-parameter %}
{% swagger-parameter in="query" name="token.id" type="String" required="false" %} The ID of the token to return the query for {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.id" type="String" required="false" %} The ID of the account to return the tokens for {% endswagger-parameter %}
{% swagger-parameter in="query" name="type" type="String" required="false" %} The token type to return
\
Example
: List [ "ALL", "FUNGIBLE_COMMON", "NON_FUNGIBLE_UNIQUE" ] {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The limit of items to return
Default value : 25 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : asc {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
{
"tokens": [
{
"token_id": "0.0.1",
"symbol": "FIRSTMOVERLPDJH",
"admin_key": null,
"type": "FUNGIBLE_COMMON"
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
token_Id | The ID of the token in x.y.z format |
symbol | The symbol of the token |
adminKey | The admin key for the token |
type | The type of token (fungible or non-fungible) |
Example Request | Description |
---|---|
/api/v1/tokens?publickey=3c3d546321ff6f63d70 1d2ec5c277095874e19f4a235bee1e6bb19258bf362be |
All tokens with matching admin key |
/api/v1/tokens?account.id=0.0.8 |
All tokens for matching account |
/api/v1/tokens?token.id=gt:0.0.1001 |
All tokens in range |
/api/v1/tokens?order=desc |
All tokens in descending order of token.id |
/api/v1/tokens?limit=x |
All tokens taking the first x number of tokens |
{% swagger baseUrl="" path="/api/v1/tokens/{tokenId}/balances" method="get" summary="token balances" %} {% swagger-description %} Returns all the accounts and token balance for the specified token ID. {% endswagger-description %}
{% swagger-parameter in="path" name="tokenId" type="String" required="true" %} The token ID to get the balances for {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.publickey" type="String" required="false" %} The public key {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.id" type="String" required="false" %} The ID of the account {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.balance" type="String" required="false" %} The balance to query for {% endswagger-parameter %}
{% swagger-parameter in="query" name="timestamp" type="String" required="false" %} The consensus timestamp to query for {% endswagger-parameter %}
{% swagger-response status="200" description="The request response" %}
{
"timestamp": "0.000002345",
"balances": [
{
"account": "0.15.10",
"balance": 100
},
{
"account": "0.15.9",
"balance": 90
},
{
"account": "0.15.8",
"balance": 80
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
timestamp | The timestamp of the recorded balances in seconds.nanoseconds |
balances | The balance of the tokens in those accounts |
account | The ID of the account that has the token balance |
balance | The balance of the token associated with the account |
Example Request | Description |
---|---|
/api/v1/tokens/<token_id>/balances?order=asc |
The balance of the token in ascending order |
/api/v1/tokens/<token_id>/balances?account.id=0.0.1000 |
The balance of the token for account ID 0.0.1000 |
/api/v1/tokens/<token_id>/balances?account.balance=gt:1000 |
The balance for the token greater than 1000 |
/api/v1/tokens/<token_id>/balances?timestamp=1566562500.040961001 |
The token balances for the specified timestamp |
{% swagger baseUrl="" path="/api/v1/tokens/{tokenId}" method="get" summary="token info" %} {% swagger-description %} Returns the specified token information. {% endswagger-description %}
{% swagger-parameter in="path" name="tokenId" type="String" required="true" %} The ID of the token to return the information for in x.y.z format. {% endswagger-parameter %}
{% swagger-parameter in="query" name="timestamp" type="String" required="false" %} The consensus timestamp to query for {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
{
"admin_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"auto_renew_account": "0.1.2",
"auto_renew_period": null,
"created_timestamp": "1234567890.000000001",
"deleted": false,
"decimals": 1000,
"expiry_timestamp": null,
"freeze_default": false,
"freeze_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"initial_supply": 1000000,
"kyc_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"max_supply": 9223372036854776000,
"memo": "token memo",
"modified_timestamp": "1234567890.000000001",
"name": "Token name",
"pause_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"pause_status": "UNPAUSED",
"supply_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"supply_type": "INFINITE",
"symbol": "ORIGINALRDKSE",
"token_id": "0.10.1",
"total_supply": 1000000,
"treasury_account_id": "0.1.2",
"type": "FUNGIBLE_COMMON",
"wipe_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"custom_fees": {
"created_timestamp": "1234567890.000000001",
"fixed_fees": [
{
"amount": 100,
"collector_account_id": "0.1.5",
"denominating_token_id": "0.10.8"
}
],
"fractional_fees": [
{
"amount": {
"numerator": 12,
"denominator": 29
},
"collector_account_id": "0.1.6",
"denominating_token_id": "0.10.9",
"maximum": 120,
"minimum": 30,
"net_of_transfers": true
}
]
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
admin_key | The token's admin key, if specified |
auto_renew_account | The auto renew account ID |
auto_renew_period | The period at which the auto renew account will be charged a renewal fee |
created_timestamp | The timestamp of when the token was created |
decimals | The number of decimal places a token is divisible by |
expiry_timestamp | The epoch second at which the token should expire |
freeze_default | Whether or not accounts created |
fee_schedule_key | The fee schedule key, if any |
freeze_key | The freeze key for the token, if specified |
initial_supply | The initial supply of the token |
kyc_key | The KYC key for the token, if specified |
modified_timestamp | The last time the token properties were modified |
name | The name of the token |
supply_key | The supply key for the token, if specified |
symbol | The token symbol |
token_id | The token ID |
total_supply | The total supply of the token |
treasury_account_id | The treasury account of the token |
type | whether a token is a fungible or non-fungible token |
wipe_key | The wipe key for the token, if specified |
custom_fees | The custom fee schedule for the token, if any |
pause_key | The pause key for a token, if specified |
pause_status | Whether or not the token is paused |
{% swagger baseUrl="" path="/api/v1/tokens/{tokenId}/nfts" method="get" summary="NFTs" %} {% swagger-description %} Returns the list of non-fungible tokens. {% endswagger-description %}
{% swagger-parameter in="path" name="tokenId" type="String" required="true" %} The ID of token {% endswagger-parameter %}
{% swagger-parameter in="query" name="account.id" type="String" required="false" %} The ID of the account to return the tokens for {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
[
{
"account_id": "0.1.2",
"created_timestamp": "1234567890.000000001",
"deleted": false,
"metadata": "VGhpcyBpcyBhIHRlc3QgTkZU",
"modified_timestamp": "1610682445.003266001",
"serial_number": 124,
"token_id": "0.0.222"
}
]
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
account_id | The account ID of the account associated with the NFT |
created_timestamp | The timestamp of when the NFT was created |
deleted | Whether the token was deleted or not |
metadata | The meta data of the NFT |
modified_timestamp | The last time the token properties were modified |
serial_number | The serial number of the NFT |
token_id | The token ID of the NFT |
{% swagger baseUrl="" path="/api/v1/tokens/{tokenId}/nfts/{serialNumber}" method="get" summary="NFT info" %} {% swagger-description %} Returns the information associated for specific NFT. {% endswagger-description %}
{% swagger-parameter in="path" name="tokenId" type="string" required="true" %} The token ID of the NFT {% endswagger-parameter %}
{% swagger-parameter in="path" name="serialNumber" type="integer" required="true" %} The serial number of the NFT {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
"account_id": "0.1.2",
"created_timestamp": "1234567890.000000001",
"deleted": false,
"metadata": "VGhpcyBpcyBhIHRlc3QgTkZU",
"modified_timestamp": "1610682445.003266001",
"serial_number": 124,
"token_id": "0.0.222"
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
account_id | The account ID of the account associated with the NFT |
created_timestamp | The timestamp of when the NFT was created |
deleted | Whether the token was deleted or not |
metadata | The meta data of the NFT |
modified_timestamp | The last time the token properties were modified |
serial_number | The serial number of the NFT |
token_id | The token ID of the NFT |
{% swagger baseUrl="" path="/api/v1/tokens/{tokenId}/nfts/{serialNumber}/transactions" method="get" summary="NFT transaction history" %} {% swagger-description %} Returns the history of transactions for a NFT. {% endswagger-description %}
{% swagger-parameter in="path" name="tokenId" type="string" required="true" %} The token ID {% endswagger-parameter %}
{% swagger-parameter in="path" name="serialNumber" type="integer" required="true" %} The NFT serial number {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
[
{
"consensus_timestamp": "1618591023.997420021",
"id": "0.0.19789-1618591023-997420021",
"receiver_account_id": "0.0.11",
"sender_account_id": "0.0.10",
"type": "CRYPTOTRANSFER",
"token_id": "0.0.1000"
}
]
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
created_timestamp | The timestamp of the transaction |
id | The timestamp of the transaction |
receiver_account_id | The account that received the NFT |
sender_account_id | The account that sent the NFT |
type | The type of transaction |
token_id | The token ID of the NFT |
{% swagger method="get" path="/api/v1/network/supply" baseUrl="" summary="network supply" %} {% swagger-description %} This query returns the number of hbars that are released along with the timestamp and total supply. {% endswagger-description %}
{% swagger-parameter in="query" name="timestamp" type="array[string]" required="false" %} The timestamp to return the information for {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"released_supply":"922619772920027381",
"timestamp":"1634787900.311842000",
"total_supply":"5000000000000000000"
}
{% endswagger-response %} {% endswagger %}
{% swagger baseUrl="" path="/api/v1/schedules" method="get" summary="schedule list" %} {% swagger-description %} Returns a list of all scheduled transactions for a network. {% endswagger-description %}
{% swagger-parameter in="query" name="schedule.id" type="String" required="false" %}
{% endswagger-parameter %}
{% swagger-parameter in="query" name="account.id" type="String" required="false" %} All schedule transactions matching the creator account {% endswagger-parameter %}
{% swagger-parameter in="query" name="executed" type="boolean" required="false" %} If equal to true, returns all schedule transactions that were executed {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} Limits results to the first N schedule transactions {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
{
"schedules": [
{
"admin_key": {
"_type": "ProtobufEncoded",
"key": "7b2233222c2233222c2233227d"
},
"consensus_timestamp": "1234567890.000000001",
"creator_account_id": "0.0.100",
"executed_timestamp": "1234567890.000000002",
"memo": "Created per council decision dated 1/21/21",
"payer_account_id": "0.0.101",
"schedule_id": "0.0.102",
"signatures": [
{
"consensus_timestamp": "1234567890.000000001",
"public_key_prefix": "H0vpig==",
"signature": "0o0gC7p9SPUH4UD6Yiirp/Kf+LKj8qjuuFdC3AU87HE="
},
{
"consensus_timestamp": "1234567890.000000002",
"public_key_prefix": "GvxuXg==",
"signature": "w9mHyHQpTrlbLfn9NrBlZiMxV2mvLvNEw1hoeAECtcA="
}
],
"transaction_body": "KcyxTMX2XFL+t0KSsB1S/c8t5kXTlLU3BGgNttEy7Gw="
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
schedules | List of schedules |
adminKey | The admin key on the schedule |
adminKey._type | The type of key |
adminKey.key | The admin public key |
consensus_timestamp | The consensus timestamp of when the schedule was created |
creator_account_id | The account ID of the creator of the schedule |
executed_timestamp | The timestamp at which the transaction that was scheduled was executed at |
memo | A string of characters associated with the memo if set |
payer_account_id | The account ID of the account paying for the execution of the transaction |
schedule_id | The ID of the schedule entity |
signatures | The list of keys that signed the transaction |
signatures.consensus_timestamp | The consensus timestamp at which the signature was added |
signatures.public_key_prefix | The signatures public key prefix |
signatures.signature | The signature of the key that signed the schedule transaction |
transaction_body | The transaction body of the transaction that was scheduled |
links.next | Hyperlink to the next page of results |
{% swagger baseUrl="" path="/api/v1/schedules/{scheduleId}" method="get" summary="schedule transaction" %} {% swagger-description %} Returns the specified schedule entity information. {% endswagger-description %}
{% swagger-parameter in="path" name="scheduleId" type="String" required="true" %} The ID of the schedule to return the information for. {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
{
"admin_key": {
"_type": "ProtobufEncoded",
"key": "7b2233222c2233222c2233227d"
},
"consensus_timestamp": "1234567890.000000001",
"creator_account_id": "0.0.100",
"executed_timestamp": "1234567890.000000002",
"memo": "Created per council decision dated 1/21/21",
"payer_account_id": "0.0.101",
"schedule_id": "0.0.102",
"signatures": [
{
"consensus_timestamp": "1234567890.000000001",
"public_key_prefix": "H0vpig==",
"signature": "0o0gC7p9SPUH4UD6Yiirp/Kf+LKj8qjuuFdC3AU87HE="
},
{
"consensus_timestamp": "1234567890.000000002",
"public_key_prefix": "GvxuXg==",
"signature": "w9mHyHQpTrlbLfn9NrBlZiMxV2mvLvNEw1hoeAECtcA="
}
],
"transaction_body": "KcyxTMX2XFL+t0KSsB1S/c8t5kXTlLU3BGgNttEy7Gw="
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
adminKey | The admin key on the schedule |
adminKey._type | The type of key |
adminKey.key | The admin public key |
consensus_timestamp | The consensus timestamp of when the schedule was created |
creator_account_id | The account ID of the creator of the schedule |
executed_timestamp | The timestamp at which the transaction that was scheduled was executed at |
memo | A string of characters associated with the memo if set |
payer_account_id | The account ID of the account paying for the execution of the transaction |
schedule_id | The ID of the schedule entity |
signatures | The list of keys that signed the transaction |
signatures.consensus_timestamp | The consensus timestamp at which the signature was added |
signatures.public_key_prefix | The signatures public key prefix |
signatures.signature | The signature of the key that signed the schedule transaction |
transaction_body | The transaction body of the transaction that was scheduled |
{% swagger method="get" path="/api/v1/contracts" baseUrl="" summary="contracts" %} {% swagger-description %} Returns a list of all contract entity items on the network. {% endswagger-description %}
{% swagger-parameter in="query" name="contract.id" type="String" required="false" %} The ID of the contract to return information for {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The limit of items to return
Default value
: 25 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : desc {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"contracts": [
{
"admin_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"auto_renew_account": "0.1.2",
"auto_renew_period": null,
"contract_id": "0.1.2",
"created_timestamp": "1586567700.453054000",
"deleted": false,
"evm_address": "0000000000000000000000000000000000001f41",
"expiration_timestamp": "1586567700.453054000",
"file_id": "0.1.2",
"max_automatic_token_associations": 0,
"memo": "contract memo",
"obtainer_id": "0.1.2",
"permanent_removal": true,
"proxy_account_id": "0.1.2",
"timestamp": {
"from": "1586567700.453054000",
"to": "1586567700.453054000"
}
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description |
---|---|
admin_key | The admin key of the contract, if specified |
auto_renew_account | The account paying the auto renew fees, if set |
auto_renew_period | The period at which the contract auto renews |
bytecode | The bytecode of the contract |
contract_id | The contract ID |
created_timestamp | The timestamp the contract was created at |
deleted | Whether or not the contract is deleted |
evm_address | The EVM address of the contract |
expiration_timestamp | The timestamp of when the contract is set to expire |
file_id | The ID of the file that stored the contract bytecode |
max_automatic_token_associations | The number of automatic token association slots |
memo | The memo of the contract, if specified |
obtainer_id | The ID of the account or contract that will receive any remaining balance when the contract is deleted |
permanent_removal | Set to true when the system expires a contract |
proxy_account_id | The proxy account ID (disabled) |
solidity_address | The solidity address |
timestamp | The period for which the attributes are valid for |
{% swagger method="get" path="/api/v1/contracts/{contractId}" baseUrl="" summary="contract by ID" %} {% swagger-description %} Return the contract information given an id {% endswagger-description %}
{% swagger-parameter in="path" name="contractId" required="true" type="String" %} The ID of the contract in 0.0.contractNumber format {% endswagger-parameter %}
{% swagger-parameter in="query" name="timestamp" type="array[string]" required="false" %} The timestamp to query the results with {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"admin_key": {
"_type": "ProtobufEncoded",
"key": "7b2231222c2231222c2231227d"
},
"auto_renew_period": null,
"contract_id": "0.1.2",
"created_timestamp": "1586567700.453054000",
"deleted": false,
"expiration_timestamp": "1586567700.453054000",
"file_id": "0.1.2",
"memo": "contract memo",
"obtainer_id": "0.1.2",
"proxy_account_id": "0.1.2",
"solidity_address": "0x0000000000000000000000000000000000001f41",
"timestamp": {
"from": "1586567700.453054000",
"to": "1586567700.453054000"
},
"bytecode": "0x01021a1fdc9b"
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/contracts/{contractId}/results" baseUrl="" summary="contract results" %} {% swagger-description %} Returns a list of all ContractResults for a contract's function executions. {% endswagger-description %}
{% swagger-parameter in="path" type="String" name="contractId" required="true" %} The ID of the contract in 0.0.contractNumber format {% endswagger-parameter %}
{% swagger-parameter in="query" name="timestamp" type="array[string]" required="false" %} The timestamp to query the results for {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : asc {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" required="false" %} The limit of items to return
Default value : 25 {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"contracts": [
{
"amount": 10,
"call_result": "0x2b048531b38d2882e86044bc972e940ee0a01938",
"contract_id": "0.1.2",
"created_contract_ids": [
"0.1.2"
],
"error_message": "Out of gas",
"from": "0x0000000000000000000000000000000000001f41",
"function_parameters": "0xbb9f02dc6f0e3289f57a1f33b71c73aa8548ab8b",
"gas_limit": 100000,
"gas_used": 1000,
"timestamp": "1586567700.453054000",
"to": "0x0000000000000000000000000000000000001f41"
}
],
"links": {
"next": null
}
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/contracts/{contractId}/results/{timestamp}" baseUrl="" summary="contract result by timestamp" %} {% swagger-description %} Returns a single ContractResult for a contract's function executions at a specific timestamp {% endswagger-description %}
{% swagger-parameter in="path" name="contractId" type="String" required="true" %} The ID of the contract in 0.0.contractNumber format
\
Example
: 0.0.10 {% endswagger-parameter %}
{% swagger-parameter in="path" name="timestamp" type="String" required="true" %} The timestamp at which the associated transaction reached consensus
Example: 1234567890.0000007 {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"contracts": {
"amount": 10,
"call_result": "0x2b048531b38d2882e86044bc972e940ee0a01938",
"contract_id": "0.1.2",
"created_contract_ids": [
"0.1.2"
],
"error_message": "Out of gas",
"from": "0x0000000000000000000000000000000000001f41",
"function_parameters": "0xbb9f02dc6f0e3289f57a1f33b71c73aa8548ab8b",
"gas_limit": 100000,
"gas_used": 1000,
"timestamp": "1586567700.453054000",
"to": "0x0000000000000000000000000000000000001f41",
"block_hash": "0x6ceecd8bb224da491",
"block_number": 10,
"hash": "0x3531396130303866616264653464"
}
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/contracts/{contractIdOrAddress}/results/logs" baseUrl="" summary="contract logs" %} {% swagger-description %} Returns a list of all ContractLogs for a single specified contract's function executions. Chained logs are not included but can be found by calling
/api/v1/contracts/{contractId}/results/{timestamp}
or
/api/v1/contracts/results/{transactionId}
. When searching by topic a timestamp parameter must be supplied and span a time range of at most seven days. {% endswagger-description %}
{% swagger-parameter in="path" name="contractIdOrAddress" type="String" required="true" %} The ID or hex encoded EVM address associated with this contract
Example
: 0.0.10 {% endswagger-parameter %}
{% swagger-parameter in="query" name="index" type="integer" required="false" %} Contract log index {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The limit of items to return
Default value : 25 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : asc {% endswagger-parameter %}
{% swagger-parameter in="query" name="timestamp" type="array[string]" required="false" %} The timestamp at which the associated transaction reached consensus
Example: 1234567890.0000007 {% endswagger-parameter %}
{% swagger-parameter in="query" name="topic0" type="array[string]" required="false" %} The first topic associated with a contract log. Requires a timestamp range also be populated. {% endswagger-parameter %}
{% swagger-parameter in="query" name="topic1" type="array[string]ring" required="false" %} The second topic associated with a contract log. Requires a timestamp range also be populated. {% endswagger-parameter %}
{% swagger-parameter in="query" name="topic2" type="array[string]" required="false" %} The third topic associated with a contract log. Requires a timestamp range also be populated. {% endswagger-parameter %}
{% swagger-parameter in="query" name="topic3" type="array[string]g" required="false" %} The third topic associated with a The fourth topic associated with a contract log. Requires a timestamp range also be populated. {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
"logs": [
{
"address": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"bloom": "0x549358c4c2e573e02410ef7b5a5ffa5f36dd7398",
"contract_id": "0.1.2",
"data": "0x00000000000000000000000000000000000000000000000000000000000000fa",
"index": 0,
"topics": [
"0xf4757a49b326036464bec6fe419a4ae38c8a02ce3e68bf0809674f6aab8ad300"
],
"root_contract_id": "0.1.2",
"timestamp": "1586567700.453054000"
}
]
}
{% endswagger-response %} {% endswagger %}
{% swagger method="get" path="/api/v1/contracts/results/{transactionId}" baseUrl="" summary="contract result by transaction ID" %} {% swagger-description %} Returns a single ContractResult for a contract's function executions for a given transactionId. {% endswagger-description %}
{% swagger-parameter in="path" name="transactionId" type="String" required="true" %} The transaction ID {% endswagger-parameter %}
{% swagger-parameter in="query" name="nonce" type="integer" required="false" %} Filter the query result by the nonce of the transaction. The filter honors the last value. Default is 0 when not specified.
Default value : 0 {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
{
"contracts": {
"amount": 10,
"call_result": "0x2b048531b38d2882e86044bc972e940ee0a01938",
"contract_id": "0.1.2",
"created_contract_ids": [
"0.1.2"
],
"error_message": "Out of gas",
"from": "0x0000000000000000000000000000000000001f41",
"function_parameters": "0xbb9f02dc6f0e3289f57a1f33b71c73aa8548ab8b",
"gas_limit": 100000,
"gas_used": 1000,
"timestamp": "1586567700.453054000",
"to": "0x0000000000000000000000000000000000001f41",
"block_hash": "0x6ceecd8bb224da491",
"block_number": 10,
"hash": "0x3531396130303866616264653464"
}
}
{% endswagger-response %} {% endswagger %}
The Hedera Mirror Node state proof alpha api provides the ability to cryptographically prove a transaction is valid on Hedera network. The request returns the content of the address book file, signature files, and record file that can be used to validate the transaction occurred on the Hedera network. The address book file contains the consensus node account IDs and their public key files. The signature files are of the supermajority consensus nodes that signed the record file the transaction is contained in.
{% swagger baseUrl="" path="/api/v1/transactions/{transactionId}/stateproof" method="get" summary="transaction state proof" %} {% swagger-description %} Returns the contents of the address book file, signature files, and record file that can be used to validate the transaction occurred on the Hedera network given transaction id. {% endswagger-description %}
{% swagger-parameter in="path" name="transactionId" type="string" required="true" %} The ID of the transaction to return the state proof in shard.realm.num-sss-nnn format where sss is in seconds and nnn is in nanoseconds of the transaction valid start time. {% endswagger-parameter %}
{% swagger-parameter in="query" name="nonce" type="integer" required="false" %} Filter the query result by the nonce of the transaction. The filter honors the last value. Default is 0 when not specified.
Default value : 0 {% endswagger-parameter %}
{% swagger-parameter in="query" name="scheduled" type="boolean" required="false" %} Filter transactions by the scheduled flag. If true, return information for the scheduled transaction. If false, return information for the non-scheduled transaction.
Default value
: false {% endswagger-parameter %}
{% swagger-response status="200" description="" %}
{
"transactions": {
"record_file": "YzNkOTg3Yzg3NDI5NGViOTViMmRmOWZkMzZiMDY1NjYyMzMxNTc2OWFmMmVmMzQ0YzM1ODY4NzgwMTAyYjVjMA==",
"address_books": [
"MjljY2IxNGNjNWY2NWM1MmZlYjc0MjkyYjAxZDUyZmRjZjJkZTY0NWQzOTRiNTM3MDQ2ODBkYjZkMTMyZWM2Yw=="
],
"signature_files": {
"0.0.3": "MWFmYzZlNWVjNGJiZTg0ZWJjNTVkMGViNDViMjE2Mzg2ZTQ2NjUzZTYyYmM1NjE2YThmZGJjNzQ1ZWIyMTQxNQ==",
"0.0.4": "ZDI4ZDIwMGJiYTdkNDhmNTA3ZTE0MGZhNjIyOGFiYTdmMjlmZjhiMmEzZjJhOGVlYjg1NzQyZGMwNTNjZWM3MQ==",
"0.0.5": "MWY0YmU5OGE3NWE4N2NkNjQ5ZTNlMWE1ODI1OTI3NTgwNWM1Y2RmNjNmYjA0YjMzMTdlZmI1MTEwNzQ2NDVjNw==",
"0.0.6": "NzNiZTVmMTZkNmY4NTQ4MjdiN2M4MTEzZmFlY2I1YzIwNGI5ZjFkNjhiMzdkMzczNTg4OTRkOWFiZmM5N2U4Mw==",
"0.0.7": "NDJiZTVmMTZkNmY4NTQ4MjdiN2M4MTEzZmFlY2I1YzIwNGI5ZjFkNjhiMzdkMzczNTg4OTRkOWFiZmM5N2U4Mw=="
}
}
}
{% endswagger-response %} {% endswagger %}
Response Item | Description | Format |
---|---|---|
record_file | The record file content for the specified transaction | base64 encoding |
signature_files | The signatures file content from the consensus nodes that signed the transaction | base64 encoding |
address_books | The address book file contents | base64 encoding |
Save the response to a json file and use the check-state-proof cli commands to confirm the validity of the transaction. You can find the instructions here.
{% swagger method="get" path="/api/v1/network/nodes" baseUrl="" summary="Get the network address book" %} {% swagger-description %} Returns the network's list of nodes used in consensus. {% endswagger-description %}
{% swagger-parameter in="query" name="file.id" required="false" %} 0.0.101 or 0.0.102 address book files {% endswagger-parameter %}
{% swagger-parameter in="query" name="node.id" required="false" %} The node account ID (ex. 0.0.10) {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="integer" required="false" %} The maximum number of items to return
Default value : 25 {% endswagger-parameter %}
{% swagger-parameter in="query" name="order" required="false" %} The order in which items are listed
Available values : asc, desc
Default value : asc
Example : desc {% endswagger-parameter %}
{% swagger-response status="200: OK" description="" %}
{
{
"nodes": [
{
"description": "",
"file_id": "0.0.102",
"memo": "0.0.3",
"node_account_id": "0.0.3",
"node_cert_hash": "0x3334...",
"node_id": 0,
"public_key": "0x308201...",
"service_endpoints": [
{
"ip_address_v4": "13.124.142.126",
"port": 50211
}
],
"timestamp": {
"from": "1636052707.740848001",
"to": null
}
}
],
"links": {
"next": null
}
}
}
{% endswagger-response %} {% endswagger %}