Skip to content

Instantly share code, notes, and snippets.

@TrevorJTClarke
Created March 26, 2019 22:02
Show Gist options
  • Select an option

  • Save TrevorJTClarke/65604f97280c44bb305ccd5d2b51280d to your computer and use it in GitHub Desktop.

Select an option

Save TrevorJTClarke/65604f97280c44bb305ccd5d2b51280d to your computer and use it in GitHub Desktop.

Revisions

  1. TrevorJTClarke created this gist Mar 26, 2019.
    14 changes: 14 additions & 0 deletions address-balance.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    axios({
    method:'get',
    url: 'https://web3api.io/api/v1/addresses/ETHEREUM_ADDRESS_HERE/account-balances/latest',
    headers: { 'x-api-key': 'YOUR_API_KEY_HERE' }
    }).then(res => {
    // res data example:
    // {
    // "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
    // "blockNumber": "7280439",
    // "timestamp": 1551391449000,
    // "timestampNanoseconds": 0,
    // "value": "43704830615496056128"
    // }
    })