API  Version 2.0.1
Low-Latency HFT API
 All Classes Functions Variables
API2::COMMON::Instrument Class Reference

The Instrument class Provides all the information about Market Instrument. More...

#include <sgCommon.h>

Public Member Functions

SymbolStaticDatagetStaticData ()
 getStaticData To get the static details of a tradable Instrument More...
 
time_t getLastQuoteUpdateTime ()
 getLastQuoteUpdateTime To get Last time when the Quote for the Instrument was updated More...
 
SYMBOL_ID getSymbolId ()
 getSymbolId To get The System unique ID of the Instrument More...
 
InstrumentPositiongetPosition ()
 
UNSIGNED_LONG getLastQuotedPrice (const DATA_TYPES::OrderMode &mode)
 getLastQuotedPrice To get last quoted price from this Instrument More...
 
void updatePositionFromString (const std::string &positionString, const char *delimiter="|")
 updatePositionFromString Format: Buy Qty <delimeter> Sell Qty <delimeter> Buy Avg Price <delimeter> Sell Avg Price More...
 
std::string getPositionString (const char *delimiter="|")
 getPositionString Format: Buy Qty <delimeter> Sell Qty <delimeter> Buy Avg Price <delimeter> Sell Avg Price More...
 

Detailed Description

The Instrument class Provides all the information about Market Instrument.

Member Function Documentation

UNSIGNED_LONG API2::COMMON::Instrument::getLastQuotedPrice ( const DATA_TYPES::OrderMode &  mode)

getLastQuotedPrice To get last quoted price from this Instrument

Parameters
mode
Returns
Price as DATA_TYPES::SIGNED_LONG in Paisa ( to convert in Rupee, convert to float and divide by 100)
time_t API2::COMMON::Instrument::getLastQuoteUpdateTime ( )

getLastQuoteUpdateTime To get Last time when the Quote for the Instrument was updated

Returns
Time when Quote was last Updated, in time_t
InstrumentPosition* API2::COMMON::Instrument::getPosition ( )

brief getPosition To get Pointer to the API2::COMMON::InstrumentPosition

Returns
std::string API2::COMMON::Instrument::getPositionString ( const char *  delimiter = "|")

getPositionString Format: Buy Qty <delimeter> Sell Qty <delimeter> Buy Avg Price <delimeter> Sell Avg Price

Parameters
delimiter
Returns
SymbolStaticData* API2::COMMON::Instrument::getStaticData ( )

getStaticData To get the static details of a tradable Instrument

Returns
Static Data about the instrument as API2::SymbolStaticData
SYMBOL_ID API2::COMMON::Instrument::getSymbolId ( )

getSymbolId To get The System unique ID of the Instrument

Returns
void API2::COMMON::Instrument::updatePositionFromString ( const std::string &  positionString,
const char *  delimiter = "|" 
)

updatePositionFromString Format: Buy Qty <delimeter> Sell Qty <delimeter> Buy Avg Price <delimeter> Sell Avg Price

Parameters
positionString
delimiter

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