binance / binance-connector-python

Simple connector to Binance Public API
MIT License
1.93k stars 493 forks source link

binance.error.ClientError: (400, -1104, "Not all sent parameters were read; read '2' parameter(s) but was sent '3'.", #93

Closed glinerosuarez closed 3 years ago

glinerosuarez commented 3 years ago

Before submitting a new issue, please check if a similar issue has already been filed.

Issue subject

I'm getting the error: E binance.error.ClientError: (400, -1104, "Not all sent parameters were read; read '2' parameter(s) but was sent '3'.", {'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '97', 'Connection': 'keep-alive', 'Date': 'Wed, 18 Aug 2021 03:49:05 GMT', 'Server': 'nginx', 'x-mbx-uuid': 'b2481ad6-f0c5-4184-a2d5-43668f05b317', 'x-mbx-used-weight': '1', 'x-mbx-used-weight-1m': '1', 'Strict-Transport-Security': 'max-age=31536000; includeSubdomains', 'X-Frame-Options': 'SAMEORIGIN', 'X-Xss-Protection': '1; mode=block', 'X-Content-Type-Options': 'nosniff', 'Content-Security-Policy': "default-src 'self'", 'X-Content-Security-Policy': "default-src 'self'", 'X-WebKit-CSP': "default-src 'self'", 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 ce6cbaba4ae4791f264842567fcc912a.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'ORD52-C1', 'X-Amz-Cf-Id': 'fPUJC6XOwaTJjZVrShUCvNDu9nss5fAQ6v8ENWt1nqivAr5an0BbAA=='}) when passing start_time as an argument to Spot().klines()

Expected behaviour

I should get a list of klines data delimited by start_time just like when I send a request directly to the api like: /api/v3/klines?symbol=BNBUSDT&interval=1d&startTime=1619845200000&endTime=1627794000000

Actual behaviour

Throws the abovementioned error

Steps to reproduce

  1. Create a Spot instance client = Spot(base_url="https://testnet.binance.vision", key=bnb_client_key, secret=bnb_client_secret)
  2. Call the klinesmethod passing a value to start_time client.klines(symbol='BNBUSDT', interval=1d, start_time=1619845200000)

Environment

Provide any relevant information about your setup, such as:

2pd commented 3 years ago

start_time is NOT a legitimate parameter, check all available from the document

https://binance-connector.readthedocs.io/en/stable/binance.spot.market.html#kline-candlestick-data https://binance-docs.github.io/apidocs/spot/en/#change-log