Coin Query API

iotax_getAllBalances

Return the total coin balance for all coin type, owned by the address owner.

Parameters

owner<IotaAddress>

  • Required: yes

  • Description: The owner's IOTA address

Result

Vec<Balance><[ Balance ]>

Example

Gets all balances for the address in the request.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getAllBalances",
  "params": [
    "0x9d0890c5f1e204f5c39e1a5b060354a057a6432583e1a0a881dfad67f807a6c6"
  ]
}

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "coinType": "0x2::iota::IOTA",
            "coinObjectCount": 2,
            "totalBalance": "7364065201200"
        }
    ]
}

iotax_getAllCoins

Return all Coin objects owned by an address.

Parameters

owner<IotaAddress>

  • Required: yes

  • Description: The owner's IOTA address

cursor< ObjectID >

  • Required: no

  • Description: Optional paging cursor

limit< ObjectID >

  • Required: no

  • Description: Maximum number of items per page

Result

CoinPage< Page_for_Coin_and_ObjectID >

next_cursor points to the last item in the page; Reading with next_cursor will start from the next item after next_cursor if next_cursor is Some, otherwise it will start from the first item.

Parameters

data<[ Coin ]>

  • Required: yes

hasNextPage< Boolean >

  • Required: yes

nextCursor< ObjectID | null >

  • Required: no

Example

Gets all coins for the address in the request body. Begin listing the coins that are after the provided cursor value and return only the limit amount of results per page.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getAllCoins",
  "params": [
    "0x9d0890c5f1e204f5c39e1a5b060354a057a6432583e1a0a881dfad67f807a6c6",
    "0x2065499928fc0b61da36e477117227cc168d3717e1b467c7f86d799f8fdc97f3",
    3
  ]
}

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "data": [
            {
                "coinType": "0x2::iota::IOTA",
                "coinObjectId": "0x8e0e1ab0e53d874f47ec9910de2dab88a3af7d936f6b6cd03653d68cc8689d5a",
                "version": "2",
                "digest": "9KssB4fKHECePXq7kQXbTej4EqrcDhKvku6wVWvFJbt",
                "balance": "478750000",
                "previousTransaction": "6rdzUN9Pp3D62kRF953UzHG2SQw1bYiKqotVZM8rakF6"
            }
        ],
        "nextCursor": "0x8e0e1ab0e53d874f47ec9910de2dab88a3af7d936f6b6cd03653d68cc8689d5a",
        "hasNextPage": false
    }
}

iotax_getBalance

Return the total coin balance for one coin type, owned by the address owner.

Parameters

owner<IotaAddress>

  • Required: yes

  • Description: The owner's IOTA address

coin_type< string >

  • Required: no

  • Description: Optional type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::iota::IOTA if not specified.

Result

Balance< Balance >

Parameters

coinObjectCount< uint >

  • Required: yes

coin_type< string >

  • Required: yes

totalBalance< BigInt_for_uint128 >

  • Required: yes

Example

Gets the balance of the specified type of coin for the address in the request.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getBalance",
  "params": [
    "0x7b4a34f6a011794f0ecbe5e5beb96102d3eef6122eb929b9f50a8d757bfbdd67",
    "0x2::iota::IOTA"
  ]
}

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "coinType": "0x2::iota::IOTA",
        "coinObjectCount": 1,
        "totalBalance": "49000000"
    }
}

iotax_getCirculatingSupply

Return the circulating supply summary.

Parameters

None

Result

IotaCirculatingSupply< IotaCirculatingSupply >

Provides a summary of the circulating IOTA supply.

Example

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getCirculatingSupply",
  "params": []
}

Response

The response will be different

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "value": 3803673695096657000,
        "circulatingSupplyPercentage": 0.8234531226316965,
        "atCheckpoint": 9539974
    }
}

Parameters

atCheckpoint< uint64 >

  • Required: yes

  • Description: Timestamp (UTC) when the circulating supply was calculated.

circulatingSupplyPercentage< >

  • Required: yes

  • Description: Percentage of total supply that is currently circulating (range: 0.0 to 1.0).

value< uint64 >

  • Required: yes

  • Description: Circulating supply in NANOS at the given timestamp.

iotax_getCoinMetadata

Return metadata (e.g., symbol, decimals) for a coin.

Parameters

coin_type< string >

  • Required: Yes

  • Description: Optional type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::iota::IOTA if not specified.

Result

