#pragma once
#include <Python.h>
#include "structmember.h"
#include "NxCorePythonDefines.h"
#include "NxCoreAPI/NxCoreAPI.h"
#include "NxCoreAPI/NxCoreAPI_Wrapper_C++.h"
#define USE_C_VALUES
//#define PREALLOC_SHORT_OBJECTS
#if PY_MAJOR_VERSION==3&& PY_MINOR_VERSION>8
#define USE_VECTOR_FUNCTION
#endif

typedef struct {
	PyObject_HEAD
	int					Price;
	unsigned char		PriceType;
} NxPriceObject;

typedef struct {
	PyObject_HEAD
	unsigned int		ixTable;
	unsigned int		idString;
}StringTableItemObject;

typedef struct {
	PyObject_HEAD
	unsigned int		MsOfDay;		// number of milliseconds since start of day -- midnight
	unsigned short		Millisecond;	// millisecond of second 0-999
	unsigned char		Second;			// second of minute 0-59
	unsigned char		Minute;			// minute of hour 0-59
	unsigned char		Hour;			// hour of day. 0-23
	char				TimeZone;		// +/- hours to GMT.
	unsigned short		MsResolution;
} NxTimeObject;

typedef struct {
	PyObject_HEAD
	unsigned int 			NDays;			// julian date. Number of days since Jan 1, 1883.
	unsigned short			Year;			// current year. 1999,2000,2001,2002,2003..
	unsigned char			Month;			// month of year.  1-12 (note this is not zero based)
	unsigned char			Day;			// day of month. 1-31 (not zero based)
	unsigned char			DSTIndicator;	// see NxDATE_DST_
	unsigned char			DayOfWeek;		// see NxDOW_
	unsigned short			DayOfYear;
} NxDateObject;

typedef struct {
	PyObject_HEAD
	int							UserData1;	// first  32-bit user data space. Valid for
	int							UserData2;	// second 32-bit user data space.
	unsigned short				Atom;		// unique/sequential/nonzero/constant 16 bit number assigned to the String
	PyObject* String;		// 20/20 bytes

} NxStringObject;

typedef struct {
	PyObject_HEAD
	NxStringObject* pnxsDateAndStrike;	// the string member contains 2 alpha characters (expire code and strike code) -- and is NOT null terminated.
	NxStringObject* pnxsUnderlying;		// This is the same pointer as pnxStringSymbol in the underlying symbol (unless Atom == 0, which is the case if you are not subscribed to the underlying's exchange).
	NxStringObject* pnxsSeriesChain;		// All option series in the chain share the same pointer to this string.
	NxStringObject* pnxsSpecialSettle;	// All option series with the same special settlement share the same pointer to this string
	unsigned short    exgUnderlying;		// exchange code of the underlying symbol
	unsigned short	  contractUnit;			// default is 100 (shares,units, etc).
	int				  strikePrice;			// OPRA sourced strike price. implied 3 decimal places. i.e.	35000 == 35.000 == 35
	int				  strikePriceEst;		// if non-zero, the nxCore server includes the estimated strike price for this option contract.
	unsigned char	  PutCall;				// the value 1 == put, 0 == call.
	unsigned char	  expirationCycle;		// 1 == January cycle, 2 == February cycle, 3 == March cycle.
	unsigned char	  oicStrikeAge;			// number from 0-7. Incremented each trading day the strikePrice is received from OPRA.
	unsigned char	  nxStrikeMatch;		// number from 0-15 indicating the likelihood that the strikePrice is correct.
	NxDateObject* nxExpirationDate;		// The date this option contract expires.

} NxOptionHdrObject;

typedef struct {
	PyObject_HEAD
	NxStringObject* pnxStringSymbol;
	NxOptionHdrObject* pnxOptionHdr;
	NxDateObject* nxSessionDate;
	NxTimeObject* nxExgTimestamp;
	unsigned short	ListedExg;		  // Listed or Primary Exchange. Use NxCoreGetDefinedString(NxST_EXCHANGE,ListedExg) for text name
	unsigned short	ReportingExg;	  // Exchange sending quote/trade. Use NxCoreGetDefinedString(NxST_EXCHANGE,ReportingExg) for text name
	unsigned char	SessionID;
	unsigned char	alignment;
	unsigned short  PermissionID;	  // identifies the permissions (exchanges,etc.) in the tape. Use NxCoreGetDefinedString(NxST_PERMID,PermissionID) for text name
} NxCoreHeaderObject;

typedef struct {
	PyObject_HEAD
	int					AskSize;			// Ask size
	int					BidSize;			// Bid size
	int					AskSizeChange;
	int					BidSizeChange;
	int					AskPrice;			// ask Price (nxPriceType)
	int					BidPrice;			// bid Price (nxPriceType)
	int					AskPriceChange;
	int					BidPriceChange;
	unsigned char		PriceType;			// lAskPrice and lBidPrice always have the same price type.
	unsigned char		Refresh;			// set to non-zero if this message is a refresh as opposed to real-time.
	unsigned char		QuoteCondition;		// quote condition assigned by exchange. Use NxCoreGetDefinedString(NxST_QUOTECONDITION,QuoteCondition) for text name
	unsigned char		NasdaqBidTick;		// for nasdaq stocks. nasdaqBidTick.
} NxCoreQuoteObject;

typedef struct {
	PyObject_HEAD
	NxCoreQuoteObject* coreQuote;
	int				BestAskPrice;
	int				BestBidPrice;
	int				BestAskPriceChange;
	int				BestBidPriceChange;
	int				BestAskSize;
	int				BestBidSize;
	int				BestAskSizeChange;
	int				BestBidSizeChange;
	unsigned short	BestAskExg;
	unsigned short	BestBidExg;
	unsigned short  PrevBestAskExg;
	unsigned short  PrevBestBidExg;
	unsigned char	BestAskCondition;
	unsigned char	BestBidCondition;
	unsigned char   BBOChangeFlags;
	unsigned char	ClosingQuoteFlag;

} NxCoreExgQuoteObject;

typedef struct {
	PyObject_HEAD
	NxCoreQuoteObject* coreQuote;						//40 bytes.
	NxStringObject* pnxStringMarketMaker;
	unsigned char		MarketMakerType;
	unsigned char		QuoteType;
} NxCoreMMQuoteObject;

typedef struct {
	PyObject_HEAD
	int					FilterThreshold;		// threshold for filter analysis
	unsigned char		Filtered;
	unsigned char		FilterLevel;
	unsigned char		SigHiLoType;
	unsigned char		alignment;
	unsigned int		SigHiLoSeconds;
	int					QteMatchDistanceRGN;
	int					QteMatchDistanceBBO;
	unsigned char		QteMatchTypeRGN;
	unsigned char		QteMatchTypeBBO;
	unsigned char		QteMatchFlagsRGN;
	unsigned char		QteMatchFlagsBBO;

} NxCTAnalysisObject;

typedef struct {
	PyObject_HEAD
	int						Price;					// price of trade report. Note: There is also a "Last" field in this structure. Not all Prices update the "Last". FormT (after hours) trades are one example.
	unsigned char			PriceType;				// Applies to Price,Open,High,Low,Last,Tick,Net Change,nxAnalysis.FilterThreshold,nxAnalysis.QteMatchDistanceRGN/BBO fields in this record.
	unsigned char			PriceFlags;				// flags indicating if trade is new high/low, etc. see defines beginning with NxTPF_ .
	unsigned char			TradeCondition;			// trade condition code assigned by exchange. Use NxCoreGetDefinedString(NxST_TRADECONDITION,TradeCondition) for text name
	unsigned char			ConditionFlags;			// converts TradeCondition (and BATE when present) to set eligibility flags (defines begin with NxTCF_ )
	unsigned char			VolumeType;				// indicates how the Size field changes (or not) the TotalVolume/TickVolume fields (defines begin with NxTVT_ )
	unsigned char			BATECode;				// 'B'id,'A'sk, or 'T'rade indicator for some commodities. ('E'xception not used -- historical artifact).
	unsigned int			Size;
	unsigned int			ExgSequence;			// original exchange sequence number.
	unsigned int			RecordsBack;			// for inserts and deletes, indicates the number of records from the last record received the cancel/insert applies.
	NxCTAnalysisObject* nxAnalysis;				// 24/24 bytes
	unsigned long long		TotalVolume;
	unsigned int			TickVolume;
	int						Open;
	int						High;
	int						Low;
	int						Last;
	int						Tick;
	int						NetChange;
	PyObject* ExtTradeConditions;		// 2015.11.11 changed from alignment[4] to ExtTradeConditions --- //2.3.198, 2007.04.16
} NxCoreTradeObject;

typedef struct {
	PyObject_HEAD
	unsigned char	Status;
	char			StatusChar;
	NxStringObject* pnxsSymbolOld;
	NxOptionHdrObject* pnxOptionHdrOld;
	unsigned short	ListedExgOld;
} NxCoreSymbolChangeObject;

typedef struct {
	PyObject_HEAD
	long long				i64Bit;						// 1: NxCFT_64BIT
	int						i32Bit;						// 2: NxCFT_32BIT
	const char*				StringZ;					// 3: NxCFT_STRINGZ
	double					Double;						// 4: NxCFT_DOUBLE
	NxPriceObject*			nxPrice;					// 5: NxCFT_PRICE							  // 8/8 bytes
	NxDateObject*			nxDate;						// 6: NxCFT_DATE							  // 16/16 bytes
	NxTimeObject*			nxTime;						// 7: NxCFT_TIME							  // 16/16 bytes
	NxStringObject*			pnxString;					// 8: NxCFT_NxSTRING
	StringTableItemObject*	stringTableItem;			// 9: NxCFT_STRING_IDX, 10:NxCFT_STRING_MAP // 8/8 bytes
} NxCoreCategoryDataObject;

