Restful APIs Documentation
This documentation covers the Restful APIs available in the Smart Node system. The APIs are organized into several main categories.
Smart Node ManagementRestful APIs DocumentationIPFS OperationsValidator OperationsSnapshotsAuthentication ServicesHashgraph Consensus Service (HCS) OperationsHashgraph HCS Mirror Node OperationsHashgraph HTS (Token Service) OperationsHashgraph HTS Mirror Node OperationsHashgraph TransactionsHashgraph AccountsHashgraph Accounts Mirror Node OperationsSmart Node Management
Returns the SmartNetwork.Operator.Entity identifier details
GET /smart-node/identifier HTTP/1.1
Host:
Accept: */*
{
"accountId": "0.0.1234567",
"publicKey": "302a300506032b6570032100a6e3161d0db8e3c629e4d1d2a3a4e4b6e1f1c1d8c7b5b4a3c2d1f0e9d8c7b5",
"url": "https://operator.smartnetwork.com",
"nft": {
"id": "0.0.123456",
"serialNumber": 1,
"name": "Premium Operator",
"description": "High-capacity network operator",
"attributes": {
"tier": "premium",
"region": "us-east",
"permissions": [
"read",
"write",
"execute"
]
}
}
}
Returns array of SmartNetwork.Network.Entity whitelisted nodes
GET /smart-node/network HTTP/1.1
Host:
Accept: */*
[
{
"membership": {
"walletId": "0x1234567890abcdef",
"operator": {
"id": "op123",
"name": "MainOperator"
},
"status": "ACTIVE",
"details": {
"metadata": {
"name": "Premium Operator",
"description": "High-performance network operator"
}
}
},
"trustScore": {
"score": 95,
"timestamp": "2024-01-01T12:00:00Z"
},
"type": "operator",
"clusters": [
{
"id": "cluster1",
"name": "Primary Cluster",
"nodes": [
"node1",
"node2"
]
}
],
"dkgId": "dkg123456"
}
]
Returns the SmartNetwork.SmartNode.State details
GET /smart-node/status HTTP/1.1
Host:
Accept: */*
{
"node": {
"status": "active",
"lastSeen": "2023-12-01T10:00:00Z",
"metrics": {
"cpu": "45%",
"memory": "60%",
"network": "120Mbps"
}
},
"ipfs": {
"connected": true,
"peers": 25,
"storage": {
"pinned": 1500,
"available": "2TB"
}
}
}
Returns array of SmartNetwork.Network.Utility token details
GET /smart-node/utilities HTTP/1.1
Host:
Accept: */*
[
{
"name": "GovernanceToken",
"id": "0x123abc...",
"treasury": "0xdef456...",
"decimals": "18"
}
]
Health & Metrics
GET /health/check HTTP/1.1
Host:
Accept: */*
{
"status": "ok",
"info": {
"database": {
"status": "up"
}
},
"error": {},
"details": {
"database": {
"status": "up"
}
}
}
GET /health/infos HTTP/1.1
Host:
Accept: */*
{
"platform": "text",
"release": "text",
"machine": "text",
"arch": "text",
"uptime": 1,
"cpu": {
"usage": 1,
"cpus": 1,
"speed": 1
},
"memory": {
"totalMemMb": 1,
"usedMemMb": 1,
"freeMemMb": 1,
"usedMemPercentage": 1,
"freeMemPercentage": 1
},
"drive": {
"totalGb": "text",
"usedGb": "text",
"freeGb": "text",
"usedPercentage": "text",
"freePercentage": "text"
},
"network": {
"inputBytes": 1,
"outputBytes": 1
}
}
Retrieves comprehensive metrics data for system and application monitoring.
# HELP process_cpu_user_seconds_total Total user CPU time spent in seconds. # TYPE process_cpu_user_seconds_total counter process_cpu_user_seconds_total 0.03125
GET /metrics HTTP/1.1
Host:
Accept: */*
Successfully retrieved metrics data in Prometheus format
# HELP process_cpu_user_seconds_total Total user CPU time spent in seconds.
# TYPE process_cpu_user_seconds_total counter
process_cpu_user_seconds_total 0.03125
IPFS Operations
File to upload (max 100MB)
POST /ipfs/upload HTTP/1.1
Host:
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}
No content
Validator Operations
Validators.Account.Add.Description
Level of Smart Node security for the account's keys
partial
Possible values: Conditions for the updatable property.
{"values":["maxAutomaticTokenAssociations"],"controller":"owner"}
Conditions for the Actions property.
{"values":["transfer","delete"],"controller":"owner"}
Token gating configuration for both fungible and non-fungible tokens.
{"fungibles":{"tokens":[]},"nonFungibles":{"tokens":[]},"timeRange":null}
Swap conditions.
{"prices":[]}
POST /validators/accounts HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 308
{
"smartNodeSecurity": "partial",
"updateConditions": {
"values": [
"maxAutomaticTokenAssociations"
],
"controller": "owner"
},
"actionsConditions": {
"values": [
"transfer",
"delete"
],
"controller": "owner"
},
"tokenGates": {
"fungibles": {
"tokens": []
},
"nonFungibles": {
"tokens": []
},
"timeRange": null
},
"swapConditions": {
"prices": []
}
}
text
Validators.Account.Read.Description
Validators.Account.Read.Param.Timestamp.Description
GET /validators/accounts/{timestamp} HTTP/1.1
Host:
Accept: */*
{
"smartNodeSecurity": "partial",
"updateConditions": {
"values": [
"maxAutomaticTokenAssociations"
],
"controller": "owner"
},
"actionsConditions": {
"values": [
"transfer",
"delete"
],
"controller": "owner"
},
"tokenGates": {
"fungibles": {
"tokens": []
},
"nonFungibles": {
"tokens": []
},
"timeRange": null
},
"swapConditions": {
"prices": []
}
}
Validators.Consensus.Add.Description
Level of Smart Node security for the token's keys
partial
Possible values: The token gating configuration for both fungible and non-fungible tokens.
{"fungibleTokens":[],"nonFungibleTokens":[]}
The custom parameters for the consensus topic.
{"parameters":{},"conditions":[]}
The conditions for the actions property.
{"create":[],"update":[],"delete":[]}
The conditions for updatable fields in the consensus topic.
POST /validators/consensus HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 221
{
"smartNodeSecurity": "partial",
"tokenGates": {
"fungibleTokens": [],
"nonFungibleTokens": []
},
"customInterface": {
"parameters": {},
"conditions": []
},
"actionsConditions": {
"create": [],
"update": [],
"delete": []
},
"updateConditions": {}
}
text
Validators.Consensus.Read.Description
Validators.Consensus.Read.Param.Timestamp.Description
GET /validators/consensus/{timestamp} HTTP/1.1
Host:
Accept: */*
{
"smartNodeSecurity": "partial",
"tokenGates": {
"fungibleTokens": [],
"nonFungibleTokens": []
},
"customInterface": {
"parameters": {},
"conditions": []
},
"actionsConditions": {
"create": [],
"update": [],
"delete": []
},
"updateConditions": {}
}
Validators.Token.Add.Description
Level of Smart Node security for the token's keys
partial
Possible values: Conditions for the updatable property of the token.
{"values":["condition1","condition2"],"controller":{"type":"standard"}}
Conditions for the actions property.
{"values":["action1","action2"],"controller":{"type":"advanced"}}
Conditions for the fees property.
{"values":["fee1","fee2"],"controller":{"type":"basic"}}
Conditions for the keys property.
{"values":["key1","key2"],"controller":{"type":"secure"}}
POST /validators/tokens HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 357
{
"smartNodeSecurity": "partial",
"updateConditions": {
"values": [
"condition1",
"condition2"
],
"controller": {
"type": "standard"
}
},
"actionsConditions": {
"values": [
"action1",
"action2"
],
"controller": {
"type": "advanced"
}
},
"feesConditions": {
"values": [
"fee1",
"fee2"
],
"controller": {
"type": "basic"
}
},
"keysConditions": {
"values": [
"key1",
"key2"
],
"controller": {
"type": "secure"
}
}
}
text
Validators.Token.Read.Description
Validators.Token.Read.Param.Timestamp.Description
GET /validators/tokens/{timestamp} HTTP/1.1
Host:
Accept: */*
{
"smartNodeSecurity": "partial",
"updateConditions": {
"values": [
"condition1",
"condition2"
],
"controller": {
"type": "standard"
}
},
"actionsConditions": {
"values": [
"action1",
"action2"
],
"controller": {
"type": "advanced"
}
},
"feesConditions": {
"values": [
"fee1",
"fee2"
],
"controller": {
"type": "basic"
}
},
"keysConditions": {
"values": [
"key1",
"key2"
],
"controller": {
"type": "secure"
}
}
}
Snapshots
Snapshots.Queue.Generate.Request.Description
Snapshots.Queue.Generate.Request.TokenId
0.0.123456
POST /snapshots/generate/{tokenId} HTTP/1.1
Host:
Accept: */*
{
"_sender": "0x123...",
"_jobId": "123456"
}
Authentication Services
Returns the profile of the authenticated user from their active session. Requires valid authentication.
GET /auth/profile HTTP/1.1
Host:
Accept: */*
{
"email": "[email protected]",
"username": "johndoe",
"created_at": 1634567890,
"updated_at": 1634567890,
"confirmed": true,
"type": "standard",
"role": "user",
"tags": [
"premium",
"beta"
],
"banned": false,
"twoFactorAuth": {
"status": "PENDING",
"factorSid": "YF1234567890abcdef1234567890abcdef",
"identity": "[email protected]",
"qr_code": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA..."
}
}
This endpoint will create a user session from a web3 signed payload. The payload must be signed offline with your web3 wallet.
The operator information for the login request
The signed data for the login request
POST /auth/web3/login HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 118
{
"operator": {},
"signedData": {
"signature": {
"0": 1,
"1": 2,
"2": 3,
"3": 4,
"4": 5
},
"serverSigningAccount": "0x1234567890abcdef"
}
}
{
"operator": {},
"signedData": {
"signature": {
"0": 1,
"1": 2,
"2": 3,
"3": 4,
"4": 5
},
"serverSigningAccount": "0x1234567890abcdef"
}
}
This endpoint will destroy the session and the user will be logged out. This endpoint is protected and requires authentication.
GET /auth/web3/logout HTTP/1.1
Host:
Accept: */*
{
"logout": true,
"message": "Logout successful"
}
This endpoint will return a payload to be signed offline with your web3 wallet. The signed payload will then be sent to the login endpoint to authenticate the user.
GET /auth/web3/request HTTP/1.1
Host:
Accept: */*
{
"signedData": {
"signature": {
"0": 1,
"1": 2,
"2": 3,
"3": 4,
"4": 5
},
"serverSigningAccount": "0x1234567890abcdef"
},
"payload": {
"url": "https://example.com/auth",
"node": "node-1",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
}
Hashgraph Consensus Service (HCS) Operations
Creates a new Hashgraph.Ledger.HCS.Topic
The key for the topic. Can be a single PublicKey or a KeyList.
Optional memo or description for the topic
The consensus timestamp for the validator.
POST /hcs HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"key": {},
"memo": "text",
"validatorConsensusTimestamp": "text"
}
{}
Updates an existing Hashgraph.Ledger.HCS.Topic
Hashgraph.Ledger.HCS.Topic ID
A short description or note about the topic update
Updated topic description
Configuration for the topic sender
Configuration settings for the DAO
PUT /hcs/{topic} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"memo": "Updated topic description",
"sender": {},
"dao": {}
}
{}
Deletes an existing Hashgraph.Ledger.HCS.Topic
Hashgraph.Ledger.HCS.Topic ID
Configuration for the topic's sender
{"key":"PublicKey or KeyList object","id":"AccountId object"}
Configuration settings for the DAO associated with this topic
DELETE /hcs/{topic} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 81
{
"sender": {
"key": "PublicKey or KeyList object",
"id": "AccountId object"
},
"dao": {}
}
{}
Gets information about a Hashgraph.Ledger.HCS.Topic
Hashgraph.Ledger.HCS.Topic ID
GET /hcs/{topic} HTTP/1.1
Host:
Accept: */*
{
"topicId": "text",
"topicMemo": "text",
"sequenceNumber": "text",
"expirationTime": "text",
"adminKey": [
"text"
],
"submitKey": [
"text"
],
"autoRenewAccountId": "text",
"ledgerId": "text"
}
Submits a Hashgraph.Ledger.HCS.Topic.Message
Hashgraph.Ledger.HCS.Topic ID
The content of the message to be submitted to the Hashgraph Consensus Service topic
The signature of the message to be submitted to the Hashgraph Consensus Service topic
Configuration for the topic sender
Configuration settings for the DAO
POST /hcs/{topic}/message HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 54
{
"message": "text",
"signature": {},
"sender": {},
"dao": {}
}
{}
Gets messages from a Hashgraph.Ledger.HCS.Topic
Hashgraph.Ledger.HCS.Topic ID
Callback for successful message retrieval
Start sequence number for message retrieval
End sequence number for message retrieval
Maximum number of messages to retrieve
Callback for message retrieval error
GET /hcs/{topic}/messages?callbackSuccess=null&start=1&end=1&limit=1&callbackError=null&callbackSuccess=null&start=1&end=1&limit=1&callbackError=null HTTP/1.1
Host:
Accept: */*
{}
Hashgraph HCS Mirror Node Operations
Retrieves an array of Hashgraph.Restful.HCS.Message.Entity objects from the specified topic
The unique identifier of the topic to retrieve messages from.
The encoding format of the messages (e.g., "base64", "utf-8").
The maximum number of messages to retrieve in a single request.
The order of the messages ("asc" for ascending, "desc" for descending).
The sequence number to start retrieving messages from.
The timestamp (in ISO 8601 format) to start retrieving messages from.
GET /mirrors/hcs/topics/{topic}/messages HTTP/1.1
Host:
Accept: */*
[
{
"chunk_info": {
"number": 1,
"total": 3,
"initial_transaction_id": "[email protected]"
},
"consensus_timestamp": "1234567890.000000000",
"message": "Hello Hashgraph",
"payer_account_id": "0.0.1234",
"running_hash": "0x1234abcd...",
"running_hash_version": 2,
"sequence_number": 1,
"topic_id": "0.0.1234"
}
]
Retrieves a single Hashgraph.Restful.HCS.Message.Entity by topic ID and sequence number
The unique identifier of the topic containing the message.
The sequence number of the specific message to retrieve.
GET /mirrors/hcs/topics/{topic}/messages/{sequenceNumber} HTTP/1.1
Host:
Accept: */*
{
"chunk_info": {
"number": 1,
"total": 3,
"initial_transaction_id": "[email protected]"
},
"consensus_timestamp": "1234567890.000000000",
"message": "Hello Hashgraph",
"payer_account_id": "0.0.1234",
"running_hash": "0x1234abcd...",
"running_hash_version": 2,
"sequence_number": 1,
"topic_id": "0.0.1234"
}
Retrieves a Hashgraph.Restful.HCS.Topic.Status object containing message and topic information by timestamp
The timestamp (in ISO 8601 format) of the message to retrieve.
GET /mirrors/hcs/topics/messages/{timestamp} HTTP/1.1
Host:
Accept: */*
{
"_status": {
"topicId": "0.0.1234",
"sequenceNumber": 42,
"runningHash": "0x1234abcd...",
"runningHashVersion": 2
}
}
Hashgraph HTS (Token Service) Operations
This endpoint allows you to burn an NFT.
the token id of the token we want to burn an NFT.
The unique serial numbers of the specific NFTs to be burned
[1,2]
Optional DAO configuration for the NFT burning
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information for the burn operation
{"key":"PublicKey or KeyList","id":"AccountId"}
POST /hts/burn/nft/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 154
{
"serialNumbers": [
1,
2
],
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
},
"sender": {
"key": "PublicKey or KeyList",
"id": "AccountId"
}
}
{}
Burns Hashgraph.Ledger.HTS fungible tokens from treasury
the token id of the token we want to burn.
The quantity of tokens to be burned
100
Optional DAO configuration for the token burning
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information for the burn operation
{"key":"PublicKey or KeyList","id":"AccountId"}
POST /hts/burn/token/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 145
{
"amount": 100,
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
},
"sender": {
"key": "PublicKey or KeyList",
"id": "AccountId"
}
}
{}
Creates a new Hashgraph.Ledger.HTS token
The name of the token
My Token
The account ID that will act as the treasury for the token
0.0.12345
The symbol of the token
MTK
The number of decimal places a token is divisible by
8
The initial supply of tokens to be put in circulation
1000000
The supply type of the token
{"_code":1}
The maximum number of tokens that can be in circulation
10000000
The maximum transaction fee the client is willing to pay
1000000
The type of token
{"_code":0}
Whether to include a freeze key
true
Whether to include a pause key
true
Whether to include an admin key
true
Whether to include a KYC key
true
Whether to include a wipe key
true
Whether to include a supply key
true
Whether to include a fee schedule key
true
Custom fees to apply to the token
[{"feeType":"royalty","numerator":5,"denominator":100,"fallbackFee":{"hbarAmount":1},"feeCollectorAccountId":"0.0.12345"}]
Whether accounts should be frozen by default when they receive the token
false
The validator consensus timestamp
1718800000000000
The memo for the token
My Token
Optional DAO configuration for the token creation
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /hts/create/token HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 645
{
"sender": {
"key": {},
"id": {}
},
"name": "My Token",
"treasuryAccountId": "0.0.12345",
"symbol": "MTK",
"decimals": 8,
"initialSupply": 1000000,
"supplyType": {
"_code": 1
},
"maxSupply": 10000000,
"maxTransactionFee": 1000000,
"tokenType": {
"_code": 0
},
"freezeKey": true,
"pauseKey": true,
"adminKey": true,
"kycKey": true,
"wipeKey": true,
"supplyKey": true,
"feeScheduleKey": true,
"customFees": [
{
"feeType": "royalty",
"numerator": 5,
"denominator": 100,
"fallbackFee": {
"hbarAmount": 1
},
"feeCollectorAccountId": "0.0.12345"
}
],
"freezeDefault": false,
"validatorConsensusTimestamp": "1718800000000000",
"memo": "My Token",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Deletes a Hashgraph.Ledger.HTS token
Hashgraph.Ledger.HTS token ID
DELETE /hts/delete/{token} HTTP/1.1
Host:
Accept: */*
{}
Freezes a Hashgraph.Ledger.HTS token for an account
Hashgraph.Ledger.HTS token ID
The wallet ID associated with the token to be frozen
0.0.123456
Optional DAO configuration for the token freeze operation
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /hts/freeze/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"sender": {
"key": {},
"id": {}
},
"walletId": "0.0.123456",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Grants KYC status for a Hashgraph.Ledger.HTS token
Hashgraph.Ledger.HTS token ID
The wallet ID associated with the KYC operation
0.0.123456
Optional DAO configuration for the KYC operation
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /hts/grant-kyc/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"sender": {
"key": {},
"id": {}
},
"walletId": "0.0.123456",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
This endpoint allows you to mint an NFT.
the token id of the token we want to mint an NFT.
Array of metadata strings for each NFT to be minted
["ipfs://QmX5NLKeso6xVxTeP3ycB1RQ5Ir3q7C84oSqQyaCzB7q8g","ipfs://QmYvPGMsGN8p5TVKTQpqVZF9VhVzLM1SqJsT9xZaKdUPAA"]
Number of NFTs to mint (maximum 10)
2
Sender information for the minting operation
{"key":"PublicKey or KeyList","id":"AccountId"}
Optional DAO configuration for the NFT minting
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /hts/mint/nft/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 270
{
"metadata": [
"ipfs://QmX5NLKeso6xVxTeP3ycB1RQ5Ir3q7C84oSqQyaCzB7q8g",
"ipfs://QmYvPGMsGN8p5TVKTQpqVZF9VhVzLM1SqJsT9xZaKdUPAA"
],
"quantity": 2,
"sender": {
"key": "PublicKey or KeyList",
"id": "AccountId"
},
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Mints additional supply of a Hashgraph.Ledger.HTS fungible token
the token id of the token we want to mint.
The quantity of tokens to be minted
100
Optional DAO configuration for the token minting
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information for the mint operation
{"key":"PublicKey or KeyList","id":"AccountId"}
POST /hts/mint/token/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 145
{
"amount": 100,
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
},
"sender": {
"key": "PublicKey or KeyList",
"id": "AccountId"
}
}
{}
This endpoint returns theinfo of a given NFT serial number.
the token id of the NFT we want to get theinfo.
the serial number of the NFT we want to get theinfo.
GET /hts/nft/{token}/{serialNumber} HTTP/1.1
Host:
Accept: */*
[
{}
]
Pauses a Hashgraph.Ledger.HTS token
Hashgraph.Ledger.HTS token ID
POST /hts/pause/{token} HTTP/1.1
Host:
Accept: */*
{}
Revokes KYC status for a Hashgraph.Ledger.HTS token
Hashgraph.Ledger.HTS token ID
The wallet ID associated with the KYC operation
0.0.123456
Optional DAO configuration for the KYC operation
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /hts/revoke-kyc/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"sender": {
"key": {},
"id": {}
},
"walletId": "0.0.123456",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
This endpoint returns the info of a given token id.
the token id of the token we want to get theinfo.
GET /hts/token/{token} HTTP/1.1
Host:
Accept: */*
{}
Unfreezes a Hashgraph.Ledger.HTS token for an account
Hashgraph.Ledger.HTS token ID
The wallet ID associated with the token to be unfrozen
0.0.123456
Optional DAO configuration for the token unfreeze operation
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /hts/unfreeze/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"sender": {
"key": {},
"id": {}
},
"walletId": "0.0.123456",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Unpauses a Hashgraph.Ledger.HTS token
Hashgraph.Ledger.HTS token ID
POST /hts/unpause/{token} HTTP/1.1
Host:
Accept: */*
{}
Updates an existing Hashgraph.Ledger.HTS token
Hashgraph.Ledger.HTS token ID
Current Treasury account ID
0.0.12345
New token name
Updated Token Name
New token symbol
UTN
New memo for the token
Updated token description
New Treasury account ID
0.0.67890
New Treasury key
302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777
Optional DAO configuration for the token update
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
PATCH /hts/update/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 354
{
"currentTreasury": "0.0.12345",
"name": "Updated Token Name",
"symbol": "UTN",
"memo": "Updated token description",
"newTreasuryAccountId": "0.0.67890",
"newTreasuryKey": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777",
"sender": {
"key": {},
"id": {}
},
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Updates custom fees for a Hashgraph.Ledger.HTS token
Hashgraph.Ledger.HTS token ID
Custom fees configuration to be updated for the token
Optional DAO configuration for the fee update
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
PATCH /hts/update/{token}/fees HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 179
{
"sender": {
"key": {},
"id": {}
},
"customFees": {
"fixed_fees": [
[]
],
"fractional_fees": [
[]
],
"royalty_fees": [
[]
]
},
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
This endpoint allows you to wipe an NFT.
the token id of the token we want to wipe an NFT.
The unique serial numbers of the specific NFTs to be wiped
[1,2]
The account identifier from which the NFT will be wiped
0.0.67890
Sender information for the wipe operation
{"key":"PublicKey or KeyList","id":"AccountId"}
Optional DAO configuration for the NFT wiping
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /hts/wipe/nft/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 179
{
"serialNumbers": [
1,
2
],
"account_id": "0.0.67890",
"sender": {
"key": "PublicKey or KeyList",
"id": "AccountId"
},
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Wipes Hashgraph.Ledger.HTS fungible tokens from an account
the token id of the token we want to wipe.
The quantity of tokens to be wiped
100
The account identifier from which the tokens will be wiped
0.0.67890
Optional DAO configuration for the token wiping
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Sender information for the wipe operation
{"key":"PublicKey or KeyList","id":"AccountId"}
POST /hts/wipe/token/{token} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 170
{
"amount": 100,
"account_id": "0.0.67890",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
},
"sender": {
"key": "PublicKey or KeyList",
"id": "AccountId"
}
}
{}
Hashgraph HTS Mirror Node Operations
Returns Hashgraph.Restful.HTS.Info.Entity containing detailed token information
The unique identifier of the token to fetch.
Optional timestamp to fetch historical token info.
GET /mirrors/hts/tokens/{token} HTTP/1.1
Host:
Accept: */*
{
"admin_key": {
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"auto_renew_account": "0.0.1234567",
"auto_renew_period": 7776000,
"created_timestamp": "2023-01-01T00:00:00.000Z",
"decimals": "8",
"deleted": false,
"expiry_timestamp": 1735689600,
"fee_schedule_key": {
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"freeze_default": false,
"freeze_key": {
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"initial_supply": "1000000",
"kyc_key": {
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"max_supply": "100000000",
"modified_timestamp": "2023-01-01T12:00:00.000Z",
"name": "My Token",
"memo": "Token for testing purposes",
"pause_key": {
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"pause_status": "UNPAUSED",
"supply_key": {
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"supply_type": "FINITE",
"symbol": "TKN",
"token_id": "0.0.1234567",
"total_supply": "1000000",
"treasury_account_id": "0.0.1234568",
"type": "FUNGIBLE_COMMON",
"wipe_key": {
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"custom_fees": {
"created_timestamp": "2023-01-01T00:00:00.000Z",
"fixed_fees": [],
"fractional_fees": []
}
}
Returns Hashgraph.Restful.HTS.Balance.Response containing token balances
The unique identifier of the token to fetch balances for.
Filter results by account balance.
Filter results by account id.
Filter results by account public key.
Limit the number of results returned.
Specify the order of results (e.g., "asc" or "desc").
Fetch token balances at a specific historical timestamp.
GET /mirrors/hts/tokens/{token}/balances HTTP/1.1
Host:
Accept: */*
{
"timestamp": "2023-05-17T12:34:56.789Z",
"balances": [
{
"account": "0.0.1234567",
"balance": 1000000,
"tokens": [
{
"token_id": "0.0.1234",
"balance": 1000000
}
]
}
],
"links": {
"next": "https://api.example.com/results?page=2"
}
}
Returns Hashgraph.Restful.HTS.Nft.Response containing NFT information
The unique identifier of the token to fetch NFT info for.
Filter results by account id.
Limit the number of results returned.
Specify the order of results (e.g., "asc" or "desc").
Filter results by NFT serial number.
GET /mirrors/hts/tokens/{token}/nfts HTTP/1.1
Host:
Accept: */*
{
"nfts": [
[
{
"account_id": "0.1.2",
"created_timestamp": "1234567890.0006660001",
"delegating_spender": "0.0.400",
"deleted": false,
"metadata": "VGhpcyBpcyBhIHRlc3QgTkZU",
"modified_timestamp": "1610682445.003266001",
"serial_number": 124,
"spender_id": "0.0.500",
"token_id": "0.0.222"
}
]
],
"links": {
"next": null
}
}
Returns Hashgraph.Restful.HTS.Nft.Response containing NFT information
The unique identifier of the token.
The serial number of the specific NFT to fetch.
GET /mirrors/hts/tokens/{token}/nfts/{serialNumber} HTTP/1.1
Host:
Accept: */*
{
"nfts": [
[
{
"account_id": "0.1.2",
"created_timestamp": "1234567890.0006660001",
"delegating_spender": "0.0.400",
"deleted": false,
"metadata": "VGhpcyBpcyBhIHRlc3QgTkZU",
"modified_timestamp": "1610682445.003266001",
"serial_number": 124,
"spender_id": "0.0.500",
"token_id": "0.0.222"
}
]
],
"links": {
"next": null
}
}
Returns Hashgraph.Restful.Transactions.Transfer.Nft containing NFT transaction history
The unique identifier of the token.
The serial number of the specific NFT.
Filter transactions by account id.
Limit the number of transactions returned.
Specify the order of transactions (e.g., "asc" or "desc").
Fetch transaction history up to a specific timestamp.
GET /mirrors/hts/tokens/{token}/nfts/transactions HTTP/1.1
Host:
Accept: */*
{
"is_approval": false,
"receiver_account_id": "0.0.12345",
"sender_account_id": "0.0.54321",
"serial_number": 1,
"token_id": "0.0.789"
}
Hashgraph Transactions
Hashgraph.Restful.Transactions.Transaction.Details
Filter by transaction nonce (0 for user transactions, non-zero for node transactions)
Filter by scheduled status (true/false)
GET /mirrors/transactions/{transaction} HTTP/1.1
Host:
Accept: */*
{
"bytes": "0a1022220a1008921b22a01",
"charged_tx_fee": 500000,
"consensus_timestamp": "1234567890.123456789",
"entity_id": "0.0.123456",
"max_fee": "1000000",
"memo_base64": "VHJhbnNmZXIgdG8gQWxpY2U=",
"name": "CRYPTOTRANSFER",
"nft_transfers": [
{
"token_id": "0.0.123456",
"serial_number": 1,
"sender_account_id": "0.0.123456",
"receiver_account_id": "0.0.789012"
}
],
"node": "0.0.3",
"nonce": 5,
"parent_consensus_timestamp": "1234567890.123456789",
"result": "SUCCESS",
"scheduled": false,
"staking_reward_transfers": [
{
"account_id": "0.0.123456",
"amount": "100000000"
}
],
"token_transfers": [
{
"token_id": "0.0.123456",
"account": "0.0.789012",
"amount": "1000"
}
],
"transaction_hash": "0x3a5a6e...",
"transaction_id": "[email protected]",
"transfers": [
{
"account": "0.0.123456",
"amount": "1000000000"
}
],
"valid_duration_seconds": "120",
"valid_start_timestamp": "1234567890.123456789",
"assessed_custom_fees": [
{
"amount": "1000000",
"collector_account_id": "0.0.123456",
"effective_payer_account_ids": [
"0.0.789012"
],
"token_id": "0.0.234567"
}
]
}
Hashgraph.Commons.StateProof.Response.Compact
Filter by transaction nonce
Filter by scheduled status
GET /mirrors/transactions/{transaction}/stateproof HTTP/1.1
Host:
Accept: */*
{
"address_books": [
"0.0.3",
"0.0.4",
"0.0.5"
],
"record_file": {
"head": "0.0.3-2023-04-15T14:30:00Z",
"start_running_hash_object": "0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p",
"end_running_hash_object": "9z8y7x6w5v4u3t2s1r0q9p8o7n6m5l4k",
"hashes_before": [
[
"hash1",
"hash2",
"hash3"
]
],
"hashes_after": [
[
"hash4",
"hash5",
"hash6"
]
],
"record_stream_object": "0x1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p",
"block_number": "123456"
},
"signature_files": {
"0.0.3": "signature_data_1",
"0.0.4": "signature_data_2"
},
"version": 1
}
Hashgraph.Restful.Transactions.Schedule.Entity
Scheduled transaction ID
0.0.1234
GET /mirrors/transactions/schedules/{schedule} HTTP/1.1
Host:
Accept: */*
{
"admin_key": {
"key": "302a300506032b6570032100e0c8ec2758a5879ffac226a13c0c516b799e72e35141a0dd828f94d37988a4b7"
},
"consensus_timestamp": "1234567890.123456789",
"creator_account_id": "0.0.123456",
"deleted": false,
"executed_timestamp": "1234567890.123456789",
"expiration_time": "1234567890.123456789",
"memo": "Multi-signature token transfer schedule",
"payer_account_id": "0.0.123456",
"schedule_id": "0.0.123456",
"signatures": [
{
"public_key_prefix": "0x02b6...",
"signature": "0x1a2b...",
"type": "ED25519"
}
],
"transaction_body": "{\"transactionID\":{\"accountID\":{\"shardNum\":0,\"realmNum\":0,\"accountNum\":789012},\"transactionValidStart\":{\"seconds\":1234567890,\"nanos\":123456789}},\"nodeAccountID\":{\"shardNum\":0,\"realmNum\":0,\"accountNum\":3},\"transactionFee\":100000000,\"transactionValidDuration\":{\"seconds\":120},\"cryptoTransfer\":{\"transfers\":{\"accountAmounts\":[{\"accountID\":{\"shardNum\":0,\"realmNum\":0,\"accountNum\":789012},\"amount\":-1000000000},{\"accountID\":{\"shardNum\":0,\"realmNum\":0,\"accountNum\":456789},\"amount\":1000000000}]}}}",
"wait_for_expiry": false
}
Queries a Hashgraph.Transaction by its TransactionId
Hashgraph.Transaction.Id
GET /transactions/query/{transaction} HTTP/1.1
Host:
Accept: */*
{
"receipt": {
"status": "SUCCESS",
"accountId": "0.0.1234"
},
"transactionHash": "0x1a2b3c4d...",
"consensusTimestamp": {
"seconds": 1634325282,
"nanos": 134000000
},
"transactionId": "[email protected]",
"transactionMemo": "Transfer to Alice",
"transactionFee": "0.1 ℏ",
"transfers": [
{
"accountId": "0.0.1234",
"amount": "10"
},
{
"accountId": "0.0.5678",
"amount": "-10"
}
],
"contractFunctionResult": {
"contractId": "0.0.1234",
"gasUsed": 50000,
"bloom": "0x...",
"logs": []
},
"tokenTransfers": {
"0.0.1000": {
"0.0.1234": 100,
"0.0.5678": -100
}
},
"tokenTransfersList": [
{
"tokenId": "0.0.1000",
"accountId": "0.0.1234",
"amount": 100
},
{
"tokenId": "0.0.1000",
"accountId": "0.0.5678",
"amount": -100
}
],
"scheduleRef": "0.0.2345",
"assessedCustomFees": [
{
"amount": 5,
"tokenId": "0.0.1000",
"feeCollectorAccountId": "0.0.9876"
}
],
"nftTransfers": {
"0.0.1000": {
"0.0.1234": [
"0.0.1000/1",
"0.0.1000/2"
],
"0.0.5678": [
"0.0.1000/3"
]
}
},
"automaticTokenAssociations": [
{
"tokenId": "0.0.1000",
"accountId": "0.0.1234"
}
],
"parentConsensusTimestamp": {
"seconds": 1634325282,
"nanos": 134000000
},
"aliasKey": "302a300506032b6570032100e0c8ec2758a5879ffac226a13c0c516b799e72e35141a0dd828f94d37988a4b7",
"duplicates": [
[]
],
"children": [
[]
],
"ethereumHash": "0x1a2b3c4d...",
"paidStakingRewards": [
{
"accountId": "0.0.1234",
"amount": "1.5"
}
],
"prngBytes": "0x1a2b3c4d...",
"prngNumber": 42,
"evmAddress": "0x1a2b3c4d5e6f7g8h9i0j",
"newPendingAirdrops": [
{
"tokenId": "0.0.1000",
"accountId": "0.0.1234",
"amount": 100
}
]
}
Queries a Hashgraph.Transaction.Receipt by its TransactionId
Hashgraph.Transaction.Id
GET /transactions/receipt/{transaction} HTTP/1.1
Host:
Accept: */*
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
"[Circular Reference]"
],
"children": [
"[Circular Reference]"
],
"nodeId": 3
}
],
"children": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
"[Circular Reference]"
],
"children": [
"[Circular Reference]"
],
"nodeId": 3
}
],
"children": [
"[Circular Reference]"
],
"nodeId": 3
}
],
"nodeId": 3
}
],
"children": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
"[Circular Reference]"
],
"children": [
"[Circular Reference]"
],
"nodeId": 3
}
],
"children": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
{
"status": "SUCCESS",
"accountId": "0.0.1234",
"fileId": "0.0.5678",
"contractId": "0.0.9012",
"topicId": "0.0.3456",
"tokenId": "0.0.7890",
"scheduleId": "0.0.2345",
"exchangeRate": {},
"nextExchangeRate": {},
"topicSequenceNumber": 42,
"topicRunningHash": "Ynl0ZXM=",
"totalSupply": 1000000,
"scheduledTransactionId": "[email protected]",
"serials": [
1,
2,
3,
4,
5
],
"duplicates": [
"[Circular Reference]"
],
"children": [
"[Circular Reference]"
],
"nodeId": 3
}
],
"children": [
"[Circular Reference]"
],
"nodeId": 3
}
],
"nodeId": 3
}
],
"nodeId": 3
}
Hashgraph Accounts
Creates a new account on the Hashgraph network with specified initial settings, including initial balance and key.
Validator consensus timestamp
Memo
The sender account details
Initial balance of the account in tinybars
Maximum number of tokens that can be associated with this account automatically
Whether the receiver signature is required for transfers to this account
Whether this is an offline transaction
Optional DAO configuration for the account creation
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /accounts HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 247
{
"validatorConsensusTimestamp": "text",
"memo": "text",
"sender": {},
"balance": 1,
"maxAutomaticTokenAssociations": 1,
"isReceiverSignatureRequired": true,
"isOfflineTransaction": true,
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Retrieves detailed information about a specific Hashgraph account, including balance, associated tokens, and other account properties.
The Hashgraph account ID in the format 0.0.12345
GET /accounts/{wallet} HTTP/1.1
Host:
Accept: */*
{
"balance": "1000000000",
"accountId": "0.0.12345",
"contractAccountId": "0.0.54321",
"isDeleted": false,
"proxyAccountId": "0.0.67890",
"proxyReceived": "500000000",
"key": "302a300506032b6570032100e0c8ec2758a5879ffac226a13c0c516b799e72e35141a0dd828f94d37988a4b7",
"sendRecordThreshold": "1000000",
"receiveRecordThreshold": "2000000",
"isReceiverSignatureRequired": true,
"expirationTime": "2023-12-31T23:59:59.999Z",
"autoRenewPeriod": {
"seconds": {
"low": 1,
"high": 1,
"unsigned": true
}
},
"accountMemo": "This is a test account",
"ownedNfts": "5",
"maxAutomaticTokenAssociations": "10",
"aliasKey": "0x1234567890abcdef",
"ledgerId": "mainnet",
"ethereumNonce": "42",
"stakingInfo": {
"declineStakingReward": true,
"stakePeriodStart": "text",
"pendingReward": "text",
"stakedToMe": "text",
"stakedAccountId": "text",
"stakedNodeId": "text"
}
}
Deletes an account from the Hashgraph network, transferring any remaining funds to a specified account.
The Hashgraph account ID to be deleted, in the format 0.0.12345
Account ID to receive remaining balance upon deletion
0.0.123456
Optional sender account details
DAO configuration for deletion governance
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
DELETE /accounts/{wallet} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 120
{
"transferAccountId": "0.0.123456",
"sender": {},
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Modifies various properties of a Hashgraph account, such as memo, token associations, and staking preferences.
The Hashgraph account ID to be updated, in the format 0.0.12345
Optional memo to be associated with the account
Updated account settings for Q2
Optional maximum number of automatic token associations
5
Optional flag indicating if receiver signature is required
true
Optional staking node identifier
123
Optional sender account details
{"key":"PublicKey or KeyList instance","id":"AccountId instance"}
Optional DAO configuration for the account update
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
PUT /accounts/{wallet} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 278
{
"memo": "Updated account settings for Q2",
"maxAutomaticTokenAssociations": 5,
"isReceiverSignatureRequired": true,
"stakingNode": 123,
"sender": {
"key": "PublicKey or KeyList instance",
"id": "AccountId instance"
},
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Retrieves the balance of a Hashgraph account, either in HBAR or for a specific token if provided.
The Hashgraph account ID to query, in the format 0.0.12345
Optional token ID to query the balance for
GET /accounts/{wallet}/balance HTTP/1.1
Host:
Accept: */*
{
"wallet": "0.0.1234",
"hbars": {},
"tokens": [
{
"tokenId": "0.0.1234",
"balance": "1000.55",
"decimals": "8"
}
]
}
Retrieves the public key associated with a specific Hashgraph account, which is crucial for various cryptographic operations.
The Hashgraph account ID in the format 0.0.12345
GET /accounts/{wallet}/publicKey HTTP/1.1
Host:
Accept: */*
text
Approve allowances for accounts, supporting HBAR, token and NFT allowances
POST /accounts/allowance/approve HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
{}
Delete NFT allowances for accounts
POST /accounts/allowance/delete HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
{}
Perform an atomic swap of tokens and/or HBAR between accounts. The swap either succeeds or fails atomically.
The account ID of the sender initiating the atomic swap
0.0.123456
The account ID of the receiver in the atomic swap
0.0.789012
The unique identifier of the token being swapped
0.0.345678
The number of decimal places for the token being swapped
8
The amount of tokens to be swapped
100
An optional memo to include with the atomic swap
Atomic swap for Project X
Optional DAO configuration for the atomic swap
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
The sender account details
POST /accounts/transfer/atomic-swap HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 210
{
"from": "0.0.123456",
"to": "0.0.789012",
"token_id": "0.0.345678",
"decimals": 8,
"amount": 100,
"memo": "Atomic swap for Project X",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
},
"sender": {}
}
{}
Transfer HBAR from one account to another. Requires sender, receiver, and amount details.
The amount of HBAR to transfer
100
The account ID of the sender
0.0.12345
The account ID of the receiver
0.0.67890
An optional memo to include with the transfer
Payment for services
The sender account details
Optional DAO configuration for the HBAR transfer
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
POST /accounts/transfer/hbar HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 166
{
"amount": 100,
"from": "0.0.12345",
"to": "0.0.67890",
"memo": "Payment for services",
"sender": {},
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Transfer a specific NFT from one account to another. Requires NFT ID, sender, receiver, and serial number.
The unique identifier of the NFT token to be transferred
0.0.12345
The account ID of the sender
0.0.67890
The account ID of the receiver
0.0.11111
The unique serial number of the specific NFT to be transferred
1
An optional memo to include with the transfer
NFT transfer memo
Optional DAO configuration for the NFT transfer
{"topicId":"0.0.12345","consensusTimestamp":"1234567890.123456789"}
Optional sender configuration
POST /accounts/transfer/nft HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 186
{
"nft": "0.0.12345",
"from": "0.0.67890",
"to": "0.0.11111",
"serial_number": 1,
"memo": "NFT transfer memo",
"dao": {
"topicId": "0.0.12345",
"consensusTimestamp": "1234567890.123456789"
},
"sender": {}
}
{}
Transfer a specific amount of tokens from one account to another. Requires token ID, sender, receiver, amount, and token decimals.
The unique identifier of the fungible token to be transferred
0.0.12345
The account ID of the sender
0.0.67890
The account ID of the receiver
0.0.11111
The amount of tokens to transfer
100
The number of decimal places for the token
2
An optional memo to include with the transfer
Transfer memo
Optional DAO configuration for the fungible token transfer
{"consensusTimestamp":"1234567890.123456789"}
POST /accounts/transfer/token HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 161
{
"token_id": "0.0.12345",
"from": "0.0.67890",
"to": "0.0.11111",
"amount": 100,
"decimals": 2,
"memo": "Transfer memo",
"dao": {
"consensusTimestamp": "1234567890.123456789"
}
}
{}
Hashgraph Accounts Mirror Node Operations
Hashgraph.Restful.Accounts.Info
The account ID of the wallet to fetch information for
The maximum number of items to return in the response
The order in which items are listed (ascending or descending)
The consensus timestamp in seconds.nanoseconds format with an optional comparison operator
If set to false, transactions will not be included in the response
The type of transaction to filter by (e.g., cryptoTransfer, consensusMessage)
GET /mirrors/accounts/{wallet} HTTP/1.1
Host:
Accept: */*
{
"account": "0.0.123456",
"alias": "my-account-alias",
"auto_renew_period": 7776000,
"balance": {
"timestamp": "2023-04-15T14:30:00Z",
"balance": 1000000000,
"tokens": [
{
"token_id": "0.0.1234",
"balance": 1000000
}
]
},
"created_timestamp": "2023-01-01T00:00:00.000Z",
"decline_reward": false,
"deleted": false,
"ethereum_nonce": 0,
"evm_address": "binary",
"expiry_timestamp": "2024-01-01T00:00:00.000Z",
"key": {
"_type": "ED25519",
"key": "302a300506032b6570032100114e6abc371b82dab5c15ea149f02d34a012087b163516dd70f44acafabf7777"
},
"max_automatic_token_associations": 0,
"memo": "Account memo",
"pending_reward": 0,
"receiver_sig_required": false,
"staked_account_id": "0.0.789012",
"staked_node_id": 0,
"stake_period_start": "2023-01-01T00:00:00.000Z"
}
Hashgraph.Restful.HTS.Nft.Response
The account ID of the wallet to fetch NFTs for
GET /mirrors/accounts/{wallet}/nfts HTTP/1.1
Host:
Accept: */*
{
"nfts": [
[
{
"account_id": "0.1.2",
"created_timestamp": "1234567890.0006660001",
"delegating_spender": "0.0.400",
"deleted": false,
"metadata": "VGhpcyBpcyBhIHRlc3QgTkZU",
"modified_timestamp": "1610682445.003266001",
"serial_number": 124,
"spender_id": "0.0.500",
"token_id": "0.0.222"
}
]
],
"links": {
"next": null
}
}
Hashgraph.Restful.Staking.Reward.Response
The account ID of the wallet to fetch staking rewards for
The maximum number of items to return in the response
The order in which items are listed (ascending or descending)
The consensus timestamp in seconds.nanoseconds format for filtering results
GET /mirrors/accounts/{wallet}/rewards HTTP/1.1
Host:
Accept: */*
{
"rewards": [
{
"account_id": "0.0.1234",
"amount": 100000000,
"timestamp": "2023-01-01T00:00:00.000Z"
},
{
"account_id": "0.0.5678",
"amount": 50000000,
"timestamp": "2023-01-01T00:00:00.000Z"
}
],
"links": {
"next": "https://api.hedera.com/api/v1/staking/rewards?page=2"
}
}
Hashgraph.Restful.HTS.Relationship.Entity
The account ID of the wallet to fetch token relationships for
The maximum number of items to return in the response
The order in which items are listed (ascending or descending)
The specific token ID to filter the relationships by
GET /mirrors/accounts/{wallet}/tokens HTTP/1.1
Host:
Accept: */*
{
"automatic_association": true,
"balance": 1000,
"created_timestamp": "2023-05-17T12:34:56.789Z",
"decimals": 2,
"freeze_status": "UNFROZEN",
"kyc_status": "GRANTED",
"token_id": "0.0.1234"
}
Built with ❤️ by the HbarSuite Team Copyright © 2024 HbarSuite. All rights reserved.
Last updated