This section is under construction. Some functions may not work correctly.
Get Broker Info
Function name:
Usage:
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 getBrokerInfo(exchange) {
try {
let result = await exchange.getBrokerInfo();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getBrokerInfo(myBitgetAccount);
Create Sub Account
Function name:
Usage:
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 createSubaccount(exchange) {
try {
let result = await exchange.createSubaccount();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await createSubaccount(myBitgetAccount
Get Sub List
Function name:
Usage:
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 getSubList(exchange) {
try {
let result = await exchange.getSubList();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getSubList(myBitgetAccount
Modify Sub Account
Function name:
Usage:
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 modifySubaccount(exchange) {
try {
let result = await exchange.modifySubaccount();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await modifySubaccount(myBitgetAccount
Modify Sub Email
Function name:
modifySubaccountEmail()
Usage:
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 modifySubaccountEmail(exchange) {
try {
let result = await exchange.modifySubaccountEmail();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await modifySubaccountEmail(myBitgetAccount
Get Sub Email
Function name:
Usage:
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 getSubId(exchange) {
try {
let result = await exchange.getSubId();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getSubId(myBitgetAccount
Get Sub Spot Assets
Function name:
Usage:
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 getSubSpotAssets(exchange) {
try {
let result = await exchange.getSubSpotAssets();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getSubSpotAssets(myBitgetAccount
Get Sub Future Assets
Function name:
getSubFuturesAssets()
Usage:
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 getSubFuturesAssets(exchange) {
try {
let result = await exchange.getSubFuturesAssets();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getSubFuturesAssets(myBitgetAccount
Get Sub Deposit Address
Function name:
getSubDepositAddressBrokerOnly()
Usage:
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 getSubDepositAddressBrokerOnly(exchange) {
try {
let result = await exchange.getSubDepositAddressBrokerOnly();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getSubDepositAddressBrokerOnly(myBitgetAccount
Sub Withdrawal
Function name:
subWithdrawalBrokerOnly()
Usage:
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 subWithdrawalBrokerOnly(exchange) {
try {
let result = await exchange.subWithdrawalBrokerOnly();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await subWithdrawalBrokerOnly(myBitgetAccount
Sub Deposit Auto Transfer
Function name:
subDepositAutoTransferBrokerOnly()
Usage:
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 subDepositAutoTransferBrokerOnly(exchange) {
try {
let result = await exchange.subDepositAutoTransferBrokerOnly();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await subDepositAutoTransferBrokerOnly(myBitgetAccount