Skip to main content

Transactions

This component of the REST API allows one to send (broadcast) Transactions to the Blockchain and query information about them.

POST Send Transaction

https://gateway.multiversx.com/transaction/send

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

Body Parameters

ParamRequiredTypeDescription
nonceREQUIREDnumberThe Nonce of the Sender.
valueREQUIREDstringThe Value to transfer, as a string representation of a Big Integer (can be "0").
receiverREQUIREDstringThe Address (bech32) of the Receiver.
senderREQUIREDstringThe Address (bech32) of the Sender.
guardianOPTIONALstringThe Address (bech32) of the Guardian.
senderUsernameOPTIONALstringThe base64 string representation of the Sender's username.
receiverUsernameOPTIONALstringThe base64 string representation of the Receiver's username.
gasPriceREQUIREDnumberThe desired Gas Price (per Gas Unit).
gasLimitREQUIREDnumberThe maximum amount of Gas Units to consume.
dataOPTIONALstringThe base64 string representation of the Transaction's message (data).
signatureREQUIREDstringThe Signature (hex-encoded) of the Transaction.
guardianSignatureOPTIONALstringThe Guardian's Signature (hex-encoded) of the Transaction.
chainIDREQUIREDstringThe Chain identifier.
versionREQUIREDnumberThe Version of the Transaction (e.g. 1).
optionsOPTIONALnumberThe Options of the Transaction (e.g. 1).
caution

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://gateway.multiversx.com/transaction/send HTTP/1.1
Content-Type: application/json
{
"nonce": 42,
"value": "100000000000000000",
"receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
"sender": "erd1njqj2zggfup4nl83x0nfgqjkjserm7mjyxdx5vzkm8k0gkh40ezqtfz9lg",
"gasPrice": 1000000000,
"gasLimit": 70000,
"data": "Zm9vZCBmb3IgY2F0cw==", #base64 representation of "food for cats"
"signature": "93207c579bf57be03add632b0e1624a73576eeda8a1687e0fa286f03eb1a17ffb125ccdb008a264c402f074a360442c7a034e237679322f62268b614e926d10f",
"chainId": "1",
"version": 1
}
info

More information about sending a guarded transaction can be found here: Guarded Accounts

POST Send Multiple Transactions

https://gateway.multiversx.com/transaction/send-multiple

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

Body Parameters

Array of:

ParamRequiredTypeDescription
nonceREQUIREDnumberThe Nonce of the Sender.
valueREQUIREDstringThe Value to transfer, as a string representation of a Big Integer (can be "0").
receiverREQUIREDstringThe Address (bech32) of the Receiver.
senderREQUIREDstringThe Address (bech32) of the Sender.
senderUsernameOPTIONALstringThe base64 string representation of the Sender's username.
receiverUsernameOPTIONALstringThe base64 string representation of the Receiver's username.
gasPriceREQUIREDnumberThe desired Gas Price (per Gas Unit).
gasLimitREQUIREDnumberThe maximum amount of Gas Units to consume.
dataOPTIONALstringThe base64 string representation of the Transaction's message (data).
signatureREQUIREDstringThe Signature (hex-encoded) of the Transaction.
chainIDREQUIREDstringThe Chain identifier.
versionREQUIREDnumberThe Version of the Transaction (e.g. 1).
optionsOPTIONALnumberThe Options of the Transaction (e.g. 1).
caution

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://gateway.multiversx.com/transaction/send-multiple HTTP/1.1

Content-Type: application/json

