I would like to track balances using address, but I have a few questions.
- If I don't use the rescan option, will the balance be incorrect?
- Why is the balance off when I check it against an external balance inquiry site?
The procedure using the API was to execute importaddress
(no rescan) and then getbalances
.
Because the balance was off, I executed importaddress
with rescan, but the balance was off when I tried again.
I tried several times with other addresses, but it didn't work!
Should I change Wallet every time I look up a different address?
For example,
❯ curl --user user:password --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importaddress", "params": [ "38XnPvu9PmonFU9WouPXUjYbW91wa5MerL", "", false ]}' -H 'content-type: text/plain;' http://--.--.--.--:----
{"result":null,"error":null,"id":"curltest"}
❯ curl --user user:password --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbalances", "params": []}' -H 'content-type: text/plain;' http://--.--.--.--:---- | jq .
{
"result": {
"mine": {
"trusted": 0,
"untrusted_pending": 0,
"immature": 0
},
"watchonly": {
"trusted": 3239.83164697,
"untrusted_pending": 16.05599144,
"immature": 184.81980076
}
},
"error": null,
"id": "curltest"
}
However, when referring to an external site, it is significantly off.
https://chainflyer.bitflyer.jp/tool/balance
Any advice would be greatly appreciated!