命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;' http://119.28.16.55:23114/
请求参数:
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "getinfo",
"params": [
]
}
"result": {
"version": 140200,
"protocolversion": 70015,
"walletversion": 130000,
"balance": 0.00000000,
"blocks": 500628,
"timeoffset": 0,
"connections": 0,
"proxy": "127.0.0.1:9050",
"difficulty": 1873105475221.611,
"testnet": false,
"keypoololdest": 1513758957,
"keypoolsize": 100,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"errors": ""
},
"error": null,
"id": "curltest"
}
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": [] }' -H 'content-type: text/plain;' http://119.28.16.55:23114/
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "getbalance",
"params": []
}
{"result":0.00000000,"error":null,"id":"curltest"}
0x68656c6c6f20776f726c64 //钱包地址
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0","id": "curltest","method": "validateaddress","params": ["0x68656c6c6f20776f726c64"]}' -H 'content-type: text/plain;' http://119.28.16.55:23114/
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "validateaddress",
"params": [
"0x68656c6c6f20776f726c64"
]
}
{"result":{"isvalid":false},"error":null,"id":"curltest"}
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0","id": "curltest","method": "getnewaddress","params": ["[email protected]"]}' -H 'content-type: text/plain;' http://119.28.16.55:23114/
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "getnewaddress",
"params": [
"[email protected]"
]
}
//返回比特币钱包地址
{"result":"1BAmBDQeqdw5C4J9iPz9x86RfuE8DdrvrZ","error":null,"id":"curltest"}
{"result":"1BMAHoexWAVShYJDwxso38infctpC62kS","error":null,"id":"curltest"}
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0","id": "curltest","method": "listtransactions","params": ["1BAmBDQeqdw5C4J9iPz9x86RfuE8DdrvrZ"]}' -H 'content-type: text/plain;' http://119.28.16.55:23114/
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "listtransactions",
"params": [
"1BAmBDQeqdw5C4J9iPz9x86RfuE8DdrvrZ"
]
}
{"result":[],"error":null,"id":"curltest"}
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0","id": "curltest","method": "listreceivedbyaddress","params": []}' -H 'content-type: text/plain;' http://119.28.16.55:23114/
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "listreceivedbyaddress",
"params": []
}
{"result":[],"error":null,"id":"curltest"}
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0","id": "curltest","method": "gettransaction","params": ["jhsgabnzxghzhhd"]}' -H 'content-type: text/plain;' http://119.28.16.55:23114/
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "gettransaction",
"params": [
"jhsgabnzxghzhhd" //交易ID一定要合法 才能导出交易记录
]
}
{"result":null,"error":{"code":-5,"message":"Invalid or non-wallet transaction id"},"id":"curltest"}
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0","id": "curltest","method": "listreceivedbyaddress","params": []}' -H 'content-type: text/plain;' http://119.28.16.55:23114/
{
"jsonrpc": "1.0",
"id": "curltest",
"method": "listreceivedbyaddress",
"params": []
}
{"result":[],"error":null,"id":"curltest"}
命令行请求:
curl --user bitbs123 --data-binary '{"jsonrpc": "1.0","id": "curltest","method": "listreceivedbyaddress","params": []}' -H 'content-type: text/plain;' http://119.28.16.55:23114/