[
{
"nonce": 42,
"value": "100000000000000000",
"receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
"sender": "erd1njqj2zggfup4nl83x0nfgqjkjserm7mjyxdx5vzkm8k0gkh40ezqtfz9lg",
"gasPrice": 1000000000,
"gasLimit": 70000,
"data": "Zm9vZCBmb3IgY2F0cw==", #base64 representation of "food for cats"
"signature": "93207c579bf57be03add632b0e1624a73576eeda8a1687e0fa286f03eb1a17ffb125ccdb008a264c402f074a360442c7a034e237679322f62268b614e926d10f",
"chainId": "1",
"version": 1
}
{
"nonce": 43,
"value": "100000000000000000",
"receiver": "erd1cux02zersde0l7hhklzhywcxk4u9n4py5tdxyx7vrvhnza2r4gmq4vw35r",
"sender": "erd1rhp4q3qlydyrrjt7dgpfzxk8n4f7yrat4wc6hmkmcnmj0vgc543s8h7hyl",
"gasPrice": 1000000000,
"gasLimit": 70000,
"data": "YnVzIHRpY2tldHM=", #base64 representation of "bus tickets"
"signature": "01535fd1d40d98b7178ccfd1729b3f526ee4542482eb9f591d83433f9df97ce7b91db07298b1d14308e020bba80dbe4bba8617a96dd7743f91ee4b03d7f43e00",
"chainID": "1",
"version": 1
}
]

POST Simulate Transaction

Nodes and observers

https://gateway.multiversx.com/transaction/simulate

This endpoint allows one to send a signed Transaction to the Blockchain in order to simulate its execution. This can be useful in order to check if the transaction will be successfully executed before actually sending it. It receives the same request as the /transaction/send endpoint.

Move balance successful transaction simulation

Body Parameters

ParamRequiredTypeDescription
nonceREQUIREDnumberThe Nonce of the Sender.
valueREQUIREDstringThe Value to transfer, as a string representation of a Big Integer (can be "0").
receiverREQUIREDstringThe Address (bech32) of the Receiver.
senderREQUIREDstringThe Address (bech32) of the Sender.
senderUsernameOPTIONALstringThe base64 string representation of the Sender's username.
receiverUsernameOPTIONALstringThe base64 string representation of the Receiver's username.
gasPriceREQUIREDnumberThe desired Gas Price (per Gas Unit).
gasLimitREQUIREDnumberThe maximum amount of Gas Units to consume.
dataOPTIONALstringThe base64 string representation of the Transaction's message (data).
signatureREQUIREDstringThe Signature (hex-encoded) of the Transaction.
chainIDREQUIREDstringThe Chain identifier.
versionREQUIREDnumberThe Version of the Transaction (e.g. 1).
optionsOPTIONALnumberThe Options of the Transaction (e.g. 1).

Proxy

On the Proxy side, if the transaction to simulate is a cross-shard one, then the response format will contain two elements called senderShard and receiverShard which are of type SimulationResults explained above.

Example response for cross-shard transactions:

{
"data": {
"receiverShard": {
"status": "success",
"hash": "bb24ccaa2da8cddd6a3a8eb162e6ff62ad4f6e1914d9aa0cacde6772246ca2dd"
},
"senderShard": {
"status": "success",
"hash": "bb24ccaa2da8cddd6a3a8eb162e6ff62ad4f6e1914d9aa0cacde6772246ca2dd"
}
},
"error": "",
"code": "successful"
}

POST Estimate Cost of Transaction

https://gateway.multiversx.com/transaction/cost

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

Body Parameters

ParamRequiredTypeDescription
valueREQUIREDstringThe Value to transfer, as a string representation of a Big Integer (can be "0").
receiverREQUIREDstringThe Address (bech32) of the Receiver.
senderREQUIREDstringThe Address (bech32) of the Sender.
dataOPTIONALstringThe base64 string representation of the Transaction's message (data).
chainIDREQUIREDstringThe Chain identifier.
versionREQUIREDnumberThe Version of the Transaction (e.g. 1).
nonceOPTIONALnumberThe Sender nonce.
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://gateway.multiversx.com/transaction/cost HTTP/1.1
Content-Type: application/json

{
"value": "100000",
"receiver": "erd188nydpkagtpwvfklkl2tn0w6g40zdxkwfgwpjqc2a2m2n7ne9g8q2t22sr",
"sender": "erd1l453hd0gt5gzdp7czpuall8ggt2dcv5zwmfdf3sd3lguxseux2fsmsgldz",
"data": "dGhpcyBpcyBhbiBleGFtcGxl", #base64 representation of "this is an example"
"chainID": "1",
"version": 1,
"nonce": 1
}

