python-bittrex icon indicating copy to clipboard operation
python-bittrex copied to clipboard

Authenticated calls occasionally return "NO_API_RESPONSE"

Open yidkato opened this issue 6 years ago • 6 comments

This issue was brought up a while ago but closed with no followup.

I'm using this to get the balance after creating an authenticated object: balance = bittrex.get_balance(currency='BTC')['result']['Balance']

When I make the call, I occasionally get the response {'result': None, 'message': 'NO_API_RESPONSE', 'success': False}

This happens about 5% of the time. It successfully returns the balance most of the time. First I thought it was a rate limit issue, so I tried waiting about 15 seconds before making each call, but it still runs into the error. This also happens sometimes (though less often) when I try other calls, like getting ask price for a market.

Can anybody provide some insight?

yidkato avatar Apr 19 '18 18:04 yidkato

Probably an issue with 2.0, older versions won't give me 'NO_API_RESPONSE'

hamkline avatar May 05 '18 21:05 hamkline

I'm using v1.1 though

yidkato avatar May 06 '18 03:05 yidkato

I'm seeing this as well. I couldn't find an answer so I'm just writing my code to retry if this happens.

shazrat avatar May 11 '18 08:05 shazrat

Ya I have been assuming this is a failure on bittrex to send back the correct data on an API call. It is especially bad when you place an order and get back the NO API RESPONSE but the order goes through.

I have had to account for this, and I honestly still think it is their API. I am no in the transition their websockets but sometimes those close on me for no reason either.

Jwdev-wr avatar May 16 '18 05:05 Jwdev-wr

It is especially bad when you place an order and get back the NO API RESPONSE but the order goes through.

Wow, I forgot that is a potential case. Very unfortunate that such an issue exists.

shazrat avatar May 20 '18 06:05 shazrat

I have the same issue with v1.1. Even trade feedback is missing sometimes.

I think one issue is that the python-bittrex just silently swallows what is the real error in bittrex.py/_api_query: ... except Exception: return { 'success': False, 'message': 'NO_API_RESPONSE', 'result': None }

If I add some extra details the real exception in the background is: HTTPSConnectionPool(host='bittrex.com', port=443): Read timed out. (read timeout=10)

So look like Bittrex is not answering at least in this one case.

balint77 avatar May 25 '18 02:05 balint77