CopyTrade (Futures)

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

Get Trader Open Order

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-trader-open-order

Function name:

getTraderOpenOrderCopyTrade(options)

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

const result = await getTraderOpenOrderCopyTrade(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        productType: "umcbl",
        pageSize: "20",
        pageNo: "1"
    });

Get Follower Open Orders

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-follower-open-orders

Function name:

getFollowersOpenOrderCopyTrade(options)

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

const result = await getFollowersOpenOrderCopyTrade(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        productType: "umcbl",
        pageSize: "20",
        pageNo: "1"
    });

Get Follower History Orders

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-follower-history-orders

Function name:

getFollowerHistoryOrdersCopyTrade(options)

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

const result = await getFollowerHistoryOrdersCopyTrade(myBitgetAccount, 
    {
        startTime: "1668073994000",
        endTime: "1668073994206",
        pageSize: "20",
        pageNo: "1"
    });

Trader Close Position

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

https://bitgetlimited.github.io/apidoc/en/mix/#trader-close-position

Function name:

traderClosePositionCopyTrade(options)

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

const result = await traderClosePositionCopyTrade(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        trackingNo: "6258224712558517"
    });

Trader Modify TPSL

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

https://bitgetlimited.github.io/apidoc/en/mix/#trader-modify-tpsl

Function name:

traderModifyTsplCopyTrade(options)

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

const result = await traderModifyTsplCopyTrade(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        trackingNo: "6258224712558517",
        stopProfitPrice:"24123.5",
        stopLossPrice:"21487.5"
    });

Get Traders History Orders

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-traders-history-orders

Function name:

getTradersHistoryOrdersCopyTrade(options)

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

const result = await getTradersHistoryOrdersCopyTrade(myBitgetAccount, 
    {
        startTime: "1668073994000",
        endTime: "1668073994206",
        pageSize: "20",
        pageNo: "1"
    });

Get Trader Profit Summary

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-trader-profit-summary

Function name:

getTraderProfitSummaryCopyTrade(options)

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

const result = await getTraderProfitSummaryCopyTrade(myBitgetAccount);

Get Trader History Profit Summary (currency)

Function name:

getTraderHistoryProfitSummaryCurrencyCopyTrade(options)

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

const result = await getTraderHistoryProfitSummaryCurrencyCopyTrade(myBitgetAccount);

Get Trader History Profit Summary (currency/date)

Function name:

getTraderHistoryProfitSummaryByCurrencyAndDateCopyTrade(options)

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

const result = await getTraderHistoryProfitSummaryByCurrencyAndDateCopyTrade(myBitgetAccount);

Get Trader History Profit Detail

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-trader-history-profit-detail

Function name:

getTraderHistoryProfitDetailCopyTrade(options)

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

const result = await getTraderHistoryProfitDetailCopyTrade(myBitgetAccount, 
    {
        marginCoin: "USDT",
        date: "1627354109502",
        pageSize: "20",
        pageNo: "1"
    });

Get Trader Profits Details

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-trader-profits-details

Function name:

getTraderProfitDetailsCopyTrade(options)

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

const result = await getTraderProfitDetailsCopyTrade(myBitgetAccount, 
    {
        pageSize: "20",
        pageNo: "1"
    });

Get CopyTrade Symbols

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-copytrade-symbols

Function name:

getCopyTradeSymbols(options)

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

const result = await getCopyTradeSymbols(myBitgetAccount);

Trader Change CopyTrade Symbol

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

https://bitgetlimited.github.io/apidoc/en/mix/#trader-change-copytrade-symbol

Function name:

traderChangeCopyTradeSymbol(options)

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

const result = await traderChangeCopyTradeSymbol(myBitgetAccount);

Last updated