我尝试通过下面的代码做到这一点,但我得到了错误
import ccxt # noqa: E402
import apiConfig
exchange = ccxt.binance({
'apiKey': apiConfig.API_KEY,
'secret': apiConfig.API_SECRET,
'enableRateLimit': True,
})
symbol = 'RVN/USDT'
type = 'limit' # or 'market', other types aren't unified yet
side = 'buy'
amount = 69 # your amount
price = 0.21 # your price
# overrides
params = {
'stopPrice': 0.20, # your stop price
'type': 'stopLimit',
}
order = exchange.create_order(symbol, type, side, amount, price, params)
我收到此错误:ccxt.base.errors.BadRequest: binance {"code":-1106,"msg":"Parameter 'stopPrice' sent when not required."}