比特币(Bitcoin) RPC Wallet API中listreceivedbyaddress的用法及代码示例。
用法:
listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" )
通过接收地址列出余额。
参数1 - minconf
类型:数字,可选,默认值= 1
包括了付款前的最少确认数。
参数2 - include_empty
类型:布尔值,可选,默认= false
是否包括未收到任何付款的地址。
参数3 - include_watchonly
类型:布尔值,可选,默认= false
是否包括watch-only个地址(请参阅‘importaddress’)。
参数4 - address_filter
类型:字符串,可选
如果存在,则仅返回此地址上的信息。
返回结果
[
{
"involvesWatchonly" : true, (bool) Only returned if imported addresses were involved in transaction
"address" : "receivingaddress", (string) The receiving address
"amount" : x.xxx, (numeric) The total amount in BTC received by the address
"confirmations" : n, (numeric) The number of confirmations of the most recent transaction included
"label" : "label", (string) The label of the receiving address. The default label is "".
"txids": [
"txid", (string) The ids of transactions received with the address
...
]
}
,...
]
示例
bitcoin-cli listreceivedbyaddress
bitcoin-cli listreceivedbyaddress 6 true
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaddress", "params": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listreceivedbyaddress", "params": [6, true, true, "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
相关用法
- Bitcoin abandontransaction用法及代码示例
- Bitcoin abortrescan用法及代码示例
- Bitcoin addmultisigaddress用法及代码示例
- Bitcoin backupwallet用法及代码示例
- Bitcoin bumpfee用法及代码示例
- Bitcoin createwallet用法及代码示例
- Bitcoin dumpprivkey用法及代码示例
- Bitcoin dumpwallet用法及代码示例
- Bitcoin encryptwallet用法及代码示例
- Bitcoin getaddressesbylabel用法及代码示例
- Bitcoin getaddressinfo用法及代码示例
- Bitcoin getbalance用法及代码示例
- Bitcoin getnewaddress用法及代码示例
- Bitcoin getrawchangeaddress用法及代码示例
- Bitcoin getreceivedbyaddress用法及代码示例
- Bitcoin getreceivedbylabel用法及代码示例
- Bitcoin gettransaction用法及代码示例
- Bitcoin getwalletinfo用法及代码示例
- Bitcoin importaddress用法及代码示例
- Bitcoin importmulti用法及代码示例
- Bitcoin importprivkey用法及代码示例
- Bitcoin importpubkey用法及代码示例
- Bitcoin importwallet用法及代码示例
- Bitcoin keypoolrefill用法及代码示例
- Bitcoin listaddressgroupings用法及代码示例
注:本文由纯净天空筛选整理自bitcoin.org大神的英文原创作品 Bitcoin listreceivedbyaddress。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。