Docs

Docs

  • Develop
  • Validate
  • Integrate
  • Learn

โ€บREST API

Welcome to Elrond

  • Welcome to Elrond

Technology

  • Architecture Overview
  • Entities
  • Chronology
  • Secure Proof of Stake
  • Adaptive State Sharding
  • The Arwen WASM VM
  • Cross Shard Transactions

Wallet

  • Web Wallet
  • Ledger

Validators

  • Overview
  • System Requirements
  • Install a Mainnet Node

    • Scripts & User config
    • Installing a Validator Node
    • Optional Configurations
    • How to use the Docker Image

    Install a Testnet Node

    • Scripts & User config
    • Installing & updating
    • Manage your testnet node

    Install a Devnet Node

    • Scripts & User config
    • Installing & updating
    • Manage your devnet node

    Manage your keys

    • Validator Keys
    • Wallet Keys
    • Protecting your keys

    Staking, Unstaking, Unjailing

    • Staking, unstaking and unjailing
    • Staking
    • Unjailing
  • Rating
  • Node CLI
  • Useful Links & Tools
  • FAQs

Developers

    Tutorials

    • The Counter Smart Contract
    • Start Building - Crowdfunding Tutorial
    • The Crowdfunding Smart Contract (part 2)

    Signing Transactions

    • Signing Transactions
    • Tools for signing
    • Signing programmatically
  • ESDT tokens
  • The Staking Smart Contract
  • Developer reference

    • Mandos tests reference
    • The Elrond Serialization Format
  • Setup a Local Testnet
  • Setup a Local Testnet (advanced)
  • Creating Wallets

SDK and Tools

    REST API

    • REST API
    • Addresses
    • Transactions
    • Network
    • Nodes
    • Blocks
    • Virtual Machine
    • Versions and Changelog
  • Proxy
  • erdpy

    • erdpy
    • Installing erdpy
    • Configuring erdpy
    • erdpy CLI
    • Deriving the Wallet PEM file
    • Sending bulk transactions
    • Writing and running erdpy scripts
  • erdjs
  • erdgo
  • erdjava
  • erdwalletjs-cli

Integrators

  • Observing Squad
  • Accounts Management
  • Creating Transactions
  • Querying the Blockchain

Detailed comparison

  • Overview
  • Elrond vs. Ethereum Serenity
  • Elrond vs. Zilliqa
  • Elrond vs. Dfinity
  • Elrond vs. Algorand
  • Elrond vs. Harmony

Transactions

Send Transactions to the Blockchain and query information about them.

POST Send Transaction

https://api.elrond.com/transaction/send

This endpoint allows one to send a signed Transaction to the Blockchain.

Request
Response

Body Parameters

ParamRequiredTypeDescription
versionREQUIREDnumberThe Version of the Transaction (e.g. 1).
chainIDREQUIREDstringThe Chain identifier.
nonceREQUIREDnumberThe Nonce of the Sender.
valueREQUIREDstringThe Value to transfer (can be zero).
senderREQUIREDstringThe Address (bech32) of the Sender.
receiverREQUIREDstringThe Address (bech32) of the Receiver.
gasPriceREQUIREDnumberThe desired Gas Price (per Gas Unit).
gasLimitREQUIREDnumberThe maximum amount of Gas Units to consume.
dataOPTIONALstringThe message (data) of the Transaction.
signatureREQUIREDstringThe Signature (hex-encoded) of the Transaction.

๐ŸŸข 200: OK

Transaction sent with success. A Transaction Hash is returned.

{
"txHash": "6c41c71946b5b428c2cfb560e3ea425f8a00345de4bb2eb1b784387790914277"
}

๐Ÿ”ด 400: Bad request

Invalid Transaction signature.

{
"error": "transaction generation failed: ed25519: invalid signature"
}
warning

For Nodes (Observers or Validators with the HTTP API enabled), this endpoint only accepts transactions whose sender is in the Node's Shard.

Here's an example of a request:

POST https://api.elrond.com/transaction/send HTTP/1.1
Content-Type: application/json

{
    "version": 1,
    "chainId": "v1.0.141",
    "nonce": 42,
    "value": "100000000000000000",
    "receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
    "sender": "erd1njqj2zggfup4nl83x0nfgqjkjserm7mjyxdx5vzkm8k0gkh40ezqtfz9lg",
    "gasPrice": 1000000000,
    "gasLimit": 70000,
    "data": "food for cats",
    "signature": "93207c579bf57be03add632b0e1624a73576eeda8a1687e0fa286f03eb1a17ffb125ccdb008a264c402f074a360442c7a034e237679322f62268b614e926d10f"
}

POST Send Multiple Transactions

https://api.elrond.com/transaction/send-multiple

This endpoint allows one to send a bulk of Transactions to the Blockchain.

Request
Response

Body Parameters

ParamRequiredTypeDescription
versionREQUIREDnumberThe Version of the Transaction (e.g. 1).
chainIDREQUIREDstringThe Chain identifier.
nonceREQUIREDnumberThe Nonce, for each Transaction.
valueREQUIREDstringThe Value, for each Transaction.
senderREQUIREDstringThe Address of the Sender, for each Transaction.
receiverREQUIREDstringThe Address of the Receiver, for each Transaction.
gasPriceREQUIREDnumberThe Gas Price, for each Transaction.
gasLimitREQUIREDnumberThe Gas Limit, for each Transaction.
dataOPTIONALstringThe message (data), for each Transaction.
signatureREQUIREDstringThe Signature, for each Transaction.

