binance-connector-python icon indicating copy to clipboard operation
binance-connector-python copied to clipboard

Not all sent parameters were read

Open iceAnson opened this issue 1 year ago • 3 comments

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

iceAnson avatar Jun 16 '24 07:06 iceAnson

去除trailingDelta参数就可以下单了,但是这样不就变成的限价单子,失去了追踪功能?要怎样才能支持?

iceAnson avatar Jun 16 '24 09:06 iceAnson

可以了

iceAnson avatar Jun 16 '24 11:06 iceAnson

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 ) )

DangVanSo avatar Jul 11 '24 19:07 DangVanSo

你好, 参数名 trailingDelta 中似乎有一个错误——你不小心在末尾多加了一个 :

alplabin avatar Nov 20 '24 03:11 alplabin