Skip to main content

Submit transaction

POST 

/transactions

This endpoint supports transaction submission in two formats.

  1. Submitting in JSON format:
  • First encode the transaction in BCS. If your language has a BCS-supporting library, use it.
  • If you cannot encode BCS directly, you can use the Encode Submission API. When using this API, you must only send requests to a trusted node, as the node could tamper with the request content.
  • Sign the encoded transaction.
  • Submit the signed transaction with "application/json" Content-Type.
  1. Submitting in BCS format:
  • Submit the BCS-encoded signed transaction with "application/x.aptos.signed_transaction+bcs" Content-Type.

Request

Responses

Successful Response

Response Headers
    X-APTOS-BLOCK-HEIGHT

    Current block height of the chain

    X-APTOS-CHAIN-ID

    Chain ID of the current chain

    X-APTOS-EPOCH

    Current epoch of the chain

    X-APTOS-LEDGER-OLDEST-VERSION

    Oldest unpruned ledger version of the chain

    X-APTOS-LEDGER-TIMESTAMPUSEC

    Current timestamp of the chain

    X-APTOS-LEDGER-VERSION

    Current ledger version of the chain

    X-APTOS-OLDEST-BLOCK-HEIGHT

    Oldest unpruned block height of the chain

    X-APTOS-CURSOR

    Cursor for the next page

    X-APTOS-GAS-USED

    Amount of gas actually used for transaction execution