To use the platform.getBalance method on the P-Chain, ensure that the end of your URL includes ext/bc/P.
Parameters
- addressesarrayREQUIRED
An array of address strings
Returns
- balancestring
The total token balance.
- unlockedstring
The unlocked token balance.
- lockedStakeablestring
The locked stakeable token balance.
- lockedNotStakeablestring
The locked and not stakeable token balance.
- balancesobject
A mapping of addresses to their respective balances in atomic units
- unlockedsobject
A mapping of addresses to their respective unlocked balances
- lockedStakeablesobject
A mapping of an address to its locked stakeable balance
- lockedNotStakeablesobject
A mapping of an address to its not locked stakeable balance
- utxoIDsarray
A array of UTXO (Unspent Transaction Output) IDs, with each entry containing a transaction ID and output index
- txIDstring
The transaction id
- outputIndexinteger
The output index
Request
Response
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"balance": "5659807676",6"unlocked": "5659807676",7"lockedStakeable": "0",8"lockedNotStakeable": "0",9"balances": {10"2MxKSeEWXViLdYyDhW1SQ46AECZEbE2bnVRZptv42JrxqyUX5k": "5659807676"11},12"unlockeds": {13"2MxKSeEWXViLdYyDhW1SQ46AECZEbE2bnVRZptv42JrxqyUX5k": "5659807676"14},15"lockedStakeables": {},16"lockedNotStakeables": {},17"utxoIDs": [18{19"txID": "2mgNobrqvuqQixoQvibWegh7Z8nd2WjufQTmfSVr1F9k69adKC",20"outputIndex": 021}22]23}24}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"balance": "5659807676",6"unlocked": "5659807676",7"lockedStakeable": "0",8"lockedNotStakeable": "0",9"balances": {10"2MxKSeEWXViLdYyDhW1SQ46AECZEbE2bnVRZptv42JrxqyUX5k": "5659807676"11},12"unlockeds": {13"2MxKSeEWXViLdYyDhW1SQ46AECZEbE2bnVRZptv42JrxqyUX5k": "5659807676"14},15"lockedStakeables": {},16"lockedNotStakeables": {},17"utxoIDs": [18{19"txID": "2mgNobrqvuqQixoQvibWegh7Z8nd2WjufQTmfSVr1F9k69adKC",20"outputIndex": 021}22]23}24}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free