You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My guess is that the pybit._http_manager._V5HTTPManager.prepare_payload method is responsible for that. It tries to cast values for these params straight to str without caring what type they were originally even if it was a NoneType.
The text was updated successfully, but these errors were encountered:
Why would you pass None? If you don't want to pass anything to a param, there's no need to pass it at all. Adding extra params with dead data is inefficient for an HTTP request.
Most libraries using JSON serialization will set the serializer to ignore null values for this reason specifically. It's also considered the best practice to omit null values for query string values (GET HTTP request).
If you try to directly pass None as a value for
"qty",
"price",
"triggerPrice",
"takeProfit",
"stopLoss"
it will be passed to API as a "None" value.
My guess is that the pybit._http_manager._V5HTTPManager.prepare_payload method is responsible for that. It tries to cast values for these params straight to str without caring what type they were originally even if it was a NoneType.
The text was updated successfully, but these errors were encountered: