The new rate limit is: 100 requests/second per IP.
Unfortunately there is bug in this calculation.
If you try to send 2 simultaneous requests you immediately receive the rate limit error.
If you send the requests one after another you don't hit any rate limit error.
This rate limit calculation is buggy. Please fix it.
C# code to reproduce the error:
using System;
using System.Net;
using System.Threading.Tasks;
namespace ConsoleApp5
{
internal class Program
{
private static void Main(string[] args)
{
try
{
//RunSerial();
RunParallel();
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
Console.WriteLine("Press a key to exit.");
Console.ReadKey();
}
private static void RunSerial()
{
new WebClient().DownloadString(new Uri("https://api.hitbtc.com/api/2/public/currency"));
new WebClient().DownloadString(new Uri("https://api.hitbtc.com/api/2/public/symbol"));
}
private static void RunParallel()
{
Task.WaitAll(new WebClient().DownloadStringTaskAsync(new Uri("https://api.hitbtc.com/api/2/public/currency")),
new WebClient().DownloadStringTaskAsync(new Uri("https://api.hitbtc.com/api/2/public/symbol")));
}
}
}
The new rate limit is: 100 requests/second per IP. Unfortunately there is bug in this calculation. If you try to send 2 simultaneous requests you immediately receive the rate limit error. If you send the requests one after another you don't hit any rate limit error. This rate limit calculation is buggy. Please fix it.
C# code to reproduce the error: