Sub API Interface (Broker)

This section is under construction. Some functions may not work correctly.

Create Sub ApiKey

Please refer to the official Bitget API Docs for the required parameters.

https://bitgetlimited.github.io/apidoc/en/broker/#create-sub-apikey-only-broker

Function name:

createSubApiKeyBrokerOnly()

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 createSubApiKeyBrokerOnly(exchange) {
    try {
        let result = await exchange.createSubApiKeyBrokerOnly();
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

const result = await createSubApiKeyBrokerOnly(myBitgetAccount

Get Sub ApiKey List

Please refer to the official Bitget API Docs for the required parameters.

https://bitgetlimited.github.io/apidoc/en/broker/#get-sub-apikey-list

Function name:

getSubApiKeyList()

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 getSubApiKeyList(exchange) {
    try {
        let result = await exchange.getSubApiKeyList();
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

const result = await getSubApiKeyList(myBitgetAccount

Modify Sub ApiKey

Please refer to the official Bitget API Docs for the required parameters.

https://bitgetlimited.github.io/apidoc/en/broker/#modify-sub-apikey-only-broker

Function name:

modifySubApiKeyBrokerOnly()

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 modifySubApiKeyBrokerOnly(exchange) {
    try {
        let result = await exchange.modifySubApiKeyBrokerOnly();
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

const result = await modifySubApiKeyBrokerOnly(myBitgetAccount

Last updated