typedef struct {
	PyObject_HEAD
	const char*				FieldName;
	const char*				FieldInfo;
	unsigned char			Set;
	unsigned char			FieldType;
	NxCoreCategoryDataObject* data;
} NxCategoryFieldObject;

typedef struct {
	PyObject_HEAD
	NxStringObject* pnxStringCategory;
	PyObject* pnxFields;
	unsigned short		NFields;
} NxCoreCategoryObject;

typedef struct {
	PyObject_HEAD
	int				  AskPrice;
	int				  BidPrice;
	int				  AskSize;
	int				  BidSize;
	unsigned short	  ReportingExg;
	unsigned char	  QuoteCondition;
}NxCoreStateExgQuoteObject;

typedef struct {
	PyObject_HEAD
	unsigned short		StateQuoteCount;
	unsigned char		PriceType;
	unsigned char		NasdaqBidTick;
	unsigned short		BestAskExg;
	unsigned short		BestBidExg;
	PyObject* StateExgQuotes;
}NxCoreStateExgQuotesObject;

typedef struct {
	PyObject_HEAD
	int				AskPrice;
	int				BidPrice;
	int				AskSize;
	int				BidSize;
	NxStringObject* pnxStringMarketMaker;
	unsigned char	MarketMakerType;
	unsigned char	QuoteType;
} NxCoreStateMMQuoteObject;

typedef struct {
	PyObject_HEAD
	unsigned short		StateQuoteCount;
	unsigned char		PriceType;
	unsigned char		NasdaqBidTick;
	PyObject* StateMMQuotes;
} NxCoreStateMMQuotesObject;

typedef struct {
	PyObject_HEAD
	unsigned __int64	TotalVolume;
	unsigned int		TickVolume;
	unsigned char		PriceType;
	unsigned char		PriceFlags;
	unsigned char		ConditionFlags;
	unsigned char		VolumeType;
	int					Open;
	int					High;
	int					Low;
	int					Last;
	int					NetChange;
	int					Price;
	int					Threshold;
	int					Tick;
}NxCoreStateTradeObject;

typedef struct {
	PyObject_HEAD
	unsigned int		SpinID;
	unsigned int		IterLimit;
	unsigned int		SubIterLimit;
	unsigned int		IterCount;
	unsigned int		SubIterCount;
} NxCoreSymbolSpinObject;

typedef struct {
	PyObject_HEAD
	int UserData; /* str */
	int DLLVersion; /* str */
	NxDateObject* nxDate; /* NxDate */
	NxTimeObject* nxTime; /* NxTime */
	int ClockUpdateInterval;  /* int */
	int Status;  /* int */
	int StatusData;  /* int */
	const char* StatusDisplay; /* str */
	const char* TapeDisplay;  /* str */
	size_t Module;  /* int */
	size_t ThreadInstance;  /* int */
	const char* PermissionSet;  /* str */
} NxCoreSystemObject;

typedef struct {
	PyObject_HEAD
	unsigned long long  MicrosOfDaySRC;	  // Exchange sending quote/trade. Use NxCoreGetDefinedString(NxST_EXCHANGE,ReportingExg) for text name
	unsigned long long	MicrosOfDayPTP1;
	unsigned long long	MicrosOfDayPTP2;
	unsigned long long	FractionalSize;
	unsigned long long	FractionalTotalVolume;
} NxCore3ExtObject;

typedef struct {
	PyObject_HEAD
	NxCoreExgQuoteObject* ExgQuote;		// 88/88 bytes
	NxCoreMMQuoteObject* MMQuote;		// 48/56 bytes
	NxCoreTradeObject* Trade;			// 88/88 bytes
	NxCoreCategoryObject* Category;		// 12/24 bytes
	NxCoreSymbolChangeObject* SymbolChange;	// 16/32 bytes
	NxCoreSymbolSpinObject* SymbolSpin;		// 20/20 bytes
} NxCoreDataObject;

typedef struct {
	PyObject_HEAD
	NxCoreHeaderObject* coreHeader;
	NxCoreDataObject* coreData;
	unsigned int			MessageType;
	NxCore3ExtObject* pnxCore3Ext;
} NxCoreMessageObject;

typedef struct {
	PyObject_HEAD
	PyObject*			PathnameStrZ;
	unsigned int		FileAttributes;
	unsigned __int64	FileSize;
	NxDateObject*		TapeDate;
	PyObject*			PermSet;
}NxCoreTapeFileObject;

typedef struct {
	PyObject_HEAD
	PyObject*			PathnameStrZ;
	unsigned int		FileAttributes;
	unsigned __int64	FileSize;
	NxDateObject*		BuildDate;
	NxTimeObject*		BuildTime;
	unsigned char		verMajor;
	unsigned char		verMinor;
	unsigned short		verBuild;
}NxCoreAPIDLLFileObject;

static void NxTime_dealloc(NxTimeObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxTime_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxTimeObject* self;
	self = (NxTimeObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->MsOfDay = 0;
		self->Millisecond = 0;
		self->Second = 0;
		self->Minute = 0;
		self->Hour = 0;
		self->TimeZone = 0;
		self->MsResolution = 0;
	}
	return (PyObject*)self;
}

static int NxTime_init(NxTimeObject* self, PyObject* args, PyObject* kwds)
{
	self->MsOfDay = 0;
	self->Millisecond = 0;
	self->Second = 0;
	self->Minute = 0;
	self->Hour = 0;
	self->TimeZone = 0;
	self->MsResolution = 0;
	return 0;
}

static PyMemberDef NxTime_members[] = {
	{ "MsOfDay", T_UINT, offsetof(NxTimeObject, MsOfDay), 0, "Number of milliseconds since start of day -- midnight" },
	{ "Millisecond", T_USHORT, offsetof(NxTimeObject, Millisecond), 0, "Millisecond of second 0-999" },
	{ "Second", T_UBYTE, offsetof(NxTimeObject, Second), 0, "Second of minute 0-59" },
	{ "Minute", T_UBYTE, offsetof(NxTimeObject, Minute), 0, "Mnute of hour 0-59" },
	{ "Hour", T_UBYTE, offsetof(NxTimeObject, Hour), 0, "Hour of day. 0-23" },
	{ "TimeZone", T_BYTE, offsetof(NxTimeObject, TimeZone), 0, "+/- hours to GMT." },
	{ "MsResolution", T_USHORT, offsetof(NxTimeObject, MsResolution), 0, "Millisecond Resolution" },
	{ NULL }  /* Sentinel */
};

static void NxDate_dealloc(NxDateObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxDate_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxDateObject* self;
	self = (NxDateObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->NDays = 0;
		self->Year = 0;
		self->Month = 0;
		self->Day = 0;
		self->DSTIndicator = 0;
		self->DayOfWeek = 0;
		self->DayOfYear = 0;
	}
	return (PyObject*)self;
}

static int NxDate_init(NxDateObject* self, PyObject* args, PyObject* kwds)
{
	self->NDays = 0;
	self->Year = 0;
	self->Month = 0;
	self->Day = 0;
	self->DSTIndicator = 0;
	self->DayOfWeek = 0;
	self->DayOfYear = 0;
	return 0;
}

