Trade (Spot)

Documentation on interacting with Bitget's Spot Market Trading & Order API functions through the PENDAX Javascript SDK.

All Spot Market Trading & Order API endpoints require authentication. Please create Bitget API keys to interact with these functions successfully. Accounts must be funded or collateralized for any trades to successfully post.

Place Order

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#place-orderarrow-up-right

Function name:

placeOrder(options)

Usage:

import { createExchange } from "./exchanges/exchange.js";

  let myBitgetAccount = createExchange({
      exchange: "bitget",
      authenticate: "true",
      key: "myKeys",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "bitget",
      marginType: "usdt"
});

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(myBitgetAccount, 
    {
     symbol: 'BTCUSDT_SPBL',
     side: 'buy',
     orderType: 'market',
     force: 'normal',
     quantity: '10'
   });

Batch Order

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#batch-orderarrow-up-right

Function name:

Usage:

Cancel Order

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#cancel-orderarrow-up-right

Function name:

Usage:

Cancel Order in Batch (single instruments)

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order-in-batch-single-instrumentsarrow-up-right

Function name:

Usage:

Get Order Details

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-order-detailsarrow-up-right

Function name:

Usage:

Get Order List

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-order-listarrow-up-right

Function name:

Usage:

Get Order History

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-order-historyarrow-up-right

Function name:

Usage:

Get Transaction Details

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-detailsarrow-up-right

Function name:

Usage:

Place Plan Order

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#place-plan-orderarrow-up-right

Function name:

Usage:

Modify Plan Order

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#modify-plan-orderarrow-up-right

Function name:

Usage:

Cancel Plan Order

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#cancel-plan-orderarrow-up-right

Function name:

Usage:

Get Current Plan Orders

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-current-plan-ordersarrow-up-right

Function name:

Usage:

Get History Plan Orders

circle-info

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-history-plan-ordersarrow-up-right

Function name:

Usage:

Last updated