Speed up Binance listings check
Closed this issue · 1 comments
rickstaa commented
On my setup, the Binance listings check runs at 4hz. It would be great to get this to 10hz, which is far below the 1200hz rate of Binance.
rickstaa commented
Looks like my network, location or the Binance server response time is the bottleneck, not the code. I get the same rate when using the following C++ code:
#include <iostream>
#include <string>
#include <cpr/cpr.h>
int main(int argc, char** argv) {
// Fetch price data in loop and print rate
for (int i = 0; i < 10; i++) {
cpr::Response r = cpr::Get(cpr::Url{"https://api.binance.com/api/v3/ticker/price"},
cpr::Authentication{"user", "pass", cpr::AuthMode::BASIC});
std::cout << "Status code: " << r.status_code << '\n';
std::cout << "Rate: " << 1/r.elapsed << '\n';
}
}