TinkoffInvestSDK
marketdataservice.h
1 #ifndef MARKETDATASERVICE_H
2 #define MARKETDATASERVICE_H
3 
4 #include "customservice.h"
5 #include <grpcpp/grpcpp.h>
6 #include "marketdata.grpc.pb.h"
7 #include "servicereply.h"
8 #include <vector>
9 
10 using grpc::Channel;
11 using namespace tinkoff::public_::invest::api::contract::v1;
12 
23 {
24 
25 public:
26  MarketData(std::shared_ptr<Channel> channel, const std::string &token);
27  ~MarketData();
28 
30  ServiceReply GetCandles(const std::string &figi, int64_t fromseconds, int32_t fromnanos, int64_t toseconds, int32_t tonanos, CandleInterval interval);
32  ServiceReply GetLastPrices(const std::vector<std::string> &figis);
34  ServiceReply GetOrderBook(const std::string &figi, int32_t depth);
36  ServiceReply GetTradingStatus(const std::string &figi);
38  ServiceReply GetLastTrades(const std::string &figi, int64_t fromseconds, int32_t fromnanos, int64_t toseconds, int32_t tonanos);
39 
40 private:
41  std::unique_ptr<MarketDataService::Stub> m_marketDataService;
42 
43 };
44 
45 #endif // MARKETDATASERVICE_H
MarketData
Сервис получения биржевой информации
Definition: marketdataservice.h:22
CustomService
Родительский класс для всех сервисов
Definition: customservice.h:14
ServiceReply
Класс-обертка над proto-ответами сервисов
Definition: servicereply.h:17