All
FAQ
Announcements
Product documents
How do I trade with OKX on TradingView?
Note: spot and derivatives symbols have different order panel UI in TradingView, thus we have 2 accounts (spot and derivatives account) in TradingView. However, the trading account assets are shared by both spot and derivatives trading as you are in unified account.Published on 29 July 2025Updated on 20 Jan 202662How can I do spot trading with the Jupyter Notebook?
In our unified account system, there are four account modes: Spot mode Spot and futures mode Multi-currency margin mode Portfolio margin mode To understand the difference between different account modes and how to set up the account mode via the web UI, please read our dedicated guide. In margin mode or trade mode, the parameter tdMode determines how your position is going to be margined, which you need to set every time you place a new order.Published on 29 Sept 2023Updated on 10 Sept 2025542How can I do derivatives trading with the Jupyter Notebook?
Please refer to how to set up the account mode to understand the differences between the four modes and how to switch between them through our Web UI. 4.1 Get the current account configuration from the acctLv parameter in Get account configuration Make sure that you're in the correct account mode to trade derivatives. import okx.Account as Account flag = "1" # live trading: 0, demo trading: 1 accountAPI = Account.AccountAPI(api_key, secret_key, passphrase, False, flag) result = accountAPI.get_account_configPublished on 28 Sept 2023Updated on 12 Feb 2026193
Showing 1-3 of 3 articles