Oanda reduced request limitation to 2 requests each second

Today I distribute my ftap robot on my VPS that locates in the US, to trade on practice account. The robot always failed to download data from Oanda server and gives error 429, which is “too many requests”. It's weird because the robot works fine on my local machine, which locates in China.

Oanda changed the limitation to 2 requests each second instead of 15

After digging in to Oanda developer documentation, I found that now only 2 new connections are allowed in a second. Before the limitation was 15! The reason that the robot works on my local machine is my network connection is quite slow.

The solution

Currently my work around is changing the limitation to 2 instead of previous 10 in the robot. But it's not a solution at all. My robot will trade on several pairs, running on M1 data, apparently 2 requests in each second is far from enough.

The final solution should be using HTTP persistent connection. Oanda allows up to 15 requests in a second in a single connection. My robot is written in Qt, which enables HTTP persistent connection by default. But in my robot each connection will be closed after the request is done, so HTTP persistent connection doesn't work at all. I'm not familiar how to use HTTP persistent connection in Qt efficiently, so I may need more time on investigating it or even rewrite the whole network part in my trading system.


Enter your comment. Wiki syntax is allowed: