Wallets Info

Retrieve data on your organization wallets

Fetch Organization Wallets

Retrieve organization's wallets information in an inabit account, according to an organization ID variable in the query's body.

query Wallets($where: WalletWhereInput) {
  wallets(where: $where) {
    id
    name
    balanceUSD
    balanceEUR
    walletCryptoAccounts {
      name
      balance
      financialAsset {
        code
      }
      blockchain {
        code
      }
    }
  }
}

Headers

Body (WalletWhereInput object)

Example body:

{
  "where": {
    "organization": {
      "id": "cljzumgxa0009k603wl8foc6z"
    }
  }
}

How do I retrieve my organization ID?

In order to retrieve an organization's identifier, you'll need to call your user details first, to understand which organization is related to them.

query User($where: UserWhereUniqueInput!) {
  user(where: $where) {
    fullName
    organizations {
      name
      id
    }
  }
}

Response

Return values:

{
  "data": {
    "wallets": [
      {
        "id": "clllyfdl8007jbtqksgcgx1wy",
        "name": "Wallet 1",
        "balanceUSD": 0,
        "balanceEUR": 0,
        "walletCryptoAccounts": []
      },
      {
        "id": "clnleemkg0000780172yr8115",
        "name": "Wallet 2",
        "balanceUSD": 0,
        "balanceEUR": 0,
        "walletCryptoAccounts": []
      },
      {
        "id": "cln1qt5p400005b012sohm0sx",
        "name": "Wallet 3",
        "balanceUSD": 0,
        "balanceEUR": 0,
        "walletCryptoAccounts": []
      },
      {
        "id": "cln1p10nm00006b016ow1abpj",
        "name": "Wallet 4",
        "balanceUSD": 305.41,
        "balanceEUR": 301.96,
        "walletCryptoAccounts": [
          {
            "balance": 0.05591,
            "financialAsset": {
              "code": "ETH"
            },
            "blockchain": {
              "code": "ethereum"
            }
          }
        ]
      }

How do I retrieve my organization ID?

In order to retrieve an organization's identifier, you'll need to call your user details first, to understand which organization is related to them.

query User($where: UserWhereUniqueInput!) {
  user(where: $where) {
    fullName
    organizations {
      name
      id
    }
  }
}

Try it out!