-2

I've searched for few days... to get IOTA Coin balance via api call directly.

They provided us a documentation for that:- https://iota.readme.io/reference#getbalances

  • Which programming language do you use? There are a lot of libraries with which the balance can be easily requested. – nullpointr Sep 16 '18 at 15:58

1 Answers1

0

Well, not sure what you expect here, either run your own node (thus, the localhost reference in the docs) or call a public one...

$ curl -s http://iota.bitfinex.com \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'X-IOTA-API-Version: 1' \
  -d '{"command": "getBalances", "addresses": ["HBBYKAKTILIPVUKFOTSLHGENPTXYBNKXZFQFR9VQFWNBMTQNRVOUKPVPRNBSZVVILMAFBKOTBLGLWLOHQ"], "threshold": 100}' \
  | jq


{
  "balances": [
    "0"
  ],
  "references": [
    "BTJRZDCMYEEQBMGKIGZFDFHQWIWTX9UYUFEOLYIHVVWM9HYRZPOZCKRQFNYDLNGTT9KZHGUTGNSNZ9999"
  ],
  "milestoneIndex": 328554,
  "duration": 160
}
evilSnobu
  • 24,582
  • 8
  • 41
  • 71