<p>Yes, most exchange APIs fail at times. Add a sleep-and-retry to your code.</p>

CC BY-SA 3.0
2014-11-22T19:58:06.500Z
Thanks, that's great. How long do you think the sleep should be/number of times to retry?
meld24
CC BY-SA 3.0
2014-11-22T22:29:51.333Z
Depends on the exchange's request limit and how urgent the data is, you wouldn't want to abuse the API service. Personally I'd give it at least 10 seconds but it's up to you.
George
CC BY-SA 3.0
2014-11-22T17:39:39.297Z
2014-11-22T17:39:39.297Z
George
<p>Is it normal to infrequently see errors retrieving trade/depth history by API from BTC-E? Or should I never see them.</p>

<p>I seem to be seeing at least one such error each day, I am running my script on an Amazon EC2. </p>

<p>Thanks,
Jon. </p>

<api><error><btce>
BTC-E API (Retrieve error)
meld24
# BTC-E API (Retrieve error)

(Asked by: username_0 on 2014-11-22)

Is it normal to infrequently see errors retrieving trade/depth history by API from BTC-E? Or should I never see them.

I seem to be seeing at least one such error each day, I am running my script on an Amazon EC2.

Thanks,
Jon.

**Tags:** api, error, btce


---

## 1 answers

### Answer by username_1 on 2014-11-22. Score: 0 | Accepted answer

Yes, most exchange APIs fail at times. Add a sleep-and-retry to your code.

> **Comments:**
> **username_0**: Thanks, that's great. How long do you think the sleep should be/number of times to retry?  
> **username_1**: Depends on the exchange's request limit and how urgent the data is, you wouldn't want to abuse the API service. Personally I'd give it at least 10 seconds but it's up to you.  

---

