Links

Spot Leverage Token

Documentation on interacting with ByBit's Spot Leverage Token API functions through the PENDAX Javascript SDK.
All parameters of type INTEGER listed in the Bybit API docs need to be passed in as a string.

Get Leverage Token Info

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

Function name:

getLeverageTokenInfo(options)

Usage:

import { createExchange } from "./exchanges/exchange.js";
let myByBitAccount = createExchange({
exchange: "bybit",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
label: "bybit",
testnet: "false"
});
async function getLeverageTokenInfo(exchange, options) {
try {
let result = await exchange.getLeverageTokenInfo(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getLeverageTokenInfo(myByBitAccount);

Get Leveraged Token Market

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

Function name:

getLeveragedTokenMarket(options)

Usage:

import { createExchange } from "./exchanges/exchange.js";
let myByBitAccount = createExchange({
exchange: "bybit",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
label: "bybit",
testnet: "false"
});
async function getLeveragedTokenMarket(exchange, options) {
try {
let result = await exchange.getLeveragedTokenMarket(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getLeveragedTokenMarket(myByBitAccountc,
{
ltCoin: "BTC3S"
});

Purchase

This function is under construction and may not behave as expected
Please refer to the official ByBit API Docs for the required parameters.

Function name:

purchaseLeverageToken(options)

Usage:

import { createExchange } from "./exchanges/exchange.js";
let myByBitAccount = createExchange({
exchange: "bybit",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
label: "bybit",
testnet: "false"
});
async function purchaseLeverageToken(exchange, options) {
try {
let result = await exchange.purchaseLeverageToken(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await purchaseLeverageToken(myByBitAccount,
{
ltCoin: "BTC3L",
ltAmount: ".001"
});

Redeem

This function is under construction and may not behave as expected
Please refer to the official ByBit API Docs for the required parameters.

Function name:

redeemLeverageToken(options)

Usage:

import { createExchange } from "./exchanges/exchange.js";
let myByBitAccount = createExchange({
exchange: "bybit",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
label: "bybit",
testnet: "false"
});
async function redeemLeverageToken(exchange, options) {
try {
let result = await exchange.redeemLeverageToken(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await redeemLeverageToken(myByBitAccount,
{
ltCoin: "BTC3L",
quantity: "0.001"
});

Get Purchase/Redemption Records

This function is under construction and may not behave as expected
Please refer to the official ByBit API Docs for the required parameters.

Function name:

getPurchaseRedemptionRecords(options)

Usage:

import { createExchange } from "./exchanges/exchange.js";
let myByBitAccount = createExchange({
exchange: "bybit",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
label: "bybit",
testnet: "false"
});
async function getPurchaseRedemptionRecords(exchange, options) {
try {
let result = await exchange.getPurchaseRedemptionRecords(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getPurchaseRedemptionRecords(myByBitAccount);