gateio / gateapi-python

243 stars 91 forks source link

order_book depth limit is stricter in API than in the actual API #158

Open gezabohus opened 5 months ago

gezabohus commented 5 months ago

Hi all,

In futures_api.py we have

if ( self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 50 ): # noqa: E501 raise ApiValueError( "Invalid value for parameterlimitwhen callinglist_futures_order_book, must be a value less than or equal to50" ) # noqa: E501 Notice the limit is 50.

TLDR: the actual limit is 300, so the python API should not throttle this to 50.

The gateIO API docs don't say anything about the limit, so I tried it with 5000 and got the error message

GateApiException('TOO_BIG', 'limit 300', None, ApiException())

I have then tested with 300 and it worked.

Thanks for listening.