Spot Margin Trade (UTA)

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

circle-exclamation

Toggle Margin Trade

circle-info

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

https://bybit-exchange.github.io/docs/v5/spot-margin-uta/switch-modearrow-up-right

Function name:

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

const result = await toggleUnifiedMarginTrade(myByBitAccount,
    {
        spotMarginMode: "1"
    });

Get Leveraged Token Market

circle-info

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

https://bybit-exchange.github.io/docs/v5/spot-margin-uta/set-leveragearrow-up-right

Function name:

Usage:

Last updated