ActiveTick Feed C++ API SDK
2.0.0
|
#include <Shared/ATServerAPIDefines.h>
Go to the source code of this file.
Macros | |
#define | DEFAULT_REQUEST_TIMEOUT 30000 |
Typedefs | |
typedef void(* | ATBarHistoryResponseCallback )(uint64_t origRequest, ATBarHistoryResponseType responseType, LPATBARHISTORY_RESPONSE pResponse) |
typedef void(* | ATLoginResponseCallback )(uint64_t session, uint64_t request, LPATLOGIN_RESPONSE pResponse) |
typedef void(* | ATMarketMoversDbResponseCallback )(uint64_t origRequest, ATMarketMoversDbResponseType responseType, LPATMARKET_MOVERSDB_RESPONSE pResponse) |
typedef void(* | ATQuoteDbResponseCallback )(uint64_t origRequest, ATQuoteDbResponseType responseType, LPATQUOTEDB_RESPONSE pResponse, uint32_t responseCount) |
typedef void(* | ATQuoteStreamResponseCallback )(uint64_t origRequest, ATStreamResponseType responseType, LPATQUOTESTREAM_RESPONSE pResponse, uint32_t responseCount) |
typedef void(* | ATMarketMoversStreamResponseCallback )(uint64_t origRequest, ATStreamResponseType responseType, LPATMARKET_MOVERS_STREAM_RESPONSE pResponse) |
typedef void(* | ATStreamUpdateCallback )(LPATSTREAM_UPDATE pUpdate) |
typedef void(* | ATServerTimeUpdateCallback )(LPATTIME pServerTime) |
typedef void(* | ATRequestTimeoutCallback )(uint64_t origRequest) |
typedef void(* | ATSessionStatusChangeCallback )(uint64_t session, ATSessionStatusType statusType) |
typedef void(* | ATTickHistoryResponseCallback )(uint64_t origRequest, ATTickHistoryResponseType responseType, LPATTICKHISTORY_RESPONSE pResponse) |
typedef void(* | ATMarketHolidaysResponseCallback )(uint64_t origRequest, LPATMARKET_HOLIDAYSLIST_ITEM pItems, uint32_t itemsCount) |
typedef void(* | ATSectorListResponseCallback )(uint64_t origRequest, LPATSECTORLIST_RECORD pRecords, uint32_t recordsCount) |
typedef void(* | ATConstituentListResponseCallback )(uint64_t origRequest, LPATSYMBOL pSymbols, uint32_t symbolsCount) |
Functions | |
ACTIVETICKSERVERAPI_API bool | ATInitAPI () |
ACTIVETICKSERVERAPI_API bool | ATShutdownAPI () |
ACTIVETICKSERVERAPI_API uint32_t | ATGetAPIVersion () |
ACTIVETICKSERVERAPI_API uint32_t | ATGetSessionQueuedStreamUpdates (uint64_t session) |
ACTIVETICKSERVERAPI_API uint64_t | ATGetSessionTotalRecvedByteCount (uint64_t session) |
ACTIVETICKSERVERAPI_API uint64_t | ATGetSessionTotalRecvedMsgCount (uint64_t session, ATSessionTotalRecvedMsgType type) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateSession () |
ACTIVETICKSERVERAPI_API void | ATDestroySession (uint64_t session) |
ACTIVETICKSERVERAPI_API bool | ATSetAPIUserId (uint64_t session, LPATGUID pAPIUserId) |
ACTIVETICKSERVERAPI_API bool | ATSetServerTimeUpdateCallback (uint64_t session, ATServerTimeUpdateCallback pCallback) |
ACTIVETICKSERVERAPI_API bool | ATSetStreamUpdateCallback (uint64_t session, ATStreamUpdateCallback pCallback) |
ACTIVETICKSERVERAPI_API bool | ATInitSession (uint64_t session, const char *primaryServerHostname, const char *backupServerHostname, uint32_t serverPort, ATSessionStatusChangeCallback pCallback, bool isUsingInternalQueue=false) |
ACTIVETICKSERVERAPI_API void | ATShutdownSession (uint64_t session) |
ACTIVETICKSERVERAPI_API void | ATRedirectPumpMessage (uint64_t session, uint64_t wParam, uint64_t lParam) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateBarHistoryDbRequest (uint64_t session, const ATSYMBOL &symbol, ATBarHistoryType barHistoryType, uint8_t intradayMinuteCompression, const ATTIME &beginDateTime, const ATTIME &endDateTime, ATBarHistoryResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateBarHistoryDbRequest (uint64_t session, const ATSYMBOL &symbol, ATBarHistoryType barHistoryType, uint8_t intradayMinuteCompression, const ATTIME &beginDateTime, uint32_t recordsWanted, ATCursorType cursorType, ATBarHistoryResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateBarHistoryDbRequest (uint64_t session, const ATSYMBOL &symbol, ATBarHistoryType barHistoryType, uint8_t intradayMinuteCompression, uint32_t recordsWanted, ATBarHistoryResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateLoginRequest (uint64_t session, const wchar16_t *userid, const wchar16_t *password, ATLoginResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateTickHistoryDbRequest (uint64_t session, const ATSYMBOL &symbol, bool selectTrades, bool selectQuotes, const ATTIME &beginDateTime, const ATTIME &endDateTime, ATTickHistoryResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateTickHistoryDbRequest (uint64_t session, const ATSYMBOL &symbol, bool selectTrades, bool selectQuotes, const ATTIME &beginDateTime, uint32_t recordsWanted, ATCursorType cursorType, ATTickHistoryResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateTickHistoryDbRequest (uint64_t session, const ATSYMBOL &symbol, bool selectTrades, bool selectQuotes, uint32_t recordsWanted, ATTickHistoryResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateTickHistoryDbRequest (uint64_t session, const ATSYMBOL &symbol, bool selectTrades, bool selectQuotes, uint32_t pagesWanted, uint64_t offset, const ATTIME &dbdate, ATTickHistoryResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateMarketHolidaysRequest (uint64_t session, uint8_t yearsGoingBack, uint8_t yearsGoingForward, ATExchangeType exchangeType, ATCountryType countryType, ATMarketHolidaysResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateMarketMoversDbRequest (uint64_t session, const LPATSYMBOL symbols, uint16_t symbolCount, ATMarketMoversDbResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateMarketMoversStreamRequest (uint64_t session, const ATSYMBOL &symbol, ATStreamRequestType requestType, ATMarketMoversStreamResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateQuoteDbRequest (uint64_t session, const LPATSYMBOL symbols, uint16_t symbolCount, const ATQuoteFieldType *fields, uint16_t fieldCount, ATQuoteDbResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateQuoteStreamRequest (uint64_t session, const LPATSYMBOL symbols, uint16_t symbolCount, ATStreamRequestType requestType, ATQuoteStreamResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateSectorListRequest (uint64_t session, ATSectorListResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API uint64_t | ATCreateConstituentListRequest (uint64_t session, ATConstituentListType constituentListType, const wchar16_t *key, ATConstituentListResponseCallback pCallback) |
ACTIVETICKSERVERAPI_API bool | ATCloseRequest (uint64_t session, uint64_t request) |
ACTIVETICKSERVERAPI_API bool | ATSendRequest (uint64_t session, uint64_t request, uint32_t timeout, ATRequestTimeoutCallback pCallback) |
#define DEFAULT_REQUEST_TIMEOUT 30000 |
Default timeout value for ATSendRequest function
typedef void(* ATBarHistoryResponseCallback)(uint64_t origRequest, ATBarHistoryResponseType responseType, LPATBARHISTORY_RESPONSE pResponse) |
Callback for all Bar history responses. This function is called asynchronously by ActiveTick API's internal thread in response to ATCreateBarHistoryDbRequest/ATSendRequest call sequence.
origRequest | Original request generated by one of the ATCreateBarHistoryDbRequest functions. Use ATCloseRequest function to close the request handle inside your callback handler. |
responseType | One of the ATBarHistoryResponseType response type values. |
pResponse | Pointer to ATBARHISTORY_RESPONSE structure containing the response payload. |
typedef void(* ATConstituentListResponseCallback)(uint64_t origRequest, LPATSYMBOL pSymbols, uint32_t symbolsCount) |
Callback for Constituent list response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateConstituentListRequest/ATSendRequest call sequence.
origRequest | Original request handle returned by ATCreateConstituentListRequest call. |
pRecords | Pointer to LPATSYMBOL containing array of symbols. |
symbolsCount | Contains number of record structures. |
typedef void(* ATLoginResponseCallback)(uint64_t session, uint64_t request, LPATLOGIN_RESPONSE pResponse) |
Callback for login response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateLoginRequest/ATSendRequest call sequence.
session | Session handle for which the response is intended. |
request | Original request generated by ATCreateLoginRequest function. Use ATCloseRequest function to close the request handle inside your callback handler. |
pResponse | Pointer to ATLOGIN_RESPONSE structure containing the login response payload. |
typedef void(* ATMarketHolidaysResponseCallback)(uint64_t origRequest, LPATMARKET_HOLIDAYSLIST_ITEM pItems, uint32_t itemsCount) |
Callback for market holidays response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateMarketHolidaysRequest/ATSendRequest call sequence.
origRequest | Original request handle returned by ATCreateMarketHolidaysRequest call. |
pItems | Pointer to ATMARKET_HOLIDAYSLIST_ITEM containing first holiday. |
itemsCount | Contains number of ATMARKET_HOLIDAYSLIST_ITEM structures inside pItems pointer. |
typedef void(* ATMarketMoversDbResponseCallback)(uint64_t origRequest, ATMarketMoversDbResponseType responseType, LPATMARKET_MOVERSDB_RESPONSE pResponse) |
Callback for market movers database snapshot response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateMarketMoversDbRequest/ATSendRequest call sequence.
origRequest | Original request generated by ATCreateMarketMoversDbRequest function. Use ATCloseRequest function to close the request handle inside your callback handler. |
responseType | One of the ATMarketMoversDbResponseType enum items. |
pResponse | Pointer to ATMARKET_MOVERSDB_RESPONSE structure containing the market movers database snapshot response payload. |
typedef void(* ATMarketMoversStreamResponseCallback)(uint64_t origRequest, ATStreamResponseType responseType, LPATMARKET_MOVERS_STREAM_RESPONSE pResponse) |
Callback for market movers stream response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateMarketMoversStreamRequest/ATSendRequest call sequence.
origRequest | Original request generated by ATCreateMarketMoversStreamRequest function. Use ATCloseRequest function to close the request handle inside your callback handler. |
responseType | One of the ATStreamResponseType enum items. |
pResponse | Pointer to ATMARKET_MOVERS_STREAM_RESPONSE structure containing the market movers stream response payload. |
typedef void(* ATQuoteDbResponseCallback)(uint64_t origRequest, ATQuoteDbResponseType responseType, LPATQUOTEDB_RESPONSE pResponse, uint32_t responseCount) |
Callback for quote database snapshot response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateQuoteDbRequest/ATSendRequest call sequence.
hOrigRequest | Original request generated by ATCreateQuoteDbRequest function. Use ATCloseRequest function to close the request handle inside your callback handler. |
responseType | One of the ATQuoteDbResponseType enum items. |
pResponse | Pointer to ATQUOTEDB_RESPONSE structure containing the quote database snapshot response payload. The pointer points to the first location of quote database response. Use responseCount to determine how many structures are present. |
responseCount | Count of how many ATQUOTEDB_RESPONSE structures are present in current response. |
typedef void(* ATQuoteStreamResponseCallback)(uint64_t origRequest, ATStreamResponseType responseType, LPATQUOTESTREAM_RESPONSE pResponse, uint32_t responseCount) |
Callback for quote stream response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateQuoteStreamRequest/ATSendRequest call sequence.
origRequest | Original request generated by ATCreateQuoteStreamRequest function. Use ATCloseRequest function to close the request handle inside your callback handler. |
responseType | One of the ATStreamResponseType enum items. |
pResponse | Pointer to ATQUOTESTREAM_RESPONSE structure containing the quote stream response payload. The pointer points to the first location of quote stream response. Use responseCount to determine how many structures are present. |
responseCount | Count of how many ATQUOTESTREAM_RESPONSE structures are present in current response. |
typedef void(* ATRequestTimeoutCallback)(uint64_t origRequest) |
Callback for any time out. This function is called asynchronously by the ActiveTick API's internal thread when a time out occurs for any request initiated via ATSendRequest function.
origRequest | Original request generated by one of the ATCreate* functions. ActiveTick API guarantees either a valid response callback or timeout callback for any request sent using ATSEndRequest function. |
typedef void(* ATSectorListResponseCallback)(uint64_t origRequest, LPATSECTORLIST_RECORD pRecords, uint32_t recordsCount) |
Callback for Sector list response. This function is called asynchronously by the ActiveTick API's internal thread in response to ATCreateSectorListRequest/ATSendRequest call sequence.
origRequest | Original request handle returned by ATCreateSectorListRequest call. |
pRecords | Pointer to LPATSECTORLIST_RECORD containing array of sectors, comprised of sector/industry pairs. |
recordsCount | Contains number of record structures. |
typedef void(* ATServerTimeUpdateCallback)(LPATTIME pServerTime) |
Callback for server time update. This function is called asynchronously by the ActiveTick API's internal thread.
pServerTime | Period timestamp sent from the ActiveTick server. Time is in Eastern Standard time zone. |
typedef void(* ATSessionStatusChangeCallback)(uint64_t session, ATSessionStatusType statusType) |
Callback for session status change. This function is called asynchronously by the ActiveTick API's internal thread when there is a change in the session, such as Connect or Disconnect event.
session | Session handle which caused the callback notification. |
statusType | One of the ATSessionStatusType enum status types. |
typedef void(* ATStreamUpdateCallback)(LPATSTREAM_UPDATE pUpdate) |
Callback for all streaming updates. This function is called asynchronously by the ActiveTick API's internal thread.
pUdpate | Pointer to ATSTREAM_UDPATE structure containing information about current stream update. |
typedef void(* ATTickHistoryResponseCallback)(uint64_t origRequest, ATTickHistoryResponseType responseType, LPATTICKHISTORY_RESPONSE pResponse) |
Callback for all Tick history responses. This function is called asynchronously by ActiveTick API's internal thread in response to ATCreateTickHistoryDbRequest/ATSendRequest call sequence.
origRequest | Original request generated by one of the ATCreateTickHistoryDbRequest functions. Use ATCloseRequest function to close the request handle inside your callback handler. |
responseType | One of the ATTickHistoryResponseType enum response type values. |
pResponse | Pointer to ATTICKHISTORY_RESPONSE structure containing the response payload. |
ACTIVETICKSERVERAPI_API bool ATCloseRequest | ( | uint64_t | session, |
uint64_t | request | ||
) |
Close request handle generated by one of the ATCreate* request functions.
session | Session handle which initiated original request. |
request | Request handle to close. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateBarHistoryDbRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
ATBarHistoryType | barHistoryType, | ||
uint8_t | intradayMinuteCompression, | ||
const ATTIME & | beginDateTime, | ||
const ATTIME & | endDateTime, | ||
ATBarHistoryResponseCallback | pCallback | ||
) |
Create request for history bars. This function selects bars between two specific times.
session | Session handle created with prior call to ATCreateSession(). |
symbol | ATSYMBOL for which to create the request. |
barHistoryType | One of ATBarHistoryType enum types. |
intradayMinuteCompression | If barHistoryType is BarHistoryIntraday, then this parameter specifies a range of 1-60 minutes bar compression, otherwise it should be 0. |
beginDateTime | Beginning of the date+time range. |
endDateTime | Ending of the date+time range. |
pCallback | Pointer to ATBarHistoryResponseCallback callback notification function. This function will be called upon successful receipt of bar history data. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateBarHistoryDbRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
ATBarHistoryType | barHistoryType, | ||
uint8_t | intradayMinuteCompression, | ||
const ATTIME & | beginDateTime, | ||
uint32_t | recordsWanted, | ||
ATCursorType | cursorType, | ||
ATBarHistoryResponseCallback | pCallback | ||
) |
Create request for history bars. This function selects bars from a given time point, and using the back or forward cursor, retrieves specified count of bars.
session | Session handle created with prior call to ATCreateSession(). |
symbol | ATSYMBOL for which to create the request. |
barHistoryType | One of ATBarHistoryType enum types. |
intradayMinuteCompression | If barHistoryType is BarHistoryIntraday, then this parameter specifies a range of 1-60 minutes bar compression, otherwise it should be 0. |
beginDateTime | Beginning of the date+time range. |
recordsWanted | Bars to retrieve. |
cursorType | One of the ATCursorType enum types, specifying which direction to move to. |
pCallback | Pointer to ATBarHistoryResponseCallback callback notification function. This function will be called upon successful receipt of bar history data. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateBarHistoryDbRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
ATBarHistoryType | barHistoryType, | ||
uint8_t | intradayMinuteCompression, | ||
uint32_t | recordsWanted, | ||
ATBarHistoryResponseCallback | pCallback | ||
) |
Create request for history bars. This function selects latest bars from present time, going back to specified count of bars.
session | Session handle created with prior call to ATCreateSession(). |
symbol | ATSYMBOL for which to create the request. |
barHistoryType | One of ATBarHistoryType enum types. |
intradayMinuteCompression | If barHistoryType is BarHistoryIntraday, then this parameter specifies a range of 1-60 minutes bar compression, otherwise it should be 0. |
recordsWanted | Bars to retrieve. |
pCallback | Pointer to ATBarHistoryResponseCallback callback notification function. This function will be called upon successful receipt of bar history data. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateConstituentListRequest | ( | uint64_t | session, |
ATConstituentListType | constituentListType, | ||
const wchar16_t * | key, | ||
ATConstituentListResponseCallback | pCallback | ||
) |
Create Constituents list request. This function is used to retrieve a list for a given constituent type.
session | Session handle created with prior call to ATCreateSession(). |
pCallback | Pointer to ATConstituentListResponseCallback callback function. This function will be called when API receives a response from the server. |
constituentListType | One of ATConstituentListType types, Sector, Index, or OptionChain |
key | Specifies the key. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateLoginRequest | ( | uint64_t | session, |
const wchar16_t * | userid, | ||
const wchar16_t * | password, | ||
ATLoginResponseCallback | pCallback | ||
) |
Create ActiveTick user login request.
session | Session handle created with prior call to ATCreateSession(). |
userid | ActiveTick user id. |
password | ActiveTick user password. |
pCallback | Pointer to ATLoginResponseCallback callback function. This function will be called when API receives a login response from the server. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateMarketHolidaysRequest | ( | uint64_t | session, |
uint8_t | yearsGoingBack, | ||
uint8_t | yearsGoingForward, | ||
ATExchangeType | exchangeType, | ||
ATCountryType | countryType, | ||
ATMarketHolidaysResponseCallback | pCallback | ||
) |
Create market holidays list request. This function returns all market holidays for a given year range.
session | Session handle created with prior call to ATCreateSession(). |
yearsGoingBack | Years to go back from current year. |
yearsGoingForward | Years to go forward from current year. |
exchangeType | Exchange-specific holidays |
countryType | Country-specific holidays |
pCallback | Pointer to ATMarketHolidaysResponseCallback callback function. This function will be called when API receives a response from the server. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateMarketMoversDbRequest | ( | uint64_t | session, |
const LPATSYMBOL | symbols, | ||
uint16_t | symbolCount, | ||
ATMarketMoversDbResponseCallback | pCallback | ||
) |
Create market movers real-time snapshot database request.
session | Session handle created with prior call to ATCreateSession(). |
symbols | Pointer to an array of symbols for which to retrieve market movers records. |
symbolCount | Count of symbols inside the symbols array. |
pCallback | Pointer to ATMarketMoversDbResponseCallback callback function. This function will be called when API receives a response from the server. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateMarketMoversStreamRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
ATStreamRequestType | requestType, | ||
ATMarketMoversStreamResponseCallback | pCallback | ||
) |
Create market movers real-time stream request.
session | Session handle created with prior call to ATCreateSession(). |
symbol | Symbol for which to create the stream request. |
requestType | One of the ATStreamRequestType enum types specifying which type of stream operation to perform. |
pCallback | Pointer to ATMarketMoversStreamResponseCallback callback function. This function will be called when API receives a response from the server. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateQuoteDbRequest | ( | uint64_t | session, |
const LPATSYMBOL | symbols, | ||
uint16_t | symbolCount, | ||
const ATQuoteFieldType * | fields, | ||
uint16_t | fieldCount, | ||
ATQuoteDbResponseCallback | pCallback | ||
) |
Create real-time quote snapshot database request.
session | Session handle created with prior call to ATCreateSession(). |
symbols | Pointer to an array of symbols for which to retrieve quote records. |
symbolCount | Count of symbols inside the symbols array. |
fields | Pointer to an array of ATQuoteFieldTypes for which to retrieve the values. |
fieldCount | Count of fields inside the fields array. |
pCallback | Pointer to ATQuoteDbResponseCallback callback function. This function will be called when API receives a response from the server. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateQuoteStreamRequest | ( | uint64_t | session, |
const LPATSYMBOL | symbols, | ||
uint16_t | symbolCount, | ||
ATStreamRequestType | requestType, | ||
ATQuoteStreamResponseCallback | pCallback | ||
) |
Create real-time quote stream request.
session | Session handle created with prior call to ATCreateSession(). |
symbols | Pointer to an array of symbols for which to perform the stream request. |
symbolCount | Count of symbols inside the symbols array. |
requestType | One of the ATStreamRequestType specifying the type of stream operation. |
pCallback | Pointer to ATQuoteStreamResponseCallback callback function. This function will be called when API receives a response from the server. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateSectorListRequest | ( | uint64_t | session, |
ATSectorListResponseCallback | pCallback | ||
) |
Create Sector list request. The list comes back as string pairs of sector/industry.
session | Session handle created with prior call to ATCreateSession(). |
pCallback | Pointer to ATSectorListResponseCallback callback function. This function will be called when API receives a response from the server. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateSession | ( | ) |
Create ActiveTick session. Each session is represented by a single connection to ActiveTick's servers.
ACTIVETICKSERVERAPI_API uint64_t ATCreateTickHistoryDbRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
bool | selectTrades, | ||
bool | selectQuotes, | ||
const ATTIME & | beginDateTime, | ||
const ATTIME & | endDateTime, | ||
ATTickHistoryResponseCallback | pCallback | ||
) |
Create request for tick data. This function selects tick data between two specific times.
session | Session handle created with prior call to ATCreateSession(). |
symbol | ATSYMBOL for which to create the request. |
selectTrades | If set to true, the server will return TRADE records. |
selectQuotes | If set to true, the server will return QUOTE records. |
beginDateTime | Beginning of the date+time range. |
endDateTime | Ending of the date+time range. |
pCallback | Pointer to ATTickHistoryResponseCallback callback notification function. This function will be called upon successful receipt of tick history data. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateTickHistoryDbRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
bool | selectTrades, | ||
bool | selectQuotes, | ||
const ATTIME & | beginDateTime, | ||
uint32_t | recordsWanted, | ||
ATCursorType | cursorType, | ||
ATTickHistoryResponseCallback | pCallback | ||
) |
Create request for tick data. This function selects tick data from a given time point, and using the back or forward cursor, retrieves specified count of records.
session | Session handle created with prior call to ATCreateSession(). |
symbol | ATSYMBOL for which to create the request. |
selectTrades | If set to true, the server will return TRADE records. |
selectQuotes | If set to true, the server will return QUOTE records. |
beginDateTime | Beginning of the date+time range. |
recordsWanted | Records to retrieve. |
cursorType | One of the ATCursorType enum types, specifying which direction to move to. |
pCallback | Pointer to ATTickHistoryResponseCallback callback notification function. This function will be called upon successful receipt of tick history data. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateTickHistoryDbRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
bool | selectTrades, | ||
bool | selectQuotes, | ||
uint32_t | recordsWanted, | ||
ATTickHistoryResponseCallback | pCallback | ||
) |
Create request for tick data. This function selects latest tick data from present time, going back to specified count of records.
session | Session handle created with prior call to ATCreateSession(). |
symbol | ATSYMBOL for which to create the request. |
selectTrades | If set to true, the server will return TRADE records. |
selectQuotes | If set to true, the server will return QUOTE records. |
recordsWanted | Records to retrieve. |
pCallback | Pointer to ATTickHistoryResponseCallback callback notification function. This function will be called upon successful receipt of tick history data. |
ACTIVETICKSERVERAPI_API uint64_t ATCreateTickHistoryDbRequest | ( | uint64_t | session, |
const ATSYMBOL & | symbol, | ||
bool | selectTrades, | ||
bool | selectQuotes, | ||
uint32_t | pagesWanted, | ||
uint64_t | offset, | ||
const ATTIME & | dbdate, | ||
ATTickHistoryResponseCallback | pCallback | ||
) |
Create request for tick data. This function uses direct database offset value to retrieve data from data pages.
session | Session handle created with prior call to ATCreateSession(). |
symbol | ATSYMBOL for which to create the request. |
selectTrades | If set to true, the server will return TRADE records. |
selectQuotes | If set to true, the server will return QUOTE records. |
pagesWanted | Pages to retrieve. Each page contains variable number of records. |
offset | Offset value to use to look up records. The value must be a valid offset returned from previous calls, or set to -1 to retrieve last record inside the database. |
dbdate | Date of the datatabase. ActiveTick ticker plant stores tick records inside daily files, and dbdate param identifies the date of which database to retrieve the records from. |
pCallback | Pointer to ATTickHistoryResponseCallback callback notification function. This function will be called upon successful receipt of tick history data. |
ACTIVETICKSERVERAPI_API void ATDestroySession | ( | uint64_t | session | ) |
Destroy ActiveTick session by closing underlying server connection, and cleaning up any resources allocated for current session.
session | Session handle |
ACTIVETICKSERVERAPI_API uint32_t ATGetAPIVersion | ( | ) |
Return current API version.
ACTIVETICKSERVERAPI_API uint32_t ATGetSessionQueuedStreamUpdates | ( | uint64_t | session | ) |
Return queued streaming updates.
session | Session handle for which to retrieve the count. |
ACTIVETICKSERVERAPI_API uint64_t ATGetSessionTotalRecvedByteCount | ( | uint64_t | session | ) |
Return total amount of bytes received for given session.
session | Session handle for which to retrieve the received bytes count. |
ACTIVETICKSERVERAPI_API uint64_t ATGetSessionTotalRecvedMsgCount | ( | uint64_t | session, |
ATSessionTotalRecvedMsgType | type | ||
) |
Return total amount of bytes received for given session.
session | Session handle for which to retrieve the received bytes count. |
ACTIVETICKSERVERAPI_API bool ATInitAPI | ( | ) |
Initialize ActiveTick's API. This function must be called before any other can be function called.
ACTIVETICKSERVERAPI_API bool ATInitSession | ( | uint64_t | session, |
const char * | primaryServerHostname, | ||
const char * | backupServerHostname, | ||
uint32_t | serverPort, | ||
ATSessionStatusChangeCallback | pCallback, | ||
bool | isUsingInternalQueue = false |
||
) |
Initialize session handle. This function is responsible for spawning a server connection thread, and initialization of various internal data structures.
session | Session handle created by ATCreateSession() prior to calling this function. |
primaryServerHostname | Hostname of the primary ActiveTick server. |
backupServerHostname | Hostname of the backup ActiveTick server. |
serverPort | ActiveTick Server's port. This value is typically port 443. |
pCallback | Callback function which will be used during various changes to sessions such as connects and disconnects. |
isUsingInternalQueue | Flag used to indicate whether the API should use internal queue for calling stream callbacks. Default is false. |
ACTIVETICKSERVERAPI_API void ATRedirectPumpMessage | ( | uint64_t | session, |
uint64_t | wParam, | ||
uint64_t | lParam | ||
) |
Redirect window message from application using ActiveTick's API. ActiveTick's internal thread calls specified HWND with specified message id, and application should use this method to reflect all messages back to ActiveTick's API.
session | Session handle for which to redirect the message. |
wParam | WPARAM value from WindowProc. |
lParam | LPARAM value from WindowProc. |
ACTIVETICKSERVERAPI_API bool ATSendRequest | ( | uint64_t | session, |
uint64_t | request, | ||
uint32_t | timeout, | ||
ATRequestTimeoutCallback | pCallback | ||
) |
Send request to the server.
session | Session handle which initiated original request. |
request | Request handle generated by one of the request functions. |
timeout | Time out in milliseconds to wait before ATRequestTimeoutCallback callback is called. To use default time out, specify DEFAULT_REQUEST_TIMEOUT constant. |
pCallback | Pointer to ATRequestTimeoutCallback callback function. This function will be called if time out is reached. |
ACTIVETICKSERVERAPI_API bool ATSetAPIUserId | ( | uint64_t | session, |
LPATGUID | pAPIUserId | ||
) |
Set user id for ActiveTick API identification and usage. This function is typically used by third party developers to validate their credentials with ActiveTick servers.
session | Session handle for which to set the user id. |
pAPIUserId | Pointer to a ATGUID assigned by ActiveTick support (suppo). rt@a ctive tick .com |
ACTIVETICKSERVERAPI_API bool ATSetServerTimeUpdateCallback | ( | uint64_t | session, |
ATServerTimeUpdateCallback | pCallback | ||
) |
Set the callback for server time updates. This callback will be called every time when ActiveTick's API receives a time synchronization message from the server.
session | Session handle for which to set the callback. |
pCallback | Pointer to ATServerTimeUpdateCallback function. |
ACTIVETICKSERVERAPI_API bool ATSetStreamUpdateCallback | ( | uint64_t | session, |
ATStreamUpdateCallback | pCallback | ||
) |
Set the callback all stream updates. This callback will be called every time when ActiveTick's API receives a stream update.
session | Session handle for which to set the callback. |
pCallback | Pointer to ATStreamUpdateCallback function. |
ACTIVETICKSERVERAPI_API bool ATShutdownAPI | ( | ) |
Shut down ActiveTick's API and releases all resources.
ACTIVETICKSERVERAPI_API void ATShutdownSession | ( | uint64_t | session | ) |
Close server connection.
session | Session handle. |