Include raw response from exchange in raised errors
See original GitHub issueIt seems Binance requires a symbol param for the openOrders
, allOrders
and myTrades
endpoints. This seems a little odd, given that you would have to try all symbols to make sure you’d actually got a complete list of your recent orders.
Info: https://www.binance.com/restapipub.html#user-content-account-endpoints https://www.reddit.com/r/binance/comments/768fw7/hows_the_api/?st=jbcd102s&sh=3d907801
Now, this is not an issue with ccxt itself but the raised error from ccxt could definitely be improved.
The raised error I get calling allOrders
:
binance GET https://api.binance.com/api/v3/allOrders?timestamp=1514328539008&signature=XXX 400 not accessible from this location at the moment
The raw error from Binance dumping the $result
var in Exchange.php in the fetch function:
{"code":-1102,"msg":"Mandatory parameter 'symbol' was not sent, was empty/null, or malformed."}
While I did find the reason eventually it took some time to realize, as I at first thought it was related to the time syncing issue mentioned in #936
A solution to this could be to either parse and append the msg
from the response or simply just append the raw response, given that exchanges might not follow the same conventions. Maybe you have already thought of this or I’m overlooking some obvious issues doing this, if so, forgive me.
Besides that, this is really great work and I truly appreciate it.
- OS: Ubuntu Trusty
- Programming Language: PHP 7.*
- CCXT version: 1.10.488
- Exchange: Binance
- Method: GET
Regards, Rasmus
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
@kroitor I most certainly will., thanks. I have sent a little something to your tip jar as a sort of penalty fee for asking questions for which I should have found the answers myself.
Happy new year.
HA! Damn, Please excuse my stupidity. This is what I get for jumping in to fast, not paying attention.
Just tested and everything I need to know is right there in the error message
binance fetchOrders requires a $symbol param
I’ll let myself out.