Public (Spot)

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

Get Server Time

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-server-time

Function name:

getServerTime()

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

const result = await getServerTime(myBitgetAccount)

Get Coin List

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-coin-list

Function name:

getCoinList()

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

const result = await getCoinList(myBitgetAccount)

Get Symbols

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

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

Function name:

getSymbols()

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

const result = await getSymbols(myBitgetAccount)

Get Single Symbol

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

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

Function name:

getSingleSymbol()

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

const result = await getSingleSymbol(myBitgetAccount, 
{
    symbol: "BTCUSDT_SPBL"
})

Last updated