![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The BrokerSession adapter for tossinvest::TossClient. More...
#include <algotradelib/src/brokers/tossinvest/traits.hpp>
Public Types | |
| using | Client = tossinvest::TossClient |
| The client type. | |
| using | Config = tossinvest::TossConfig |
| The configuration type. | |
| using | Account = std::int64_t |
| The account type: the account sequence. | |
| using | BrokerTag = tossinvest::Broker |
| The broker tag. | |
| using | PlaceAck = OrderAck |
| The order acknowledgement type. | |
| using | Amendment = tossinvest::TossAmendment |
| The amendment type. | |
| using | HistoryQuery = tossinvest::TossOrderQuery |
| The order-history query type. | |
| using | WorkingOrdersResult = OrderPage |
| The working-order result type. | |
| using | AccountListItem = tossinvest::TossAccount |
| The account-listing item type. | |
Static Public Member Functions | |
| static constexpr Venue | effective_route (Venue) noexcept |
| Returns the venue a Toss order reaches: none in particular (Toss does not route by venue, and its listings carry none). | |
| static const network::RateLimitStats * | rate_limit_stats (const Client &client) |
| Returns this client's pacing statistics, or null when it is unpaced. | |
| template<typename Token> | |
| static auto | instrument (Client &client, InstrumentId subject, Token &&token) |
| Forwards a reference-data request. | |
| template<typename Token> | |
| static auto | calendar (Client &client, Country country, std::optional< Date > from, Token &&token) |
| Forwards a calendar request. | |
| template<typename Token> | |
| static auto | price_limits (Client &client, InstrumentId instrument, Token &&token) |
| Forwards a price-bound request. | |
| template<typename Token> | |
| static auto | trades (Client &client, InstrumentId instrument, int count, Token &&token) |
| Forwards a recent-execution request. | |
| template<typename Token> | |
| static auto | prices (Client &client, std::vector< InstrumentId > instruments, Token &&token) |
| Forwards a batch quote request. | |
| template<typename Token> | |
| static auto | depth (Client &client, InstrumentId instrument, Token &&token) |
| Forwards an order book request. | |
| template<typename Token> | |
| static auto | bars (Client &client, BarQuery query, Token &&token) |
| Forwards a bar request. | |
| template<typename Token> | |
| static auto | quote (Client &client, InstrumentId instrument, Token &&token) |
| Forwards a quote request. | |
| template<typename Token> | |
| static auto | accounts (Client &client, Token &&token) |
| Forwards an account listing request. | |
| template<typename Token> | |
| static auto | buying_power (Client &client, const Account &account, Currency currency, Token &&token) |
| Forwards a buying-power request for the bound account. | |
| template<typename Token> | |
| static auto | sellable_quantity (Client &client, const Account &account, InstrumentId instrument, Token &&token) |
| Forwards a sellable-quantity request for one instrument. | |
| template<typename Token> | |
| static auto | commissions (Client &client, const Account &account, Token &&token) |
| Forwards a commission-schedule request for the bound account. | |
| template<typename Token> | |
| static auto | holdings (Client &client, const Account &account, Token &&token) |
| Forwards a holdings request for the bound account. | |
| template<typename Token> | |
| static auto | place_order (Client &client, const Account &account, OrderRequest order, Token &&token) |
| Forwards an order submission for the bound account. | |
| template<typename Token> | |
| static auto | replace_order (Client &client, const Account &account, Amendment amendment, Token &&token) |
| Forwards an order modification for the bound account. | |
| template<typename Token> | |
| static auto | cancel_order (Client &client, const Account &account, Amendment amendment, Token &&token) |
| Forwards an order cancellation, which transmits the identifier only. | |
| template<typename Token> | |
| static auto | working_orders (Client &client, const Account &account, Token &&token) |
| Forwards an OPEN listing for the bound account. | |
| template<typename Token> | |
| static auto | order_history (Client &client, const Account &account, HistoryQuery query, Token &&token) |
| Forwards a CLOSED listing for the bound account. | |
| template<typename Token> | |
| static auto | order_by_id (Client &client, const Account &account, std::string order_id, Token &&token) |
| Forwards a single-order inquiry for the bound account. | |
Static Public Attributes | |
| static constexpr std::string_view | name = tossinvest::Broker::name |
| The broker's name. | |
| static constexpr bool | blocking = false |
| false: requests complete through a completion token. | |
The BrokerSession adapter for tossinvest::TossClient.
Definition at line 409 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::Account = std::int64_t |
The account type: the account sequence.
Definition at line 428 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::AccountListItem = tossinvest::TossAccount |
The account-listing item type.
Definition at line 446 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::Amendment = tossinvest::TossAmendment |
The amendment type.
Definition at line 437 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::BrokerTag = tossinvest::Broker |
The broker tag.
Definition at line 431 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::Client = tossinvest::TossClient |
The client type.
Definition at line 422 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::Config = tossinvest::TossConfig |
The configuration type.
Definition at line 425 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::HistoryQuery = tossinvest::TossOrderQuery |
The order-history query type.
Definition at line 440 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::PlaceAck = OrderAck |
The order acknowledgement type.
Definition at line 434 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossClient >::WorkingOrdersResult = OrderPage |
The working-order result type.
Definition at line 443 of file traits.hpp.
|
inlinestatic |
Forwards an account listing request.
| Token | An Asio completion token. |
| client | The client. |
| token | The completion token. |
Definition at line 577 of file traits.hpp.
|
inlinestatic |
Forwards a bar request.
| Token | An Asio completion token. |
| client | The client. |
| query | The query. |
| token | The completion token. |
Definition at line 552 of file traits.hpp.
|
inlinestatic |
Forwards a buying-power request for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| currency | The currency. |
| token | The completion token. |
Definition at line 591 of file traits.hpp.
|
inlinestatic |
Forwards a calendar request.
| Token | An Asio completion token. |
| client | The client. |
| country | The market. |
| from | The date (empty: the broker's today). |
| token | The completion token. |
Definition at line 486 of file traits.hpp.
|
inlinestatic |
Forwards an order cancellation, which transmits the identifier only.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| amendment | The amendment. |
| token | The completion token. |
Definition at line 683 of file traits.hpp.
|
inlinestatic |
Forwards a commission-schedule request for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| token | The completion token. |
Definition at line 623 of file traits.hpp.
|
inlinestatic |
Forwards an order book request.
| Token | An Asio completion token. |
| client | The client. |
| instrument | The instrument. |
| token | The completion token. |
Definition at line 539 of file traits.hpp.
|
inlinestaticconstexprnoexcept |
Returns the venue a Toss order reaches: none in particular (Toss does not route by venue, and its listings carry none).
The venue asked for is ignored.
Definition at line 419 of file traits.hpp.
|
inlinestatic |
Forwards a holdings request for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| token | The completion token. |
Definition at line 636 of file traits.hpp.
|
inlinestatic |
Forwards a reference-data request.
| Token | An Asio completion token. |
| client | The client. |
| subject | The instrument. |
| token | The completion token. |
Definition at line 472 of file traits.hpp.
Referenced by depth(), price_limits(), quote(), sellable_quantity(), and trades().
|
inlinestatic |
Forwards a single-order inquiry for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| order_id | Toss's order id. |
| token | The completion token. |
Definition at line 737 of file traits.hpp.
|
inlinestatic |
Forwards a CLOSED listing for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| query | The query. |
| token | The completion token. |
Definition at line 717 of file traits.hpp.
|
inlinestatic |
Forwards an order submission for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| order | The order. |
| token | The completion token. |
Definition at line 650 of file traits.hpp.
|
inlinestatic |
Forwards a price-bound request.
| Token | An Asio completion token. |
| client | The client. |
| instrument | The instrument. |
| token | The completion token. |
Definition at line 499 of file traits.hpp.
|
inlinestatic |
Forwards a batch quote request.
| Token | An Asio completion token. |
| client | The client. |
| instruments | The instruments. |
| token | The completion token. |
Definition at line 526 of file traits.hpp.
|
inlinestatic |
Forwards a quote request.
| Token | An Asio completion token. |
| client | The client. |
| instrument | The instrument. |
| token | The completion token. |
Definition at line 565 of file traits.hpp.
|
inlinestatic |
Returns this client's pacing statistics, or null when it is unpaced.
| client | The client. |
Definition at line 459 of file traits.hpp.
|
inlinestatic |
Forwards an order modification for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| amendment | The amendment. |
| token | The completion token. |
Definition at line 664 of file traits.hpp.
|
inlinestatic |
Forwards a sellable-quantity request for one instrument.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| instrument | The instrument. |
| token | The completion token. |
Definition at line 605 of file traits.hpp.
|
inlinestatic |
Forwards a recent-execution request.
| Token | An Asio completion token. |
| client | The client. |
| instrument | The instrument. |
| count | The most trades to return, clamped to 1-50. |
| token | The completion token. |
Definition at line 513 of file traits.hpp.
|
inlinestatic |
Forwards an OPEN listing for the bound account.
| Token | An Asio completion token. |
| client | The client. |
| account | The bound account. |
| token | The completion token. |
Definition at line 703 of file traits.hpp.
|
staticconstexpr |
false: requests complete through a completion token.
Definition at line 452 of file traits.hpp.
|
staticconstexpr |
The broker's name.
Definition at line 449 of file traits.hpp.