Not all sent parameters were read
Before submitting a new issue, please check if a similar issue has already been filed.
Issue subject
Briefly describe the issue here.
pparams = {
'symbol': COIN,
'side': 'BUY',
'type': 'TAKE_PROFIT_LIMIT',#追踪止盈限价买单
'timeInForce': 'GTC',
'quantity':BUY_COUNT,
'price':result,
'stopPrice':result, #到此价格触发追踪
'trailingDelta:':250 #2.5% # 从追踪开始,当从最低价上涨2.5%的情况下,以limit价格挂单
}
print("doBuy stopPrice价格:%f"%result)
try:
response = client.new_order(**params)
print("doBuy 返回:"+response)
return "xx"
except ClientError as error:
logging.error(
"Found error. status: {}, error code: {}, error message: {}".format(
error.status_code, error.error_code, error.error_message
)
)
I GOT error as below:
ERROR:root:Found error. status: 400, error code: -1104, error message: Not all sent parameters were read; read '9' parameter(s) but was sent '10'. 下单失败,退出
Environment
Provide any relevant information about your setup, such as:
- Version of binance-connector-python
- Python version :3.1.0
- Operating system: mac
去除trailingDelta参数就可以下单了,但是这样不就变成的限价单子,失去了追踪功能?要怎样才能支持?
可以了
pparams = { 'symbol': COIN, 'side': 'BUY', 'type': 'TAKE_PROFIT_LIMIT',#追踪止盈限价买单 'timeInForce': 'GTC', 'quantity':BUY_COUNT, 'price':result, 'stopPrice':result, #到此价格触发追踪 'trailingDelta:':250 #2.5% # 从追踪开始,当从最低价上涨2.5%的情况下,以limit价格挂单 } print("doBuy stopPrice价格:%f"%result) try: response = client.new_order(**params) print("doBuy 返回:"+response) return "xx" except ClientError as error: logging.error( "Found error. status: {}, error code: {}, error message: {}".format( error.status_code, error.error_code, error.error_message ) )
你好,
参数名 trailingDelta 中似乎有一个错误——你不小心在末尾多加了一个 :。