static PyMemberDef NxDate_members[] = {
	{ "NDays", T_UINT, offsetof(NxDateObject, NDays), 0, "Number of days since Jan 1, 1883. Julian date" },
	{ "Year", T_USHORT, offsetof(NxDateObject, Year), 0, "Current year."},
	{ "Month", T_UBYTE, offsetof(NxDateObject, Month), 0, "Month of year.  1-12 (not zero based)" },
	{ "Day", T_UBYTE, offsetof(NxDateObject, Day), 0, "Day of month. 1-31 (not zero based)" },
	{ "DSTIndicator", T_UBYTE, offsetof(NxDateObject, DSTIndicator), 0, "Daylight Savings Indicator. Values are: NxDATE_DST_UNKNOWN(0), NxDATE_DST_ON(1), NxDATE_DST_OFF(2), NxDATE_DST_ONTODAY(3), and NxDATE_DST_OFFTODAY(4)" },
	{ "DayOfWeek", T_UBYTE, offsetof(NxDateObject, DayOfWeek), 0, "Day of Week. Values are: NxDOW_SUNDAY(0) through NxDOW_SATURDAY(6)" },
	{ "DayOfYear", T_UBYTE, offsetof(NxDateObject, DayOfYear), 0, "Day Of Year" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxTimeType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxTime",			 /* tp_name */
	sizeof(NxTimeObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxTime_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxTime Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,			 /* tp_methods */
	NxTime_members,			 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	(initproc)NxTime_init,	  /* tp_init */
	0,						 /* tp_alloc */
	NxTime_new,				 /* tp_new */
};

static PyTypeObject NxDateType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxDate",			 /* tp_name */
	sizeof(NxDateObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxDate_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxDate Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,			 /* tp_methods */
	NxDate_members,			 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	(initproc)NxDate_init,	  /* tp_init */
	0,						 /* tp_alloc */
	NxDate_new,				 /* tp_new */
};

static void NxCoreSystem_dealloc(NxCoreSystemObject* self)
{
	Py_XDECREF(self->nxDate);
	Py_XDECREF(self->nxTime);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreSystem_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreSystemObject* self;
	self = (NxCoreSystemObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->UserData = 0;
		self->DLLVersion = 0;
		self->nxDate = (NxDateObject*)PyObject_CallObject((PyObject*)&NxDateType, NULL);
		self->nxTime = (NxTimeObject*)PyObject_CallObject((PyObject*)&NxTimeType, NULL);
		self->ClockUpdateInterval = 0;
		self->Status = 0;
		self->StatusData = 0;
		self->StatusDisplay = 0;
		self->TapeDisplay = 0;
		self->Module = 0;
		self->ThreadInstance = 0;
		self->PermissionSet = 0;
	}
	return (PyObject*)self;
}


static PyMemberDef NxCoreSystem_members[] = {
	{ "UserData", T_INT, offsetof(NxCoreSystemObject, UserData), 0, "UserData value passed to NxCoreProcessTape" },
	{ "DLLVersion", T_INT, offsetof(NxCoreSystemObject, DLLVersion), 1, "Version of NxCoreAPI as a 4-byte value. When NxCore API is started from a state file this value will be the version of NxCore API that created the state file" },
	{ "nxDate", T_OBJECT_EX, offsetof(NxCoreSystemObject, nxDate), 1, "Date of tape." },
	{ "nxTime", T_OBJECT_EX, offsetof(NxCoreSystemObject, nxTime), 1, "Time of tape." },
	{ "ClockUpdateInterval", T_INT, offsetof(NxCoreSystemObject, ClockUpdateInterval), 1, "Indicates most significant member of nxTime that changed since the last timestamp. Values are: NxCLOCK_NOCHANGE(0), NxCLOCK_CLOCK(1), NxCLOCK_SECOND(2), NxCLOCK_MINUTE(3), or NxCLOCK_HOUR(4)" },
	{ "Status", T_INT, offsetof(NxCoreSystemObject, Status), 1, "processing status. For values see: nxcoreapi.com/doc/struct_NxCoreSystem.html#Status" },
	{ "StatusData", T_INT, offsetof(NxCoreSystemObject, StatusData), 1, "Additional information depending on Status. For values see: nxcoreapi.com/doc/struct_NxCoreSystem.html#Status" },
	{ "StatusDisplay", T_STRING, offsetof(NxCoreSystemObject, StatusDisplay), 1, "String combining Status and StatusData" },
	{ "TapeDisplay", T_STRING, offsetof(NxCoreSystemObject, TapeDisplay), 1, "String from the header of the tape" },
	{ "Module", T_PYSSIZET, offsetof(NxCoreSystemObject, Module), 1, "Module of the dll for the calling process" },
	{ "ThreadInstance", T_PYSSIZET, offsetof(NxCoreSystemObject, ThreadInstance), 1, "Thread instance identifier" },
	{ "PermissionSet", T_STRING, offsetof(NxCoreSystemObject, PermissionSet), 1, "PermissionSet String \"AA\", etc." },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreSystemType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreSystem",			 /* tp_name */
	sizeof(NxCoreSystemObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreSystem_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreSystem Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,			 /* tp_methods */
	NxCoreSystem_members,			 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreSystem_new,				 /* tp_new */
};

static void NxString_dealloc(NxStringObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxString_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxStringObject* self;
	self = (NxStringObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->UserData1 = 0;
		self->UserData2 = 0;
		self->Atom = 0;
		self->String = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxString_members[] = {
	{ "UserData1", T_INT, offsetof(NxStringObject, UserData1), 0, "First  32-bit user data space" },
	{ "UserData2", T_INT, offsetof(NxStringObject, UserData2), 0, "Second 32-bit user data space" },
	{ "Atom", T_USHORT, offsetof(NxStringObject, Atom), 1, "Unique/sequential/nonzero/constant 16 bit number assigned to the String" },
	{ "String", T_OBJECT_EX, offsetof(NxStringObject, String), 1, "String" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxStringType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxString",			 /* tp_name */
	sizeof(NxStringObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxString_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxString Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxString_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxString_new,				 /* tp_new */
};

static void NxPrice_dealloc(NxPriceObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxPrice_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxPriceObject* self;
	self = (NxPriceObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->PriceType = 0;
		self->Price = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxPrice_members[] = {
	{ "Price", T_INT, offsetof(NxPriceObject, Price), 0, "Price" },
	{ "PriceType", T_UBYTE, offsetof(NxPriceObject, PriceType), 0, "Price Type. For information on how to compute decimal price see: http://nxcoreapi.com/doc/concept_Prices.html" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxPriceType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxPrice",			 /* tp_name */
	sizeof(NxPriceObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxPrice_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxPrice Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxPrice_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxPrice_new,				 /* tp_new */
};

static void StringTableItem_dealloc(StringTableItemObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* StringTableItem_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	StringTableItemObject* self;
	self = (StringTableItemObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->ixTable = 0;
		self->idString = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef StringTableItem_members[] = {
	{ "ixTable", T_UINT, offsetof(StringTableItemObject, ixTable), 0, "Identifier of Table. For values see: http://nxcoreapi.com/doc/reference_Tables.html" },
	{ "idString", T_UINT, offsetof(StringTableItemObject, idString), 0, "The index within the table" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject StringTableItemType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.StringTableItem",			 /* tp_name */
	sizeof(StringTableItemObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)StringTableItem_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"StringTableItem Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	StringTableItem_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	StringTableItem_new,				 /* tp_new */
};

static void NxOptionHdr_dealloc(NxOptionHdrObject* self)
{
	Py_XDECREF(self->nxExpirationDate);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxOptionHdr_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxOptionHdrObject* self;
	self = (NxOptionHdrObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->pnxsDateAndStrike = 0;
		self->pnxsUnderlying = 0;
		self->pnxsSeriesChain = 0;
		self->pnxsSpecialSettle = 0;
		self->exgUnderlying = 0;
		self->contractUnit = 0;
		self->strikePrice = 0;
		self->strikePriceEst = 0;
		self->PutCall = 0;
		self->expirationCycle = 0;
		self->oicStrikeAge = 0;
		self->nxStrikeMatch = 0;
		self->nxExpirationDate = (NxDateObject*)PyObject_CallObject((PyObject*)&NxDateType, NULL);
	}
	return (PyObject*)self;
}

static PyMemberDef NxOptionHdr_members[] = {
	{ "pnxsDateAndStrike", T_OBJECT, offsetof(NxOptionHdrObject, pnxsDateAndStrike), 0, "String contains 2 alpha characters (expire code and strike code)" },
	{ "pnxsUnderlying", T_OBJECT, offsetof(NxOptionHdrObject, pnxsUnderlying), 0, "Underlying Symbol" },
	{ "pnxsSeriesChain", T_OBJECT, offsetof(NxOptionHdrObject, pnxsSeriesChain), 0, "Series Chain" },
	{ "pnxsSpecialSettle", T_OBJECT, offsetof(NxOptionHdrObject, pnxsSpecialSettle), 0, "Special Settlement" },
	{ "exgUnderlying", T_USHORT, offsetof(NxOptionHdrObject, exgUnderlying), 1, "Exchange code of the underlying symbol" },
	{ "contractUnit", T_USHORT, offsetof(NxOptionHdrObject, contractUnit), 1, "Default is 100 (shares,units, etc)" },
	{ "strikePrice", T_INT, offsetof(NxOptionHdrObject, strikePrice), 1, "OPRA sourced strike price. implied 3 decimal places. i.e.	35000 == 35.000 == 35" },
	{ "strikePriceEst", T_INT, offsetof(NxOptionHdrObject, strikePriceEst), 1, "If non-zero, the nxCore server includes the estimated strike price for this option contract" },
	{ "PutCall", T_UBYTE, offsetof(NxOptionHdrObject, PutCall), 1, "1 == put, 0 == call" },
	{ "expirationCycle", T_UBYTE, offsetof(NxOptionHdrObject, expirationCycle), 1, "1 == January cycle, 2 == February cycle, 3 == March cycle" },
	{ "oicStrikeAge", T_UBYTE, offsetof(NxOptionHdrObject, oicStrikeAge), 1, "Number from 0-7. Incremented each trading day the strikePrice is received from OPRA" },
	{ "nxStrikeMatch", T_UBYTE, offsetof(NxOptionHdrObject, nxStrikeMatch), 1, "Number from 0-15 indicating the likelihood that the strikePrice is correct" },
	{ "nxExpirationDate", T_OBJECT_EX, offsetof(NxOptionHdrObject, nxExpirationDate), 1, "The date this option contract expires" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxOptionHdrType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxOptionHdr",			 /* tp_name */
	sizeof(NxOptionHdrObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxOptionHdr_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxOptionHdr Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxOptionHdr_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxOptionHdr_new,				 /* tp_new */
};

static void NxCoreHeader_dealloc(NxCoreHeaderObject* self)
{
	Py_XDECREF(self->nxSessionDate);
	Py_XDECREF(self->nxExgTimestamp);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreHeader_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreHeaderObject* self;
	self = (NxCoreHeaderObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->pnxStringSymbol = 0;
		self->pnxOptionHdr = 0;
		self->nxSessionDate = (NxDateObject*)PyObject_CallObject((PyObject*)&NxDateType, NULL);
		self->nxExgTimestamp = (NxTimeObject*)PyObject_CallObject((PyObject*)&NxTimeType, NULL);
		self->ListedExg = 0;
		self->ReportingExg = 0;
		self->SessionID = 0;
		self->PermissionID = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreHeader_members[] = {
	{ "pnxStringSymbol", T_OBJECT, offsetof(NxCoreHeaderObject, pnxStringSymbol), 0, "NxString containing symbol in NxCore symbology. see: http://nxcoreapi.com/doc/info_SymbolPrefixes.html http://nxcoreapi.com/doc/info_SymbolSuffixes.html" },
	{ "pnxOptionHdr", T_OBJECT, offsetof(NxCoreHeaderObject, pnxOptionHdr), 0, "The option contract information. None if non-option." },
	{ "nxSessionDate", T_OBJECT_EX, offsetof(NxCoreHeaderObject, nxSessionDate), 1, "Date of the Session that the message applies to." },
	{ "nxExgTimestamp", T_OBJECT_EX, offsetof(NxCoreHeaderObject, nxExgTimestamp), 1, "Timestamp sent by the exchange." },
	{ "ListedExg", T_USHORT, offsetof(NxCoreHeaderObject, ListedExg), 1, "Listed or Primary Exchange. Use GetDefinedString(NxST_EXCHANGE,ListedExg) for text name" },
	{ "ReportingExg", T_USHORT, offsetof(NxCoreHeaderObject, ReportingExg), 1, "Exchange sending quote/trade. Use NxCoreGetDefinedString(NxST_EXCHANGE,ReportingExg) for text name" },
	{ "SessionID", T_UBYTE, offsetof(NxCoreHeaderObject, SessionID), 1, "SessionID is used to identify the trading session the message applies to. Most symbols only have one trading session, so the SessionID will remain constant (0)" },
	{ "alignment", T_UBYTE, offsetof(NxCoreHeaderObject, alignment), 1, "unused" },
	{ "PermissionID", T_USHORT, offsetof(NxCoreHeaderObject, PermissionID), 1, "PermissionID is a number assigned by Nanex and pertains to the authorization group that the message belongs to. PermissionIDs are usually a subset of an Exchange. Use NxCoreGetDefinedString(NxST_PERMID,PermissionID) for text name" },
	{ NULL }  /* Sentinel */
};


static PyTypeObject NxCoreHeaderType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreHeader",	 /* tp_name */
	sizeof(NxCoreHeaderObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreHeader_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreHeader Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreHeader_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreHeader_new,				 /* tp_new */
};

static void NxCore3Ext_dealloc(NxCore3ExtObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCore3Ext_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCore3ExtObject* self;
	self = (NxCore3ExtObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->MicrosOfDaySRC = 0;
		self->MicrosOfDayPTP1 = 0;
		self->MicrosOfDayPTP2 = 0;
		self->FractionalSize = 0;
		self->FractionalTotalVolume = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCore3Ext_members[] = {
	{ "MicrosOfDaySRC", T_ULONGLONG, offsetof(NxCore3ExtObject, MicrosOfDaySRC), 1, "Microsecond timestamp from data source, such as CME or SIP. " },
	{ "MicrosOfDayPTP1", T_ULONGLONG, offsetof(NxCore3ExtObject, MicrosOfDayPTP1), 1, "Microsecond timestamp from the participant (exchange). " },
	{ "MicrosOfDayPTP2", T_ULONGLONG, offsetof(NxCore3ExtObject, MicrosOfDayPTP2), 1, "Microsecond timestamp taken from reports. " },
	{ "FractionalSize", T_ULONGLONG, offsetof(NxCore3ExtObject, FractionalSize), 1, "Fractional Size with 6 implied decimal places" },
	{ "FractionalTotalVolume", T_ULONGLONG, offsetof(NxCore3ExtObject, FractionalTotalVolume), 1, "Fractional Volume with 6 implied decimal places" },
	{ NULL }  /* Sentinel */
};


static PyTypeObject NxCore3ExtType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCore3Ext",	 /* tp_name */
	sizeof(NxCore3ExtObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCore3Ext_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCore3Ext Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCore3Ext_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCore3Ext_new,				 /* tp_new */
};

static void NxCoreQuote_dealloc(NxCoreQuoteObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreQuote_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreQuoteObject* self;
	self = (NxCoreQuoteObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->AskSize = 0;
		self->BidSize = 0;
		self->AskSizeChange = 0;
		self->BidSizeChange = 0;
		self->AskPrice = 0;
		self->BidPrice = 0;
		self->AskPriceChange = 0;
		self->BidPriceChange = 0;
		self->PriceType = 0;
		self->Refresh = 0;
		self->QuoteCondition = 0;
		self->NasdaqBidTick = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreQuote_members[] = {
	{ "AskSize", T_INT, offsetof(NxCoreQuoteObject, AskSize), 1, "Ask Size" },
	{ "BidSize", T_INT, offsetof(NxCoreQuoteObject, BidSize), 1, "Bid Size" },
	{ "AskSizeChange", T_INT, offsetof(NxCoreQuoteObject, AskSizeChange), 1, "Ask Size Change" },
	{ "BidSizeChange", T_INT, offsetof(NxCoreQuoteObject, BidSizeChange), 1, "Bid Size Change" },
	{ "AskPrice", T_INT, offsetof(NxCoreQuoteObject, AskPrice), 1, "Ask Price" },
	{ "BidPrice", T_INT, offsetof(NxCoreQuoteObject, BidPrice), 1, "Bid Price" },
	{ "AskPriceChange", T_INT, offsetof(NxCoreQuoteObject, AskPriceChange), 1, "Ask Price Change" },
	{ "BidPriceChange", T_INT, offsetof(NxCoreQuoteObject, BidPriceChange), 1, "Bid Price Change" },
	{ "PriceType", T_UBYTE, offsetof(NxCoreQuoteObject, PriceType), 1, "Price Type. Applies to all prices in the quote. See: http://nxcoreapi.com/doc/concept_Prices.html" },
	{ "Refresh", T_UBYTE, offsetof(NxCoreQuoteObject, Refresh), 1, "Refresh. Set to non-zero if this message is a refresh as opposed to real-time." },
	{ "QuoteCondition", T_UBYTE, offsetof(NxCoreQuoteObject, QuoteCondition), 1, "Quote condition assigned by exchange. Use NxCoreGetDefinedString(NxST_QUOTECONDITION,QuoteCondition) for text name. For values see: http://nxcoreapi.com/doc/info_QuoteConditions.html" },
	{ "NasdaqBidTick", T_UBYTE, offsetof(NxCoreQuoteObject, NasdaqBidTick), 1, "Nasdaq Bid Tick" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreQuoteType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreQuote",			 /* tp_name */
	sizeof(NxCoreQuoteObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreQuote_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreQuote Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreQuote_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreQuote_new,				 /* tp_new */
};

static void NxCoreExgQuote_dealloc(NxCoreExgQuoteObject* self)
{
	Py_XDECREF(self->coreQuote);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreExgQuote_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreExgQuoteObject* self;
	self = (NxCoreExgQuoteObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->coreQuote=(NxCoreQuoteObject*)PyObject_CallObject((PyObject*)&NxCoreQuoteType, NULL);
		self->BestAskPrice=0;
		self->BestBidPrice=0;
		self->BestAskPriceChange=0;
		self->BestBidPriceChange=0;
		self->BestAskSize=0;
		self->BestBidSize=0;
		self->BestAskSizeChange=0;
		self->BestBidSizeChange=0;
		self->BestAskExg=0;
		self->BestBidExg=0;
		self->PrevBestAskExg=0;
		self->PrevBestBidExg=0;
		self->BestAskCondition=0;
		self->BestBidCondition=0;
		self->BBOChangeFlags=0;
		self->ClosingQuoteFlag=0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreExgQuote_members[] = {
	{ "coreQuote", T_OBJECT_EX, offsetof(NxCoreExgQuoteObject, coreQuote), 1, "coreQuote" },
	{ "BestAskPrice", T_INT, offsetof(NxCoreExgQuoteObject, BestAskPrice), 1, "Best Ask Price" },
	{ "BestBidPrice", T_INT, offsetof(NxCoreExgQuoteObject, BestBidPrice), 1, "Best Bid Price" },
	{ "BestAskPriceChange", T_INT, offsetof(NxCoreExgQuoteObject, BestAskPriceChange), 1, "Best Ask Price Change" },
	{ "BestBidPriceChange", T_INT, offsetof(NxCoreExgQuoteObject, BestBidPriceChange), 1, "Best Bid Price Change" },
	{ "BestAskSize", T_INT, offsetof(NxCoreExgQuoteObject, BestAskSize), 1, "Best Ask Size" },
	{ "BestBidSize", T_INT, offsetof(NxCoreExgQuoteObject, BestBidSize), 1, "Best Bid Size" },
	{ "BestAskSizeChange", T_INT, offsetof(NxCoreExgQuoteObject, BestAskSizeChange), 1, "Best Ask Size Change" },
	{ "BestBidSizeChange", T_INT, offsetof(NxCoreExgQuoteObject, BestBidSizeChange), 1, "Best Bid Size Change" },
	{ "BestAskExg", T_USHORT, offsetof(NxCoreExgQuoteObject, BestAskExg), 1, "Best Ask Exg" },
	{ "BestBidExg", T_USHORT, offsetof(NxCoreExgQuoteObject, BestBidExg), 1, "Best Bid Exg" },
	{ "PrevBestAskExg", T_USHORT, offsetof(NxCoreExgQuoteObject, PrevBestAskExg), 1, "Prev Best Ask Exg" },
	{ "PrevBestBidExg", T_USHORT, offsetof(NxCoreExgQuoteObject, PrevBestBidExg), 1, "Prev Best Bid Exg" },
	{ "BestAskCondition", T_UBYTE, offsetof(NxCoreExgQuoteObject, BestAskCondition), 1, "Best Ask Condition" },
	{ "BestBidCondition", T_UBYTE, offsetof(NxCoreExgQuoteObject, BestBidCondition), 1, "Best Bid Condition" },
	{ "BBOChangeFlags", T_UBYTE, offsetof(NxCoreExgQuoteObject, BBOChangeFlags), 1, "bit flags of BBO values changed by current regional quote. For values see: http://nxcoreapi.com/doc/struct_NxCoreExgQuote.html#BBOChangeFlags" },
	{ "ClosingQuoteFlag", T_UBYTE, offsetof(NxCoreExgQuoteObject, ClosingQuoteFlag), 1, "Will be set to 1 if quote represents an official Closing Quote, 0 otherwise" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreExgQuoteType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreExgQuote",			 /* tp_name */
	sizeof(NxCoreExgQuoteObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreExgQuote_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreExgQuote Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreExgQuote_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreExgQuote_new,				 /* tp_new */
};

static void NxCoreMMQuote_dealloc(NxCoreMMQuoteObject* self)
{
	Py_XDECREF(self->coreQuote);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreMMQuote_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreMMQuoteObject* self;
	self = (NxCoreMMQuoteObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->coreQuote = (NxCoreQuoteObject*)PyObject_CallObject((PyObject*)&NxCoreQuoteType, NULL);
		self->pnxStringMarketMaker = 0;
		self->MarketMakerType = 0;
		self->QuoteType = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreMMQuote_members[] = {
	{ "coreQuote", T_OBJECT_EX, offsetof(NxCoreMMQuoteObject, coreQuote), 1, "coreQuote" },
	{ "pnxStringMarketMaker", T_OBJECT, offsetof(NxCoreMMQuoteObject, pnxStringMarketMaker), 1,  "NxString containing either the Market Marker or D0,D1,D2... for level of depth" },
	{ "MarketMakerType", T_UBYTE, offsetof(NxCoreMMQuoteObject, MarketMakerType), 1, "Identify the type of Market Maker" },
	{ "QuoteType", T_UBYTE, offsetof(NxCoreMMQuoteObject, QuoteType), 1, "Identify a special type of quote" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreMMQuoteType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreMMQuote",			 /* tp_name */
	sizeof(NxCoreMMQuoteObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreMMQuote_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreMMQuote Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreMMQuote_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreMMQuote_new,				 /* tp_new */
};

static void NxCTAnalysis_dealloc(NxCTAnalysisObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCTAnalysis_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCTAnalysisObject* self;
	self = (NxCTAnalysisObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->FilterThreshold=0;
		self->Filtered=0;
		self->FilterLevel=0;
		self->SigHiLoType=0;
		self->SigHiLoSeconds=0;
		self->QteMatchDistanceRGN=0;
		self->QteMatchDistanceBBO=0;
		self->QteMatchTypeRGN=0;
		self->QteMatchTypeBBO=0;
		self->QteMatchFlagsRGN=0;
		self->QteMatchFlagsBBO=0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCTAnalysis_members[] = {
	{ "FilterThreshold", T_INT, offsetof(NxCTAnalysisObject, FilterThreshold), 1, "Filter Threshold" },
	{ "Filtered", T_UBYTE, offsetof(NxCTAnalysisObject, Filtered), 1, "Filtered" },
	{ "FilterLevel", T_UBYTE, offsetof(NxCTAnalysisObject, FilterLevel), 1, "Filter Level" },
	{ "SigHiLoType", T_UBYTE, offsetof(NxCTAnalysisObject, SigHiLoType), 1, "Whether this trade price is a significant high or low" },
	{ "alignment", T_UBYTE, offsetof(NxCTAnalysisObject, alignment), 1, "unused" },
	{ "SigHiLoSeconds", T_UINT, offsetof(NxCTAnalysisObject, SigHiLoSeconds), 1, "How much time has elapsed since the price previously traded at the level of SigHiLoType" },
	{ "QteMatchDistanceRGN", T_INT, offsetof(NxCTAnalysisObject, QteMatchDistanceRGN), 1, "Price Difference from QteMatchTypeRGN" },
	{ "QteMatchDistanceBBO", T_INT, offsetof(NxCTAnalysisObject, QteMatchDistanceBBO), 1, "Price Difference from QteMatchTypeBBO" },
	{ "QteMatchTypeRGN", T_UBYTE, offsetof(NxCTAnalysisObject, QteMatchTypeRGN), 1, "Where the trade occured in relation to latest regional quote. For  values see: nxcoreapi.com/doc/struct_NxCTAnalysis.html#QteMatchTypeRGN" },
	{ "QteMatchTypeBBO", T_UBYTE, offsetof(NxCTAnalysisObject, QteMatchTypeBBO), 1, "Where the trade occured in relation to latest NBBO quote. For  values see: nxcoreapi.com/doc/struct_NxCTAnalysis.html#QteMatchTypeBBO" },
	{ "QteMatchFlagsRGN", T_UBYTE, offsetof(NxCTAnalysisObject, QteMatchFlagsRGN), 1, "QteMatchFlagsRGN" },
	{ "QteMatchFlagsBBO", T_UBYTE, offsetof(NxCTAnalysisObject, QteMatchFlagsBBO), 1, "QteMatchFlagsBBO" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCTAnalysisType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCTAnalysis",			 /* tp_name */
	sizeof(NxCTAnalysisObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCTAnalysis_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCTAnalysis Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCTAnalysis_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCTAnalysis_new,				 /* tp_new */
};

static void NxCoreTrade_dealloc(NxCoreTradeObject* self)
{
	Py_XDECREF(self->ExtTradeConditions);
	Py_XDECREF(self->nxAnalysis);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreTrade_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreTradeObject* self;
	self = (NxCoreTradeObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->ExtTradeConditions = PyList_New(4);
		self->nxAnalysis = (NxCTAnalysisObject*)PyObject_CallObject((PyObject*)&NxCTAnalysisType, NULL);
		self->Price=0;
		self->PriceType=0;
		self->PriceFlags=0;
		self->TradeCondition=0;
		self->ConditionFlags=0;
		self->VolumeType=0;
		self->BATECode=0;
		self->Size=0;
		self->ExgSequence=0;
		self->RecordsBack=0;
		self->TotalVolume=0;
		self->TickVolume=0;
		self->Open=0;
		self->High=0;
		self->Low=0;
		self->Last=0;
		self->Tick=0;
		self->NetChange=0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreTrade_members[] = {
	{ "Price", T_INT, offsetof(NxCoreTradeObject, Price), 1, "Price value of this trade record update and is used together with PriceType" },
	{ "PriceType", T_UBYTE, offsetof(NxCoreTradeObject, PriceType), 1, "Determines how to interpret the integer price as a floating point number. See: http://nxcoreapi.com/doc/concept_Prices.html" },
	{ "PriceFlags", T_UBYTE, offsetof(NxCoreTradeObject, PriceFlags), 1, "PriceFlags is a bit mapped entity that indicates the type of trade represented in the update message.For values see : http://nxcoreapi.com/doc/struct_NxCoreTrade.html#PriceFlags" },
	{ "TradeCondition", T_UBYTE, offsetof(NxCoreTradeObject, TradeCondition), 1, "Trade condition assigned by exchange. For values see: http://nxcoreapi.com/doc/info_TradeConditions.html" },
	{ "ConditionFlags", T_UBYTE, offsetof(NxCoreTradeObject, ConditionFlags), 1, "Determines which values the trade is eligible to set. For values see: http://nxcoreapi.com/doc/struct_NxCoreTrade.html#ConditionFlags" },
	{ "VolumeType", T_UBYTE, offsetof(NxCoreTradeObject, VolumeType), 1, "Indicates how to interpret Size field. For values see: http://nxcoreapi.com/doc/struct_NxCoreTrade.html#VolumeType" },
	{ "BATECode", T_UBYTE, offsetof(NxCoreTradeObject, BATECode), 1, "BATECode" },
	{ "Size", T_UINT, offsetof(NxCoreTradeObject, Size), 1, "Size" },
	{ "ExgSequence", T_UINT, offsetof(NxCoreTradeObject, ExgSequence), 1, "Contains the value of the Exchange assigned Sequence number. Exchange Sequence numbers increase in value, though not necessarily in increments of one." },
	{ "RecordsBack", T_UINT, offsetof(NxCoreTradeObject, RecordsBack), 1, "RecordsBack" },
	{ "nxAnalysis", T_OBJECT_EX, offsetof(NxCoreTradeObject, nxAnalysis), 1, "nxAnalysis" },
	{ "TotalVolume", T_ULONGLONG, offsetof(NxCoreTradeObject, TotalVolume), 1, "Cumulative sum of the Size member of all trade updates with the VolumeType NxTVT_INCRVOL(0)" },
	{ "TickVolume", T_UINT, offsetof(NxCoreTradeObject, TickVolume), 1, "Cumulative count of each trade update with the VolumeType NxTVT_INCRVOL(0)" },
	{ "Open", T_INT, offsetof(NxCoreTradeObject, Open), 1, "Open" },
	{ "High", T_INT, offsetof(NxCoreTradeObject, High), 1, "High" },
	{ "Low", T_INT, offsetof(NxCoreTradeObject, Low), 1, "Low" },
	{ "Last", T_INT, offsetof(NxCoreTradeObject, Last), 1, "Last" },
	{ "Tick", T_INT, offsetof(NxCoreTradeObject, Tick), 1, "Price change from the previous trade update that qualified to set the Last" },
	{ "NetChange", T_INT, offsetof(NxCoreTradeObject, NetChange), 1, "Change in value from the Last member and the previous session's close" },
	{ "ExtTradeConditions", T_OBJECT_EX, offsetof(NxCoreTradeObject, ExtTradeConditions), 1, "List of 4 trade conditions. 255 indicates no trade condition for \"slot\"" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreTradeType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreTrade",			 /* tp_name */
	sizeof(NxCoreTradeObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreTrade_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreTrade Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreTrade_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreTrade_new,				 /* tp_new */
};


static void NxCoreSymbolChange_dealloc(NxCoreSymbolChangeObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreSymbolChange_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreSymbolChangeObject* self;
	self = (NxCoreSymbolChangeObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->Status = 0;
		self->StatusChar = 0;
		self->pnxsSymbolOld = 0;
		self->pnxOptionHdrOld = 0;
		self->ListedExgOld = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreSymbolChange_members[] = {
	{ "Status", T_UBYTE, offsetof(NxCoreSymbolChangeObject, Status), 1, "Indicates whether the symbol change is an NxSS_ADD(0), NxSS_DEL(1), or NxSS_MOD(2)" },
	{ "StatusChar", T_CHAR, offsetof(NxCoreSymbolChangeObject, StatusChar), 1, "Indicates whether the symbol change is an 'A'DD, 'D'ELETE, or 'M'ODIFY" },
	{ "pnxsSymbolOld", T_OBJECT_EX, offsetof(NxCoreSymbolChangeObject, pnxsSymbolOld), 1, "Only used for MODIFY messages. Contains the original symbol. Otherwise None" },
	{ "pnxOptionHdrOld", T_OBJECT_EX, offsetof(NxCoreSymbolChangeObject, pnxOptionHdrOld), 1, "Only used for MODIFY messages for option contracts. It contains the original OptionHeader. Otherwise None" },
	{ "ListedExgOld", T_USHORT, offsetof(NxCoreSymbolChangeObject, ListedExgOld), 1, "Only used for MODIFY messages. Contains the original Listed Exchange." },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreSymbolChangeType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreSymbolChange",			 /* tp_name */
	sizeof(NxCoreSymbolChangeObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreSymbolChange_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreSymbolChange Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreSymbolChange_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreSymbolChange_new,				 /* tp_new */
};

static void NxCoreSymbolSpin_dealloc(NxCoreSymbolSpinObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreSymbolSpin_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreSymbolSpinObject* self;
	self = (NxCoreSymbolSpinObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->SpinID = 0;
		self->IterLimit = 0;
		self->SubIterLimit = 0;
		self->IterCount = 0;
		self->SubIterCount = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreSymbolSpin_members[] = {
	{ "SpinID", T_UINT, offsetof(NxCoreSymbolSpinObject, SpinID), 1, "User assignable data member that you can use to pass additional information during the spin, or to identify different spins. The automatic Symbol Spin that occurs near the start of each NxCore Tape set the SpinID value to 0." },
	{ "IterLimit", T_UINT, offsetof(NxCoreSymbolSpinObject, IterLimit), 1, "The upper limit value that IterCount will increment to" },
	{ "SubIterLimit", T_UINT, offsetof(NxCoreSymbolSpinObject, SubIterLimit), 1, "Total number of Options Contracts for Option Series being Iterated" },
	{ "IterCount", T_UINT, offsetof(NxCoreSymbolSpinObject, IterCount), 1, "A zero-based counter that increments every symbol" },
	{ "SubIterCount", T_UINT, offsetof(NxCoreSymbolSpinObject, SubIterCount), 1, "A zero-based counter that increments every contract in an Option Series." },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreSymbolSpinType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreSymbolSpin",			 /* tp_name */
	sizeof(NxCoreSymbolSpinObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreSymbolSpin_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreSymbolSpin Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreSymbolSpin_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreSymbolSpin_new,				 /* tp_new */
};

static void NxCoreCategoryData_dealloc(NxCoreCategoryDataObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreCategoryData_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreCategoryDataObject* self;
	self = (NxCoreCategoryDataObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->i64Bit = 0;
		self->i32Bit = 0;
		self->StringZ = 0;
		self->Double = 0;
		self->nxPrice = (NxPriceObject*)PyObject_CallObject((PyObject*)&NxPriceType, NULL);
		self->nxDate = (NxDateObject*)PyObject_CallObject((PyObject*)&NxDateType, NULL);
		self->nxTime = (NxTimeObject*)PyObject_CallObject((PyObject*)&NxTimeType, NULL);
		self->pnxString = (NxStringObject*)PyObject_CallObject((PyObject*)&NxStringType, NULL);
		self->stringTableItem = (StringTableItemObject*)PyObject_CallObject((PyObject*)&StringTableItemType, NULL);
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreCategoryData_members[] = {
	{ "i64Bit", T_ULONGLONG, offsetof(NxCoreCategoryDataObject, i64Bit), 1, "i64Bit" },
	{ "i32Bit", T_UINT, offsetof(NxCoreCategoryDataObject, i32Bit), 1, "i32Bit" },
	{ "StringZ", T_STRING, offsetof(NxCoreCategoryDataObject, StringZ), 1, "StringZ" },
	{ "Double", T_DOUBLE, offsetof(NxCoreCategoryDataObject, Double), 1, "Double" },
	{ "nxPrice", T_OBJECT_EX, offsetof(NxCoreCategoryDataObject, nxPrice), 1, "nxPrice" },
	{ "nxDate", T_OBJECT_EX, offsetof(NxCoreCategoryDataObject, nxDate), 1, "nxDate" },
	{ "nxTime", T_OBJECT_EX, offsetof(NxCoreCategoryDataObject, nxTime), 1, "nxTime" },
	{ "pnxString", T_OBJECT_EX, offsetof(NxCoreCategoryDataObject, pnxString), 1, "NxString" },
	{ "stringTableItem", T_OBJECT_EX, offsetof(NxCoreCategoryDataObject, stringTableItem), 1, "stringTableItem" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreCategoryDataType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreCategoryData",			 /* tp_name */
	sizeof(NxCoreCategoryDataObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreCategoryData_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreCategoryData Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreCategoryData_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreCategoryData_new,				 /* tp_new */
};

static void NxCategoryField_dealloc(NxCategoryFieldObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCategoryField_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCategoryFieldObject* self;
	self = (NxCategoryFieldObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->FieldName = 0;
		self->FieldInfo = 0;
		self->Set = 0;
		self->FieldType = 0;
		self->data = (NxCoreCategoryDataObject*)PyObject_CallObject((PyObject*)&NxCoreCategoryDataType, NULL);
	}
	return (PyObject*)self;
}

static PyMemberDef NxCategoryField_members[] = {
	{ "FieldName", T_STRING, offsetof(NxCategoryFieldObject, FieldName), 1, "Name of Field" },
	{ "FieldInfo", T_STRING, offsetof(NxCategoryFieldObject, FieldInfo), 1, "Comments about Field. May be None" },
	{ "Set", T_UBYTE, offsetof(NxCategoryFieldObject, Set), 1, "1 if field is populated. 0 if not set" },
	{ "FieldType", T_UBYTE, offsetof(NxCategoryFieldObject, FieldType), 1, "Type of data. For values see: http://nxcoreapi.com/doc/struct_NxCategoryField.html#FieldType" },
	{ "data", T_OBJECT_EX, offsetof(NxCategoryFieldObject, data), 1, "Value of category field. Only one will be populated, corresponding to FieldType." },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCategoryFieldType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCategoryField",			 /* tp_name */
	sizeof(NxCategoryFieldObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCategoryField_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCategoryField Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCategoryField_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCategoryField_new,				 /* tp_new */
};

static void NxCoreCategory_dealloc(NxCoreCategoryObject* self)
{
	for (int i = 0; i < 256; i++) {
		PyObject* pField = PyList_GetItem(self->pnxFields, i);
		Py_XDECREF(pField);
	}
	Py_XDECREF(self->pnxFields);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreCategory_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreCategoryObject* self;
	self = (NxCoreCategoryObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->pnxStringCategory = 0;
		self->NFields = 0;
		self->pnxFields = PyList_New(256);
		for (int i = 0; i < 256; i++) {
			PyObject* pField = PyObject_CallObject((PyObject*)&NxCategoryFieldType, NULL);
			Py_XINCREF(pField);
			PyList_SetItem(self->pnxFields, i, pField);
		}
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreCategory_members[] = {
	{ "pnxStringCategory", T_OBJECT_EX, offsetof(NxCoreCategoryObject, pnxStringCategory), 1, "NxString of category name. Atom is the category ID" },
	{ "pnxFields", T_OBJECT_EX, offsetof(NxCoreCategoryObject, pnxFields), 1, "List of category fields" },
	{ "NFields", T_USHORT, offsetof(NxCoreCategoryObject, NFields), 1, "Number of Fields" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreCategoryType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreCategory",			 /* tp_name */
	sizeof(NxCoreCategoryObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreCategory_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreCategory Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreCategory_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreCategory_new,				 /* tp_new */
};

static void NxCoreData_dealloc(NxCoreDataObject* self)
{
	Py_XDECREF(self->ExgQuote);
	Py_XDECREF(self->MMQuote);
	Py_XDECREF(self->Trade);
	Py_XDECREF(self->Category);
	Py_XDECREF(self->SymbolChange);
	Py_XDECREF(self->SymbolSpin);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreData_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreDataObject* self;
	self = (NxCoreDataObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->ExgQuote = (NxCoreExgQuoteObject*)PyObject_CallObject((PyObject*)&NxCoreExgQuoteType, NULL);
		self->MMQuote = (NxCoreMMQuoteObject*)PyObject_CallObject((PyObject*)&NxCoreMMQuoteType, NULL);
		self->Trade = (NxCoreTradeObject*)PyObject_CallObject((PyObject*)&NxCoreTradeType, NULL);
		self->SymbolChange = (NxCoreSymbolChangeObject*)PyObject_CallObject((PyObject*)&NxCoreSymbolChangeType, NULL);
		self->SymbolSpin = (NxCoreSymbolSpinObject*)PyObject_CallObject((PyObject*)&NxCoreSymbolSpinType, NULL);
		self->Category = (NxCoreCategoryObject*)PyObject_CallObject((PyObject*)&NxCoreCategoryType, NULL);
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreData_members[] = {
	{ "ExgQuote", T_OBJECT_EX, offsetof(NxCoreDataObject, ExgQuote), 1, "Exchange Quote" },
	{ "MMQuote", T_OBJECT_EX, offsetof(NxCoreDataObject, MMQuote), 1, "Market Maker Quote" },
	{ "Trade", T_OBJECT_EX, offsetof(NxCoreDataObject, Trade), 1, "Trade" },
	{ "Category", T_OBJECT, offsetof(NxCoreDataObject, Category), 1, "Category" },
	{ "SymbolChange", T_OBJECT, offsetof(NxCoreDataObject, SymbolChange), 1, "Symbol Change" },
	{ "SymbolSpin", T_OBJECT, offsetof(NxCoreDataObject, SymbolSpin), 1, "Symbol Spin" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreDataType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreData",			 /* tp_name */
	sizeof(NxCoreDataObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreData_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreData Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreData_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreData_new,				 /* tp_new */
};

static void NxCoreMessage_dealloc(NxCoreMessageObject* self)
{
	Py_XDECREF(self->coreHeader);
	Py_XDECREF(self->coreData);
	Py_XDECREF(self->pnxCore3Ext);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreMessage_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreMessageObject* self;
	self = (NxCoreMessageObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->coreHeader = (NxCoreHeaderObject*)PyObject_CallObject((PyObject*)&NxCoreHeaderType, NULL);
		self->coreData = (NxCoreDataObject*)PyObject_CallObject((PyObject*)&NxCoreDataType, NULL);
		self->MessageType = 0;
		self->pnxCore3Ext = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreMessage_members[] = {
	{ "coreHeader", T_OBJECT, offsetof(NxCoreMessageObject, coreHeader), 1, "coreHeader" },
	{ "coreData", T_OBJECT, offsetof(NxCoreMessageObject, coreData), 1, "Content of message" },
	{ "MessageType", T_UINT, offsetof(NxCoreMessageObject, MessageType), 1, "Type of message. For values see: nxcoreapi.com/doc/struct_NxCoreMessage.html#coreHeader" },
	{ "pnxCore3Ext", T_OBJECT, offsetof(NxCoreMessageObject, pnxCore3Ext), 1, "Microsecond timestamps" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreMessageType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreMessage",	 /* tp_name */
	sizeof(NxCoreMessageObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreMessage_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreMessage Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreMessage_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreMessage_new,				 /* tp_new */
};

static void NxCoreStateExgQuote_dealloc(NxCoreStateExgQuoteObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreStateExgQuote_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreStateExgQuoteObject* self;
	self = (NxCoreStateExgQuoteObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->AskPrice = 0;
		self->BidPrice = 0;
		self->AskSize = 0;
		self->BidSize = 0;
		self->ReportingExg = 0;
		self->QuoteCondition = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreStateExgQuote_members[] = {
	{ "AskPrice", T_INT, offsetof(NxCoreStateExgQuoteObject, AskPrice), 1, "Current ask price of ReportingExg" },
	{ "BidPrice", T_INT, offsetof(NxCoreStateExgQuoteObject, BidPrice), 1, "Current bid price of ReportingExg" },
	{ "AskSize", T_INT, offsetof(NxCoreStateExgQuoteObject, AskSize), 1, "Current ask size of ReportingExg" },
	{ "BidSize", T_INT, offsetof(NxCoreStateExgQuoteObject, BidSize), 1, "Current bid size of ReportingExg" },
	{ "ReportingExg", T_USHORT, offsetof(NxCoreStateExgQuoteObject, ReportingExg), 1, "The reporting exchange for this quote. Can be compared against BestAskExg or BestBidExg to determine NBBO" },
	{ "QuoteCondition", T_UBYTE, offsetof(NxCoreStateExgQuoteObject, QuoteCondition), 1, "Quote condition assigned by exchange. For values see: http://nxcoreapi.com/doc/info_QuoteConditions.html" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreStateExgQuoteType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreStateExgQuote",	 /* tp_name */
	sizeof(NxCoreStateExgQuoteObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreStateExgQuote_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreStateExgQuote Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreStateExgQuote_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreStateExgQuote_new,				 /* tp_new */
};

static void NxCoreStateMMQuote_dealloc(NxCoreStateMMQuoteObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreStateMMQuote_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreStateMMQuoteObject* self;
	self = (NxCoreStateMMQuoteObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->AskPrice = 0;
		self->BidPrice = 0;
		self->AskSize = 0;
		self->BidSize = 0;
		self->pnxStringMarketMaker = 0;
		self->MarketMakerType = 0;
		self->QuoteType = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreStateMMQuote_members[] = {
	{ "AskPrice", T_INT, offsetof(NxCoreStateMMQuoteObject, AskPrice), 1, "Current ask price from the market maker identified as pnxStringMarketMaker" },
	{ "BidPrice", T_INT, offsetof(NxCoreStateMMQuoteObject, BidPrice), 1, "Current bsk price from the market maker identified as pnxStringMarketMaker" },
	{ "AskSize", T_INT, offsetof(NxCoreStateMMQuoteObject, AskSize), 1, "Current ask size from the market maker identified as pnxStringMarketMaker" },
	{ "BidSize", T_INT, offsetof(NxCoreStateMMQuoteObject, BidSize), 1, "Current bid size from the market maker identified as pnxStringMarketMaker" },
	{ "pnxStringMarketMaker", T_OBJECT, offsetof(NxCoreStateMMQuoteObject, pnxStringMarketMaker), 1, "NxString containing either the Market Marker or D0,D1,D2... for level of depth" },
	{ "MarketMakerType", T_UBYTE, offsetof(NxCoreStateMMQuoteObject, MarketMakerType), 1, "Identify the type of Market Maker" },
	{ "QuoteType", T_UBYTE, offsetof(NxCoreStateMMQuoteObject, QuoteType), 1, "Identify a special type of quote" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreStateMMQuoteType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreStateMMQuote",	 /* tp_name */
	sizeof(NxCoreStateMMQuoteObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreStateMMQuote_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreStateMMQuote Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreStateMMQuote_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreStateMMQuote_new,				 /* tp_new */
};

static void NxCoreStateExgQuotes_dealloc(NxCoreStateExgQuotesObject* self)
{
	for (int i = 0; i < 24; i++) {
		PyObject* pQuote = PyList_GetItem(self->StateExgQuotes, i);
		Py_XDECREF(pQuote);
	}
	Py_XDECREF(self->StateExgQuotes);
	Py_TYPE(self)->tp_free((PyObject*)self);

}

static PyObject* NxCoreStateExgQuotes_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreStateExgQuotesObject* self;
	self = (NxCoreStateExgQuotesObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->StateQuoteCount = 0;
		self->PriceType = 0;
		self->NasdaqBidTick = 0;
		self->BestAskExg = 0;
		self->BestBidExg = 0;
		self->StateExgQuotes = PyList_New(24);
		for (int i = 0; i < 24; i++) {
			PyObject* pQuote = PyObject_CallObject((PyObject*)&NxCoreStateExgQuoteType, NULL);
			Py_XINCREF(pQuote);
			PyList_SetItem(self->StateExgQuotes, i, pQuote);
		}
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreStateExgQuotes_members[] = {
	{ "StateQuoteCount", T_USHORT, offsetof(NxCoreStateExgQuotesObject, StateQuoteCount), 1, "Number of items in StateExgQuotes" },
	{ "PriceType", T_UBYTE, offsetof(NxCoreStateExgQuotesObject, PriceType), 1, "Price type to use for all prices in StateExgQuotes" },
	{ "NasdaqBidTick", T_UBYTE, offsetof(NxCoreStateExgQuotesObject, NasdaqBidTick), 1, "NasdaqBidTick" },
	{ "BestAskExg", T_USHORT, offsetof(NxCoreStateExgQuotesObject, BestAskExg), 1, "The ReportingExg in one of the items in StateExgQuotes that has the best ask" },
	{ "BestBidExg", T_USHORT, offsetof(NxCoreStateExgQuotesObject, BestBidExg), 1, "The ReportingExg in one of the items in StateExgQuotes that has the best bid" },
	{ "StateExgQuotes", T_OBJECT, offsetof(NxCoreStateExgQuotesObject, StateExgQuotes), 1, "List of NxCoreStateExgQuote" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreStateExgQuotesType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreStateExgQuotes",	 /* tp_name */
	sizeof(NxCoreStateExgQuotesObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreStateExgQuotes_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreStateExgQuotes Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreStateExgQuotes_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreStateExgQuotes_new,				 /* tp_new */
};

static void NxCoreStateMMQuotes_dealloc(NxCoreStateMMQuotesObject* self)
{
	for (int i = 0; i < 512; i++) {
		PyObject* pQuote = PyList_GetItem(self->StateMMQuotes, i);
		Py_XDECREF(pQuote);
	}
	Py_XDECREF(self->StateMMQuotes);
	Py_TYPE(self)->tp_free((PyObject*)self);

}

static PyObject* NxCoreStateMMQuotes_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreStateMMQuotesObject* self;
	self = (NxCoreStateMMQuotesObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->StateQuoteCount = 0;
		self->PriceType = 0;
		self->NasdaqBidTick = 0;
		self->StateMMQuotes = PyList_New(512);
		for (int i = 0; i < 512; i++) {
			PyObject* pQuote = PyObject_CallObject((PyObject*)&NxCoreStateMMQuoteType, NULL);
			Py_XINCREF(pQuote);
			PyList_SetItem(self->StateMMQuotes, i, pQuote);
		}
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreStateMMQuotes_members[] = {
	{ "StateQuoteCount", T_USHORT, offsetof(NxCoreStateMMQuotesObject, StateQuoteCount), 1, "Number of items in StateMMQuotes" },
	{ "PriceType", T_UBYTE, offsetof(NxCoreStateMMQuotesObject, PriceType), 1, "Price type to use for all prices in StateMMQuotes" },
	{ "NasdaqBidTick", T_UBYTE, offsetof(NxCoreStateMMQuotesObject, NasdaqBidTick), 1, "NasdaqBidTick" },
	{ "StateMMQuotes", T_OBJECT, offsetof(NxCoreStateMMQuotesObject, StateMMQuotes), 1, "List of NxCoreStateMMQuote" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreStateMMQuotesType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreStateMMQuotes",	 /* tp_name */
	sizeof(NxCoreStateMMQuotesObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreStateMMQuotes_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreStateMMQuotes Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreStateMMQuotes_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreStateMMQuotes_new,				 /* tp_new */
};


static void NxCoreStateTrade_dealloc(NxCoreStateTradeObject* self)
{
	Py_TYPE(self)->tp_free((PyObject*)self);

}

static PyObject* NxCoreStateTrade_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreStateTradeObject* self;
	self = (NxCoreStateTradeObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->TotalVolume = 0;
		self->TickVolume = 0;
		self->PriceType = 0;
		self->PriceFlags = 0;
		self->ConditionFlags = 0;
		self->VolumeType = 0;
		self->Open = 0;
		self->High = 0;
		self->Low = 0;
		self->Last = 0;
		self->NetChange = 0;
		self->Price = 0;
		self->Threshold = 0;
		self->Tick = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreStateTrade_members[] = {
	{ "TotalVolume", T_ULONGLONG, offsetof(NxCoreStateTradeObject, TotalVolume), 1, "Total Volume" },
	{ "TickVolume", T_UINT, offsetof(NxCoreStateTradeObject, TickVolume), 1, "Tick Volume" },
	{ "PriceType", T_UBYTE, offsetof(NxCoreStateTradeObject, PriceType), 1, "Price Type" },
	{ "PriceFlags", T_UBYTE, offsetof(NxCoreStateTradeObject, PriceFlags), 1, "Price Flags" },
	{ "ConditionFlags", T_UBYTE, offsetof(NxCoreStateTradeObject, ConditionFlags), 1, "Condition Flags" },
	{ "VolumeType", T_UBYTE, offsetof(NxCoreStateTradeObject, VolumeType), 1, "Volume Type" },
	{ "Open", T_INT, offsetof(NxCoreStateTradeObject, Open), 1, "Open" },
	{ "High", T_INT, offsetof(NxCoreStateTradeObject, High), 1, "High" },
	{ "Low", T_INT, offsetof(NxCoreStateTradeObject, Low), 1, "Low" },
	{ "Last", T_INT, offsetof(NxCoreStateTradeObject, Last), 1, "Last" },
	{ "NetChange", T_INT, offsetof(NxCoreStateTradeObject, NetChange), 1, "Net Change" },
	{ "Price", T_INT, offsetof(NxCoreStateTradeObject, Price), 1, "Price" },
	{ "Threshold", T_INT, offsetof(NxCoreStateTradeObject, Threshold), 1, "Threshold" },
	{ "Tick", T_INT, offsetof(NxCoreStateTradeObject, Tick), 1, "Tick" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreStateTradeType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreStateTrade",	 /* tp_name */
	sizeof(NxCoreStateTradeObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreStateTrade_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreStateTrade Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreStateTrade_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreStateTrade_new,				 /* tp_new */
};



static void NxCoreTapeFile_dealloc(NxCoreTapeFileObject* self)
{
	Py_XDECREF(self->TapeDate);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreTapeFile_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreTapeFileObject* self;
	self = (NxCoreTapeFileObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->PathnameStrZ = 0;
		self->TapeDate = (NxDateObject*)PyObject_CallObject((PyObject*)&NxDateType, NULL);
		self->FileAttributes = 0;
		self->FileSize = 0;
		self->PermSet = 0;
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreTapeFile_members[] = {
	{ "PathnameStrZ", T_OBJECT, offsetof(NxCoreTapeFileObject, PathnameStrZ), 1, "Full path to the tape" },
	{ "FileAttributes", T_UINT, offsetof(NxCoreTapeFileObject, FileAttributes), 1, "File attributes" },
	{ "FileSize", T_ULONGLONG, offsetof(NxCoreTapeFileObject, FileSize), 1, "Size of the tape file in bytes" },
	{ "TapeDate", T_OBJECT, offsetof(NxCoreTapeFileObject, TapeDate), 1, "Date of the tape file" },
	{ "PermSet", T_OBJECT, offsetof(NxCoreTapeFileObject, PermSet), 1, "Permission set of the tape file" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreTapeFileType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreTapeFile",	 /* tp_name */
	sizeof(NxCoreTapeFileObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreTapeFile_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreTapeFile Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreTapeFile_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreTapeFile_new,				 /* tp_new */
};

static void NxCoreAPIDLLFile_dealloc(NxCoreAPIDLLFileObject* self)
{
	Py_XDECREF(self->BuildDate);
	Py_XDECREF(self->BuildTime);
	Py_TYPE(self)->tp_free((PyObject*)self);
}

static PyObject* NxCoreAPIDLLFile_new(PyTypeObject* type, PyObject* args, PyObject* kwds)//, PyObject *args, PyObject *kwds
{
	NxCoreAPIDLLFileObject* self;
	self = (NxCoreAPIDLLFileObject*)type->tp_alloc(type, 0);
	if (self != NULL) {
		self->PathnameStrZ = 0;
		self->FileAttributes = 0;
		self->FileSize = 0;
		self->verMajor = 0;
		self->verMinor = 0;
		self->verBuild = 0;
		self->BuildDate=(NxDateObject*)PyObject_CallObject((PyObject*)&NxDateType, NULL);
		self->BuildTime = (NxTimeObject*)PyObject_CallObject((PyObject*)&NxTimeType, NULL);
	}
	return (PyObject*)self;
}

static PyMemberDef NxCoreAPIDLLFile_members[] = {
	{ "PathnameStrZ", T_OBJECT, offsetof(NxCoreAPIDLLFileObject, PathnameStrZ), 1, "Full path to the DLL" },
	{ "FileAttributes", T_UINT, offsetof(NxCoreAPIDLLFileObject, FileAttributes), 1, "File attributes" },
	{ "FileSize", T_ULONGLONG, offsetof(NxCoreAPIDLLFileObject, FileSize), 1, "Size of the DLL file in bytes" },
	{ "BuildDate", T_OBJECT, offsetof(NxCoreAPIDLLFileObject, BuildDate), 1, "Build date of the DLL" },
	{ "BuildTime", T_OBJECT, offsetof(NxCoreAPIDLLFileObject, BuildTime), 1, "Build time of the DLL" },
	{ "verMajor", T_UBYTE, offsetof(NxCoreAPIDLLFileObject, verMajor), 1, "Major version of the DLL" },
	{ "verMinor", T_UBYTE, offsetof(NxCoreAPIDLLFileObject, verMinor), 1, "Minor version of the DLL" },
	{ "verBuild", T_USHORT, offsetof(NxCoreAPIDLLFileObject, verBuild), 1, "Build version of the DLL" },
	{ NULL }  /* Sentinel */
};

static PyTypeObject NxCoreAPIDLLFileType = {
	PyVarObject_HEAD_INIT(NULL, 0)
	"NxCore.NxCoreAPIDLLFile",	 /* tp_name */
	sizeof(NxCoreAPIDLLFileObject), /* tp_basicsize */
	0,						 /* tp_itemsize */
	(destructor)NxCoreAPIDLLFile_dealloc,						 /* tp_dealloc */
	0,						 /* tp_print */
	0,						 /* tp_getattr */
	0,						 /* tp_setattr */
	0,						 /* tp_reserved */
	0,						 /* tp_repr */
	0,						 /* tp_as_number */
	0,						 /* tp_as_sequence */
	0,						 /* tp_as_mapping */
	0,						 /* tp_hash  */
	0,						 /* tp_call */
	0,						 /* tp_str */
	0,						 /* tp_getattro */
	0,						 /* tp_setattro */
	0,						 /* tp_as_buffer */
	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,		/* tp_flags */
	"NxCoreAPIDLLFile Object",		   /* tp_doc */
	0,						 /* tp_traverse */
	0,						 /* tp_clear */
	0,						 /* tp_richcompare */
	0,						 /* tp_weaklistoffset */
	0,						 /* tp_iter */
	0,						 /* tp_iternext */
	0,						 /* tp_methods */
	NxCoreAPIDLLFile_members,		 /* tp_members */
	0,						 /* tp_getset */
	0,						 /* tp_base */
	0,						 /* tp_dict */
	0,						 /* tp_descr_get */
	0,						 /* tp_descr_set */
	0,						 /* tp_dictoffset */
	0,	  /* tp_init */
	0,						 /* tp_alloc */
	NxCoreAPIDLLFile_new,				 /* tp_new */
};
