Account
Documentation on interacting with ByBit's Account 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 Wallet Balance
Function name:
getWalletBalance(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 getWalletBalance(exchange, options) {
try {
let result = await exchange.getWalletBalance(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getWalletBalance(myByBitAccount,
{
accountType: "UNIFIED"
});Upgrade to Unified Account
Function name:
Usage:
Get Borrow History
Function name:
Usage:
Get Collateral Info
Function name:
Usage:
Get Coin Greeks
Function name:
Usage:
Get Fee Rate
Function name:
Usage:
Get Account Info
Function name:
Usage:
Get Transaction Log
Function name:
Usage:
Set Margin Mode
Function name:
Usage:
Set MMP
This function is under construction and may not behave as expected
Function name:
Usage:
Reset MMP
This function is under construction and may not behave as expected
Function name:
Usage:
Get MMP State
This function is under construction and may not behave as expected
Function name:
Usage:
Last updated