Spot Margin Trade (Normal)

Documentation on interacting with ByBit's Spot Margin Trade (Normal) API functions through the PENDAX Javascript SDK.

Get Margin Coin Info

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/margin-data

Function name:

getMarginCoinInfo(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 getMarginCoinInfo(exchange, options) {
    try {
        let result = await exchange.getMarginCoinInfo(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

const result = await getMarginCoinInfo(myByBitAccount);

Get Borrowable Coin Info

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/borrowable-data

Function name:

Usage:

Get Interest & Quota

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/interest-quota

Function name:

Usage:

Get Loan Account Info

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

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

Function name:

Usage:

Borrow

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/borrow

Function name:

Usage:

Repay

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/repay

Function name:

Usage:

Get Borrow Order Detail

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/borrow-order

Function name:

Usage:

Get Repayment Order Detail

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/repay-order

Function name:

Usage:

Toggle Margin Trade

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

https://bybit-exchange.github.io/docs/v5/spot-margin-normal/switch-mode

Function name:

Usage:

Last updated