TypeError:create_order()接受1个位置参数,但给出了2个

时间:2020-03-25 14:45:47

标签: python api binance

我正在尝试使用以下脚本在Binance下订单,但请找回该邮件:

TypeError: create_order() takes 1 positional argument but 2 were given

这是脚本的代码:

symbol = 'EOSUSDT'
TradeCoin = symbol
Decision = 'SIDE_BUY'
Assets =1
Price = 30

OrderLine = 'symbol=%s, side=%s, type=ORDER_TYPE_MARKET, quantity=%s, price=%s'
message = (OrderLine % (TradeCoin, Decision, Assets, Price))

print(message)
order = client.create_order(message)

1 个答案:

答案 0 :(得分:0)

tradePair = 'SUNBTC'
order = client.order_limit_sell(
symbol=tradePair,
quantity=0.200,
price= 0.000700,
newClientOrderId= 'ALPC')