algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::strategy::AllCaps Struct Reference

A capability set in which the broker implements everything optional. More...

#include <algotradelib/src/strategy/concept.hpp>

Collaboration diagram for algotradelib::strategy::AllCaps:

Static Public Member Functions

static constexpr bool supports_interval (BarInterval)
 Tests whether the broker serves bars of an interval (the unnamed argument).

Static Public Attributes

static constexpr bool has_account_discovery = true
 Whether the broker lists the selectable accounts.
static constexpr bool has_client_order_id = true
 Whether the broker accepts an idempotency key (OrderRequest::client_order_id_).
static constexpr bool has_trigger_price = true
 Whether the adapter sends trigger prices (stop-limit orders).
static constexpr bool data_only = false
 false: this broker takes orders.
static constexpr bool has_working_orders = true
 Whether the broker lists the orders still open to amendment. A listing shows only what the broker's API lists (at Toss, not orders of types placed outside it).
static constexpr bool working_orders_state_terminal = true
 Whether the working-order listing can show a terminal status (filled, cancelled, ...).
static constexpr bool has_amendable_quantity = true
 Whether the broker reports the quantity still amendable on an open order.
static constexpr bool has_order_by_id = true
 Whether the broker can look up one order by its id.
static constexpr bool has_partial_cancel = true
 Whether the broker can cancel part of an order.
static constexpr bool history_requires_range = true
 Whether an order-history inquiry needs a date range (OrderHistoryQuery::from_).
static constexpr bool has_history_cursor = true
 Whether an order-history answer can carry a cursor to the next page.
static constexpr bool has_history_limit = true
 Whether an order-history inquiry accepts a row limit (OrderHistoryQuery::limit_).
static constexpr bool has_history_symbol_filter = true
 Whether an order-history inquiry can filter by symbol.
static constexpr bool has_depth = true
 Whether the broker publishes the order book (depth).
static constexpr bool has_price_limits = true
 Whether the broker publishes the day's price limits.
static constexpr bool has_trade_prints = true
 Whether the broker publishes recent trades.
static constexpr bool has_batch_prices = true
 Whether the broker quotes several instruments in one request.
static constexpr bool has_reference_data = true
 Whether the broker publishes instrument reference data.
static constexpr bool has_batch_reference_data = true
 Whether one reference-data request can cover several instruments.
static constexpr bool has_calendar = true
 Whether the broker publishes the trading calendar.
static constexpr bool has_calendar_range = true
 Whether one calendar request covers a span of dates.
static constexpr bool has_calendar_sessions = true
 Whether the broker publishes intraday session hours (only Toss); the library does not expose them yet.
static constexpr bool has_buying_power = true
 Whether the broker reports buying power.
static constexpr bool has_buying_power_quantity = true
 Whether the broker can also say how many shares are affordable.
static constexpr bool has_commission_schedule = true
 Whether the broker publishes the account's commission rates.
static constexpr SellableSource sellable_source = SellableSource::INQUIRY
 The sellable quantity comes from an inquiry.
static constexpr SellableBasis sellable_inquiry_basis
 The whole holding, with resting sells deducted (the basis the library assumes for Toss, unverified).

Detailed Description

A capability set in which the broker implements everything optional.

Definition at line 423 of file concept.hpp.

Member Function Documentation

◆ supports_interval()

constexpr bool algotradelib::strategy::AllCaps::supports_interval ( BarInterval )
inlinestaticconstexpr

Tests whether the broker serves bars of an interval (the unnamed argument).

Returns
true for every interval.

Definition at line 486 of file concept.hpp.

Member Data Documentation

◆ data_only

bool algotradelib::strategy::AllCaps::data_only = false
staticconstexpr

false: this broker takes orders.

Definition at line 431 of file concept.hpp.

◆ has_account_discovery

bool algotradelib::strategy::AllCaps::has_account_discovery = true
staticconstexpr

Whether the broker lists the selectable accounts.

Definition at line 425 of file concept.hpp.

◆ has_amendable_quantity

bool algotradelib::strategy::AllCaps::has_amendable_quantity = true
staticconstexpr

Whether the broker reports the quantity still amendable on an open order.

Definition at line 437 of file concept.hpp.

◆ has_batch_prices

bool algotradelib::strategy::AllCaps::has_batch_prices = true
staticconstexpr

Whether the broker quotes several instruments in one request.

Definition at line 457 of file concept.hpp.

◆ has_batch_reference_data

bool algotradelib::strategy::AllCaps::has_batch_reference_data = true
staticconstexpr

Whether one reference-data request can cover several instruments.

Toss takes up to 200 symbols; KIS one. The port asks for one; use session.client() for more.

Definition at line 461 of file concept.hpp.

◆ has_buying_power

bool algotradelib::strategy::AllCaps::has_buying_power = true
staticconstexpr

Whether the broker reports buying power.

Definition at line 469 of file concept.hpp.

◆ has_buying_power_quantity

bool algotradelib::strategy::AllCaps::has_buying_power_quantity = true
staticconstexpr

Whether the broker can also say how many shares are affordable.

true for Kiwoom (per margin tier), false for Toss and KIS. The port returns only the amount; reach the quantity through session.client().

Definition at line 471 of file concept.hpp.

◆ has_calendar

bool algotradelib::strategy::AllCaps::has_calendar = true
staticconstexpr