GET Get Transaction

https://gateway.multiversx.com/transaction/:txHash

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

Path Parameters

ParamRequiredTypeDescription
txHashREQUIREDstringThe hash (identifier) of the Transaction.

Query Parameters

ParamRequiredTypeDescription
senderOPTIONALstringThe Address of the sender - a hint to optimize the request.
withResultsOPTIONALboolBoolean parameter to specify if smart contract results and other details should be returned.
important

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

GET Get Transaction Shallow Status

https://gateway.multiversx.com/transaction/:txHash/status

This endpoint allows one to query the shallow status of a transaction. For more details, see this.

Path Parameters

ParamRequiredTypeDescription
txHashREQUIREDstringThe hash (identifier) of the Transaction.

Query Parameters

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

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

GET Get Transaction Process Status

https://gateway.multiversx.com/transaction/:txHash/process-status

This endpoint allows one to query the process status of a transaction. For more details, see this.

Path Parameters

ParamRequiredTypeDescription
txHashREQUIREDstringThe hash (identifier) of the Transaction.

GET Get Transactions Pool

http://local-proxy-instance/transaction/pool

caution

This endpoint isn't available on public gateway. However, it can be used on a local proxy instance, by setting AllowEntireTxPoolFetch to true

This endpoint allows one to fetch the entire transactions pool, merging the pools from each shard.

Default

Example:

http://local-proxy-instance/transaction/pool

Using custom fields

Query Parameters

ParamRequiredTypeDescription
fieldsOPTIONALstringA list of the fields to be included.
shard-idOPTIONALstringA specific shard id(0, 1, 2 etc. or 4294967295 for Metachain)

As seen above, if the fields item is empty, only the transaction hash will be displayed.

If the shard-id item is used, only the transactions from that specific shard's pool will be displayed.

Example request with shard id and fields:

https://gateway.multiversx.com/transaction/pool?shard-id=0&fields=sender,receiver,value

All possible values for fields item are:

  • hash
  • nonce
  • sender
  • receiver
  • gaslimit
  • gasprice
  • receiverusername
  • data
  • value

GET Get Transactions Pool for a Sender

https://gateway.multiversx.com/transaction/pool?by-sender=:sender:

This endpoint allows one to fetch all the transactions of a sender from the transactions pool.

Default

Query Parameters

ParamRequiredTypeDescription
by-senderREQUIREDstringThe Address of the sender.

Example:

https://gateway.multiversx.com/transaction/pool?by-sender=erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th

Using custom fields

Query Parameters

ParamRequiredTypeDescription
by-senderREQUIREDstringThe Address of the sender.
fieldsOPTIONALstringA list of the fields to be included.

As seen above, if the fields item is empty, only the transaction hash will be displayed.

Example request with fields:

https://gateway.multiversx.com/transaction/pool?by-sender=erd1at9...&fields=sender,receiver,value

All possible values for fields item are:

  • hash
  • nonce
  • sender
  • receiver
  • gaslimit
  • gasprice
  • receiverusername
  • data
  • value

GET Get the latest nonce of a sender from Tx Pool

https://gateway.multiversx.com/transaction/pool?by-sender=:sender:&last-nonce=true

This endpoint allows one to fetch the latest nonce of a sender from the transactions pool.

Query Parameters

ParamRequiredTypeDescription
by-senderREQUIREDstringThe Address of the sender.
last-nonceREQUIREDboolSpecifies if the last nonce has to be returned.

GET Get the nonce gaps of a sender from Tx Pool

https://gateway.multiversx.com/transaction/pool?by-sender=:sender:&nonce-gaps=true

This endpoint allows one to fetch the nonce gaps of a sender from the transactions pool.

Query Parameters

ParamRequiredTypeDescription
by-senderREQUIREDstringThe Address of the sender.
nonce-gapsREQUIREDboolSpecifies if the nonce gaps should be returned.