1 #ifndef INSTRUMENTSSERVICE_H
2 #define INSTRUMENTSSERVICE_H
4 #include "customservice.h"
5 #include <grpcpp/grpcpp.h>
6 #include "instruments.grpc.pb.h"
7 #include "servicereply.h"
10 using namespace tinkoff::public_::invest::api::contract::v1;
26 Instruments(std::shared_ptr<Channel> channel,
const std::string &token);
30 ServiceReply TradingSchedules(
const std::string &exchange, int64_t fromseconds, int32_t fromnanos, int64_t toseconds, int32_t tonanos);
32 ServiceReply BondBy(InstrumentIdType idType,
const std::string &classCode,
const std::string &
id);
36 ServiceReply GetBondCoupons(
const std::string &figi, int64_t fromseconds, int32_t fromnanos, int64_t toseconds, int32_t tonanos);
38 ServiceReply CurrencyBy(InstrumentIdType idType,
const std::string &classCode,
const std::string &
id);
40 ServiceReply Currencies(InstrumentStatus instrumentStatus);
42 ServiceReply EtfBy(InstrumentIdType idType,
const std::string &classCode,
const std::string &
id);
46 ServiceReply FutureBy(InstrumentIdType idType,
const std::string &classCode,
const std::string &
id);
50 ServiceReply ShareBy(InstrumentIdType idType,
const std::string &classCode,
const std::string &
id);
54 ServiceReply GetAccruedInterests(
const std::string &figi, int64_t fromseconds, int32_t fromnanos, int64_t toseconds, int32_t tonanos);
58 ServiceReply GetInstrumentBy(InstrumentIdType idType,
const std::string &classCode,
const std::string &
id);
60 ServiceReply GetDividends(
const std::string &figi, int64_t fromseconds, int32_t fromnanos, int64_t toseconds, int32_t tonanos);
68 ServiceReply EditFavorites(
const std::vector<EditFavoritesRequestInstrument> &instruments, EditFavoritesActionType actionType);
71 std::unique_ptr<InstrumentsService::Stub> m_instrumentsService;
75 #endif // INSTRUMENTSSERVICE_H