TinkoffInvestSDK
stopordersservice.h
1 #ifndef STOPORDERSSERVICE_H
2 #define STOPORDERSSERVICE_H
3 
4 #include "customservice.h"
5 #include <grpcpp/grpcpp.h>
6 #include "stoporders.grpc.pb.h"
7 #include "servicereply.h"
8 
9 using grpc::Channel;
10 using namespace tinkoff::public_::invest::api::contract::v1;
11 
21 {
22 
23 public:
24  StopOrders(std::shared_ptr<Channel> channel, const std::string &token);
25  ~StopOrders();
26 
28  ServiceReply PostStopOrder(const std::string &figi, int64_t quantity, int64_t units, int32_t nano, int64_t stopunits, int32_t stopnano, StopOrderDirection direction, const std::string &accountId, StopOrderExpirationType expirationType, StopOrderType stopOrderType, const std::string &orderId, int64_t expireSeconds, int32_t expireNanos);
30  ServiceReply GetStopOrders(const std::string &accountId);
32  ServiceReply CancelStopOrder(const std::string &accountId, const std::string &stopOrderId);
33 
34 private:
35  std::unique_ptr<StopOrdersService::Stub> m_stopOrdersService;
36 
37 };
38 
39 #endif // STOPORDERSSERVICE_H
StopOrders
Сервис работы со стоп-заявками
Definition: stopordersservice.h:20
CustomService
Родительский класс для всех сервисов
Definition: customservice.h:14
ServiceReply
Класс-обертка над proto-ответами сервисов
Definition: servicereply.h:17