submit - XPRL

Example code for the submit JSON RPC method. Complete guide to using submit JSON-RPC in the GetBlock Web3 documentation.

Submits a signed transaction to XRP Ledger.

Parameters

Parameter
Type
Required
Description

tx_blob

string

Yes

Signed transaction in hex

fail_hard

boolean

No

Fail if local error

Request Example

curl
curl --location --request POST 'https://xrp.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "submit",
    "params": [{
        "tx_blob": "1200002280000000240000000361D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA968400000000000000A732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7446304402207EB0AE8B..."
    }],
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

engine_result

string

Transaction result code

engine_result_code

number

Numeric result code

engine_result_message

string

Human-readable message

tx_blob

string

Transaction hex

tx_json

object

Transaction as JSON

Use Cases

  • Submit payments

  • Create offers

  • Set trust lines

Error Handling

Error Code
Description

temMALFORMED

Malformed transaction

tefPAST_SEQ

Sequence too low

terPRE_SEQ

Sequence too high

SDK Integration

Last updated

Was this helpful?