# Account (Futures)

## Get Single Account

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-single-account>
{% endhint %}

#### Function name:

```javascript
getSingleAccountFutures(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt",
      testnet: "false"
});

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

const result = await getSingleAccountFutures(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        marginCoin: "USDT"
    });
```

## Get Account List

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-account-list>
{% endhint %}

#### Function name:

```javascript
getAccountListFutures(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await getAccountListFutures(myBitgetAccount, 
    {
        productType: "umcbl"
    });
```

## Get Sub-Account Contract Assets

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-sub-account-contract-assets>
{% endhint %}

#### Function name:

```javascript
getSubaccountContractAssets(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await getSubaccountContractAssets(myBitgetAccount, 
    {
        productType: "umcbl"
    });
```

## Get Open Count

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-open-count>
{% endhint %}

#### Function name:

```javascript
getOpenCountFutures(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await getOpenCountFutures(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        marginCoin: "USDT",
        openPrice: "23189.5",
        leverage: "20",
        openAmount:"5000"
    });
```

## Change Leverage

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

<https://bitgetlimited.github.io/apidoc/en/mix/#change-leverage>
{% endhint %}

#### Function name:

```javascript
setLeverage(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await setLeverage(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        marginCoin: "USDT",
        leverage: "2"
    });
```

## Change Margin

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

<https://bitgetlimited.github.io/apidoc/en/mix/#change-margin>
{% endhint %}

#### Function name:

```javascript
getApiKeyInfo(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await changeMargin(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        marginCoin: "USDT",
        amount: "-10"
    });
```

## Change Margin Mode

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

<https://bitgetlimited.github.io/apidoc/en/mix/#change-margin-mode>
{% endhint %}

#### Function name:

```javascript
setMarginMode(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await setMarginMode(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        marginCoin: "USDT",
        marginMode: "crossed"
    });
```

## Change Hold Mode

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

<https://bitgetlimited.github.io/apidoc/en/mix/#change-hold-mode>
{% endhint %}

#### Function name:

```javascript
changeHoldMode(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await changeHoldMode(myBitgetAccount, 
    {
        productType: "umcbl",
        holdMode: "double_hold"
    });
```

## Get Symbol Position

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-symbol-position>
{% endhint %}

#### Function name:

```javascript
getSymbolPosition(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await getSymbolPosition(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        marginCoin: "USDT"
    });
```

## Get All Position

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-all-position>
{% endhint %}

#### Function name:

```javascript
getAllPositionsFutures(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await getAllPositionsFutures(myBitgetAccount, 
    {
        productType: "umcbl",
        marginCoin: "USDT"
    });
```

## Get Account Bill

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-account-bill>
{% endhint %}

#### Function name:

```javascript
getAccountBill(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await getAccountBill(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL", 
        marginCoin: "USDT",
        startTime: "1659403328000",
        endTime: "1659406928000",
        pageSize: "20"
    });
```

## Get Business Account Bill

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

<https://bitgetlimited.github.io/apidoc/en/mix/#get-business-account-bill>
{% endhint %}

#### Function name:

```javascript
getBusinessAccountBill(options)
```

#### Usage:&#x20;

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

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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

const result = await getBusinessAccountBill(myBitgetAccount, 
    {
        productType: "umcbl",
        startTime: "1659403328000",
        endTime: "1659406928000",
        pageSize: "20"
    });
```


---

# 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/bitget-functions/account-futures.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.
