#include <instrument.h>
|
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
} |
|
Definition at line 55 of file instrument.h.
◆ ResponseCode
Enumerator |
---|
SUCCESS | |
FAILED | |
INVALID_REQUEST | |
NOT_ALLOWED | |
THROTTLE_EXCEEDED | |
NOT_FOUND | |
Definition at line 58 of file instrument.h.
◆ Rounding
Enumerator |
---|
NONE | Do not round the price.
|
UP | Round the price up to the next tradable price.
|
DOWN | Round the price down to the next tradable price.
|
NEAREST | Round the price to the nearest tradable price, whether up or down.
|
Definition at line 73 of file instrument.h.
◆ State
Enumerator |
---|
DELETED | |
INACTIVE | |
ACTIVE | |
Definition at line 67 of file instrument.h.
◆ Instrument()
ttsdk::Instrument::Instrument |
( |
| ) |
|
|
inline |
◆ GetAlias()
◆ GetCurrencyCode()
◆ GetDisplayFactor()
◆ GetFirstDeliveryDate()
◆ GetInstrumentId()
◆ GetLastTradingDate()
◆ GetLeg()
◆ GetMarket()
◆ GetMaturityDate()
◆ GetMinTickSize()
Returns the minimum tick size.
If the instruments supports variable ticking, the result may differ from the tick_size property.
- Returns
- Minimum tick size for this instrument
◆ GetName()
◆ GetNumberLegs()
◆ GetPointValue()
◆ GetPriceDisplayType()
◆ GetProductName()
◆ GetProductSymbol()
◆ GetProductType()
◆ GetSecurityExchangeId()
◆ GetSecurityId()
◆ GetStartingDate()
◆ GetState()
◆ GetTickDenom()
◆ GetTickNum()
◆ GetTickSize() [1/2]
◆ GetTickSize() [2/2]
◆ GetTickValue()
◆ IsPriceOnTick()
Returns if the specified price is on a tradable tick.
- Parameters
-
◆ OffsetPrice()
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.
- Parameters
-
[in] | price | Base price |
[in] | offset | Number of ticks away from the base price |
[in] | round | Rounding method to use |
- Returns
- A valid tradable price
◆ PriceToTicks()
Returns the specified price in tradable ticks.
- Parameters
-
- Note
- If price does not fall on a tradable tick, it will be rounded to a tradable tick (rounded down for positive prices and up for negative prices). Invalid input will return 0.
- Returns
- Number of ticks for the provided price
◆ RoundPriceToTick()
Returns the specified price rounded to a tradable tick.
- Parameters
-
[in] | price | Base price (to round to a tradable tick) |
[in] | round | Rounding method to use |
- Returns
- A valid tradable price
◆ TickPriceDown()
Returns the tradable price a number of ticks below the specified price.
- Parameters
-
[in] | price | Base price |
[in] | offset | Number of ticks below the base price |
- Returns
- A valid tradable price
◆ TickPriceUp()
Returns the tradable price a number of ticks above the specified price.
- Parameters
-
[in] | price | Base price |
[in] | offset | Number of ticks above the base price |
- Returns
- A valid tradable price
The documentation for this class was generated from the following file: