# Wallet methods

## Wallet object

<table><thead><tr><th width="232">Name</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td><p>The unique system identifier of a wallet.</p><p>This value was generated automatically when creating a wallet and can’t be changed.</p></td></tr><tr><td><code>label</code></td><td>string</td><td><p>The tag or name assigned to a wallet for easier locating it in the system.</p><p>This value is set when creating a wallet and can be changed anytime.</p></td></tr><tr><td><code>status</code></td><td>number</td><td><p>The current status of a wallet. Possible values:</p><ul><li><code>1</code> — Not active. The wallet hasn’t been activated due to some technical or blockchain issues.</li><li><code>2</code> — In progress. The wallet is now being registered in the system or requires the activation and currently unavailable.</li><li><code>3</code> — Active. The wallet has been activated (if required) and can be used.</li></ul></td></tr><tr><td><code>type</code></td><td>number</td><td><p>The wallet type. Possible values:</p><ul><li><code>1</code> — Merchant</li><li><code>2</code> — Enterprise</li><li><code>5</code> — Swap</li></ul><p>This value was selected when creating a wallet and can’t be changed.</p></td></tr><tr><td><code>created_at</code></td><td>string</td><td>The date and time of wallet creation.</td></tr><tr><td><code>balance_confirmed</code></td><td>string</td><td>The balance available for financial operations.</td></tr><tr><td><code>balance_pending</code></td><td>string</td><td><p>The sum of all deposit- and payout-related transactions that haven’t yet received the required number of confirmation blocks.</p><p>This value is positive for incoming and negative for outgoing transactions. This balance can’t currently be used for financial operations.</p></td></tr><tr><td><code>balance_unusable</code></td><td>string</td><td><p>The amount of incoming transfers blocked by AML.</p><p>This balance can’t currently be used for financial operations.</p></td></tr><tr><td><code>minimal_transfer_amount</code></td><td>string</td><td><p><em>For Enterprise wallets only.</em></p><p>The minimum amount of the incoming transfer, in the wallet currency.</p><p>Payments below the specified amount are automatically rejected. This can be useful if the transaction blockchain fee exceeds the transaction amount. In this case, you can see a new transfer with the <em>Canceled</em> status on the <strong>Wallet management</strong> > <strong>Transfers</strong> page of the Web UI; the callback isn’t sent. Such transfers can be confirmed and accepted manually, on the <strong>Events</strong> page of the Web UI.</p></td></tr><tr><td><code>destination</code></td><td>object</td><td><p><em>For Enterprise wallets only.</em></p><p>The wallet address.</p><p>For more information, refer to <a data-mention href="/pages/cFAr9LBwWtPoW1BL5fcK#destination-object">/pages/cFAr9LBwWtPoW1BL5fcK#destination-object</a></p></td></tr><tr><td><code>currency</code></td><td>object</td><td><p>The wallet currency.</p><p>The object contains the string <code>id</code> field matching the currency ISO code (refer to <a href="/pages/XWwiLjmtneibLyPJTo7w">Currency codes</a> for possible values).</p></td></tr><tr><td><code>parent</code></td><td>object</td><td><p><em>For wallets denominated in tokens only.</em></p><p>The <a data-footnote-ref href="#user-content-fn-1">Parent wallet</a> of a wallet denominated in tokens. For other wallets, returns <code>"data": null</code>.</p><p>The object contains the string <code>id</code> field matching the parent wallet system identifier.</p></td></tr></tbody></table>

#### Wallet object example

```json
{
  "type": "wallet",
  "id": "448",
  "attributes": {
    "label": "My Wallet",
    "status": 3,
    "type": 2,
    "created_at": "2020-11-06T06:03:44.301815Z",
    "balance_confirmed": "0.23221548",
    "balance_pending": "0.00000000",
    "balance_unusable": "0.00364702",
    "minimal_transfer_amount": "0.00000546",
    "destination": {
      "address_type": "p2sh-segwit",
      "address": "2N3Ac2cZzRVoqfJGu1bFaAebq3izTgr1WLv"
    }
  },
  "relationships": {
    "currency": {
      "data": {
        "type": "currency",
        "id": "2005"
      }
    },
    "parent": {
      "data": {
        "type": "wallet",
        "id": "14"
      }
    }
  }
}
```

***

## Get wallet

### Request

<mark style="color:green;">`GET`</mark> `[base]/wallet/`<mark style="color:blue;">`{id}`</mark>

<table><thead><tr><th width="135">Name</th><th width="106">Type</th><th width="100">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>No</td><td>The unique system identifier of a wallet.</td></tr></tbody></table>

Filtering by object parameters can be applied according to the [JSON API Specification](https://jsonapi.org/format/#query-parameters-families).

#### Request example

{% tabs %}
{% tab title="cURL" %}

```sh
curl --request GET \
--url [base]/wallet/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = '[base]/wallet/'

headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer
}

requests.get(url, headers=headers)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;

$client = new GuzzleHttp\Client();
try {
  $res = $client->get('[base]/wallet/', [
    'headers' => [
      'Authorization' => 'Bearer <Change to your access token>',
      'Content-Type' => 'application/vnd.api+json',
    ],
  ]);
  echo $res->getBody();
} catch (RequestException $e) {}
```

{% endtab %}
{% endtabs %}

### Response

In case of success, the response body contains a [wallet object](#wallet-object) or an array of objects (if the `id` wasn’t specified).

The wallets list is paginated and the default page size is 10. You can adjust pagination according to the [JSON API Specification](https://jsonapi.org/format/#query-parameters-families).

#### Response codes

<table><thead><tr><th width="134">HTTP code</th><th width="274">Application code</th><th width="170">Description</th><th>Suggested action</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>200</code></mark></td><td>—</td><td>The request succeeded.</td><td>—</td></tr><tr><td><mark style="color:red;"><code>401</code></mark></td><td>2007: No active account found with the given credentials</td><td>Incorrect credentials.</td><td>Send correct credentials.</td></tr><tr><td><mark style="color:red;"><code>403</code></mark></td><td>3001: You can not view wallet</td><td>You don’t have permissions to view the wallet.</td><td>—</td></tr><tr><td><mark style="color:red;"><code>404</code></mark></td><td>404: Not found</td><td>The wallet with the given <code>id</code> wasn’t found.</td><td>Send a correct <code>id</code>.</td></tr><tr><td><mark style="color:red;"><code>500</code></mark></td><td>—</td><td>Internal server error.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>502</code></mark></td><td>—</td><td>Bad gateway.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>503</code></mark></td><td>—</td><td>Service unavailable.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>504</code></mark></td><td>—</td><td>Gateway timeout.</td><td>Try again later.</td></tr><tr><td><mark style="color:red;"><code>5xx</code></mark></td><td>—</td><td>Other server errors.</td><td>Try again later.</td></tr></tbody></table>

[^1]: Enterprise wallet to which a token wallet is linked.

    For more details, see [Key terms](/references/key-terms.md#parent-wallet)


---

# Agent Instructions: 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:

```
GET https://docs.b2binpay.com/api-guide-v2-deprecated/wallet-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
