|
TT CORE SDK 2.0.2.1
TT CORE SDK documentation
|
#include <instrument.h>


Public Types | |
| enum class | ResponseCode { SUCCESS = 0 , FAILED = 1 , INVALID_REQUEST = 2 , NOT_ALLOWED = 3 , THROTTLE_EXCEEDED = 4 , NOT_FOUND = 5 } |
| enum | State { DELETED = 1 , INACTIVE = 2 , ACTIVE = 4 } |
| enum | Rounding { NONE , UP , DOWN , NEAREST } |
Public Member Functions | |
| virtual double | OffsetPrice (double price, int32_t offset, Rounding round) const noexcept=0 |
| Returns the tradable price a number of ticks from the specified price. | |
| virtual double | TickPriceUp (double price, int32_t offset) const noexcept=0 |
| Returns the tradable price a number of ticks above the specified price. | |
| virtual double | TickPriceDown (double price, int32_t offset) const noexcept=0 |
| Returns the tradable price a number of ticks below the specified price. | |
| virtual double | RoundPriceToTick (double price, Rounding round) const noexcept=0 |
| Returns the specified price rounded to a tradable tick. | |
| virtual double | GetMinTickSize () const noexcept=0 |
| Returns the minimum tick size. | |
| virtual bool | IsPriceOnTick (const double price) const noexcept=0 |
| Returns if the specified price is on a tradable tick. | |
| virtual int32_t | PriceToTicks (const double price) const noexcept=0 |
| Returns the specified price in tradable ticks. | |
| virtual State | GetState () const noexcept=0 |
| virtual uint64_t | GetInstrumentId () const noexcept=0 |
| virtual const char * | GetName () const noexcept=0 |
| virtual const char * | GetAlias () const noexcept=0 |
| virtual const char * | GetSecurityId () const noexcept=0 |
| virtual uint32_t | GetSecurityExchangeId () const noexcept=0 |
| virtual ProductType | GetProductType () const noexcept=0 |
| virtual MarketId | GetMarket () const noexcept=0 |
| virtual CurrencyCode | GetCurrencyCode () const noexcept=0 |
| virtual const char * | GetProductName () const noexcept=0 |
| virtual const char * | GetProductSymbol () const noexcept=0 |
| virtual double | GetTickValue () const noexcept=0 |
| virtual double | GetTickSize () const noexcept=0 |
| virtual double | GetTickSize (const double price) const noexcept=0 |
| virtual int64_t | GetTickNum () const noexcept=0 |
| virtual int64_t | GetTickDenom () const noexcept=0 |
| virtual double | GetPointValue () const noexcept=0 |
| virtual double | GetDisplayFactor () const noexcept=0 |
| virtual uint64_t | GetStartingDate () const noexcept=0 |
| virtual uint64_t | GetLastTradingDate () const noexcept=0 |
| virtual uint64_t | GetFirstDeliveryDate () const noexcept=0 |
| virtual uint64_t | GetMaturityDate () const noexcept=0 |
| virtual PriceDisplayType | GetPriceDisplayType () const noexcept=0 |
| virtual size_t | GetNumberLegs () const noexcept=0 |
| virtual InstrumentLegPtr | GetLeg (const uint32_t index) const noexcept=0 |
| Instrument () | |
| int | dec_ref () const |
| void | inc_ref () const |
| virtual void | del_ref () const |
Definition at line 55 of file instrument.h.
|
strong |
| Enumerator | |
|---|---|
| SUCCESS | |
| FAILED | |
| INVALID_REQUEST | |
| NOT_ALLOWED | |
| THROTTLE_EXCEEDED | |
| NOT_FOUND | |
Definition at line 58 of file instrument.h.
Definition at line 73 of file instrument.h.
| Enumerator | |
|---|---|
| DELETED | |
| INACTIVE | |
| ACTIVE | |
Definition at line 67 of file instrument.h.
|
inline |
Definition at line 165 of file instrument.h.


|
inherited |
|
virtualinherited |
|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |
Returns the minimum tick size.
If the instruments supports variable ticking, the result may differ from the tick_size property.
|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |


|
pure virtualnoexcept |

|
pure virtualnoexcept |


|
inherited |
|
pure virtualnoexcept |
Returns if the specified price is on a tradable tick.
| [in] | price | Base price |


|
pure virtualnoexcept |
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 |
|
pure virtualnoexcept |
Returns the specified price in tradable ticks.
| [in] | price | Base price |


|
pure virtualnoexcept |
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 |
|
pure virtualnoexcept |
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 |
|
pure virtualnoexcept |
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 |