> For the complete documentation index, see [llms.txt](https://docs.compendium.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.compendium.finance/pendax/using-pendax-sdk/bingx-functions/fund-account.md).

# Fund Account

## Query Assets

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

<https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Query+Assets>
{% endhint %}

#### Function Name:

```javascript
getAssets()
```

#### Usage:

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

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

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

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

## Asset Transfer

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

<https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Asset+Transfer>
{% endhint %}

#### Function Name:

```javascript
transferAssets()
```

#### Usage:

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

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

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

let result = await transferAssets(myBingxExchange, {
	type: "<ENUM>",
	asset: "<string>",
	amount: "<DECIMAL>"
});
```

## Asset transfer 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/account-api.html#Asset+transfer+records>
{% endhint %}

#### Function Name:

```javascript
getAssetTransferRecords()
```

#### Usage:

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

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

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

let result = await getAssetTransferRecords(myBingxExchange, {
	type: "<ENUM>"
});
```

## Main Accoun internal transfer

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

<https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Main+Accoun+internal+transfer>
{% endhint %}

#### Function Name:

```javascript
mainAccountInternalTransfer()
```

#### Usage:

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

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

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

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

## Main account internal transfer 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/account-api.html#Main+account+internal+transfer+records>
{% endhint %}

#### Function Name:

```javascript
getMainAccountInternalTransferRecords()
```

#### Usage:

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

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

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

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

## Query Assets

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

<https://bingx-api.github.io/docs/#/en-us/spot/account-api.html#Query+Assets>
{% endhint %}

#### Function Name:

```javascript
getAssetsSpot()
```

#### Usage:

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

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

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

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

## Asset Transfer

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

<https://bingx-api.github.io/docs/#/en-us/spot/account-api.html#Asset+Transfer>
{% endhint %}

#### Function Name:

```javascript
assetTransferSpot()
```

#### Usage:

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

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

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

let result = await assetTransferSpot(myBingxExchange, {
	type: "<ENUM>",
	asset: "<string>",
	amount: "<DECIMAL>"
});
```

## Asset transfer records

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

<https://bingx-api.github.io/docs/#/en-us/spot/account-api.html#Asset+transfer+records>
{% endhint %}

#### Function Name:

```javascript
getAssetTransferRecordsSpot()
```

#### Usage:

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

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

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

let result = await getAssetTransferRecordsSpot(myBingxExchange, {
	type: "<ENUM>"
});
```


---

# 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.compendium.finance/pendax/using-pendax-sdk/bingx-functions/fund-account.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.
