> For the complete documentation index, see [llms.txt](https://docs.inabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inabit.com/api-reference/develop-with-inabit-api/wallets/wallets-info.md).

# Wallets Info

## Fetch Organization Wallets

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

<pre class="language-graphql"><code class="lang-graphql"><strong>query Wallets($where: WalletWhereInput) {
</strong>  wallets(where: $where) {
    id
    name
    balanceUSD
    balanceEUR
    walletCryptoAccounts {
      name
      balance
      financialAsset {
        code
      }
      blockchain {
        code
      }
    }
  }
}
</code></pre>

### **Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

### **Body (**<mark style="color:orange;">WalletWhereInput</mark> object)

| Name                                 | Type   | Description     |
| ------------------------------------ | ------ | --------------- |
| id<mark style="color:red;">\*</mark> | string | Organization ID |

Example body:

```json
{
  "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.

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

### Response

Return values:

| Name                           | Type    | Description                                                  |
| ------------------------------ | ------- | ------------------------------------------------------------ |
| id                             | String  | Wallet ID                                                    |
| name                           | Integer | Wallet Name                                                  |
| balanceUSD                     | String  | Balance in USD                                               |
| balanceEUR                     | String  | Balance in Euro                                              |
| balance (walletCryptoAccounts) | Integer | Balance (of a wallet's asset - per asset) ("crypto account") |
| code (financialAsset)          | String  | Financial Asset Code                                         |
| code (blockchain)              | String  | Blockchain Code                                              |

{% tabs %}
{% tab title="🟢 Success" %}

```json
{
  "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"
            }
          }
        ]
      }
```

{% endtab %}

{% tab title="🔴 Failure" %}

```json
{
  "errors": [
    {
      "message": "Unauthorized",
      "extensions": {
        "code": "UNAUTHENTICATED",
        "response": {
          "statusCode": 401,
          "message": "Unauthorized"
        }
      }
    }
  ],
  "data": {
    "transaction": null
  }
}
```

{% endtab %}
{% endtabs %}

**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.

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

### Try it out!

{% embed url="<https://studio.apollographql.com/sandbox/explorer?endpoint=https%3A%2F%2Fapi.inabit.app%2Fgraphql&explorerURLState=N4IgJg9gxgrgtgUwHYBcQC4QEcYIE4CeABAOoCGANhQigM4AUAJAO4AW%2BC6pl1KJ7eBAEkkABxgoAlEWAAdJESLMeNBmw5cWAhNLkLFRJGUTyDRAEaUySKAgCqAZQAipg5YrXbAUTsAlV4rKVDQAwoSiKBAAglBQEDCotDIBBkYm%2BmbunggpigBmAJZGNgWUUbS0NMkZZkRxYDk1igC%2BuRYU0ADWUKxkRdW1BvWNg601Yy3yzSDNQA>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.inabit.com/api-reference/develop-with-inabit-api/wallets/wallets-info.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
