Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我写了一个小脚本,用 ccxt 从 binance 或 bybit 下载 ohlcv 数据。我想从测试网和主网获取蜡烛数据。我查看了 ccxt 代码,两个网络都有 url,但我不知道如何设置选项。
我想一定有类似的东西。bybitt = ccxt.binance({ 'option': { 'defaultMarket': 'future' }})
有人知道吗?
使用 CCXT,您可以使用如下方法切换到沙箱/测试网(如果底层交易所有).set_sandbox_mode:
.set_sandbox_mode
import ccxt exchange = ccxt.binance({'enableRateLimit': True}) exchange.set_sandbox_mode(True)