getrawtransaction

BitcoinC1

Returns the raw transaction data for a txid. With verbose true you get the decoded transaction; historic lookups resolve against archive nodes with full txindex.

Endpoint
POST https://api.1st-node.com/v1/bitcoin/rpc

Parameters

NameTypeDescription
txidstringThe transaction id.
verbosebooleantrue for decoded JSON, false for hex.

Returns

string | object — hex or the decoded transaction.

Request

curl https://api.1st-node.com/v1/bitcoin/rpc \
  -H "Authorization: Bearer $ONE_KEY" \
  -H "content-type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawtransaction",
  "params": ["6a9013b8684862e9…", true]
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawtransaction",
  "params": ["6a9013b8684862e9…", true]
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": { "txid": "6a9013b8684862e9…", "vin": [], "vout": [] }
}
More transactions methods on Bitcoin

Bitcoin API

常见问题

Do you index all transactions (txindex)?

Yes — our archive nodes run with txindex, so any historic txid resolves.

充值、拿密钥、上线。

自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。

获取 API 密钥