The world is just starting to get an idea about the real power of the ERC 20 contract of Ethereum and how it can revolutionize the world. It is only befitting that a good performing API was built to make eventual users comfortable in seeing their gains made under the ERC 20 apps and coins.
CONTRACT=0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7 ETH_ADDRESS=0x198ef1ec325a96cc354c7266a038be8b5c558f67 curl https://api.tokenbalance.com/token/$CONTRACT/$ETH_ADDRESS
var contract = "0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"; var address = "0x198ef1ec325a96cc354c7266a038be8b5c558f67"; var tokenbalance = { "async": true, "crossDomain": true, "url": "https://api.tokenbalance.com/balance/"+contract+"/"+address, "method": "GET" } $.ajax(tokenbalance).done(function (response) { console.log(response); });
require 'uri' require 'net/http' contract = "0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"; address = "0x198ef1ec325a96cc354c7266a038be8b5c558f67"; url = URI("https://api.tokenbalance.com/balance/"+contract+"/"+address") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body
import http.client contract := "0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7" address := "0x198ef1ec325a96cc354c7266a038be8b5c558f67" conn = http.client.HTTPSConnection("api.tokenbalance.com") conn.request("GET", "/balance/"+contract+"/"+address, payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
contract := "0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7" address := "0x198ef1ec325a96cc354c7266a038be8b5c558f67" url := "https://api.tokenbalance.com/balance/"+contract+"/"+address" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body))
var http = require("https"); var contract = "0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"; var address = "0x198ef1ec325a96cc354c7266a038be8b5c558f67"; var options = { "method": "GET", "hostname": "api.tokenbalance.com", "port": null, "path": "/balance/"+contract+"/"+address }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();