You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ex.assert_demo(): raises ConfigError unless REST requests of the instance really go to the exchange demo/testnet. It checks the transport, not the demo flag: no REST address of the instance may equal a production address of the exchange, and on OKX and Bitget, where the demo uses the production host, the demo header (x-simulated-trading: 1, paptrading: 1) must be set. No network. Market WS streams are not checked (some demos use production ones).
Docs
ex.ccxt is an escape hatch, not the recommended path. Exchange id → symbol: ex.symbol('BTCUSDT'); symbol → id: (await ex.market(symbol)).id; demo check: ex.assert_demo().