API Documentation

Small helper function in Category Dumper project to print symbols:

void PrintSymbol(const NxCoreMessage *pNxCoreMsg)
{
    // If a valid option header 
    if (pNxCoreMsg->coreHeader.pnxOptionHdr)
    {
        // If pnxsDateAndStrike->String[1] == ' ', then this symbol is in new OSI format. 	
        if (pNxCoreMsg->coreHeader.pnxOptionHdr->pnxsDateAndStrike->String[1]==' ')			
        {
        // Construct OSI symbol
        printf("Category %d Message for Symbol:  %s%02d%02d%02d%c%08d\n",
               pNxCoreMsg->coreData.Category.pnxStringCategory->Atom,
               pNxCoreMsg->coreHeader.pnxStringSymbol->String,
               pNxCoreMsg->coreHeader.pnxOptionHdr->nxExpirationDate.Year-2000,
               pNxCoreMsg->coreHeader.pnxOptionHdr->nxExpirationDate.Month,
               pNxCoreMsg->coreHeader.pnxOptionHdr->nxExpirationDate.Day,
               (pNxCoreMsg->coreHeader.pnxOptionHdr->PutCall == 0) ? 'C' : 'P',
               pNxCoreMsg->coreHeader.pnxOptionHdr->strikePrice);
        }
        // Otherwise the symbol is in old OPRA format.
        else
        {
            printf("Category %d Message for Symbol: %s%c%c\n",
                   pNxCoreMsg->coreData.Category.pnxStringCategory->Atom,
                   pNxCoreMsg->coreHeader.pnxStringSymbol->String,
                   pNxCoreMsg->coreHeader.pnxOptionHdr->pnxsDateAndStrike->String[0],
                   pNxCoreMsg->coreHeader.pnxOptionHdr->pnxsDateAndStrike->String[1]);	  
        }
    }
    // Else non-option, print symbol only
    else
        printf("Category %d Message for Symbol: %s\n",
                pNxCoreMsg->coreData.Category.pnxStringCategory->Atom,
                pNxCoreMsg->coreHeader.pnxStringSymbol->String); 			 
}