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
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
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
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
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
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
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
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
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
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
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
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
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"
});