๐ŸŸข 200: OK

A bulk of Transactions were successfully sent.

{
"numOfSentTxs": 2,
"txsHashes": {
"0": "6c41c71946b5b428c2cfb560e3ea425f8a00345de4bb2eb1b784387790914277",
"1": "fa8195bae93d4609a6fc5972a7a6176feece39a6c4821acae2276701aee12fb0"
}
}
warning

For Nodes (Observers or Validators with the HTTP API enabled), this endpoint only accepts transactions whose sender is in the Node's Shard.

Here's an example of a request:

POST https://api.elrond.com/transaction/send-multiple HTTP/1.1
Content-Type: application/json

[
    {
        "nonce": 42,
        "value": "100000000000000000",
        "receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
        "sender": "erd1njqj2zggfup4nl83x0nfgqjkjserm7mjyxdx5vzkm8k0gkh40ezqtfz9lg",
        "gasPrice": 1000000000,
        "gasLimit": 70000,
        "data": "food for cats",
        "chainId": "v1.0.141",
        "version": 1,
        "signature": "93207c579bf57be03add632b0e1624a73576eeda8a1687e0fa286f03eb1a17ffb125ccdb008a264c402f074a360442c7a034e237679322f62268b614e926d10f"
    },
    {
        "nonce": 43,
        "value": "100000000000000000",
        "receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
        "sender": "erd1rhp4q3qlydyrrjt7dgpfzxk8n4f7yrat4wc6hmkmcnmj0vgc543s8h7hyl",
        "gasPrice": 1000000000,
        "gasLimit": 70000,
        "data": "bus tickets",
        "chainID": "v1.0.141",
        "version": 1,
        "signature": "01535fd1d40d98b7178ccfd1729b3f526ee4542482eb9f591d83433f9df97ce7b91db07298b1d14308e020bba80dbe4bba8617a96dd7743f91ee4b03d7f43e00"
    }
]

POST Estimate Cost of Transaction

https://api.elrond.com/transaction/cost

This endpoint allows one to estimate the cost of a transaction.

Request
Response

Body Parameters

ParamRequiredTypeDescription
versionREQUIREDnumberThe Version of the Transaction (e.g. 1).
chainIDREQUIREDstringThe Chain identifier.
valueREQUIREDstringThe Value to transfer.
senderREQUIREDstringTThe Address of the Sender.
receiverREQUIREDstringThe Address of the Receiver.
dataOPTIONALstringThe message (data) of the Transaction.

๐ŸŸข 200: OK

The cost is estimated successfully.

{
"txGasUnits": "77000"
}
tip

This endpoint returns the cost on the transaction in gas units. The returned value can be used to fill in gasLimit field of the transaction.

Here's an example of a request:

POST https://api.elrond.com/transaction/cost HTTP/1.1
Content-Type: application/json

{
    "value": "100000",
    "sender": "erd1l453hd0gt5gzdp7czpuall8ggt2dcv5zwmfdf3sd3lguxseux2fsmsgldz",
    "receiver": "erd188nydpkagtpwvfklkl2tn0w6g40zdxkwfgwpjqc2a2m2n7ne9g8q2t22sr",
    "data": "this is an example",
    "chainID": "v1.0.141",
    "version": 1
}

GET Get Transaction

https://api.elrond.com/transaction/:txHash

This endpoint allows one to query the details of a Transaction.

Request
Response

Path Parameters

ParamRequiredTypeDescription
txHashREQUIREDstringThe hash (identifier) of the Transaction.

Query Parameters

ParamRequiredTypeDescription
senderOPTIONALstringThe Address of the sender - a hint to optimize the request.

๐ŸŸข 200: OK

Transaction details retrieved successfully.

{
"transaction": {
"type": "normal",
"nonce": 3,
"round": 186580,
"epoch": 12,
"value": "1000000000000000000",
"receiver": "erd1...",
"sender": "erd1...",
"gasPrice": 1000000000,
"gasLimit": 70000,
"data": "Zm9yIHRlc3Rz",
"signature": "1047...",
"sourceShard": 2,
"destinationShard": 1,
"blockNonce": 186535,
"miniblockHash": "e927...",
"blockHash": "50a1...",
"status": "executed"
}
}
important

The optional query parameter sender is only applicable to requests against the Proxy (not against the Observer Nodes).

GET Get Transaction Status

https://api.elrond.com/transaction/:txHash/status

This endpoint allows one to query the Status of a Transaction.

Request
Response

Path Parameters

ParamRequiredTypeDescription
txHashREQUIREDstringThe hash (identifier) of the Transaction.

Query Parameters

ParamRequiredTypeDescription
senderOPTIONALstringThe Address of the sender - a hint to optimize the request.

๐ŸŸข 200: OK

Transaction status retrieved successfully.

{
"status": "executed"
}
important

The optional query parameter sender is only applicable to requests against the Proxy (not against the Observer Nodes).

โ† AddressesNetwork โ†’
  • POST Send Transaction
  • POST Send Multiple Transactions
  • POST Estimate Cost of Transaction
  • GET Get Transaction
  • GET Get Transaction Status
Made withby the Elrond team.
GithubChat
Main siteWalletExplorerBridgeDocs