getrawtransaction

Return the raw transaction data. By default this function only works for mempool transactions. When called with a blockhash argument, getrawtransaction will return the transaction if the specified block is available and the transaction is found in that block. When called without a blockhash argument, getrawtransaction will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction is in a block in the blockchain. Hint: Use gettransaction for wallet transactions. If verbose is true, returns an Object with information about txid. If verbose is false or omitted, returns a string that is serialized, hex-encoded data for txid.

Argument #1 - txid Type: string, required The transaction id

Argument #2 - verbose Type: boolean, optional, default=false If false, return a string, otherwise return a json object

Argument #3 - blockhash Type: string, optional The block in which to look for the transaction

Path Params
string
required
Defaults to public

For higher throughput, please create your own API key.

Body Params

Accepts nothing.

integer
Defaults to 1
string
Defaults to 2.0
string
Defaults to getrawtransaction
params
array
length between 2 and 3
Defaults to 0e0f3f61d0b9321b7680fbe298d78861df5a40988ae245b46923e8cef7f5f2fa,false

Argument #1 - txid Type: string, required The transaction id

Argument #2 - verbose Type: boolean, optional, default=false If false, return a string, otherwise return a json object

Argument #3 - blockhash Type: string, optional The block in which to look for the transaction

params
Response

Language
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json