Skip to main content
deleted 10 characters in body
Source Link
foba
  • 573
  • 2
  • 13

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's APIAPI which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-api-key: <your-api-key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/account-balances/latest"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
    "blockNumber": "7446776",
    "timestamp": 1553638186000,
    "timestampNanoseconds": 0,
    "value": "65103167814228166337",
    "blockchainId": "1c9c969065fcd1cf"
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's API which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-api-key: <your-api-key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/account-balances/latest"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
    "blockNumber": "7446776",
    "timestamp": 1553638186000,
    "timestampNanoseconds": 0,
    "value": "65103167814228166337",
    "blockchainId": "1c9c969065fcd1cf"
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's API which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-api-key: <your-api-key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/account-balances/latest"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
    "blockNumber": "7446776",
    "timestamp": 1553638186000,
    "timestampNanoseconds": 0,
    "value": "65103167814228166337",
    "blockchainId": "1c9c969065fcd1cf"
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

Fix links, and update response.
Source Link
foba
  • 573
  • 2
  • 13

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's APIAPI which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-api-key: <your-api-key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/statistics"account-balances/latest"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "balance": "9740560000000000",
    "balanceIn""address": "271223036960000000000""0x06012c8cf97bead5deae237070f9587f8e7a266d",
    "balanceOut""blockNumber": "271213296400000000000""7446776",
    "addressType""timestamp": "address"1553638186000,
    "contractType""timestampNanoseconds": [
      "Unknown"
    ]0,
    "numHolders""value": "0""65103167814228166337",
    "numTransfers""blockchainId": null"1c9c969065fcd1cf"
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's API which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-api-key: <your-api-key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/statistics"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "balance": "9740560000000000",
    "balanceIn": "271223036960000000000",
    "balanceOut": "271213296400000000000",
    "addressType": "address",
    "contractType": [
      "Unknown"
    ],
    "numHolders": "0",
    "numTransfers": null
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's API which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-api-key: <your-api-key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/account-balances/latest"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
    "blockNumber": "7446776",
    "timestamp": 1553638186000,
    "timestampNanoseconds": 0,
    "value": "65103167814228166337",
    "blockchainId": "1c9c969065fcd1cf"
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

deleted 136 characters in body
Source Link
foba
  • 573
  • 2
  • 13

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's APIAPI which is much faster. All you need is an api keyan api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-amberdata-api-key: your<your-api-key" \
    -H "x-amberdata-blockchain-id: 1c9c969065fcd1cf"key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/statistics"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "balance": "9740560000000000",
    "balanceIn": "271223036960000000000",
    "balanceOut": "271213296400000000000",
    "addressType": "address",
    "contractType": [
      "Unknown"
    ],
    "numHolders": "0",
    "numTransfers": null
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's API which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-amberdata-api-key: your-api-key" \
    -H "x-amberdata-blockchain-id: 1c9c969065fcd1cf" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/statistics"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "balance": "9740560000000000",
    "balanceIn": "271223036960000000000",
    "balanceOut": "271213296400000000000",
    "addressType": "address",
    "contractType": [
      "Unknown"
    ],
    "numHolders": "0",
    "numTransfers": null
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

It will always be slow if contacting a live node for data such as account balance.

My preferred way is to use Amberdata's API which is much faster. All you need is an api key then you can:

curl \
    -X GET \
    -H "accept: application/json" \
    -H "x-api-key: <your-api-key>" \
"https://web3api.io/api/v1/addresses/0xb7e3abd75119fe3cfc76015193226b21fc19230b/statistics"

Which will return the data like so:

{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "balance": "9740560000000000",
    "balanceIn": "271223036960000000000",
    "balanceOut": "271213296400000000000",
    "addressType": "address",
    "contractType": [
      "Unknown"
    ],
    "numHolders": "0",
    "numTransfers": null
  }
}

Let me know if that works for you! 😃

EDIT:

There is also a node wrapper package!

added 93 characters in body
Source Link
foba
  • 573
  • 2
  • 13
Loading
Source Link
foba
  • 573
  • 2
  • 13
Loading