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.

GDAX ExchangeError instead of ExchangeNotAvailable?

See original GitHub issue

Hi again, when executing given code below:

import asyncio
loop = asyncio.get_event_loop()
import ccxt.async as ccxt
gdax = ccxt.gdax({
    "apiKey": <<my_api>>,
    "password": <<my_pw>>,
    "secret": <<my_secret>>,
})
loop.run_until_complete(gdax.create_limit_buy_order('LTC/BTC', 0.1, 0.00000000000010101020212101202102102))

I get: ExchangeNotAvailable: gdax POST https://api.gdax.com/orders 400 {"message":"price too small (0.00000000000010101020212101202)"}

Following ccxt’s wiki page on error hangling, shouldn’t this be treated as ExchangeError instead of ExchangeNotAvailable?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
davidpodrebaraccommented, Nov 14, 2017

These are fixed and work great! Sorry If I am bothering you with this, but I have a few more that are not parsed correctly. I will just put them here:

  • hitbtc2 -> Insufficient funds
ccxt.base.errors.ExchangeNotAvailable: hitbtc2 POST https://api.hitbtc.com/api/2/order?clientOrderId=1510655090650&symbol=BCHBTC&side=sell&quantity=2.601&type=limit&price=0.2016102000 400 {"error":{"code":20001,"message":"Insufficient funds","description":"Check that the funds are sufficient, given commissions"}}
  • poloniex -> min size error as InvalidOrder
 ccxt.base.errors.ExchangeNotAvailable: poloniex POST https://poloniex.com/tradingApi 422 {"error":"Total must be at least 0.0001."}

I know these are very “boring” bugs, but they should be fixed eventually. Maybe we can put ExchangeError as default instead of ExchangeNotAvailable?

0reactions
kroitorcommented, Nov 14, 2017

@davidpodrebarac ok, now this should be fixed completely. Tested them on our side as well, both of them should work for you as well. Thx again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

GDAX FetchOrder Exceptions · Issue #2061 · ccxt/ccxt - GitHub
GDAX FetchOrder Exceptions #2061 ... Seems more proper for this behavior to result in an ExchangeError than a NetworkError . Logs. gdax ......
Read more >
Coinbase Pro | Digital Asset Exchange
US-based crypto exchange. Trade Bitcoin (BTC), Ethereum (ETH), and more for USD, EUR, and GBP. Support for FIX API and REST API. Easily...
Read more >
Getting class Exchange not found? ▷ Download ccxt/ccxt +++ ...
Download ccxt / ccxt / Exchange.php - Solve class 'Exchange' not found. This file is part of the package ccxt/ccxt. Please go to...
Read more >
Exchanges — ccxt 2.4.71 documentation
Catching ExchangeError or ExchangeNotAvailable with HTTP error codes 400, 403, 404, 429, 500, 501, 503, etc.. Having DNS resolving issues, SSL certificate ...
Read more >
GDAX: What It Was, Rebranding as Coinbase Pro - Investopedia
It is now known as Coinbase Pro. GDAX was popular as one of the few reliable exchanges where U.S. traders could trade bitcoin...
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