question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include raw response from exchange in raised errors

See original GitHub issue

It 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:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rasmustaarnbycommented, Dec 26, 2017

@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.

1reaction
rasmustaarnbycommented, Dec 26, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >
Python raising exception where message has carriage return ...
I would like my exception message to show the raw response, which may include a carriage return. I noticed that carriage returns sort...
Read more >
Exchanges — ccxt 2.4.71 documentation
PHP include 'ccxt.php'; var_dump (\ccxt\Exchange::$exchanges); ... methods return raw decoded JSON objects in response from the exchanges, as is, untouched.
Read more >
Exceptions: Why throw early? Why catch late?
If there's an error with gathering your raw data in the data layer, throw an exception to notify whoever requested the data. Do...
Read more >
Errored Out Outbound Message Missing XML Raw Response
We have a requirement to display the actual error message when processing a outbound message. It is noted that we do not get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found