Full Service API
  • Welcome!
  • Overview
  • API Endpoints
    • v2
      • Account
        • Account
          • Create Account
          • Import Account
          • Import Account Legacy
          • Get Accounts
          • Get Account Status
          • Get Balance
          • Update Account Name
          • Set Require Spend Subaddress
          • Remove Account
        • Account Secrets
          • Export Account Secrets
        • Address
          • Assign Address For Account
          • Get Address For Account
          • Get Addresses
          • Get Address Status
          • Verify Address
        • View Only Account
          • Import View Only Account
          • Create View Only Account Import Request
          • Create View Only Account Sync Request
          • Sync View Only Account
      • Transaction
        • Transaction
          • Build Transaction
          • Submit Transaction
          • Build And Submit Transaction
          • Build Burn Transaction
          • Build Unsigned Transaction
          • Build Unsigned Burn Transaction
        • Transaction Output TXO
          • Memo
            • Validate Sender Memo
          • Get TXO
          • Get TXOs
          • Get MobileCoin Protocol TXO
          • Get TXO Membership Proofs
          • Sample Mixins
          • Get TXO Block Index
        • Confirmation
          • Get Confirmations
          • Validate Confirmations
        • Receiver Receipt
          • Check Receiver Receipt Status
          • Create Receiver Receipts
        • Transaction Log
          • Get Transaction Log
          • Get Transaction Logs
          • Get MobileCoin Protocol Transaction
        • Payment Request
          • Create Payment Request
          • Check B58 Type
      • Block
        • Get Block
        • Get Blocks
        • Get Recent Blocks
        • Search Ledger
      • Network Status
        • Get Network Status
      • Wallet Status
        • Get Wallet Status
      • Version
        • Get Version
    • v1 (deprecated)
      • Account
        • Account
          • Create Account
          • Import Account
          • Import Account Legacy
          • Get Account
          • Get All Accounts
          • Get Account Status
          • Update Account Name
          • Remove Account
        • Account Secrets
          • Export Account Secrets
        • Address
          • Assign Address For Account
          • Get Addresses For Account
          • Verify Address
        • Balance
          • Get Balance For Account
          • Get Balance For Address
      • Transaction
        • Transaction
          • Build Transaction
          • Submit Transaction
          • Build And Submit Transaction
          • Build Split Txo Transaction
        • Transaction Output TXO
          • Get TXO
          • Get MobileCoin Protocol TXO
          • Get TXOs For Account
          • Get TXOs For View Only Account
          • Get All TXOs For Address
        • Confirmation
          • Get Confirmations
          • Validate Confirmations
        • Receiver Receipt
          • Check Receiver Receipt Status
          • Create Receiver Receipts
        • Transaction Log
          • Get Transaction Object
          • Get Transaction Log
          • Get Transaction Logs For Account
          • Get All Transaction Logs For Block
          • Get All Transaction Logs Ordered By Block
          • Get MobileCoin Protocol Transaction
        • Payment Request
          • Create Payment Request
          • Check B58 Type
      • Gift Code
        • Build Gift Code
        • Submit Gift Code
        • Get Gift Code
        • Get All Gift Codes
        • Check Gift Code Status
        • Claim Gift Code
        • Remove Gift Code
      • Block
        • Get Block
      • Network Status
        • Get Network Status
      • Wallet Status
        • Get Wallet Status
      • Version
        • Get Version
    • Signer Service
      • Create Account
      • Get Account
      • Sign Transaction
      • Sync Txos
  • Usage
    • Getting Started
      • Running Full Service
      • Create an Account
      • Receiving MobileCoin
      • Sending MobileCoin
      • Next Steps
    • Full Service Network Diagram
    • Supported Token Metadata
    • Database Usage
    • API Key
    • View Only Account
      • Signer
      • Signer Service
    • No Wallet Mode
    • Validator Service
      • Running
      • Running With TLS
    • Mirror Service
      • Running
      • Running With TLS
      • Running With Encryption
    • Logging
      • Text Logs (syslog style)
      • Crash Reports
    • T3
    • Sender Memos
  • FAQ
    • Resolving Disputes
    • How do I check if Full-Service is operational?
    • Where are logs stored?
    • How do I speed up account import?
    • What is the precision of MOB?
  • Glossary
    • Account
    • Block
    • Blockchain
    • Consensus Protocol
    • Fog
    • Full Service
    • Key Image
    • Ledger
    • MOB
    • Public Address
    • Secure Enclave
    • Subaddress
    • Transaction
    • Transaction Proposal
    • Validator Node
    • Validator Service
