submit - XPRL
Example code for the submit JSON RPC method. Complete guide to using submit JSON-RPC in the GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request Example
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"
}'const axios = require('axios');
const url = 'https://xrp.getblock.io/mainnet/';
const headers = {
'x-api-key': 'YOUR-API-KEY',
'Content-Type': 'application/json'
};
const payload = {
jsonrpc: '2.0',
method: 'submit',
params: [{
tx_blob: '1200002280000000240000000361D4838D7EA4C6800000000000000000000000000055534400000000004B4E9C06F24296074F7BC48F92A97916C6DC5EA968400000000000000A732103AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB7446304402207EB0AE8B...'
}],
id: 'getblock.io'
};
axios.post(url, payload, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error));Response Example
Response Parameters
Field
Type
Description
Use Cases
Error Handling
Error Code
Description
SDK Integration
Last updated
Was this helpful?