IotaCoinMetadata< IotaCoinMetadata >

Parameters

decimals< uint8 >

  • Required: yes

  • Description: Number of decimal places the coin uses.

description< string >

  • Required: yes

  • Description: Description of the token

iconUrl< [string,null] >

  • Required: no

  • Description: URL for the token logo

id< ObjectID | null >

  • Required: no

  • Description: Object id for the CoinMetadata object

name< string >

  • Required: yes

  • Description: Name for the token

symbol< string >

  • Required: yes

  • Description: Symbol for the token

Example

Gets the metadata for the coin type in the request.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getCoinMetadata",
  "params": [
    "0x2::iota::IOTA"
  ]
}

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "decimals": 9,
        "name": "IOTA",
        "symbol": "IOTA",
        "description": "The main (gas)token of the IOTA Network.",
        "iconUrl": "https://iota.org/logo.png",
        "id": "0xd02db1bb647dfcc94f35b82a14e8bab07661be3e6d4b022bdc7ee63eed0728f8"
    }
}

iotax_getCoins

Return all Coin<coin_type> objects owned by an address.

Parameters

owner<IotaAddress>

  • Required: yes

  • Description: The owner's IOTA address

coin_type< string >

  • Required: no

  • Description: Optional type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::iota::IOTA if not specified.

cursor< ObjectID >

  • Required: no

  • Description: Optional paging cursor

limit< ObjectID >

  • Required: no

  • Description: Maximum number of items per page

Result

CoinPage< Page_for_Coin_and_ObjectID >

next_cursor points to the last item in the page; Reading with next_cursor will start from the next item after next_cursor if next_cursor is Some, otherwise it will start from the first item.

Parameters

data<[ Coin ]>

  • Required: yes

hasNextPage< Boolean >

  • Required: yes

nextCursor< ObjectID | null >

  • Required: no

Example

Gets all IOTA coins owned by the address provided. Return a paginated list of limit results per page. Similar to iotax_getAllCoins, but provides a way to filter by coin type.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getCoins",
  "params": [
    "0xeb8bc8b275fbc66500255f06de458ec5b6623b4171b17d8a26a47604860b3885",
    "0x2::iota::IOTA",
    "0x0017580dec6b48d65f79aaf07c201e3ce9e99a2179e806b9687681ca718e3090",
    3
  ]
}

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "data": [
            {
                "coinType": "0x2::iota::IOTA",
                "coinObjectId": "0x001851cd7087de53b43c95ef79a2309ff8ffcfc67f4fd63ac636d8073b6c748d",
                "version": "1",
                "digest": "HNm8FY8WU1QsfbGTDpSjiCYRBdYtFUqhdDvShH8fyYrA",
                "balance": "269046000000000",
                "previousTransaction": "9Dt8qnC3ck6MedU4fuHc8mwFSBrQodTNdiKzaZ6TG8QY"
            },
            {
                "coinType": "0x2::iota::IOTA",
                "coinObjectId": "0x004912e3e2cac1ecec158f017375daa3e5b2122c7b27d44a151476d10d661970",
                "version": "1",
                "digest": "CcLywrdVd5P5B7FPfJYNFTJtt4xrbwvoDsb7fMaSK7qF",
                "balance": "109625956888000",
                "previousTransaction": "wBr3wChqXQpbx3izD4Fi2z2nYGdz9PgbosC1LDC4NF3"
            },
            {
                "coinType": "0x2::iota::IOTA",
                "coinObjectId": "0x005bd046b8ba38fcd085f5fc1df7eb124ab76f5658f42570754eb73534f416ed",
                "version": "1",
                "digest": "8E54tDi3bghzn3FVoUDMwA43C8qv1MDdKDTkE51UaMRB",
                "balance": "61657150000",
                "previousTransaction": "9rNWYBMvqgigefreq8RHon1xJy4TPDbrEoSegTknD4ZG"
            }
        ],
        "nextCursor": "0x005bd046b8ba38fcd085f5fc1df7eb124ab76f5658f42570754eb73534f416ed",
        "hasNextPage": true
    }
}

iotax_getTotalSupply

Return total supply for a coin.

Parameters

coin_type< string >

  • Required: yes

  • Description: Optional type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::iota::IOTA if not specified.

Example

Gets total supply for the type of coin provided.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "iotax_getTotalSupply",
  "params": [
    "0x2::iota::IOTA"
  ]
}

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "value": "4619174535328000000"
    }
}

Last updated