Whether the broker publishes the trading calendar.

Definition at line 463 of file concept.hpp.

◆ has_calendar_range

bool algotradelib::strategy::AllCaps::has_calendar_range = true
staticconstexpr

Whether one calendar request covers a span of dates.

KIS answers from a base date onward; Toss answers the requested day and the trading day either side.

Definition at line 465 of file concept.hpp.

◆ has_calendar_sessions

bool algotradelib::strategy::AllCaps::has_calendar_sessions = true
staticconstexpr

Whether the broker publishes intraday session hours (only Toss); the library does not expose them yet.

Definition at line 467 of file concept.hpp.

◆ has_client_order_id

bool algotradelib::strategy::AllCaps::has_client_order_id = true
staticconstexpr

Whether the broker accepts an idempotency key (OrderRequest::client_order_id_).

Definition at line 427 of file concept.hpp.

◆ has_commission_schedule

bool algotradelib::strategy::AllCaps::has_commission_schedule = true
staticconstexpr

Whether the broker publishes the account's commission rates.

Definition at line 473 of file concept.hpp.

◆ has_depth

bool algotradelib::strategy::AllCaps::has_depth = true
staticconstexpr

Whether the broker publishes the order book (depth).

Definition at line 451 of file concept.hpp.

◆ has_history_cursor

bool algotradelib::strategy::AllCaps::has_history_cursor = true
staticconstexpr

Whether an order-history answer can carry a cursor to the next page.

When false, the adapter returns the whole history in one answer.

Definition at line 445 of file concept.hpp.

◆ has_history_limit

bool algotradelib::strategy::AllCaps::has_history_limit = true
staticconstexpr

Whether an order-history inquiry accepts a row limit (OrderHistoryQuery::limit_).

false for KIS, which refuses a query with a limit (INVALID_ARGUMENT, before any I/O).

Definition at line 447 of file concept.hpp.

◆ has_history_symbol_filter

bool algotradelib::strategy::AllCaps::has_history_symbol_filter = true
staticconstexpr

Whether an order-history inquiry can filter by symbol.

Definition at line 449 of file concept.hpp.

◆ has_order_by_id

bool algotradelib::strategy::AllCaps::has_order_by_id = true
staticconstexpr

Whether the broker can look up one order by its id.

Definition at line 439 of file concept.hpp.

◆ has_partial_cancel

bool algotradelib::strategy::AllCaps::has_partial_cancel = true
staticconstexpr

Whether the broker can cancel part of an order.

Definition at line 441 of file concept.hpp.

◆ has_price_limits

bool algotradelib::strategy::AllCaps::has_price_limits = true
staticconstexpr

Whether the broker publishes the day's price limits.

Definition at line 453 of file concept.hpp.

◆ has_reference_data

bool algotradelib::strategy::AllCaps::has_reference_data = true
staticconstexpr

Whether the broker publishes instrument reference data.

Definition at line 459 of file concept.hpp.

◆ has_trade_prints

bool algotradelib::strategy::AllCaps::has_trade_prints = true
staticconstexpr

Whether the broker publishes recent trades.

Definition at line 455 of file concept.hpp.

◆ has_trigger_price

bool algotradelib::strategy::AllCaps::has_trigger_price = true
staticconstexpr

Whether the adapter sends trigger prices (stop-limit orders).

When false, BrokerSession refuses a placement or modification carrying a trigger (unsupported_trigger_price) before the adapter runs; cancellations are unaffected. true for KIS and Kiwoom, false for Toss.

Definition at line 429 of file concept.hpp.

◆ has_working_orders

bool algotradelib::strategy::AllCaps::has_working_orders = true
staticconstexpr

Whether the broker lists the orders still open to amendment. A listing shows only what the broker's API lists (at Toss, not orders of types placed outside it).

Definition at line 433 of file concept.hpp.

◆ history_requires_range

bool algotradelib::strategy::AllCaps::history_requires_range = true
staticconstexpr

Whether an order-history inquiry needs a date range (OrderHistoryQuery::from_).

Definition at line 443 of file concept.hpp.

◆ sellable_inquiry_basis

SellableBasis algotradelib::strategy::AllCaps::sellable_inquiry_basis
staticconstexpr
Initial value:
{
false,
}
@ WHOLE_HOLDING
Every share held of the instrument, whatever venue or lot.
Definition types.hpp:924
@ DEDUCT
Subtract every resting sell from the figure.
Definition types.hpp:942

The whole holding, with resting sells deducted (the basis the library assumes for Toss, unverified).

Definition at line 477 of file concept.hpp.

◆ sellable_source

SellableSource algotradelib::strategy::AllCaps::sellable_source = SellableSource::INQUIRY
staticconstexpr

The sellable quantity comes from an inquiry.

Definition at line 475 of file concept.hpp.

◆ working_orders_state_terminal

bool algotradelib::strategy::AllCaps::working_orders_state_terminal = true
staticconstexpr

Whether the working-order listing can show a terminal status (filled, cancelled, ...).

false for KIS, Toss and Kiwoom: their listings show only open orders. Then an order that leaves the listing has no terminal on_order_update; read its outcome from holdings or an order inquiry instead of waiting for one. false here when has_working_orders is false.

Definition at line 435 of file concept.hpp.


The documentation for this struct was generated from the following file: