obyte.js
GitHubDiscord
0.1.7
0.1.7
  • Obyte.js
  • Getting started
    • Quick start
    • Testnet
  • Client
    • Subscribe
    • Just saying
  • API
    • Get witnesses
    • Get peers
    • Get joint
    • Get last MCI
    • Get history
    • Get attestation
    • Get attestations
    • Get bots
    • Get asset metadata
    • Get definition
    • Get balances
    • Get profile units
    • Dry run AA (testnet)
    • Get AA state vars (testnet)
    • Get AAs by base AAs (testnet)
    • Get AA responses (testnet)
    • Core
      • Catchup
      • Get hash tree
      • Get light props
      • Post joint
      • Pick divisible coins for amount
      • Heartbeat
  • Post
    • Address definition change
    • Attestation
    • Asset
    • Asset attestors
    • Data
    • Data feed
    • Definition
    • Definition template
    • Payment
    • Poll
    • Vote
    • Profile
    • Text
  • Utils
    • Generate a random address
    • Get definition address
    • Is valid address
    • Keep connection alive
  • About
    • About
    • Links
    • Tutorials
Powered by GitBook
On this page
  • Example
  • Returns
  1. API

Get balances

Get balances from one or multiple addresses (max 100).

Example

const addresses = [
  'TMWNLXR42CKIP4A774BQGNVBZAPHY7GH',
  'ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q'
];

client.api.getBalances(addresses, function(err, result) {
  console.log(result);
});

Returns

{
  TMWNLXR42CKIP4A774BQGNVBZAPHY7GH: {
    base: {
      stable: 838,
      pending: 0
    },
    's+bzDkwx0TVMtdyf9YU4wEA23oInOUzulO+r5WxBUZs=': {
      stable: 98,
      pending: 0
    },
    'xamdfH5Uk+alv3le0pEA01qSsfZjycyMsqaqHtycJ1M=': {
      stable: 5000,
      pending: 0
    }
  },
  ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q: {
    base: {
      stable: 942956698,
      pending: 0
    },
    'f2TMkqij/E3qx3ALfVBA8q5ve5xAwimUm92UrEribIE=': {
      stable: 918528,
      pending: 0
    },
    'xamdfH5Uk+alv3le0pEA01qSsfZjycyMsqaqHtycJ1M=': {
      stable: 970979,
      pending: 0
    }
  }
}

PreviousGet definitionNextGet profile units

Last updated 6 years ago