Table of Contents
Starts a SymbolSpin which iterates over each symbol in each of the requested Listed Exchanges.
#define cszNxCoreSpinSymbols "sNxCoreSpinSymbols" typedef int (__stdcall *NxCoreSpinSymbols) (unsigned short ListedExg, unsigned int controlFlags, unsigned int spinID, NxCoreCallback tempstdcallback/*=0*/, int tempUserData/*=0*/);// specify (unsigned short)-1 for all exchanges int SpinSymbols( unsigned short ListedExg, unsigned int controlFlags, unsigned int spinID, NxCoreCallback tempCallback=0, int tempUserData=0 );
Specify the ListedExchange that you wish to Iterate. Use the value -1 (or NxSPIN_ALL_EXGS), to choose all ListedExchangs in the NxCore Tape.
Pass the value 0 (or NxSPIN_NON_OPTIONS) to iterate regular symbols (not options).
Pass the value 1 (or NxSPIN_OPTIONS) to Iterate Option Contracts
To iterate both symbols and options, call this function twice, passing 0 and 1 for this parameter.
spinID is assigned to the NxCoreMessage.coreData.SymbolSpin.SpinID data member and is reserved for your use.
To Iterate a function other than your callback function, pass the address of that function here.
Pass a non-zero value if you wish to temporarily override the value in NxCoreSystem.UserData during the SymboSpin message callbacks.
The value of user data is copied to NxCoreSystem.UserData and is available to reference or change during your callback function.
Returns 0 if success, non-zero if failed
Each iterated symbol generates a callback with NxCoreMessage.MessageType equal to NxMSG_SYMBOLSPIN.
All callback messages are suspended until this function completes iterating all the symbols or NxCALLBACKRETURN_STOP is returned during a SymbolSpin callback. Passing a special callback function to process SymbolSpin messages is recommended as it reduces clutter from your main callback function.
For example of this function see here