gettxout

BitcoinC2

Returns information about a UTXO — value, scriptPubKey and confirmations — or null if it has been spent. The basis for balance and coin-selection logic.

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

Parameters

NameTypeDescription
txidstringThe transaction id.
nnumberThe output index (vout).
include_mempoolbooleanWhether to include the mempool.

Returns

object | null — the UTXO details, or null if spent.

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": "gettxout",
  "params": ["6a9013b8684862e9…", 0, true]
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxout",
  "params": ["6a9013b8684862e9…", 0, true]
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": { "value": 0.0125, "confirmations": 12, "scriptPubKey": {} }
}

Bitcoin API

充值、拿密钥、上线。

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

获取 API 密钥