Sub-Account Managenent

Create sub-account

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Create+sub-account

Function Name:

createSubaccount()

Usage:

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

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

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

let result = await createSubaccount(myBingxExchange, {
	subAccountString: "<string>",
	recvWindow: "<long>"
});

Query account uid

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Query+account+uid

Function Name:

getAccountUid()

Usage:

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

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

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

let result = await getAccountUid(myBingxExchange);

Get sub-account list

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Get+sub-account+list

Function Name:

getSubAccountList()

Usage:

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

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

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

let result = await getSubAccountList(myBingxExchange, {
	page: "<int>",
	limit: "<int>"
});

Query sub-account spot assets

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Query+sub-account+spot+assets

Function Name:

getSubaccountSpotAssets()

Usage:

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

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

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

let result = await getSubaccountSpotAssets(myBingxExchange, {
	subUid: "<long>"
});

Create an API Key for a sub-account

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Create+an+API+Key+for+a+sub-account

Function Name:

createSubaccountApikey()

Usage:

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

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

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

let result = await createSubaccountApikey(myBingxExchange, {
	subUid: "<long>",
	note: "<string>",
	permissions: "<Array>"
});

Query the API Key of a sub-account

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Query+the+API+Key+of+a+sub-account

Function Name:

getSubaccountApikey()

Usage:

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

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

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

let result = await getSubaccountApikey(myBingxExchange, {
	uid: "<long>"
});

Reset the API Key of a sub-account

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Reset+the+API+Key+of+a+sub-account

Function Name:

resetSubaccountApikey()

Usage:

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

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

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

let result = await resetSubaccountApikey(myBingxExchange, {
	subUid: "<long>",
	apiKey: "<string>",
	note: "<string>",
	permissions: "<Array>"
});

Delete the API Key of sub-accounts

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Delete+the+API+Key+of+sub-accounts

Function Name:

deleteSubaccountApikey()

Usage:

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

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

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

let result = await deleteSubaccountApikey(myBingxExchange, {
	subUid: "<long>",
	apiKey: "<string>"
});

Freeze and unfreeze sub-accounts

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Freeze+and+unfreeze+sub-accounts

Function Name:

setSubaccountFrozen()

Usage:

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

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

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

let result = await setSubaccountFrozen(myBingxExchange, {
	subUid: "<long>",
	freeze: "<bool>"
});

Authorize sub-account internal transfers

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Authorize+sub-account+internal+transfers

Function Name:

authorizeSubaccountInternalTransfers()

Usage:

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

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

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

let result = await authorizeSubaccountInternalTransfers(myBingxExchange, {
	subUids: "<string>",
	transferable: "<boolean>"
});

Sub-account internal transfer

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Sub-account+internal+transfer

Function Name:

subaccountInternalTransfer()

Usage:

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

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

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

let result = await subaccountInternalTransfer(myBingxExchange, {
	coin: "<string>",
	userAccountType: "<int>",
	userAccount: "<string>",
	amount: "<float64>",
	walletType: "<int>"
});

Create deposit address for sub-account

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Create+deposit+address+for+sub-account

Function Name:

createSubaccountDepositAddress()

Usage:

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

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

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

let result = await createSubaccountDepositAddress(myBingxExchange);

Get sub-account deposit address

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Get+sub-account+deposit+address

Function Name:

getSubaccountDepositAddress()

Usage:

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

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

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

let result = await getSubaccountDepositAddress(myBingxExchange);

Get sub-account deposit records

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Get+sub-account+deposit+records

Function Name:

getSubaccountDepositRecords()

Usage:

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

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

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

let result = await getSubaccountDepositRecords(myBingxExchange);

Query sub-account internal transfer records

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Query+sub-account+internal+transfer+records

Function Name:

getSubaccountInternalTransferRecords()

Usage:

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

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

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

let result = await getSubaccountInternalTransferRecords(myBingxExchange, {
	coin: "<string>"
});

Query Sub-Account Transfer History (For Master Account Operations Only)

Function Name:

getSubaccsferHistory()

Usage:

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

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

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

let result = await getSubaccsferHistory(myBingxExchange);

Query the transferable amount of funds in the parent-child account (only for parent account operations).

Function Name:

getTransferableParentChildFunds()

Usage:

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

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

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

let result = await getTransferableParentChildFunds(myBingxExchange);

Sub-Account Asset Transfer Interface (For Master Account Operations Only)

Function Name:

subaccountAssetTransfer()

Usage:

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

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

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

let result = await subaccountAssetTransfer(myBingxExchange);

Asset overview

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Asset+overview

Function Name:

getAssetOverview()

Usage:

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

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

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

let result = await getAssetOverview(myBingxExchange);

Batch inquiry of sub account asset overview

Please refer to the official BingX API Docs for the Required parameters.

https://bingx-api.github.io/docs/#/en-us/common/sub-account#Batch+inquiry+of+sub+account+asset+overview

Function Name:

getSubaccountAssetOverviewBatchInquiry()

Usage:

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

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

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

let result = await getSubaccountAssetOverviewBatchInquiry(myBingxExchange);

Last updated