Trading

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

Place Order

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

https://bybit-exchange.github.io/docs/v5/order/create-order

Function name:

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

const result = await placeOrder(myByBitAccount, 
    {
       category: 'linear',
       symbol: 'BTCUSD',
       side: 'Buy',
       orderType: 'Market',
       qty: '10'
     });

Amend Order

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

https://bybit-exchange.github.io/docs/v5/order/amend-order

Function name:

Usage:

Cancel Order

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

https://bybit-exchange.github.io/docs/v5/order/cancel-order

Function name:

Usage:

Get Open Orders

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

https://bybit-exchange.github.io/docs/v5/order/open-order

Function name:

Usage:

Cancel All Orders

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

https://bybit-exchange.github.io/docs/v5/order/cancel-all

Function name:

Usage:

Get Order History

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

https://bybit-exchange.github.io/docs/v5/order/order-list

Function name:

Usage:

Batch Place Order

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

https://bybit-exchange.github.io/docs/v5/order/batch-place

Function name:

Usage:

Batch Amend Order

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

https://bybit-exchange.github.io/docs/v5/order/batch-amend

Function name:

Usage:

Batch Cancel Order

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

https://bybit-exchange.github.io/docs/v5/order/batch-cancel

Function name:

Usage:

Get Borrow Quota

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

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

Function name:

Usage:

Set Disconnect Cancel All

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

https://bybit-exchange.github.io/docs/v5/order/dcp

Function name:

Usage:

Last updated