Market (Futures)

Documentation on interacting with Bitget's Futures Market Data API functions through the PENDAX Javascript SDK.

Get All Symbols

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

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

Function name:

getAllFuturesSymbols(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",
      testnet: "false"
});

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

const result = await getAllFuturesSymbols(myBitgetAccount, {productType: "umcbl"})

Get Depth

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

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

Function name:

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

const result = await getDepthFutures(myBitgetAccount,
{ symbol: "BTCUSDT_UMCBL" });

Get Single Symbol Tracker

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-single-symbol-ticker

Function name:

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

const result = await getSingleTickerFutures(myBitgetAccount, 
{ symbol: "BTCUSDT_UMCBL" });

Get All Symbol Tracker

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-all-symbol-ticker

Function name:

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

const result = await getAllTickersFutures(myBitgetAccount 
    {
        productType: umcbl
    });

Get Fills

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

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

Function name:

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

const result = await getFillsFutures(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL"
    });

Get Candle Data

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-candle-data

Function name:

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

const result = await getCandlesFutures(myBitgetAccount, 
    {
        symbol: "BTCUSDT_UMCBL",
        granularity: "300",
        startTime: "1659406928000",
        endTime: "1659410528000"
    });

Get Symbol Index Price

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-symbol-index-price

Function name:

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

const result = await getSymbolIndexPriceFutures(myBitgetAccount,
    {
        symbol: "BTCUSDT_UMCBL"
    });

Get Symbol Next Funding Time

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-symbol-next-funding-time

Function name:

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

const result = await getNextFundingTimeFutures(myBitgetAccount, 
    { 
        symbol: "BTCUSDT_UMCBL"
    });

Get History Funding Rate

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-history-funding-rate

Function name:

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

const result = await getHistoricFundingRateFutures(myBitgetAccount, 
    { 
        symbol: "BTCUSDT_UMCBL"
    });

Get Current Funding Rate

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-current-funding-rate

Function name:

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

const result = await getCurrentFundingRateFutures(myBitgetAccount, 
    { 
        symbol: "BTCUSDT_UMCBL"
    });

Get Open Interest

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

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

Function name:

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

const result = await getOpenInterestFutures(myBitgetAccount, 
    { 
        symbol: "BTCUSDT_UMCBL"
    });

Get Symbol Mark Price

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-symbol-mark-price

Function name:

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

const result = await getMarkPriceFutures(myBitgetAccount, 
    { 
        symbol: "BTCUSDT_UMCBL"
    });

Get Symbol Leverage

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

https://bitgetlimited.github.io/apidoc/en/mix/#get-symbol-leverage

Function name:

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

const result = await getSymbolLeverageFutures(myBitgetAccount, 
    { 
        symbol: "BTCUSDT_UMCBL"
    });

Last updated