TT CORE SDK
0.1
TT CORE SDK documentation
|
Definition of a contract on an exchange. More...
#include <instrument.hpp>
Classes | |
struct | instrument_leg |
Instrument legs. More... | |
struct | tick_table_data |
Variable ticking data. More... | |
Public Member Functions | |
bool | IsValid (void) const noexcept |
Check if the instrument data is valid. More... | |
double | OffsetPrice (double price, int32_t offset, rounding round) const noexcept |
Returns the tradable price a number of ticks from the specified price. More... | |
double | TickPriceUp (double price, uint32_t offset) const noexcept |
Returns the tradable price a number of ticks above the specified price. More... | |
double | TickPriceDown (double price, uint32_t offset) const noexcept |
Returns the tradable price a number of ticks below the specified price. More... | |
double | RoundPriceToTick (double price, rounding round) const noexcept |
Returns the specified price rounded to a tradable tick. More... | |
double | GetMinTickSize (void) const noexcept |
Returns the minimum tick size. More... | |
bool | IsPriceOnTick (double price) const noexcept |
Returns if the specified price is on a tradable tick. More... | |
int32_t | PriceToTicks (double price) const noexcept |
Returns the specified price in tradable ticks. More... | |
Public Attributes | |
uint64_t | instr_id |
Instrument ID. More... | |
uint64_t | instr_version |
Instrument version. More... | |
uint64_t | synthetic_instr_id |
Synthetic Instrument ID. More... | |
uint64_t | underlying_instr_id |
Underlying Instrument ID. More... | |
uint64_t | algo_compliance_id |
Algo identifier for exchange compliance. More... | |
std::string | name |
Instrument Name (e.g. ESZ4) More... | |
std::string | alias |
Alias (e.g. ES Dec14) More... | |
std::string | security_id |
Security ID. More... | |
std::string | series_key |
Unique TT assigned ID. More... | |
enum market | market_id |
Market Identifier. More... | |
std::string | symbol |
Product Symbol (e.g. ES) More... | |
uint64_t | product_id |
Product ID. More... | |
uint64_t | product_version |
Product version. More... | |
enum product_type_id | product_type_id |
Product type. More... | |
enum currency_code | product_currency |
Native product currency. More... | |
double | tick_value |
Value of one tick in the default currency. More... | |
double | tick_size |
Interval between tradable prices. More... | |
uint32_t | tick_num |
Ticking: Numerator. More... | |
uint32_t | tick_denom |
Ticking: Denominator. More... | |
double | point_value |
Value of one point in the default currency. More... | |
double | display_factor |
Display Factor. More... | |
double | min_price_increment |
Minimal price increment. More... | |
std::string | price_topic |
The topic which price update is send on. More... | |
std::string | price_formula |
User-defined price formula for a spread. More... | |
std::string | implied_rules |
Implied rules. More... | |
uint32_t | starting_date |
Starting date. More... | |
uint32_t | last_trading_date |
Last trading date. More... | |
uint32_t | first_delivery_date |
First delivery date. More... | |
uint32_t | maturity_date |
Maturity date. More... | |
double | strike_price |
Strike price. More... | |
uint16_t | option_code_id |
Option code ID. More... | |
uint16_t | option_scheme_id |
Option scheme ID. More... | |
uint16_t | series_term_id |
Series term ID. More... | |
uint16_t | combo_type_id |
Combo type ID. More... | |
bool | supports_implieds |
Instrument supports implied prices. More... | |
bool | is_not_tradable |
Instrument is not tradable. More... | |
struct tt_core_sdk::Instrument::tick_table_data | tick_table |
std::vector< instrument_leg > | legs |
Static Public Attributes | |
static constexpr size_t | MAX_TICK_TABLE_ROW_COUNT = 128 |
Max supported tick table entries. More... | |
enum instr_state | state |
Internal. More... | |
uint32_t | update_source |
uint32_t | security_exchange_id |
std::unique_ptr< opaque_data > | opaque |
bool | IsAlgoVersion (const std::string &version) const noexcept |
bool | IsAlgoADL (void) const noexcept |
bool | IsAlgoSO (void) const noexcept |
uint64_t | KeyId (void) const noexcept |
Definition of a contract on an exchange.
Definition at line 14 of file instrument.hpp.
|
noexcept |
Returns the minimum tick size.
If the instruments supports variable ticking, the result may differ from the tick_size property.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Returns if the specified price is on a tradable tick.
[in] | price | Base price |
|
noexcept |
Check if the instrument data is valid.
|
noexcept |
|
noexcept |
Returns the tradable price a number of ticks from the specified price.
You can use this function to find a price a number of price levels away from a specified price. For example, if this price represents the last-traded price, you could use this method to get the price two ticks higher (or lower).
This function applies the offset value to the specified price and then applies the rounding method to arrive at the tradable price. For example, suppose you specify a base price that is not tradable with an offset of -3 and want to round the price up. The function first drops the price by three ticks and then rounds the new price up to the next tradable tick.
[in] | price | Base price |
[in] | offset | Number of ticks away from the base price |
[in] | round | Rounding method to use |
|
noexcept |
Returns the specified price in tradable ticks.
[in] | price | Base price |
|
noexcept |
Returns the specified price rounded to a tradable tick.
[in] | price | Base price (to round to a tradable tick) |
[in] | round | Rounding method to use |
|
noexcept |
Returns the tradable price a number of ticks below the specified price.
[in] | price | Base price |
[in] | offset | Number of ticks below the base price |
|
noexcept |
Returns the tradable price a number of ticks above the specified price.
[in] | price | Base price |
[in] | offset | Number of ticks above the base price |
uint64_t tt_core_sdk::Instrument::algo_compliance_id |
Algo identifier for exchange compliance.
Definition at line 80 of file instrument.hpp.
std::string tt_core_sdk::Instrument::alias |
Alias (e.g. ES Dec14)
Definition at line 83 of file instrument.hpp.
uint16_t tt_core_sdk::Instrument::combo_type_id |
Combo type ID.
Definition at line 115 of file instrument.hpp.
double tt_core_sdk::Instrument::display_factor |
Display Factor.
Definition at line 99 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::first_delivery_date |
First delivery date.
Definition at line 108 of file instrument.hpp.
std::string tt_core_sdk::Instrument::implied_rules |
Implied rules.
Definition at line 104 of file instrument.hpp.
uint64_t tt_core_sdk::Instrument::instr_id |
Instrument ID.
Definition at line 76 of file instrument.hpp.
uint64_t tt_core_sdk::Instrument::instr_version |
Instrument version.
Definition at line 77 of file instrument.hpp.
bool tt_core_sdk::Instrument::is_not_tradable |
Instrument is not tradable.
Definition at line 118 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::last_trading_date |
Last trading date.
Definition at line 107 of file instrument.hpp.
std::vector<instrument_leg> tt_core_sdk::Instrument::legs |
Definition at line 148 of file instrument.hpp.
enum market tt_core_sdk::Instrument::market_id |
Market Identifier.
Definition at line 87 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::maturity_date |
Maturity date.
Definition at line 109 of file instrument.hpp.
|
static |
Max supported tick table entries.
Definition at line 17 of file instrument.hpp.
double tt_core_sdk::Instrument::min_price_increment |
Minimal price increment.
Definition at line 100 of file instrument.hpp.
std::string tt_core_sdk::Instrument::name |
Instrument Name (e.g. ESZ4)
Definition at line 82 of file instrument.hpp.
std::unique_ptr<opaque_data> tt_core_sdk::Instrument::opaque |
Definition at line 154 of file instrument.hpp.
uint16_t tt_core_sdk::Instrument::option_code_id |
Option code ID.
Definition at line 112 of file instrument.hpp.
uint16_t tt_core_sdk::Instrument::option_scheme_id |
Option scheme ID.
Definition at line 113 of file instrument.hpp.
double tt_core_sdk::Instrument::point_value |
Value of one point in the default currency.
Definition at line 98 of file instrument.hpp.
std::string tt_core_sdk::Instrument::price_formula |
User-defined price formula for a spread.
Definition at line 103 of file instrument.hpp.
std::string tt_core_sdk::Instrument::price_topic |
The topic which price update is send on.
Definition at line 102 of file instrument.hpp.
enum currency_code tt_core_sdk::Instrument::product_currency |
Native product currency.
Definition at line 92 of file instrument.hpp.
uint64_t tt_core_sdk::Instrument::product_id |
Product ID.
Definition at line 89 of file instrument.hpp.
enum product_type_id tt_core_sdk::Instrument::product_type_id |
Product type.
Definition at line 91 of file instrument.hpp.
uint64_t tt_core_sdk::Instrument::product_version |
Product version.
Definition at line 90 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::security_exchange_id |
Definition at line 153 of file instrument.hpp.
std::string tt_core_sdk::Instrument::security_id |
Security ID.
Definition at line 84 of file instrument.hpp.
std::string tt_core_sdk::Instrument::series_key |
Unique TT assigned ID.
Definition at line 85 of file instrument.hpp.
uint16_t tt_core_sdk::Instrument::series_term_id |
Series term ID.
Definition at line 114 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::starting_date |
Starting date.
Definition at line 106 of file instrument.hpp.
enum instr_state tt_core_sdk::Instrument::state |
Internal.
Definition at line 151 of file instrument.hpp.
double tt_core_sdk::Instrument::strike_price |
Strike price.
Definition at line 111 of file instrument.hpp.
bool tt_core_sdk::Instrument::supports_implieds |
Instrument supports implied prices.
Definition at line 117 of file instrument.hpp.
std::string tt_core_sdk::Instrument::symbol |
Product Symbol (e.g. ES)
Definition at line 88 of file instrument.hpp.
uint64_t tt_core_sdk::Instrument::synthetic_instr_id |
Synthetic Instrument ID.
Definition at line 78 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::tick_denom |
Ticking: Denominator.
Definition at line 97 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::tick_num |
Ticking: Numerator.
Definition at line 96 of file instrument.hpp.
double tt_core_sdk::Instrument::tick_size |
Interval between tradable prices.
Definition at line 95 of file instrument.hpp.
struct tt_core_sdk::Instrument::tick_table_data tt_core_sdk::Instrument::tick_table |
double tt_core_sdk::Instrument::tick_value |
Value of one tick in the default currency.
Definition at line 94 of file instrument.hpp.
uint64_t tt_core_sdk::Instrument::underlying_instr_id |
Underlying Instrument ID.
Definition at line 79 of file instrument.hpp.
uint32_t tt_core_sdk::Instrument::update_source |
Definition at line 152 of file instrument.hpp.