# getWallet()

**Method Signature**

```php
public function getWallet($blockchain, $address) 
```

**Parameters**

| Name         | Type   | Description               |
| ------------ | ------ | ------------------------- |
| `blockchain` | String | Blockchain address in hex |
| `address`    | String | Wallet address in hex     |

**Example**

```php
<?php
require 'vendor/autoload.php';
use CircularProtocol\Api\CircularProtocolAPI;

$circular = new CircularProtocolAPI();
$blockchain = "0x8a20baa40c45dc5055aeb26197c203e576ef389d9acb171bd62da11dc5ad72b2";
$address = "0x8b1dd25076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd945083738";

$result = $circular->getWallet($blockchain, $address);
```

**Result**

The result will be of type `Array`, but for easier readability, here is the equivalent in JSON.

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

```json
{
    "Result": 200,
    "Response": {
        "Address": "8b1dd25076c04c5139acba458f86c69cd2d322c61d19bc28daa3bbd945083738",
        "Assets": [ // Owned assets on the specified blockchain
            {
                "Address": "",
                "Amount": "1989449.200000",
                "Description": "Circular Coin",
                "EnableSwap": 0,
                "Name": "CIRX",
                "Price": "1",
                "Royalties": "0",
                "Type": "C_TYPE_COIN",
                "URL": "",
                "URLType": ""
            }
        ],
        "ContractData": [],
        "Contracts": {
            "ContractData": [
                {
                    "Address": "2b71b51f05ea3233a14204e9645023fe5c5dea7bc0747485a5194b2e5c24b65e",
                    "Data": "7b2241646472657373223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c2254797065223a224d6f766544417070222c224e616d65223a224d6f766544417070222c2253796d626f6c223a224d4450222c224f776e6572223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c224e6f746573223a313733313830373633313030302c2242616c616e6365223a302c22416c6c6f77616e636573223a7b7d7d"
                },
                {
                    "Address": "67cdbc9ba3ec4ff2cb5af6b511e94eefd486d6cc831d220fa48a188880aeba54",
                    "Data": "7b2241646472657373223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c2254797065223a224d6f766544417070222c224e616d65223a224d6f766544417070222c2253796d626f6c223a224d4450222c224f776e6572223a22307838623164643235303736633034633531333961636261343538663836633639636432643332326336316431396263323864616133626264393435303833373338222c224e6f746573223a313733313831303138383030302c2242616c616e6365223a302c22416c6c6f77616e636573223a7b7d7d"
                },
            ]
        },
        "DateCreation": "2024:07:15-13:17:29", // Wallet creation date
        "LatestTransactions": [
            {
                "Amount": 1000000.0,
                "Asset": "CIRX",
                "BlockID": 1062,
                "ID": "2ac8078d535706118e17e99baff38dd485fc9281de8c23d7ccc13c374a7dd9b5",
                "Timestamp": "2024:07:15-19:10:07"
            },
            {
                "Amount": -1004.0,
                "Asset": "CIRX",
                "BlockID": 1083,
                "ID": "e99be1869fe1bd452c3c6950d11a674045f6f3a096f67f8cbcbd4bbd849c7697",
                "Timestamp": "2024:07:17-13:36:17"
            }
        ],
        "Nonce": 55,
        "PublicKey": "04b5aa6be8b2e3420fb5a8b22e80e64ace8271d88dc4c081436956b0848e7bcf4e864b35c59e218885ed3d839352b81f85872c9460732ca05b8c18dad29dbad00e",
        "Version": "1.0.1", // Wallet version
        "Vouchers": []
    },
    "Node": "7bb5bd50729d6857942701d5673ea70ca1625f883230d8543970a452d1abe1c4"
}
```

{% endtab %}

{% tab title="102" %}
When the selected node for the response is not ready:

```json
{
    "Result": 102,
    "Response": "Node Not Ready",
    "Node": "fc8fe5ee103dafe353c98ce90a1cb2956fd51a109512e074bd3d26a06d268e81"
}
```

{% endtab %}

{% tab title="118" %}
When the blockchain address is not correct.

```json
{
    "Result": 118,
    "Response": "Wrong Format",
    "Node": "fc8fe5ee103dafe353c98ce90a1cb2956fd51a109512e074bd3d26a06d268e81"
}
```

{% endtab %}
{% endtabs %}


---

# 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://circular-protocol.gitbook.io/standard-apis/api-docs/php/getwallet.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.
