![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The BlockingSession adapter for tossinvest::TossBlockingClient. More...
#include <algotradelib/src/brokers/tossinvest/traits.hpp>
Public Types | |
| using | Client = tossinvest::TossBlockingClient |
| 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. | |
| static Result< Instrument > | instrument (Client &client, InstrumentId subject) |
| Returns static reference data for one instrument. | |
| static Result< TradingCalendar > | calendar (Client &client, Country country, std::optional< Date > from) |
| Returns the calendar for one market. | |
| static Result< PriceLimits > | price_limits (Client &client, InstrumentId instrument) |
| Returns today's price bounds. | |
| static Result< std::vector< TradePrint > > | trades (Client &client, InstrumentId instrument, int count) |
| Returns recent executions. | |
| static Result< std::vector< QuoteSnapshot > > | prices (Client &client, std::vector< InstrumentId > instruments) |
| Returns a quote for every instrument in one request. | |
| static Result< DepthSnapshot > | depth (Client &client, InstrumentId instrument) |
| Returns the order book. | |
| static Result< BarSeries > | bars (Client &client, BarQuery query) |
| Returns bars, paging inside the client. | |
| static Result< QuoteSnapshot > | quote (Client &client, InstrumentId instrument) |
| Returns a quote. | |
| static Result< std::vector< AccountListItem > > | accounts (Client &client) |
| Returns the broker's own account listing. | |
| static Result< HoldingsSnapshot > | holdings (Client &client, const Account &account) |
| Returns holdings for the bound account. | |
| static Result< BuyingPower > | buying_power (Client &client, const Account &account, Currency currency) |
| Returns what the bound account may spend in currency. | |
| static Result< Decimal64 > | sellable_quantity (Client &client, const Account &account, InstrumentId instrument) |
| Returns how much of instrument the bound account may sell. | |
| static Result< CommissionSchedule > | commissions (Client &client, const Account &account) |
| Returns the commission rates in force for the bound account. | |
| static Result< PlaceAck > | place_order (Client &client, const Account &account, OrderRequest order) |
| Submits an order for the bound account. | |
| static Result< PlaceAck > | replace_order (Client &client, const Account &account, Amendment amendment) |
| Modifies an order for the bound account. | |
| static Result< PlaceAck > | cancel_order (Client &client, const Account &account, Amendment amendment) |
| Cancels an order for the bound account, transmitting the identifier only. | |
| static Result< WorkingOrdersResult > | working_orders (Client &client, const Account &account) |
| Returns the OPEN listing for the bound account. | |
| static Result< OrderPage > | order_history (Client &client, const Account &account, HistoryQuery query) |
| Returns the CLOSED listing for the bound account. | |
| static Result< OrderSnapshot > | order_by_id (Client &client, const Account &account, std::string order_id) |
| Returns one order by id for the bound account; see TossClient::async_order for which orders can be read. | |
Static Public Attributes | |
| static constexpr std::string_view | name = tossinvest::Broker::name |
| The broker's name. | |
| static constexpr bool | blocking = true |
| true: requests return their result directly. | |
The BlockingSession adapter for tossinvest::TossBlockingClient.
Definition at line 749 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::Account = std::int64_t |
The account type: the account sequence.
Definition at line 768 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::AccountListItem = tossinvest::TossAccount |
The account-listing item type.
Definition at line 786 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::Amendment = tossinvest::TossAmendment |
The amendment type.
Definition at line 777 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::BrokerTag = tossinvest::Broker |
The broker tag.
Definition at line 771 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::Client = tossinvest::TossBlockingClient |
The client type.
Definition at line 762 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::Config = tossinvest::TossConfig |
The configuration type.
Definition at line 765 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::HistoryQuery = tossinvest::TossOrderQuery |
The order-history query type.
Definition at line 780 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::PlaceAck = OrderAck |
The order acknowledgement type.
Definition at line 774 of file traits.hpp.
| using algotradelib::BrokerTraits< tossinvest::TossBlockingClient >::WorkingOrdersResult = OrderPage |
The working-order result type.
Definition at line 783 of file traits.hpp.
|
inlinestatic |
Returns the broker's own account listing.
| client | The client. |
Definition at line 897 of file traits.hpp.
|
inlinestatic |
Returns bars, paging inside the client.
| client | The client. |
| query | The query. |
Definition at line 878 of file traits.hpp.
|
inlinestatic |
Returns what the bound account may spend in currency.
| client | The client. |
| account | The bound account. |
| currency | The currency. |
Definition at line 918 of file traits.hpp.
|
inlinestatic |
Returns the calendar for one market.
| client | The client. |
| country | The market. |
| from | The date (empty: the broker's today). |
Definition at line 820 of file traits.hpp.
|
inlinestatic |
Cancels an order for the bound account, transmitting the identifier only.
| client | The client. |
| account | The bound account. |
| amendment | The amendment. |
Definition at line 984 of file traits.hpp.
|
inlinestatic |
Returns the commission rates in force for the bound account.
| client | The client. |
| account | The bound account. |
Definition at line 947 of file traits.hpp.
|
inlinestatic |
Returns the order book.
| client | The client. |
| instrument | The instrument. |
Definition at line 868 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 759 of file traits.hpp.
|
inlinestatic |
Returns holdings for the bound account.
| client | The client. |
| account | The bound account. |
Definition at line 907 of file traits.hpp.
|
inlinestatic |
Returns static reference data for one instrument.
| client | The client. |
| subject | The instrument. |
Definition at line 809 of file traits.hpp.
Referenced by depth(), price_limits(), quote(), sellable_quantity(), and trades().
|
inlinestatic |
Returns one order by id for the bound account; see TossClient::async_order for which orders can be read.
| client | The client. |
| account | The bound account. |
| order_id | Toss's order id. |
Definition at line 1026 of file traits.hpp.
|
inlinestatic |
Returns the CLOSED listing for the bound account.
| client | The client. |
| account | The bound account. |
| query | The query. |
Definition at line 1009 of file traits.hpp.
|
inlinestatic |
Submits an order for the bound account.
| client | The client. |
| account | The bound account. |
| order | The order. |
Definition at line 958 of file traits.hpp.
|
inlinestatic |
Returns today's price bounds.
| client | The client. |
| instrument | The instrument. |
Definition at line 830 of file traits.hpp.
|
inlinestatic |
Returns a quote for every instrument in one request.
| client | The client. |
| instruments | The instruments. |
Definition at line 855 of file traits.hpp.
|
inlinestatic |
Returns a quote.
| client | The client. |
| instrument | The instrument. |
Definition at line 888 of file traits.hpp.
|
inlinestatic |
Returns this client's pacing statistics, or null when it is unpaced.
| client | The client. |
Definition at line 799 of file traits.hpp.
|
inlinestatic |
Modifies an order for the bound account.
| client | The client. |
| account | The bound account. |
| amendment | The amendment. |
Definition at line 969 of file traits.hpp.
|
inlinestatic |
Returns how much of instrument the bound account may sell.
| client | The client. |
| account | The bound account. |
| instrument | The instrument. |
Definition at line 933 of file traits.hpp.
|
inlinestatic |
Returns recent executions.
| client | The client. |
| instrument | The instrument. |
| count | The most trades to return, clamped to 1-50. |
Definition at line 841 of file traits.hpp.
|
inlinestatic |
Returns the OPEN listing for the bound account.
| client | The client. |
| account | The bound account. |
Definition at line 998 of file traits.hpp.
|
staticconstexpr |
true: requests return their result directly.
Definition at line 792 of file traits.hpp.
|
staticconstexpr |
The broker's name.
Definition at line 789 of file traits.hpp.