# Wallet Deposits and Withdrawals

## Deposit records

{% hint style="info" %}
Please refer to the official BingX API Docs for the Required parameters.

<https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Deposit+records>
{% endhint %}

#### Function Name:

```javascript
getDepositRecords()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getDepositRecords(exchange, options) {
    try {
        let result = await exchange.getDepositRecords(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getDepositRecords(myBingxExchange);
```

## Withdraw records

{% hint style="info" %}
Please refer to the official BingX API Docs for the Required parameters.

<https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Withdraw+records>
{% endhint %}

#### Function Name:

```javascript
getWithdrawRecords()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getWithdrawRecords(exchange, options) {
    try {
        let result = await exchange.getWithdrawRecords(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getWithdrawRecords(myBingxExchange);
```

## Query currency deposit and withdrawal data

{% hint style="info" %}
Please refer to the official BingX API Docs for the Required parameters.

<https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query+currency+deposit+and+withdrawal+data>
{% endhint %}

#### Function Name:

```javascript
getCurrencyDepositAndWithdrawalData()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getCurrencyDepositAndWithdrawalData(exchange, options) {
    try {
        let result = await exchange.getCurrencyDepositAndWithdrawalData(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getCurrencyDepositAndWithdrawalData(myBingxExchange);
```

## Withdraw

{% hint style="info" %}
Please refer to the official BingX API Docs for the Required parameters.

<https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Withdraw>
{% endhint %}

#### Function Name:

```javascript
withdraw()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function withdraw(exchange, options) {
    try {
        let result = await exchange.withdraw(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await withdraw(myBingxExchange, {
	coin: "<string>",
	address: "<string>",
	amount: "<float64>",
	walletType: "<int64>"
});
```

## Main Account Deposit Address

{% hint style="info" %}
Please refer to the official BingX API Docs for the Required parameters.

<https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Main+Account+Deposit+Address>
{% endhint %}

#### Function Name:

```javascript
getMainAccountDepositAddress()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getMainAccountDepositAddress(exchange, options) {
    try {
        let result = await exchange.getMainAccountDepositAddress(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getMainAccountDepositAddress(myBingxExchange);
```

## Deposit risk control records

{% hint style="info" %}
Please refer to the official BingX API Docs for the Required parameters.

<https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Deposit+risk+control+records>
{% endhint %}

#### Function Name:

```javascript
getDepositRiskControlRecords()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "bingx"
  });

async function getDepositRiskControlRecords(exchange, options) {
    try {
        let result = await exchange.getDepositRiskControlRecords(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getDepositRiskControlRecords(myBingxExchange);
```


---

# 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.compendium.finance/pendax/using-pendax-sdk/bingx-functions/wallet-deposits-and-withdrawals.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.
