Account
Documentation on interacting with ByBit's Account API functions through the PENDAX Javascript SDK.
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
Function name:
Usage:
Reset MMP
Function name:
Usage:
Get MMP State
Function name:
Usage:
Last updated