ASPEN_StopInstrumentUpdates

 

Related Topics

 

 

Purpose

Notify an Aspen Server to discontinue change updates for a financial instrument.

 

 

Call Syntax

#include <aspen.h>

AspenRequest(GLOBAL_session, ASPEN_StopInstrumentUpdates,  &stopInfo, NULL);

 

 

Parameters

Input

The input parameter for this service is the instrument number for which update notices will be discontinued.

 

Output

None.

 

 

Structures

typedef struct

{

   int         inumCount;

   ASPEN_INUM  *inums;

}ASPEN_STOPINSTRUMENTUPDATES_INPUT;

 

 

Remarks

The ASPEN_GetInstrumentInfo service requires an ASPEN_GETINSTRUMENT_INPUT structure, which requires a want_updates field. want_updates instructs the Aspen Server whether to send update notices when trades occur on the specified financial instrument.

 

Updates are received when the AspenEvent() function receives a ASPEN_InstrumentUpdateNotice event. The ASPEN_INSTRUMENT_UPDATE_NOTICE structure is returned from this function whenever a instrument change notice is received.

 

The ASPEN_StopInstrumentUpdates service is used to notify the Server to discontinue updates on the specified financial instrument.

 

 

Return Value

ASPEN_OK

instrument updates are discontinued.

 

 

See Also

ASPEN_INSTRUMENT

ASPEN_GetInstrumentInfo

ASPEN_InstrumentUpdateNotice

ASPEN_STOPINSTRUMENTUPDATES_INPUT

ASPEN_INUM

ASPEN_INSTRUMENT_UPDATE_NOTICE

 

 

Example

int CAspenRequestDlg::DoASPEN_StopInstrumentUpdates()

{

   ASPEN_STOPINSTRUMENTUPDATES_INPUT   stopInfo;

   server_list                         *slp = list;

   char                                symb[ASPEN_SYMBOL_SIZE];

   int                                 retval;

   strcpy(symb,strSymb);

   retval = AspenRequest(slp->server_session, ASPEN_GetInstrumentNumber, symb, &a_inum);

   if (retval == ASPEN_OK)

   {

      stopInfo.inumCount = 1;

      stopInfo.inums = &a_inum;

      retval = AspenRequest(slp->server_session, ASPEN_StopInstrumentUpdates, &stopInfo, NULL);

   }

   return retval;

}

 

©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.