TRX
POST
GET
Last updated on January 1, 1970
1 min read
Method buildTransaction%28TransferContract%29 undefined ()
connect with JSON-RPC protocol
buildTransaction%28TransferContract%29
Method not allowed
Create a transaction, different transaction types have differentparametersthis is an example of TransferContract
Parameters
from
- data, 20 bytes
The address the transaction is sent from.
to
- data, 20 bytes
The address the transaction is directed to.
value
- data
the transfer amount
Request
curl --location --request POST 'https://trx.getblock.io/mainnet/jsonrpc' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "buildTransaction",
"params": ["0xC4DB2C9DFBCB6AA344793F1DDA7BD656598A06D8", "0x95FD23D3D2221CFEF64167938DE5E62074719E54", "0x1f4"],
"id": "getblock.io"}'
Response
{
"result": "null",
"id": "getblock.io",
"status_code": 405,
"message": "Method not allowed"
}
Start Building with GetBlock RPCs for Free
Previous
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }
Next
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }