All parameters of type INTEGER listed in the Bybit API docs need to be passed in as a string.
getLeverageTokenInfo(options)
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
getLeveragedTokenMarket(options)
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"
});
This function is under construction and may not behave as expected
purchaseLeverageToken(options)
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"
});
This function is under construction and may not behave as expected
redeemLeverageToken(options)
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
getPurchaseRedemptionRecords(options)
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);