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

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

https://bitgetlimited.github.io/apidoc/en/spot/#place-order

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

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

https://bitgetlimited.github.io/apidoc/en/spot/#batch-order

Function name:

Usage:

Cancel Order

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

https://bitgetlimited.github.io/apidoc/en/spot/#cancel-order

Function name:

Usage:

Cancel Order in Batch (single instruments)

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

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

Function name:

Usage:

Get Order Details

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-order-details

Function name:

Usage:

Get Order List

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-order-list

Function name:

Usage:

Get Order History

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-order-history

Function name:

Usage:

Get Transaction Details

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-transaction-details

Function name:

Usage:

Place Plan Order

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

https://bitgetlimited.github.io/apidoc/en/spot/#place-plan-order

Function name:

Usage:

Modify Plan Order

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

https://bitgetlimited.github.io/apidoc/en/spot/#modify-plan-order

Function name:

Usage:

Cancel Plan Order

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

https://bitgetlimited.github.io/apidoc/en/spot/#cancel-plan-order

Function name:

Usage:

Get Current Plan Orders

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-current-plan-orders

Function name:

Usage:

Get History Plan Orders

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

https://bitgetlimited.github.io/apidoc/en/spot/#get-history-plan-orders

Function name:

Usage:

Last updated