Powered by GitBook
On this page
  • Request
  • Response

Was this helpful?

  1. API Endpoints
  2. v2
  3. Account
  4. Address

Get Address Status

Get the current balance for a given address. The response will have a map of the total values for each token_id that is present at that address.

PreviousGet AddressesNextVerify Address

Last updated 1 year ago

Was this helpful?

Required Param
Purpose
Requirements

address

The address on which to perform this action.

Address must be assigned for an account in the wallet.

Optional Param
Purpose
Requirements

min_block_index

The minimum block index to filter on txos received

max_block_index

The maximum block index to filter on txos received

Note: max_spendable, unspent, and spent balances should be used with caution. The default behavior of full-service, is to:

  1. build transactions that spend an account's utxos without regard for the subaddress to which those utxos were addressed;

  2. send change (amount in the input txos that exceeds the amount being sent to the counterparty) to a designated change subaddress; and,

  3. automatically defragment the funds in the account by consolidated utxos during each transaction by filling unused input slots -- each transaction can have up to 16 inputs -- with the smallest utxos in the account, reducing the total number of utxos in the account in favor of larger change utxos.

The combination of these three activities will alter balances returned by get_address_status without any explicit activity having occured related to the subaddress being queried.

Wallet implementors that want to track balances on per-subaddress basis can keep their own database that uses the subaddress_index in response to to credit funds received to a subaddress and separately from full-service track and account for how those funds are depleted.

Wallet implementors can also override the default behavior of the transaction builder by specifying a spend_subaddress when composing transactions. When a spend_subaddress is specified

  1. The transaction builder will only use utxos as inputs that were sent to that subaddress, and

  2. change will be sent back to the spend_subaddress instead of the reserved change subaddress.

This enhances the utility of the max_spendable, unspent, and spent balance information reported by get_address_status.

It is recommend to the require_spend_subaddress flag to true for accounts where the wallet will use balances from get_address_status as this will prevent inadvertently building transactions that omit spend_subaddress and throw off the balances of get_address_status by building transactions that spend input txos without regard for the subaddress of those inputs.

{
  "method": "get_address_status",
  "params": {
    "address": "8VWJpZDdmLT8sETcZfHdVojWdFmoo54yVEk7nmae7ixiFfxjZyVFLFj9moCiJBzkeg6Vd5BPXbbwrDvoZuxWZWsyU3G3rEvQdqZBmEbfh7x"
  },
  "jsonrpc": "2.0",
  "id": 1
}
{
  "method":"get_address_status",
  "result":{
    "address":{
      "public_address_b58":"8VWJpZDdmLT8sETcZfHdVojWdFmoo54yVEk7nmae7ixiFfxjZyVFLFj9moCiJBzkeg6Vd5BPXbbwrDvoZuxWZWsyU3G3rEvQdqZBmEbfh7x",
      "account_id":"60ef9401f98fc278cd8a1ef51f466111244c9d4b97e8f8886a86bd840238dcaa",
      "metadata":"Main",
      "subaddress_index":"0"
    },
    "account_block_height":"1769486",
    "network_block_height":"1769486",
    "local_block_height":"1769486",
    "balance_per_token":{
      "0":{
        "max_spendable":"8039600015840",
        "unverified":"0",
        "unspent":"8040000067868",
        "pending":"0",
        "spent":"8065834220882873",
        "secreted":"0",
        "orphaned":"0"
      }
    }
  },
  "jsonrpc":"2.0",
  "id":1
}
Request
Response
get_txos
set