Account

Documentation on interacting with ByBit's Account API functions through the PENDAX Javascript SDK.

Get Wallet Balance

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

https://bybit-exchange.github.io/docs/v5/account/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

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

https://bybit-exchange.github.io/docs/v5/account/upgrade-unified-account

Function name:

Usage:

Get Borrow History

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

https://bybit-exchange.github.io/docs/v5/account/borrow-history

Function name:

Usage:

Get Collateral Info

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

https://bybit-exchange.github.io/docs/v5/account/collateral-info

Function name:

Usage:

Get Coin Greeks

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

https://bybit-exchange.github.io/docs/v5/account/coin-greeks

Function name:

Usage:

Get Fee Rate

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

https://bybit-exchange.github.io/docs/v5/account/fee-rate

Function name:

Usage:

Get Account Info

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

https://bybit-exchange.github.io/docs/v5/account/account-info

Function name:

Usage:

Get Transaction Log

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

https://bybit-exchange.github.io/docs/v5/account/transaction-log

Function name:

Usage:

Set Margin Mode

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

https://bybit-exchange.github.io/docs/v5/account/set-margin-mode

Function name:

Usage:

Set MMP

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

https://bybit-exchange.github.io/docs/v5/account/set-mmp

Function name:

Usage:

Reset MMP

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

https://bybit-exchange.github.io/docs/v5/account/reset-mmp

Function name:

Usage:

Get MMP State

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

https://bybit-exchange.github.io/docs/v5/account/get-mmp-state

Function name:

Usage:

Last updated