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

An amendment or cancellation of a KIS order. More...

#include <algotradelib/src/brokers/kis/client.hpp>

Collaboration diagram for algotradelib::kis::KisAmendment:

Public Attributes

KisOrderRef order_
 The order to amend or cancel.
OrderType type_ {OrderType::LIMIT}
 The order type it should have.
TimeInForce time_in_force_ {TimeInForce::DAY}
 The execution condition it should have.
OrderSession session_ {OrderSession::REGULAR}
 The session it should be in.
Venue venue_ {Venue::UNSPECIFIED}
 The venue where the order rests (the codes differ by venue).
Decimal64 quantity_
 The quantity affected; KIS requires a positive whole number even with all_remaining_.
std::optional< Decimal64 > price_
 The price the order should have: required for an order type that takes one, on a cancellation too.
std::optional< Decimal64 > trigger_price_
 The trigger price (KIS's CNDT_PRIC), for a STOP_LIMIT order.
bool all_remaining_ {false}
 Whether the whole remaining quantity is affected (KIS's QTY_ALL_ORD_YN), rather than quantity_.

Detailed Description

An amendment or cancellation of a KIS order.

KIS re-sends the whole order shape (one ORD_DVSN code composed from type, condition and session, which differs by venue) on both, so state the order's type, condition, session and price as they should be after the amendment, and the venue where it rests, on a cancellation too: the same checks apply (a limit order needs a positive whole-won price; a market order must carry none). Read the amendable quantity first from async_open_orders (KisOpenOrder::amendable_quantity_). A demo account accepts only Venue::KRX (or UNSPECIFIED); others are refused before sending.

Definition at line 115 of file client.hpp.

Member Data Documentation

◆ all_remaining_

bool algotradelib::kis::KisAmendment::all_remaining_ {false}

Whether the whole remaining quantity is affected (KIS's QTY_ALL_ORD_YN), rather than quantity_.

Definition at line 139 of file client.hpp.

◆ order_

KisOrderRef algotradelib::kis::KisAmendment::order_

The order to amend or cancel.

Definition at line 117 of file client.hpp.

◆ price_

std::optional<Decimal64> algotradelib::kis::KisAmendment::price_

The price the order should have: required for an order type that takes one, on a cancellation too.

Definition at line 129 of file client.hpp.

◆ quantity_

Decimal64 algotradelib::kis::KisAmendment::quantity_

The quantity affected; KIS requires a positive whole number even with all_remaining_.

Definition at line 127 of file client.hpp.

◆ session_

OrderSession algotradelib::kis::KisAmendment::session_ {OrderSession::REGULAR}

The session it should be in.

Definition at line 123 of file client.hpp.

◆ time_in_force_

TimeInForce algotradelib::kis::KisAmendment::time_in_force_ {TimeInForce::DAY}

The execution condition it should have.

Definition at line 121 of file client.hpp.

◆ trigger_price_

std::optional<Decimal64> algotradelib::kis::KisAmendment::trigger_price_

The trigger price (KIS's CNDT_PRIC), for a STOP_LIMIT order.

Required when amending a stop-limit order and refused for any other type. On a cancellation it is sent if valid and otherwise left off, so a cancellation is never refused for the trigger price (the other fields are still checked).

Definition at line 137 of file client.hpp.

◆ type_

OrderType algotradelib::kis::KisAmendment::type_ {OrderType::LIMIT}

The order type it should have.

Definition at line 119 of file client.hpp.

◆ venue_

Venue algotradelib::kis::KisAmendment::venue_ {Venue::UNSPECIFIED}

The venue where the order rests (the codes differ by venue).

Definition at line 125 of file client.hpp.


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