POSTsend_tx

NEAR Mainnethttps://near-mainnet.nodit.io/

Sends a signed transaction to the network, waits until the execution milestone set in wait_until, and returns the execution result at that point.

Put the borsh-serialized signed transaction, encoded in base64, in signed_tx_base64. If wait_until is omitted, the call waits until EXECUTED_OPTIMISTIC. With NONE, the transaction is only sent and final_execution_status: "NONE" is returned immediately. The node waits up to 10 seconds for the requested milestone and returns TIMEOUT_ERROR if it is not reached in time; in that case, query the status again with the tx method. A transaction that fails validation returns INVALID_TRANSACTION, and malformed base64 or borsh data returns PARSE_ERROR.

Request Body
jsonrpcstringrequired
idstringrequired

Request ID. Any string; it is returned unchanged in the response.

methodstringrequired
signed_tx_base64stringrequired

A borsh-serialized SignedTransaction, encoded in base64.

wait_untilstring (enum)

The execution milestone to wait for before returning a response. Defaults to EXECUTED_OPTIMISTIC. Each value further down is a later milestone.

  • NONE: The transaction is waiting to be included in a block.
  • INCLUDED: The transaction is included in a block (the block may not be finalized yet).
  • EXECUTED_OPTIMISTIC: Included in a block, and all non-refund receipts have executed (the blocks may not be finalized yet).
  • INCLUDED_FINAL: The transaction is included in a finalized block.
  • EXECUTED: Included in a finalized block, and all non-refund receipts have executed.
  • FINAL: Included in a finalized block, and all receipts, including refunds, are finalized.
Responses
jsonrpcstring

JSON-RPC version

idstring

Request ID

final_execution_statusstring (enum)

The execution milestone the transaction has reached. Values have the same meaning as the wait_until request parameter. When wait_until is NONE, only this field is returned.

statusobject

The final execution result of the transaction. On success it contains SuccessValue (the base64-encoded return value, or an empty string if nothing is returned); on failure it contains Failure (an object describing the cause). It is the string NotStarted if the transaction has not yet been converted to a receipt, and Started while execution is in progress.

transactionobject

The signed transaction as submitted.

signer_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

public_keystring

Base58-encoded public key prefixed with ed25519: or secp256k1:.

Example: ed25519:168vdqFUxij2yvsxYgAGoykJMX7tgrPKVCH484A8nHP

nonceinteger

The nonce of the access key used for signing.

receiver_idstring

NEAR account ID. A human-readable name (e.g. wrap.near) or a 64-character hex implicit account ID.

Example: wrap.near

actionsobject[]

The actions in the transaction. Each item is an object keyed by the action name, or a string such as CreateAccount. The action name is one of CreateAccount, DeployContract, FunctionCall, Transfer, Stake, AddKey, DeleteKey, DeleteAccount, Delegate, DelegateV2, DeployGlobalContract, DeployGlobalContractByAccountId, UseGlobalContract, UseGlobalContractByAccountId, DeterministicStateInit, TransferToGasKey, WithdrawFromGasKey, UniversalStateInit.

priority_feeinteger

Deprecated; retained for backward compatibility.

signaturestring

Transaction signature (base58 with an ed25519: or secp256k1: prefix)

hashstring

Base58-encoded 32-byte hash (block hash, chunk hash, transaction hash, etc.).

Example: 8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS

transaction_outcomeobject

The execution outcome of the transaction itself. The transaction is converted to the first receipt, and id is the transaction hash.

idstring

Base58-encoded 32-byte hash (block hash, chunk hash, transaction hash, etc.).

Example: 8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS

block_hashstring

Base58-encoded 32-byte hash (block hash, chunk hash, transaction hash, etc.).

Example: 8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS

outcomeobject

The execution outcome of the transaction.

executor_idstring

The account ID where execution took place: signer_id for a transaction, the receiver account for a receipt.

gas_burntinteger

The amount of gas burnt by the execution.

tokens_burntstring

The amount of tokens burnt for the gas used (yoctoNEAR, decimal string)

logsstring[]

Logs emitted during execution. NEP standard events are JSON strings prefixed with EVENT_JSON:.

receipt_idsstring[]

IDs of the receipts generated by this execution.

statusobject

Execution status. On success it contains SuccessValue (the base64-encoded return value) or SuccessReceiptId (the ID of the generated receipt); on failure it contains Failure (an object describing the cause). It is the string Unknown when the result is not known.

metadataobject

Versioned execution metadata. Contains version, gas_profile (gas used per cost item), and contracts (version 4 and later: for each action, the contract attached to the receiver account just before the action ran).

proofobject[]

The Merkle path that verifies the outcome against the block's outcome root. Each item has a hash and a direction (Left or Right).

receipts_outcomeobject[]

Execution outcomes of the receipts that followed from the transaction. Each item's id is a receipt ID, and the structure is the same as transaction_outcome.

idstring

Base58-encoded 32-byte hash (block hash, chunk hash, transaction hash, etc.).

Example: 8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS

block_hashstring

Base58-encoded 32-byte hash (block hash, chunk hash, transaction hash, etc.).

Example: 8EjuQRnAJiWkRmqxfexQFJWXXonuSMbz5AZziJLCWnWS

outcomeobject

The execution outcome of the receipt.

executor_idstring

The account ID where execution took place: signer_id for a transaction, the receiver account for a receipt.

gas_burntinteger

The amount of gas burnt by the execution.

tokens_burntstring

The amount of tokens burnt for the gas used (yoctoNEAR, decimal string)

logsstring[]

Logs emitted during execution. NEP standard events are JSON strings prefixed with EVENT_JSON:.

receipt_idsstring[]

IDs of the receipts generated by this execution.

statusobject

Execution status. On success it contains SuccessValue (the base64-encoded return value) or SuccessReceiptId (the ID of the generated receipt); on failure it contains Failure (an object describing the cause). It is the string Unknown when the result is not known.

metadataobject

Versioned execution metadata. Contains version, gas_profile (gas used per cost item), and contracts (version 4 and later: for each action, the contract attached to the receiver account just before the action ran).

proofobject[]

The Merkle path that verifies the outcome against the block's outcome root. Each item has a hash and a direction (Left or Right).

namestring (enum)

Error class. REQUEST_VALIDATION_ERROR (invalid request), HANDLER_ERROR (processing error), INTERNAL_ERROR (node internal error)

causeobject

The specific cause of the error.

namestring

Name of the error cause (e.g. UNKNOWN_BLOCK, UNKNOWN_ACCOUNT, PARSE_ERROR)

infoobject

Additional information about the error (block hash, height, account ID, etc.)

codeinteger

Legacy JSON-RPC error code (e.g. -32000 server error, -32700 parse error, -32601 method not found)

messagestring

Legacy error message

datastring

Legacy error details

