[img]https://i.sstatic .net/7A161Kke.png[/img]
Прямо сейчас я могу получить данные книги заказов из последней отметки времени, используя следующий код:
Код: Выделить всё
#include
#include
#include
#include
#include "../lib/json.hpp"
#include
vector Binance::fetch_orderbook() {
string response = http_get(api_url + "api/v3/depth?symbol=BTCUSDT&limit=500");
json data = json::parse(response);
return data
}
Код: Выделить всё
Price: 62351.89000000, Size: 0.20000000, Side: sell
Price: 62351.23000000, Size: 0.10530000, Side: sell
Price: 62350.52000000, Size: 0.10205000, Side: buy
Price: 62350.41000000, Size: 0.00009000, Side: buy
Код: Выделить всё
time. buy price. size. side
1499865549590 6xxxx.xxx. 0.000xx buy
1499865549590 6xxxx.xxx. 0.000xx buy
1499865549590 6xxxx.xxx. 0.000xx sell
1499865549590 6xxxx.xxx. 0.000xx sell
1499865553000 6yyyy.yyy. 0.000yy buy
1499865553000 6yyyy.yyy. 0.000yy buy
1499865553000 6yyyy.yyy. 0.000yy sell
1499865553000 6yyyy.yyy. 0.000yy sell
...
Обновление: кто-то сказал мне, что API не поддерживает нужные мне данные. Так как же это сделать?
Подробнее здесь: https://stackoverflow.com/questions/784 ... inance-api
Мобильная версия