# Address

## [createNewAddress](https://github.com/BIoTws/biot-core/blob/master/core.js#L149)

Creating new Byteball address

**Params:**

&#x20;   walletId - **{string}** - Wallet id

{% tabs %}
{% tab title="JS module" %}

```javascript
await core.createNewAddress('x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY=')
```

{% endtab %}

{% tab title="CLI" %}

```bash
biot-core createNewAddress x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY=
```

{% endtab %}

{% tab title="RPC" %}

```javascript
client.request('createNewAddress', ['x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY='], (err, data) => {
    if(err)
        throw err;

    console.log(data);
});
```

{% endtab %}

{% tab title="WS" %}

```javascript
let message_id = id++;
socket.send(JSON.stringify({
    id: message_id,
    name: 'createNewAddress',
    args: ['x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY=']
}));
socket.onmessage = function (event) {
	let data = JSON.parse(event.data);
	if (data.id === message_id && data.name === 'createNewAddress') {
		console.log('result:', data.result);
	}
};
```

{% endtab %}

{% tab title="Result" %}

```javascript
4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
```

{% endtab %}
{% endtabs %}

## [getAddressBalance](https://github.com/BIoTws/biot-core/blob/master/core.js#L180)

Getting balance of address

**Params:**

&#x20;     address - **{string}** - Byteball address

{% tabs %}
{% tab title="JS module" %}

```javascript
await core.getAddressBalance('4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN')
```

{% endtab %}

{% tab title="CLI" %}

```bash
biot-core getAddressBalance 4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
```

{% endtab %}

{% tab title="RPC" %}

```javascript
client.request('getAddressBalance', ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN'], (err, data) => {
    if(err)
        throw err;

    console.log(data);
});
```

{% endtab %}

{% tab title="WS" %}

```javascript
let message_id = id++;
socket.send(JSON.stringify({
	id: message_id,
	name: 'getAddressBalance',
	args: ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN']
}));
socket.onmessage = function (event) {
	let data = JSON.parse(event.data);
	if (data.id === message_id && data.name === 'getAddressBalance') {
		console.log('result:', data.result);
	}
};
```

{% endtab %}

{% tab title="Result" %}

```javascript
{ base: { stable: 0, pending: 0 } }
```

{% endtab %}
{% endtabs %}

## [getListTransactionsForAddress](https://github.com/BIoTws/biot-core/blob/master/core.js#L279)

Getting list of transactions by address

**Params:**

&#x20;   address - **{string}** - Byteball address

{% tabs %}
{% tab title="JS module" %}

```javascript
await core.getListTransactionsForAddress('4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN')
```

{% endtab %}

{% tab title="CLI" %}

```bash
biot-core getListTransactionsForAddress 4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
```

{% endtab %}

{% tab title="RPC" %}

```javascript
client.request('getListTransactionsForAddress', ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN'], (err, data) => {
    if(err)
        throw err;

    console.log(data);
});
```

{% endtab %}

{% tab title="WS" %}

```javascript
let message_id = id++;
socket.send(JSON.stringify({
	id: message_id,
	name: 'getListTransactionsForAddress',
	args: ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN']
}));
socket.onmessage = function (event) {
	let data = JSON.parse(event.data);
	if (data.id === message_id && data.name === 'getListTransactionsForAddress') {
		console.log('result:', data.result);
	}
};
```

{% endtab %}

{% tab title="Result" %}

```javascript
[ { action: 'received',
    amount: 69000,
    my_address: 'BIKYZXVKFOEGG5LQEPE5SWBHNM43FEBB',
    arrPayerAddresses: [ 'C4QX5W3FMDNNLT47FHUCTBP75PIHDFZE' ],
    confirmations: 1,
    unit: 'DCaJ0KjGBqAoPnFau5poKukk9OJtPTwfWDcuDve5tEA=',
    fee: 589,
    time: '1532789752',
    level: null,
    mci: 651926,
    asset: undefined },
  { action: 'sent',
    amount: 4200,
    addressTo: 'H6OM5MV7RU2L3KSBY726V7WC2GL4MXXG',
    original_address: null,
    textAddress: '',
    claimed: false,
    mnemonic: null,
    confirmations: 1,
    unit: '/nvKyYwaDysXPhbeWK+Lhb96pg7A3d6lfGGm+J8jjq8=',
    fee: 896,
    time: '1530967712',
    level: null,
    mci: 635812,
    isTextcoin: false,
    asset: undefined },
  { action: 'sent',
    amount: 97400,
    addressTo: 'LXMCTWKAMC6AB4XHUAPBCEF5AOHC2KRQ',
    original_address: null,
    textAddress: '',
    claimed: false,
    mnemonic: null,
    confirmations: 1,
    unit: '/nvKyYwaDysXPhbeWK+Lhb96pg7A3d6lfGGm+J8jjq8=',
    fee: 896,
    time: '1530967712',
    level: null,
    mci: 635812,
    isTextcoin: false,
    asset: undefined },
  { action: 'sent',
    amount: 93504,
    addressTo: 'MMEXROUDVOGEKYT2E2PIYFGQCPDWCZJY',
    original_address: null,
    textAddress: '',
    claimed: false,
    mnemonic: null,
    confirmations: 1,
    unit: '/nvKyYwaDysXPhbeWK+Lhb96pg7A3d6lfGGm+J8jjq8=',
    fee: 896,
    time: '1530967712',
    level: null,
    mci: 635812,
    isTextcoin: false,
    asset: undefined },
  { action: 'received',
    amount: 96000,
    my_address: 'BIKYZXVKFOEGG5LQEPE5SWBHNM43FEBB',
    arrPayerAddresses: [ '2GF2PW7NGIXCAG6F5D4KNTRVFS5UF4GA' ],
    confirmations: 1,
    unit: 'uBRAJ8+IlLpaoHx003oIWDyk1TmJ96MK0+fmlCx5gCM=',
    fee: 589,
    time: '1530967632',
    level: null,
    mci: 635796,
    asset: undefined } ]
```

{% endtab %}
{% endtabs %}

## [myAddressInfo](https://github.com/BIoTws/biot-core/blob/master/core.js#L300)

Getting address info

**Params:**

&#x20;     address - **{string}** - Byteball address

{% tabs %}
{% tab title="JS module" %}

```javascript
await core.myAddressInfo('4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN')
```

{% endtab %}

{% tab title="CLI" %}

```bash
biot-core myAddressInfo 4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
```

{% endtab %}

{% tab title="RPC" %}

```javascript
client.request('myAddressInfo', ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN'], (err, data) => {
    if(err)
        throw err;

    console.log(data);
});
```

{% endtab %}

{% tab title="WS" %}

```javascript
let message_id = id++;
socket.send(JSON.stringify({
	id: id++,
	name: 'myAddressInfo',
	args: ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN']
}));
socket.onmessage = function (event) {
	let data = JSON.parse(event.data);
	if (data.id === message_id && data.name === 'myAddressInfo') {
		console.log('result:', data.result);
	}
};
```

{% endtab %}

{% tab title="Result" %}

```javascript
{ account: 3, is_change: 0, address_index: 0 }
```

{% 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://biot-ws.gitbook.io/biot-core/api/address.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.