X-API-KEY
RequestCU50
cURL
curl -X POST "https://near-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "dontcare",
    "method": "send_tx",
    "params": {
      "signed_tx_base64": "QAAAADc4MWY4NzM0MTEyYzhlYjk3OTU4OGVjODUzODI5ZmVmNjZmOWU2ZjZhODBlOTg2OTc2ZmEyYmY4MDlkNWFkNDMAeB+HNBEsjrl5WI7IU4Kf72b55vaoDphpdvor+AnVrUMBU6K348gAAEAAAAAzMGQ2MjA1Yjg5ZTAyZDJjMzRhZGUxNjVhZTk3MDVmOGQ5ZTgwZDBlMzA0MDYxY2IxMGI4ZTU2YzhlNzAzZjYyvu07kVkCPg4EXK924R29YyEvUBYvKvTIB8mri0er3EwBAAAAAwAAII+tMHr3w1+lAAAAAAAAvS+JY93baTzDI2gRbUR5+KbUAbgdDORq8SnghPxAnMsaUtxGkCL4v/Z77uoc83OQdP8Oord4onDZwctNWoRZAQ==",
      "wait_until": "EXECUTED_OPTIMISTIC"
    }
  }'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "result": {
    "final_execution_status": "FINAL",
    "receipts_outcome": [
      {
        "block_hash": "9kDsSeN7GLaoQ8i1fuhsVGKyFvt4YvabVebWQKVRXJRN",
        "id": "7cvSrFHKDqxk1EQFJteiwxCpZPn3KZFeLyTypi5KGZVv",
        "outcome": {
          "executor_id": "30d6205b89e02d2c34ade165ae9705f8d9e80d0e304061cb10b8e56c8e703f62",
          "gas_burnt": 7524947687500,
          "logs": [],
          "metadata": {
            "contracts": [
              null
            ],
            "gas_profile": [],
            "version": 4
          },
          "receipt_ids": [
            "FLCZ8X2Mw8edPNmuwY4rcJFCbcnVNZp5VkjBwVn6crWU"
          ],
          "status": {
            "SuccessValue": ""
          },
          "tokens_burnt": "752494768750000000000"
        },
        "proof": [
          {
            "direction": "Right",
            "hash": "KuwgraUiXXuu2fGshuAEsYPDgynXTA8znaR4SXrJ7hc"
          },
          {
            "direction": "Right",
            "hash": "6eYmhTJ2e9fsoarqnpys6EaQxEW9wjowLebC1tiYjtpc"
          },
          {
            "direction": "Left",
            "hash": "9wqb16VZ58sUiFtcdfvdrPjb6pWkVJ9ngBxhz2Knqzvv"
          }
        ]
      },
      {
        "block_hash": "GhXNYjDjDCisttgT27zpnefH8dTFmHaDKagb7Mpyrj4k",
        "id": "FLCZ8X2Mw8edPNmuwY4rcJFCbcnVNZp5VkjBwVn6crWU",
        "outcome": {
          "executor_id": "781f8734112c8eb979588ec853829fef66f9e6f6a80e986976fa2bf809d5ad43",
          "gas_burnt": 7524947687500,
          "logs": [],
          "metadata": {
            "contracts": [
              null
            ],
            "gas_profile": [],
            "version": 4
          },
          "receipt_ids": [],
          "status": {
            "SuccessValue": ""
          },
          "tokens_burnt": "0"
        },
        "proof": []
      }
    ],
    "status": {
      "SuccessValue": ""
    },
    "transaction": {
      "actions": [
        {
          "Transfer": {
            "deposit": "199925000000000000000000000"
          }
        }
      ],
      "hash": "4QzusrLJXqUogS4vipyH6XoJ5BRe6tC3HKakhvBnfAE8",
      "nonce": 220880364000001,
      "priority_fee": 0,
      "public_key": "ed25519:95uoq1sPqzGrDBuaBC5yhdMVxRjzApzye1TxUXYtce5Y",
      "receiver_id": "30d6205b89e02d2c34ade165ae9705f8d9e80d0e304061cb10b8e56c8e703f62",
      "signature": "ed25519:4nP65CapWRZncS2GZZH1xRHMLWMFpqAmbh6dp9CDeYLi66Q6BSJdq3aNiyw7FVJ1Z5GxRsoxJQi9GnVonxoovcNk",
      "signer_id": "781f8734112c8eb979588ec853829fef66f9e6f6a80e986976fa2bf809d5ad43"
    },
    "transaction_outcome": {
      "block_hash": "C7oQgS7MX2az6jkyxxMTquYbQ96EaApmFTv7GGXGghnp",
      "id": "4QzusrLJXqUogS4vipyH6XoJ5BRe6tC3HKakhvBnfAE8",
      "outcome": {
        "executor_id": "781f8734112c8eb979588ec853829fef66f9e6f6a80e986976fa2bf809d5ad43",
        "gas_burnt": 824947687500,
        "logs": [],
        "metadata": {
          "gas_profile": null,
          "version": 1
        },
        "receipt_ids": [
          "7cvSrFHKDqxk1EQFJteiwxCpZPn3KZFeLyTypi5KGZVv"
        ],
        "status": {
          "SuccessReceiptId": "7cvSrFHKDqxk1EQFJteiwxCpZPn3KZFeLyTypi5KGZVv"
        },
        "tokens_burnt": "82494768750000000000"
      },
      "proof": [
        {
          "direction": "Right",
          "hash": "2DarZgjQirbu8YyUbo9ZGP2mJybpB8J2ta6d7w3Dh6Q8"
        },
        {
          "direction": "Right",
          "hash": "7WV8KXuj4rpge63CEsJZan39L5zM1gpD1jxZZ5GSqGLM"
        }
      ]
    }
  }
}