Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Getting Started
Unified Trading AccountReality Trading GuideCFD Trading GuideBest Practices GuideQuick Start
Demo Trading
Rate Limit
API Reference
API DocumentationEnumeration
Error Code
Overview

CFD Trading Guide

Overview

Bitget CFD (Contract for Difference) supports trading on a variety of mainstream assets, covering gold, crude oil, forex indices, and more. Trading pair names follow formats such as XAUUSD, XAUUSD.s, and XAUUSD.pro.

To meet the programmatic trading needs of quantitative teams and algorithmic traders, Bitget Open API supports CFD trading. Traders can use the API to automate order execution, fund transfers, and data queries directly from their CFD accounts.

Note: The API does not support opening CFD accounts. Before trading CFD via the API, users must first complete the CFD account opening process on the Bitget website or App. Once your CFD account has been opened, you can start trading through the API.

Supported API Features

The CFD Open API currently supports the following core features:

  1. Trading operations
    • Fund transfers: Transfer assets into or out of CFD accounts.
    • Order execution: Open and close positions at market price, place limit orders, and cancel orders.
    • Risk management: Set take-profit and stop-loss conditions when placing orders, or modify TP/SL settings for existing positions.
  2. Data queries
    • Account and historical data: Query CFD account information, historical fund records, and order history.
    • Market data: Access real-time CFD market data and instrument configuration parameters.

Trading Modes and Instrument Code Rules (⚠️ Important for API Calls)

Each account is assigned to a single trading mode, and instrument code suffixes vary by mode. When calling the order placement API, users must provide an instrument code that matches their account's current trading mode. Otherwise, the system will return an error and reject the order. Details are as follows:

Trading modeAPI instrument code formatExample
Zero-fee modeInstrument name with the .s suffixXAUUSD.s, EURUSD.s
ECN modeInstrument name without a suffixXAUUSD, EURUSD
Pro modeInstrument name with the .pro suffixXAUUSD.pro, XAGUSD.pro

Note: Confirm your account's trading mode before calling the order placement API.

For more details about CFD, please refer to:

  • CFD Beginner's Guide
  • CFD Trading Mode Explained
  • Bitget Open API now supports CFD trading
Reality Trading GuideBest Practices Guide
On this page
  • Overview
  • Supported API Features
  • Trading Modes and Instrument Code Rules (⚠️ Important for API Calls)