|
|
|
|
Purpose |
Get information about a defined exchange on an Aspen Server. | ||
|
|
| ||
|
Call Syntax |
#include <aspen.h> … AspenRequest(GLOBAL_session, ASPEN_GetExchangeInfo, &xchgIndex, &exchange); … | ||
|
|
| ||
|
Parameters |
Input The input parameter is a pointer to an integer containing the Aspen exchange identifier. This value is stored in the ASPEN_INSTRUMENT structure.
Output The output parameter for this service is a pointer to an ASPEN_EXCHANGE structure that receives exchange information from the Aspen Server. | ||
|
|
| ||
|
Structures |
typedef struct { ASPEN_INUM inum; char symbol[ASPEN_SYMBOL_SIZE+1]; char description[ASPEN_SYMDESC_SIZE+1]; int type; ASPEN_ATTRIBUTES attributes; int exchange; ASPEN_QUANTUM quantum; ASPEN_QUANTUM strike_quantum; ASPEN_PRICE strike_price; unsigned int expire; float dollars; int tradingSessionCount; ASPEN_SESSION_TIME tradingSession[ASPEN_MAX_TRADING_SESSIONS]; ASPEN_TICK last; ASPEN_PRICE trade; ASPEN_VOLUME trade_size; int trade_exchange; ASPEN_PRICE bid; ASPEN_VOLUME bid_size; int bid_exchange; ASPEN_PRICE ask; ASPEN_VOLUME ask_size; int ask_exchange; ASPEN_PRICE high; ASPEN_PRICE low; ASPEN_PRICE previous; ASPEN_PRICE net_change; ASPEN_VOLUME open_interest; ASPEN_VOLUME prev_futures_volume; ASPEN_PRICE open; ASPEN_PRICE open2; ASPEN_PRICE close; ASPEN_PRICE close2; ASPEN_VOLUME dvolume; ASPEN_VOLUME uvolume; ASPEN_VOLUME tvolume;
typedef struct { unsigned short exchange; ASPEN_SESSION_TIME tradingSession[ASPEN_MAX_TRADING_SESSIONS]; char *name[ASPEN_MAX_XCHG_LENGTH]; char *desc[ASPEN_MAX_XCHG_DESCRIPTION]; | ||
|
|
| ||
|
Remarks |
ASPEN_GetExchangeInfo is a non-privileged service which may be used to query a Server regarding any financial exchange which is defined on that Server. | ||
|
|
| ||
|
Return Value |
| ||
|
|
| ||
|
See Also |
|||
|
|
| ||
|
Example |
int CAspenRequestDlg::DoASPEN_GetExchangeInfo() { int retval; ASPEN_EXCHANGE exchange; server_list *slp = list; CString strText; int xchgIndex,i=0, y=1; char *names[]={"Unknown", "Futures", "Stock", "Forex", "Treasury", "Mortgage", "Index", "Corporate Bonds", "Mutual Fund", "Money Market", "Basket", "Spot", "Spread", "Municipal Bonds"}; i = atoi(strNum); for(xchgIndex=0;i<EXCHG_MAX;xchgIndex++) { retval = AspenRequest( slp->server_session, ASPEN_GetExchangeInfo, &xchgIndex, &exchange); if (!retval) { strText.Format(" Name : %s",exchange.name); m_HistoryEdit.AppendString(strText); strText.Format("Description : %s",exchange.desc); m_HistoryEdit.AppendString(strText); strText.Format(" Exchange : %d",exchange.exchange); m_HistoryEdit.AppendString(strText); strText.Format(" Type : %s",names[exchange.type]); m_HistoryEdit.AppendString(strText); strText.Format(" TZ : %d", exchange.tradingSession[0].time_zone); m_HistoryEdit.AppendString(strText); y++; } if (y > i) break; } return retval; } |
©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.