#!/usr/bin/env python
# -*- coding: utf-8 -*-


from ctypes import *

from .ctp_enum import *

class CThostFtdcDisseminationField(Structure):
    """信息分发"""
    _fields_ = [
        # 序列系列号
        ("SequenceSeries", c_int32),
        # 序列号
        ("SequenceNo", c_int32),
        ]

    def getSequenceSeries(self):
        return self.SequenceSeries
    def getSequenceNo(self):
        return self.SequenceNo

    def __str__(self):
        return 'SequenceSeries = {0}, SequenceNo = {1}'.format(self.SequenceSeries, self.SequenceNo)

    @property
    def __dict__(self):
        return {'SequenceSeries': self.SequenceSeries,'SequenceNo': self.SequenceNo}

    def clone(self):
        obj=CThostFtdcDisseminationField()
        obj.SequenceSeries=self.SequenceSeries
        obj.SequenceNo=self.SequenceNo
        return obj

class CThostFtdcReqUserLoginField(Structure):
    """用户登录请求"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 密码
        ("Password", c_char*41),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 接口端产品信息
        ("InterfaceProductInfo", c_char*11),
        # 协议信息
        ("ProtocolInfo", c_char*11),
        # Mac地址
        ("MacAddress", c_char*21),
        # 动态密码
        ("OneTimePassword", c_char*41),
        # 终端IP地址
        ("ClientIPAddress", c_char*16),
        # 登录备注
        ("LoginRemark", c_char*36),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getInterfaceProductInfo(self):
        return str(self.InterfaceProductInfo, 'GB2312')

    def getProtocolInfo(self):
        return str(self.ProtocolInfo, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def getOneTimePassword(self):
        return str(self.OneTimePassword, 'GB2312')

    def getClientIPAddress(self):
        return str(self.ClientIPAddress, 'GB2312')

    def getLoginRemark(self):
        return str(self.LoginRemark, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', BrokerID = \'{1}\', UserID = \'{2}\', Password = \'{3}\', UserProductInfo = \'{4}\', InterfaceProductInfo = \'{5}\', ProtocolInfo = \'{6}\', MacAddress = \'{7}\', OneTimePassword = \'{8}\', ClientIPAddress = \'{9}\', LoginRemark = \'{10}\''.format(str(self.TradingDay, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.Password, 'GB2312'), str(self.UserProductInfo, 'GB2312'), str(self.InterfaceProductInfo, 'GB2312'), str(self.ProtocolInfo, 'GB2312'), str(self.MacAddress, 'GB2312'), str(self.OneTimePassword, 'GB2312'), str(self.ClientIPAddress, 'GB2312'), str(self.LoginRemark, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'InterfaceProductInfo': str(self.InterfaceProductInfo, 'GB2312'),'ProtocolInfo': str(self.ProtocolInfo, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'OneTimePassword': str(self.OneTimePassword, 'GB2312'),'ClientIPAddress': str(self.ClientIPAddress, 'GB2312'),'LoginRemark': str(self.LoginRemark, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqUserLoginField()
        obj.TradingDay=self.TradingDay
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.Password=self.Password
        obj.UserProductInfo=self.UserProductInfo
        obj.InterfaceProductInfo=self.InterfaceProductInfo
        obj.ProtocolInfo=self.ProtocolInfo
        obj.MacAddress=self.MacAddress
        obj.OneTimePassword=self.OneTimePassword
        obj.ClientIPAddress=self.ClientIPAddress
        obj.LoginRemark=self.LoginRemark
        return obj

class CThostFtdcRspUserLoginField(Structure):
    """用户登录应答"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 登录成功时间
        ("LoginTime", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 交易系统名称
        ("SystemName", c_char*41),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 最大报单引用
        ("MaxOrderRef", c_char*13),
        # 上期所时间
        ("SHFETime", c_char*9),
        # 大商所时间
        ("DCETime", c_char*9),
        # 郑商所时间
        ("CZCETime", c_char*9),
        # 中金所时间
        ("FFEXTime", c_char*9),
        # 能源中心时间
        ("INETime", c_char*9),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getLoginTime(self):
        return str(self.LoginTime, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getSystemName(self):
        return str(self.SystemName, 'GB2312')
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getMaxOrderRef(self):
        return str(self.MaxOrderRef, 'GB2312')

    def getSHFETime(self):
        return str(self.SHFETime, 'GB2312')

    def getDCETime(self):
        return str(self.DCETime, 'GB2312')

    def getCZCETime(self):
        return str(self.CZCETime, 'GB2312')

    def getFFEXTime(self):
        return str(self.FFEXTime, 'GB2312')

    def getINETime(self):
        return str(self.INETime, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', LoginTime = \'{1}\', BrokerID = \'{2}\', UserID = \'{3}\', SystemName = \'{4}\', FrontID = {5}, SessionID = {6}, MaxOrderRef = \'{7}\', SHFETime = \'{8}\', DCETime = \'{9}\', CZCETime = \'{10}\', FFEXTime = \'{11}\', INETime = \'{12}\''.format(str(self.TradingDay, 'GB2312'), str(self.LoginTime, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.SystemName, 'GB2312'), self.FrontID, self.SessionID, str(self.MaxOrderRef, 'GB2312'), str(self.SHFETime, 'GB2312'), str(self.DCETime, 'GB2312'), str(self.CZCETime, 'GB2312'), str(self.FFEXTime, 'GB2312'), str(self.INETime, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'LoginTime': str(self.LoginTime, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'SystemName': str(self.SystemName, 'GB2312'),'FrontID': self.FrontID,'SessionID': self.SessionID,'MaxOrderRef': str(self.MaxOrderRef, 'GB2312'),'SHFETime': str(self.SHFETime, 'GB2312'),'DCETime': str(self.DCETime, 'GB2312'),'CZCETime': str(self.CZCETime, 'GB2312'),'FFEXTime': str(self.FFEXTime, 'GB2312'),'INETime': str(self.INETime, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspUserLoginField()
        obj.TradingDay=self.TradingDay
        obj.LoginTime=self.LoginTime
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.SystemName=self.SystemName
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.MaxOrderRef=self.MaxOrderRef
        obj.SHFETime=self.SHFETime
        obj.DCETime=self.DCETime
        obj.CZCETime=self.CZCETime
        obj.FFEXTime=self.FFEXTime
        obj.INETime=self.INETime
        return obj

class CThostFtdcUserLogoutField(Structure):
    """用户登出请求"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcUserLogoutField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        return obj

class CThostFtdcForceUserLogoutField(Structure):
    """强制交易员退出"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcForceUserLogoutField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        return obj

class CThostFtdcReqAuthenticateField(Structure):
    """客户端认证请求"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 认证码
        ("AuthCode", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getAuthCode(self):
        return str(self.AuthCode, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', UserProductInfo = \'{2}\', AuthCode = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.UserProductInfo, 'GB2312'), str(self.AuthCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'AuthCode': str(self.AuthCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqAuthenticateField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.UserProductInfo=self.UserProductInfo
        obj.AuthCode=self.AuthCode
        return obj

class CThostFtdcRspAuthenticateField(Structure):
    """客户端认证响应"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', UserProductInfo = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.UserProductInfo, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'UserProductInfo': str(self.UserProductInfo, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspAuthenticateField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.UserProductInfo=self.UserProductInfo
        return obj

class CThostFtdcAuthenticationInfoField(Structure):
    """客户端认证信息"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 认证信息
        ("AuthInfo", c_char*129),
        # 是否为认证结果
        ("IsResult", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getAuthInfo(self):
        return str(self.AuthInfo, 'GB2312')
    def getIsResult(self):
        return self.IsResult

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', UserProductInfo = \'{2}\', AuthInfo = \'{3}\', IsResult = {4}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.UserProductInfo, 'GB2312'), str(self.AuthInfo, 'GB2312'), self.IsResult)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'AuthInfo': str(self.AuthInfo, 'GB2312'),'IsResult': self.IsResult}

    def clone(self):
        obj=CThostFtdcAuthenticationInfoField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.UserProductInfo=self.UserProductInfo
        obj.AuthInfo=self.AuthInfo
        obj.IsResult=self.IsResult
        return obj

class CThostFtdcRspUserLogin2Field(Structure):
    """用户登录应答2"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 登录成功时间
        ("LoginTime", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 交易系统名称
        ("SystemName", c_char*41),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 最大报单引用
        ("MaxOrderRef", c_char*13),
        # 上期所时间
        ("SHFETime", c_char*9),
        # 大商所时间
        ("DCETime", c_char*9),
        # 郑商所时间
        ("CZCETime", c_char*9),
        # 中金所时间
        ("FFEXTime", c_char*9),
        # 能源中心时间
        ("INETime", c_char*9),
        # 随机串
        ("RandomString", c_char*17),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getLoginTime(self):
        return str(self.LoginTime, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getSystemName(self):
        return str(self.SystemName, 'GB2312')
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getMaxOrderRef(self):
        return str(self.MaxOrderRef, 'GB2312')

    def getSHFETime(self):
        return str(self.SHFETime, 'GB2312')

    def getDCETime(self):
        return str(self.DCETime, 'GB2312')

    def getCZCETime(self):
        return str(self.CZCETime, 'GB2312')

    def getFFEXTime(self):
        return str(self.FFEXTime, 'GB2312')

    def getINETime(self):
        return str(self.INETime, 'GB2312')

    def getRandomString(self):
        return str(self.RandomString, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', LoginTime = \'{1}\', BrokerID = \'{2}\', UserID = \'{3}\', SystemName = \'{4}\', FrontID = {5}, SessionID = {6}, MaxOrderRef = \'{7}\', SHFETime = \'{8}\', DCETime = \'{9}\', CZCETime = \'{10}\', FFEXTime = \'{11}\', INETime = \'{12}\', RandomString = \'{13}\''.format(str(self.TradingDay, 'GB2312'), str(self.LoginTime, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.SystemName, 'GB2312'), self.FrontID, self.SessionID, str(self.MaxOrderRef, 'GB2312'), str(self.SHFETime, 'GB2312'), str(self.DCETime, 'GB2312'), str(self.CZCETime, 'GB2312'), str(self.FFEXTime, 'GB2312'), str(self.INETime, 'GB2312'), str(self.RandomString, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'LoginTime': str(self.LoginTime, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'SystemName': str(self.SystemName, 'GB2312'),'FrontID': self.FrontID,'SessionID': self.SessionID,'MaxOrderRef': str(self.MaxOrderRef, 'GB2312'),'SHFETime': str(self.SHFETime, 'GB2312'),'DCETime': str(self.DCETime, 'GB2312'),'CZCETime': str(self.CZCETime, 'GB2312'),'FFEXTime': str(self.FFEXTime, 'GB2312'),'INETime': str(self.INETime, 'GB2312'),'RandomString': str(self.RandomString, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspUserLogin2Field()
        obj.TradingDay=self.TradingDay
        obj.LoginTime=self.LoginTime
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.SystemName=self.SystemName
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.MaxOrderRef=self.MaxOrderRef
        obj.SHFETime=self.SHFETime
        obj.DCETime=self.DCETime
        obj.CZCETime=self.CZCETime
        obj.FFEXTime=self.FFEXTime
        obj.INETime=self.INETime
        obj.RandomString=self.RandomString
        return obj

class CThostFtdcTransferHeaderField(Structure):
    """银期转帐报文头"""
    _fields_ = [
        # 版本号，常量，1.0
        ("Version", c_char*4),
        # 交易代码，必填
        ("TradeCode", c_char*7),
        # 交易日期，必填，格式：yyyymmdd
        ("TradeDate", c_char*9),
        # 交易时间，必填，格式：hhmmss
        ("TradeTime", c_char*9),
        # 发起方流水号，N/A
        ("TradeSerial", c_char*9),
        # 期货公司代码，必填
        ("FutureID", c_char*11),
        # 银行代码，根据查询银行得到，必填
        ("BankID", c_char*4),
        # 银行分中心代码，根据查询银行得到，必填
        ("BankBrchID", c_char*5),
        # 操作员，N/A
        ("OperNo", c_char*17),
        # 交易设备类型，N/A
        ("DeviceID", c_char*3),
        # 记录数，N/A
        ("RecordNum", c_char*7),
        # 会话编号，N/A
        ("SessionID", c_int32),
        # 请求编号，N/A
        ("RequestID", c_int32),
        ]


    def getVersion(self):
        return str(self.Version, 'GB2312')

    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getTradeSerial(self):
        return str(self.TradeSerial, 'GB2312')

    def getFutureID(self):
        return str(self.FutureID, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBrchID(self):
        return str(self.BankBrchID, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getRecordNum(self):
        return str(self.RecordNum, 'GB2312')
    def getSessionID(self):
        return self.SessionID
    def getRequestID(self):
        return self.RequestID

    def __str__(self):
        return 'Version = \'{0}\', TradeCode = \'{1}\', TradeDate = \'{2}\', TradeTime = \'{3}\', TradeSerial = \'{4}\', FutureID = \'{5}\', BankID = \'{6}\', BankBrchID = \'{7}\', OperNo = \'{8}\', DeviceID = \'{9}\', RecordNum = \'{10}\', SessionID = {11}, RequestID = {12}'.format(str(self.Version, 'GB2312'), str(self.TradeCode, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.TradeSerial, 'GB2312'), str(self.FutureID, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBrchID, 'GB2312'), str(self.OperNo, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.RecordNum, 'GB2312'), self.SessionID, self.RequestID)

    @property
    def __dict__(self):
        return {'Version': str(self.Version, 'GB2312'),'TradeCode': str(self.TradeCode, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'TradeSerial': str(self.TradeSerial, 'GB2312'),'FutureID': str(self.FutureID, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBrchID': str(self.BankBrchID, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'RecordNum': str(self.RecordNum, 'GB2312'),'SessionID': self.SessionID,'RequestID': self.RequestID}

    def clone(self):
        obj=CThostFtdcTransferHeaderField()
        obj.Version=self.Version
        obj.TradeCode=self.TradeCode
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.TradeSerial=self.TradeSerial
        obj.FutureID=self.FutureID
        obj.BankID=self.BankID
        obj.BankBrchID=self.BankBrchID
        obj.OperNo=self.OperNo
        obj.DeviceID=self.DeviceID
        obj.RecordNum=self.RecordNum
        obj.SessionID=self.SessionID
        obj.RequestID=self.RequestID
        return obj

class CThostFtdcTransferBankToFutureReqField(Structure):
    """银行资金转期货请求，TradeCode=202001"""
    _fields_ = [
        # 期货资金账户
        ("FutureAccount", c_char*13),
        # 密码标志
        ("FuturePwdFlag", c_char),
        # 密码
        ("FutureAccPwd", c_char*17),
        # 转账金额
        ("TradeAmt", c_double),
        # 客户手续费
        ("CustFee", c_double),
        # 币种：RMB-人民币 USD-美圆 HKD-港元
        ("CurrencyCode", c_char*4),
        ]


    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')
    def getFuturePwdFlag(self):
        return FuturePwdFlagType(ord(self.FuturePwdFlag))

    def getFutureAccPwd(self):
        return str(self.FutureAccPwd, 'GB2312')
    def getTradeAmt(self):
        return self.TradeAmt
    def getCustFee(self):
        return self.CustFee

    def getCurrencyCode(self):
        return str(self.CurrencyCode, 'GB2312')

    def __str__(self):
        return 'FutureAccount = \'{0}\', FuturePwdFlag = FuturePwdFlagType.{1}, FutureAccPwd = \'{2}\', TradeAmt = {3}, CustFee = {4}, CurrencyCode = \'{5}\''.format(str(self.FutureAccount, 'GB2312'), '' if ord(self.FuturePwdFlag) == 0 else FuturePwdFlagType(ord(self.FuturePwdFlag)).name, str(self.FutureAccPwd, 'GB2312'), self.TradeAmt, self.CustFee, str(self.CurrencyCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'FutureAccount': str(self.FutureAccount, 'GB2312'),'FuturePwdFlag': '' if ord(self.FuturePwdFlag) == 0 else FuturePwdFlagType(ord(self.FuturePwdFlag)).name,'FutureAccPwd': str(self.FutureAccPwd, 'GB2312'),'TradeAmt': self.TradeAmt,'CustFee': self.CustFee,'CurrencyCode': str(self.CurrencyCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferBankToFutureReqField()
        obj.FutureAccount=self.FutureAccount
        obj.FuturePwdFlag=self.FuturePwdFlag
        obj.FutureAccPwd=self.FutureAccPwd
        obj.TradeAmt=self.TradeAmt
        obj.CustFee=self.CustFee
        obj.CurrencyCode=self.CurrencyCode
        return obj

class CThostFtdcTransferBankToFutureRspField(Structure):
    """银行资金转期货请求响应"""
    _fields_ = [
        # 响应代码
        ("RetCode", c_char*5),
        # 响应信息
        ("RetInfo", c_char*129),
        # 资金账户
        ("FutureAccount", c_char*13),
        # 转帐金额
        ("TradeAmt", c_double),
        # 应收客户手续费
        ("CustFee", c_double),
        # 币种
        ("CurrencyCode", c_char*4),
        ]


    def getRetCode(self):
        return str(self.RetCode, 'GB2312')

    def getRetInfo(self):
        return str(self.RetInfo, 'GB2312')

    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')
    def getTradeAmt(self):
        return self.TradeAmt
    def getCustFee(self):
        return self.CustFee

    def getCurrencyCode(self):
        return str(self.CurrencyCode, 'GB2312')

    def __str__(self):
        return 'RetCode = \'{0}\', RetInfo = \'{1}\', FutureAccount = \'{2}\', TradeAmt = {3}, CustFee = {4}, CurrencyCode = \'{5}\''.format(str(self.RetCode, 'GB2312'), str(self.RetInfo, 'GB2312'), str(self.FutureAccount, 'GB2312'), self.TradeAmt, self.CustFee, str(self.CurrencyCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'RetCode': str(self.RetCode, 'GB2312'),'RetInfo': str(self.RetInfo, 'GB2312'),'FutureAccount': str(self.FutureAccount, 'GB2312'),'TradeAmt': self.TradeAmt,'CustFee': self.CustFee,'CurrencyCode': str(self.CurrencyCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferBankToFutureRspField()
        obj.RetCode=self.RetCode
        obj.RetInfo=self.RetInfo
        obj.FutureAccount=self.FutureAccount
        obj.TradeAmt=self.TradeAmt
        obj.CustFee=self.CustFee
        obj.CurrencyCode=self.CurrencyCode
        return obj

class CThostFtdcTransferFutureToBankReqField(Structure):
    """期货资金转银行请求，TradeCode=202002"""
    _fields_ = [
        # 期货资金账户
        ("FutureAccount", c_char*13),
        # 密码标志
        ("FuturePwdFlag", c_char),
        # 密码
        ("FutureAccPwd", c_char*17),
        # 转账金额
        ("TradeAmt", c_double),
        # 客户手续费
        ("CustFee", c_double),
        # 币种：RMB-人民币 USD-美圆 HKD-港元
        ("CurrencyCode", c_char*4),
        ]


    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')
    def getFuturePwdFlag(self):
        return FuturePwdFlagType(ord(self.FuturePwdFlag))

    def getFutureAccPwd(self):
        return str(self.FutureAccPwd, 'GB2312')
    def getTradeAmt(self):
        return self.TradeAmt
    def getCustFee(self):
        return self.CustFee

    def getCurrencyCode(self):
        return str(self.CurrencyCode, 'GB2312')

    def __str__(self):
        return 'FutureAccount = \'{0}\', FuturePwdFlag = FuturePwdFlagType.{1}, FutureAccPwd = \'{2}\', TradeAmt = {3}, CustFee = {4}, CurrencyCode = \'{5}\''.format(str(self.FutureAccount, 'GB2312'), '' if ord(self.FuturePwdFlag) == 0 else FuturePwdFlagType(ord(self.FuturePwdFlag)).name, str(self.FutureAccPwd, 'GB2312'), self.TradeAmt, self.CustFee, str(self.CurrencyCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'FutureAccount': str(self.FutureAccount, 'GB2312'),'FuturePwdFlag': '' if ord(self.FuturePwdFlag) == 0 else FuturePwdFlagType(ord(self.FuturePwdFlag)).name,'FutureAccPwd': str(self.FutureAccPwd, 'GB2312'),'TradeAmt': self.TradeAmt,'CustFee': self.CustFee,'CurrencyCode': str(self.CurrencyCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferFutureToBankReqField()
        obj.FutureAccount=self.FutureAccount
        obj.FuturePwdFlag=self.FuturePwdFlag
        obj.FutureAccPwd=self.FutureAccPwd
        obj.TradeAmt=self.TradeAmt
        obj.CustFee=self.CustFee
        obj.CurrencyCode=self.CurrencyCode
        return obj

class CThostFtdcTransferFutureToBankRspField(Structure):
    """期货资金转银行请求响应"""
    _fields_ = [
        # 响应代码
        ("RetCode", c_char*5),
        # 响应信息
        ("RetInfo", c_char*129),
        # 资金账户
        ("FutureAccount", c_char*13),
        # 转帐金额
        ("TradeAmt", c_double),
        # 应收客户手续费
        ("CustFee", c_double),
        # 币种
        ("CurrencyCode", c_char*4),
        ]


    def getRetCode(self):
        return str(self.RetCode, 'GB2312')

    def getRetInfo(self):
        return str(self.RetInfo, 'GB2312')

    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')
    def getTradeAmt(self):
        return self.TradeAmt
    def getCustFee(self):
        return self.CustFee

    def getCurrencyCode(self):
        return str(self.CurrencyCode, 'GB2312')

    def __str__(self):
        return 'RetCode = \'{0}\', RetInfo = \'{1}\', FutureAccount = \'{2}\', TradeAmt = {3}, CustFee = {4}, CurrencyCode = \'{5}\''.format(str(self.RetCode, 'GB2312'), str(self.RetInfo, 'GB2312'), str(self.FutureAccount, 'GB2312'), self.TradeAmt, self.CustFee, str(self.CurrencyCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'RetCode': str(self.RetCode, 'GB2312'),'RetInfo': str(self.RetInfo, 'GB2312'),'FutureAccount': str(self.FutureAccount, 'GB2312'),'TradeAmt': self.TradeAmt,'CustFee': self.CustFee,'CurrencyCode': str(self.CurrencyCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferFutureToBankRspField()
        obj.RetCode=self.RetCode
        obj.RetInfo=self.RetInfo
        obj.FutureAccount=self.FutureAccount
        obj.TradeAmt=self.TradeAmt
        obj.CustFee=self.CustFee
        obj.CurrencyCode=self.CurrencyCode
        return obj

class CThostFtdcTransferQryBankReqField(Structure):
    """查询银行资金请求，TradeCode=204002"""
    _fields_ = [
        # 期货资金账户
        ("FutureAccount", c_char*13),
        # 密码标志
        ("FuturePwdFlag", c_char),
        # 密码
        ("FutureAccPwd", c_char*17),
        # 币种：RMB-人民币 USD-美圆 HKD-港元
        ("CurrencyCode", c_char*4),
        ]


    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')
    def getFuturePwdFlag(self):
        return FuturePwdFlagType(ord(self.FuturePwdFlag))

    def getFutureAccPwd(self):
        return str(self.FutureAccPwd, 'GB2312')

    def getCurrencyCode(self):
        return str(self.CurrencyCode, 'GB2312')

    def __str__(self):
        return 'FutureAccount = \'{0}\', FuturePwdFlag = FuturePwdFlagType.{1}, FutureAccPwd = \'{2}\', CurrencyCode = \'{3}\''.format(str(self.FutureAccount, 'GB2312'), '' if ord(self.FuturePwdFlag) == 0 else FuturePwdFlagType(ord(self.FuturePwdFlag)).name, str(self.FutureAccPwd, 'GB2312'), str(self.CurrencyCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'FutureAccount': str(self.FutureAccount, 'GB2312'),'FuturePwdFlag': '' if ord(self.FuturePwdFlag) == 0 else FuturePwdFlagType(ord(self.FuturePwdFlag)).name,'FutureAccPwd': str(self.FutureAccPwd, 'GB2312'),'CurrencyCode': str(self.CurrencyCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferQryBankReqField()
        obj.FutureAccount=self.FutureAccount
        obj.FuturePwdFlag=self.FuturePwdFlag
        obj.FutureAccPwd=self.FutureAccPwd
        obj.CurrencyCode=self.CurrencyCode
        return obj

class CThostFtdcTransferQryBankRspField(Structure):
    """查询银行资金请求响应"""
    _fields_ = [
        # 响应代码
        ("RetCode", c_char*5),
        # 响应信息
        ("RetInfo", c_char*129),
        # 资金账户
        ("FutureAccount", c_char*13),
        # 银行余额
        ("TradeAmt", c_double),
        # 银行可用余额
        ("UseAmt", c_double),
        # 银行可取余额
        ("FetchAmt", c_double),
        # 币种
        ("CurrencyCode", c_char*4),
        ]


    def getRetCode(self):
        return str(self.RetCode, 'GB2312')

    def getRetInfo(self):
        return str(self.RetInfo, 'GB2312')

    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')
    def getTradeAmt(self):
        return self.TradeAmt
    def getUseAmt(self):
        return self.UseAmt
    def getFetchAmt(self):
        return self.FetchAmt

    def getCurrencyCode(self):
        return str(self.CurrencyCode, 'GB2312')

    def __str__(self):
        return 'RetCode = \'{0}\', RetInfo = \'{1}\', FutureAccount = \'{2}\', TradeAmt = {3}, UseAmt = {4}, FetchAmt = {5}, CurrencyCode = \'{6}\''.format(str(self.RetCode, 'GB2312'), str(self.RetInfo, 'GB2312'), str(self.FutureAccount, 'GB2312'), self.TradeAmt, self.UseAmt, self.FetchAmt, str(self.CurrencyCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'RetCode': str(self.RetCode, 'GB2312'),'RetInfo': str(self.RetInfo, 'GB2312'),'FutureAccount': str(self.FutureAccount, 'GB2312'),'TradeAmt': self.TradeAmt,'UseAmt': self.UseAmt,'FetchAmt': self.FetchAmt,'CurrencyCode': str(self.CurrencyCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferQryBankRspField()
        obj.RetCode=self.RetCode
        obj.RetInfo=self.RetInfo
        obj.FutureAccount=self.FutureAccount
        obj.TradeAmt=self.TradeAmt
        obj.UseAmt=self.UseAmt
        obj.FetchAmt=self.FetchAmt
        obj.CurrencyCode=self.CurrencyCode
        return obj

class CThostFtdcTransferQryDetailReqField(Structure):
    """查询银行交易明细请求，TradeCode=204999"""
    _fields_ = [
        # 期货资金账户
        ("FutureAccount", c_char*13),
        ]


    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')

    def __str__(self):
        return 'FutureAccount = \'{0}\''.format(str(self.FutureAccount, 'GB2312'))

    @property
    def __dict__(self):
        return {'FutureAccount': str(self.FutureAccount, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferQryDetailReqField()
        obj.FutureAccount=self.FutureAccount
        return obj

class CThostFtdcTransferQryDetailRspField(Structure):
    """查询银行交易明细请求响应"""
    _fields_ = [
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 交易代码
        ("TradeCode", c_char*7),
        # 期货流水号
        ("FutureSerial", c_int32),
        # 期货公司代码
        ("FutureID", c_char*11),
        # 资金帐号
        ("FutureAccount", c_char*22),
        # 银行流水号
        ("BankSerial", c_int32),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分中心代码
        ("BankBrchID", c_char*5),
        # 银行账号
        ("BankAccount", c_char*41),
        # 证件号码
        ("CertCode", c_char*21),
        # 货币代码
        ("CurrencyCode", c_char*4),
        # 发生金额
        ("TxAmount", c_double),
        # 有效标志
        ("Flag", c_char),
        ]


    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')
    def getFutureSerial(self):
        return self.FutureSerial

    def getFutureID(self):
        return str(self.FutureID, 'GB2312')

    def getFutureAccount(self):
        return str(self.FutureAccount, 'GB2312')
    def getBankSerial(self):
        return self.BankSerial

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBrchID(self):
        return str(self.BankBrchID, 'GB2312')

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getCertCode(self):
        return str(self.CertCode, 'GB2312')

    def getCurrencyCode(self):
        return str(self.CurrencyCode, 'GB2312')
    def getTxAmount(self):
        return self.TxAmount
    def getFlag(self):
        return TransferValidFlagType(ord(self.Flag))

    def __str__(self):
        return 'TradeDate = \'{0}\', TradeTime = \'{1}\', TradeCode = \'{2}\', FutureSerial = {3}, FutureID = \'{4}\', FutureAccount = \'{5}\', BankSerial = {6}, BankID = \'{7}\', BankBrchID = \'{8}\', BankAccount = \'{9}\', CertCode = \'{10}\', CurrencyCode = \'{11}\', TxAmount = {12}, Flag = TransferValidFlagType.{13}'.format(str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.TradeCode, 'GB2312'), self.FutureSerial, str(self.FutureID, 'GB2312'), str(self.FutureAccount, 'GB2312'), self.BankSerial, str(self.BankID, 'GB2312'), str(self.BankBrchID, 'GB2312'), str(self.BankAccount, 'GB2312'), str(self.CertCode, 'GB2312'), str(self.CurrencyCode, 'GB2312'), self.TxAmount, '' if ord(self.Flag) == 0 else TransferValidFlagType(ord(self.Flag)).name)

    @property
    def __dict__(self):
        return {'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'TradeCode': str(self.TradeCode, 'GB2312'),'FutureSerial': self.FutureSerial,'FutureID': str(self.FutureID, 'GB2312'),'FutureAccount': str(self.FutureAccount, 'GB2312'),'BankSerial': self.BankSerial,'BankID': str(self.BankID, 'GB2312'),'BankBrchID': str(self.BankBrchID, 'GB2312'),'BankAccount': str(self.BankAccount, 'GB2312'),'CertCode': str(self.CertCode, 'GB2312'),'CurrencyCode': str(self.CurrencyCode, 'GB2312'),'TxAmount': self.TxAmount,'Flag': '' if ord(self.Flag) == 0 else TransferValidFlagType(ord(self.Flag)).name}

    def clone(self):
        obj=CThostFtdcTransferQryDetailRspField()
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.TradeCode=self.TradeCode
        obj.FutureSerial=self.FutureSerial
        obj.FutureID=self.FutureID
        obj.FutureAccount=self.FutureAccount
        obj.BankSerial=self.BankSerial
        obj.BankID=self.BankID
        obj.BankBrchID=self.BankBrchID
        obj.BankAccount=self.BankAccount
        obj.CertCode=self.CertCode
        obj.CurrencyCode=self.CurrencyCode
        obj.TxAmount=self.TxAmount
        obj.Flag=self.Flag
        return obj

class CThostFtdcRspInfoField(Structure):
    """响应信息"""
    _fields_ = [
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]

    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'ErrorID = {0}, ErrorMsg = \'{1}\''.format(self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspInfoField()
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcExchangeField(Structure):
    """交易所"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所名称
        ("ExchangeName", c_char*61),
        # 交易所属性
        ("ExchangeProperty", c_char),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExchangeName(self):
        return str(self.ExchangeName, 'GB2312')
    def getExchangeProperty(self):
        return ExchangePropertyType(ord(self.ExchangeProperty))

    def __str__(self):
        return 'ExchangeID = \'{0}\', ExchangeName = \'{1}\', ExchangeProperty = ExchangePropertyType.{2}'.format(str(self.ExchangeID, 'GB2312'), str(self.ExchangeName, 'GB2312'), '' if ord(self.ExchangeProperty) == 0 else ExchangePropertyType(ord(self.ExchangeProperty)).name)

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExchangeName': str(self.ExchangeName, 'GB2312'),'ExchangeProperty': '' if ord(self.ExchangeProperty) == 0 else ExchangePropertyType(ord(self.ExchangeProperty)).name}

    def clone(self):
        obj=CThostFtdcExchangeField()
        obj.ExchangeID=self.ExchangeID
        obj.ExchangeName=self.ExchangeName
        obj.ExchangeProperty=self.ExchangeProperty
        return obj

class CThostFtdcProductField(Structure):
    """产品"""
    _fields_ = [
        # 产品代码
        ("ProductID", c_char*31),
        # 产品名称
        ("ProductName", c_char*21),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 产品类型
        ("ProductClass", c_char),
        # 合约数量乘数
        ("VolumeMultiple", c_int32),
        # 最小变动价位
        ("PriceTick", c_double),
        # 市价单最大下单量
        ("MaxMarketOrderVolume", c_int32),
        # 市价单最小下单量
        ("MinMarketOrderVolume", c_int32),
        # 限价单最大下单量
        ("MaxLimitOrderVolume", c_int32),
        # 限价单最小下单量
        ("MinLimitOrderVolume", c_int32),
        # 持仓类型
        ("PositionType", c_char),
        # 持仓日期类型
        ("PositionDateType", c_char),
        # 平仓处理类型
        ("CloseDealType", c_char),
        # 交易币种类型
        ("TradeCurrencyID", c_char*4),
        # 质押资金可用范围
        ("MortgageFundUseRange", c_char),
        # 交易所产品代码
        ("ExchangeProductID", c_char*31),
        # 合约基础商品乘数
        ("UnderlyingMultiple", c_double),
        ]


    def getProductID(self):
        return str(self.ProductID, 'GB2312')

    def getProductName(self):
        return str(self.ProductName, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getProductClass(self):
        return ProductClassType(ord(self.ProductClass))
    def getVolumeMultiple(self):
        return self.VolumeMultiple
    def getPriceTick(self):
        return self.PriceTick
    def getMaxMarketOrderVolume(self):
        return self.MaxMarketOrderVolume
    def getMinMarketOrderVolume(self):
        return self.MinMarketOrderVolume
    def getMaxLimitOrderVolume(self):
        return self.MaxLimitOrderVolume
    def getMinLimitOrderVolume(self):
        return self.MinLimitOrderVolume
    def getPositionType(self):
        return PositionTypeType(ord(self.PositionType))
    def getPositionDateType(self):
        return PositionDateTypeType(ord(self.PositionDateType))
    def getCloseDealType(self):
        return CloseDealTypeType(ord(self.CloseDealType))

    def getTradeCurrencyID(self):
        return str(self.TradeCurrencyID, 'GB2312')
    def getMortgageFundUseRange(self):
        return MortgageFundUseRangeType(ord(self.MortgageFundUseRange))

    def getExchangeProductID(self):
        return str(self.ExchangeProductID, 'GB2312')
    def getUnderlyingMultiple(self):
        return self.UnderlyingMultiple

    def __str__(self):
        return 'ProductID = \'{0}\', ProductName = \'{1}\', ExchangeID = \'{2}\', ProductClass = ProductClassType.{3}, VolumeMultiple = {4}, PriceTick = {5}, MaxMarketOrderVolume = {6}, MinMarketOrderVolume = {7}, MaxLimitOrderVolume = {8}, MinLimitOrderVolume = {9}, PositionType = PositionTypeType.{10}, PositionDateType = PositionDateTypeType.{11}, CloseDealType = CloseDealTypeType.{12}, TradeCurrencyID = \'{13}\', MortgageFundUseRange = MortgageFundUseRangeType.{14}, ExchangeProductID = \'{15}\', UnderlyingMultiple = {16}'.format(str(self.ProductID, 'GB2312'), str(self.ProductName, 'GB2312'), str(self.ExchangeID, 'GB2312'), '' if ord(self.ProductClass) == 0 else ProductClassType(ord(self.ProductClass)).name, self.VolumeMultiple, self.PriceTick, self.MaxMarketOrderVolume, self.MinMarketOrderVolume, self.MaxLimitOrderVolume, self.MinLimitOrderVolume, '' if ord(self.PositionType) == 0 else PositionTypeType(ord(self.PositionType)).name, '' if ord(self.PositionDateType) == 0 else PositionDateTypeType(ord(self.PositionDateType)).name, '' if ord(self.CloseDealType) == 0 else CloseDealTypeType(ord(self.CloseDealType)).name, str(self.TradeCurrencyID, 'GB2312'), '' if ord(self.MortgageFundUseRange) == 0 else MortgageFundUseRangeType(ord(self.MortgageFundUseRange)).name, str(self.ExchangeProductID, 'GB2312'), self.UnderlyingMultiple)

    @property
    def __dict__(self):
        return {'ProductID': str(self.ProductID, 'GB2312'),'ProductName': str(self.ProductName, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ProductClass': '' if ord(self.ProductClass) == 0 else ProductClassType(ord(self.ProductClass)).name,'VolumeMultiple': self.VolumeMultiple,'PriceTick': self.PriceTick,'MaxMarketOrderVolume': self.MaxMarketOrderVolume,'MinMarketOrderVolume': self.MinMarketOrderVolume,'MaxLimitOrderVolume': self.MaxLimitOrderVolume,'MinLimitOrderVolume': self.MinLimitOrderVolume,'PositionType': '' if ord(self.PositionType) == 0 else PositionTypeType(ord(self.PositionType)).name,'PositionDateType': '' if ord(self.PositionDateType) == 0 else PositionDateTypeType(ord(self.PositionDateType)).name,'CloseDealType': '' if ord(self.CloseDealType) == 0 else CloseDealTypeType(ord(self.CloseDealType)).name,'TradeCurrencyID': str(self.TradeCurrencyID, 'GB2312'),'MortgageFundUseRange': '' if ord(self.MortgageFundUseRange) == 0 else MortgageFundUseRangeType(ord(self.MortgageFundUseRange)).name,'ExchangeProductID': str(self.ExchangeProductID, 'GB2312'),'UnderlyingMultiple': self.UnderlyingMultiple}

    def clone(self):
        obj=CThostFtdcProductField()
        obj.ProductID=self.ProductID
        obj.ProductName=self.ProductName
        obj.ExchangeID=self.ExchangeID
        obj.ProductClass=self.ProductClass
        obj.VolumeMultiple=self.VolumeMultiple
        obj.PriceTick=self.PriceTick
        obj.MaxMarketOrderVolume=self.MaxMarketOrderVolume
        obj.MinMarketOrderVolume=self.MinMarketOrderVolume
        obj.MaxLimitOrderVolume=self.MaxLimitOrderVolume
        obj.MinLimitOrderVolume=self.MinLimitOrderVolume
        obj.PositionType=self.PositionType
        obj.PositionDateType=self.PositionDateType
        obj.CloseDealType=self.CloseDealType
        obj.TradeCurrencyID=self.TradeCurrencyID
        obj.MortgageFundUseRange=self.MortgageFundUseRange
        obj.ExchangeProductID=self.ExchangeProductID
        obj.UnderlyingMultiple=self.UnderlyingMultiple
        return obj

class CThostFtdcInstrumentField(Structure):
    """合约"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约名称
        ("InstrumentName", c_char*21),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 产品代码
        ("ProductID", c_char*31),
        # 产品类型
        ("ProductClass", c_char),
        # 交割年份
        ("DeliveryYear", c_int32),
        # 交割月
        ("DeliveryMonth", c_int32),
        # 市价单最大下单量
        ("MaxMarketOrderVolume", c_int32),
        # 市价单最小下单量
        ("MinMarketOrderVolume", c_int32),
        # 限价单最大下单量
        ("MaxLimitOrderVolume", c_int32),
        # 限价单最小下单量
        ("MinLimitOrderVolume", c_int32),
        # 合约数量乘数
        ("VolumeMultiple", c_int32),
        # 最小变动价位
        ("PriceTick", c_double),
        # 创建日
        ("CreateDate", c_char*9),
        # 上市日
        ("OpenDate", c_char*9),
        # 到期日
        ("ExpireDate", c_char*9),
        # 开始交割日
        ("StartDelivDate", c_char*9),
        # 结束交割日
        ("EndDelivDate", c_char*9),
        # 合约生命周期状态
        ("InstLifePhase", c_char),
        # 当前是否交易
        ("IsTrading", c_int32),
        # 持仓类型
        ("PositionType", c_char),
        # 持仓日期类型
        ("PositionDateType", c_char),
        # 多头保证金率
        ("LongMarginRatio", c_double),
        # 空头保证金率
        ("ShortMarginRatio", c_double),
        # 是否使用大额单边保证金算法
        ("MaxMarginSideAlgorithm", c_char),
        # 基础商品代码
        ("UnderlyingInstrID", c_char*31),
        # 执行价
        ("StrikePrice", c_double),
        # 期权类型
        ("OptionsType", c_char),
        # 合约基础商品乘数
        ("UnderlyingMultiple", c_double),
        # 组合类型
        ("CombinationType", c_char),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInstrumentName(self):
        return str(self.InstrumentName, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getProductID(self):
        return str(self.ProductID, 'GB2312')
    def getProductClass(self):
        return ProductClassType(ord(self.ProductClass))
    def getDeliveryYear(self):
        return self.DeliveryYear
    def getDeliveryMonth(self):
        return self.DeliveryMonth
    def getMaxMarketOrderVolume(self):
        return self.MaxMarketOrderVolume
    def getMinMarketOrderVolume(self):
        return self.MinMarketOrderVolume
    def getMaxLimitOrderVolume(self):
        return self.MaxLimitOrderVolume
    def getMinLimitOrderVolume(self):
        return self.MinLimitOrderVolume
    def getVolumeMultiple(self):
        return self.VolumeMultiple
    def getPriceTick(self):
        return self.PriceTick

    def getCreateDate(self):
        return str(self.CreateDate, 'GB2312')

    def getOpenDate(self):
        return str(self.OpenDate, 'GB2312')

    def getExpireDate(self):
        return str(self.ExpireDate, 'GB2312')

    def getStartDelivDate(self):
        return str(self.StartDelivDate, 'GB2312')

    def getEndDelivDate(self):
        return str(self.EndDelivDate, 'GB2312')
    def getInstLifePhase(self):
        return InstLifePhaseType(ord(self.InstLifePhase))
    def getIsTrading(self):
        return self.IsTrading
    def getPositionType(self):
        return PositionTypeType(ord(self.PositionType))
    def getPositionDateType(self):
        return PositionDateTypeType(ord(self.PositionDateType))
    def getLongMarginRatio(self):
        return self.LongMarginRatio
    def getShortMarginRatio(self):
        return self.ShortMarginRatio
    def getMaxMarginSideAlgorithm(self):
        return MaxMarginSideAlgorithmType(ord(self.MaxMarginSideAlgorithm))

    def getUnderlyingInstrID(self):
        return str(self.UnderlyingInstrID, 'GB2312')
    def getStrikePrice(self):
        return self.StrikePrice
    def getOptionsType(self):
        return OptionsTypeType(ord(self.OptionsType))
    def getUnderlyingMultiple(self):
        return self.UnderlyingMultiple
    def getCombinationType(self):
        return CombinationTypeType(ord(self.CombinationType))

    def __str__(self):
        return 'InstrumentID = \'{0}\', ExchangeID = \'{1}\', InstrumentName = \'{2}\', ExchangeInstID = \'{3}\', ProductID = \'{4}\', ProductClass = ProductClassType.{5}, DeliveryYear = {6}, DeliveryMonth = {7}, MaxMarketOrderVolume = {8}, MinMarketOrderVolume = {9}, MaxLimitOrderVolume = {10}, MinLimitOrderVolume = {11}, VolumeMultiple = {12}, PriceTick = {13}, CreateDate = \'{14}\', OpenDate = \'{15}\', ExpireDate = \'{16}\', StartDelivDate = \'{17}\', EndDelivDate = \'{18}\', InstLifePhase = InstLifePhaseType.{19}, IsTrading = {20}, PositionType = PositionTypeType.{21}, PositionDateType = PositionDateTypeType.{22}, LongMarginRatio = {23}, ShortMarginRatio = {24}, MaxMarginSideAlgorithm = MaxMarginSideAlgorithmType.{25}, UnderlyingInstrID = \'{26}\', StrikePrice = {27}, OptionsType = OptionsTypeType.{28}, UnderlyingMultiple = {29}, CombinationType = CombinationTypeType.{30}'.format(str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InstrumentName, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.ProductID, 'GB2312'), '' if ord(self.ProductClass) == 0 else ProductClassType(ord(self.ProductClass)).name, self.DeliveryYear, self.DeliveryMonth, self.MaxMarketOrderVolume, self.MinMarketOrderVolume, self.MaxLimitOrderVolume, self.MinLimitOrderVolume, self.VolumeMultiple, self.PriceTick, str(self.CreateDate, 'GB2312'), str(self.OpenDate, 'GB2312'), str(self.ExpireDate, 'GB2312'), str(self.StartDelivDate, 'GB2312'), str(self.EndDelivDate, 'GB2312'), '' if ord(self.InstLifePhase) == 0 else InstLifePhaseType(ord(self.InstLifePhase)).name, self.IsTrading, '' if ord(self.PositionType) == 0 else PositionTypeType(ord(self.PositionType)).name, '' if ord(self.PositionDateType) == 0 else PositionDateTypeType(ord(self.PositionDateType)).name, self.LongMarginRatio, self.ShortMarginRatio, '' if ord(self.MaxMarginSideAlgorithm) == 0 else MaxMarginSideAlgorithmType(ord(self.MaxMarginSideAlgorithm)).name, str(self.UnderlyingInstrID, 'GB2312'), self.StrikePrice, '' if ord(self.OptionsType) == 0 else OptionsTypeType(ord(self.OptionsType)).name, self.UnderlyingMultiple, '' if ord(self.CombinationType) == 0 else CombinationTypeType(ord(self.CombinationType)).name)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InstrumentName': str(self.InstrumentName, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'ProductID': str(self.ProductID, 'GB2312'),'ProductClass': '' if ord(self.ProductClass) == 0 else ProductClassType(ord(self.ProductClass)).name,'DeliveryYear': self.DeliveryYear,'DeliveryMonth': self.DeliveryMonth,'MaxMarketOrderVolume': self.MaxMarketOrderVolume,'MinMarketOrderVolume': self.MinMarketOrderVolume,'MaxLimitOrderVolume': self.MaxLimitOrderVolume,'MinLimitOrderVolume': self.MinLimitOrderVolume,'VolumeMultiple': self.VolumeMultiple,'PriceTick': self.PriceTick,'CreateDate': str(self.CreateDate, 'GB2312'),'OpenDate': str(self.OpenDate, 'GB2312'),'ExpireDate': str(self.ExpireDate, 'GB2312'),'StartDelivDate': str(self.StartDelivDate, 'GB2312'),'EndDelivDate': str(self.EndDelivDate, 'GB2312'),'InstLifePhase': '' if ord(self.InstLifePhase) == 0 else InstLifePhaseType(ord(self.InstLifePhase)).name,'IsTrading': self.IsTrading,'PositionType': '' if ord(self.PositionType) == 0 else PositionTypeType(ord(self.PositionType)).name,'PositionDateType': '' if ord(self.PositionDateType) == 0 else PositionDateTypeType(ord(self.PositionDateType)).name,'LongMarginRatio': self.LongMarginRatio,'ShortMarginRatio': self.ShortMarginRatio,'MaxMarginSideAlgorithm': '' if ord(self.MaxMarginSideAlgorithm) == 0 else MaxMarginSideAlgorithmType(ord(self.MaxMarginSideAlgorithm)).name,'UnderlyingInstrID': str(self.UnderlyingInstrID, 'GB2312'),'StrikePrice': self.StrikePrice,'OptionsType': '' if ord(self.OptionsType) == 0 else OptionsTypeType(ord(self.OptionsType)).name,'UnderlyingMultiple': self.UnderlyingMultiple,'CombinationType': '' if ord(self.CombinationType) == 0 else CombinationTypeType(ord(self.CombinationType)).name}

    def clone(self):
        obj=CThostFtdcInstrumentField()
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InstrumentName=self.InstrumentName
        obj.ExchangeInstID=self.ExchangeInstID
        obj.ProductID=self.ProductID
        obj.ProductClass=self.ProductClass
        obj.DeliveryYear=self.DeliveryYear
        obj.DeliveryMonth=self.DeliveryMonth
        obj.MaxMarketOrderVolume=self.MaxMarketOrderVolume
        obj.MinMarketOrderVolume=self.MinMarketOrderVolume
        obj.MaxLimitOrderVolume=self.MaxLimitOrderVolume
        obj.MinLimitOrderVolume=self.MinLimitOrderVolume
        obj.VolumeMultiple=self.VolumeMultiple
        obj.PriceTick=self.PriceTick
        obj.CreateDate=self.CreateDate
        obj.OpenDate=self.OpenDate
        obj.ExpireDate=self.ExpireDate
        obj.StartDelivDate=self.StartDelivDate
        obj.EndDelivDate=self.EndDelivDate
        obj.InstLifePhase=self.InstLifePhase
        obj.IsTrading=self.IsTrading
        obj.PositionType=self.PositionType
        obj.PositionDateType=self.PositionDateType
        obj.LongMarginRatio=self.LongMarginRatio
        obj.ShortMarginRatio=self.ShortMarginRatio
        obj.MaxMarginSideAlgorithm=self.MaxMarginSideAlgorithm
        obj.UnderlyingInstrID=self.UnderlyingInstrID
        obj.StrikePrice=self.StrikePrice
        obj.OptionsType=self.OptionsType
        obj.UnderlyingMultiple=self.UnderlyingMultiple
        obj.CombinationType=self.CombinationType
        return obj

class CThostFtdcBrokerField(Structure):
    """经纪公司"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 经纪公司简称
        ("BrokerAbbr", c_char*9),
        # 经纪公司名称
        ("BrokerName", c_char*81),
        # 是否活跃
        ("IsActive", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerAbbr(self):
        return str(self.BrokerAbbr, 'GB2312')

    def getBrokerName(self):
        return str(self.BrokerName, 'GB2312')
    def getIsActive(self):
        return self.IsActive

    def __str__(self):
        return 'BrokerID = \'{0}\', BrokerAbbr = \'{1}\', BrokerName = \'{2}\', IsActive = {3}'.format(str(self.BrokerID, 'GB2312'), str(self.BrokerAbbr, 'GB2312'), str(self.BrokerName, 'GB2312'), self.IsActive)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerAbbr': str(self.BrokerAbbr, 'GB2312'),'BrokerName': str(self.BrokerName, 'GB2312'),'IsActive': self.IsActive}

    def clone(self):
        obj=CThostFtdcBrokerField()
        obj.BrokerID=self.BrokerID
        obj.BrokerAbbr=self.BrokerAbbr
        obj.BrokerName=self.BrokerName
        obj.IsActive=self.IsActive
        return obj

class CThostFtdcTraderField(Structure):
    """交易所交易员"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 密码
        ("Password", c_char*41),
        # 安装数量
        ("InstallCount", c_int32),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallCount(self):
        return self.InstallCount

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', TraderID = \'{1}\', ParticipantID = \'{2}\', Password = \'{3}\', InstallCount = {4}, BrokerID = \'{5}\''.format(str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallCount, str(self.BrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallCount': self.InstallCount,'BrokerID': str(self.BrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTraderField()
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        obj.ParticipantID=self.ParticipantID
        obj.Password=self.Password
        obj.InstallCount=self.InstallCount
        obj.BrokerID=self.BrokerID
        return obj

class CThostFtdcInvestorField(Structure):
    """投资者"""
    _fields_ = [
        # 投资者代码
        ("InvestorID", c_char*13),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者分组代码
        ("InvestorGroupID", c_char*13),
        # 投资者名称
        ("InvestorName", c_char*81),
        # 证件类型
        ("IdentifiedCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 是否活跃
        ("IsActive", c_int32),
        # 联系电话
        ("Telephone", c_char*41),
        # 通讯地址
        ("Address", c_char*101),
        # 开户日期
        ("OpenDate", c_char*9),
        # 手机
        ("Mobile", c_char*41),
        # 手续费率模板代码
        ("CommModelID", c_char*13),
        # 保证金率模板代码
        ("MarginModelID", c_char*13),
        ]


    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorGroupID(self):
        return str(self.InvestorGroupID, 'GB2312')

    def getInvestorName(self):
        return str(self.InvestorName, 'GB2312')
    def getIdentifiedCardType(self):
        return IdCardTypeType(ord(self.IdentifiedCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getIsActive(self):
        return self.IsActive

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getOpenDate(self):
        return str(self.OpenDate, 'GB2312')

    def getMobile(self):
        return str(self.Mobile, 'GB2312')

    def getCommModelID(self):
        return str(self.CommModelID, 'GB2312')

    def getMarginModelID(self):
        return str(self.MarginModelID, 'GB2312')

    def __str__(self):
        return 'InvestorID = \'{0}\', BrokerID = \'{1}\', InvestorGroupID = \'{2}\', InvestorName = \'{3}\', IdentifiedCardType = IdCardTypeType.{4}, IdentifiedCardNo = \'{5}\', IsActive = {6}, Telephone = \'{7}\', Address = \'{8}\', OpenDate = \'{9}\', Mobile = \'{10}\', CommModelID = \'{11}\', MarginModelID = \'{12}\''.format(str(self.InvestorID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorGroupID, 'GB2312'), str(self.InvestorName, 'GB2312'), '' if ord(self.IdentifiedCardType) == 0 else IdCardTypeType(ord(self.IdentifiedCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), self.IsActive, str(self.Telephone, 'GB2312'), str(self.Address, 'GB2312'), str(self.OpenDate, 'GB2312'), str(self.Mobile, 'GB2312'), str(self.CommModelID, 'GB2312'), str(self.MarginModelID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InvestorID': str(self.InvestorID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorGroupID': str(self.InvestorGroupID, 'GB2312'),'InvestorName': str(self.InvestorName, 'GB2312'),'IdentifiedCardType': '' if ord(self.IdentifiedCardType) == 0 else IdCardTypeType(ord(self.IdentifiedCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'IsActive': self.IsActive,'Telephone': str(self.Telephone, 'GB2312'),'Address': str(self.Address, 'GB2312'),'OpenDate': str(self.OpenDate, 'GB2312'),'Mobile': str(self.Mobile, 'GB2312'),'CommModelID': str(self.CommModelID, 'GB2312'),'MarginModelID': str(self.MarginModelID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestorField()
        obj.InvestorID=self.InvestorID
        obj.BrokerID=self.BrokerID
        obj.InvestorGroupID=self.InvestorGroupID
        obj.InvestorName=self.InvestorName
        obj.IdentifiedCardType=self.IdentifiedCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.IsActive=self.IsActive
        obj.Telephone=self.Telephone
        obj.Address=self.Address
        obj.OpenDate=self.OpenDate
        obj.Mobile=self.Mobile
        obj.CommModelID=self.CommModelID
        obj.MarginModelID=self.MarginModelID
        return obj

class CThostFtdcTradingCodeField(Structure):
    """交易编码"""
    _fields_ = [
        # 投资者代码
        ("InvestorID", c_char*13),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 客户代码
        ("ClientID", c_char*11),
        # 是否活跃
        ("IsActive", c_int32),
        # 交易编码类型
        ("ClientIDType", c_char),
        # 营业部编号
        ("BranchID", c_char*9),
        # 业务类型
        ("BizType", c_char),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')
    def getIsActive(self):
        return self.IsActive
    def getClientIDType(self):
        return ClientIDTypeType(ord(self.ClientIDType))

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')
    def getBizType(self):
        return BizTypeType(ord(self.BizType))

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InvestorID = \'{0}\', BrokerID = \'{1}\', ExchangeID = \'{2}\', ClientID = \'{3}\', IsActive = {4}, ClientIDType = ClientIDTypeType.{5}, BranchID = \'{6}\', BizType = BizTypeType.{7}, InvestUnitID = \'{8}\''.format(str(self.InvestorID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ClientID, 'GB2312'), self.IsActive, '' if ord(self.ClientIDType) == 0 else ClientIDTypeType(ord(self.ClientIDType)).name, str(self.BranchID, 'GB2312'), '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InvestorID': str(self.InvestorID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IsActive': self.IsActive,'ClientIDType': '' if ord(self.ClientIDType) == 0 else ClientIDTypeType(ord(self.ClientIDType)).name,'BranchID': str(self.BranchID, 'GB2312'),'BizType': '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradingCodeField()
        obj.InvestorID=self.InvestorID
        obj.BrokerID=self.BrokerID
        obj.ExchangeID=self.ExchangeID
        obj.ClientID=self.ClientID
        obj.IsActive=self.IsActive
        obj.ClientIDType=self.ClientIDType
        obj.BranchID=self.BranchID
        obj.BizType=self.BizType
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcPartBrokerField(Structure):
    """会员编码和经纪公司编码对照表"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 是否活跃
        ("IsActive", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')
    def getIsActive(self):
        return self.IsActive

    def __str__(self):
        return 'BrokerID = \'{0}\', ExchangeID = \'{1}\', ParticipantID = \'{2}\', IsActive = {3}'.format(str(self.BrokerID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), self.IsActive)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'IsActive': self.IsActive}

    def clone(self):
        obj=CThostFtdcPartBrokerField()
        obj.BrokerID=self.BrokerID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.IsActive=self.IsActive
        return obj

class CThostFtdcSuperUserField(Structure):
    """管理用户"""
    _fields_ = [
        # 用户代码
        ("UserID", c_char*16),
        # 用户名称
        ("UserName", c_char*81),
        # 密码
        ("Password", c_char*41),
        # 是否活跃
        ("IsActive", c_int32),
        ]


    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getUserName(self):
        return str(self.UserName, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getIsActive(self):
        return self.IsActive

    def __str__(self):
        return 'UserID = \'{0}\', UserName = \'{1}\', Password = \'{2}\', IsActive = {3}'.format(str(self.UserID, 'GB2312'), str(self.UserName, 'GB2312'), str(self.Password, 'GB2312'), self.IsActive)

    @property
    def __dict__(self):
        return {'UserID': str(self.UserID, 'GB2312'),'UserName': str(self.UserName, 'GB2312'),'Password': str(self.Password, 'GB2312'),'IsActive': self.IsActive}

    def clone(self):
        obj=CThostFtdcSuperUserField()
        obj.UserID=self.UserID
        obj.UserName=self.UserName
        obj.Password=self.Password
        obj.IsActive=self.IsActive
        return obj

class CThostFtdcSuperUserFunctionField(Structure):
    """管理用户功能权限"""
    _fields_ = [
        # 用户代码
        ("UserID", c_char*16),
        # 功能代码
        ("FunctionCode", c_char),
        ]


    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getFunctionCode(self):
        return FunctionCodeType(ord(self.FunctionCode))

    def __str__(self):
        return 'UserID = \'{0}\', FunctionCode = FunctionCodeType.{1}'.format(str(self.UserID, 'GB2312'), '' if ord(self.FunctionCode) == 0 else FunctionCodeType(ord(self.FunctionCode)).name)

    @property
    def __dict__(self):
        return {'UserID': str(self.UserID, 'GB2312'),'FunctionCode': '' if ord(self.FunctionCode) == 0 else FunctionCodeType(ord(self.FunctionCode)).name}

    def clone(self):
        obj=CThostFtdcSuperUserFunctionField()
        obj.UserID=self.UserID
        obj.FunctionCode=self.FunctionCode
        return obj

class CThostFtdcInvestorGroupField(Structure):
    """投资者组"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者分组代码
        ("InvestorGroupID", c_char*13),
        # 投资者分组名称
        ("InvestorGroupName", c_char*41),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorGroupID(self):
        return str(self.InvestorGroupID, 'GB2312')

    def getInvestorGroupName(self):
        return str(self.InvestorGroupName, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorGroupID = \'{1}\', InvestorGroupName = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorGroupID, 'GB2312'), str(self.InvestorGroupName, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorGroupID': str(self.InvestorGroupID, 'GB2312'),'InvestorGroupName': str(self.InvestorGroupName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestorGroupField()
        obj.BrokerID=self.BrokerID
        obj.InvestorGroupID=self.InvestorGroupID
        obj.InvestorGroupName=self.InvestorGroupName
        return obj

class CThostFtdcTradingAccountField(Structure):
    """资金账户"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 上次质押金额
        ("PreMortgage", c_double),
        # 上次信用额度
        ("PreCredit", c_double),
        # 上次存款额
        ("PreDeposit", c_double),
        # 上次结算准备金
        ("PreBalance", c_double),
        # 上次占用的保证金
        ("PreMargin", c_double),
        # 利息基数
        ("InterestBase", c_double),
        # 利息收入
        ("Interest", c_double),
        # 入金金额
        ("Deposit", c_double),
        # 出金金额
        ("Withdraw", c_double),
        # 冻结的保证金
        ("FrozenMargin", c_double),
        # 冻结的资金
        ("FrozenCash", c_double),
        # 冻结的手续费
        ("FrozenCommission", c_double),
        # 当前保证金总额
        ("CurrMargin", c_double),
        # 资金差额
        ("CashIn", c_double),
        # 手续费
        ("Commission", c_double),
        # 平仓盈亏
        ("CloseProfit", c_double),
        # 持仓盈亏
        ("PositionProfit", c_double),
        # 期货结算准备金
        ("Balance", c_double),
        # 可用资金
        ("Available", c_double),
        # 可取资金
        ("WithdrawQuota", c_double),
        # 基本准备金
        ("Reserve", c_double),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 信用额度
        ("Credit", c_double),
        # 质押金额
        ("Mortgage", c_double),
        # 交易所保证金
        ("ExchangeMargin", c_double),
        # 投资者交割保证金
        ("DeliveryMargin", c_double),
        # 交易所交割保证金
        ("ExchangeDeliveryMargin", c_double),
        # 保底期货结算准备金
        ("ReserveBalance", c_double),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 上次货币质入金额
        ("PreFundMortgageIn", c_double),
        # 上次货币质出金额
        ("PreFundMortgageOut", c_double),
        # 货币质入金额
        ("FundMortgageIn", c_double),
        # 货币质出金额
        ("FundMortgageOut", c_double),
        # 货币质押余额
        ("FundMortgageAvailable", c_double),
        # 可质押货币金额
        ("MortgageableFund", c_double),
        # 特殊产品占用保证金
        ("SpecProductMargin", c_double),
        # 特殊产品冻结保证金
        ("SpecProductFrozenMargin", c_double),
        # 特殊产品手续费
        ("SpecProductCommission", c_double),
        # 特殊产品冻结手续费
        ("SpecProductFrozenCommission", c_double),
        # 特殊产品持仓盈亏
        ("SpecProductPositionProfit", c_double),
        # 特殊产品平仓盈亏
        ("SpecProductCloseProfit", c_double),
        # 根据持仓盈亏算法计算的特殊产品持仓盈亏
        ("SpecProductPositionProfitByAlg", c_double),
        # 特殊产品交易所保证金
        ("SpecProductExchangeMargin", c_double),
        # 业务类型
        ("BizType", c_char),
        # 延时换汇冻结金额
        ("FrozenSwap", c_double),
        # 剩余换汇额度
        ("RemainSwap", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')
    def getPreMortgage(self):
        return self.PreMortgage
    def getPreCredit(self):
        return self.PreCredit
    def getPreDeposit(self):
        return self.PreDeposit
    def getPreBalance(self):
        return self.PreBalance
    def getPreMargin(self):
        return self.PreMargin
    def getInterestBase(self):
        return self.InterestBase
    def getInterest(self):
        return self.Interest
    def getDeposit(self):
        return self.Deposit
    def getWithdraw(self):
        return self.Withdraw
    def getFrozenMargin(self):
        return self.FrozenMargin
    def getFrozenCash(self):
        return self.FrozenCash
    def getFrozenCommission(self):
        return self.FrozenCommission
    def getCurrMargin(self):
        return self.CurrMargin
    def getCashIn(self):
        return self.CashIn
    def getCommission(self):
        return self.Commission
    def getCloseProfit(self):
        return self.CloseProfit
    def getPositionProfit(self):
        return self.PositionProfit
    def getBalance(self):
        return self.Balance
    def getAvailable(self):
        return self.Available
    def getWithdrawQuota(self):
        return self.WithdrawQuota
    def getReserve(self):
        return self.Reserve

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getCredit(self):
        return self.Credit
    def getMortgage(self):
        return self.Mortgage
    def getExchangeMargin(self):
        return self.ExchangeMargin
    def getDeliveryMargin(self):
        return self.DeliveryMargin
    def getExchangeDeliveryMargin(self):
        return self.ExchangeDeliveryMargin
    def getReserveBalance(self):
        return self.ReserveBalance

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getPreFundMortgageIn(self):
        return self.PreFundMortgageIn
    def getPreFundMortgageOut(self):
        return self.PreFundMortgageOut
    def getFundMortgageIn(self):
        return self.FundMortgageIn
    def getFundMortgageOut(self):
        return self.FundMortgageOut
    def getFundMortgageAvailable(self):
        return self.FundMortgageAvailable
    def getMortgageableFund(self):
        return self.MortgageableFund
    def getSpecProductMargin(self):
        return self.SpecProductMargin
    def getSpecProductFrozenMargin(self):
        return self.SpecProductFrozenMargin
    def getSpecProductCommission(self):
        return self.SpecProductCommission
    def getSpecProductFrozenCommission(self):
        return self.SpecProductFrozenCommission
    def getSpecProductPositionProfit(self):
        return self.SpecProductPositionProfit
    def getSpecProductCloseProfit(self):
        return self.SpecProductCloseProfit
    def getSpecProductPositionProfitByAlg(self):
        return self.SpecProductPositionProfitByAlg
    def getSpecProductExchangeMargin(self):
        return self.SpecProductExchangeMargin
    def getBizType(self):
        return BizTypeType(ord(self.BizType))
    def getFrozenSwap(self):
        return self.FrozenSwap
    def getRemainSwap(self):
        return self.RemainSwap

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', PreMortgage = {2}, PreCredit = {3}, PreDeposit = {4}, PreBalance = {5}, PreMargin = {6}, InterestBase = {7}, Interest = {8}, Deposit = {9}, Withdraw = {10}, FrozenMargin = {11}, FrozenCash = {12}, FrozenCommission = {13}, CurrMargin = {14}, CashIn = {15}, Commission = {16}, CloseProfit = {17}, PositionProfit = {18}, Balance = {19}, Available = {20}, WithdrawQuota = {21}, Reserve = {22}, TradingDay = \'{23}\', SettlementID = {24}, Credit = {25}, Mortgage = {26}, ExchangeMargin = {27}, DeliveryMargin = {28}, ExchangeDeliveryMargin = {29}, ReserveBalance = {30}, CurrencyID = \'{31}\', PreFundMortgageIn = {32}, PreFundMortgageOut = {33}, FundMortgageIn = {34}, FundMortgageOut = {35}, FundMortgageAvailable = {36}, MortgageableFund = {37}, SpecProductMargin = {38}, SpecProductFrozenMargin = {39}, SpecProductCommission = {40}, SpecProductFrozenCommission = {41}, SpecProductPositionProfit = {42}, SpecProductCloseProfit = {43}, SpecProductPositionProfitByAlg = {44}, SpecProductExchangeMargin = {45}, BizType = BizTypeType.{46}, FrozenSwap = {47}, RemainSwap = {48}'.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), self.PreMortgage, self.PreCredit, self.PreDeposit, self.PreBalance, self.PreMargin, self.InterestBase, self.Interest, self.Deposit, self.Withdraw, self.FrozenMargin, self.FrozenCash, self.FrozenCommission, self.CurrMargin, self.CashIn, self.Commission, self.CloseProfit, self.PositionProfit, self.Balance, self.Available, self.WithdrawQuota, self.Reserve, str(self.TradingDay, 'GB2312'), self.SettlementID, self.Credit, self.Mortgage, self.ExchangeMargin, self.DeliveryMargin, self.ExchangeDeliveryMargin, self.ReserveBalance, str(self.CurrencyID, 'GB2312'), self.PreFundMortgageIn, self.PreFundMortgageOut, self.FundMortgageIn, self.FundMortgageOut, self.FundMortgageAvailable, self.MortgageableFund, self.SpecProductMargin, self.SpecProductFrozenMargin, self.SpecProductCommission, self.SpecProductFrozenCommission, self.SpecProductPositionProfit, self.SpecProductCloseProfit, self.SpecProductPositionProfitByAlg, self.SpecProductExchangeMargin, '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name, self.FrozenSwap, self.RemainSwap)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'PreMortgage': self.PreMortgage,'PreCredit': self.PreCredit,'PreDeposit': self.PreDeposit,'PreBalance': self.PreBalance,'PreMargin': self.PreMargin,'InterestBase': self.InterestBase,'Interest': self.Interest,'Deposit': self.Deposit,'Withdraw': self.Withdraw,'FrozenMargin': self.FrozenMargin,'FrozenCash': self.FrozenCash,'FrozenCommission': self.FrozenCommission,'CurrMargin': self.CurrMargin,'CashIn': self.CashIn,'Commission': self.Commission,'CloseProfit': self.CloseProfit,'PositionProfit': self.PositionProfit,'Balance': self.Balance,'Available': self.Available,'WithdrawQuota': self.WithdrawQuota,'Reserve': self.Reserve,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'Credit': self.Credit,'Mortgage': self.Mortgage,'ExchangeMargin': self.ExchangeMargin,'DeliveryMargin': self.DeliveryMargin,'ExchangeDeliveryMargin': self.ExchangeDeliveryMargin,'ReserveBalance': self.ReserveBalance,'CurrencyID': str(self.CurrencyID, 'GB2312'),'PreFundMortgageIn': self.PreFundMortgageIn,'PreFundMortgageOut': self.PreFundMortgageOut,'FundMortgageIn': self.FundMortgageIn,'FundMortgageOut': self.FundMortgageOut,'FundMortgageAvailable': self.FundMortgageAvailable,'MortgageableFund': self.MortgageableFund,'SpecProductMargin': self.SpecProductMargin,'SpecProductFrozenMargin': self.SpecProductFrozenMargin,'SpecProductCommission': self.SpecProductCommission,'SpecProductFrozenCommission': self.SpecProductFrozenCommission,'SpecProductPositionProfit': self.SpecProductPositionProfit,'SpecProductCloseProfit': self.SpecProductCloseProfit,'SpecProductPositionProfitByAlg': self.SpecProductPositionProfitByAlg,'SpecProductExchangeMargin': self.SpecProductExchangeMargin,'BizType': '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name,'FrozenSwap': self.FrozenSwap,'RemainSwap': self.RemainSwap}

    def clone(self):
        obj=CThostFtdcTradingAccountField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.PreMortgage=self.PreMortgage
        obj.PreCredit=self.PreCredit
        obj.PreDeposit=self.PreDeposit
        obj.PreBalance=self.PreBalance
        obj.PreMargin=self.PreMargin
        obj.InterestBase=self.InterestBase
        obj.Interest=self.Interest
        obj.Deposit=self.Deposit
        obj.Withdraw=self.Withdraw
        obj.FrozenMargin=self.FrozenMargin
        obj.FrozenCash=self.FrozenCash
        obj.FrozenCommission=self.FrozenCommission
        obj.CurrMargin=self.CurrMargin
        obj.CashIn=self.CashIn
        obj.Commission=self.Commission
        obj.CloseProfit=self.CloseProfit
        obj.PositionProfit=self.PositionProfit
        obj.Balance=self.Balance
        obj.Available=self.Available
        obj.WithdrawQuota=self.WithdrawQuota
        obj.Reserve=self.Reserve
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.Credit=self.Credit
        obj.Mortgage=self.Mortgage
        obj.ExchangeMargin=self.ExchangeMargin
        obj.DeliveryMargin=self.DeliveryMargin
        obj.ExchangeDeliveryMargin=self.ExchangeDeliveryMargin
        obj.ReserveBalance=self.ReserveBalance
        obj.CurrencyID=self.CurrencyID
        obj.PreFundMortgageIn=self.PreFundMortgageIn
        obj.PreFundMortgageOut=self.PreFundMortgageOut
        obj.FundMortgageIn=self.FundMortgageIn
        obj.FundMortgageOut=self.FundMortgageOut
        obj.FundMortgageAvailable=self.FundMortgageAvailable
        obj.MortgageableFund=self.MortgageableFund
        obj.SpecProductMargin=self.SpecProductMargin
        obj.SpecProductFrozenMargin=self.SpecProductFrozenMargin
        obj.SpecProductCommission=self.SpecProductCommission
        obj.SpecProductFrozenCommission=self.SpecProductFrozenCommission
        obj.SpecProductPositionProfit=self.SpecProductPositionProfit
        obj.SpecProductCloseProfit=self.SpecProductCloseProfit
        obj.SpecProductPositionProfitByAlg=self.SpecProductPositionProfitByAlg
        obj.SpecProductExchangeMargin=self.SpecProductExchangeMargin
        obj.BizType=self.BizType
        obj.FrozenSwap=self.FrozenSwap
        obj.RemainSwap=self.RemainSwap
        return obj

class CThostFtdcInvestorPositionField(Structure):
    """投资者持仓"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 持仓多空方向
        ("PosiDirection", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 持仓日期
        ("PositionDate", c_char),
        # 上日持仓
        ("YdPosition", c_int32),
        # 今日持仓
        ("Position", c_int32),
        # 多头冻结
        ("LongFrozen", c_int32),
        # 空头冻结
        ("ShortFrozen", c_int32),
        # 开仓冻结金额
        ("LongFrozenAmount", c_double),
        # 开仓冻结金额
        ("ShortFrozenAmount", c_double),
        # 开仓量
        ("OpenVolume", c_int32),
        # 平仓量
        ("CloseVolume", c_int32),
        # 开仓金额
        ("OpenAmount", c_double),
        # 平仓金额
        ("CloseAmount", c_double),
        # 持仓成本
        ("PositionCost", c_double),
        # 上次占用的保证金
        ("PreMargin", c_double),
        # 占用的保证金
        ("UseMargin", c_double),
        # 冻结的保证金
        ("FrozenMargin", c_double),
        # 冻结的资金
        ("FrozenCash", c_double),
        # 冻结的手续费
        ("FrozenCommission", c_double),
        # 资金差额
        ("CashIn", c_double),
        # 手续费
        ("Commission", c_double),
        # 平仓盈亏
        ("CloseProfit", c_double),
        # 持仓盈亏
        ("PositionProfit", c_double),
        # 上次结算价
        ("PreSettlementPrice", c_double),
        # 本次结算价
        ("SettlementPrice", c_double),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 开仓成本
        ("OpenCost", c_double),
        # 交易所保证金
        ("ExchangeMargin", c_double),
        # 组合成交形成的持仓
        ("CombPosition", c_int32),
        # 组合多头冻结
        ("CombLongFrozen", c_int32),
        # 组合空头冻结
        ("CombShortFrozen", c_int32),
        # 逐日盯市平仓盈亏
        ("CloseProfitByDate", c_double),
        # 逐笔对冲平仓盈亏
        ("CloseProfitByTrade", c_double),
        # 今日持仓
        ("TodayPosition", c_int32),
        # 保证金率
        ("MarginRateByMoney", c_double),
        # 保证金率(按手数)
        ("MarginRateByVolume", c_double),
        # 执行冻结
        ("StrikeFrozen", c_int32),
        # 执行冻结金额
        ("StrikeFrozenAmount", c_double),
        # 放弃执行冻结
        ("AbandonFrozen", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 执行冻结的昨仓
        ("YdStrikeFrozen", c_int32),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getPosiDirection(self):
        return PosiDirectionType(ord(self.PosiDirection))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getPositionDate(self):
        return PositionDateType(ord(self.PositionDate))
    def getYdPosition(self):
        return self.YdPosition
    def getPosition(self):
        return self.Position
    def getLongFrozen(self):
        return self.LongFrozen
    def getShortFrozen(self):
        return self.ShortFrozen
    def getLongFrozenAmount(self):
        return self.LongFrozenAmount
    def getShortFrozenAmount(self):
        return self.ShortFrozenAmount
    def getOpenVolume(self):
        return self.OpenVolume
    def getCloseVolume(self):
        return self.CloseVolume
    def getOpenAmount(self):
        return self.OpenAmount
    def getCloseAmount(self):
        return self.CloseAmount
    def getPositionCost(self):
        return self.PositionCost
    def getPreMargin(self):
        return self.PreMargin
    def getUseMargin(self):
        return self.UseMargin
    def getFrozenMargin(self):
        return self.FrozenMargin
    def getFrozenCash(self):
        return self.FrozenCash
    def getFrozenCommission(self):
        return self.FrozenCommission
    def getCashIn(self):
        return self.CashIn
    def getCommission(self):
        return self.Commission
    def getCloseProfit(self):
        return self.CloseProfit
    def getPositionProfit(self):
        return self.PositionProfit
    def getPreSettlementPrice(self):
        return self.PreSettlementPrice
    def getSettlementPrice(self):
        return self.SettlementPrice

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getOpenCost(self):
        return self.OpenCost
    def getExchangeMargin(self):
        return self.ExchangeMargin
    def getCombPosition(self):
        return self.CombPosition
    def getCombLongFrozen(self):
        return self.CombLongFrozen
    def getCombShortFrozen(self):
        return self.CombShortFrozen
    def getCloseProfitByDate(self):
        return self.CloseProfitByDate
    def getCloseProfitByTrade(self):
        return self.CloseProfitByTrade
    def getTodayPosition(self):
        return self.TodayPosition
    def getMarginRateByMoney(self):
        return self.MarginRateByMoney
    def getMarginRateByVolume(self):
        return self.MarginRateByVolume
    def getStrikeFrozen(self):
        return self.StrikeFrozen
    def getStrikeFrozenAmount(self):
        return self.StrikeFrozenAmount
    def getAbandonFrozen(self):
        return self.AbandonFrozen

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getYdStrikeFrozen(self):
        return self.YdStrikeFrozen

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', PosiDirection = PosiDirectionType.{3}, HedgeFlag = HedgeFlagType.{4}, PositionDate = PositionDateType.{5}, YdPosition = {6}, Position = {7}, LongFrozen = {8}, ShortFrozen = {9}, LongFrozenAmount = {10}, ShortFrozenAmount = {11}, OpenVolume = {12}, CloseVolume = {13}, OpenAmount = {14}, CloseAmount = {15}, PositionCost = {16}, PreMargin = {17}, UseMargin = {18}, FrozenMargin = {19}, FrozenCash = {20}, FrozenCommission = {21}, CashIn = {22}, Commission = {23}, CloseProfit = {24}, PositionProfit = {25}, PreSettlementPrice = {26}, SettlementPrice = {27}, TradingDay = \'{28}\', SettlementID = {29}, OpenCost = {30}, ExchangeMargin = {31}, CombPosition = {32}, CombLongFrozen = {33}, CombShortFrozen = {34}, CloseProfitByDate = {35}, CloseProfitByTrade = {36}, TodayPosition = {37}, MarginRateByMoney = {38}, MarginRateByVolume = {39}, StrikeFrozen = {40}, StrikeFrozenAmount = {41}, AbandonFrozen = {42}, ExchangeID = \'{43}\', YdStrikeFrozen = {44}, InvestUnitID = \'{45}\''.format(str(self.InstrumentID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.PositionDate) == 0 else PositionDateType(ord(self.PositionDate)).name, self.YdPosition, self.Position, self.LongFrozen, self.ShortFrozen, self.LongFrozenAmount, self.ShortFrozenAmount, self.OpenVolume, self.CloseVolume, self.OpenAmount, self.CloseAmount, self.PositionCost, self.PreMargin, self.UseMargin, self.FrozenMargin, self.FrozenCash, self.FrozenCommission, self.CashIn, self.Commission, self.CloseProfit, self.PositionProfit, self.PreSettlementPrice, self.SettlementPrice, str(self.TradingDay, 'GB2312'), self.SettlementID, self.OpenCost, self.ExchangeMargin, self.CombPosition, self.CombLongFrozen, self.CombShortFrozen, self.CloseProfitByDate, self.CloseProfitByTrade, self.TodayPosition, self.MarginRateByMoney, self.MarginRateByVolume, self.StrikeFrozen, self.StrikeFrozenAmount, self.AbandonFrozen, str(self.ExchangeID, 'GB2312'), self.YdStrikeFrozen, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'PosiDirection': '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'PositionDate': '' if ord(self.PositionDate) == 0 else PositionDateType(ord(self.PositionDate)).name,'YdPosition': self.YdPosition,'Position': self.Position,'LongFrozen': self.LongFrozen,'ShortFrozen': self.ShortFrozen,'LongFrozenAmount': self.LongFrozenAmount,'ShortFrozenAmount': self.ShortFrozenAmount,'OpenVolume': self.OpenVolume,'CloseVolume': self.CloseVolume,'OpenAmount': self.OpenAmount,'CloseAmount': self.CloseAmount,'PositionCost': self.PositionCost,'PreMargin': self.PreMargin,'UseMargin': self.UseMargin,'FrozenMargin': self.FrozenMargin,'FrozenCash': self.FrozenCash,'FrozenCommission': self.FrozenCommission,'CashIn': self.CashIn,'Commission': self.Commission,'CloseProfit': self.CloseProfit,'PositionProfit': self.PositionProfit,'PreSettlementPrice': self.PreSettlementPrice,'SettlementPrice': self.SettlementPrice,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'OpenCost': self.OpenCost,'ExchangeMargin': self.ExchangeMargin,'CombPosition': self.CombPosition,'CombLongFrozen': self.CombLongFrozen,'CombShortFrozen': self.CombShortFrozen,'CloseProfitByDate': self.CloseProfitByDate,'CloseProfitByTrade': self.CloseProfitByTrade,'TodayPosition': self.TodayPosition,'MarginRateByMoney': self.MarginRateByMoney,'MarginRateByVolume': self.MarginRateByVolume,'StrikeFrozen': self.StrikeFrozen,'StrikeFrozenAmount': self.StrikeFrozenAmount,'AbandonFrozen': self.AbandonFrozen,'ExchangeID': str(self.ExchangeID, 'GB2312'),'YdStrikeFrozen': self.YdStrikeFrozen,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestorPositionField()
        obj.InstrumentID=self.InstrumentID
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.PosiDirection=self.PosiDirection
        obj.HedgeFlag=self.HedgeFlag
        obj.PositionDate=self.PositionDate
        obj.YdPosition=self.YdPosition
        obj.Position=self.Position
        obj.LongFrozen=self.LongFrozen
        obj.ShortFrozen=self.ShortFrozen
        obj.LongFrozenAmount=self.LongFrozenAmount
        obj.ShortFrozenAmount=self.ShortFrozenAmount
        obj.OpenVolume=self.OpenVolume
        obj.CloseVolume=self.CloseVolume
        obj.OpenAmount=self.OpenAmount
        obj.CloseAmount=self.CloseAmount
        obj.PositionCost=self.PositionCost
        obj.PreMargin=self.PreMargin
        obj.UseMargin=self.UseMargin
        obj.FrozenMargin=self.FrozenMargin
        obj.FrozenCash=self.FrozenCash
        obj.FrozenCommission=self.FrozenCommission
        obj.CashIn=self.CashIn
        obj.Commission=self.Commission
        obj.CloseProfit=self.CloseProfit
        obj.PositionProfit=self.PositionProfit
        obj.PreSettlementPrice=self.PreSettlementPrice
        obj.SettlementPrice=self.SettlementPrice
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.OpenCost=self.OpenCost
        obj.ExchangeMargin=self.ExchangeMargin
        obj.CombPosition=self.CombPosition
        obj.CombLongFrozen=self.CombLongFrozen
        obj.CombShortFrozen=self.CombShortFrozen
        obj.CloseProfitByDate=self.CloseProfitByDate
        obj.CloseProfitByTrade=self.CloseProfitByTrade
        obj.TodayPosition=self.TodayPosition
        obj.MarginRateByMoney=self.MarginRateByMoney
        obj.MarginRateByVolume=self.MarginRateByVolume
        obj.StrikeFrozen=self.StrikeFrozen
        obj.StrikeFrozenAmount=self.StrikeFrozenAmount
        obj.AbandonFrozen=self.AbandonFrozen
        obj.ExchangeID=self.ExchangeID
        obj.YdStrikeFrozen=self.YdStrikeFrozen
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcInstrumentMarginRateField(Structure):
    """合约保证金率"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 多头保证金率
        ("LongMarginRatioByMoney", c_double),
        # 多头保证金费
        ("LongMarginRatioByVolume", c_double),
        # 空头保证金率
        ("ShortMarginRatioByMoney", c_double),
        # 空头保证金费
        ("ShortMarginRatioByVolume", c_double),
        # 是否相对交易所收取
        ("IsRelative", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getLongMarginRatioByMoney(self):
        return self.LongMarginRatioByMoney
    def getLongMarginRatioByVolume(self):
        return self.LongMarginRatioByVolume
    def getShortMarginRatioByMoney(self):
        return self.ShortMarginRatioByMoney
    def getShortMarginRatioByVolume(self):
        return self.ShortMarginRatioByVolume
    def getIsRelative(self):
        return self.IsRelative

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', HedgeFlag = HedgeFlagType.{4}, LongMarginRatioByMoney = {5}, LongMarginRatioByVolume = {6}, ShortMarginRatioByMoney = {7}, ShortMarginRatioByVolume = {8}, IsRelative = {9}, ExchangeID = \'{10}\', InvestUnitID = \'{11}\''.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.LongMarginRatioByMoney, self.LongMarginRatioByVolume, self.ShortMarginRatioByMoney, self.ShortMarginRatioByVolume, self.IsRelative, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'LongMarginRatioByMoney': self.LongMarginRatioByMoney,'LongMarginRatioByVolume': self.LongMarginRatioByVolume,'ShortMarginRatioByMoney': self.ShortMarginRatioByMoney,'ShortMarginRatioByVolume': self.ShortMarginRatioByVolume,'IsRelative': self.IsRelative,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInstrumentMarginRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.HedgeFlag=self.HedgeFlag
        obj.LongMarginRatioByMoney=self.LongMarginRatioByMoney
        obj.LongMarginRatioByVolume=self.LongMarginRatioByVolume
        obj.ShortMarginRatioByMoney=self.ShortMarginRatioByMoney
        obj.ShortMarginRatioByVolume=self.ShortMarginRatioByVolume
        obj.IsRelative=self.IsRelative
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcInstrumentCommissionRateField(Structure):
    """合约手续费率"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 开仓手续费率
        ("OpenRatioByMoney", c_double),
        # 开仓手续费
        ("OpenRatioByVolume", c_double),
        # 平仓手续费率
        ("CloseRatioByMoney", c_double),
        # 平仓手续费
        ("CloseRatioByVolume", c_double),
        # 平今手续费率
        ("CloseTodayRatioByMoney", c_double),
        # 平今手续费
        ("CloseTodayRatioByVolume", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 业务类型
        ("BizType", c_char),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOpenRatioByMoney(self):
        return self.OpenRatioByMoney
    def getOpenRatioByVolume(self):
        return self.OpenRatioByVolume
    def getCloseRatioByMoney(self):
        return self.CloseRatioByMoney
    def getCloseRatioByVolume(self):
        return self.CloseRatioByVolume
    def getCloseTodayRatioByMoney(self):
        return self.CloseTodayRatioByMoney
    def getCloseTodayRatioByVolume(self):
        return self.CloseTodayRatioByVolume

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getBizType(self):
        return BizTypeType(ord(self.BizType))

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', OpenRatioByMoney = {4}, OpenRatioByVolume = {5}, CloseRatioByMoney = {6}, CloseRatioByVolume = {7}, CloseTodayRatioByMoney = {8}, CloseTodayRatioByVolume = {9}, ExchangeID = \'{10}\', BizType = BizTypeType.{11}, InvestUnitID = \'{12}\''.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OpenRatioByMoney, self.OpenRatioByVolume, self.CloseRatioByMoney, self.CloseRatioByVolume, self.CloseTodayRatioByMoney, self.CloseTodayRatioByVolume, str(self.ExchangeID, 'GB2312'), '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OpenRatioByMoney': self.OpenRatioByMoney,'OpenRatioByVolume': self.OpenRatioByVolume,'CloseRatioByMoney': self.CloseRatioByMoney,'CloseRatioByVolume': self.CloseRatioByVolume,'CloseTodayRatioByMoney': self.CloseTodayRatioByMoney,'CloseTodayRatioByVolume': self.CloseTodayRatioByVolume,'ExchangeID': str(self.ExchangeID, 'GB2312'),'BizType': '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInstrumentCommissionRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OpenRatioByMoney=self.OpenRatioByMoney
        obj.OpenRatioByVolume=self.OpenRatioByVolume
        obj.CloseRatioByMoney=self.CloseRatioByMoney
        obj.CloseRatioByVolume=self.CloseRatioByVolume
        obj.CloseTodayRatioByMoney=self.CloseTodayRatioByMoney
        obj.CloseTodayRatioByVolume=self.CloseTodayRatioByVolume
        obj.ExchangeID=self.ExchangeID
        obj.BizType=self.BizType
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcDepthMarketDataField(Structure):
    """深度行情"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 最新价
        ("LastPrice", c_double),
        # 上次结算价
        ("PreSettlementPrice", c_double),
        # 昨收盘
        ("PreClosePrice", c_double),
        # 昨持仓量
        ("PreOpenInterest", c_double),
        # 今开盘
        ("OpenPrice", c_double),
        # 最高价
        ("HighestPrice", c_double),
        # 最低价
        ("LowestPrice", c_double),
        # 数量
        ("Volume", c_int32),
        # 成交金额
        ("Turnover", c_double),
        # 持仓量
        ("OpenInterest", c_double),
        # 今收盘
        ("ClosePrice", c_double),
        # 本次结算价
        ("SettlementPrice", c_double),
        # 涨停板价
        ("UpperLimitPrice", c_double),
        # 跌停板价
        ("LowerLimitPrice", c_double),
        # 昨虚实度
        ("PreDelta", c_double),
        # 今虚实度
        ("CurrDelta", c_double),
        # 最后修改时间
        ("UpdateTime", c_char*9),
        # 最后修改毫秒
        ("UpdateMillisec", c_int32),
        # 申买价一
        ("BidPrice1", c_double),
        # 申买量一
        ("BidVolume1", c_int32),
        # 申卖价一
        ("AskPrice1", c_double),
        # 申卖量一
        ("AskVolume1", c_int32),
        # 申买价二
        ("BidPrice2", c_double),
        # 申买量二
        ("BidVolume2", c_int32),
        # 申卖价二
        ("AskPrice2", c_double),
        # 申卖量二
        ("AskVolume2", c_int32),
        # 申买价三
        ("BidPrice3", c_double),
        # 申买量三
        ("BidVolume3", c_int32),
        # 申卖价三
        ("AskPrice3", c_double),
        # 申卖量三
        ("AskVolume3", c_int32),
        # 申买价四
        ("BidPrice4", c_double),
        # 申买量四
        ("BidVolume4", c_int32),
        # 申卖价四
        ("AskPrice4", c_double),
        # 申卖量四
        ("AskVolume4", c_int32),
        # 申买价五
        ("BidPrice5", c_double),
        # 申买量五
        ("BidVolume5", c_int32),
        # 申卖价五
        ("AskPrice5", c_double),
        # 申卖量五
        ("AskVolume5", c_int32),
        # 当日均价
        ("AveragePrice", c_double),
        # 业务日期
        ("ActionDay", c_char*9),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')
    def getLastPrice(self):
        return self.LastPrice
    def getPreSettlementPrice(self):
        return self.PreSettlementPrice
    def getPreClosePrice(self):
        return self.PreClosePrice
    def getPreOpenInterest(self):
        return self.PreOpenInterest
    def getOpenPrice(self):
        return self.OpenPrice
    def getHighestPrice(self):
        return self.HighestPrice
    def getLowestPrice(self):
        return self.LowestPrice
    def getVolume(self):
        return self.Volume
    def getTurnover(self):
        return self.Turnover
    def getOpenInterest(self):
        return self.OpenInterest
    def getClosePrice(self):
        return self.ClosePrice
    def getSettlementPrice(self):
        return self.SettlementPrice
    def getUpperLimitPrice(self):
        return self.UpperLimitPrice
    def getLowerLimitPrice(self):
        return self.LowerLimitPrice
    def getPreDelta(self):
        return self.PreDelta
    def getCurrDelta(self):
        return self.CurrDelta

    def getUpdateTime(self):
        return str(self.UpdateTime, 'GB2312')
    def getUpdateMillisec(self):
        return self.UpdateMillisec
    def getBidPrice1(self):
        return self.BidPrice1
    def getBidVolume1(self):
        return self.BidVolume1
    def getAskPrice1(self):
        return self.AskPrice1
    def getAskVolume1(self):
        return self.AskVolume1
    def getBidPrice2(self):
        return self.BidPrice2
    def getBidVolume2(self):
        return self.BidVolume2
    def getAskPrice2(self):
        return self.AskPrice2
    def getAskVolume2(self):
        return self.AskVolume2
    def getBidPrice3(self):
        return self.BidPrice3
    def getBidVolume3(self):
        return self.BidVolume3
    def getAskPrice3(self):
        return self.AskPrice3
    def getAskVolume3(self):
        return self.AskVolume3
    def getBidPrice4(self):
        return self.BidPrice4
    def getBidVolume4(self):
        return self.BidVolume4
    def getAskPrice4(self):
        return self.AskPrice4
    def getAskVolume4(self):
        return self.AskVolume4
    def getBidPrice5(self):
        return self.BidPrice5
    def getBidVolume5(self):
        return self.BidVolume5
    def getAskPrice5(self):
        return self.AskPrice5
    def getAskVolume5(self):
        return self.AskVolume5
    def getAveragePrice(self):
        return self.AveragePrice

    def getActionDay(self):
        return str(self.ActionDay, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', InstrumentID = \'{1}\', ExchangeID = \'{2}\', ExchangeInstID = \'{3}\', LastPrice = {4}, PreSettlementPrice = {5}, PreClosePrice = {6}, PreOpenInterest = {7}, OpenPrice = {8}, HighestPrice = {9}, LowestPrice = {10}, Volume = {11}, Turnover = {12}, OpenInterest = {13}, ClosePrice = {14}, SettlementPrice = {15}, UpperLimitPrice = {16}, LowerLimitPrice = {17}, PreDelta = {18}, CurrDelta = {19}, UpdateTime = \'{20}\', UpdateMillisec = {21}, BidPrice1 = {22}, BidVolume1 = {23}, AskPrice1 = {24}, AskVolume1 = {25}, BidPrice2 = {26}, BidVolume2 = {27}, AskPrice2 = {28}, AskVolume2 = {29}, BidPrice3 = {30}, BidVolume3 = {31}, AskPrice3 = {32}, AskVolume3 = {33}, BidPrice4 = {34}, BidVolume4 = {35}, AskPrice4 = {36}, AskVolume4 = {37}, BidPrice5 = {38}, BidVolume5 = {39}, AskPrice5 = {40}, AskVolume5 = {41}, AveragePrice = {42}, ActionDay = \'{43}\''.format(str(self.TradingDay, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), self.LastPrice, self.PreSettlementPrice, self.PreClosePrice, self.PreOpenInterest, self.OpenPrice, self.HighestPrice, self.LowestPrice, self.Volume, self.Turnover, self.OpenInterest, self.ClosePrice, self.SettlementPrice, self.UpperLimitPrice, self.LowerLimitPrice, self.PreDelta, self.CurrDelta, str(self.UpdateTime, 'GB2312'), self.UpdateMillisec, self.BidPrice1, self.BidVolume1, self.AskPrice1, self.AskVolume1, self.BidPrice2, self.BidVolume2, self.AskPrice2, self.AskVolume2, self.BidPrice3, self.BidVolume3, self.AskPrice3, self.AskVolume3, self.BidPrice4, self.BidVolume4, self.AskPrice4, self.AskVolume4, self.BidPrice5, self.BidVolume5, self.AskPrice5, self.AskVolume5, self.AveragePrice, str(self.ActionDay, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'LastPrice': self.LastPrice,'PreSettlementPrice': self.PreSettlementPrice,'PreClosePrice': self.PreClosePrice,'PreOpenInterest': self.PreOpenInterest,'OpenPrice': self.OpenPrice,'HighestPrice': self.HighestPrice,'LowestPrice': self.LowestPrice,'Volume': self.Volume,'Turnover': self.Turnover,'OpenInterest': self.OpenInterest,'ClosePrice': self.ClosePrice,'SettlementPrice': self.SettlementPrice,'UpperLimitPrice': self.UpperLimitPrice,'LowerLimitPrice': self.LowerLimitPrice,'PreDelta': self.PreDelta,'CurrDelta': self.CurrDelta,'UpdateTime': str(self.UpdateTime, 'GB2312'),'UpdateMillisec': self.UpdateMillisec,'BidPrice1': self.BidPrice1,'BidVolume1': self.BidVolume1,'AskPrice1': self.AskPrice1,'AskVolume1': self.AskVolume1,'BidPrice2': self.BidPrice2,'BidVolume2': self.BidVolume2,'AskPrice2': self.AskPrice2,'AskVolume2': self.AskVolume2,'BidPrice3': self.BidPrice3,'BidVolume3': self.BidVolume3,'AskPrice3': self.AskPrice3,'AskVolume3': self.AskVolume3,'BidPrice4': self.BidPrice4,'BidVolume4': self.BidVolume4,'AskPrice4': self.AskPrice4,'AskVolume4': self.AskVolume4,'BidPrice5': self.BidPrice5,'BidVolume5': self.BidVolume5,'AskPrice5': self.AskPrice5,'AskVolume5': self.AskVolume5,'AveragePrice': self.AveragePrice,'ActionDay': str(self.ActionDay, 'GB2312')}

    def clone(self):
        obj=CThostFtdcDepthMarketDataField()
        obj.TradingDay=self.TradingDay
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.LastPrice=self.LastPrice
        obj.PreSettlementPrice=self.PreSettlementPrice
        obj.PreClosePrice=self.PreClosePrice
        obj.PreOpenInterest=self.PreOpenInterest
        obj.OpenPrice=self.OpenPrice
        obj.HighestPrice=self.HighestPrice
        obj.LowestPrice=self.LowestPrice
        obj.Volume=self.Volume
        obj.Turnover=self.Turnover
        obj.OpenInterest=self.OpenInterest
        obj.ClosePrice=self.ClosePrice
        obj.SettlementPrice=self.SettlementPrice
        obj.UpperLimitPrice=self.UpperLimitPrice
        obj.LowerLimitPrice=self.LowerLimitPrice
        obj.PreDelta=self.PreDelta
        obj.CurrDelta=self.CurrDelta
        obj.UpdateTime=self.UpdateTime
        obj.UpdateMillisec=self.UpdateMillisec
        obj.BidPrice1=self.BidPrice1
        obj.BidVolume1=self.BidVolume1
        obj.AskPrice1=self.AskPrice1
        obj.AskVolume1=self.AskVolume1
        obj.BidPrice2=self.BidPrice2
        obj.BidVolume2=self.BidVolume2
        obj.AskPrice2=self.AskPrice2
        obj.AskVolume2=self.AskVolume2
        obj.BidPrice3=self.BidPrice3
        obj.BidVolume3=self.BidVolume3
        obj.AskPrice3=self.AskPrice3
        obj.AskVolume3=self.AskVolume3
        obj.BidPrice4=self.BidPrice4
        obj.BidVolume4=self.BidVolume4
        obj.AskPrice4=self.AskPrice4
        obj.AskVolume4=self.AskVolume4
        obj.BidPrice5=self.BidPrice5
        obj.BidVolume5=self.BidVolume5
        obj.AskPrice5=self.AskPrice5
        obj.AskVolume5=self.AskVolume5
        obj.AveragePrice=self.AveragePrice
        obj.ActionDay=self.ActionDay
        return obj

class CThostFtdcInstrumentTradingRightField(Structure):
    """投资者合约交易权限"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易权限
        ("TradingRight", c_char),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getTradingRight(self):
        return TradingRightType(ord(self.TradingRight))

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', TradingRight = TradingRightType.{4}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.TradingRight) == 0 else TradingRightType(ord(self.TradingRight)).name)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'TradingRight': '' if ord(self.TradingRight) == 0 else TradingRightType(ord(self.TradingRight)).name}

    def clone(self):
        obj=CThostFtdcInstrumentTradingRightField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.TradingRight=self.TradingRight
        return obj

class CThostFtdcBrokerUserField(Structure):
    """经纪公司用户"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 用户名称
        ("UserName", c_char*81),
        # 用户类型
        ("UserType", c_char),
        # 是否活跃
        ("IsActive", c_int32),
        # 是否使用令牌
        ("IsUsingOTP", c_int32),
        # 是否强制终端认证
        ("IsAuthForce", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getUserName(self):
        return str(self.UserName, 'GB2312')
    def getUserType(self):
        return UserTypeType(ord(self.UserType))
    def getIsActive(self):
        return self.IsActive
    def getIsUsingOTP(self):
        return self.IsUsingOTP
    def getIsAuthForce(self):
        return self.IsAuthForce

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', UserName = \'{2}\', UserType = UserTypeType.{3}, IsActive = {4}, IsUsingOTP = {5}, IsAuthForce = {6}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.UserName, 'GB2312'), '' if ord(self.UserType) == 0 else UserTypeType(ord(self.UserType)).name, self.IsActive, self.IsUsingOTP, self.IsAuthForce)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'UserName': str(self.UserName, 'GB2312'),'UserType': '' if ord(self.UserType) == 0 else UserTypeType(ord(self.UserType)).name,'IsActive': self.IsActive,'IsUsingOTP': self.IsUsingOTP,'IsAuthForce': self.IsAuthForce}

    def clone(self):
        obj=CThostFtdcBrokerUserField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.UserName=self.UserName
        obj.UserType=self.UserType
        obj.IsActive=self.IsActive
        obj.IsUsingOTP=self.IsUsingOTP
        obj.IsAuthForce=self.IsAuthForce
        return obj

class CThostFtdcBrokerUserPasswordField(Structure):
    """经纪公司用户口令"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 密码
        ("Password", c_char*41),
        # 上次修改时间
        ("LastUpdateTime", c_char*17),
        # 上次登陆时间
        ("LastLoginTime", c_char*17),
        # 密码过期时间
        ("ExpireDate", c_char*9),
        # 弱密码过期时间
        ("WeakExpireDate", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getLastUpdateTime(self):
        return str(self.LastUpdateTime, 'GB2312')

    def getLastLoginTime(self):
        return str(self.LastLoginTime, 'GB2312')

    def getExpireDate(self):
        return str(self.ExpireDate, 'GB2312')

    def getWeakExpireDate(self):
        return str(self.WeakExpireDate, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', Password = \'{2}\', LastUpdateTime = \'{3}\', LastLoginTime = \'{4}\', ExpireDate = \'{5}\', WeakExpireDate = \'{6}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.Password, 'GB2312'), str(self.LastUpdateTime, 'GB2312'), str(self.LastLoginTime, 'GB2312'), str(self.ExpireDate, 'GB2312'), str(self.WeakExpireDate, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'LastUpdateTime': str(self.LastUpdateTime, 'GB2312'),'LastLoginTime': str(self.LastLoginTime, 'GB2312'),'ExpireDate': str(self.ExpireDate, 'GB2312'),'WeakExpireDate': str(self.WeakExpireDate, 'GB2312')}

    def clone(self):
        obj=CThostFtdcBrokerUserPasswordField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.Password=self.Password
        obj.LastUpdateTime=self.LastUpdateTime
        obj.LastLoginTime=self.LastLoginTime
        obj.ExpireDate=self.ExpireDate
        obj.WeakExpireDate=self.WeakExpireDate
        return obj

class CThostFtdcBrokerUserFunctionField(Structure):
    """经纪公司用户功能权限"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 经纪公司功能代码
        ("BrokerFunctionCode", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getBrokerFunctionCode(self):
        return BrokerFunctionCodeType(ord(self.BrokerFunctionCode))

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', BrokerFunctionCode = BrokerFunctionCodeType.{2}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.BrokerFunctionCode) == 0 else BrokerFunctionCodeType(ord(self.BrokerFunctionCode)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'BrokerFunctionCode': '' if ord(self.BrokerFunctionCode) == 0 else BrokerFunctionCodeType(ord(self.BrokerFunctionCode)).name}

    def clone(self):
        obj=CThostFtdcBrokerUserFunctionField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.BrokerFunctionCode=self.BrokerFunctionCode
        return obj

class CThostFtdcTraderOfferField(Structure):
    """交易所交易员报盘机"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 交易所交易员连接状态
        ("TraderConnectStatus", c_char),
        # 发出连接请求的日期
        ("ConnectRequestDate", c_char*9),
        # 发出连接请求的时间
        ("ConnectRequestTime", c_char*9),
        # 上次报告日期
        ("LastReportDate", c_char*9),
        # 上次报告时间
        ("LastReportTime", c_char*9),
        # 完成连接日期
        ("ConnectDate", c_char*9),
        # 完成连接时间
        ("ConnectTime", c_char*9),
        # 启动日期
        ("StartDate", c_char*9),
        # 启动时间
        ("StartTime", c_char*9),
        # 交易日
        ("TradingDay", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 本席位最大成交编号
        ("MaxTradeID", c_char*21),
        # 本席位最大报单备拷
        ("MaxOrderMessageReference", c_char*7),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')
    def getTraderConnectStatus(self):
        return TraderConnectStatusType(ord(self.TraderConnectStatus))

    def getConnectRequestDate(self):
        return str(self.ConnectRequestDate, 'GB2312')

    def getConnectRequestTime(self):
        return str(self.ConnectRequestTime, 'GB2312')

    def getLastReportDate(self):
        return str(self.LastReportDate, 'GB2312')

    def getLastReportTime(self):
        return str(self.LastReportTime, 'GB2312')

    def getConnectDate(self):
        return str(self.ConnectDate, 'GB2312')

    def getConnectTime(self):
        return str(self.ConnectTime, 'GB2312')

    def getStartDate(self):
        return str(self.StartDate, 'GB2312')

    def getStartTime(self):
        return str(self.StartTime, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getMaxTradeID(self):
        return str(self.MaxTradeID, 'GB2312')

    def getMaxOrderMessageReference(self):
        return str(self.MaxOrderMessageReference, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', TraderID = \'{1}\', ParticipantID = \'{2}\', Password = \'{3}\', InstallID = {4}, OrderLocalID = \'{5}\', TraderConnectStatus = TraderConnectStatusType.{6}, ConnectRequestDate = \'{7}\', ConnectRequestTime = \'{8}\', LastReportDate = \'{9}\', LastReportTime = \'{10}\', ConnectDate = \'{11}\', ConnectTime = \'{12}\', StartDate = \'{13}\', StartTime = \'{14}\', TradingDay = \'{15}\', BrokerID = \'{16}\', MaxTradeID = \'{17}\', MaxOrderMessageReference = \'{18}\''.format(str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, str(self.OrderLocalID, 'GB2312'), '' if ord(self.TraderConnectStatus) == 0 else TraderConnectStatusType(ord(self.TraderConnectStatus)).name, str(self.ConnectRequestDate, 'GB2312'), str(self.ConnectRequestTime, 'GB2312'), str(self.LastReportDate, 'GB2312'), str(self.LastReportTime, 'GB2312'), str(self.ConnectDate, 'GB2312'), str(self.ConnectTime, 'GB2312'), str(self.StartDate, 'GB2312'), str(self.StartTime, 'GB2312'), str(self.TradingDay, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.MaxTradeID, 'GB2312'), str(self.MaxOrderMessageReference, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'TraderConnectStatus': '' if ord(self.TraderConnectStatus) == 0 else TraderConnectStatusType(ord(self.TraderConnectStatus)).name,'ConnectRequestDate': str(self.ConnectRequestDate, 'GB2312'),'ConnectRequestTime': str(self.ConnectRequestTime, 'GB2312'),'LastReportDate': str(self.LastReportDate, 'GB2312'),'LastReportTime': str(self.LastReportTime, 'GB2312'),'ConnectDate': str(self.ConnectDate, 'GB2312'),'ConnectTime': str(self.ConnectTime, 'GB2312'),'StartDate': str(self.StartDate, 'GB2312'),'StartTime': str(self.StartTime, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'MaxTradeID': str(self.MaxTradeID, 'GB2312'),'MaxOrderMessageReference': str(self.MaxOrderMessageReference, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTraderOfferField()
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        obj.ParticipantID=self.ParticipantID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.OrderLocalID=self.OrderLocalID
        obj.TraderConnectStatus=self.TraderConnectStatus
        obj.ConnectRequestDate=self.ConnectRequestDate
        obj.ConnectRequestTime=self.ConnectRequestTime
        obj.LastReportDate=self.LastReportDate
        obj.LastReportTime=self.LastReportTime
        obj.ConnectDate=self.ConnectDate
        obj.ConnectTime=self.ConnectTime
        obj.StartDate=self.StartDate
        obj.StartTime=self.StartTime
        obj.TradingDay=self.TradingDay
        obj.BrokerID=self.BrokerID
        obj.MaxTradeID=self.MaxTradeID
        obj.MaxOrderMessageReference=self.MaxOrderMessageReference
        return obj

class CThostFtdcSettlementInfoField(Structure):
    """投资者结算结果"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 序号
        ("SequenceNo", c_int32),
        # 消息正文
        ("Content", c_char*501),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getContent(self):
        return str(self.Content, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', SettlementID = {1}, BrokerID = \'{2}\', InvestorID = \'{3}\', SequenceNo = {4}, Content = \'{5}\', AccountID = \'{6}\', CurrencyID = \'{7}\''.format(str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.SequenceNo, str(self.Content, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'SequenceNo': self.SequenceNo,'Content': str(self.Content, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSettlementInfoField()
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.SequenceNo=self.SequenceNo
        obj.Content=self.Content
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcInstrumentMarginRateAdjustField(Structure):
    """合约保证金率调整"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 多头保证金率
        ("LongMarginRatioByMoney", c_double),
        # 多头保证金费
        ("LongMarginRatioByVolume", c_double),
        # 空头保证金率
        ("ShortMarginRatioByMoney", c_double),
        # 空头保证金费
        ("ShortMarginRatioByVolume", c_double),
        # 是否相对交易所收取
        ("IsRelative", c_int32),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getLongMarginRatioByMoney(self):
        return self.LongMarginRatioByMoney
    def getLongMarginRatioByVolume(self):
        return self.LongMarginRatioByVolume
    def getShortMarginRatioByMoney(self):
        return self.ShortMarginRatioByMoney
    def getShortMarginRatioByVolume(self):
        return self.ShortMarginRatioByVolume
    def getIsRelative(self):
        return self.IsRelative

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', HedgeFlag = HedgeFlagType.{4}, LongMarginRatioByMoney = {5}, LongMarginRatioByVolume = {6}, ShortMarginRatioByMoney = {7}, ShortMarginRatioByVolume = {8}, IsRelative = {9}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.LongMarginRatioByMoney, self.LongMarginRatioByVolume, self.ShortMarginRatioByMoney, self.ShortMarginRatioByVolume, self.IsRelative)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'LongMarginRatioByMoney': self.LongMarginRatioByMoney,'LongMarginRatioByVolume': self.LongMarginRatioByVolume,'ShortMarginRatioByMoney': self.ShortMarginRatioByMoney,'ShortMarginRatioByVolume': self.ShortMarginRatioByVolume,'IsRelative': self.IsRelative}

    def clone(self):
        obj=CThostFtdcInstrumentMarginRateAdjustField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.HedgeFlag=self.HedgeFlag
        obj.LongMarginRatioByMoney=self.LongMarginRatioByMoney
        obj.LongMarginRatioByVolume=self.LongMarginRatioByVolume
        obj.ShortMarginRatioByMoney=self.ShortMarginRatioByMoney
        obj.ShortMarginRatioByVolume=self.ShortMarginRatioByVolume
        obj.IsRelative=self.IsRelative
        return obj

class CThostFtdcExchangeMarginRateField(Structure):
    """交易所保证金率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 多头保证金率
        ("LongMarginRatioByMoney", c_double),
        # 多头保证金费
        ("LongMarginRatioByVolume", c_double),
        # 空头保证金率
        ("ShortMarginRatioByMoney", c_double),
        # 空头保证金费
        ("ShortMarginRatioByVolume", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getLongMarginRatioByMoney(self):
        return self.LongMarginRatioByMoney
    def getLongMarginRatioByVolume(self):
        return self.LongMarginRatioByVolume
    def getShortMarginRatioByMoney(self):
        return self.ShortMarginRatioByMoney
    def getShortMarginRatioByVolume(self):
        return self.ShortMarginRatioByVolume

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', HedgeFlag = HedgeFlagType.{2}, LongMarginRatioByMoney = {3}, LongMarginRatioByVolume = {4}, ShortMarginRatioByMoney = {5}, ShortMarginRatioByVolume = {6}, ExchangeID = \'{7}\''.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.LongMarginRatioByMoney, self.LongMarginRatioByVolume, self.ShortMarginRatioByMoney, self.ShortMarginRatioByVolume, str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'LongMarginRatioByMoney': self.LongMarginRatioByMoney,'LongMarginRatioByVolume': self.LongMarginRatioByVolume,'ShortMarginRatioByMoney': self.ShortMarginRatioByMoney,'ShortMarginRatioByVolume': self.ShortMarginRatioByVolume,'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeMarginRateField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        obj.LongMarginRatioByMoney=self.LongMarginRatioByMoney
        obj.LongMarginRatioByVolume=self.LongMarginRatioByVolume
        obj.ShortMarginRatioByMoney=self.ShortMarginRatioByMoney
        obj.ShortMarginRatioByVolume=self.ShortMarginRatioByVolume
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcExchangeMarginRateAdjustField(Structure):
    """交易所保证金率调整"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 跟随交易所投资者多头保证金率
        ("LongMarginRatioByMoney", c_double),
        # 跟随交易所投资者多头保证金费
        ("LongMarginRatioByVolume", c_double),
        # 跟随交易所投资者空头保证金率
        ("ShortMarginRatioByMoney", c_double),
        # 跟随交易所投资者空头保证金费
        ("ShortMarginRatioByVolume", c_double),
        # 交易所多头保证金率
        ("ExchLongMarginRatioByMoney", c_double),
        # 交易所多头保证金费
        ("ExchLongMarginRatioByVolume", c_double),
        # 交易所空头保证金率
        ("ExchShortMarginRatioByMoney", c_double),
        # 交易所空头保证金费
        ("ExchShortMarginRatioByVolume", c_double),
        # 不跟随交易所投资者多头保证金率
        ("NoLongMarginRatioByMoney", c_double),
        # 不跟随交易所投资者多头保证金费
        ("NoLongMarginRatioByVolume", c_double),
        # 不跟随交易所投资者空头保证金率
        ("NoShortMarginRatioByMoney", c_double),
        # 不跟随交易所投资者空头保证金费
        ("NoShortMarginRatioByVolume", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getLongMarginRatioByMoney(self):
        return self.LongMarginRatioByMoney
    def getLongMarginRatioByVolume(self):
        return self.LongMarginRatioByVolume
    def getShortMarginRatioByMoney(self):
        return self.ShortMarginRatioByMoney
    def getShortMarginRatioByVolume(self):
        return self.ShortMarginRatioByVolume
    def getExchLongMarginRatioByMoney(self):
        return self.ExchLongMarginRatioByMoney
    def getExchLongMarginRatioByVolume(self):
        return self.ExchLongMarginRatioByVolume
    def getExchShortMarginRatioByMoney(self):
        return self.ExchShortMarginRatioByMoney
    def getExchShortMarginRatioByVolume(self):
        return self.ExchShortMarginRatioByVolume
    def getNoLongMarginRatioByMoney(self):
        return self.NoLongMarginRatioByMoney
    def getNoLongMarginRatioByVolume(self):
        return self.NoLongMarginRatioByVolume
    def getNoShortMarginRatioByMoney(self):
        return self.NoShortMarginRatioByMoney
    def getNoShortMarginRatioByVolume(self):
        return self.NoShortMarginRatioByVolume

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', HedgeFlag = HedgeFlagType.{2}, LongMarginRatioByMoney = {3}, LongMarginRatioByVolume = {4}, ShortMarginRatioByMoney = {5}, ShortMarginRatioByVolume = {6}, ExchLongMarginRatioByMoney = {7}, ExchLongMarginRatioByVolume = {8}, ExchShortMarginRatioByMoney = {9}, ExchShortMarginRatioByVolume = {10}, NoLongMarginRatioByMoney = {11}, NoLongMarginRatioByVolume = {12}, NoShortMarginRatioByMoney = {13}, NoShortMarginRatioByVolume = {14}'.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.LongMarginRatioByMoney, self.LongMarginRatioByVolume, self.ShortMarginRatioByMoney, self.ShortMarginRatioByVolume, self.ExchLongMarginRatioByMoney, self.ExchLongMarginRatioByVolume, self.ExchShortMarginRatioByMoney, self.ExchShortMarginRatioByVolume, self.NoLongMarginRatioByMoney, self.NoLongMarginRatioByVolume, self.NoShortMarginRatioByMoney, self.NoShortMarginRatioByVolume)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'LongMarginRatioByMoney': self.LongMarginRatioByMoney,'LongMarginRatioByVolume': self.LongMarginRatioByVolume,'ShortMarginRatioByMoney': self.ShortMarginRatioByMoney,'ShortMarginRatioByVolume': self.ShortMarginRatioByVolume,'ExchLongMarginRatioByMoney': self.ExchLongMarginRatioByMoney,'ExchLongMarginRatioByVolume': self.ExchLongMarginRatioByVolume,'ExchShortMarginRatioByMoney': self.ExchShortMarginRatioByMoney,'ExchShortMarginRatioByVolume': self.ExchShortMarginRatioByVolume,'NoLongMarginRatioByMoney': self.NoLongMarginRatioByMoney,'NoLongMarginRatioByVolume': self.NoLongMarginRatioByVolume,'NoShortMarginRatioByMoney': self.NoShortMarginRatioByMoney,'NoShortMarginRatioByVolume': self.NoShortMarginRatioByVolume}

    def clone(self):
        obj=CThostFtdcExchangeMarginRateAdjustField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        obj.LongMarginRatioByMoney=self.LongMarginRatioByMoney
        obj.LongMarginRatioByVolume=self.LongMarginRatioByVolume
        obj.ShortMarginRatioByMoney=self.ShortMarginRatioByMoney
        obj.ShortMarginRatioByVolume=self.ShortMarginRatioByVolume
        obj.ExchLongMarginRatioByMoney=self.ExchLongMarginRatioByMoney
        obj.ExchLongMarginRatioByVolume=self.ExchLongMarginRatioByVolume
        obj.ExchShortMarginRatioByMoney=self.ExchShortMarginRatioByMoney
        obj.ExchShortMarginRatioByVolume=self.ExchShortMarginRatioByVolume
        obj.NoLongMarginRatioByMoney=self.NoLongMarginRatioByMoney
        obj.NoLongMarginRatioByVolume=self.NoLongMarginRatioByVolume
        obj.NoShortMarginRatioByMoney=self.NoShortMarginRatioByMoney
        obj.NoShortMarginRatioByVolume=self.NoShortMarginRatioByVolume
        return obj

class CThostFtdcExchangeRateField(Structure):
    """汇率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 源币种
        ("FromCurrencyID", c_char*4),
        # 源币种单位数量
        ("FromCurrencyUnit", c_double),
        # 目标币种
        ("ToCurrencyID", c_char*4),
        # 汇率
        ("ExchangeRate", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getFromCurrencyID(self):
        return str(self.FromCurrencyID, 'GB2312')
    def getFromCurrencyUnit(self):
        return self.FromCurrencyUnit

    def getToCurrencyID(self):
        return str(self.ToCurrencyID, 'GB2312')
    def getExchangeRate(self):
        return self.ExchangeRate

    def __str__(self):
        return 'BrokerID = \'{0}\', FromCurrencyID = \'{1}\', FromCurrencyUnit = {2}, ToCurrencyID = \'{3}\', ExchangeRate = {4}'.format(str(self.BrokerID, 'GB2312'), str(self.FromCurrencyID, 'GB2312'), self.FromCurrencyUnit, str(self.ToCurrencyID, 'GB2312'), self.ExchangeRate)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'FromCurrencyID': str(self.FromCurrencyID, 'GB2312'),'FromCurrencyUnit': self.FromCurrencyUnit,'ToCurrencyID': str(self.ToCurrencyID, 'GB2312'),'ExchangeRate': self.ExchangeRate}

    def clone(self):
        obj=CThostFtdcExchangeRateField()
        obj.BrokerID=self.BrokerID
        obj.FromCurrencyID=self.FromCurrencyID
        obj.FromCurrencyUnit=self.FromCurrencyUnit
        obj.ToCurrencyID=self.ToCurrencyID
        obj.ExchangeRate=self.ExchangeRate
        return obj

class CThostFtdcSettlementRefField(Structure):
    """结算引用"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def __str__(self):
        return 'TradingDay = \'{0}\', SettlementID = {1}'.format(str(self.TradingDay, 'GB2312'), self.SettlementID)

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID}

    def clone(self):
        obj=CThostFtdcSettlementRefField()
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        return obj

class CThostFtdcCurrentTimeField(Structure):
    """当前时间"""
    _fields_ = [
        # 当前日期
        ("CurrDate", c_char*9),
        # 当前时间
        ("CurrTime", c_char*9),
        # 当前时间（毫秒）
        ("CurrMillisec", c_int32),
        # 业务日期
        ("ActionDay", c_char*9),
        ]


    def getCurrDate(self):
        return str(self.CurrDate, 'GB2312')

    def getCurrTime(self):
        return str(self.CurrTime, 'GB2312')
    def getCurrMillisec(self):
        return self.CurrMillisec

    def getActionDay(self):
        return str(self.ActionDay, 'GB2312')

    def __str__(self):
        return 'CurrDate = \'{0}\', CurrTime = \'{1}\', CurrMillisec = {2}, ActionDay = \'{3}\''.format(str(self.CurrDate, 'GB2312'), str(self.CurrTime, 'GB2312'), self.CurrMillisec, str(self.ActionDay, 'GB2312'))

    @property
    def __dict__(self):
        return {'CurrDate': str(self.CurrDate, 'GB2312'),'CurrTime': str(self.CurrTime, 'GB2312'),'CurrMillisec': self.CurrMillisec,'ActionDay': str(self.ActionDay, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCurrentTimeField()
        obj.CurrDate=self.CurrDate
        obj.CurrTime=self.CurrTime
        obj.CurrMillisec=self.CurrMillisec
        obj.ActionDay=self.ActionDay
        return obj

class CThostFtdcCommPhaseField(Structure):
    """通讯阶段"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 通讯时段编号
        ("CommPhaseNo", c_int32),
        # 系统编号
        ("SystemID", c_char*21),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getCommPhaseNo(self):
        return self.CommPhaseNo

    def getSystemID(self):
        return str(self.SystemID, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', CommPhaseNo = {1}, SystemID = \'{2}\''.format(str(self.TradingDay, 'GB2312'), self.CommPhaseNo, str(self.SystemID, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'CommPhaseNo': self.CommPhaseNo,'SystemID': str(self.SystemID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCommPhaseField()
        obj.TradingDay=self.TradingDay
        obj.CommPhaseNo=self.CommPhaseNo
        obj.SystemID=self.SystemID
        return obj

class CThostFtdcLoginInfoField(Structure):
    """登录信息"""
    _fields_ = [
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 登录日期
        ("LoginDate", c_char*9),
        # 登录时间
        ("LoginTime", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 接口端产品信息
        ("InterfaceProductInfo", c_char*11),
        # 协议信息
        ("ProtocolInfo", c_char*11),
        # 系统名称
        ("SystemName", c_char*41),
        # 密码,已弃用
        ("PasswordDeprecated", c_char*41),
        # 最大报单引用
        ("MaxOrderRef", c_char*13),
        # 上期所时间
        ("SHFETime", c_char*9),
        # 大商所时间
        ("DCETime", c_char*9),
        # 郑商所时间
        ("CZCETime", c_char*9),
        # 中金所时间
        ("FFEXTime", c_char*9),
        # Mac地址
        ("MacAddress", c_char*21),
        # 动态密码
        ("OneTimePassword", c_char*41),
        # 能源中心时间
        ("INETime", c_char*9),
        # 查询时是否需要流控
        ("IsQryControl", c_int32),
        # 登录备注
        ("LoginRemark", c_char*36),
        # 密码
        ("Password", c_char*41),
        ]

    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getLoginDate(self):
        return str(self.LoginDate, 'GB2312')

    def getLoginTime(self):
        return str(self.LoginTime, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getInterfaceProductInfo(self):
        return str(self.InterfaceProductInfo, 'GB2312')

    def getProtocolInfo(self):
        return str(self.ProtocolInfo, 'GB2312')

    def getSystemName(self):
        return str(self.SystemName, 'GB2312')

    def getPasswordDeprecated(self):
        return str(self.PasswordDeprecated, 'GB2312')

    def getMaxOrderRef(self):
        return str(self.MaxOrderRef, 'GB2312')

    def getSHFETime(self):
        return str(self.SHFETime, 'GB2312')

    def getDCETime(self):
        return str(self.DCETime, 'GB2312')

    def getCZCETime(self):
        return str(self.CZCETime, 'GB2312')

    def getFFEXTime(self):
        return str(self.FFEXTime, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def getOneTimePassword(self):
        return str(self.OneTimePassword, 'GB2312')

    def getINETime(self):
        return str(self.INETime, 'GB2312')
    def getIsQryControl(self):
        return self.IsQryControl

    def getLoginRemark(self):
        return str(self.LoginRemark, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def __str__(self):
        return 'FrontID = {0}, SessionID = {1}, BrokerID = \'{2}\', UserID = \'{3}\', LoginDate = \'{4}\', LoginTime = \'{5}\', IPAddress = \'{6}\', UserProductInfo = \'{7}\', InterfaceProductInfo = \'{8}\', ProtocolInfo = \'{9}\', SystemName = \'{10}\', PasswordDeprecated = \'{11}\', MaxOrderRef = \'{12}\', SHFETime = \'{13}\', DCETime = \'{14}\', CZCETime = \'{15}\', FFEXTime = \'{16}\', MacAddress = \'{17}\', OneTimePassword = \'{18}\', INETime = \'{19}\', IsQryControl = {20}, LoginRemark = \'{21}\', Password = \'{22}\''.format(self.FrontID, self.SessionID, str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.LoginDate, 'GB2312'), str(self.LoginTime, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.UserProductInfo, 'GB2312'), str(self.InterfaceProductInfo, 'GB2312'), str(self.ProtocolInfo, 'GB2312'), str(self.SystemName, 'GB2312'), str(self.PasswordDeprecated, 'GB2312'), str(self.MaxOrderRef, 'GB2312'), str(self.SHFETime, 'GB2312'), str(self.DCETime, 'GB2312'), str(self.CZCETime, 'GB2312'), str(self.FFEXTime, 'GB2312'), str(self.MacAddress, 'GB2312'), str(self.OneTimePassword, 'GB2312'), str(self.INETime, 'GB2312'), self.IsQryControl, str(self.LoginRemark, 'GB2312'), str(self.Password, 'GB2312'))

    @property
    def __dict__(self):
        return {'FrontID': self.FrontID,'SessionID': self.SessionID,'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'LoginDate': str(self.LoginDate, 'GB2312'),'LoginTime': str(self.LoginTime, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'InterfaceProductInfo': str(self.InterfaceProductInfo, 'GB2312'),'ProtocolInfo': str(self.ProtocolInfo, 'GB2312'),'SystemName': str(self.SystemName, 'GB2312'),'PasswordDeprecated': str(self.PasswordDeprecated, 'GB2312'),'MaxOrderRef': str(self.MaxOrderRef, 'GB2312'),'SHFETime': str(self.SHFETime, 'GB2312'),'DCETime': str(self.DCETime, 'GB2312'),'CZCETime': str(self.CZCETime, 'GB2312'),'FFEXTime': str(self.FFEXTime, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'OneTimePassword': str(self.OneTimePassword, 'GB2312'),'INETime': str(self.INETime, 'GB2312'),'IsQryControl': self.IsQryControl,'LoginRemark': str(self.LoginRemark, 'GB2312'),'Password': str(self.Password, 'GB2312')}

    def clone(self):
        obj=CThostFtdcLoginInfoField()
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.LoginDate=self.LoginDate
        obj.LoginTime=self.LoginTime
        obj.IPAddress=self.IPAddress
        obj.UserProductInfo=self.UserProductInfo
        obj.InterfaceProductInfo=self.InterfaceProductInfo
        obj.ProtocolInfo=self.ProtocolInfo
        obj.SystemName=self.SystemName
        obj.PasswordDeprecated=self.PasswordDeprecated
        obj.MaxOrderRef=self.MaxOrderRef
        obj.SHFETime=self.SHFETime
        obj.DCETime=self.DCETime
        obj.CZCETime=self.CZCETime
        obj.FFEXTime=self.FFEXTime
        obj.MacAddress=self.MacAddress
        obj.OneTimePassword=self.OneTimePassword
        obj.INETime=self.INETime
        obj.IsQryControl=self.IsQryControl
        obj.LoginRemark=self.LoginRemark
        obj.Password=self.Password
        return obj

class CThostFtdcLogoutAllField(Structure):
    """登录信息"""
    _fields_ = [
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 系统名称
        ("SystemName", c_char*41),
        ]

    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getSystemName(self):
        return str(self.SystemName, 'GB2312')

    def __str__(self):
        return 'FrontID = {0}, SessionID = {1}, SystemName = \'{2}\''.format(self.FrontID, self.SessionID, str(self.SystemName, 'GB2312'))

    @property
    def __dict__(self):
        return {'FrontID': self.FrontID,'SessionID': self.SessionID,'SystemName': str(self.SystemName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcLogoutAllField()
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.SystemName=self.SystemName
        return obj

class CThostFtdcFrontStatusField(Structure):
    """前置状态"""
    _fields_ = [
        # 前置编号
        ("FrontID", c_int32),
        # 上次报告日期
        ("LastReportDate", c_char*9),
        # 上次报告时间
        ("LastReportTime", c_char*9),
        # 是否活跃
        ("IsActive", c_int32),
        ]

    def getFrontID(self):
        return self.FrontID

    def getLastReportDate(self):
        return str(self.LastReportDate, 'GB2312')

    def getLastReportTime(self):
        return str(self.LastReportTime, 'GB2312')
    def getIsActive(self):
        return self.IsActive

    def __str__(self):
        return 'FrontID = {0}, LastReportDate = \'{1}\', LastReportTime = \'{2}\', IsActive = {3}'.format(self.FrontID, str(self.LastReportDate, 'GB2312'), str(self.LastReportTime, 'GB2312'), self.IsActive)

    @property
    def __dict__(self):
        return {'FrontID': self.FrontID,'LastReportDate': str(self.LastReportDate, 'GB2312'),'LastReportTime': str(self.LastReportTime, 'GB2312'),'IsActive': self.IsActive}

    def clone(self):
        obj=CThostFtdcFrontStatusField()
        obj.FrontID=self.FrontID
        obj.LastReportDate=self.LastReportDate
        obj.LastReportTime=self.LastReportTime
        obj.IsActive=self.IsActive
        return obj

class CThostFtdcUserPasswordUpdateField(Structure):
    """用户口令变更"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 原来的口令
        ("OldPassword", c_char*41),
        # 新的口令
        ("NewPassword", c_char*41),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getOldPassword(self):
        return str(self.OldPassword, 'GB2312')

    def getNewPassword(self):
        return str(self.NewPassword, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', OldPassword = \'{2}\', NewPassword = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.OldPassword, 'GB2312'), str(self.NewPassword, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OldPassword': str(self.OldPassword, 'GB2312'),'NewPassword': str(self.NewPassword, 'GB2312')}

    def clone(self):
        obj=CThostFtdcUserPasswordUpdateField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.OldPassword=self.OldPassword
        obj.NewPassword=self.NewPassword
        return obj

class CThostFtdcInputOrderField(Structure):
    """输入报单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报单引用
        ("OrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 报单价格条件
        ("OrderPriceType", c_char),
        # 买卖方向
        ("Direction", c_char),
        # 组合开平标志
        ("CombOffsetFlag", c_char*5),
        # 组合投机套保标志
        ("CombHedgeFlag", c_char*5),
        # 价格
        ("LimitPrice", c_double),
        # 数量
        ("VolumeTotalOriginal", c_int32),
        # 有效期类型
        ("TimeCondition", c_char),
        # GTD日期
        ("GTDDate", c_char*9),
        # 成交量类型
        ("VolumeCondition", c_char),
        # 最小成交量
        ("MinVolume", c_int32),
        # 触发条件
        ("ContingentCondition", c_char),
        # 止损价
        ("StopPrice", c_double),
        # 强平原因
        ("ForceCloseReason", c_char),
        # 自动挂起标志
        ("IsAutoSuspend", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 请求编号
        ("RequestID", c_int32),
        # 用户强评标志
        ("UserForceClose", c_int32),
        # 互换单标志
        ("IsSwapOrder", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 交易编码
        ("ClientID", c_char*11),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getOrderPriceType(self):
        return OrderPriceTypeType(ord(self.OrderPriceType))
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getCombOffsetFlag(self):
        return str(self.CombOffsetFlag, 'GB2312')

    def getCombHedgeFlag(self):
        return str(self.CombHedgeFlag, 'GB2312')
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeTotalOriginal(self):
        return self.VolumeTotalOriginal
    def getTimeCondition(self):
        return TimeConditionType(ord(self.TimeCondition))

    def getGTDDate(self):
        return str(self.GTDDate, 'GB2312')
    def getVolumeCondition(self):
        return VolumeConditionType(ord(self.VolumeCondition))
    def getMinVolume(self):
        return self.MinVolume
    def getContingentCondition(self):
        return ContingentConditionType(ord(self.ContingentCondition))
    def getStopPrice(self):
        return self.StopPrice
    def getForceCloseReason(self):
        return ForceCloseReasonType(ord(self.ForceCloseReason))
    def getIsAutoSuspend(self):
        return self.IsAutoSuspend

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getUserForceClose(self):
        return self.UserForceClose
    def getIsSwapOrder(self):
        return self.IsSwapOrder

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OrderRef = \'{3}\', UserID = \'{4}\', OrderPriceType = OrderPriceTypeType.{5}, Direction = DirectionType.{6}, CombOffsetFlag = \'{7}\', CombHedgeFlag = \'{8}\', LimitPrice = {9}, VolumeTotalOriginal = {10}, TimeCondition = TimeConditionType.{11}, GTDDate = \'{12}\', VolumeCondition = VolumeConditionType.{13}, MinVolume = {14}, ContingentCondition = ContingentConditionType.{15}, StopPrice = {16}, ForceCloseReason = ForceCloseReasonType.{17}, IsAutoSuspend = {18}, BusinessUnit = \'{19}\', RequestID = {20}, UserForceClose = {21}, IsSwapOrder = {22}, ExchangeID = \'{23}\', InvestUnitID = \'{24}\', AccountID = \'{25}\', CurrencyID = \'{26}\', ClientID = \'{27}\', IPAddress = \'{28}\', MacAddress = \'{29}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OrderRef, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.CombOffsetFlag, 'GB2312'), str(self.CombHedgeFlag, 'GB2312'), self.LimitPrice, self.VolumeTotalOriginal, '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name, str(self.GTDDate, 'GB2312'), '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name, self.MinVolume, '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name, self.StopPrice, '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name, self.IsAutoSuspend, str(self.BusinessUnit, 'GB2312'), self.RequestID, self.UserForceClose, self.IsSwapOrder, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OrderRef': str(self.OrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OrderPriceType': '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'CombOffsetFlag': str(self.CombOffsetFlag, 'GB2312'),'CombHedgeFlag': str(self.CombHedgeFlag, 'GB2312'),'LimitPrice': self.LimitPrice,'VolumeTotalOriginal': self.VolumeTotalOriginal,'TimeCondition': '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name,'GTDDate': str(self.GTDDate, 'GB2312'),'VolumeCondition': '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name,'MinVolume': self.MinVolume,'ContingentCondition': '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name,'StopPrice': self.StopPrice,'ForceCloseReason': '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name,'IsAutoSuspend': self.IsAutoSuspend,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'RequestID': self.RequestID,'UserForceClose': self.UserForceClose,'IsSwapOrder': self.IsSwapOrder,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OrderRef=self.OrderRef
        obj.UserID=self.UserID
        obj.OrderPriceType=self.OrderPriceType
        obj.Direction=self.Direction
        obj.CombOffsetFlag=self.CombOffsetFlag
        obj.CombHedgeFlag=self.CombHedgeFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeTotalOriginal=self.VolumeTotalOriginal
        obj.TimeCondition=self.TimeCondition
        obj.GTDDate=self.GTDDate
        obj.VolumeCondition=self.VolumeCondition
        obj.MinVolume=self.MinVolume
        obj.ContingentCondition=self.ContingentCondition
        obj.StopPrice=self.StopPrice
        obj.ForceCloseReason=self.ForceCloseReason
        obj.IsAutoSuspend=self.IsAutoSuspend
        obj.BusinessUnit=self.BusinessUnit
        obj.RequestID=self.RequestID
        obj.UserForceClose=self.UserForceClose
        obj.IsSwapOrder=self.IsSwapOrder
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.ClientID=self.ClientID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcOrderField(Structure):
    """报单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报单引用
        ("OrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 报单价格条件
        ("OrderPriceType", c_char),
        # 买卖方向
        ("Direction", c_char),
        # 组合开平标志
        ("CombOffsetFlag", c_char*5),
        # 组合投机套保标志
        ("CombHedgeFlag", c_char*5),
        # 价格
        ("LimitPrice", c_double),
        # 数量
        ("VolumeTotalOriginal", c_int32),
        # 有效期类型
        ("TimeCondition", c_char),
        # GTD日期
        ("GTDDate", c_char*9),
        # 成交量类型
        ("VolumeCondition", c_char),
        # 最小成交量
        ("MinVolume", c_int32),
        # 触发条件
        ("ContingentCondition", c_char),
        # 止损价
        ("StopPrice", c_double),
        # 强平原因
        ("ForceCloseReason", c_char),
        # 自动挂起标志
        ("IsAutoSuspend", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 请求编号
        ("RequestID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 报单提交状态
        ("OrderSubmitStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 报单来源
        ("OrderSource", c_char),
        # 报单状态
        ("OrderStatus", c_char),
        # 报单类型
        ("OrderType", c_char),
        # 今成交数量
        ("VolumeTraded", c_int32),
        # 剩余数量
        ("VolumeTotal", c_int32),
        # 报单日期
        ("InsertDate", c_char*9),
        # 委托时间
        ("InsertTime", c_char*9),
        # 激活时间
        ("ActiveTime", c_char*9),
        # 挂起时间
        ("SuspendTime", c_char*9),
        # 最后修改时间
        ("UpdateTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 最后修改交易所交易员代码
        ("ActiveTraderID", c_char*21),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 用户强评标志
        ("UserForceClose", c_int32),
        # 操作用户代码
        ("ActiveUserID", c_char*16),
        # 经纪公司报单编号
        ("BrokerOrderSeq", c_int32),
        # 相关报单
        ("RelativeOrderSysID", c_char*21),
        # 郑商所成交数量
        ("ZCETotalTradedVolume", c_int32),
        # 互换单标志
        ("IsSwapOrder", c_int32),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getOrderPriceType(self):
        return OrderPriceTypeType(ord(self.OrderPriceType))
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getCombOffsetFlag(self):
        return str(self.CombOffsetFlag, 'GB2312')

    def getCombHedgeFlag(self):
        return str(self.CombHedgeFlag, 'GB2312')
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeTotalOriginal(self):
        return self.VolumeTotalOriginal
    def getTimeCondition(self):
        return TimeConditionType(ord(self.TimeCondition))

    def getGTDDate(self):
        return str(self.GTDDate, 'GB2312')
    def getVolumeCondition(self):
        return VolumeConditionType(ord(self.VolumeCondition))
    def getMinVolume(self):
        return self.MinVolume
    def getContingentCondition(self):
        return ContingentConditionType(ord(self.ContingentCondition))
    def getStopPrice(self):
        return self.StopPrice
    def getForceCloseReason(self):
        return ForceCloseReasonType(ord(self.ForceCloseReason))
    def getIsAutoSuspend(self):
        return self.IsAutoSuspend

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getRequestID(self):
        return self.RequestID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getOrderSource(self):
        return OrderSourceType(ord(self.OrderSource))
    def getOrderStatus(self):
        return OrderStatusType(ord(self.OrderStatus))
    def getOrderType(self):
        return OrderTypeType(ord(self.OrderType))
    def getVolumeTraded(self):
        return self.VolumeTraded
    def getVolumeTotal(self):
        return self.VolumeTotal

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getActiveTime(self):
        return str(self.ActiveTime, 'GB2312')

    def getSuspendTime(self):
        return str(self.SuspendTime, 'GB2312')

    def getUpdateTime(self):
        return str(self.UpdateTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')

    def getActiveTraderID(self):
        return str(self.ActiveTraderID, 'GB2312')

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')
    def getUserForceClose(self):
        return self.UserForceClose

    def getActiveUserID(self):
        return str(self.ActiveUserID, 'GB2312')
    def getBrokerOrderSeq(self):
        return self.BrokerOrderSeq

    def getRelativeOrderSysID(self):
        return str(self.RelativeOrderSysID, 'GB2312')
    def getZCETotalTradedVolume(self):
        return self.ZCETotalTradedVolume
    def getIsSwapOrder(self):
        return self.IsSwapOrder

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OrderRef = \'{3}\', UserID = \'{4}\', OrderPriceType = OrderPriceTypeType.{5}, Direction = DirectionType.{6}, CombOffsetFlag = \'{7}\', CombHedgeFlag = \'{8}\', LimitPrice = {9}, VolumeTotalOriginal = {10}, TimeCondition = TimeConditionType.{11}, GTDDate = \'{12}\', VolumeCondition = VolumeConditionType.{13}, MinVolume = {14}, ContingentCondition = ContingentConditionType.{15}, StopPrice = {16}, ForceCloseReason = ForceCloseReasonType.{17}, IsAutoSuspend = {18}, BusinessUnit = \'{19}\', RequestID = {20}, OrderLocalID = \'{21}\', ExchangeID = \'{22}\', ParticipantID = \'{23}\', ClientID = \'{24}\', ExchangeInstID = \'{25}\', TraderID = \'{26}\', InstallID = {27}, OrderSubmitStatus = OrderSubmitStatusType.{28}, NotifySequence = {29}, TradingDay = \'{30}\', SettlementID = {31}, OrderSysID = \'{32}\', OrderSource = OrderSourceType.{33}, OrderStatus = OrderStatusType.{34}, OrderType = OrderTypeType.{35}, VolumeTraded = {36}, VolumeTotal = {37}, InsertDate = \'{38}\', InsertTime = \'{39}\', ActiveTime = \'{40}\', SuspendTime = \'{41}\', UpdateTime = \'{42}\', CancelTime = \'{43}\', ActiveTraderID = \'{44}\', ClearingPartID = \'{45}\', SequenceNo = {46}, FrontID = {47}, SessionID = {48}, UserProductInfo = \'{49}\', StatusMsg = \'{50}\', UserForceClose = {51}, ActiveUserID = \'{52}\', BrokerOrderSeq = {53}, RelativeOrderSysID = \'{54}\', ZCETotalTradedVolume = {55}, IsSwapOrder = {56}, BranchID = \'{57}\', InvestUnitID = \'{58}\', AccountID = \'{59}\', CurrencyID = \'{60}\', IPAddress = \'{61}\', MacAddress = \'{62}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OrderRef, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.CombOffsetFlag, 'GB2312'), str(self.CombHedgeFlag, 'GB2312'), self.LimitPrice, self.VolumeTotalOriginal, '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name, str(self.GTDDate, 'GB2312'), '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name, self.MinVolume, '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name, self.StopPrice, '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name, self.IsAutoSuspend, str(self.BusinessUnit, 'GB2312'), self.RequestID, str(self.OrderLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.OrderSysID, 'GB2312'), '' if ord(self.OrderSource) == 0 else OrderSourceType(ord(self.OrderSource)).name, '' if ord(self.OrderStatus) == 0 else OrderStatusType(ord(self.OrderStatus)).name, '' if ord(self.OrderType) == 0 else OrderTypeType(ord(self.OrderType)).name, self.VolumeTraded, self.VolumeTotal, str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.ActiveTime, 'GB2312'), str(self.SuspendTime, 'GB2312'), str(self.UpdateTime, 'GB2312'), str(self.CancelTime, 'GB2312'), str(self.ActiveTraderID, 'GB2312'), str(self.ClearingPartID, 'GB2312'), self.SequenceNo, self.FrontID, self.SessionID, str(self.UserProductInfo, 'GB2312'), str(self.StatusMsg, 'GB2312'), self.UserForceClose, str(self.ActiveUserID, 'GB2312'), self.BrokerOrderSeq, str(self.RelativeOrderSysID, 'GB2312'), self.ZCETotalTradedVolume, self.IsSwapOrder, str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OrderRef': str(self.OrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OrderPriceType': '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'CombOffsetFlag': str(self.CombOffsetFlag, 'GB2312'),'CombHedgeFlag': str(self.CombHedgeFlag, 'GB2312'),'LimitPrice': self.LimitPrice,'VolumeTotalOriginal': self.VolumeTotalOriginal,'TimeCondition': '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name,'GTDDate': str(self.GTDDate, 'GB2312'),'VolumeCondition': '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name,'MinVolume': self.MinVolume,'ContingentCondition': '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name,'StopPrice': self.StopPrice,'ForceCloseReason': '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name,'IsAutoSuspend': self.IsAutoSuspend,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'RequestID': self.RequestID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'OrderSysID': str(self.OrderSysID, 'GB2312'),'OrderSource': '' if ord(self.OrderSource) == 0 else OrderSourceType(ord(self.OrderSource)).name,'OrderStatus': '' if ord(self.OrderStatus) == 0 else OrderStatusType(ord(self.OrderStatus)).name,'OrderType': '' if ord(self.OrderType) == 0 else OrderTypeType(ord(self.OrderType)).name,'VolumeTraded': self.VolumeTraded,'VolumeTotal': self.VolumeTotal,'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'ActiveTime': str(self.ActiveTime, 'GB2312'),'SuspendTime': str(self.SuspendTime, 'GB2312'),'UpdateTime': str(self.UpdateTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'ActiveTraderID': str(self.ActiveTraderID, 'GB2312'),'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'FrontID': self.FrontID,'SessionID': self.SessionID,'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'UserForceClose': self.UserForceClose,'ActiveUserID': str(self.ActiveUserID, 'GB2312'),'BrokerOrderSeq': self.BrokerOrderSeq,'RelativeOrderSysID': str(self.RelativeOrderSysID, 'GB2312'),'ZCETotalTradedVolume': self.ZCETotalTradedVolume,'IsSwapOrder': self.IsSwapOrder,'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OrderRef=self.OrderRef
        obj.UserID=self.UserID
        obj.OrderPriceType=self.OrderPriceType
        obj.Direction=self.Direction
        obj.CombOffsetFlag=self.CombOffsetFlag
        obj.CombHedgeFlag=self.CombHedgeFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeTotalOriginal=self.VolumeTotalOriginal
        obj.TimeCondition=self.TimeCondition
        obj.GTDDate=self.GTDDate
        obj.VolumeCondition=self.VolumeCondition
        obj.MinVolume=self.MinVolume
        obj.ContingentCondition=self.ContingentCondition
        obj.StopPrice=self.StopPrice
        obj.ForceCloseReason=self.ForceCloseReason
        obj.IsAutoSuspend=self.IsAutoSuspend
        obj.BusinessUnit=self.BusinessUnit
        obj.RequestID=self.RequestID
        obj.OrderLocalID=self.OrderLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.OrderSysID=self.OrderSysID
        obj.OrderSource=self.OrderSource
        obj.OrderStatus=self.OrderStatus
        obj.OrderType=self.OrderType
        obj.VolumeTraded=self.VolumeTraded
        obj.VolumeTotal=self.VolumeTotal
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.ActiveTime=self.ActiveTime
        obj.SuspendTime=self.SuspendTime
        obj.UpdateTime=self.UpdateTime
        obj.CancelTime=self.CancelTime
        obj.ActiveTraderID=self.ActiveTraderID
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.UserProductInfo=self.UserProductInfo
        obj.StatusMsg=self.StatusMsg
        obj.UserForceClose=self.UserForceClose
        obj.ActiveUserID=self.ActiveUserID
        obj.BrokerOrderSeq=self.BrokerOrderSeq
        obj.RelativeOrderSysID=self.RelativeOrderSysID
        obj.ZCETotalTradedVolume=self.ZCETotalTradedVolume
        obj.IsSwapOrder=self.IsSwapOrder
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcExchangeOrderField(Structure):
    """交易所报单"""
    _fields_ = [
        # 报单价格条件
        ("OrderPriceType", c_char),
        # 买卖方向
        ("Direction", c_char),
        # 组合开平标志
        ("CombOffsetFlag", c_char*5),
        # 组合投机套保标志
        ("CombHedgeFlag", c_char*5),
        # 价格
        ("LimitPrice", c_double),
        # 数量
        ("VolumeTotalOriginal", c_int32),
        # 有效期类型
        ("TimeCondition", c_char),
        # GTD日期
        ("GTDDate", c_char*9),
        # 成交量类型
        ("VolumeCondition", c_char),
        # 最小成交量
        ("MinVolume", c_int32),
        # 触发条件
        ("ContingentCondition", c_char),
        # 止损价
        ("StopPrice", c_double),
        # 强平原因
        ("ForceCloseReason", c_char),
        # 自动挂起标志
        ("IsAutoSuspend", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 请求编号
        ("RequestID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 报单提交状态
        ("OrderSubmitStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 报单来源
        ("OrderSource", c_char),
        # 报单状态
        ("OrderStatus", c_char),
        # 报单类型
        ("OrderType", c_char),
        # 今成交数量
        ("VolumeTraded", c_int32),
        # 剩余数量
        ("VolumeTotal", c_int32),
        # 报单日期
        ("InsertDate", c_char*9),
        # 委托时间
        ("InsertTime", c_char*9),
        # 激活时间
        ("ActiveTime", c_char*9),
        # 挂起时间
        ("SuspendTime", c_char*9),
        # 最后修改时间
        ("UpdateTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 最后修改交易所交易员代码
        ("ActiveTraderID", c_char*21),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 营业部编号
        ("BranchID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]

    def getOrderPriceType(self):
        return OrderPriceTypeType(ord(self.OrderPriceType))
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getCombOffsetFlag(self):
        return str(self.CombOffsetFlag, 'GB2312')

    def getCombHedgeFlag(self):
        return str(self.CombHedgeFlag, 'GB2312')
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeTotalOriginal(self):
        return self.VolumeTotalOriginal
    def getTimeCondition(self):
        return TimeConditionType(ord(self.TimeCondition))

    def getGTDDate(self):
        return str(self.GTDDate, 'GB2312')
    def getVolumeCondition(self):
        return VolumeConditionType(ord(self.VolumeCondition))
    def getMinVolume(self):
        return self.MinVolume
    def getContingentCondition(self):
        return ContingentConditionType(ord(self.ContingentCondition))
    def getStopPrice(self):
        return self.StopPrice
    def getForceCloseReason(self):
        return ForceCloseReasonType(ord(self.ForceCloseReason))
    def getIsAutoSuspend(self):
        return self.IsAutoSuspend

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getRequestID(self):
        return self.RequestID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getOrderSource(self):
        return OrderSourceType(ord(self.OrderSource))
    def getOrderStatus(self):
        return OrderStatusType(ord(self.OrderStatus))
    def getOrderType(self):
        return OrderTypeType(ord(self.OrderType))
    def getVolumeTraded(self):
        return self.VolumeTraded
    def getVolumeTotal(self):
        return self.VolumeTotal

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getActiveTime(self):
        return str(self.ActiveTime, 'GB2312')

    def getSuspendTime(self):
        return str(self.SuspendTime, 'GB2312')

    def getUpdateTime(self):
        return str(self.UpdateTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')

    def getActiveTraderID(self):
        return str(self.ActiveTraderID, 'GB2312')

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'OrderPriceType = OrderPriceTypeType.{0}, Direction = DirectionType.{1}, CombOffsetFlag = \'{2}\', CombHedgeFlag = \'{3}\', LimitPrice = {4}, VolumeTotalOriginal = {5}, TimeCondition = TimeConditionType.{6}, GTDDate = \'{7}\', VolumeCondition = VolumeConditionType.{8}, MinVolume = {9}, ContingentCondition = ContingentConditionType.{10}, StopPrice = {11}, ForceCloseReason = ForceCloseReasonType.{12}, IsAutoSuspend = {13}, BusinessUnit = \'{14}\', RequestID = {15}, OrderLocalID = \'{16}\', ExchangeID = \'{17}\', ParticipantID = \'{18}\', ClientID = \'{19}\', ExchangeInstID = \'{20}\', TraderID = \'{21}\', InstallID = {22}, OrderSubmitStatus = OrderSubmitStatusType.{23}, NotifySequence = {24}, TradingDay = \'{25}\', SettlementID = {26}, OrderSysID = \'{27}\', OrderSource = OrderSourceType.{28}, OrderStatus = OrderStatusType.{29}, OrderType = OrderTypeType.{30}, VolumeTraded = {31}, VolumeTotal = {32}, InsertDate = \'{33}\', InsertTime = \'{34}\', ActiveTime = \'{35}\', SuspendTime = \'{36}\', UpdateTime = \'{37}\', CancelTime = \'{38}\', ActiveTraderID = \'{39}\', ClearingPartID = \'{40}\', SequenceNo = {41}, BranchID = \'{42}\', IPAddress = \'{43}\', MacAddress = \'{44}\''.format('' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.CombOffsetFlag, 'GB2312'), str(self.CombHedgeFlag, 'GB2312'), self.LimitPrice, self.VolumeTotalOriginal, '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name, str(self.GTDDate, 'GB2312'), '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name, self.MinVolume, '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name, self.StopPrice, '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name, self.IsAutoSuspend, str(self.BusinessUnit, 'GB2312'), self.RequestID, str(self.OrderLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.OrderSysID, 'GB2312'), '' if ord(self.OrderSource) == 0 else OrderSourceType(ord(self.OrderSource)).name, '' if ord(self.OrderStatus) == 0 else OrderStatusType(ord(self.OrderStatus)).name, '' if ord(self.OrderType) == 0 else OrderTypeType(ord(self.OrderType)).name, self.VolumeTraded, self.VolumeTotal, str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.ActiveTime, 'GB2312'), str(self.SuspendTime, 'GB2312'), str(self.UpdateTime, 'GB2312'), str(self.CancelTime, 'GB2312'), str(self.ActiveTraderID, 'GB2312'), str(self.ClearingPartID, 'GB2312'), self.SequenceNo, str(self.BranchID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'OrderPriceType': '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'CombOffsetFlag': str(self.CombOffsetFlag, 'GB2312'),'CombHedgeFlag': str(self.CombHedgeFlag, 'GB2312'),'LimitPrice': self.LimitPrice,'VolumeTotalOriginal': self.VolumeTotalOriginal,'TimeCondition': '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name,'GTDDate': str(self.GTDDate, 'GB2312'),'VolumeCondition': '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name,'MinVolume': self.MinVolume,'ContingentCondition': '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name,'StopPrice': self.StopPrice,'ForceCloseReason': '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name,'IsAutoSuspend': self.IsAutoSuspend,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'RequestID': self.RequestID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'OrderSysID': str(self.OrderSysID, 'GB2312'),'OrderSource': '' if ord(self.OrderSource) == 0 else OrderSourceType(ord(self.OrderSource)).name,'OrderStatus': '' if ord(self.OrderStatus) == 0 else OrderStatusType(ord(self.OrderStatus)).name,'OrderType': '' if ord(self.OrderType) == 0 else OrderTypeType(ord(self.OrderType)).name,'VolumeTraded': self.VolumeTraded,'VolumeTotal': self.VolumeTotal,'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'ActiveTime': str(self.ActiveTime, 'GB2312'),'SuspendTime': str(self.SuspendTime, 'GB2312'),'UpdateTime': str(self.UpdateTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'ActiveTraderID': str(self.ActiveTraderID, 'GB2312'),'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'BranchID': str(self.BranchID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeOrderField()
        obj.OrderPriceType=self.OrderPriceType
        obj.Direction=self.Direction
        obj.CombOffsetFlag=self.CombOffsetFlag
        obj.CombHedgeFlag=self.CombHedgeFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeTotalOriginal=self.VolumeTotalOriginal
        obj.TimeCondition=self.TimeCondition
        obj.GTDDate=self.GTDDate
        obj.VolumeCondition=self.VolumeCondition
        obj.MinVolume=self.MinVolume
        obj.ContingentCondition=self.ContingentCondition
        obj.StopPrice=self.StopPrice
        obj.ForceCloseReason=self.ForceCloseReason
        obj.IsAutoSuspend=self.IsAutoSuspend
        obj.BusinessUnit=self.BusinessUnit
        obj.RequestID=self.RequestID
        obj.OrderLocalID=self.OrderLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.OrderSysID=self.OrderSysID
        obj.OrderSource=self.OrderSource
        obj.OrderStatus=self.OrderStatus
        obj.OrderType=self.OrderType
        obj.VolumeTraded=self.VolumeTraded
        obj.VolumeTotal=self.VolumeTotal
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.ActiveTime=self.ActiveTime
        obj.SuspendTime=self.SuspendTime
        obj.UpdateTime=self.UpdateTime
        obj.CancelTime=self.CancelTime
        obj.ActiveTraderID=self.ActiveTraderID
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.BranchID=self.BranchID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcExchangeOrderInsertErrorField(Structure):
    """交易所报单插入失败"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', ParticipantID = \'{1}\', TraderID = \'{2}\', InstallID = {3}, OrderLocalID = \'{4}\', ErrorID = {5}, ErrorMsg = \'{6}\''.format(str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.OrderLocalID, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeOrderInsertErrorField()
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderLocalID=self.OrderLocalID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcInputOrderActionField(Structure):
    """输入报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报单操作引用
        ("OrderActionRef", c_int32),
        # 报单引用
        ("OrderRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 价格
        ("LimitPrice", c_double),
        # 数量变化
        ("VolumeChange", c_int32),
        # 用户代码
        ("UserID", c_char*16),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOrderActionRef(self):
        return self.OrderActionRef

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeChange(self):
        return self.VolumeChange

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OrderActionRef = {2}, OrderRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', OrderSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, LimitPrice = {10}, VolumeChange = {11}, UserID = \'{12}\', InstrumentID = \'{13}\', InvestUnitID = \'{14}\', IPAddress = \'{15}\', MacAddress = \'{16}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OrderActionRef, str(self.OrderRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, self.LimitPrice, self.VolumeChange, str(self.UserID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OrderActionRef': self.OrderActionRef,'OrderRef': str(self.OrderRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'LimitPrice': self.LimitPrice,'VolumeChange': self.VolumeChange,'UserID': str(self.UserID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OrderActionRef=self.OrderActionRef
        obj.OrderRef=self.OrderRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeChange=self.VolumeChange
        obj.UserID=self.UserID
        obj.InstrumentID=self.InstrumentID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcOrderActionField(Structure):
    """报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报单操作引用
        ("OrderActionRef", c_int32),
        # 报单引用
        ("OrderRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 价格
        ("LimitPrice", c_double),
        # 数量变化
        ("VolumeChange", c_int32),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOrderActionRef(self):
        return self.OrderActionRef

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeChange(self):
        return self.VolumeChange

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OrderActionRef = {2}, OrderRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', OrderSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, LimitPrice = {10}, VolumeChange = {11}, ActionDate = \'{12}\', ActionTime = \'{13}\', TraderID = \'{14}\', InstallID = {15}, OrderLocalID = \'{16}\', ActionLocalID = \'{17}\', ParticipantID = \'{18}\', ClientID = \'{19}\', BusinessUnit = \'{20}\', OrderActionStatus = OrderActionStatusType.{21}, UserID = \'{22}\', StatusMsg = \'{23}\', InstrumentID = \'{24}\', BranchID = \'{25}\', InvestUnitID = \'{26}\', IPAddress = \'{27}\', MacAddress = \'{28}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OrderActionRef, str(self.OrderRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, self.LimitPrice, self.VolumeChange, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.OrderLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OrderActionRef': self.OrderActionRef,'OrderRef': str(self.OrderRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'LimitPrice': self.LimitPrice,'VolumeChange': self.VolumeChange,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OrderActionRef=self.OrderActionRef
        obj.OrderRef=self.OrderRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeChange=self.VolumeChange
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderLocalID=self.OrderLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.StatusMsg=self.StatusMsg
        obj.InstrumentID=self.InstrumentID
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcExchangeOrderActionField(Structure):
    """交易所报单操作"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 价格
        ("LimitPrice", c_double),
        # 数量变化
        ("VolumeChange", c_int32),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 营业部编号
        ("BranchID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeChange(self):
        return self.VolumeChange

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', OrderSysID = \'{1}\', ActionFlag = ActionFlagType.{2}, LimitPrice = {3}, VolumeChange = {4}, ActionDate = \'{5}\', ActionTime = \'{6}\', TraderID = \'{7}\', InstallID = {8}, OrderLocalID = \'{9}\', ActionLocalID = \'{10}\', ParticipantID = \'{11}\', ClientID = \'{12}\', BusinessUnit = \'{13}\', OrderActionStatus = OrderActionStatusType.{14}, UserID = \'{15}\', BranchID = \'{16}\', IPAddress = \'{17}\', MacAddress = \'{18}\''.format(str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, self.LimitPrice, self.VolumeChange, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.OrderLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'LimitPrice': self.LimitPrice,'VolumeChange': self.VolumeChange,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeOrderActionField()
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeChange=self.VolumeChange
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderLocalID=self.OrderLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.BranchID=self.BranchID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcExchangeOrderActionErrorField(Structure):
    """交易所报单操作失败"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', OrderSysID = \'{1}\', TraderID = \'{2}\', InstallID = {3}, OrderLocalID = \'{4}\', ActionLocalID = \'{5}\', ErrorID = {6}, ErrorMsg = \'{7}\''.format(str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.OrderLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeOrderActionErrorField()
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderLocalID=self.OrderLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcExchangeTradeField(Structure):
    """交易所成交"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 成交编号
        ("TradeID", c_char*21),
        # 买卖方向
        ("Direction", c_char),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 交易角色
        ("TradingRole", c_char),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 价格
        ("Price", c_double),
        # 数量
        ("Volume", c_int32),
        # 成交时期
        ("TradeDate", c_char*9),
        # 成交时间
        ("TradeTime", c_char*9),
        # 成交类型
        ("TradeType", c_char),
        # 成交价来源
        ("PriceSource", c_char),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 序号
        ("SequenceNo", c_int32),
        # 成交来源
        ("TradeSource", c_char),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTradeID(self):
        return str(self.TradeID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')
    def getTradingRole(self):
        return TradingRoleType(ord(self.TradingRole))

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getPrice(self):
        return self.Price
    def getVolume(self):
        return self.Volume

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')
    def getTradeType(self):
        return TradeTypeType(ord(self.TradeType))
    def getPriceSource(self):
        return PriceSourceType(ord(self.PriceSource))

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo
    def getTradeSource(self):
        return TradeSourceType(ord(self.TradeSource))

    def __str__(self):
        return 'ExchangeID = \'{0}\', TradeID = \'{1}\', Direction = DirectionType.{2}, OrderSysID = \'{3}\', ParticipantID = \'{4}\', ClientID = \'{5}\', TradingRole = TradingRoleType.{6}, ExchangeInstID = \'{7}\', OffsetFlag = OffsetFlagType.{8}, HedgeFlag = HedgeFlagType.{9}, Price = {10}, Volume = {11}, TradeDate = \'{12}\', TradeTime = \'{13}\', TradeType = TradeTypeType.{14}, PriceSource = PriceSourceType.{15}, TraderID = \'{16}\', OrderLocalID = \'{17}\', ClearingPartID = \'{18}\', BusinessUnit = \'{19}\', SequenceNo = {20}, TradeSource = TradeSourceType.{21}'.format(str(self.ExchangeID, 'GB2312'), str(self.TradeID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.OrderSysID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), '' if ord(self.TradingRole) == 0 else TradingRoleType(ord(self.TradingRole)).name, str(self.ExchangeInstID, 'GB2312'), '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.Price, self.Volume, str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), '' if ord(self.TradeType) == 0 else TradeTypeType(ord(self.TradeType)).name, '' if ord(self.PriceSource) == 0 else PriceSourceType(ord(self.PriceSource)).name, str(self.TraderID, 'GB2312'), str(self.OrderLocalID, 'GB2312'), str(self.ClearingPartID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), self.SequenceNo, '' if ord(self.TradeSource) == 0 else TradeSourceType(ord(self.TradeSource)).name)

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'TradeID': str(self.TradeID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'OrderSysID': str(self.OrderSysID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'TradingRole': '' if ord(self.TradingRole) == 0 else TradingRoleType(ord(self.TradingRole)).name,'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'Price': self.Price,'Volume': self.Volume,'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'TradeType': '' if ord(self.TradeType) == 0 else TradeTypeType(ord(self.TradeType)).name,'PriceSource': '' if ord(self.PriceSource) == 0 else PriceSourceType(ord(self.PriceSource)).name,'TraderID': str(self.TraderID, 'GB2312'),'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'SequenceNo': self.SequenceNo,'TradeSource': '' if ord(self.TradeSource) == 0 else TradeSourceType(ord(self.TradeSource)).name}

    def clone(self):
        obj=CThostFtdcExchangeTradeField()
        obj.ExchangeID=self.ExchangeID
        obj.TradeID=self.TradeID
        obj.Direction=self.Direction
        obj.OrderSysID=self.OrderSysID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.TradingRole=self.TradingRole
        obj.ExchangeInstID=self.ExchangeInstID
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.Price=self.Price
        obj.Volume=self.Volume
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.TradeType=self.TradeType
        obj.PriceSource=self.PriceSource
        obj.TraderID=self.TraderID
        obj.OrderLocalID=self.OrderLocalID
        obj.ClearingPartID=self.ClearingPartID
        obj.BusinessUnit=self.BusinessUnit
        obj.SequenceNo=self.SequenceNo
        obj.TradeSource=self.TradeSource
        return obj

class CThostFtdcTradeField(Structure):
    """成交"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报单引用
        ("OrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 成交编号
        ("TradeID", c_char*21),
        # 买卖方向
        ("Direction", c_char),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 交易角色
        ("TradingRole", c_char),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 价格
        ("Price", c_double),
        # 数量
        ("Volume", c_int32),
        # 成交时期
        ("TradeDate", c_char*9),
        # 成交时间
        ("TradeTime", c_char*9),
        # 成交类型
        ("TradeType", c_char),
        # 成交价来源
        ("PriceSource", c_char),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 序号
        ("SequenceNo", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 经纪公司报单编号
        ("BrokerOrderSeq", c_int32),
        # 成交来源
        ("TradeSource", c_char),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTradeID(self):
        return str(self.TradeID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')
    def getTradingRole(self):
        return TradingRoleType(ord(self.TradingRole))

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getPrice(self):
        return self.Price
    def getVolume(self):
        return self.Volume

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')
    def getTradeType(self):
        return TradeTypeType(ord(self.TradeType))
    def getPriceSource(self):
        return PriceSourceType(ord(self.PriceSource))

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getBrokerOrderSeq(self):
        return self.BrokerOrderSeq
    def getTradeSource(self):
        return TradeSourceType(ord(self.TradeSource))

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OrderRef = \'{3}\', UserID = \'{4}\', ExchangeID = \'{5}\', TradeID = \'{6}\', Direction = DirectionType.{7}, OrderSysID = \'{8}\', ParticipantID = \'{9}\', ClientID = \'{10}\', TradingRole = TradingRoleType.{11}, ExchangeInstID = \'{12}\', OffsetFlag = OffsetFlagType.{13}, HedgeFlag = HedgeFlagType.{14}, Price = {15}, Volume = {16}, TradeDate = \'{17}\', TradeTime = \'{18}\', TradeType = TradeTypeType.{19}, PriceSource = PriceSourceType.{20}, TraderID = \'{21}\', OrderLocalID = \'{22}\', ClearingPartID = \'{23}\', BusinessUnit = \'{24}\', SequenceNo = {25}, TradingDay = \'{26}\', SettlementID = {27}, BrokerOrderSeq = {28}, TradeSource = TradeSourceType.{29}, InvestUnitID = \'{30}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OrderRef, 'GB2312'), str(self.UserID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TradeID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.OrderSysID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), '' if ord(self.TradingRole) == 0 else TradingRoleType(ord(self.TradingRole)).name, str(self.ExchangeInstID, 'GB2312'), '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.Price, self.Volume, str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), '' if ord(self.TradeType) == 0 else TradeTypeType(ord(self.TradeType)).name, '' if ord(self.PriceSource) == 0 else PriceSourceType(ord(self.PriceSource)).name, str(self.TraderID, 'GB2312'), str(self.OrderLocalID, 'GB2312'), str(self.ClearingPartID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), self.SequenceNo, str(self.TradingDay, 'GB2312'), self.SettlementID, self.BrokerOrderSeq, '' if ord(self.TradeSource) == 0 else TradeSourceType(ord(self.TradeSource)).name, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OrderRef': str(self.OrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TradeID': str(self.TradeID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'OrderSysID': str(self.OrderSysID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'TradingRole': '' if ord(self.TradingRole) == 0 else TradingRoleType(ord(self.TradingRole)).name,'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'Price': self.Price,'Volume': self.Volume,'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'TradeType': '' if ord(self.TradeType) == 0 else TradeTypeType(ord(self.TradeType)).name,'PriceSource': '' if ord(self.PriceSource) == 0 else PriceSourceType(ord(self.PriceSource)).name,'TraderID': str(self.TraderID, 'GB2312'),'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'SequenceNo': self.SequenceNo,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'BrokerOrderSeq': self.BrokerOrderSeq,'TradeSource': '' if ord(self.TradeSource) == 0 else TradeSourceType(ord(self.TradeSource)).name,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradeField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OrderRef=self.OrderRef
        obj.UserID=self.UserID
        obj.ExchangeID=self.ExchangeID
        obj.TradeID=self.TradeID
        obj.Direction=self.Direction
        obj.OrderSysID=self.OrderSysID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.TradingRole=self.TradingRole
        obj.ExchangeInstID=self.ExchangeInstID
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.Price=self.Price
        obj.Volume=self.Volume
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.TradeType=self.TradeType
        obj.PriceSource=self.PriceSource
        obj.TraderID=self.TraderID
        obj.OrderLocalID=self.OrderLocalID
        obj.ClearingPartID=self.ClearingPartID
        obj.BusinessUnit=self.BusinessUnit
        obj.SequenceNo=self.SequenceNo
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.BrokerOrderSeq=self.BrokerOrderSeq
        obj.TradeSource=self.TradeSource
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcUserSessionField(Structure):
    """用户会话"""
    _fields_ = [
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 登录日期
        ("LoginDate", c_char*9),
        # 登录时间
        ("LoginTime", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 接口端产品信息
        ("InterfaceProductInfo", c_char*11),
        # 协议信息
        ("ProtocolInfo", c_char*11),
        # Mac地址
        ("MacAddress", c_char*21),
        # 登录备注
        ("LoginRemark", c_char*36),
        ]

    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getLoginDate(self):
        return str(self.LoginDate, 'GB2312')

    def getLoginTime(self):
        return str(self.LoginTime, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getInterfaceProductInfo(self):
        return str(self.InterfaceProductInfo, 'GB2312')

    def getProtocolInfo(self):
        return str(self.ProtocolInfo, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def getLoginRemark(self):
        return str(self.LoginRemark, 'GB2312')

    def __str__(self):
        return 'FrontID = {0}, SessionID = {1}, BrokerID = \'{2}\', UserID = \'{3}\', LoginDate = \'{4}\', LoginTime = \'{5}\', IPAddress = \'{6}\', UserProductInfo = \'{7}\', InterfaceProductInfo = \'{8}\', ProtocolInfo = \'{9}\', MacAddress = \'{10}\', LoginRemark = \'{11}\''.format(self.FrontID, self.SessionID, str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.LoginDate, 'GB2312'), str(self.LoginTime, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.UserProductInfo, 'GB2312'), str(self.InterfaceProductInfo, 'GB2312'), str(self.ProtocolInfo, 'GB2312'), str(self.MacAddress, 'GB2312'), str(self.LoginRemark, 'GB2312'))

    @property
    def __dict__(self):
        return {'FrontID': self.FrontID,'SessionID': self.SessionID,'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'LoginDate': str(self.LoginDate, 'GB2312'),'LoginTime': str(self.LoginTime, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'InterfaceProductInfo': str(self.InterfaceProductInfo, 'GB2312'),'ProtocolInfo': str(self.ProtocolInfo, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'LoginRemark': str(self.LoginRemark, 'GB2312')}

    def clone(self):
        obj=CThostFtdcUserSessionField()
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.LoginDate=self.LoginDate
        obj.LoginTime=self.LoginTime
        obj.IPAddress=self.IPAddress
        obj.UserProductInfo=self.UserProductInfo
        obj.InterfaceProductInfo=self.InterfaceProductInfo
        obj.ProtocolInfo=self.ProtocolInfo
        obj.MacAddress=self.MacAddress
        obj.LoginRemark=self.LoginRemark
        return obj

class CThostFtdcQueryMaxOrderVolumeField(Structure):
    """查询最大报单数量"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 买卖方向
        ("Direction", c_char),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 最大允许报单数量
        ("MaxVolume", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getMaxVolume(self):
        return self.MaxVolume

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', Direction = DirectionType.{3}, OffsetFlag = OffsetFlagType.{4}, HedgeFlag = HedgeFlagType.{5}, MaxVolume = {6}, ExchangeID = \'{7}\', InvestUnitID = \'{8}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.MaxVolume, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'MaxVolume': self.MaxVolume,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQueryMaxOrderVolumeField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.Direction=self.Direction
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.MaxVolume=self.MaxVolume
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcSettlementInfoConfirmField(Structure):
    """投资者结算结果确认信息"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 确认日期
        ("ConfirmDate", c_char*9),
        # 确认时间
        ("ConfirmTime", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getConfirmDate(self):
        return str(self.ConfirmDate, 'GB2312')

    def getConfirmTime(self):
        return str(self.ConfirmTime, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ConfirmDate = \'{2}\', ConfirmTime = \'{3}\', SettlementID = {4}, AccountID = \'{5}\', CurrencyID = \'{6}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ConfirmDate, 'GB2312'), str(self.ConfirmTime, 'GB2312'), self.SettlementID, str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ConfirmDate': str(self.ConfirmDate, 'GB2312'),'ConfirmTime': str(self.ConfirmTime, 'GB2312'),'SettlementID': self.SettlementID,'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSettlementInfoConfirmField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ConfirmDate=self.ConfirmDate
        obj.ConfirmTime=self.ConfirmTime
        obj.SettlementID=self.SettlementID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcSyncDepositField(Structure):
    """出入金同步"""
    _fields_ = [
        # 出入金流水号
        ("DepositSeqNo", c_char*15),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 入金金额
        ("Deposit", c_double),
        # 是否强制进行
        ("IsForce", c_int32),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getDepositSeqNo(self):
        return str(self.DepositSeqNo, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getDeposit(self):
        return self.Deposit
    def getIsForce(self):
        return self.IsForce

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'DepositSeqNo = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', Deposit = {3}, IsForce = {4}, CurrencyID = \'{5}\''.format(str(self.DepositSeqNo, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.Deposit, self.IsForce, str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'DepositSeqNo': str(self.DepositSeqNo, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'Deposit': self.Deposit,'IsForce': self.IsForce,'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSyncDepositField()
        obj.DepositSeqNo=self.DepositSeqNo
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.Deposit=self.Deposit
        obj.IsForce=self.IsForce
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcSyncFundMortgageField(Structure):
    """货币质押同步"""
    _fields_ = [
        # 货币质押流水号
        ("MortgageSeqNo", c_char*15),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 源币种
        ("FromCurrencyID", c_char*4),
        # 质押金额
        ("MortgageAmount", c_double),
        # 目标币种
        ("ToCurrencyID", c_char*4),
        ]


    def getMortgageSeqNo(self):
        return str(self.MortgageSeqNo, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getFromCurrencyID(self):
        return str(self.FromCurrencyID, 'GB2312')
    def getMortgageAmount(self):
        return self.MortgageAmount

    def getToCurrencyID(self):
        return str(self.ToCurrencyID, 'GB2312')

    def __str__(self):
        return 'MortgageSeqNo = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', FromCurrencyID = \'{3}\', MortgageAmount = {4}, ToCurrencyID = \'{5}\''.format(str(self.MortgageSeqNo, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.FromCurrencyID, 'GB2312'), self.MortgageAmount, str(self.ToCurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'MortgageSeqNo': str(self.MortgageSeqNo, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'FromCurrencyID': str(self.FromCurrencyID, 'GB2312'),'MortgageAmount': self.MortgageAmount,'ToCurrencyID': str(self.ToCurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSyncFundMortgageField()
        obj.MortgageSeqNo=self.MortgageSeqNo
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.FromCurrencyID=self.FromCurrencyID
        obj.MortgageAmount=self.MortgageAmount
        obj.ToCurrencyID=self.ToCurrencyID
        return obj

class CThostFtdcBrokerSyncField(Structure):
    """经纪公司同步"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\''.format(str(self.BrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcBrokerSyncField()
        obj.BrokerID=self.BrokerID
        return obj

class CThostFtdcSyncingInvestorField(Structure):
    """正在同步中的投资者"""
    _fields_ = [
        # 投资者代码
        ("InvestorID", c_char*13),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者分组代码
        ("InvestorGroupID", c_char*13),
        # 投资者名称
        ("InvestorName", c_char*81),
        # 证件类型
        ("IdentifiedCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 是否活跃
        ("IsActive", c_int32),
        # 联系电话
        ("Telephone", c_char*41),
        # 通讯地址
        ("Address", c_char*101),
        # 开户日期
        ("OpenDate", c_char*9),
        # 手机
        ("Mobile", c_char*41),
        # 手续费率模板代码
        ("CommModelID", c_char*13),
        # 保证金率模板代码
        ("MarginModelID", c_char*13),
        ]


    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorGroupID(self):
        return str(self.InvestorGroupID, 'GB2312')

    def getInvestorName(self):
        return str(self.InvestorName, 'GB2312')
    def getIdentifiedCardType(self):
        return IdCardTypeType(ord(self.IdentifiedCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getIsActive(self):
        return self.IsActive

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getOpenDate(self):
        return str(self.OpenDate, 'GB2312')

    def getMobile(self):
        return str(self.Mobile, 'GB2312')

    def getCommModelID(self):
        return str(self.CommModelID, 'GB2312')

    def getMarginModelID(self):
        return str(self.MarginModelID, 'GB2312')

    def __str__(self):
        return 'InvestorID = \'{0}\', BrokerID = \'{1}\', InvestorGroupID = \'{2}\', InvestorName = \'{3}\', IdentifiedCardType = IdCardTypeType.{4}, IdentifiedCardNo = \'{5}\', IsActive = {6}, Telephone = \'{7}\', Address = \'{8}\', OpenDate = \'{9}\', Mobile = \'{10}\', CommModelID = \'{11}\', MarginModelID = \'{12}\''.format(str(self.InvestorID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorGroupID, 'GB2312'), str(self.InvestorName, 'GB2312'), '' if ord(self.IdentifiedCardType) == 0 else IdCardTypeType(ord(self.IdentifiedCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), self.IsActive, str(self.Telephone, 'GB2312'), str(self.Address, 'GB2312'), str(self.OpenDate, 'GB2312'), str(self.Mobile, 'GB2312'), str(self.CommModelID, 'GB2312'), str(self.MarginModelID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InvestorID': str(self.InvestorID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorGroupID': str(self.InvestorGroupID, 'GB2312'),'InvestorName': str(self.InvestorName, 'GB2312'),'IdentifiedCardType': '' if ord(self.IdentifiedCardType) == 0 else IdCardTypeType(ord(self.IdentifiedCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'IsActive': self.IsActive,'Telephone': str(self.Telephone, 'GB2312'),'Address': str(self.Address, 'GB2312'),'OpenDate': str(self.OpenDate, 'GB2312'),'Mobile': str(self.Mobile, 'GB2312'),'CommModelID': str(self.CommModelID, 'GB2312'),'MarginModelID': str(self.MarginModelID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSyncingInvestorField()
        obj.InvestorID=self.InvestorID
        obj.BrokerID=self.BrokerID
        obj.InvestorGroupID=self.InvestorGroupID
        obj.InvestorName=self.InvestorName
        obj.IdentifiedCardType=self.IdentifiedCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.IsActive=self.IsActive
        obj.Telephone=self.Telephone
        obj.Address=self.Address
        obj.OpenDate=self.OpenDate
        obj.Mobile=self.Mobile
        obj.CommModelID=self.CommModelID
        obj.MarginModelID=self.MarginModelID
        return obj

class CThostFtdcSyncingTradingCodeField(Structure):
    """正在同步中的交易代码"""
    _fields_ = [
        # 投资者代码
        ("InvestorID", c_char*13),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 客户代码
        ("ClientID", c_char*11),
        # 是否活跃
        ("IsActive", c_int32),
        # 交易编码类型
        ("ClientIDType", c_char),
        ]


    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')
    def getIsActive(self):
        return self.IsActive
    def getClientIDType(self):
        return ClientIDTypeType(ord(self.ClientIDType))

    def __str__(self):
        return 'InvestorID = \'{0}\', BrokerID = \'{1}\', ExchangeID = \'{2}\', ClientID = \'{3}\', IsActive = {4}, ClientIDType = ClientIDTypeType.{5}'.format(str(self.InvestorID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ClientID, 'GB2312'), self.IsActive, '' if ord(self.ClientIDType) == 0 else ClientIDTypeType(ord(self.ClientIDType)).name)

    @property
    def __dict__(self):
        return {'InvestorID': str(self.InvestorID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IsActive': self.IsActive,'ClientIDType': '' if ord(self.ClientIDType) == 0 else ClientIDTypeType(ord(self.ClientIDType)).name}

    def clone(self):
        obj=CThostFtdcSyncingTradingCodeField()
        obj.InvestorID=self.InvestorID
        obj.BrokerID=self.BrokerID
        obj.ExchangeID=self.ExchangeID
        obj.ClientID=self.ClientID
        obj.IsActive=self.IsActive
        obj.ClientIDType=self.ClientIDType
        return obj

class CThostFtdcSyncingInvestorGroupField(Structure):
    """正在同步中的投资者分组"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者分组代码
        ("InvestorGroupID", c_char*13),
        # 投资者分组名称
        ("InvestorGroupName", c_char*41),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorGroupID(self):
        return str(self.InvestorGroupID, 'GB2312')

    def getInvestorGroupName(self):
        return str(self.InvestorGroupName, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorGroupID = \'{1}\', InvestorGroupName = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorGroupID, 'GB2312'), str(self.InvestorGroupName, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorGroupID': str(self.InvestorGroupID, 'GB2312'),'InvestorGroupName': str(self.InvestorGroupName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSyncingInvestorGroupField()
        obj.BrokerID=self.BrokerID
        obj.InvestorGroupID=self.InvestorGroupID
        obj.InvestorGroupName=self.InvestorGroupName
        return obj

class CThostFtdcSyncingTradingAccountField(Structure):
    """正在同步中的交易账号"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 上次质押金额
        ("PreMortgage", c_double),
        # 上次信用额度
        ("PreCredit", c_double),
        # 上次存款额
        ("PreDeposit", c_double),
        # 上次结算准备金
        ("PreBalance", c_double),
        # 上次占用的保证金
        ("PreMargin", c_double),
        # 利息基数
        ("InterestBase", c_double),
        # 利息收入
        ("Interest", c_double),
        # 入金金额
        ("Deposit", c_double),
        # 出金金额
        ("Withdraw", c_double),
        # 冻结的保证金
        ("FrozenMargin", c_double),
        # 冻结的资金
        ("FrozenCash", c_double),
        # 冻结的手续费
        ("FrozenCommission", c_double),
        # 当前保证金总额
        ("CurrMargin", c_double),
        # 资金差额
        ("CashIn", c_double),
        # 手续费
        ("Commission", c_double),
        # 平仓盈亏
        ("CloseProfit", c_double),
        # 持仓盈亏
        ("PositionProfit", c_double),
        # 期货结算准备金
        ("Balance", c_double),
        # 可用资金
        ("Available", c_double),
        # 可取资金
        ("WithdrawQuota", c_double),
        # 基本准备金
        ("Reserve", c_double),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 信用额度
        ("Credit", c_double),
        # 质押金额
        ("Mortgage", c_double),
        # 交易所保证金
        ("ExchangeMargin", c_double),
        # 投资者交割保证金
        ("DeliveryMargin", c_double),
        # 交易所交割保证金
        ("ExchangeDeliveryMargin", c_double),
        # 保底期货结算准备金
        ("ReserveBalance", c_double),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 上次货币质入金额
        ("PreFundMortgageIn", c_double),
        # 上次货币质出金额
        ("PreFundMortgageOut", c_double),
        # 货币质入金额
        ("FundMortgageIn", c_double),
        # 货币质出金额
        ("FundMortgageOut", c_double),
        # 货币质押余额
        ("FundMortgageAvailable", c_double),
        # 可质押货币金额
        ("MortgageableFund", c_double),
        # 特殊产品占用保证金
        ("SpecProductMargin", c_double),
        # 特殊产品冻结保证金
        ("SpecProductFrozenMargin", c_double),
        # 特殊产品手续费
        ("SpecProductCommission", c_double),
        # 特殊产品冻结手续费
        ("SpecProductFrozenCommission", c_double),
        # 特殊产品持仓盈亏
        ("SpecProductPositionProfit", c_double),
        # 特殊产品平仓盈亏
        ("SpecProductCloseProfit", c_double),
        # 根据持仓盈亏算法计算的特殊产品持仓盈亏
        ("SpecProductPositionProfitByAlg", c_double),
        # 特殊产品交易所保证金
        ("SpecProductExchangeMargin", c_double),
        # 延时换汇冻结金额
        ("FrozenSwap", c_double),
        # 剩余换汇额度
        ("RemainSwap", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')
    def getPreMortgage(self):
        return self.PreMortgage
    def getPreCredit(self):
        return self.PreCredit
    def getPreDeposit(self):
        return self.PreDeposit
    def getPreBalance(self):
        return self.PreBalance
    def getPreMargin(self):
        return self.PreMargin
    def getInterestBase(self):
        return self.InterestBase
    def getInterest(self):
        return self.Interest
    def getDeposit(self):
        return self.Deposit
    def getWithdraw(self):
        return self.Withdraw
    def getFrozenMargin(self):
        return self.FrozenMargin
    def getFrozenCash(self):
        return self.FrozenCash
    def getFrozenCommission(self):
        return self.FrozenCommission
    def getCurrMargin(self):
        return self.CurrMargin
    def getCashIn(self):
        return self.CashIn
    def getCommission(self):
        return self.Commission
    def getCloseProfit(self):
        return self.CloseProfit
    def getPositionProfit(self):
        return self.PositionProfit
    def getBalance(self):
        return self.Balance
    def getAvailable(self):
        return self.Available
    def getWithdrawQuota(self):
        return self.WithdrawQuota
    def getReserve(self):
        return self.Reserve

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getCredit(self):
        return self.Credit
    def getMortgage(self):
        return self.Mortgage
    def getExchangeMargin(self):
        return self.ExchangeMargin
    def getDeliveryMargin(self):
        return self.DeliveryMargin
    def getExchangeDeliveryMargin(self):
        return self.ExchangeDeliveryMargin
    def getReserveBalance(self):
        return self.ReserveBalance

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getPreFundMortgageIn(self):
        return self.PreFundMortgageIn
    def getPreFundMortgageOut(self):
        return self.PreFundMortgageOut
    def getFundMortgageIn(self):
        return self.FundMortgageIn
    def getFundMortgageOut(self):
        return self.FundMortgageOut
    def getFundMortgageAvailable(self):
        return self.FundMortgageAvailable
    def getMortgageableFund(self):
        return self.MortgageableFund
    def getSpecProductMargin(self):
        return self.SpecProductMargin
    def getSpecProductFrozenMargin(self):
        return self.SpecProductFrozenMargin
    def getSpecProductCommission(self):
        return self.SpecProductCommission
    def getSpecProductFrozenCommission(self):
        return self.SpecProductFrozenCommission
    def getSpecProductPositionProfit(self):
        return self.SpecProductPositionProfit
    def getSpecProductCloseProfit(self):
        return self.SpecProductCloseProfit
    def getSpecProductPositionProfitByAlg(self):
        return self.SpecProductPositionProfitByAlg
    def getSpecProductExchangeMargin(self):
        return self.SpecProductExchangeMargin
    def getFrozenSwap(self):
        return self.FrozenSwap
    def getRemainSwap(self):
        return self.RemainSwap

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', PreMortgage = {2}, PreCredit = {3}, PreDeposit = {4}, PreBalance = {5}, PreMargin = {6}, InterestBase = {7}, Interest = {8}, Deposit = {9}, Withdraw = {10}, FrozenMargin = {11}, FrozenCash = {12}, FrozenCommission = {13}, CurrMargin = {14}, CashIn = {15}, Commission = {16}, CloseProfit = {17}, PositionProfit = {18}, Balance = {19}, Available = {20}, WithdrawQuota = {21}, Reserve = {22}, TradingDay = \'{23}\', SettlementID = {24}, Credit = {25}, Mortgage = {26}, ExchangeMargin = {27}, DeliveryMargin = {28}, ExchangeDeliveryMargin = {29}, ReserveBalance = {30}, CurrencyID = \'{31}\', PreFundMortgageIn = {32}, PreFundMortgageOut = {33}, FundMortgageIn = {34}, FundMortgageOut = {35}, FundMortgageAvailable = {36}, MortgageableFund = {37}, SpecProductMargin = {38}, SpecProductFrozenMargin = {39}, SpecProductCommission = {40}, SpecProductFrozenCommission = {41}, SpecProductPositionProfit = {42}, SpecProductCloseProfit = {43}, SpecProductPositionProfitByAlg = {44}, SpecProductExchangeMargin = {45}, FrozenSwap = {46}, RemainSwap = {47}'.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), self.PreMortgage, self.PreCredit, self.PreDeposit, self.PreBalance, self.PreMargin, self.InterestBase, self.Interest, self.Deposit, self.Withdraw, self.FrozenMargin, self.FrozenCash, self.FrozenCommission, self.CurrMargin, self.CashIn, self.Commission, self.CloseProfit, self.PositionProfit, self.Balance, self.Available, self.WithdrawQuota, self.Reserve, str(self.TradingDay, 'GB2312'), self.SettlementID, self.Credit, self.Mortgage, self.ExchangeMargin, self.DeliveryMargin, self.ExchangeDeliveryMargin, self.ReserveBalance, str(self.CurrencyID, 'GB2312'), self.PreFundMortgageIn, self.PreFundMortgageOut, self.FundMortgageIn, self.FundMortgageOut, self.FundMortgageAvailable, self.MortgageableFund, self.SpecProductMargin, self.SpecProductFrozenMargin, self.SpecProductCommission, self.SpecProductFrozenCommission, self.SpecProductPositionProfit, self.SpecProductCloseProfit, self.SpecProductPositionProfitByAlg, self.SpecProductExchangeMargin, self.FrozenSwap, self.RemainSwap)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'PreMortgage': self.PreMortgage,'PreCredit': self.PreCredit,'PreDeposit': self.PreDeposit,'PreBalance': self.PreBalance,'PreMargin': self.PreMargin,'InterestBase': self.InterestBase,'Interest': self.Interest,'Deposit': self.Deposit,'Withdraw': self.Withdraw,'FrozenMargin': self.FrozenMargin,'FrozenCash': self.FrozenCash,'FrozenCommission': self.FrozenCommission,'CurrMargin': self.CurrMargin,'CashIn': self.CashIn,'Commission': self.Commission,'CloseProfit': self.CloseProfit,'PositionProfit': self.PositionProfit,'Balance': self.Balance,'Available': self.Available,'WithdrawQuota': self.WithdrawQuota,'Reserve': self.Reserve,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'Credit': self.Credit,'Mortgage': self.Mortgage,'ExchangeMargin': self.ExchangeMargin,'DeliveryMargin': self.DeliveryMargin,'ExchangeDeliveryMargin': self.ExchangeDeliveryMargin,'ReserveBalance': self.ReserveBalance,'CurrencyID': str(self.CurrencyID, 'GB2312'),'PreFundMortgageIn': self.PreFundMortgageIn,'PreFundMortgageOut': self.PreFundMortgageOut,'FundMortgageIn': self.FundMortgageIn,'FundMortgageOut': self.FundMortgageOut,'FundMortgageAvailable': self.FundMortgageAvailable,'MortgageableFund': self.MortgageableFund,'SpecProductMargin': self.SpecProductMargin,'SpecProductFrozenMargin': self.SpecProductFrozenMargin,'SpecProductCommission': self.SpecProductCommission,'SpecProductFrozenCommission': self.SpecProductFrozenCommission,'SpecProductPositionProfit': self.SpecProductPositionProfit,'SpecProductCloseProfit': self.SpecProductCloseProfit,'SpecProductPositionProfitByAlg': self.SpecProductPositionProfitByAlg,'SpecProductExchangeMargin': self.SpecProductExchangeMargin,'FrozenSwap': self.FrozenSwap,'RemainSwap': self.RemainSwap}

    def clone(self):
        obj=CThostFtdcSyncingTradingAccountField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.PreMortgage=self.PreMortgage
        obj.PreCredit=self.PreCredit
        obj.PreDeposit=self.PreDeposit
        obj.PreBalance=self.PreBalance
        obj.PreMargin=self.PreMargin
        obj.InterestBase=self.InterestBase
        obj.Interest=self.Interest
        obj.Deposit=self.Deposit
        obj.Withdraw=self.Withdraw
        obj.FrozenMargin=self.FrozenMargin
        obj.FrozenCash=self.FrozenCash
        obj.FrozenCommission=self.FrozenCommission
        obj.CurrMargin=self.CurrMargin
        obj.CashIn=self.CashIn
        obj.Commission=self.Commission
        obj.CloseProfit=self.CloseProfit
        obj.PositionProfit=self.PositionProfit
        obj.Balance=self.Balance
        obj.Available=self.Available
        obj.WithdrawQuota=self.WithdrawQuota
        obj.Reserve=self.Reserve
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.Credit=self.Credit
        obj.Mortgage=self.Mortgage
        obj.ExchangeMargin=self.ExchangeMargin
        obj.DeliveryMargin=self.DeliveryMargin
        obj.ExchangeDeliveryMargin=self.ExchangeDeliveryMargin
        obj.ReserveBalance=self.ReserveBalance
        obj.CurrencyID=self.CurrencyID
        obj.PreFundMortgageIn=self.PreFundMortgageIn
        obj.PreFundMortgageOut=self.PreFundMortgageOut
        obj.FundMortgageIn=self.FundMortgageIn
        obj.FundMortgageOut=self.FundMortgageOut
        obj.FundMortgageAvailable=self.FundMortgageAvailable
        obj.MortgageableFund=self.MortgageableFund
        obj.SpecProductMargin=self.SpecProductMargin
        obj.SpecProductFrozenMargin=self.SpecProductFrozenMargin
        obj.SpecProductCommission=self.SpecProductCommission
        obj.SpecProductFrozenCommission=self.SpecProductFrozenCommission
        obj.SpecProductPositionProfit=self.SpecProductPositionProfit
        obj.SpecProductCloseProfit=self.SpecProductCloseProfit
        obj.SpecProductPositionProfitByAlg=self.SpecProductPositionProfitByAlg
        obj.SpecProductExchangeMargin=self.SpecProductExchangeMargin
        obj.FrozenSwap=self.FrozenSwap
        obj.RemainSwap=self.RemainSwap
        return obj

class CThostFtdcSyncingInvestorPositionField(Structure):
    """正在同步中的投资者持仓"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 持仓多空方向
        ("PosiDirection", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 持仓日期
        ("PositionDate", c_char),
        # 上日持仓
        ("YdPosition", c_int32),
        # 今日持仓
        ("Position", c_int32),
        # 多头冻结
        ("LongFrozen", c_int32),
        # 空头冻结
        ("ShortFrozen", c_int32),
        # 开仓冻结金额
        ("LongFrozenAmount", c_double),
        # 开仓冻结金额
        ("ShortFrozenAmount", c_double),
        # 开仓量
        ("OpenVolume", c_int32),
        # 平仓量
        ("CloseVolume", c_int32),
        # 开仓金额
        ("OpenAmount", c_double),
        # 平仓金额
        ("CloseAmount", c_double),
        # 持仓成本
        ("PositionCost", c_double),
        # 上次占用的保证金
        ("PreMargin", c_double),
        # 占用的保证金
        ("UseMargin", c_double),
        # 冻结的保证金
        ("FrozenMargin", c_double),
        # 冻结的资金
        ("FrozenCash", c_double),
        # 冻结的手续费
        ("FrozenCommission", c_double),
        # 资金差额
        ("CashIn", c_double),
        # 手续费
        ("Commission", c_double),
        # 平仓盈亏
        ("CloseProfit", c_double),
        # 持仓盈亏
        ("PositionProfit", c_double),
        # 上次结算价
        ("PreSettlementPrice", c_double),
        # 本次结算价
        ("SettlementPrice", c_double),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 开仓成本
        ("OpenCost", c_double),
        # 交易所保证金
        ("ExchangeMargin", c_double),
        # 组合成交形成的持仓
        ("CombPosition", c_int32),
        # 组合多头冻结
        ("CombLongFrozen", c_int32),
        # 组合空头冻结
        ("CombShortFrozen", c_int32),
        # 逐日盯市平仓盈亏
        ("CloseProfitByDate", c_double),
        # 逐笔对冲平仓盈亏
        ("CloseProfitByTrade", c_double),
        # 今日持仓
        ("TodayPosition", c_int32),
        # 保证金率
        ("MarginRateByMoney", c_double),
        # 保证金率(按手数)
        ("MarginRateByVolume", c_double),
        # 执行冻结
        ("StrikeFrozen", c_int32),
        # 执行冻结金额
        ("StrikeFrozenAmount", c_double),
        # 放弃执行冻结
        ("AbandonFrozen", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 执行冻结的昨仓
        ("YdStrikeFrozen", c_int32),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getPosiDirection(self):
        return PosiDirectionType(ord(self.PosiDirection))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getPositionDate(self):
        return PositionDateType(ord(self.PositionDate))
    def getYdPosition(self):
        return self.YdPosition
    def getPosition(self):
        return self.Position
    def getLongFrozen(self):
        return self.LongFrozen
    def getShortFrozen(self):
        return self.ShortFrozen
    def getLongFrozenAmount(self):
        return self.LongFrozenAmount
    def getShortFrozenAmount(self):
        return self.ShortFrozenAmount
    def getOpenVolume(self):
        return self.OpenVolume
    def getCloseVolume(self):
        return self.CloseVolume
    def getOpenAmount(self):
        return self.OpenAmount
    def getCloseAmount(self):
        return self.CloseAmount
    def getPositionCost(self):
        return self.PositionCost
    def getPreMargin(self):
        return self.PreMargin
    def getUseMargin(self):
        return self.UseMargin
    def getFrozenMargin(self):
        return self.FrozenMargin
    def getFrozenCash(self):
        return self.FrozenCash
    def getFrozenCommission(self):
        return self.FrozenCommission
    def getCashIn(self):
        return self.CashIn
    def getCommission(self):
        return self.Commission
    def getCloseProfit(self):
        return self.CloseProfit
    def getPositionProfit(self):
        return self.PositionProfit
    def getPreSettlementPrice(self):
        return self.PreSettlementPrice
    def getSettlementPrice(self):
        return self.SettlementPrice

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getOpenCost(self):
        return self.OpenCost
    def getExchangeMargin(self):
        return self.ExchangeMargin
    def getCombPosition(self):
        return self.CombPosition
    def getCombLongFrozen(self):
        return self.CombLongFrozen
    def getCombShortFrozen(self):
        return self.CombShortFrozen
    def getCloseProfitByDate(self):
        return self.CloseProfitByDate
    def getCloseProfitByTrade(self):
        return self.CloseProfitByTrade
    def getTodayPosition(self):
        return self.TodayPosition
    def getMarginRateByMoney(self):
        return self.MarginRateByMoney
    def getMarginRateByVolume(self):
        return self.MarginRateByVolume
    def getStrikeFrozen(self):
        return self.StrikeFrozen
    def getStrikeFrozenAmount(self):
        return self.StrikeFrozenAmount
    def getAbandonFrozen(self):
        return self.AbandonFrozen

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getYdStrikeFrozen(self):
        return self.YdStrikeFrozen

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', PosiDirection = PosiDirectionType.{3}, HedgeFlag = HedgeFlagType.{4}, PositionDate = PositionDateType.{5}, YdPosition = {6}, Position = {7}, LongFrozen = {8}, ShortFrozen = {9}, LongFrozenAmount = {10}, ShortFrozenAmount = {11}, OpenVolume = {12}, CloseVolume = {13}, OpenAmount = {14}, CloseAmount = {15}, PositionCost = {16}, PreMargin = {17}, UseMargin = {18}, FrozenMargin = {19}, FrozenCash = {20}, FrozenCommission = {21}, CashIn = {22}, Commission = {23}, CloseProfit = {24}, PositionProfit = {25}, PreSettlementPrice = {26}, SettlementPrice = {27}, TradingDay = \'{28}\', SettlementID = {29}, OpenCost = {30}, ExchangeMargin = {31}, CombPosition = {32}, CombLongFrozen = {33}, CombShortFrozen = {34}, CloseProfitByDate = {35}, CloseProfitByTrade = {36}, TodayPosition = {37}, MarginRateByMoney = {38}, MarginRateByVolume = {39}, StrikeFrozen = {40}, StrikeFrozenAmount = {41}, AbandonFrozen = {42}, ExchangeID = \'{43}\', YdStrikeFrozen = {44}, InvestUnitID = \'{45}\''.format(str(self.InstrumentID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.PositionDate) == 0 else PositionDateType(ord(self.PositionDate)).name, self.YdPosition, self.Position, self.LongFrozen, self.ShortFrozen, self.LongFrozenAmount, self.ShortFrozenAmount, self.OpenVolume, self.CloseVolume, self.OpenAmount, self.CloseAmount, self.PositionCost, self.PreMargin, self.UseMargin, self.FrozenMargin, self.FrozenCash, self.FrozenCommission, self.CashIn, self.Commission, self.CloseProfit, self.PositionProfit, self.PreSettlementPrice, self.SettlementPrice, str(self.TradingDay, 'GB2312'), self.SettlementID, self.OpenCost, self.ExchangeMargin, self.CombPosition, self.CombLongFrozen, self.CombShortFrozen, self.CloseProfitByDate, self.CloseProfitByTrade, self.TodayPosition, self.MarginRateByMoney, self.MarginRateByVolume, self.StrikeFrozen, self.StrikeFrozenAmount, self.AbandonFrozen, str(self.ExchangeID, 'GB2312'), self.YdStrikeFrozen, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'PosiDirection': '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'PositionDate': '' if ord(self.PositionDate) == 0 else PositionDateType(ord(self.PositionDate)).name,'YdPosition': self.YdPosition,'Position': self.Position,'LongFrozen': self.LongFrozen,'ShortFrozen': self.ShortFrozen,'LongFrozenAmount': self.LongFrozenAmount,'ShortFrozenAmount': self.ShortFrozenAmount,'OpenVolume': self.OpenVolume,'CloseVolume': self.CloseVolume,'OpenAmount': self.OpenAmount,'CloseAmount': self.CloseAmount,'PositionCost': self.PositionCost,'PreMargin': self.PreMargin,'UseMargin': self.UseMargin,'FrozenMargin': self.FrozenMargin,'FrozenCash': self.FrozenCash,'FrozenCommission': self.FrozenCommission,'CashIn': self.CashIn,'Commission': self.Commission,'CloseProfit': self.CloseProfit,'PositionProfit': self.PositionProfit,'PreSettlementPrice': self.PreSettlementPrice,'SettlementPrice': self.SettlementPrice,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'OpenCost': self.OpenCost,'ExchangeMargin': self.ExchangeMargin,'CombPosition': self.CombPosition,'CombLongFrozen': self.CombLongFrozen,'CombShortFrozen': self.CombShortFrozen,'CloseProfitByDate': self.CloseProfitByDate,'CloseProfitByTrade': self.CloseProfitByTrade,'TodayPosition': self.TodayPosition,'MarginRateByMoney': self.MarginRateByMoney,'MarginRateByVolume': self.MarginRateByVolume,'StrikeFrozen': self.StrikeFrozen,'StrikeFrozenAmount': self.StrikeFrozenAmount,'AbandonFrozen': self.AbandonFrozen,'ExchangeID': str(self.ExchangeID, 'GB2312'),'YdStrikeFrozen': self.YdStrikeFrozen,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSyncingInvestorPositionField()
        obj.InstrumentID=self.InstrumentID
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.PosiDirection=self.PosiDirection
        obj.HedgeFlag=self.HedgeFlag
        obj.PositionDate=self.PositionDate
        obj.YdPosition=self.YdPosition
        obj.Position=self.Position
        obj.LongFrozen=self.LongFrozen
        obj.ShortFrozen=self.ShortFrozen
        obj.LongFrozenAmount=self.LongFrozenAmount
        obj.ShortFrozenAmount=self.ShortFrozenAmount
        obj.OpenVolume=self.OpenVolume
        obj.CloseVolume=self.CloseVolume
        obj.OpenAmount=self.OpenAmount
        obj.CloseAmount=self.CloseAmount
        obj.PositionCost=self.PositionCost
        obj.PreMargin=self.PreMargin
        obj.UseMargin=self.UseMargin
        obj.FrozenMargin=self.FrozenMargin
        obj.FrozenCash=self.FrozenCash
        obj.FrozenCommission=self.FrozenCommission
        obj.CashIn=self.CashIn
        obj.Commission=self.Commission
        obj.CloseProfit=self.CloseProfit
        obj.PositionProfit=self.PositionProfit
        obj.PreSettlementPrice=self.PreSettlementPrice
        obj.SettlementPrice=self.SettlementPrice
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.OpenCost=self.OpenCost
        obj.ExchangeMargin=self.ExchangeMargin
        obj.CombPosition=self.CombPosition
        obj.CombLongFrozen=self.CombLongFrozen
        obj.CombShortFrozen=self.CombShortFrozen
        obj.CloseProfitByDate=self.CloseProfitByDate
        obj.CloseProfitByTrade=self.CloseProfitByTrade
        obj.TodayPosition=self.TodayPosition
        obj.MarginRateByMoney=self.MarginRateByMoney
        obj.MarginRateByVolume=self.MarginRateByVolume
        obj.StrikeFrozen=self.StrikeFrozen
        obj.StrikeFrozenAmount=self.StrikeFrozenAmount
        obj.AbandonFrozen=self.AbandonFrozen
        obj.ExchangeID=self.ExchangeID
        obj.YdStrikeFrozen=self.YdStrikeFrozen
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcSyncingInstrumentMarginRateField(Structure):
    """正在同步中的合约保证金率"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 多头保证金率
        ("LongMarginRatioByMoney", c_double),
        # 多头保证金费
        ("LongMarginRatioByVolume", c_double),
        # 空头保证金率
        ("ShortMarginRatioByMoney", c_double),
        # 空头保证金费
        ("ShortMarginRatioByVolume", c_double),
        # 是否相对交易所收取
        ("IsRelative", c_int32),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getLongMarginRatioByMoney(self):
        return self.LongMarginRatioByMoney
    def getLongMarginRatioByVolume(self):
        return self.LongMarginRatioByVolume
    def getShortMarginRatioByMoney(self):
        return self.ShortMarginRatioByMoney
    def getShortMarginRatioByVolume(self):
        return self.ShortMarginRatioByVolume
    def getIsRelative(self):
        return self.IsRelative

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', HedgeFlag = HedgeFlagType.{4}, LongMarginRatioByMoney = {5}, LongMarginRatioByVolume = {6}, ShortMarginRatioByMoney = {7}, ShortMarginRatioByVolume = {8}, IsRelative = {9}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.LongMarginRatioByMoney, self.LongMarginRatioByVolume, self.ShortMarginRatioByMoney, self.ShortMarginRatioByVolume, self.IsRelative)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'LongMarginRatioByMoney': self.LongMarginRatioByMoney,'LongMarginRatioByVolume': self.LongMarginRatioByVolume,'ShortMarginRatioByMoney': self.ShortMarginRatioByMoney,'ShortMarginRatioByVolume': self.ShortMarginRatioByVolume,'IsRelative': self.IsRelative}

    def clone(self):
        obj=CThostFtdcSyncingInstrumentMarginRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.HedgeFlag=self.HedgeFlag
        obj.LongMarginRatioByMoney=self.LongMarginRatioByMoney
        obj.LongMarginRatioByVolume=self.LongMarginRatioByVolume
        obj.ShortMarginRatioByMoney=self.ShortMarginRatioByMoney
        obj.ShortMarginRatioByVolume=self.ShortMarginRatioByVolume
        obj.IsRelative=self.IsRelative
        return obj

class CThostFtdcSyncingInstrumentCommissionRateField(Structure):
    """正在同步中的合约手续费率"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 开仓手续费率
        ("OpenRatioByMoney", c_double),
        # 开仓手续费
        ("OpenRatioByVolume", c_double),
        # 平仓手续费率
        ("CloseRatioByMoney", c_double),
        # 平仓手续费
        ("CloseRatioByVolume", c_double),
        # 平今手续费率
        ("CloseTodayRatioByMoney", c_double),
        # 平今手续费
        ("CloseTodayRatioByVolume", c_double),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOpenRatioByMoney(self):
        return self.OpenRatioByMoney
    def getOpenRatioByVolume(self):
        return self.OpenRatioByVolume
    def getCloseRatioByMoney(self):
        return self.CloseRatioByMoney
    def getCloseRatioByVolume(self):
        return self.CloseRatioByVolume
    def getCloseTodayRatioByMoney(self):
        return self.CloseTodayRatioByMoney
    def getCloseTodayRatioByVolume(self):
        return self.CloseTodayRatioByVolume

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', OpenRatioByMoney = {4}, OpenRatioByVolume = {5}, CloseRatioByMoney = {6}, CloseRatioByVolume = {7}, CloseTodayRatioByMoney = {8}, CloseTodayRatioByVolume = {9}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OpenRatioByMoney, self.OpenRatioByVolume, self.CloseRatioByMoney, self.CloseRatioByVolume, self.CloseTodayRatioByMoney, self.CloseTodayRatioByVolume)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OpenRatioByMoney': self.OpenRatioByMoney,'OpenRatioByVolume': self.OpenRatioByVolume,'CloseRatioByMoney': self.CloseRatioByMoney,'CloseRatioByVolume': self.CloseRatioByVolume,'CloseTodayRatioByMoney': self.CloseTodayRatioByMoney,'CloseTodayRatioByVolume': self.CloseTodayRatioByVolume}

    def clone(self):
        obj=CThostFtdcSyncingInstrumentCommissionRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OpenRatioByMoney=self.OpenRatioByMoney
        obj.OpenRatioByVolume=self.OpenRatioByVolume
        obj.CloseRatioByMoney=self.CloseRatioByMoney
        obj.CloseRatioByVolume=self.CloseRatioByVolume
        obj.CloseTodayRatioByMoney=self.CloseTodayRatioByMoney
        obj.CloseTodayRatioByVolume=self.CloseTodayRatioByVolume
        return obj

class CThostFtdcSyncingInstrumentTradingRightField(Structure):
    """正在同步中的合约交易权限"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易权限
        ("TradingRight", c_char),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getTradingRight(self):
        return TradingRightType(ord(self.TradingRight))

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', TradingRight = TradingRightType.{4}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.TradingRight) == 0 else TradingRightType(ord(self.TradingRight)).name)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'TradingRight': '' if ord(self.TradingRight) == 0 else TradingRightType(ord(self.TradingRight)).name}

    def clone(self):
        obj=CThostFtdcSyncingInstrumentTradingRightField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.TradingRight=self.TradingRight
        return obj

class CThostFtdcQryOrderField(Structure):
    """查询报单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 开始时间
        ("InsertTimeStart", c_char*9),
        # 结束时间
        ("InsertTimeEnd", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')

    def getInsertTimeStart(self):
        return str(self.InsertTimeStart, 'GB2312')

    def getInsertTimeEnd(self):
        return str(self.InsertTimeEnd, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', OrderSysID = \'{4}\', InsertTimeStart = \'{5}\', InsertTimeEnd = \'{6}\', InvestUnitID = \'{7}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), str(self.InsertTimeStart, 'GB2312'), str(self.InsertTimeEnd, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'InsertTimeStart': str(self.InsertTimeStart, 'GB2312'),'InsertTimeEnd': str(self.InsertTimeEnd, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.InsertTimeStart=self.InsertTimeStart
        obj.InsertTimeEnd=self.InsertTimeEnd
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryTradeField(Structure):
    """查询成交"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 成交编号
        ("TradeID", c_char*21),
        # 开始时间
        ("TradeTimeStart", c_char*9),
        # 结束时间
        ("TradeTimeEnd", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTradeID(self):
        return str(self.TradeID, 'GB2312')

    def getTradeTimeStart(self):
        return str(self.TradeTimeStart, 'GB2312')

    def getTradeTimeEnd(self):
        return str(self.TradeTimeEnd, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', TradeID = \'{4}\', TradeTimeStart = \'{5}\', TradeTimeEnd = \'{6}\', InvestUnitID = \'{7}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TradeID, 'GB2312'), str(self.TradeTimeStart, 'GB2312'), str(self.TradeTimeEnd, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TradeID': str(self.TradeID, 'GB2312'),'TradeTimeStart': str(self.TradeTimeStart, 'GB2312'),'TradeTimeEnd': str(self.TradeTimeEnd, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTradeField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.TradeID=self.TradeID
        obj.TradeTimeStart=self.TradeTimeStart
        obj.TradeTimeEnd=self.TradeTimeEnd
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryInvestorPositionField(Structure):
    """查询投资者持仓"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInvestorPositionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryTradingAccountField(Structure):
    """查询资金账户"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 业务类型
        ("BizType", c_char),
        # 投资者帐号
        ("AccountID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getBizType(self):
        return BizTypeType(ord(self.BizType))

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', CurrencyID = \'{2}\', BizType = BizTypeType.{3}, AccountID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.CurrencyID, 'GB2312'), '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name, str(self.AccountID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'BizType': '' if ord(self.BizType) == 0 else BizTypeType(ord(self.BizType)).name,'AccountID': str(self.AccountID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTradingAccountField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.CurrencyID=self.CurrencyID
        obj.BizType=self.BizType
        obj.AccountID=self.AccountID
        return obj

class CThostFtdcQryInvestorField(Structure):
    """查询投资者"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInvestorField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

class CThostFtdcQryTradingCodeField(Structure):
    """查询交易编码"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 客户代码
        ("ClientID", c_char*11),
        # 交易编码类型
        ("ClientIDType", c_char),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')
    def getClientIDType(self):
        return ClientIDTypeType(ord(self.ClientIDType))

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExchangeID = \'{2}\', ClientID = \'{3}\', ClientIDType = ClientIDTypeType.{4}, InvestUnitID = \'{5}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ClientID, 'GB2312'), '' if ord(self.ClientIDType) == 0 else ClientIDTypeType(ord(self.ClientIDType)).name, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ClientIDType': '' if ord(self.ClientIDType) == 0 else ClientIDTypeType(ord(self.ClientIDType)).name,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTradingCodeField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        obj.ClientID=self.ClientID
        obj.ClientIDType=self.ClientIDType
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryInvestorGroupField(Structure):
    """查询投资者组"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\''.format(str(self.BrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInvestorGroupField()
        obj.BrokerID=self.BrokerID
        return obj

class CThostFtdcQryInstrumentMarginRateField(Structure):
    """查询合约保证金率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', HedgeFlag = HedgeFlagType.{3}, ExchangeID = \'{4}\', InvestUnitID = \'{5}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInstrumentMarginRateField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryInstrumentCommissionRateField(Structure):
    """查询手续费率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInstrumentCommissionRateField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryInstrumentTradingRightField(Structure):
    """查询合约交易权限"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInstrumentTradingRightField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcQryBrokerField(Structure):
    """查询经纪公司"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\''.format(str(self.BrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryBrokerField()
        obj.BrokerID=self.BrokerID
        return obj

class CThostFtdcQryTraderField(Structure):
    """查询交易员"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', ParticipantID = \'{1}\', TraderID = \'{2}\''.format(str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTraderField()
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcQrySuperUserFunctionField(Structure):
    """查询管理用户功能权限"""
    _fields_ = [
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'UserID = \'{0}\''.format(str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySuperUserFunctionField()
        obj.UserID=self.UserID
        return obj

class CThostFtdcQryUserSessionField(Structure):
    """查询用户会话"""
    _fields_ = [
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        ]

    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'FrontID = {0}, SessionID = {1}, BrokerID = \'{2}\', UserID = \'{3}\''.format(self.FrontID, self.SessionID, str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'FrontID': self.FrontID,'SessionID': self.SessionID,'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryUserSessionField()
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        return obj

class CThostFtdcQryPartBrokerField(Structure):
    """查询经纪公司会员代码"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 会员代码
        ("ParticipantID", c_char*11),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', BrokerID = \'{1}\', ParticipantID = \'{2}\''.format(str(self.ExchangeID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.ParticipantID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryPartBrokerField()
        obj.ExchangeID=self.ExchangeID
        obj.BrokerID=self.BrokerID
        obj.ParticipantID=self.ParticipantID
        return obj

class CThostFtdcQryFrontStatusField(Structure):
    """查询前置状态"""
    _fields_ = [
        # 前置编号
        ("FrontID", c_int32),
        ]

    def getFrontID(self):
        return self.FrontID

    def __str__(self):
        return 'FrontID = {0}'.format(self.FrontID)

    @property
    def __dict__(self):
        return {'FrontID': self.FrontID}

    def clone(self):
        obj=CThostFtdcQryFrontStatusField()
        obj.FrontID=self.FrontID
        return obj

class CThostFtdcQryExchangeOrderField(Structure):
    """查询交易所报单"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeInstID = \'{2}\', ExchangeID = \'{3}\', TraderID = \'{4}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeOrderField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcQryOrderActionField(Structure):
    """查询报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExchangeID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryExchangeOrderActionField(Structure):
    """查询交易所报单操作"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeID = \'{2}\', TraderID = \'{3}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeOrderActionField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcQrySuperUserField(Structure):
    """查询管理用户"""
    _fields_ = [
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'UserID = \'{0}\''.format(str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySuperUserField()
        obj.UserID=self.UserID
        return obj

class CThostFtdcQryExchangeField(Structure):
    """查询交易所"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\''.format(str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeField()
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryProductField(Structure):
    """查询产品"""
    _fields_ = [
        # 产品代码
        ("ProductID", c_char*31),
        # 产品类型
        ("ProductClass", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getProductID(self):
        return str(self.ProductID, 'GB2312')
    def getProductClass(self):
        return ProductClassType(ord(self.ProductClass))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'ProductID = \'{0}\', ProductClass = ProductClassType.{1}, ExchangeID = \'{2}\''.format(str(self.ProductID, 'GB2312'), '' if ord(self.ProductClass) == 0 else ProductClassType(ord(self.ProductClass)).name, str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ProductID': str(self.ProductID, 'GB2312'),'ProductClass': '' if ord(self.ProductClass) == 0 else ProductClassType(ord(self.ProductClass)).name,'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryProductField()
        obj.ProductID=self.ProductID
        obj.ProductClass=self.ProductClass
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryInstrumentField(Structure):
    """查询合约"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 产品代码
        ("ProductID", c_char*31),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getProductID(self):
        return str(self.ProductID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', ExchangeID = \'{1}\', ExchangeInstID = \'{2}\', ProductID = \'{3}\''.format(str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.ProductID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'ProductID': str(self.ProductID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInstrumentField()
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.ProductID=self.ProductID
        return obj

class CThostFtdcQryDepthMarketDataField(Structure):
    """查询行情"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', ExchangeID = \'{1}\''.format(str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryDepthMarketDataField()
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryBrokerUserField(Structure):
    """查询经纪公司用户"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryBrokerUserField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        return obj

class CThostFtdcQryBrokerUserFunctionField(Structure):
    """查询经纪公司用户权限"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryBrokerUserFunctionField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        return obj

class CThostFtdcQryTraderOfferField(Structure):
    """查询交易员报盘机"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', ParticipantID = \'{1}\', TraderID = \'{2}\''.format(str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTraderOfferField()
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcQrySyncDepositField(Structure):
    """查询出入金流水"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 出入金流水号
        ("DepositSeqNo", c_char*15),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getDepositSeqNo(self):
        return str(self.DepositSeqNo, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', DepositSeqNo = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.DepositSeqNo, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'DepositSeqNo': str(self.DepositSeqNo, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySyncDepositField()
        obj.BrokerID=self.BrokerID
        obj.DepositSeqNo=self.DepositSeqNo
        return obj

class CThostFtdcQrySettlementInfoField(Structure):
    """查询投资者结算结果"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易日
        ("TradingDay", c_char*9),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', TradingDay = \'{2}\', AccountID = \'{3}\', CurrencyID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.TradingDay, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySettlementInfoField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.TradingDay=self.TradingDay
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcQryExchangeMarginRateField(Structure):
    """查询交易所保证金率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', HedgeFlag = HedgeFlagType.{2}, ExchangeID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeMarginRateField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryExchangeMarginRateAdjustField(Structure):
    """查询交易所调整保证金率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', HedgeFlag = HedgeFlagType.{2}'.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name}

    def clone(self):
        obj=CThostFtdcQryExchangeMarginRateAdjustField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        return obj

class CThostFtdcQryExchangeRateField(Structure):
    """查询汇率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 源币种
        ("FromCurrencyID", c_char*4),
        # 目标币种
        ("ToCurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getFromCurrencyID(self):
        return str(self.FromCurrencyID, 'GB2312')

    def getToCurrencyID(self):
        return str(self.ToCurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', FromCurrencyID = \'{1}\', ToCurrencyID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.FromCurrencyID, 'GB2312'), str(self.ToCurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'FromCurrencyID': str(self.FromCurrencyID, 'GB2312'),'ToCurrencyID': str(self.ToCurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeRateField()
        obj.BrokerID=self.BrokerID
        obj.FromCurrencyID=self.FromCurrencyID
        obj.ToCurrencyID=self.ToCurrencyID
        return obj

class CThostFtdcQrySyncFundMortgageField(Structure):
    """查询货币质押流水"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 货币质押流水号
        ("MortgageSeqNo", c_char*15),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getMortgageSeqNo(self):
        return str(self.MortgageSeqNo, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', MortgageSeqNo = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.MortgageSeqNo, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'MortgageSeqNo': str(self.MortgageSeqNo, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySyncFundMortgageField()
        obj.BrokerID=self.BrokerID
        obj.MortgageSeqNo=self.MortgageSeqNo
        return obj

class CThostFtdcQryHisOrderField(Structure):
    """查询报单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 开始时间
        ("InsertTimeStart", c_char*9),
        # 结束时间
        ("InsertTimeEnd", c_char*9),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')

    def getInsertTimeStart(self):
        return str(self.InsertTimeStart, 'GB2312')

    def getInsertTimeEnd(self):
        return str(self.InsertTimeEnd, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', OrderSysID = \'{4}\', InsertTimeStart = \'{5}\', InsertTimeEnd = \'{6}\', TradingDay = \'{7}\', SettlementID = {8}'.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), str(self.InsertTimeStart, 'GB2312'), str(self.InsertTimeEnd, 'GB2312'), str(self.TradingDay, 'GB2312'), self.SettlementID)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'InsertTimeStart': str(self.InsertTimeStart, 'GB2312'),'InsertTimeEnd': str(self.InsertTimeEnd, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID}

    def clone(self):
        obj=CThostFtdcQryHisOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.InsertTimeStart=self.InsertTimeStart
        obj.InsertTimeEnd=self.InsertTimeEnd
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        return obj

class CThostFtdcOptionInstrMiniMarginField(Structure):
    """当前期权合约最小保证金"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 单位（手）期权合约最小保证金
        ("MinMargin", c_double),
        # 取值方式
        ("ValueMethod", c_char),
        # 是否跟随交易所收取
        ("IsRelative", c_int32),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getMinMargin(self):
        return self.MinMargin
    def getValueMethod(self):
        return ValueMethodType(ord(self.ValueMethod))
    def getIsRelative(self):
        return self.IsRelative

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', MinMargin = {4}, ValueMethod = ValueMethodType.{5}, IsRelative = {6}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.MinMargin, '' if ord(self.ValueMethod) == 0 else ValueMethodType(ord(self.ValueMethod)).name, self.IsRelative)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'MinMargin': self.MinMargin,'ValueMethod': '' if ord(self.ValueMethod) == 0 else ValueMethodType(ord(self.ValueMethod)).name,'IsRelative': self.IsRelative}

    def clone(self):
        obj=CThostFtdcOptionInstrMiniMarginField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.MinMargin=self.MinMargin
        obj.ValueMethod=self.ValueMethod
        obj.IsRelative=self.IsRelative
        return obj

class CThostFtdcOptionInstrMarginAdjustField(Structure):
    """当前期权合约保证金调整系数"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投机空头保证金调整系数
        ("SShortMarginRatioByMoney", c_double),
        # 投机空头保证金调整系数
        ("SShortMarginRatioByVolume", c_double),
        # 保值空头保证金调整系数
        ("HShortMarginRatioByMoney", c_double),
        # 保值空头保证金调整系数
        ("HShortMarginRatioByVolume", c_double),
        # 套利空头保证金调整系数
        ("AShortMarginRatioByMoney", c_double),
        # 套利空头保证金调整系数
        ("AShortMarginRatioByVolume", c_double),
        # 是否跟随交易所收取
        ("IsRelative", c_int32),
        # 做市商空头保证金调整系数
        ("MShortMarginRatioByMoney", c_double),
        # 做市商空头保证金调整系数
        ("MShortMarginRatioByVolume", c_double),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getSShortMarginRatioByMoney(self):
        return self.SShortMarginRatioByMoney
    def getSShortMarginRatioByVolume(self):
        return self.SShortMarginRatioByVolume
    def getHShortMarginRatioByMoney(self):
        return self.HShortMarginRatioByMoney
    def getHShortMarginRatioByVolume(self):
        return self.HShortMarginRatioByVolume
    def getAShortMarginRatioByMoney(self):
        return self.AShortMarginRatioByMoney
    def getAShortMarginRatioByVolume(self):
        return self.AShortMarginRatioByVolume
    def getIsRelative(self):
        return self.IsRelative
    def getMShortMarginRatioByMoney(self):
        return self.MShortMarginRatioByMoney
    def getMShortMarginRatioByVolume(self):
        return self.MShortMarginRatioByVolume

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', SShortMarginRatioByMoney = {4}, SShortMarginRatioByVolume = {5}, HShortMarginRatioByMoney = {6}, HShortMarginRatioByVolume = {7}, AShortMarginRatioByMoney = {8}, AShortMarginRatioByVolume = {9}, IsRelative = {10}, MShortMarginRatioByMoney = {11}, MShortMarginRatioByVolume = {12}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.SShortMarginRatioByMoney, self.SShortMarginRatioByVolume, self.HShortMarginRatioByMoney, self.HShortMarginRatioByVolume, self.AShortMarginRatioByMoney, self.AShortMarginRatioByVolume, self.IsRelative, self.MShortMarginRatioByMoney, self.MShortMarginRatioByVolume)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'SShortMarginRatioByMoney': self.SShortMarginRatioByMoney,'SShortMarginRatioByVolume': self.SShortMarginRatioByVolume,'HShortMarginRatioByMoney': self.HShortMarginRatioByMoney,'HShortMarginRatioByVolume': self.HShortMarginRatioByVolume,'AShortMarginRatioByMoney': self.AShortMarginRatioByMoney,'AShortMarginRatioByVolume': self.AShortMarginRatioByVolume,'IsRelative': self.IsRelative,'MShortMarginRatioByMoney': self.MShortMarginRatioByMoney,'MShortMarginRatioByVolume': self.MShortMarginRatioByVolume}

    def clone(self):
        obj=CThostFtdcOptionInstrMarginAdjustField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.SShortMarginRatioByMoney=self.SShortMarginRatioByMoney
        obj.SShortMarginRatioByVolume=self.SShortMarginRatioByVolume
        obj.HShortMarginRatioByMoney=self.HShortMarginRatioByMoney
        obj.HShortMarginRatioByVolume=self.HShortMarginRatioByVolume
        obj.AShortMarginRatioByMoney=self.AShortMarginRatioByMoney
        obj.AShortMarginRatioByVolume=self.AShortMarginRatioByVolume
        obj.IsRelative=self.IsRelative
        obj.MShortMarginRatioByMoney=self.MShortMarginRatioByMoney
        obj.MShortMarginRatioByVolume=self.MShortMarginRatioByVolume
        return obj

class CThostFtdcOptionInstrCommRateField(Structure):
    """当前期权合约手续费的详细内容"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 开仓手续费率
        ("OpenRatioByMoney", c_double),
        # 开仓手续费
        ("OpenRatioByVolume", c_double),
        # 平仓手续费率
        ("CloseRatioByMoney", c_double),
        # 平仓手续费
        ("CloseRatioByVolume", c_double),
        # 平今手续费率
        ("CloseTodayRatioByMoney", c_double),
        # 平今手续费
        ("CloseTodayRatioByVolume", c_double),
        # 执行手续费率
        ("StrikeRatioByMoney", c_double),
        # 执行手续费
        ("StrikeRatioByVolume", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOpenRatioByMoney(self):
        return self.OpenRatioByMoney
    def getOpenRatioByVolume(self):
        return self.OpenRatioByVolume
    def getCloseRatioByMoney(self):
        return self.CloseRatioByMoney
    def getCloseRatioByVolume(self):
        return self.CloseRatioByVolume
    def getCloseTodayRatioByMoney(self):
        return self.CloseTodayRatioByMoney
    def getCloseTodayRatioByVolume(self):
        return self.CloseTodayRatioByVolume
    def getStrikeRatioByMoney(self):
        return self.StrikeRatioByMoney
    def getStrikeRatioByVolume(self):
        return self.StrikeRatioByVolume

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', OpenRatioByMoney = {4}, OpenRatioByVolume = {5}, CloseRatioByMoney = {6}, CloseRatioByVolume = {7}, CloseTodayRatioByMoney = {8}, CloseTodayRatioByVolume = {9}, StrikeRatioByMoney = {10}, StrikeRatioByVolume = {11}, ExchangeID = \'{12}\', InvestUnitID = \'{13}\''.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OpenRatioByMoney, self.OpenRatioByVolume, self.CloseRatioByMoney, self.CloseRatioByVolume, self.CloseTodayRatioByMoney, self.CloseTodayRatioByVolume, self.StrikeRatioByMoney, self.StrikeRatioByVolume, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OpenRatioByMoney': self.OpenRatioByMoney,'OpenRatioByVolume': self.OpenRatioByVolume,'CloseRatioByMoney': self.CloseRatioByMoney,'CloseRatioByVolume': self.CloseRatioByVolume,'CloseTodayRatioByMoney': self.CloseTodayRatioByMoney,'CloseTodayRatioByVolume': self.CloseTodayRatioByVolume,'StrikeRatioByMoney': self.StrikeRatioByMoney,'StrikeRatioByVolume': self.StrikeRatioByVolume,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcOptionInstrCommRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OpenRatioByMoney=self.OpenRatioByMoney
        obj.OpenRatioByVolume=self.OpenRatioByVolume
        obj.CloseRatioByMoney=self.CloseRatioByMoney
        obj.CloseRatioByVolume=self.CloseRatioByVolume
        obj.CloseTodayRatioByMoney=self.CloseTodayRatioByMoney
        obj.CloseTodayRatioByVolume=self.CloseTodayRatioByVolume
        obj.StrikeRatioByMoney=self.StrikeRatioByMoney
        obj.StrikeRatioByVolume=self.StrikeRatioByVolume
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcOptionInstrTradeCostField(Structure):
    """期权交易成本"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 期权合约保证金不变部分
        ("FixedMargin", c_double),
        # 期权合约最小保证金
        ("MiniMargin", c_double),
        # 期权合约权利金
        ("Royalty", c_double),
        # 交易所期权合约保证金不变部分
        ("ExchFixedMargin", c_double),
        # 交易所期权合约最小保证金
        ("ExchMiniMargin", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getFixedMargin(self):
        return self.FixedMargin
    def getMiniMargin(self):
        return self.MiniMargin
    def getRoyalty(self):
        return self.Royalty
    def getExchFixedMargin(self):
        return self.ExchFixedMargin
    def getExchMiniMargin(self):
        return self.ExchMiniMargin

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', HedgeFlag = HedgeFlagType.{3}, FixedMargin = {4}, MiniMargin = {5}, Royalty = {6}, ExchFixedMargin = {7}, ExchMiniMargin = {8}, ExchangeID = \'{9}\', InvestUnitID = \'{10}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.FixedMargin, self.MiniMargin, self.Royalty, self.ExchFixedMargin, self.ExchMiniMargin, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'FixedMargin': self.FixedMargin,'MiniMargin': self.MiniMargin,'Royalty': self.Royalty,'ExchFixedMargin': self.ExchFixedMargin,'ExchMiniMargin': self.ExchMiniMargin,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcOptionInstrTradeCostField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        obj.FixedMargin=self.FixedMargin
        obj.MiniMargin=self.MiniMargin
        obj.Royalty=self.Royalty
        obj.ExchFixedMargin=self.ExchFixedMargin
        obj.ExchMiniMargin=self.ExchMiniMargin
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryOptionInstrTradeCostField(Structure):
    """期权交易成本查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 期权合约报价
        ("InputPrice", c_double),
        # 标的价格,填0则用昨结算价
        ("UnderlyingPrice", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getInputPrice(self):
        return self.InputPrice
    def getUnderlyingPrice(self):
        return self.UnderlyingPrice

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', HedgeFlag = HedgeFlagType.{3}, InputPrice = {4}, UnderlyingPrice = {5}, ExchangeID = \'{6}\', InvestUnitID = \'{7}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.InputPrice, self.UnderlyingPrice, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'InputPrice': self.InputPrice,'UnderlyingPrice': self.UnderlyingPrice,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryOptionInstrTradeCostField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        obj.InputPrice=self.InputPrice
        obj.UnderlyingPrice=self.UnderlyingPrice
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryOptionInstrCommRateField(Structure):
    """期权手续费率查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryOptionInstrCommRateField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcIndexPriceField(Structure):
    """股指现货指数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 指数现货收盘价
        ("ClosePrice", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getClosePrice(self):
        return self.ClosePrice

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', ClosePrice = {2}'.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), self.ClosePrice)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ClosePrice': self.ClosePrice}

    def clone(self):
        obj=CThostFtdcIndexPriceField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.ClosePrice=self.ClosePrice
        return obj

class CThostFtdcInputExecOrderField(Structure):
    """输入的执行宣告"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 执行宣告引用
        ("ExecOrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 数量
        ("Volume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 执行类型
        ("ActionType", c_char),
        # 保留头寸申请的持仓方向
        ("PosiDirection", c_char),
        # 期权行权后是否保留期货头寸的标记,该字段已废弃
        ("ReservePositionFlag", c_char),
        # 期权行权后生成的头寸是否自动平仓
        ("CloseFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 交易编码
        ("ClientID", c_char*11),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExecOrderRef(self):
        return str(self.ExecOrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVolume(self):
        return self.Volume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getActionType(self):
        return ActionTypeType(ord(self.ActionType))
    def getPosiDirection(self):
        return PosiDirectionType(ord(self.PosiDirection))
    def getReservePositionFlag(self):
        return ExecOrderPositionFlagType(ord(self.ReservePositionFlag))
    def getCloseFlag(self):
        return ExecOrderCloseFlagType(ord(self.CloseFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExecOrderRef = \'{3}\', UserID = \'{4}\', Volume = {5}, RequestID = {6}, BusinessUnit = \'{7}\', OffsetFlag = OffsetFlagType.{8}, HedgeFlag = HedgeFlagType.{9}, ActionType = ActionTypeType.{10}, PosiDirection = PosiDirectionType.{11}, ReservePositionFlag = ExecOrderPositionFlagType.{12}, CloseFlag = ExecOrderCloseFlagType.{13}, ExchangeID = \'{14}\', InvestUnitID = \'{15}\', AccountID = \'{16}\', CurrencyID = \'{17}\', ClientID = \'{18}\', IPAddress = \'{19}\', MacAddress = \'{20}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExecOrderRef, 'GB2312'), str(self.UserID, 'GB2312'), self.Volume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name, '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name, '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name, '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExecOrderRef': str(self.ExecOrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Volume': self.Volume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ActionType': '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name,'PosiDirection': '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name,'ReservePositionFlag': '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name,'CloseFlag': '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputExecOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExecOrderRef=self.ExecOrderRef
        obj.UserID=self.UserID
        obj.Volume=self.Volume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.ActionType=self.ActionType
        obj.PosiDirection=self.PosiDirection
        obj.ReservePositionFlag=self.ReservePositionFlag
        obj.CloseFlag=self.CloseFlag
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.ClientID=self.ClientID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcInputExecOrderActionField(Structure):
    """输入执行宣告操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 执行宣告操作引用
        ("ExecOrderActionRef", c_int32),
        # 执行宣告引用
        ("ExecOrderRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 执行宣告操作编号
        ("ExecOrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getExecOrderActionRef(self):
        return self.ExecOrderActionRef

    def getExecOrderRef(self):
        return str(self.ExecOrderRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExecOrderSysID(self):
        return str(self.ExecOrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExecOrderActionRef = {2}, ExecOrderRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', ExecOrderSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, UserID = \'{10}\', InstrumentID = \'{11}\', InvestUnitID = \'{12}\', IPAddress = \'{13}\', MacAddress = \'{14}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.ExecOrderActionRef, str(self.ExecOrderRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.ExecOrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.UserID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExecOrderActionRef': self.ExecOrderActionRef,'ExecOrderRef': str(self.ExecOrderRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExecOrderSysID': str(self.ExecOrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'UserID': str(self.UserID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputExecOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExecOrderActionRef=self.ExecOrderActionRef
        obj.ExecOrderRef=self.ExecOrderRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.ExecOrderSysID=self.ExecOrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.UserID=self.UserID
        obj.InstrumentID=self.InstrumentID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcExecOrderField(Structure):
    """执行宣告"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 执行宣告引用
        ("ExecOrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 数量
        ("Volume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 执行类型
        ("ActionType", c_char),
        # 保留头寸申请的持仓方向
        ("PosiDirection", c_char),
        # 期权行权后是否保留期货头寸的标记,该字段已废弃
        ("ReservePositionFlag", c_char),
        # 期权行权后生成的头寸是否自动平仓
        ("CloseFlag", c_char),
        # 本地执行宣告编号
        ("ExecOrderLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 执行宣告提交状态
        ("OrderSubmitStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 执行宣告编号
        ("ExecOrderSysID", c_char*21),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 执行结果
        ("ExecResult", c_char),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 操作用户代码
        ("ActiveUserID", c_char*16),
        # 经纪公司报单编号
        ("BrokerExecOrderSeq", c_int32),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExecOrderRef(self):
        return str(self.ExecOrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVolume(self):
        return self.Volume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getActionType(self):
        return ActionTypeType(ord(self.ActionType))
    def getPosiDirection(self):
        return PosiDirectionType(ord(self.PosiDirection))
    def getReservePositionFlag(self):
        return ExecOrderPositionFlagType(ord(self.ReservePositionFlag))
    def getCloseFlag(self):
        return ExecOrderCloseFlagType(ord(self.CloseFlag))

    def getExecOrderLocalID(self):
        return str(self.ExecOrderLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getExecOrderSysID(self):
        return str(self.ExecOrderSysID, 'GB2312')

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')
    def getExecResult(self):
        return ExecResultType(ord(self.ExecResult))

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getActiveUserID(self):
        return str(self.ActiveUserID, 'GB2312')
    def getBrokerExecOrderSeq(self):
        return self.BrokerExecOrderSeq

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExecOrderRef = \'{3}\', UserID = \'{4}\', Volume = {5}, RequestID = {6}, BusinessUnit = \'{7}\', OffsetFlag = OffsetFlagType.{8}, HedgeFlag = HedgeFlagType.{9}, ActionType = ActionTypeType.{10}, PosiDirection = PosiDirectionType.{11}, ReservePositionFlag = ExecOrderPositionFlagType.{12}, CloseFlag = ExecOrderCloseFlagType.{13}, ExecOrderLocalID = \'{14}\', ExchangeID = \'{15}\', ParticipantID = \'{16}\', ClientID = \'{17}\', ExchangeInstID = \'{18}\', TraderID = \'{19}\', InstallID = {20}, OrderSubmitStatus = OrderSubmitStatusType.{21}, NotifySequence = {22}, TradingDay = \'{23}\', SettlementID = {24}, ExecOrderSysID = \'{25}\', InsertDate = \'{26}\', InsertTime = \'{27}\', CancelTime = \'{28}\', ExecResult = ExecResultType.{29}, ClearingPartID = \'{30}\', SequenceNo = {31}, FrontID = {32}, SessionID = {33}, UserProductInfo = \'{34}\', StatusMsg = \'{35}\', ActiveUserID = \'{36}\', BrokerExecOrderSeq = {37}, BranchID = \'{38}\', InvestUnitID = \'{39}\', AccountID = \'{40}\', CurrencyID = \'{41}\', IPAddress = \'{42}\', MacAddress = \'{43}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExecOrderRef, 'GB2312'), str(self.UserID, 'GB2312'), self.Volume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name, '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name, '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name, '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name, str(self.ExecOrderLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.ExecOrderSysID, 'GB2312'), str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.CancelTime, 'GB2312'), '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name, str(self.ClearingPartID, 'GB2312'), self.SequenceNo, self.FrontID, self.SessionID, str(self.UserProductInfo, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.ActiveUserID, 'GB2312'), self.BrokerExecOrderSeq, str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExecOrderRef': str(self.ExecOrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Volume': self.Volume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ActionType': '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name,'PosiDirection': '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name,'ReservePositionFlag': '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name,'CloseFlag': '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name,'ExecOrderLocalID': str(self.ExecOrderLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'ExecOrderSysID': str(self.ExecOrderSysID, 'GB2312'),'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'ExecResult': '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name,'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'FrontID': self.FrontID,'SessionID': self.SessionID,'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'ActiveUserID': str(self.ActiveUserID, 'GB2312'),'BrokerExecOrderSeq': self.BrokerExecOrderSeq,'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExecOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExecOrderRef=self.ExecOrderRef
        obj.UserID=self.UserID
        obj.Volume=self.Volume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.ActionType=self.ActionType
        obj.PosiDirection=self.PosiDirection
        obj.ReservePositionFlag=self.ReservePositionFlag
        obj.CloseFlag=self.CloseFlag
        obj.ExecOrderLocalID=self.ExecOrderLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.ExecOrderSysID=self.ExecOrderSysID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.CancelTime=self.CancelTime
        obj.ExecResult=self.ExecResult
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.UserProductInfo=self.UserProductInfo
        obj.StatusMsg=self.StatusMsg
        obj.ActiveUserID=self.ActiveUserID
        obj.BrokerExecOrderSeq=self.BrokerExecOrderSeq
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcExecOrderActionField(Structure):
    """执行宣告操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 执行宣告操作引用
        ("ExecOrderActionRef", c_int32),
        # 执行宣告引用
        ("ExecOrderRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 执行宣告操作编号
        ("ExecOrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地执行宣告编号
        ("ExecOrderLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 执行类型
        ("ActionType", c_char),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getExecOrderActionRef(self):
        return self.ExecOrderActionRef

    def getExecOrderRef(self):
        return str(self.ExecOrderRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExecOrderSysID(self):
        return str(self.ExecOrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getExecOrderLocalID(self):
        return str(self.ExecOrderLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getActionType(self):
        return ActionTypeType(ord(self.ActionType))

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExecOrderActionRef = {2}, ExecOrderRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', ExecOrderSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, ActionDate = \'{10}\', ActionTime = \'{11}\', TraderID = \'{12}\', InstallID = {13}, ExecOrderLocalID = \'{14}\', ActionLocalID = \'{15}\', ParticipantID = \'{16}\', ClientID = \'{17}\', BusinessUnit = \'{18}\', OrderActionStatus = OrderActionStatusType.{19}, UserID = \'{20}\', ActionType = ActionTypeType.{21}, StatusMsg = \'{22}\', InstrumentID = \'{23}\', BranchID = \'{24}\', InvestUnitID = \'{25}\', IPAddress = \'{26}\', MacAddress = \'{27}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.ExecOrderActionRef, str(self.ExecOrderRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.ExecOrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.ExecOrderLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name, str(self.StatusMsg, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExecOrderActionRef': self.ExecOrderActionRef,'ExecOrderRef': str(self.ExecOrderRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExecOrderSysID': str(self.ExecOrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'ExecOrderLocalID': str(self.ExecOrderLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'ActionType': '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name,'StatusMsg': str(self.StatusMsg, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExecOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExecOrderActionRef=self.ExecOrderActionRef
        obj.ExecOrderRef=self.ExecOrderRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.ExecOrderSysID=self.ExecOrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.ExecOrderLocalID=self.ExecOrderLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.ActionType=self.ActionType
        obj.StatusMsg=self.StatusMsg
        obj.InstrumentID=self.InstrumentID
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryExecOrderField(Structure):
    """执行宣告查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 执行宣告编号
        ("ExecOrderSysID", c_char*21),
        # 开始时间
        ("InsertTimeStart", c_char*9),
        # 结束时间
        ("InsertTimeEnd", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExecOrderSysID(self):
        return str(self.ExecOrderSysID, 'GB2312')

    def getInsertTimeStart(self):
        return str(self.InsertTimeStart, 'GB2312')

    def getInsertTimeEnd(self):
        return str(self.InsertTimeEnd, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', ExecOrderSysID = \'{4}\', InsertTimeStart = \'{5}\', InsertTimeEnd = \'{6}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ExecOrderSysID, 'GB2312'), str(self.InsertTimeStart, 'GB2312'), str(self.InsertTimeEnd, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExecOrderSysID': str(self.ExecOrderSysID, 'GB2312'),'InsertTimeStart': str(self.InsertTimeStart, 'GB2312'),'InsertTimeEnd': str(self.InsertTimeEnd, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExecOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.ExecOrderSysID=self.ExecOrderSysID
        obj.InsertTimeStart=self.InsertTimeStart
        obj.InsertTimeEnd=self.InsertTimeEnd
        return obj

class CThostFtdcExchangeExecOrderField(Structure):
    """交易所执行宣告信息"""
    _fields_ = [
        # 数量
        ("Volume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 执行类型
        ("ActionType", c_char),
        # 保留头寸申请的持仓方向
        ("PosiDirection", c_char),
        # 期权行权后是否保留期货头寸的标记,该字段已废弃
        ("ReservePositionFlag", c_char),
        # 期权行权后生成的头寸是否自动平仓
        ("CloseFlag", c_char),
        # 本地执行宣告编号
        ("ExecOrderLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 执行宣告提交状态
        ("OrderSubmitStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 执行宣告编号
        ("ExecOrderSysID", c_char*21),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 执行结果
        ("ExecResult", c_char),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 营业部编号
        ("BranchID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]

    def getVolume(self):
        return self.Volume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getActionType(self):
        return ActionTypeType(ord(self.ActionType))
    def getPosiDirection(self):
        return PosiDirectionType(ord(self.PosiDirection))
    def getReservePositionFlag(self):
        return ExecOrderPositionFlagType(ord(self.ReservePositionFlag))
    def getCloseFlag(self):
        return ExecOrderCloseFlagType(ord(self.CloseFlag))

    def getExecOrderLocalID(self):
        return str(self.ExecOrderLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getExecOrderSysID(self):
        return str(self.ExecOrderSysID, 'GB2312')

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')
    def getExecResult(self):
        return ExecResultType(ord(self.ExecResult))

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'Volume = {0}, RequestID = {1}, BusinessUnit = \'{2}\', OffsetFlag = OffsetFlagType.{3}, HedgeFlag = HedgeFlagType.{4}, ActionType = ActionTypeType.{5}, PosiDirection = PosiDirectionType.{6}, ReservePositionFlag = ExecOrderPositionFlagType.{7}, CloseFlag = ExecOrderCloseFlagType.{8}, ExecOrderLocalID = \'{9}\', ExchangeID = \'{10}\', ParticipantID = \'{11}\', ClientID = \'{12}\', ExchangeInstID = \'{13}\', TraderID = \'{14}\', InstallID = {15}, OrderSubmitStatus = OrderSubmitStatusType.{16}, NotifySequence = {17}, TradingDay = \'{18}\', SettlementID = {19}, ExecOrderSysID = \'{20}\', InsertDate = \'{21}\', InsertTime = \'{22}\', CancelTime = \'{23}\', ExecResult = ExecResultType.{24}, ClearingPartID = \'{25}\', SequenceNo = {26}, BranchID = \'{27}\', IPAddress = \'{28}\', MacAddress = \'{29}\''.format(self.Volume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name, '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name, '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name, '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name, str(self.ExecOrderLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.ExecOrderSysID, 'GB2312'), str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.CancelTime, 'GB2312'), '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name, str(self.ClearingPartID, 'GB2312'), self.SequenceNo, str(self.BranchID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'Volume': self.Volume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ActionType': '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name,'PosiDirection': '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name,'ReservePositionFlag': '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name,'CloseFlag': '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name,'ExecOrderLocalID': str(self.ExecOrderLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'ExecOrderSysID': str(self.ExecOrderSysID, 'GB2312'),'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'ExecResult': '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name,'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'BranchID': str(self.BranchID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeExecOrderField()
        obj.Volume=self.Volume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.ActionType=self.ActionType
        obj.PosiDirection=self.PosiDirection
        obj.ReservePositionFlag=self.ReservePositionFlag
        obj.CloseFlag=self.CloseFlag
        obj.ExecOrderLocalID=self.ExecOrderLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.ExecOrderSysID=self.ExecOrderSysID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.CancelTime=self.CancelTime
        obj.ExecResult=self.ExecResult
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.BranchID=self.BranchID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryExchangeExecOrderField(Structure):
    """交易所执行宣告查询"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeInstID = \'{2}\', ExchangeID = \'{3}\', TraderID = \'{4}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeExecOrderField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcQryExecOrderActionField(Structure):
    """执行宣告操作查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExchangeID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExecOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcExchangeExecOrderActionField(Structure):
    """交易所执行宣告操作"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 执行宣告操作编号
        ("ExecOrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地执行宣告编号
        ("ExecOrderLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 执行类型
        ("ActionType", c_char),
        # 营业部编号
        ("BranchID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExecOrderSysID(self):
        return str(self.ExecOrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getExecOrderLocalID(self):
        return str(self.ExecOrderLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getActionType(self):
        return ActionTypeType(ord(self.ActionType))

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', ExecOrderSysID = \'{1}\', ActionFlag = ActionFlagType.{2}, ActionDate = \'{3}\', ActionTime = \'{4}\', TraderID = \'{5}\', InstallID = {6}, ExecOrderLocalID = \'{7}\', ActionLocalID = \'{8}\', ParticipantID = \'{9}\', ClientID = \'{10}\', BusinessUnit = \'{11}\', OrderActionStatus = OrderActionStatusType.{12}, UserID = \'{13}\', ActionType = ActionTypeType.{14}, BranchID = \'{15}\', IPAddress = \'{16}\', MacAddress = \'{17}\''.format(str(self.ExchangeID, 'GB2312'), str(self.ExecOrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.ExecOrderLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name, str(self.BranchID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExecOrderSysID': str(self.ExecOrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'ExecOrderLocalID': str(self.ExecOrderLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'ActionType': '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name,'BranchID': str(self.BranchID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeExecOrderActionField()
        obj.ExchangeID=self.ExchangeID
        obj.ExecOrderSysID=self.ExecOrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.ExecOrderLocalID=self.ExecOrderLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.ActionType=self.ActionType
        obj.BranchID=self.BranchID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryExchangeExecOrderActionField(Structure):
    """交易所执行宣告操作查询"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeID = \'{2}\', TraderID = \'{3}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeExecOrderActionField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcErrExecOrderField(Structure):
    """错误执行宣告"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 执行宣告引用
        ("ExecOrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 数量
        ("Volume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 执行类型
        ("ActionType", c_char),
        # 保留头寸申请的持仓方向
        ("PosiDirection", c_char),
        # 期权行权后是否保留期货头寸的标记,该字段已废弃
        ("ReservePositionFlag", c_char),
        # 期权行权后生成的头寸是否自动平仓
        ("CloseFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 交易编码
        ("ClientID", c_char*11),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExecOrderRef(self):
        return str(self.ExecOrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVolume(self):
        return self.Volume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getActionType(self):
        return ActionTypeType(ord(self.ActionType))
    def getPosiDirection(self):
        return PosiDirectionType(ord(self.PosiDirection))
    def getReservePositionFlag(self):
        return ExecOrderPositionFlagType(ord(self.ReservePositionFlag))
    def getCloseFlag(self):
        return ExecOrderCloseFlagType(ord(self.CloseFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExecOrderRef = \'{3}\', UserID = \'{4}\', Volume = {5}, RequestID = {6}, BusinessUnit = \'{7}\', OffsetFlag = OffsetFlagType.{8}, HedgeFlag = HedgeFlagType.{9}, ActionType = ActionTypeType.{10}, PosiDirection = PosiDirectionType.{11}, ReservePositionFlag = ExecOrderPositionFlagType.{12}, CloseFlag = ExecOrderCloseFlagType.{13}, ExchangeID = \'{14}\', InvestUnitID = \'{15}\', AccountID = \'{16}\', CurrencyID = \'{17}\', ClientID = \'{18}\', IPAddress = \'{19}\', MacAddress = \'{20}\', ErrorID = {21}, ErrorMsg = \'{22}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExecOrderRef, 'GB2312'), str(self.UserID, 'GB2312'), self.Volume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name, '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name, '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name, '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExecOrderRef': str(self.ExecOrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Volume': self.Volume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ActionType': '' if ord(self.ActionType) == 0 else ActionTypeType(ord(self.ActionType)).name,'PosiDirection': '' if ord(self.PosiDirection) == 0 else PosiDirectionType(ord(self.PosiDirection)).name,'ReservePositionFlag': '' if ord(self.ReservePositionFlag) == 0 else ExecOrderPositionFlagType(ord(self.ReservePositionFlag)).name,'CloseFlag': '' if ord(self.CloseFlag) == 0 else ExecOrderCloseFlagType(ord(self.CloseFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcErrExecOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExecOrderRef=self.ExecOrderRef
        obj.UserID=self.UserID
        obj.Volume=self.Volume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.ActionType=self.ActionType
        obj.PosiDirection=self.PosiDirection
        obj.ReservePositionFlag=self.ReservePositionFlag
        obj.CloseFlag=self.CloseFlag
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.ClientID=self.ClientID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcQryErrExecOrderField(Structure):
    """查询错误执行宣告"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryErrExecOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

class CThostFtdcErrExecOrderActionField(Structure):
    """错误执行宣告操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 执行宣告操作引用
        ("ExecOrderActionRef", c_int32),
        # 执行宣告引用
        ("ExecOrderRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 执行宣告操作编号
        ("ExecOrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getExecOrderActionRef(self):
        return self.ExecOrderActionRef

    def getExecOrderRef(self):
        return str(self.ExecOrderRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExecOrderSysID(self):
        return str(self.ExecOrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExecOrderActionRef = {2}, ExecOrderRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', ExecOrderSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, UserID = \'{10}\', InstrumentID = \'{11}\', InvestUnitID = \'{12}\', IPAddress = \'{13}\', MacAddress = \'{14}\', ErrorID = {15}, ErrorMsg = \'{16}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.ExecOrderActionRef, str(self.ExecOrderRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.ExecOrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.UserID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExecOrderActionRef': self.ExecOrderActionRef,'ExecOrderRef': str(self.ExecOrderRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExecOrderSysID': str(self.ExecOrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'UserID': str(self.UserID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcErrExecOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExecOrderActionRef=self.ExecOrderActionRef
        obj.ExecOrderRef=self.ExecOrderRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.ExecOrderSysID=self.ExecOrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.UserID=self.UserID
        obj.InstrumentID=self.InstrumentID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcQryErrExecOrderActionField(Structure):
    """查询错误执行宣告操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryErrExecOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

class CThostFtdcOptionInstrTradingRightField(Structure):
    """投资者期权合约交易权限"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 买卖方向
        ("Direction", c_char),
        # 交易权限
        ("TradingRight", c_char),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getTradingRight(self):
        return TradingRightType(ord(self.TradingRight))

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', Direction = DirectionType.{4}, TradingRight = TradingRightType.{5}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, '' if ord(self.TradingRight) == 0 else TradingRightType(ord(self.TradingRight)).name)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'TradingRight': '' if ord(self.TradingRight) == 0 else TradingRightType(ord(self.TradingRight)).name}

    def clone(self):
        obj=CThostFtdcOptionInstrTradingRightField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.Direction=self.Direction
        obj.TradingRight=self.TradingRight
        return obj

class CThostFtdcQryOptionInstrTradingRightField(Structure):
    """查询期权合约交易权限"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 买卖方向
        ("Direction", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', Direction = DirectionType.{3}'.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name}

    def clone(self):
        obj=CThostFtdcQryOptionInstrTradingRightField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.Direction=self.Direction
        return obj

class CThostFtdcInputForQuoteField(Structure):
    """输入的询价"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 询价引用
        ("ForQuoteRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getForQuoteRef(self):
        return str(self.ForQuoteRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ForQuoteRef = \'{3}\', UserID = \'{4}\', ExchangeID = \'{5}\', InvestUnitID = \'{6}\', IPAddress = \'{7}\', MacAddress = \'{8}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ForQuoteRef, 'GB2312'), str(self.UserID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ForQuoteRef': str(self.ForQuoteRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputForQuoteField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ForQuoteRef=self.ForQuoteRef
        obj.UserID=self.UserID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcForQuoteField(Structure):
    """询价"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 询价引用
        ("ForQuoteRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 本地询价编号
        ("ForQuoteLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 询价状态
        ("ForQuoteStatus", c_char),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 操作用户代码
        ("ActiveUserID", c_char*16),
        # 经纪公司询价编号
        ("BrokerForQutoSeq", c_int32),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getForQuoteRef(self):
        return str(self.ForQuoteRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getForQuoteLocalID(self):
        return str(self.ForQuoteLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')
    def getForQuoteStatus(self):
        return ForQuoteStatusType(ord(self.ForQuoteStatus))
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getActiveUserID(self):
        return str(self.ActiveUserID, 'GB2312')
    def getBrokerForQutoSeq(self):
        return self.BrokerForQutoSeq

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ForQuoteRef = \'{3}\', UserID = \'{4}\', ForQuoteLocalID = \'{5}\', ExchangeID = \'{6}\', ParticipantID = \'{7}\', ClientID = \'{8}\', ExchangeInstID = \'{9}\', TraderID = \'{10}\', InstallID = {11}, InsertDate = \'{12}\', InsertTime = \'{13}\', ForQuoteStatus = ForQuoteStatusType.{14}, FrontID = {15}, SessionID = {16}, StatusMsg = \'{17}\', ActiveUserID = \'{18}\', BrokerForQutoSeq = {19}, InvestUnitID = \'{20}\', IPAddress = \'{21}\', MacAddress = \'{22}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ForQuoteRef, 'GB2312'), str(self.UserID, 'GB2312'), str(self.ForQuoteLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), '' if ord(self.ForQuoteStatus) == 0 else ForQuoteStatusType(ord(self.ForQuoteStatus)).name, self.FrontID, self.SessionID, str(self.StatusMsg, 'GB2312'), str(self.ActiveUserID, 'GB2312'), self.BrokerForQutoSeq, str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ForQuoteRef': str(self.ForQuoteRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'ForQuoteLocalID': str(self.ForQuoteLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'ForQuoteStatus': '' if ord(self.ForQuoteStatus) == 0 else ForQuoteStatusType(ord(self.ForQuoteStatus)).name,'FrontID': self.FrontID,'SessionID': self.SessionID,'StatusMsg': str(self.StatusMsg, 'GB2312'),'ActiveUserID': str(self.ActiveUserID, 'GB2312'),'BrokerForQutoSeq': self.BrokerForQutoSeq,'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcForQuoteField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ForQuoteRef=self.ForQuoteRef
        obj.UserID=self.UserID
        obj.ForQuoteLocalID=self.ForQuoteLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.ForQuoteStatus=self.ForQuoteStatus
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.StatusMsg=self.StatusMsg
        obj.ActiveUserID=self.ActiveUserID
        obj.BrokerForQutoSeq=self.BrokerForQutoSeq
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryForQuoteField(Structure):
    """询价查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 开始时间
        ("InsertTimeStart", c_char*9),
        # 结束时间
        ("InsertTimeEnd", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInsertTimeStart(self):
        return str(self.InsertTimeStart, 'GB2312')

    def getInsertTimeEnd(self):
        return str(self.InsertTimeEnd, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InsertTimeStart = \'{4}\', InsertTimeEnd = \'{5}\', InvestUnitID = \'{6}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InsertTimeStart, 'GB2312'), str(self.InsertTimeEnd, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InsertTimeStart': str(self.InsertTimeStart, 'GB2312'),'InsertTimeEnd': str(self.InsertTimeEnd, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryForQuoteField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InsertTimeStart=self.InsertTimeStart
        obj.InsertTimeEnd=self.InsertTimeEnd
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcExchangeForQuoteField(Structure):
    """交易所询价信息"""
    _fields_ = [
        # 本地询价编号
        ("ForQuoteLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 询价状态
        ("ForQuoteStatus", c_char),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getForQuoteLocalID(self):
        return str(self.ForQuoteLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')
    def getForQuoteStatus(self):
        return ForQuoteStatusType(ord(self.ForQuoteStatus))

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'ForQuoteLocalID = \'{0}\', ExchangeID = \'{1}\', ParticipantID = \'{2}\', ClientID = \'{3}\', ExchangeInstID = \'{4}\', TraderID = \'{5}\', InstallID = {6}, InsertDate = \'{7}\', InsertTime = \'{8}\', ForQuoteStatus = ForQuoteStatusType.{9}, IPAddress = \'{10}\', MacAddress = \'{11}\''.format(str(self.ForQuoteLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), '' if ord(self.ForQuoteStatus) == 0 else ForQuoteStatusType(ord(self.ForQuoteStatus)).name, str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'ForQuoteLocalID': str(self.ForQuoteLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'ForQuoteStatus': '' if ord(self.ForQuoteStatus) == 0 else ForQuoteStatusType(ord(self.ForQuoteStatus)).name,'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeForQuoteField()
        obj.ForQuoteLocalID=self.ForQuoteLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.ForQuoteStatus=self.ForQuoteStatus
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryExchangeForQuoteField(Structure):
    """交易所询价查询"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeInstID = \'{2}\', ExchangeID = \'{3}\', TraderID = \'{4}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeForQuoteField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcInputQuoteField(Structure):
    """输入的报价"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报价引用
        ("QuoteRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 卖价格
        ("AskPrice", c_double),
        # 买价格
        ("BidPrice", c_double),
        # 卖数量
        ("AskVolume", c_int32),
        # 买数量
        ("BidVolume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 卖开平标志
        ("AskOffsetFlag", c_char),
        # 买开平标志
        ("BidOffsetFlag", c_char),
        # 卖投机套保标志
        ("AskHedgeFlag", c_char),
        # 买投机套保标志
        ("BidHedgeFlag", c_char),
        # 衍生卖报单引用
        ("AskOrderRef", c_char*13),
        # 衍生买报单引用
        ("BidOrderRef", c_char*13),
        # 应价编号
        ("ForQuoteSysID", c_char*21),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 交易编码
        ("ClientID", c_char*11),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getQuoteRef(self):
        return str(self.QuoteRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getAskPrice(self):
        return self.AskPrice
    def getBidPrice(self):
        return self.BidPrice
    def getAskVolume(self):
        return self.AskVolume
    def getBidVolume(self):
        return self.BidVolume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getAskOffsetFlag(self):
        return OffsetFlagType(ord(self.AskOffsetFlag))
    def getBidOffsetFlag(self):
        return OffsetFlagType(ord(self.BidOffsetFlag))
    def getAskHedgeFlag(self):
        return HedgeFlagType(ord(self.AskHedgeFlag))
    def getBidHedgeFlag(self):
        return HedgeFlagType(ord(self.BidHedgeFlag))

    def getAskOrderRef(self):
        return str(self.AskOrderRef, 'GB2312')

    def getBidOrderRef(self):
        return str(self.BidOrderRef, 'GB2312')

    def getForQuoteSysID(self):
        return str(self.ForQuoteSysID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', QuoteRef = \'{3}\', UserID = \'{4}\', AskPrice = {5}, BidPrice = {6}, AskVolume = {7}, BidVolume = {8}, RequestID = {9}, BusinessUnit = \'{10}\', AskOffsetFlag = OffsetFlagType.{11}, BidOffsetFlag = OffsetFlagType.{12}, AskHedgeFlag = HedgeFlagType.{13}, BidHedgeFlag = HedgeFlagType.{14}, AskOrderRef = \'{15}\', BidOrderRef = \'{16}\', ForQuoteSysID = \'{17}\', ExchangeID = \'{18}\', InvestUnitID = \'{19}\', ClientID = \'{20}\', IPAddress = \'{21}\', MacAddress = \'{22}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.QuoteRef, 'GB2312'), str(self.UserID, 'GB2312'), self.AskPrice, self.BidPrice, self.AskVolume, self.BidVolume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.AskOffsetFlag) == 0 else OffsetFlagType(ord(self.AskOffsetFlag)).name, '' if ord(self.BidOffsetFlag) == 0 else OffsetFlagType(ord(self.BidOffsetFlag)).name, '' if ord(self.AskHedgeFlag) == 0 else HedgeFlagType(ord(self.AskHedgeFlag)).name, '' if ord(self.BidHedgeFlag) == 0 else HedgeFlagType(ord(self.BidHedgeFlag)).name, str(self.AskOrderRef, 'GB2312'), str(self.BidOrderRef, 'GB2312'), str(self.ForQuoteSysID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'QuoteRef': str(self.QuoteRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'AskPrice': self.AskPrice,'BidPrice': self.BidPrice,'AskVolume': self.AskVolume,'BidVolume': self.BidVolume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'AskOffsetFlag': '' if ord(self.AskOffsetFlag) == 0 else OffsetFlagType(ord(self.AskOffsetFlag)).name,'BidOffsetFlag': '' if ord(self.BidOffsetFlag) == 0 else OffsetFlagType(ord(self.BidOffsetFlag)).name,'AskHedgeFlag': '' if ord(self.AskHedgeFlag) == 0 else HedgeFlagType(ord(self.AskHedgeFlag)).name,'BidHedgeFlag': '' if ord(self.BidHedgeFlag) == 0 else HedgeFlagType(ord(self.BidHedgeFlag)).name,'AskOrderRef': str(self.AskOrderRef, 'GB2312'),'BidOrderRef': str(self.BidOrderRef, 'GB2312'),'ForQuoteSysID': str(self.ForQuoteSysID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputQuoteField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.QuoteRef=self.QuoteRef
        obj.UserID=self.UserID
        obj.AskPrice=self.AskPrice
        obj.BidPrice=self.BidPrice
        obj.AskVolume=self.AskVolume
        obj.BidVolume=self.BidVolume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.AskOffsetFlag=self.AskOffsetFlag
        obj.BidOffsetFlag=self.BidOffsetFlag
        obj.AskHedgeFlag=self.AskHedgeFlag
        obj.BidHedgeFlag=self.BidHedgeFlag
        obj.AskOrderRef=self.AskOrderRef
        obj.BidOrderRef=self.BidOrderRef
        obj.ForQuoteSysID=self.ForQuoteSysID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        obj.ClientID=self.ClientID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcInputQuoteActionField(Structure):
    """输入报价操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报价操作引用
        ("QuoteActionRef", c_int32),
        # 报价引用
        ("QuoteRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报价操作编号
        ("QuoteSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 交易编码
        ("ClientID", c_char*11),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getQuoteActionRef(self):
        return self.QuoteActionRef

    def getQuoteRef(self):
        return str(self.QuoteRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getQuoteSysID(self):
        return str(self.QuoteSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', QuoteActionRef = {2}, QuoteRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', QuoteSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, UserID = \'{10}\', InstrumentID = \'{11}\', InvestUnitID = \'{12}\', ClientID = \'{13}\', IPAddress = \'{14}\', MacAddress = \'{15}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.QuoteActionRef, str(self.QuoteRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.QuoteSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.UserID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'QuoteActionRef': self.QuoteActionRef,'QuoteRef': str(self.QuoteRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'QuoteSysID': str(self.QuoteSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'UserID': str(self.UserID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputQuoteActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.QuoteActionRef=self.QuoteActionRef
        obj.QuoteRef=self.QuoteRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.QuoteSysID=self.QuoteSysID
        obj.ActionFlag=self.ActionFlag
        obj.UserID=self.UserID
        obj.InstrumentID=self.InstrumentID
        obj.InvestUnitID=self.InvestUnitID
        obj.ClientID=self.ClientID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQuoteField(Structure):
    """报价"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报价引用
        ("QuoteRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 卖价格
        ("AskPrice", c_double),
        # 买价格
        ("BidPrice", c_double),
        # 卖数量
        ("AskVolume", c_int32),
        # 买数量
        ("BidVolume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 卖开平标志
        ("AskOffsetFlag", c_char),
        # 买开平标志
        ("BidOffsetFlag", c_char),
        # 卖投机套保标志
        ("AskHedgeFlag", c_char),
        # 买投机套保标志
        ("BidHedgeFlag", c_char),
        # 本地报价编号
        ("QuoteLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 报价提示序号
        ("NotifySequence", c_int32),
        # 报价提交状态
        ("OrderSubmitStatus", c_char),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 报价编号
        ("QuoteSysID", c_char*21),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 报价状态
        ("QuoteStatus", c_char),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 卖方报单编号
        ("AskOrderSysID", c_char*21),
        # 买方报单编号
        ("BidOrderSysID", c_char*21),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 操作用户代码
        ("ActiveUserID", c_char*16),
        # 经纪公司报价编号
        ("BrokerQuoteSeq", c_int32),
        # 衍生卖报单引用
        ("AskOrderRef", c_char*13),
        # 衍生买报单引用
        ("BidOrderRef", c_char*13),
        # 应价编号
        ("ForQuoteSysID", c_char*21),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getQuoteRef(self):
        return str(self.QuoteRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getAskPrice(self):
        return self.AskPrice
    def getBidPrice(self):
        return self.BidPrice
    def getAskVolume(self):
        return self.AskVolume
    def getBidVolume(self):
        return self.BidVolume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getAskOffsetFlag(self):
        return OffsetFlagType(ord(self.AskOffsetFlag))
    def getBidOffsetFlag(self):
        return OffsetFlagType(ord(self.BidOffsetFlag))
    def getAskHedgeFlag(self):
        return HedgeFlagType(ord(self.AskHedgeFlag))
    def getBidHedgeFlag(self):
        return HedgeFlagType(ord(self.BidHedgeFlag))

    def getQuoteLocalID(self):
        return str(self.QuoteLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getNotifySequence(self):
        return self.NotifySequence
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getQuoteSysID(self):
        return str(self.QuoteSysID, 'GB2312')

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')
    def getQuoteStatus(self):
        return OrderStatusType(ord(self.QuoteStatus))

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getAskOrderSysID(self):
        return str(self.AskOrderSysID, 'GB2312')

    def getBidOrderSysID(self):
        return str(self.BidOrderSysID, 'GB2312')
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getActiveUserID(self):
        return str(self.ActiveUserID, 'GB2312')
    def getBrokerQuoteSeq(self):
        return self.BrokerQuoteSeq

    def getAskOrderRef(self):
        return str(self.AskOrderRef, 'GB2312')

    def getBidOrderRef(self):
        return str(self.BidOrderRef, 'GB2312')

    def getForQuoteSysID(self):
        return str(self.ForQuoteSysID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', QuoteRef = \'{3}\', UserID = \'{4}\', AskPrice = {5}, BidPrice = {6}, AskVolume = {7}, BidVolume = {8}, RequestID = {9}, BusinessUnit = \'{10}\', AskOffsetFlag = OffsetFlagType.{11}, BidOffsetFlag = OffsetFlagType.{12}, AskHedgeFlag = HedgeFlagType.{13}, BidHedgeFlag = HedgeFlagType.{14}, QuoteLocalID = \'{15}\', ExchangeID = \'{16}\', ParticipantID = \'{17}\', ClientID = \'{18}\', ExchangeInstID = \'{19}\', TraderID = \'{20}\', InstallID = {21}, NotifySequence = {22}, OrderSubmitStatus = OrderSubmitStatusType.{23}, TradingDay = \'{24}\', SettlementID = {25}, QuoteSysID = \'{26}\', InsertDate = \'{27}\', InsertTime = \'{28}\', CancelTime = \'{29}\', QuoteStatus = OrderStatusType.{30}, ClearingPartID = \'{31}\', SequenceNo = {32}, AskOrderSysID = \'{33}\', BidOrderSysID = \'{34}\', FrontID = {35}, SessionID = {36}, UserProductInfo = \'{37}\', StatusMsg = \'{38}\', ActiveUserID = \'{39}\', BrokerQuoteSeq = {40}, AskOrderRef = \'{41}\', BidOrderRef = \'{42}\', ForQuoteSysID = \'{43}\', BranchID = \'{44}\', InvestUnitID = \'{45}\', AccountID = \'{46}\', CurrencyID = \'{47}\', IPAddress = \'{48}\', MacAddress = \'{49}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.QuoteRef, 'GB2312'), str(self.UserID, 'GB2312'), self.AskPrice, self.BidPrice, self.AskVolume, self.BidVolume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.AskOffsetFlag) == 0 else OffsetFlagType(ord(self.AskOffsetFlag)).name, '' if ord(self.BidOffsetFlag) == 0 else OffsetFlagType(ord(self.BidOffsetFlag)).name, '' if ord(self.AskHedgeFlag) == 0 else HedgeFlagType(ord(self.AskHedgeFlag)).name, '' if ord(self.BidHedgeFlag) == 0 else HedgeFlagType(ord(self.BidHedgeFlag)).name, str(self.QuoteLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, self.NotifySequence, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.QuoteSysID, 'GB2312'), str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.CancelTime, 'GB2312'), '' if ord(self.QuoteStatus) == 0 else OrderStatusType(ord(self.QuoteStatus)).name, str(self.ClearingPartID, 'GB2312'), self.SequenceNo, str(self.AskOrderSysID, 'GB2312'), str(self.BidOrderSysID, 'GB2312'), self.FrontID, self.SessionID, str(self.UserProductInfo, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.ActiveUserID, 'GB2312'), self.BrokerQuoteSeq, str(self.AskOrderRef, 'GB2312'), str(self.BidOrderRef, 'GB2312'), str(self.ForQuoteSysID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'QuoteRef': str(self.QuoteRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'AskPrice': self.AskPrice,'BidPrice': self.BidPrice,'AskVolume': self.AskVolume,'BidVolume': self.BidVolume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'AskOffsetFlag': '' if ord(self.AskOffsetFlag) == 0 else OffsetFlagType(ord(self.AskOffsetFlag)).name,'BidOffsetFlag': '' if ord(self.BidOffsetFlag) == 0 else OffsetFlagType(ord(self.BidOffsetFlag)).name,'AskHedgeFlag': '' if ord(self.AskHedgeFlag) == 0 else HedgeFlagType(ord(self.AskHedgeFlag)).name,'BidHedgeFlag': '' if ord(self.BidHedgeFlag) == 0 else HedgeFlagType(ord(self.BidHedgeFlag)).name,'QuoteLocalID': str(self.QuoteLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'NotifySequence': self.NotifySequence,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'QuoteSysID': str(self.QuoteSysID, 'GB2312'),'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'QuoteStatus': '' if ord(self.QuoteStatus) == 0 else OrderStatusType(ord(self.QuoteStatus)).name,'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'AskOrderSysID': str(self.AskOrderSysID, 'GB2312'),'BidOrderSysID': str(self.BidOrderSysID, 'GB2312'),'FrontID': self.FrontID,'SessionID': self.SessionID,'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'ActiveUserID': str(self.ActiveUserID, 'GB2312'),'BrokerQuoteSeq': self.BrokerQuoteSeq,'AskOrderRef': str(self.AskOrderRef, 'GB2312'),'BidOrderRef': str(self.BidOrderRef, 'GB2312'),'ForQuoteSysID': str(self.ForQuoteSysID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQuoteField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.QuoteRef=self.QuoteRef
        obj.UserID=self.UserID
        obj.AskPrice=self.AskPrice
        obj.BidPrice=self.BidPrice
        obj.AskVolume=self.AskVolume
        obj.BidVolume=self.BidVolume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.AskOffsetFlag=self.AskOffsetFlag
        obj.BidOffsetFlag=self.BidOffsetFlag
        obj.AskHedgeFlag=self.AskHedgeFlag
        obj.BidHedgeFlag=self.BidHedgeFlag
        obj.QuoteLocalID=self.QuoteLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.NotifySequence=self.NotifySequence
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.QuoteSysID=self.QuoteSysID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.CancelTime=self.CancelTime
        obj.QuoteStatus=self.QuoteStatus
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.AskOrderSysID=self.AskOrderSysID
        obj.BidOrderSysID=self.BidOrderSysID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.UserProductInfo=self.UserProductInfo
        obj.StatusMsg=self.StatusMsg
        obj.ActiveUserID=self.ActiveUserID
        obj.BrokerQuoteSeq=self.BrokerQuoteSeq
        obj.AskOrderRef=self.AskOrderRef
        obj.BidOrderRef=self.BidOrderRef
        obj.ForQuoteSysID=self.ForQuoteSysID
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQuoteActionField(Structure):
    """报价操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报价操作引用
        ("QuoteActionRef", c_int32),
        # 报价引用
        ("QuoteRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报价操作编号
        ("QuoteSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报价编号
        ("QuoteLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getQuoteActionRef(self):
        return self.QuoteActionRef

    def getQuoteRef(self):
        return str(self.QuoteRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getQuoteSysID(self):
        return str(self.QuoteSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getQuoteLocalID(self):
        return str(self.QuoteLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', QuoteActionRef = {2}, QuoteRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', QuoteSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, ActionDate = \'{10}\', ActionTime = \'{11}\', TraderID = \'{12}\', InstallID = {13}, QuoteLocalID = \'{14}\', ActionLocalID = \'{15}\', ParticipantID = \'{16}\', ClientID = \'{17}\', BusinessUnit = \'{18}\', OrderActionStatus = OrderActionStatusType.{19}, UserID = \'{20}\', StatusMsg = \'{21}\', InstrumentID = \'{22}\', BranchID = \'{23}\', InvestUnitID = \'{24}\', IPAddress = \'{25}\', MacAddress = \'{26}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.QuoteActionRef, str(self.QuoteRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.QuoteSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.QuoteLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'QuoteActionRef': self.QuoteActionRef,'QuoteRef': str(self.QuoteRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'QuoteSysID': str(self.QuoteSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'QuoteLocalID': str(self.QuoteLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQuoteActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.QuoteActionRef=self.QuoteActionRef
        obj.QuoteRef=self.QuoteRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.QuoteSysID=self.QuoteSysID
        obj.ActionFlag=self.ActionFlag
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.QuoteLocalID=self.QuoteLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.StatusMsg=self.StatusMsg
        obj.InstrumentID=self.InstrumentID
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryQuoteField(Structure):
    """报价查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报价编号
        ("QuoteSysID", c_char*21),
        # 开始时间
        ("InsertTimeStart", c_char*9),
        # 结束时间
        ("InsertTimeEnd", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getQuoteSysID(self):
        return str(self.QuoteSysID, 'GB2312')

    def getInsertTimeStart(self):
        return str(self.InsertTimeStart, 'GB2312')

    def getInsertTimeEnd(self):
        return str(self.InsertTimeEnd, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', QuoteSysID = \'{4}\', InsertTimeStart = \'{5}\', InsertTimeEnd = \'{6}\', InvestUnitID = \'{7}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.QuoteSysID, 'GB2312'), str(self.InsertTimeStart, 'GB2312'), str(self.InsertTimeEnd, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'QuoteSysID': str(self.QuoteSysID, 'GB2312'),'InsertTimeStart': str(self.InsertTimeStart, 'GB2312'),'InsertTimeEnd': str(self.InsertTimeEnd, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryQuoteField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.QuoteSysID=self.QuoteSysID
        obj.InsertTimeStart=self.InsertTimeStart
        obj.InsertTimeEnd=self.InsertTimeEnd
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcExchangeQuoteField(Structure):
    """交易所报价信息"""
    _fields_ = [
        # 卖价格
        ("AskPrice", c_double),
        # 买价格
        ("BidPrice", c_double),
        # 卖数量
        ("AskVolume", c_int32),
        # 买数量
        ("BidVolume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 卖开平标志
        ("AskOffsetFlag", c_char),
        # 买开平标志
        ("BidOffsetFlag", c_char),
        # 卖投机套保标志
        ("AskHedgeFlag", c_char),
        # 买投机套保标志
        ("BidHedgeFlag", c_char),
        # 本地报价编号
        ("QuoteLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 报价提示序号
        ("NotifySequence", c_int32),
        # 报价提交状态
        ("OrderSubmitStatus", c_char),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 报价编号
        ("QuoteSysID", c_char*21),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 报价状态
        ("QuoteStatus", c_char),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 卖方报单编号
        ("AskOrderSysID", c_char*21),
        # 买方报单编号
        ("BidOrderSysID", c_char*21),
        # 应价编号
        ("ForQuoteSysID", c_char*21),
        # 营业部编号
        ("BranchID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]

    def getAskPrice(self):
        return self.AskPrice
    def getBidPrice(self):
        return self.BidPrice
    def getAskVolume(self):
        return self.AskVolume
    def getBidVolume(self):
        return self.BidVolume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getAskOffsetFlag(self):
        return OffsetFlagType(ord(self.AskOffsetFlag))
    def getBidOffsetFlag(self):
        return OffsetFlagType(ord(self.BidOffsetFlag))
    def getAskHedgeFlag(self):
        return HedgeFlagType(ord(self.AskHedgeFlag))
    def getBidHedgeFlag(self):
        return HedgeFlagType(ord(self.BidHedgeFlag))

    def getQuoteLocalID(self):
        return str(self.QuoteLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getNotifySequence(self):
        return self.NotifySequence
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getQuoteSysID(self):
        return str(self.QuoteSysID, 'GB2312')

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')
    def getQuoteStatus(self):
        return OrderStatusType(ord(self.QuoteStatus))

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getAskOrderSysID(self):
        return str(self.AskOrderSysID, 'GB2312')

    def getBidOrderSysID(self):
        return str(self.BidOrderSysID, 'GB2312')

    def getForQuoteSysID(self):
        return str(self.ForQuoteSysID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'AskPrice = {0}, BidPrice = {1}, AskVolume = {2}, BidVolume = {3}, RequestID = {4}, BusinessUnit = \'{5}\', AskOffsetFlag = OffsetFlagType.{6}, BidOffsetFlag = OffsetFlagType.{7}, AskHedgeFlag = HedgeFlagType.{8}, BidHedgeFlag = HedgeFlagType.{9}, QuoteLocalID = \'{10}\', ExchangeID = \'{11}\', ParticipantID = \'{12}\', ClientID = \'{13}\', ExchangeInstID = \'{14}\', TraderID = \'{15}\', InstallID = {16}, NotifySequence = {17}, OrderSubmitStatus = OrderSubmitStatusType.{18}, TradingDay = \'{19}\', SettlementID = {20}, QuoteSysID = \'{21}\', InsertDate = \'{22}\', InsertTime = \'{23}\', CancelTime = \'{24}\', QuoteStatus = OrderStatusType.{25}, ClearingPartID = \'{26}\', SequenceNo = {27}, AskOrderSysID = \'{28}\', BidOrderSysID = \'{29}\', ForQuoteSysID = \'{30}\', BranchID = \'{31}\', IPAddress = \'{32}\', MacAddress = \'{33}\''.format(self.AskPrice, self.BidPrice, self.AskVolume, self.BidVolume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.AskOffsetFlag) == 0 else OffsetFlagType(ord(self.AskOffsetFlag)).name, '' if ord(self.BidOffsetFlag) == 0 else OffsetFlagType(ord(self.BidOffsetFlag)).name, '' if ord(self.AskHedgeFlag) == 0 else HedgeFlagType(ord(self.AskHedgeFlag)).name, '' if ord(self.BidHedgeFlag) == 0 else HedgeFlagType(ord(self.BidHedgeFlag)).name, str(self.QuoteLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, self.NotifySequence, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.QuoteSysID, 'GB2312'), str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.CancelTime, 'GB2312'), '' if ord(self.QuoteStatus) == 0 else OrderStatusType(ord(self.QuoteStatus)).name, str(self.ClearingPartID, 'GB2312'), self.SequenceNo, str(self.AskOrderSysID, 'GB2312'), str(self.BidOrderSysID, 'GB2312'), str(self.ForQuoteSysID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'AskPrice': self.AskPrice,'BidPrice': self.BidPrice,'AskVolume': self.AskVolume,'BidVolume': self.BidVolume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'AskOffsetFlag': '' if ord(self.AskOffsetFlag) == 0 else OffsetFlagType(ord(self.AskOffsetFlag)).name,'BidOffsetFlag': '' if ord(self.BidOffsetFlag) == 0 else OffsetFlagType(ord(self.BidOffsetFlag)).name,'AskHedgeFlag': '' if ord(self.AskHedgeFlag) == 0 else HedgeFlagType(ord(self.AskHedgeFlag)).name,'BidHedgeFlag': '' if ord(self.BidHedgeFlag) == 0 else HedgeFlagType(ord(self.BidHedgeFlag)).name,'QuoteLocalID': str(self.QuoteLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'NotifySequence': self.NotifySequence,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'QuoteSysID': str(self.QuoteSysID, 'GB2312'),'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'QuoteStatus': '' if ord(self.QuoteStatus) == 0 else OrderStatusType(ord(self.QuoteStatus)).name,'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'AskOrderSysID': str(self.AskOrderSysID, 'GB2312'),'BidOrderSysID': str(self.BidOrderSysID, 'GB2312'),'ForQuoteSysID': str(self.ForQuoteSysID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeQuoteField()
        obj.AskPrice=self.AskPrice
        obj.BidPrice=self.BidPrice
        obj.AskVolume=self.AskVolume
        obj.BidVolume=self.BidVolume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.AskOffsetFlag=self.AskOffsetFlag
        obj.BidOffsetFlag=self.BidOffsetFlag
        obj.AskHedgeFlag=self.AskHedgeFlag
        obj.BidHedgeFlag=self.BidHedgeFlag
        obj.QuoteLocalID=self.QuoteLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.NotifySequence=self.NotifySequence
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.QuoteSysID=self.QuoteSysID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.CancelTime=self.CancelTime
        obj.QuoteStatus=self.QuoteStatus
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.AskOrderSysID=self.AskOrderSysID
        obj.BidOrderSysID=self.BidOrderSysID
        obj.ForQuoteSysID=self.ForQuoteSysID
        obj.BranchID=self.BranchID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryExchangeQuoteField(Structure):
    """交易所报价查询"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeInstID = \'{2}\', ExchangeID = \'{3}\', TraderID = \'{4}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeQuoteField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcQryQuoteActionField(Structure):
    """报价操作查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExchangeID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryQuoteActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcExchangeQuoteActionField(Structure):
    """交易所报价操作"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报价操作编号
        ("QuoteSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报价编号
        ("QuoteLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getQuoteSysID(self):
        return str(self.QuoteSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getQuoteLocalID(self):
        return str(self.QuoteLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', QuoteSysID = \'{1}\', ActionFlag = ActionFlagType.{2}, ActionDate = \'{3}\', ActionTime = \'{4}\', TraderID = \'{5}\', InstallID = {6}, QuoteLocalID = \'{7}\', ActionLocalID = \'{8}\', ParticipantID = \'{9}\', ClientID = \'{10}\', BusinessUnit = \'{11}\', OrderActionStatus = OrderActionStatusType.{12}, UserID = \'{13}\', IPAddress = \'{14}\', MacAddress = \'{15}\''.format(str(self.ExchangeID, 'GB2312'), str(self.QuoteSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.QuoteLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'QuoteSysID': str(self.QuoteSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'QuoteLocalID': str(self.QuoteLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeQuoteActionField()
        obj.ExchangeID=self.ExchangeID
        obj.QuoteSysID=self.QuoteSysID
        obj.ActionFlag=self.ActionFlag
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.QuoteLocalID=self.QuoteLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryExchangeQuoteActionField(Structure):
    """交易所报价操作查询"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeID = \'{2}\', TraderID = \'{3}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeQuoteActionField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcOptionInstrDeltaField(Structure):
    """期权合约delta值"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # Delta值
        ("Delta", c_double),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getDelta(self):
        return self.Delta

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', Delta = {4}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.Delta)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'Delta': self.Delta}

    def clone(self):
        obj=CThostFtdcOptionInstrDeltaField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.Delta=self.Delta
        return obj

class CThostFtdcForQuoteRspField(Structure):
    """发给做市商的询价请求"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 询价编号
        ("ForQuoteSysID", c_char*21),
        # 询价时间
        ("ForQuoteTime", c_char*9),
        # 业务日期
        ("ActionDay", c_char*9),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getForQuoteSysID(self):
        return str(self.ForQuoteSysID, 'GB2312')

    def getForQuoteTime(self):
        return str(self.ForQuoteTime, 'GB2312')

    def getActionDay(self):
        return str(self.ActionDay, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', InstrumentID = \'{1}\', ForQuoteSysID = \'{2}\', ForQuoteTime = \'{3}\', ActionDay = \'{4}\', ExchangeID = \'{5}\''.format(str(self.TradingDay, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ForQuoteSysID, 'GB2312'), str(self.ForQuoteTime, 'GB2312'), str(self.ActionDay, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ForQuoteSysID': str(self.ForQuoteSysID, 'GB2312'),'ForQuoteTime': str(self.ForQuoteTime, 'GB2312'),'ActionDay': str(self.ActionDay, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcForQuoteRspField()
        obj.TradingDay=self.TradingDay
        obj.InstrumentID=self.InstrumentID
        obj.ForQuoteSysID=self.ForQuoteSysID
        obj.ForQuoteTime=self.ForQuoteTime
        obj.ActionDay=self.ActionDay
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcStrikeOffsetField(Structure):
    """当前期权合约执行偏移值的详细内容"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 执行偏移值
        ("Offset", c_double),
        # 执行偏移类型
        ("OffsetType", c_char),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOffset(self):
        return self.Offset
    def getOffsetType(self):
        return StrikeOffsetTypeType(ord(self.OffsetType))

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', Offset = {4}, OffsetType = StrikeOffsetTypeType.{5}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.Offset, '' if ord(self.OffsetType) == 0 else StrikeOffsetTypeType(ord(self.OffsetType)).name)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'Offset': self.Offset,'OffsetType': '' if ord(self.OffsetType) == 0 else StrikeOffsetTypeType(ord(self.OffsetType)).name}

    def clone(self):
        obj=CThostFtdcStrikeOffsetField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.Offset=self.Offset
        obj.OffsetType=self.OffsetType
        return obj

class CThostFtdcQryStrikeOffsetField(Structure):
    """期权执行偏移值查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryStrikeOffsetField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcInputBatchOrderActionField(Structure):
    """输入批量报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报单操作引用
        ("OrderActionRef", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 用户代码
        ("UserID", c_char*16),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOrderActionRef(self):
        return self.OrderActionRef
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OrderActionRef = {2}, RequestID = {3}, FrontID = {4}, SessionID = {5}, ExchangeID = \'{6}\', UserID = \'{7}\', InvestUnitID = \'{8}\', IPAddress = \'{9}\', MacAddress = \'{10}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OrderActionRef, self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OrderActionRef': self.OrderActionRef,'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputBatchOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OrderActionRef=self.OrderActionRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.UserID=self.UserID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcBatchOrderActionField(Structure):
    """批量报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报单操作引用
        ("OrderActionRef", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOrderActionRef(self):
        return self.OrderActionRef
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OrderActionRef = {2}, RequestID = {3}, FrontID = {4}, SessionID = {5}, ExchangeID = \'{6}\', ActionDate = \'{7}\', ActionTime = \'{8}\', TraderID = \'{9}\', InstallID = {10}, ActionLocalID = \'{11}\', ParticipantID = \'{12}\', ClientID = \'{13}\', BusinessUnit = \'{14}\', OrderActionStatus = OrderActionStatusType.{15}, UserID = \'{16}\', StatusMsg = \'{17}\', InvestUnitID = \'{18}\', IPAddress = \'{19}\', MacAddress = \'{20}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OrderActionRef, self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OrderActionRef': self.OrderActionRef,'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcBatchOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OrderActionRef=self.OrderActionRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.StatusMsg=self.StatusMsg
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcExchangeBatchOrderActionField(Structure):
    """交易所批量报单操作"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', ActionDate = \'{1}\', ActionTime = \'{2}\', TraderID = \'{3}\', InstallID = {4}, ActionLocalID = \'{5}\', ParticipantID = \'{6}\', ClientID = \'{7}\', BusinessUnit = \'{8}\', OrderActionStatus = OrderActionStatusType.{9}, UserID = \'{10}\', IPAddress = \'{11}\', MacAddress = \'{12}\''.format(str(self.ExchangeID, 'GB2312'), str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeBatchOrderActionField()
        obj.ExchangeID=self.ExchangeID
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryBatchOrderActionField(Structure):
    """查询批量报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExchangeID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryBatchOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcCombInstrumentGuardField(Structure):
    """组合合约安全系数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 
        ("GuarantRatio", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getGuarantRatio(self):
        return self.GuarantRatio

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', GuarantRatio = {2}, ExchangeID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), self.GuarantRatio, str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'GuarantRatio': self.GuarantRatio,'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCombInstrumentGuardField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.GuarantRatio=self.GuarantRatio
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryCombInstrumentGuardField(Structure):
    """组合合约安全系数查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', ExchangeID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryCombInstrumentGuardField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcInputCombActionField(Structure):
    """输入的申请组合"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 组合引用
        ("CombActionRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 买卖方向
        ("Direction", c_char),
        # 数量
        ("Volume", c_int32),
        # 组合指令方向
        ("CombDirection", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getCombActionRef(self):
        return str(self.CombActionRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getVolume(self):
        return self.Volume
    def getCombDirection(self):
        return CombDirectionType(ord(self.CombDirection))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', CombActionRef = \'{3}\', UserID = \'{4}\', Direction = DirectionType.{5}, Volume = {6}, CombDirection = CombDirectionType.{7}, HedgeFlag = HedgeFlagType.{8}, ExchangeID = \'{9}\', IPAddress = \'{10}\', MacAddress = \'{11}\', InvestUnitID = \'{12}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.CombActionRef, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, self.Volume, '' if ord(self.CombDirection) == 0 else CombDirectionType(ord(self.CombDirection)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, str(self.ExchangeID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'CombActionRef': str(self.CombActionRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'Volume': self.Volume,'CombDirection': '' if ord(self.CombDirection) == 0 else CombDirectionType(ord(self.CombDirection)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputCombActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.CombActionRef=self.CombActionRef
        obj.UserID=self.UserID
        obj.Direction=self.Direction
        obj.Volume=self.Volume
        obj.CombDirection=self.CombDirection
        obj.HedgeFlag=self.HedgeFlag
        obj.ExchangeID=self.ExchangeID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcCombActionField(Structure):
    """申请组合"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 组合引用
        ("CombActionRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 买卖方向
        ("Direction", c_char),
        # 数量
        ("Volume", c_int32),
        # 组合指令方向
        ("CombDirection", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 本地申请组合编号
        ("ActionLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 组合状态
        ("ActionStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 序号
        ("SequenceNo", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 状态信息
        ("StatusMsg", c_char*81),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        # 组合编号
        ("ComTradeID", c_char*21),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getCombActionRef(self):
        return str(self.CombActionRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getVolume(self):
        return self.Volume
    def getCombDirection(self):
        return CombDirectionType(ord(self.CombDirection))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getActionStatus(self):
        return OrderActionStatusType(ord(self.ActionStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getSequenceNo(self):
        return self.SequenceNo
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def getComTradeID(self):
        return str(self.ComTradeID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', CombActionRef = \'{3}\', UserID = \'{4}\', Direction = DirectionType.{5}, Volume = {6}, CombDirection = CombDirectionType.{7}, HedgeFlag = HedgeFlagType.{8}, ActionLocalID = \'{9}\', ExchangeID = \'{10}\', ParticipantID = \'{11}\', ClientID = \'{12}\', ExchangeInstID = \'{13}\', TraderID = \'{14}\', InstallID = {15}, ActionStatus = OrderActionStatusType.{16}, NotifySequence = {17}, TradingDay = \'{18}\', SettlementID = {19}, SequenceNo = {20}, FrontID = {21}, SessionID = {22}, UserProductInfo = \'{23}\', StatusMsg = \'{24}\', IPAddress = \'{25}\', MacAddress = \'{26}\', ComTradeID = \'{27}\', BranchID = \'{28}\', InvestUnitID = \'{29}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.CombActionRef, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, self.Volume, '' if ord(self.CombDirection) == 0 else CombDirectionType(ord(self.CombDirection)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, str(self.ActionLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.ActionStatus) == 0 else OrderActionStatusType(ord(self.ActionStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, self.SequenceNo, self.FrontID, self.SessionID, str(self.UserProductInfo, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'), str(self.ComTradeID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'CombActionRef': str(self.CombActionRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'Volume': self.Volume,'CombDirection': '' if ord(self.CombDirection) == 0 else CombDirectionType(ord(self.CombDirection)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'ActionStatus': '' if ord(self.ActionStatus) == 0 else OrderActionStatusType(ord(self.ActionStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'SequenceNo': self.SequenceNo,'FrontID': self.FrontID,'SessionID': self.SessionID,'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'ComTradeID': str(self.ComTradeID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCombActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.CombActionRef=self.CombActionRef
        obj.UserID=self.UserID
        obj.Direction=self.Direction
        obj.Volume=self.Volume
        obj.CombDirection=self.CombDirection
        obj.HedgeFlag=self.HedgeFlag
        obj.ActionLocalID=self.ActionLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.ActionStatus=self.ActionStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.SequenceNo=self.SequenceNo
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.UserProductInfo=self.UserProductInfo
        obj.StatusMsg=self.StatusMsg
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        obj.ComTradeID=self.ComTradeID
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryCombActionField(Structure):
    """申请组合查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryCombActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcExchangeCombActionField(Structure):
    """交易所申请组合信息"""
    _fields_ = [
        # 买卖方向
        ("Direction", c_char),
        # 数量
        ("Volume", c_int32),
        # 组合指令方向
        ("CombDirection", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 本地申请组合编号
        ("ActionLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 组合状态
        ("ActionStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 序号
        ("SequenceNo", c_int32),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        # 组合编号
        ("ComTradeID", c_char*21),
        # 营业部编号
        ("BranchID", c_char*9),
        ]

    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getVolume(self):
        return self.Volume
    def getCombDirection(self):
        return CombDirectionType(ord(self.CombDirection))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getActionStatus(self):
        return OrderActionStatusType(ord(self.ActionStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getSequenceNo(self):
        return self.SequenceNo

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def getComTradeID(self):
        return str(self.ComTradeID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def __str__(self):
        return 'Direction = DirectionType.{0}, Volume = {1}, CombDirection = CombDirectionType.{2}, HedgeFlag = HedgeFlagType.{3}, ActionLocalID = \'{4}\', ExchangeID = \'{5}\', ParticipantID = \'{6}\', ClientID = \'{7}\', ExchangeInstID = \'{8}\', TraderID = \'{9}\', InstallID = {10}, ActionStatus = OrderActionStatusType.{11}, NotifySequence = {12}, TradingDay = \'{13}\', SettlementID = {14}, SequenceNo = {15}, IPAddress = \'{16}\', MacAddress = \'{17}\', ComTradeID = \'{18}\', BranchID = \'{19}\''.format('' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, self.Volume, '' if ord(self.CombDirection) == 0 else CombDirectionType(ord(self.CombDirection)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, str(self.ActionLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.ActionStatus) == 0 else OrderActionStatusType(ord(self.ActionStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, self.SequenceNo, str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'), str(self.ComTradeID, 'GB2312'), str(self.BranchID, 'GB2312'))

    @property
    def __dict__(self):
        return {'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'Volume': self.Volume,'CombDirection': '' if ord(self.CombDirection) == 0 else CombDirectionType(ord(self.CombDirection)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'ActionStatus': '' if ord(self.ActionStatus) == 0 else OrderActionStatusType(ord(self.ActionStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'SequenceNo': self.SequenceNo,'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'ComTradeID': str(self.ComTradeID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeCombActionField()
        obj.Direction=self.Direction
        obj.Volume=self.Volume
        obj.CombDirection=self.CombDirection
        obj.HedgeFlag=self.HedgeFlag
        obj.ActionLocalID=self.ActionLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.ActionStatus=self.ActionStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.SequenceNo=self.SequenceNo
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        obj.ComTradeID=self.ComTradeID
        obj.BranchID=self.BranchID
        return obj

class CThostFtdcQryExchangeCombActionField(Structure):
    """交易所申请组合查询"""
    _fields_ = [
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ParticipantID = \'{0}\', ClientID = \'{1}\', ExchangeInstID = \'{2}\', ExchangeID = \'{3}\', TraderID = \'{4}\''.format(str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeCombActionField()
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcProductExchRateField(Structure):
    """产品报价汇率"""
    _fields_ = [
        # 产品代码
        ("ProductID", c_char*31),
        # 报价币种类型
        ("QuoteCurrencyID", c_char*4),
        # 汇率
        ("ExchangeRate", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getProductID(self):
        return str(self.ProductID, 'GB2312')

    def getQuoteCurrencyID(self):
        return str(self.QuoteCurrencyID, 'GB2312')
    def getExchangeRate(self):
        return self.ExchangeRate

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'ProductID = \'{0}\', QuoteCurrencyID = \'{1}\', ExchangeRate = {2}, ExchangeID = \'{3}\''.format(str(self.ProductID, 'GB2312'), str(self.QuoteCurrencyID, 'GB2312'), self.ExchangeRate, str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ProductID': str(self.ProductID, 'GB2312'),'QuoteCurrencyID': str(self.QuoteCurrencyID, 'GB2312'),'ExchangeRate': self.ExchangeRate,'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcProductExchRateField()
        obj.ProductID=self.ProductID
        obj.QuoteCurrencyID=self.QuoteCurrencyID
        obj.ExchangeRate=self.ExchangeRate
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryProductExchRateField(Structure):
    """产品报价汇率查询"""
    _fields_ = [
        # 产品代码
        ("ProductID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getProductID(self):
        return str(self.ProductID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'ProductID = \'{0}\', ExchangeID = \'{1}\''.format(str(self.ProductID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ProductID': str(self.ProductID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryProductExchRateField()
        obj.ProductID=self.ProductID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcQryForQuoteParamField(Structure):
    """查询询价价差参数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', ExchangeID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryForQuoteParamField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcForQuoteParamField(Structure):
    """询价价差参数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 最新价
        ("LastPrice", c_double),
        # 价差
        ("PriceInterval", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getLastPrice(self):
        return self.LastPrice
    def getPriceInterval(self):
        return self.PriceInterval

    def __str__(self):
        return 'BrokerID = \'{0}\', InstrumentID = \'{1}\', ExchangeID = \'{2}\', LastPrice = {3}, PriceInterval = {4}'.format(str(self.BrokerID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), self.LastPrice, self.PriceInterval)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'LastPrice': self.LastPrice,'PriceInterval': self.PriceInterval}

    def clone(self):
        obj=CThostFtdcForQuoteParamField()
        obj.BrokerID=self.BrokerID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.LastPrice=self.LastPrice
        obj.PriceInterval=self.PriceInterval
        return obj

class CThostFtdcMMOptionInstrCommRateField(Structure):
    """当前做市商期权合约手续费的详细内容"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 开仓手续费率
        ("OpenRatioByMoney", c_double),
        # 开仓手续费
        ("OpenRatioByVolume", c_double),
        # 平仓手续费率
        ("CloseRatioByMoney", c_double),
        # 平仓手续费
        ("CloseRatioByVolume", c_double),
        # 平今手续费率
        ("CloseTodayRatioByMoney", c_double),
        # 平今手续费
        ("CloseTodayRatioByVolume", c_double),
        # 执行手续费率
        ("StrikeRatioByMoney", c_double),
        # 执行手续费
        ("StrikeRatioByVolume", c_double),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOpenRatioByMoney(self):
        return self.OpenRatioByMoney
    def getOpenRatioByVolume(self):
        return self.OpenRatioByVolume
    def getCloseRatioByMoney(self):
        return self.CloseRatioByMoney
    def getCloseRatioByVolume(self):
        return self.CloseRatioByVolume
    def getCloseTodayRatioByMoney(self):
        return self.CloseTodayRatioByMoney
    def getCloseTodayRatioByVolume(self):
        return self.CloseTodayRatioByVolume
    def getStrikeRatioByMoney(self):
        return self.StrikeRatioByMoney
    def getStrikeRatioByVolume(self):
        return self.StrikeRatioByVolume

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', OpenRatioByMoney = {4}, OpenRatioByVolume = {5}, CloseRatioByMoney = {6}, CloseRatioByVolume = {7}, CloseTodayRatioByMoney = {8}, CloseTodayRatioByVolume = {9}, StrikeRatioByMoney = {10}, StrikeRatioByVolume = {11}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OpenRatioByMoney, self.OpenRatioByVolume, self.CloseRatioByMoney, self.CloseRatioByVolume, self.CloseTodayRatioByMoney, self.CloseTodayRatioByVolume, self.StrikeRatioByMoney, self.StrikeRatioByVolume)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OpenRatioByMoney': self.OpenRatioByMoney,'OpenRatioByVolume': self.OpenRatioByVolume,'CloseRatioByMoney': self.CloseRatioByMoney,'CloseRatioByVolume': self.CloseRatioByVolume,'CloseTodayRatioByMoney': self.CloseTodayRatioByMoney,'CloseTodayRatioByVolume': self.CloseTodayRatioByVolume,'StrikeRatioByMoney': self.StrikeRatioByMoney,'StrikeRatioByVolume': self.StrikeRatioByVolume}

    def clone(self):
        obj=CThostFtdcMMOptionInstrCommRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OpenRatioByMoney=self.OpenRatioByMoney
        obj.OpenRatioByVolume=self.OpenRatioByVolume
        obj.CloseRatioByMoney=self.CloseRatioByMoney
        obj.CloseRatioByVolume=self.CloseRatioByVolume
        obj.CloseTodayRatioByMoney=self.CloseTodayRatioByMoney
        obj.CloseTodayRatioByVolume=self.CloseTodayRatioByVolume
        obj.StrikeRatioByMoney=self.StrikeRatioByMoney
        obj.StrikeRatioByVolume=self.StrikeRatioByVolume
        return obj

class CThostFtdcQryMMOptionInstrCommRateField(Structure):
    """做市商期权手续费率查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryMMOptionInstrCommRateField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcMMInstrumentCommissionRateField(Structure):
    """做市商合约手续费率"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 开仓手续费率
        ("OpenRatioByMoney", c_double),
        # 开仓手续费
        ("OpenRatioByVolume", c_double),
        # 平仓手续费率
        ("CloseRatioByMoney", c_double),
        # 平仓手续费
        ("CloseRatioByVolume", c_double),
        # 平今手续费率
        ("CloseTodayRatioByMoney", c_double),
        # 平今手续费
        ("CloseTodayRatioByVolume", c_double),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOpenRatioByMoney(self):
        return self.OpenRatioByMoney
    def getOpenRatioByVolume(self):
        return self.OpenRatioByVolume
    def getCloseRatioByMoney(self):
        return self.CloseRatioByMoney
    def getCloseRatioByVolume(self):
        return self.CloseRatioByVolume
    def getCloseTodayRatioByMoney(self):
        return self.CloseTodayRatioByMoney
    def getCloseTodayRatioByVolume(self):
        return self.CloseTodayRatioByVolume

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', OpenRatioByMoney = {4}, OpenRatioByVolume = {5}, CloseRatioByMoney = {6}, CloseRatioByVolume = {7}, CloseTodayRatioByMoney = {8}, CloseTodayRatioByVolume = {9}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OpenRatioByMoney, self.OpenRatioByVolume, self.CloseRatioByMoney, self.CloseRatioByVolume, self.CloseTodayRatioByMoney, self.CloseTodayRatioByVolume)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OpenRatioByMoney': self.OpenRatioByMoney,'OpenRatioByVolume': self.OpenRatioByVolume,'CloseRatioByMoney': self.CloseRatioByMoney,'CloseRatioByVolume': self.CloseRatioByVolume,'CloseTodayRatioByMoney': self.CloseTodayRatioByMoney,'CloseTodayRatioByVolume': self.CloseTodayRatioByVolume}

    def clone(self):
        obj=CThostFtdcMMInstrumentCommissionRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OpenRatioByMoney=self.OpenRatioByMoney
        obj.OpenRatioByVolume=self.OpenRatioByVolume
        obj.CloseRatioByMoney=self.CloseRatioByMoney
        obj.CloseRatioByVolume=self.CloseRatioByVolume
        obj.CloseTodayRatioByMoney=self.CloseTodayRatioByMoney
        obj.CloseTodayRatioByVolume=self.CloseTodayRatioByVolume
        return obj

class CThostFtdcQryMMInstrumentCommissionRateField(Structure):
    """查询做市商合约手续费率"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryMMInstrumentCommissionRateField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcInstrumentOrderCommRateField(Structure):
    """当前报单手续费的详细内容"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 报单手续费
        ("OrderCommByVolume", c_double),
        # 撤单手续费
        ("OrderActionCommByVolume", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getOrderCommByVolume(self):
        return self.OrderCommByVolume
    def getOrderActionCommByVolume(self):
        return self.OrderActionCommByVolume

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', HedgeFlag = HedgeFlagType.{4}, OrderCommByVolume = {5}, OrderActionCommByVolume = {6}, ExchangeID = \'{7}\', InvestUnitID = \'{8}\''.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.OrderCommByVolume, self.OrderActionCommByVolume, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'OrderCommByVolume': self.OrderCommByVolume,'OrderActionCommByVolume': self.OrderActionCommByVolume,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInstrumentOrderCommRateField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.HedgeFlag=self.HedgeFlag
        obj.OrderCommByVolume=self.OrderCommByVolume
        obj.OrderActionCommByVolume=self.OrderActionCommByVolume
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryInstrumentOrderCommRateField(Structure):
    """报单手续费率查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInstrumentOrderCommRateField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcTradeParamField(Structure):
    """交易参数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 参数代码
        ("TradeParamID", c_char),
        # 参数代码值
        ("TradeParamValue", c_char*256),
        # 备注
        ("Memo", c_char*161),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')
    def getTradeParamID(self):
        return TradeParamIDType(ord(self.TradeParamID))

    def getTradeParamValue(self):
        return str(self.TradeParamValue, 'GB2312')

    def getMemo(self):
        return str(self.Memo, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', TradeParamID = TradeParamIDType.{1}, TradeParamValue = \'{2}\', Memo = \'{3}\''.format(str(self.BrokerID, 'GB2312'), '' if ord(self.TradeParamID) == 0 else TradeParamIDType(ord(self.TradeParamID)).name, str(self.TradeParamValue, 'GB2312'), str(self.Memo, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'TradeParamID': '' if ord(self.TradeParamID) == 0 else TradeParamIDType(ord(self.TradeParamID)).name,'TradeParamValue': str(self.TradeParamValue, 'GB2312'),'Memo': str(self.Memo, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradeParamField()
        obj.BrokerID=self.BrokerID
        obj.TradeParamID=self.TradeParamID
        obj.TradeParamValue=self.TradeParamValue
        obj.Memo=self.Memo
        return obj

class CThostFtdcInstrumentMarginRateULField(Structure):
    """合约保证金率调整"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 多头保证金率
        ("LongMarginRatioByMoney", c_double),
        # 多头保证金费
        ("LongMarginRatioByVolume", c_double),
        # 空头保证金率
        ("ShortMarginRatioByMoney", c_double),
        # 空头保证金费
        ("ShortMarginRatioByVolume", c_double),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getLongMarginRatioByMoney(self):
        return self.LongMarginRatioByMoney
    def getLongMarginRatioByVolume(self):
        return self.LongMarginRatioByVolume
    def getShortMarginRatioByMoney(self):
        return self.ShortMarginRatioByMoney
    def getShortMarginRatioByVolume(self):
        return self.ShortMarginRatioByVolume

    def __str__(self):
        return 'InstrumentID = \'{0}\', InvestorRange = InvestorRangeType.{1}, BrokerID = \'{2}\', InvestorID = \'{3}\', HedgeFlag = HedgeFlagType.{4}, LongMarginRatioByMoney = {5}, LongMarginRatioByVolume = {6}, ShortMarginRatioByMoney = {7}, ShortMarginRatioByVolume = {8}'.format(str(self.InstrumentID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.LongMarginRatioByMoney, self.LongMarginRatioByVolume, self.ShortMarginRatioByMoney, self.ShortMarginRatioByVolume)

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'LongMarginRatioByMoney': self.LongMarginRatioByMoney,'LongMarginRatioByVolume': self.LongMarginRatioByVolume,'ShortMarginRatioByMoney': self.ShortMarginRatioByMoney,'ShortMarginRatioByVolume': self.ShortMarginRatioByVolume}

    def clone(self):
        obj=CThostFtdcInstrumentMarginRateULField()
        obj.InstrumentID=self.InstrumentID
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.HedgeFlag=self.HedgeFlag
        obj.LongMarginRatioByMoney=self.LongMarginRatioByMoney
        obj.LongMarginRatioByVolume=self.LongMarginRatioByVolume
        obj.ShortMarginRatioByMoney=self.ShortMarginRatioByMoney
        obj.ShortMarginRatioByVolume=self.ShortMarginRatioByVolume
        return obj

class CThostFtdcFutureLimitPosiParamField(Structure):
    """期货持仓限制参数"""
    _fields_ = [
        # 投资者范围
        ("InvestorRange", c_char),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 产品代码
        ("ProductID", c_char*31),
        # 当日投机开仓数量限制
        ("SpecOpenVolume", c_int32),
        # 当日套利开仓数量限制
        ("ArbiOpenVolume", c_int32),
        # 当日投机+套利开仓数量限制
        ("OpenVolume", c_int32),
        ]

    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getProductID(self):
        return str(self.ProductID, 'GB2312')
    def getSpecOpenVolume(self):
        return self.SpecOpenVolume
    def getArbiOpenVolume(self):
        return self.ArbiOpenVolume
    def getOpenVolume(self):
        return self.OpenVolume

    def __str__(self):
        return 'InvestorRange = InvestorRangeType.{0}, BrokerID = \'{1}\', InvestorID = \'{2}\', ProductID = \'{3}\', SpecOpenVolume = {4}, ArbiOpenVolume = {5}, OpenVolume = {6}'.format('' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ProductID, 'GB2312'), self.SpecOpenVolume, self.ArbiOpenVolume, self.OpenVolume)

    @property
    def __dict__(self):
        return {'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ProductID': str(self.ProductID, 'GB2312'),'SpecOpenVolume': self.SpecOpenVolume,'ArbiOpenVolume': self.ArbiOpenVolume,'OpenVolume': self.OpenVolume}

    def clone(self):
        obj=CThostFtdcFutureLimitPosiParamField()
        obj.InvestorRange=self.InvestorRange
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ProductID=self.ProductID
        obj.SpecOpenVolume=self.SpecOpenVolume
        obj.ArbiOpenVolume=self.ArbiOpenVolume
        obj.OpenVolume=self.OpenVolume
        return obj

class CThostFtdcLoginForbiddenIPField(Structure):
    """禁止登录IP"""
    _fields_ = [
        # IP地址
        ("IPAddress", c_char*16),
        ]


    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def __str__(self):
        return 'IPAddress = \'{0}\''.format(str(self.IPAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'IPAddress': str(self.IPAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcLoginForbiddenIPField()
        obj.IPAddress=self.IPAddress
        return obj

class CThostFtdcIPListField(Structure):
    """IP列表"""
    _fields_ = [
        # IP地址
        ("IPAddress", c_char*16),
        # 是否白名单
        ("IsWhite", c_int32),
        ]


    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')
    def getIsWhite(self):
        return self.IsWhite

    def __str__(self):
        return 'IPAddress = \'{0}\', IsWhite = {1}'.format(str(self.IPAddress, 'GB2312'), self.IsWhite)

    @property
    def __dict__(self):
        return {'IPAddress': str(self.IPAddress, 'GB2312'),'IsWhite': self.IsWhite}

    def clone(self):
        obj=CThostFtdcIPListField()
        obj.IPAddress=self.IPAddress
        obj.IsWhite=self.IsWhite
        return obj

class CThostFtdcInputOptionSelfCloseField(Structure):
    """输入的期权自对冲"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 期权自对冲引用
        ("OptionSelfCloseRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 数量
        ("Volume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 期权行权的头寸是否自对冲
        ("OptSelfCloseFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 交易编码
        ("ClientID", c_char*11),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOptionSelfCloseRef(self):
        return str(self.OptionSelfCloseRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVolume(self):
        return self.Volume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getOptSelfCloseFlag(self):
        return OptSelfCloseFlagType(ord(self.OptSelfCloseFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OptionSelfCloseRef = \'{3}\', UserID = \'{4}\', Volume = {5}, RequestID = {6}, BusinessUnit = \'{7}\', HedgeFlag = HedgeFlagType.{8}, OptSelfCloseFlag = OptSelfCloseFlagType.{9}, ExchangeID = \'{10}\', InvestUnitID = \'{11}\', AccountID = \'{12}\', CurrencyID = \'{13}\', ClientID = \'{14}\', IPAddress = \'{15}\', MacAddress = \'{16}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OptionSelfCloseRef, 'GB2312'), str(self.UserID, 'GB2312'), self.Volume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.OptSelfCloseFlag) == 0 else OptSelfCloseFlagType(ord(self.OptSelfCloseFlag)).name, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OptionSelfCloseRef': str(self.OptionSelfCloseRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Volume': self.Volume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'OptSelfCloseFlag': '' if ord(self.OptSelfCloseFlag) == 0 else OptSelfCloseFlagType(ord(self.OptSelfCloseFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputOptionSelfCloseField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OptionSelfCloseRef=self.OptionSelfCloseRef
        obj.UserID=self.UserID
        obj.Volume=self.Volume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.HedgeFlag=self.HedgeFlag
        obj.OptSelfCloseFlag=self.OptSelfCloseFlag
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.ClientID=self.ClientID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcInputOptionSelfCloseActionField(Structure):
    """输入期权自对冲操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 期权自对冲操作引用
        ("OptionSelfCloseActionRef", c_int32),
        # 期权自对冲引用
        ("OptionSelfCloseRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 期权自对冲操作编号
        ("OptionSelfCloseSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOptionSelfCloseActionRef(self):
        return self.OptionSelfCloseActionRef

    def getOptionSelfCloseRef(self):
        return str(self.OptionSelfCloseRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOptionSelfCloseSysID(self):
        return str(self.OptionSelfCloseSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OptionSelfCloseActionRef = {2}, OptionSelfCloseRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', OptionSelfCloseSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, UserID = \'{10}\', InstrumentID = \'{11}\', InvestUnitID = \'{12}\', IPAddress = \'{13}\', MacAddress = \'{14}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OptionSelfCloseActionRef, str(self.OptionSelfCloseRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.OptionSelfCloseSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.UserID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OptionSelfCloseActionRef': self.OptionSelfCloseActionRef,'OptionSelfCloseRef': str(self.OptionSelfCloseRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'OptionSelfCloseSysID': str(self.OptionSelfCloseSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'UserID': str(self.UserID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInputOptionSelfCloseActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OptionSelfCloseActionRef=self.OptionSelfCloseActionRef
        obj.OptionSelfCloseRef=self.OptionSelfCloseRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.OptionSelfCloseSysID=self.OptionSelfCloseSysID
        obj.ActionFlag=self.ActionFlag
        obj.UserID=self.UserID
        obj.InstrumentID=self.InstrumentID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcOptionSelfCloseField(Structure):
    """期权自对冲"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 期权自对冲引用
        ("OptionSelfCloseRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 数量
        ("Volume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 期权行权的头寸是否自对冲
        ("OptSelfCloseFlag", c_char),
        # 本地期权自对冲编号
        ("OptionSelfCloseLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 期权自对冲提交状态
        ("OrderSubmitStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 期权自对冲编号
        ("OptionSelfCloseSysID", c_char*21),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 自对冲结果
        ("ExecResult", c_char),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 操作用户代码
        ("ActiveUserID", c_char*16),
        # 经纪公司报单编号
        ("BrokerOptionSelfCloseSeq", c_int32),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOptionSelfCloseRef(self):
        return str(self.OptionSelfCloseRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVolume(self):
        return self.Volume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getOptSelfCloseFlag(self):
        return OptSelfCloseFlagType(ord(self.OptSelfCloseFlag))

    def getOptionSelfCloseLocalID(self):
        return str(self.OptionSelfCloseLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getOptionSelfCloseSysID(self):
        return str(self.OptionSelfCloseSysID, 'GB2312')

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')
    def getExecResult(self):
        return ExecResultType(ord(self.ExecResult))

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getActiveUserID(self):
        return str(self.ActiveUserID, 'GB2312')
    def getBrokerOptionSelfCloseSeq(self):
        return self.BrokerOptionSelfCloseSeq

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OptionSelfCloseRef = \'{3}\', UserID = \'{4}\', Volume = {5}, RequestID = {6}, BusinessUnit = \'{7}\', HedgeFlag = HedgeFlagType.{8}, OptSelfCloseFlag = OptSelfCloseFlagType.{9}, OptionSelfCloseLocalID = \'{10}\', ExchangeID = \'{11}\', ParticipantID = \'{12}\', ClientID = \'{13}\', ExchangeInstID = \'{14}\', TraderID = \'{15}\', InstallID = {16}, OrderSubmitStatus = OrderSubmitStatusType.{17}, NotifySequence = {18}, TradingDay = \'{19}\', SettlementID = {20}, OptionSelfCloseSysID = \'{21}\', InsertDate = \'{22}\', InsertTime = \'{23}\', CancelTime = \'{24}\', ExecResult = ExecResultType.{25}, ClearingPartID = \'{26}\', SequenceNo = {27}, FrontID = {28}, SessionID = {29}, UserProductInfo = \'{30}\', StatusMsg = \'{31}\', ActiveUserID = \'{32}\', BrokerOptionSelfCloseSeq = {33}, BranchID = \'{34}\', InvestUnitID = \'{35}\', AccountID = \'{36}\', CurrencyID = \'{37}\', IPAddress = \'{38}\', MacAddress = \'{39}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OptionSelfCloseRef, 'GB2312'), str(self.UserID, 'GB2312'), self.Volume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.OptSelfCloseFlag) == 0 else OptSelfCloseFlagType(ord(self.OptSelfCloseFlag)).name, str(self.OptionSelfCloseLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.OptionSelfCloseSysID, 'GB2312'), str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.CancelTime, 'GB2312'), '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name, str(self.ClearingPartID, 'GB2312'), self.SequenceNo, self.FrontID, self.SessionID, str(self.UserProductInfo, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.ActiveUserID, 'GB2312'), self.BrokerOptionSelfCloseSeq, str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OptionSelfCloseRef': str(self.OptionSelfCloseRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'Volume': self.Volume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'OptSelfCloseFlag': '' if ord(self.OptSelfCloseFlag) == 0 else OptSelfCloseFlagType(ord(self.OptSelfCloseFlag)).name,'OptionSelfCloseLocalID': str(self.OptionSelfCloseLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'OptionSelfCloseSysID': str(self.OptionSelfCloseSysID, 'GB2312'),'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'ExecResult': '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name,'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'FrontID': self.FrontID,'SessionID': self.SessionID,'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'ActiveUserID': str(self.ActiveUserID, 'GB2312'),'BrokerOptionSelfCloseSeq': self.BrokerOptionSelfCloseSeq,'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcOptionSelfCloseField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OptionSelfCloseRef=self.OptionSelfCloseRef
        obj.UserID=self.UserID
        obj.Volume=self.Volume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.HedgeFlag=self.HedgeFlag
        obj.OptSelfCloseFlag=self.OptSelfCloseFlag
        obj.OptionSelfCloseLocalID=self.OptionSelfCloseLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.OptionSelfCloseSysID=self.OptionSelfCloseSysID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.CancelTime=self.CancelTime
        obj.ExecResult=self.ExecResult
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.UserProductInfo=self.UserProductInfo
        obj.StatusMsg=self.StatusMsg
        obj.ActiveUserID=self.ActiveUserID
        obj.BrokerOptionSelfCloseSeq=self.BrokerOptionSelfCloseSeq
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcOptionSelfCloseActionField(Structure):
    """期权自对冲操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 期权自对冲操作引用
        ("OptionSelfCloseActionRef", c_int32),
        # 期权自对冲引用
        ("OptionSelfCloseRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 期权自对冲操作编号
        ("OptionSelfCloseSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地期权自对冲编号
        ("OptionSelfCloseLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOptionSelfCloseActionRef(self):
        return self.OptionSelfCloseActionRef

    def getOptionSelfCloseRef(self):
        return str(self.OptionSelfCloseRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOptionSelfCloseSysID(self):
        return str(self.OptionSelfCloseSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOptionSelfCloseLocalID(self):
        return str(self.OptionSelfCloseLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OptionSelfCloseActionRef = {2}, OptionSelfCloseRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', OptionSelfCloseSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, ActionDate = \'{10}\', ActionTime = \'{11}\', TraderID = \'{12}\', InstallID = {13}, OptionSelfCloseLocalID = \'{14}\', ActionLocalID = \'{15}\', ParticipantID = \'{16}\', ClientID = \'{17}\', BusinessUnit = \'{18}\', OrderActionStatus = OrderActionStatusType.{19}, UserID = \'{20}\', StatusMsg = \'{21}\', InstrumentID = \'{22}\', BranchID = \'{23}\', InvestUnitID = \'{24}\', IPAddress = \'{25}\', MacAddress = \'{26}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OptionSelfCloseActionRef, str(self.OptionSelfCloseRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.OptionSelfCloseSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.OptionSelfCloseLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OptionSelfCloseActionRef': self.OptionSelfCloseActionRef,'OptionSelfCloseRef': str(self.OptionSelfCloseRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'OptionSelfCloseSysID': str(self.OptionSelfCloseSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OptionSelfCloseLocalID': str(self.OptionSelfCloseLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcOptionSelfCloseActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OptionSelfCloseActionRef=self.OptionSelfCloseActionRef
        obj.OptionSelfCloseRef=self.OptionSelfCloseRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.OptionSelfCloseSysID=self.OptionSelfCloseSysID
        obj.ActionFlag=self.ActionFlag
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OptionSelfCloseLocalID=self.OptionSelfCloseLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.StatusMsg=self.StatusMsg
        obj.InstrumentID=self.InstrumentID
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryOptionSelfCloseField(Structure):
    """期权自对冲查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 期权自对冲编号
        ("OptionSelfCloseSysID", c_char*21),
        # 开始时间
        ("InsertTimeStart", c_char*9),
        # 结束时间
        ("InsertTimeEnd", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOptionSelfCloseSysID(self):
        return str(self.OptionSelfCloseSysID, 'GB2312')

    def getInsertTimeStart(self):
        return str(self.InsertTimeStart, 'GB2312')

    def getInsertTimeEnd(self):
        return str(self.InsertTimeEnd, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', OptionSelfCloseSysID = \'{4}\', InsertTimeStart = \'{5}\', InsertTimeEnd = \'{6}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.OptionSelfCloseSysID, 'GB2312'), str(self.InsertTimeStart, 'GB2312'), str(self.InsertTimeEnd, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'OptionSelfCloseSysID': str(self.OptionSelfCloseSysID, 'GB2312'),'InsertTimeStart': str(self.InsertTimeStart, 'GB2312'),'InsertTimeEnd': str(self.InsertTimeEnd, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryOptionSelfCloseField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.OptionSelfCloseSysID=self.OptionSelfCloseSysID
        obj.InsertTimeStart=self.InsertTimeStart
        obj.InsertTimeEnd=self.InsertTimeEnd
        return obj

class CThostFtdcExchangeOptionSelfCloseField(Structure):
    """交易所期权自对冲信息"""
    _fields_ = [
        # 数量
        ("Volume", c_int32),
        # 请求编号
        ("RequestID", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 期权行权的头寸是否自对冲
        ("OptSelfCloseFlag", c_char),
        # 本地期权自对冲编号
        ("OptionSelfCloseLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 期权自对冲提交状态
        ("OrderSubmitStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 期权自对冲编号
        ("OptionSelfCloseSysID", c_char*21),
        # 报单日期
        ("InsertDate", c_char*9),
        # 插入时间
        ("InsertTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 自对冲结果
        ("ExecResult", c_char),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 营业部编号
        ("BranchID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]

    def getVolume(self):
        return self.Volume
    def getRequestID(self):
        return self.RequestID

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getOptSelfCloseFlag(self):
        return OptSelfCloseFlagType(ord(self.OptSelfCloseFlag))

    def getOptionSelfCloseLocalID(self):
        return str(self.OptionSelfCloseLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getOptionSelfCloseSysID(self):
        return str(self.OptionSelfCloseSysID, 'GB2312')

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')
    def getExecResult(self):
        return ExecResultType(ord(self.ExecResult))

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'Volume = {0}, RequestID = {1}, BusinessUnit = \'{2}\', HedgeFlag = HedgeFlagType.{3}, OptSelfCloseFlag = OptSelfCloseFlagType.{4}, OptionSelfCloseLocalID = \'{5}\', ExchangeID = \'{6}\', ParticipantID = \'{7}\', ClientID = \'{8}\', ExchangeInstID = \'{9}\', TraderID = \'{10}\', InstallID = {11}, OrderSubmitStatus = OrderSubmitStatusType.{12}, NotifySequence = {13}, TradingDay = \'{14}\', SettlementID = {15}, OptionSelfCloseSysID = \'{16}\', InsertDate = \'{17}\', InsertTime = \'{18}\', CancelTime = \'{19}\', ExecResult = ExecResultType.{20}, ClearingPartID = \'{21}\', SequenceNo = {22}, BranchID = \'{23}\', IPAddress = \'{24}\', MacAddress = \'{25}\''.format(self.Volume, self.RequestID, str(self.BusinessUnit, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.OptSelfCloseFlag) == 0 else OptSelfCloseFlagType(ord(self.OptSelfCloseFlag)).name, str(self.OptionSelfCloseLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.OptionSelfCloseSysID, 'GB2312'), str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.CancelTime, 'GB2312'), '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name, str(self.ClearingPartID, 'GB2312'), self.SequenceNo, str(self.BranchID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'Volume': self.Volume,'RequestID': self.RequestID,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'OptSelfCloseFlag': '' if ord(self.OptSelfCloseFlag) == 0 else OptSelfCloseFlagType(ord(self.OptSelfCloseFlag)).name,'OptionSelfCloseLocalID': str(self.OptionSelfCloseLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'OptionSelfCloseSysID': str(self.OptionSelfCloseSysID, 'GB2312'),'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'ExecResult': '' if ord(self.ExecResult) == 0 else ExecResultType(ord(self.ExecResult)).name,'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'BranchID': str(self.BranchID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeOptionSelfCloseField()
        obj.Volume=self.Volume
        obj.RequestID=self.RequestID
        obj.BusinessUnit=self.BusinessUnit
        obj.HedgeFlag=self.HedgeFlag
        obj.OptSelfCloseFlag=self.OptSelfCloseFlag
        obj.OptionSelfCloseLocalID=self.OptionSelfCloseLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.OptionSelfCloseSysID=self.OptionSelfCloseSysID
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.CancelTime=self.CancelTime
        obj.ExecResult=self.ExecResult
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.BranchID=self.BranchID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryOptionSelfCloseActionField(Structure):
    """期权自对冲操作查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExchangeID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryOptionSelfCloseActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcExchangeOptionSelfCloseActionField(Structure):
    """交易所期权自对冲操作"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 期权自对冲操作编号
        ("OptionSelfCloseSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地期权自对冲编号
        ("OptionSelfCloseLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 营业部编号
        ("BranchID", c_char*9),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOptionSelfCloseSysID(self):
        return str(self.OptionSelfCloseSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOptionSelfCloseLocalID(self):
        return str(self.OptionSelfCloseLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', OptionSelfCloseSysID = \'{1}\', ActionFlag = ActionFlagType.{2}, ActionDate = \'{3}\', ActionTime = \'{4}\', TraderID = \'{5}\', InstallID = {6}, OptionSelfCloseLocalID = \'{7}\', ActionLocalID = \'{8}\', ParticipantID = \'{9}\', ClientID = \'{10}\', BusinessUnit = \'{11}\', OrderActionStatus = OrderActionStatusType.{12}, UserID = \'{13}\', BranchID = \'{14}\', IPAddress = \'{15}\', MacAddress = \'{16}\''.format(str(self.ExchangeID, 'GB2312'), str(self.OptionSelfCloseSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.OptionSelfCloseLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'OptionSelfCloseSysID': str(self.OptionSelfCloseSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OptionSelfCloseLocalID': str(self.OptionSelfCloseLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcExchangeOptionSelfCloseActionField()
        obj.ExchangeID=self.ExchangeID
        obj.OptionSelfCloseSysID=self.OptionSelfCloseSysID
        obj.ActionFlag=self.ActionFlag
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OptionSelfCloseLocalID=self.OptionSelfCloseLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.BranchID=self.BranchID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcSyncDelaySwapField(Structure):
    """延时换汇同步"""
    _fields_ = [
        # 换汇流水号
        ("DelaySwapSeqNo", c_char*15),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 源币种
        ("FromCurrencyID", c_char*4),
        # 源金额
        ("FromAmount", c_double),
        # 源换汇冻结金额(可用冻结)
        ("FromFrozenSwap", c_double),
        # 源剩余换汇额度(可提冻结)
        ("FromRemainSwap", c_double),
        # 目标币种
        ("ToCurrencyID", c_char*4),
        # 目标金额
        ("ToAmount", c_double),
        ]


    def getDelaySwapSeqNo(self):
        return str(self.DelaySwapSeqNo, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getFromCurrencyID(self):
        return str(self.FromCurrencyID, 'GB2312')
    def getFromAmount(self):
        return self.FromAmount
    def getFromFrozenSwap(self):
        return self.FromFrozenSwap
    def getFromRemainSwap(self):
        return self.FromRemainSwap

    def getToCurrencyID(self):
        return str(self.ToCurrencyID, 'GB2312')
    def getToAmount(self):
        return self.ToAmount

    def __str__(self):
        return 'DelaySwapSeqNo = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', FromCurrencyID = \'{3}\', FromAmount = {4}, FromFrozenSwap = {5}, FromRemainSwap = {6}, ToCurrencyID = \'{7}\', ToAmount = {8}'.format(str(self.DelaySwapSeqNo, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.FromCurrencyID, 'GB2312'), self.FromAmount, self.FromFrozenSwap, self.FromRemainSwap, str(self.ToCurrencyID, 'GB2312'), self.ToAmount)

    @property
    def __dict__(self):
        return {'DelaySwapSeqNo': str(self.DelaySwapSeqNo, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'FromCurrencyID': str(self.FromCurrencyID, 'GB2312'),'FromAmount': self.FromAmount,'FromFrozenSwap': self.FromFrozenSwap,'FromRemainSwap': self.FromRemainSwap,'ToCurrencyID': str(self.ToCurrencyID, 'GB2312'),'ToAmount': self.ToAmount}

    def clone(self):
        obj=CThostFtdcSyncDelaySwapField()
        obj.DelaySwapSeqNo=self.DelaySwapSeqNo
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.FromCurrencyID=self.FromCurrencyID
        obj.FromAmount=self.FromAmount
        obj.FromFrozenSwap=self.FromFrozenSwap
        obj.FromRemainSwap=self.FromRemainSwap
        obj.ToCurrencyID=self.ToCurrencyID
        obj.ToAmount=self.ToAmount
        return obj

class CThostFtdcQrySyncDelaySwapField(Structure):
    """查询延时换汇同步"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 延时换汇流水号
        ("DelaySwapSeqNo", c_char*15),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getDelaySwapSeqNo(self):
        return str(self.DelaySwapSeqNo, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', DelaySwapSeqNo = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.DelaySwapSeqNo, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'DelaySwapSeqNo': str(self.DelaySwapSeqNo, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySyncDelaySwapField()
        obj.BrokerID=self.BrokerID
        obj.DelaySwapSeqNo=self.DelaySwapSeqNo
        return obj

class CThostFtdcInvestUnitField(Structure):
    """投资单元"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 投资者单元名称
        ("InvestorUnitName", c_char*81),
        # 投资者分组代码
        ("InvestorGroupID", c_char*13),
        # 手续费率模板代码
        ("CommModelID", c_char*13),
        # 保证金率模板代码
        ("MarginModelID", c_char*13),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getInvestorUnitName(self):
        return str(self.InvestorUnitName, 'GB2312')

    def getInvestorGroupID(self):
        return str(self.InvestorGroupID, 'GB2312')

    def getCommModelID(self):
        return str(self.CommModelID, 'GB2312')

    def getMarginModelID(self):
        return str(self.MarginModelID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InvestUnitID = \'{2}\', InvestorUnitName = \'{3}\', InvestorGroupID = \'{4}\', CommModelID = \'{5}\', MarginModelID = \'{6}\', AccountID = \'{7}\', CurrencyID = \'{8}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.InvestorUnitName, 'GB2312'), str(self.InvestorGroupID, 'GB2312'), str(self.CommModelID, 'GB2312'), str(self.MarginModelID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'InvestorUnitName': str(self.InvestorUnitName, 'GB2312'),'InvestorGroupID': str(self.InvestorGroupID, 'GB2312'),'CommModelID': str(self.CommModelID, 'GB2312'),'MarginModelID': str(self.MarginModelID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestUnitField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InvestUnitID=self.InvestUnitID
        obj.InvestorUnitName=self.InvestorUnitName
        obj.InvestorGroupID=self.InvestorGroupID
        obj.CommModelID=self.CommModelID
        obj.MarginModelID=self.MarginModelID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcQryInvestUnitField(Structure):
    """查询投资单元"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InvestUnitID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInvestUnitField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcSecAgentCheckModeField(Structure):
    """二级代理商资金校验模式"""
    _fields_ = [
        # 投资者代码
        ("InvestorID", c_char*13),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 币种
        ("CurrencyID", c_char*4),
        # 境外中介机构资金帐号
        ("BrokerSecAgentID", c_char*13),
        # 是否需要校验自己的资金账户
        ("CheckSelfAccount", c_int32),
        ]


    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getBrokerSecAgentID(self):
        return str(self.BrokerSecAgentID, 'GB2312')
    def getCheckSelfAccount(self):
        return self.CheckSelfAccount

    def __str__(self):
        return 'InvestorID = \'{0}\', BrokerID = \'{1}\', CurrencyID = \'{2}\', BrokerSecAgentID = \'{3}\', CheckSelfAccount = {4}'.format(str(self.InvestorID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.BrokerSecAgentID, 'GB2312'), self.CheckSelfAccount)

    @property
    def __dict__(self):
        return {'InvestorID': str(self.InvestorID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'BrokerSecAgentID': str(self.BrokerSecAgentID, 'GB2312'),'CheckSelfAccount': self.CheckSelfAccount}

    def clone(self):
        obj=CThostFtdcSecAgentCheckModeField()
        obj.InvestorID=self.InvestorID
        obj.BrokerID=self.BrokerID
        obj.CurrencyID=self.CurrencyID
        obj.BrokerSecAgentID=self.BrokerSecAgentID
        obj.CheckSelfAccount=self.CheckSelfAccount
        return obj

class CThostFtdcMarketDataField(Structure):
    """市场行情"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 最新价
        ("LastPrice", c_double),
        # 上次结算价
        ("PreSettlementPrice", c_double),
        # 昨收盘
        ("PreClosePrice", c_double),
        # 昨持仓量
        ("PreOpenInterest", c_double),
        # 今开盘
        ("OpenPrice", c_double),
        # 最高价
        ("HighestPrice", c_double),
        # 最低价
        ("LowestPrice", c_double),
        # 数量
        ("Volume", c_int32),
        # 成交金额
        ("Turnover", c_double),
        # 持仓量
        ("OpenInterest", c_double),
        # 今收盘
        ("ClosePrice", c_double),
        # 本次结算价
        ("SettlementPrice", c_double),
        # 涨停板价
        ("UpperLimitPrice", c_double),
        # 跌停板价
        ("LowerLimitPrice", c_double),
        # 昨虚实度
        ("PreDelta", c_double),
        # 今虚实度
        ("CurrDelta", c_double),
        # 最后修改时间
        ("UpdateTime", c_char*9),
        # 最后修改毫秒
        ("UpdateMillisec", c_int32),
        # 业务日期
        ("ActionDay", c_char*9),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')
    def getLastPrice(self):
        return self.LastPrice
    def getPreSettlementPrice(self):
        return self.PreSettlementPrice
    def getPreClosePrice(self):
        return self.PreClosePrice
    def getPreOpenInterest(self):
        return self.PreOpenInterest
    def getOpenPrice(self):
        return self.OpenPrice
    def getHighestPrice(self):
        return self.HighestPrice
    def getLowestPrice(self):
        return self.LowestPrice
    def getVolume(self):
        return self.Volume
    def getTurnover(self):
        return self.Turnover
    def getOpenInterest(self):
        return self.OpenInterest
    def getClosePrice(self):
        return self.ClosePrice
    def getSettlementPrice(self):
        return self.SettlementPrice
    def getUpperLimitPrice(self):
        return self.UpperLimitPrice
    def getLowerLimitPrice(self):
        return self.LowerLimitPrice
    def getPreDelta(self):
        return self.PreDelta
    def getCurrDelta(self):
        return self.CurrDelta

    def getUpdateTime(self):
        return str(self.UpdateTime, 'GB2312')
    def getUpdateMillisec(self):
        return self.UpdateMillisec

    def getActionDay(self):
        return str(self.ActionDay, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', InstrumentID = \'{1}\', ExchangeID = \'{2}\', ExchangeInstID = \'{3}\', LastPrice = {4}, PreSettlementPrice = {5}, PreClosePrice = {6}, PreOpenInterest = {7}, OpenPrice = {8}, HighestPrice = {9}, LowestPrice = {10}, Volume = {11}, Turnover = {12}, OpenInterest = {13}, ClosePrice = {14}, SettlementPrice = {15}, UpperLimitPrice = {16}, LowerLimitPrice = {17}, PreDelta = {18}, CurrDelta = {19}, UpdateTime = \'{20}\', UpdateMillisec = {21}, ActionDay = \'{22}\''.format(str(self.TradingDay, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), self.LastPrice, self.PreSettlementPrice, self.PreClosePrice, self.PreOpenInterest, self.OpenPrice, self.HighestPrice, self.LowestPrice, self.Volume, self.Turnover, self.OpenInterest, self.ClosePrice, self.SettlementPrice, self.UpperLimitPrice, self.LowerLimitPrice, self.PreDelta, self.CurrDelta, str(self.UpdateTime, 'GB2312'), self.UpdateMillisec, str(self.ActionDay, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'LastPrice': self.LastPrice,'PreSettlementPrice': self.PreSettlementPrice,'PreClosePrice': self.PreClosePrice,'PreOpenInterest': self.PreOpenInterest,'OpenPrice': self.OpenPrice,'HighestPrice': self.HighestPrice,'LowestPrice': self.LowestPrice,'Volume': self.Volume,'Turnover': self.Turnover,'OpenInterest': self.OpenInterest,'ClosePrice': self.ClosePrice,'SettlementPrice': self.SettlementPrice,'UpperLimitPrice': self.UpperLimitPrice,'LowerLimitPrice': self.LowerLimitPrice,'PreDelta': self.PreDelta,'CurrDelta': self.CurrDelta,'UpdateTime': str(self.UpdateTime, 'GB2312'),'UpdateMillisec': self.UpdateMillisec,'ActionDay': str(self.ActionDay, 'GB2312')}

    def clone(self):
        obj=CThostFtdcMarketDataField()
        obj.TradingDay=self.TradingDay
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.LastPrice=self.LastPrice
        obj.PreSettlementPrice=self.PreSettlementPrice
        obj.PreClosePrice=self.PreClosePrice
        obj.PreOpenInterest=self.PreOpenInterest
        obj.OpenPrice=self.OpenPrice
        obj.HighestPrice=self.HighestPrice
        obj.LowestPrice=self.LowestPrice
        obj.Volume=self.Volume
        obj.Turnover=self.Turnover
        obj.OpenInterest=self.OpenInterest
        obj.ClosePrice=self.ClosePrice
        obj.SettlementPrice=self.SettlementPrice
        obj.UpperLimitPrice=self.UpperLimitPrice
        obj.LowerLimitPrice=self.LowerLimitPrice
        obj.PreDelta=self.PreDelta
        obj.CurrDelta=self.CurrDelta
        obj.UpdateTime=self.UpdateTime
        obj.UpdateMillisec=self.UpdateMillisec
        obj.ActionDay=self.ActionDay
        return obj

class CThostFtdcMarketDataBaseField(Structure):
    """行情基础属性"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 上次结算价
        ("PreSettlementPrice", c_double),
        # 昨收盘
        ("PreClosePrice", c_double),
        # 昨持仓量
        ("PreOpenInterest", c_double),
        # 昨虚实度
        ("PreDelta", c_double),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPreSettlementPrice(self):
        return self.PreSettlementPrice
    def getPreClosePrice(self):
        return self.PreClosePrice
    def getPreOpenInterest(self):
        return self.PreOpenInterest
    def getPreDelta(self):
        return self.PreDelta

    def __str__(self):
        return 'TradingDay = \'{0}\', PreSettlementPrice = {1}, PreClosePrice = {2}, PreOpenInterest = {3}, PreDelta = {4}'.format(str(self.TradingDay, 'GB2312'), self.PreSettlementPrice, self.PreClosePrice, self.PreOpenInterest, self.PreDelta)

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'PreSettlementPrice': self.PreSettlementPrice,'PreClosePrice': self.PreClosePrice,'PreOpenInterest': self.PreOpenInterest,'PreDelta': self.PreDelta}

    def clone(self):
        obj=CThostFtdcMarketDataBaseField()
        obj.TradingDay=self.TradingDay
        obj.PreSettlementPrice=self.PreSettlementPrice
        obj.PreClosePrice=self.PreClosePrice
        obj.PreOpenInterest=self.PreOpenInterest
        obj.PreDelta=self.PreDelta
        return obj

class CThostFtdcMarketDataStaticField(Structure):
    """行情静态属性"""
    _fields_ = [
        # 今开盘
        ("OpenPrice", c_double),
        # 最高价
        ("HighestPrice", c_double),
        # 最低价
        ("LowestPrice", c_double),
        # 今收盘
        ("ClosePrice", c_double),
        # 涨停板价
        ("UpperLimitPrice", c_double),
        # 跌停板价
        ("LowerLimitPrice", c_double),
        # 本次结算价
        ("SettlementPrice", c_double),
        # 今虚实度
        ("CurrDelta", c_double),
        ]

    def getOpenPrice(self):
        return self.OpenPrice
    def getHighestPrice(self):
        return self.HighestPrice
    def getLowestPrice(self):
        return self.LowestPrice
    def getClosePrice(self):
        return self.ClosePrice
    def getUpperLimitPrice(self):
        return self.UpperLimitPrice
    def getLowerLimitPrice(self):
        return self.LowerLimitPrice
    def getSettlementPrice(self):
        return self.SettlementPrice
    def getCurrDelta(self):
        return self.CurrDelta

    def __str__(self):
        return 'OpenPrice = {0}, HighestPrice = {1}, LowestPrice = {2}, ClosePrice = {3}, UpperLimitPrice = {4}, LowerLimitPrice = {5}, SettlementPrice = {6}, CurrDelta = {7}'.format(self.OpenPrice, self.HighestPrice, self.LowestPrice, self.ClosePrice, self.UpperLimitPrice, self.LowerLimitPrice, self.SettlementPrice, self.CurrDelta)

    @property
    def __dict__(self):
        return {'OpenPrice': self.OpenPrice,'HighestPrice': self.HighestPrice,'LowestPrice': self.LowestPrice,'ClosePrice': self.ClosePrice,'UpperLimitPrice': self.UpperLimitPrice,'LowerLimitPrice': self.LowerLimitPrice,'SettlementPrice': self.SettlementPrice,'CurrDelta': self.CurrDelta}

    def clone(self):
        obj=CThostFtdcMarketDataStaticField()
        obj.OpenPrice=self.OpenPrice
        obj.HighestPrice=self.HighestPrice
        obj.LowestPrice=self.LowestPrice
        obj.ClosePrice=self.ClosePrice
        obj.UpperLimitPrice=self.UpperLimitPrice
        obj.LowerLimitPrice=self.LowerLimitPrice
        obj.SettlementPrice=self.SettlementPrice
        obj.CurrDelta=self.CurrDelta
        return obj

class CThostFtdcMarketDataLastMatchField(Structure):
    """行情最新成交属性"""
    _fields_ = [
        # 最新价
        ("LastPrice", c_double),
        # 数量
        ("Volume", c_int32),
        # 成交金额
        ("Turnover", c_double),
        # 持仓量
        ("OpenInterest", c_double),
        ]

    def getLastPrice(self):
        return self.LastPrice
    def getVolume(self):
        return self.Volume
    def getTurnover(self):
        return self.Turnover
    def getOpenInterest(self):
        return self.OpenInterest

    def __str__(self):
        return 'LastPrice = {0}, Volume = {1}, Turnover = {2}, OpenInterest = {3}'.format(self.LastPrice, self.Volume, self.Turnover, self.OpenInterest)

    @property
    def __dict__(self):
        return {'LastPrice': self.LastPrice,'Volume': self.Volume,'Turnover': self.Turnover,'OpenInterest': self.OpenInterest}

    def clone(self):
        obj=CThostFtdcMarketDataLastMatchField()
        obj.LastPrice=self.LastPrice
        obj.Volume=self.Volume
        obj.Turnover=self.Turnover
        obj.OpenInterest=self.OpenInterest
        return obj

class CThostFtdcMarketDataBestPriceField(Structure):
    """行情最优价属性"""
    _fields_ = [
        # 申买价一
        ("BidPrice1", c_double),
        # 申买量一
        ("BidVolume1", c_int32),
        # 申卖价一
        ("AskPrice1", c_double),
        # 申卖量一
        ("AskVolume1", c_int32),
        ]

    def getBidPrice1(self):
        return self.BidPrice1
    def getBidVolume1(self):
        return self.BidVolume1
    def getAskPrice1(self):
        return self.AskPrice1
    def getAskVolume1(self):
        return self.AskVolume1

    def __str__(self):
        return 'BidPrice1 = {0}, BidVolume1 = {1}, AskPrice1 = {2}, AskVolume1 = {3}'.format(self.BidPrice1, self.BidVolume1, self.AskPrice1, self.AskVolume1)

    @property
    def __dict__(self):
        return {'BidPrice1': self.BidPrice1,'BidVolume1': self.BidVolume1,'AskPrice1': self.AskPrice1,'AskVolume1': self.AskVolume1}

    def clone(self):
        obj=CThostFtdcMarketDataBestPriceField()
        obj.BidPrice1=self.BidPrice1
        obj.BidVolume1=self.BidVolume1
        obj.AskPrice1=self.AskPrice1
        obj.AskVolume1=self.AskVolume1
        return obj

class CThostFtdcMarketDataBid23Field(Structure):
    """行情申买二、三属性"""
    _fields_ = [
        # 申买价二
        ("BidPrice2", c_double),
        # 申买量二
        ("BidVolume2", c_int32),
        # 申买价三
        ("BidPrice3", c_double),
        # 申买量三
        ("BidVolume3", c_int32),
        ]

    def getBidPrice2(self):
        return self.BidPrice2
    def getBidVolume2(self):
        return self.BidVolume2
    def getBidPrice3(self):
        return self.BidPrice3
    def getBidVolume3(self):
        return self.BidVolume3

    def __str__(self):
        return 'BidPrice2 = {0}, BidVolume2 = {1}, BidPrice3 = {2}, BidVolume3 = {3}'.format(self.BidPrice2, self.BidVolume2, self.BidPrice3, self.BidVolume3)

    @property
    def __dict__(self):
        return {'BidPrice2': self.BidPrice2,'BidVolume2': self.BidVolume2,'BidPrice3': self.BidPrice3,'BidVolume3': self.BidVolume3}

    def clone(self):
        obj=CThostFtdcMarketDataBid23Field()
        obj.BidPrice2=self.BidPrice2
        obj.BidVolume2=self.BidVolume2
        obj.BidPrice3=self.BidPrice3
        obj.BidVolume3=self.BidVolume3
        return obj

class CThostFtdcMarketDataAsk23Field(Structure):
    """行情申卖二、三属性"""
    _fields_ = [
        # 申卖价二
        ("AskPrice2", c_double),
        # 申卖量二
        ("AskVolume2", c_int32),
        # 申卖价三
        ("AskPrice3", c_double),
        # 申卖量三
        ("AskVolume3", c_int32),
        ]

    def getAskPrice2(self):
        return self.AskPrice2
    def getAskVolume2(self):
        return self.AskVolume2
    def getAskPrice3(self):
        return self.AskPrice3
    def getAskVolume3(self):
        return self.AskVolume3

    def __str__(self):
        return 'AskPrice2 = {0}, AskVolume2 = {1}, AskPrice3 = {2}, AskVolume3 = {3}'.format(self.AskPrice2, self.AskVolume2, self.AskPrice3, self.AskVolume3)

    @property
    def __dict__(self):
        return {'AskPrice2': self.AskPrice2,'AskVolume2': self.AskVolume2,'AskPrice3': self.AskPrice3,'AskVolume3': self.AskVolume3}

    def clone(self):
        obj=CThostFtdcMarketDataAsk23Field()
        obj.AskPrice2=self.AskPrice2
        obj.AskVolume2=self.AskVolume2
        obj.AskPrice3=self.AskPrice3
        obj.AskVolume3=self.AskVolume3
        return obj

class CThostFtdcMarketDataBid45Field(Structure):
    """行情申买四、五属性"""
    _fields_ = [
        # 申买价四
        ("BidPrice4", c_double),
        # 申买量四
        ("BidVolume4", c_int32),
        # 申买价五
        ("BidPrice5", c_double),
        # 申买量五
        ("BidVolume5", c_int32),
        ]

    def getBidPrice4(self):
        return self.BidPrice4
    def getBidVolume4(self):
        return self.BidVolume4
    def getBidPrice5(self):
        return self.BidPrice5
    def getBidVolume5(self):
        return self.BidVolume5

    def __str__(self):
        return 'BidPrice4 = {0}, BidVolume4 = {1}, BidPrice5 = {2}, BidVolume5 = {3}'.format(self.BidPrice4, self.BidVolume4, self.BidPrice5, self.BidVolume5)

    @property
    def __dict__(self):
        return {'BidPrice4': self.BidPrice4,'BidVolume4': self.BidVolume4,'BidPrice5': self.BidPrice5,'BidVolume5': self.BidVolume5}

    def clone(self):
        obj=CThostFtdcMarketDataBid45Field()
        obj.BidPrice4=self.BidPrice4
        obj.BidVolume4=self.BidVolume4
        obj.BidPrice5=self.BidPrice5
        obj.BidVolume5=self.BidVolume5
        return obj

class CThostFtdcMarketDataAsk45Field(Structure):
    """行情申卖四、五属性"""
    _fields_ = [
        # 申卖价四
        ("AskPrice4", c_double),
        # 申卖量四
        ("AskVolume4", c_int32),
        # 申卖价五
        ("AskPrice5", c_double),
        # 申卖量五
        ("AskVolume5", c_int32),
        ]

    def getAskPrice4(self):
        return self.AskPrice4
    def getAskVolume4(self):
        return self.AskVolume4
    def getAskPrice5(self):
        return self.AskPrice5
    def getAskVolume5(self):
        return self.AskVolume5

    def __str__(self):
        return 'AskPrice4 = {0}, AskVolume4 = {1}, AskPrice5 = {2}, AskVolume5 = {3}'.format(self.AskPrice4, self.AskVolume4, self.AskPrice5, self.AskVolume5)

    @property
    def __dict__(self):
        return {'AskPrice4': self.AskPrice4,'AskVolume4': self.AskVolume4,'AskPrice5': self.AskPrice5,'AskVolume5': self.AskVolume5}

    def clone(self):
        obj=CThostFtdcMarketDataAsk45Field()
        obj.AskPrice4=self.AskPrice4
        obj.AskVolume4=self.AskVolume4
        obj.AskPrice5=self.AskPrice5
        obj.AskVolume5=self.AskVolume5
        return obj

class CThostFtdcMarketDataUpdateTimeField(Structure):
    """行情更新时间属性"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 最后修改时间
        ("UpdateTime", c_char*9),
        # 最后修改毫秒
        ("UpdateMillisec", c_int32),
        # 业务日期
        ("ActionDay", c_char*9),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getUpdateTime(self):
        return str(self.UpdateTime, 'GB2312')
    def getUpdateMillisec(self):
        return self.UpdateMillisec

    def getActionDay(self):
        return str(self.ActionDay, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', UpdateTime = \'{1}\', UpdateMillisec = {2}, ActionDay = \'{3}\''.format(str(self.InstrumentID, 'GB2312'), str(self.UpdateTime, 'GB2312'), self.UpdateMillisec, str(self.ActionDay, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'UpdateTime': str(self.UpdateTime, 'GB2312'),'UpdateMillisec': self.UpdateMillisec,'ActionDay': str(self.ActionDay, 'GB2312')}

    def clone(self):
        obj=CThostFtdcMarketDataUpdateTimeField()
        obj.InstrumentID=self.InstrumentID
        obj.UpdateTime=self.UpdateTime
        obj.UpdateMillisec=self.UpdateMillisec
        obj.ActionDay=self.ActionDay
        return obj

class CThostFtdcMarketDataExchangeField(Structure):
    """行情交易所代码属性"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\''.format(str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcMarketDataExchangeField()
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcSpecificInstrumentField(Structure):
    """指定的合约"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\''.format(str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSpecificInstrumentField()
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcInstrumentStatusField(Structure):
    """合约状态"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 结算组代码
        ("SettlementGroupID", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 合约交易状态
        ("InstrumentStatus", c_char),
        # 交易阶段编号
        ("TradingSegmentSN", c_int32),
        # 进入本状态时间
        ("EnterTime", c_char*9),
        # 进入本状态原因
        ("EnterReason", c_char),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getSettlementGroupID(self):
        return str(self.SettlementGroupID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getInstrumentStatus(self):
        return InstrumentStatusType(ord(self.InstrumentStatus))
    def getTradingSegmentSN(self):
        return self.TradingSegmentSN

    def getEnterTime(self):
        return str(self.EnterTime, 'GB2312')
    def getEnterReason(self):
        return InstStatusEnterReasonType(ord(self.EnterReason))

    def __str__(self):
        return 'ExchangeID = \'{0}\', ExchangeInstID = \'{1}\', SettlementGroupID = \'{2}\', InstrumentID = \'{3}\', InstrumentStatus = InstrumentStatusType.{4}, TradingSegmentSN = {5}, EnterTime = \'{6}\', EnterReason = InstStatusEnterReasonType.{7}'.format(str(self.ExchangeID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.SettlementGroupID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.InstrumentStatus) == 0 else InstrumentStatusType(ord(self.InstrumentStatus)).name, self.TradingSegmentSN, str(self.EnterTime, 'GB2312'), '' if ord(self.EnterReason) == 0 else InstStatusEnterReasonType(ord(self.EnterReason)).name)

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'SettlementGroupID': str(self.SettlementGroupID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'InstrumentStatus': '' if ord(self.InstrumentStatus) == 0 else InstrumentStatusType(ord(self.InstrumentStatus)).name,'TradingSegmentSN': self.TradingSegmentSN,'EnterTime': str(self.EnterTime, 'GB2312'),'EnterReason': '' if ord(self.EnterReason) == 0 else InstStatusEnterReasonType(ord(self.EnterReason)).name}

    def clone(self):
        obj=CThostFtdcInstrumentStatusField()
        obj.ExchangeID=self.ExchangeID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.SettlementGroupID=self.SettlementGroupID
        obj.InstrumentID=self.InstrumentID
        obj.InstrumentStatus=self.InstrumentStatus
        obj.TradingSegmentSN=self.TradingSegmentSN
        obj.EnterTime=self.EnterTime
        obj.EnterReason=self.EnterReason
        return obj

class CThostFtdcQryInstrumentStatusField(Structure):
    """查询合约状态"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', ExchangeInstID = \'{1}\''.format(str(self.ExchangeID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInstrumentStatusField()
        obj.ExchangeID=self.ExchangeID
        obj.ExchangeInstID=self.ExchangeInstID
        return obj

class CThostFtdcInvestorAccountField(Structure):
    """投资者账户"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', AccountID = \'{2}\', CurrencyID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestorAccountField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcPositionProfitAlgorithmField(Structure):
    """浮动盈亏算法"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 盈亏算法
        ("Algorithm", c_char),
        # 备注
        ("Memo", c_char*161),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')
    def getAlgorithm(self):
        return AlgorithmType(ord(self.Algorithm))

    def getMemo(self):
        return str(self.Memo, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', Algorithm = AlgorithmType.{2}, Memo = \'{3}\', CurrencyID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), '' if ord(self.Algorithm) == 0 else AlgorithmType(ord(self.Algorithm)).name, str(self.Memo, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Algorithm': '' if ord(self.Algorithm) == 0 else AlgorithmType(ord(self.Algorithm)).name,'Memo': str(self.Memo, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcPositionProfitAlgorithmField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.Algorithm=self.Algorithm
        obj.Memo=self.Memo
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcDiscountField(Structure):
    """会员资金折扣"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者范围
        ("InvestorRange", c_char),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 资金折扣比例
        ("Discount", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getDiscount(self):
        return self.Discount

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorRange = InvestorRangeType.{1}, InvestorID = \'{2}\', Discount = {3}'.format(str(self.BrokerID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.InvestorID, 'GB2312'), self.Discount)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'InvestorID': str(self.InvestorID, 'GB2312'),'Discount': self.Discount}

    def clone(self):
        obj=CThostFtdcDiscountField()
        obj.BrokerID=self.BrokerID
        obj.InvestorRange=self.InvestorRange
        obj.InvestorID=self.InvestorID
        obj.Discount=self.Discount
        return obj

class CThostFtdcQryTransferBankField(Structure):
    """查询转帐银行"""
    _fields_ = [
        # 银行代码
        ("BankID", c_char*4),
        # 银行分中心代码
        ("BankBrchID", c_char*5),
        ]


    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBrchID(self):
        return str(self.BankBrchID, 'GB2312')

    def __str__(self):
        return 'BankID = \'{0}\', BankBrchID = \'{1}\''.format(str(self.BankID, 'GB2312'), str(self.BankBrchID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BankID': str(self.BankID, 'GB2312'),'BankBrchID': str(self.BankBrchID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTransferBankField()
        obj.BankID=self.BankID
        obj.BankBrchID=self.BankBrchID
        return obj

class CThostFtdcTransferBankField(Structure):
    """转帐银行"""
    _fields_ = [
        # 银行代码
        ("BankID", c_char*4),
        # 银行分中心代码
        ("BankBrchID", c_char*5),
        # 银行名称
        ("BankName", c_char*101),
        # 是否活跃
        ("IsActive", c_int32),
        ]


    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBrchID(self):
        return str(self.BankBrchID, 'GB2312')

    def getBankName(self):
        return str(self.BankName, 'GB2312')
    def getIsActive(self):
        return self.IsActive

    def __str__(self):
        return 'BankID = \'{0}\', BankBrchID = \'{1}\', BankName = \'{2}\', IsActive = {3}'.format(str(self.BankID, 'GB2312'), str(self.BankBrchID, 'GB2312'), str(self.BankName, 'GB2312'), self.IsActive)

    @property
    def __dict__(self):
        return {'BankID': str(self.BankID, 'GB2312'),'BankBrchID': str(self.BankBrchID, 'GB2312'),'BankName': str(self.BankName, 'GB2312'),'IsActive': self.IsActive}

    def clone(self):
        obj=CThostFtdcTransferBankField()
        obj.BankID=self.BankID
        obj.BankBrchID=self.BankBrchID
        obj.BankName=self.BankName
        obj.IsActive=self.IsActive
        return obj

class CThostFtdcQryInvestorPositionDetailField(Structure):
    """查询投资者持仓明细"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInvestorPositionDetailField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcInvestorPositionDetailField(Structure):
    """投资者持仓明细"""
    _fields_ = [
        # 合约代码
        ("InstrumentID", c_char*31),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 买卖
        ("Direction", c_char),
        # 开仓日期
        ("OpenDate", c_char*9),
        # 成交编号
        ("TradeID", c_char*21),
        # 数量
        ("Volume", c_int32),
        # 开仓价
        ("OpenPrice", c_double),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 成交类型
        ("TradeType", c_char),
        # 组合合约代码
        ("CombInstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 逐日盯市平仓盈亏
        ("CloseProfitByDate", c_double),
        # 逐笔对冲平仓盈亏
        ("CloseProfitByTrade", c_double),
        # 逐日盯市持仓盈亏
        ("PositionProfitByDate", c_double),
        # 逐笔对冲持仓盈亏
        ("PositionProfitByTrade", c_double),
        # 投资者保证金
        ("Margin", c_double),
        # 交易所保证金
        ("ExchMargin", c_double),
        # 保证金率
        ("MarginRateByMoney", c_double),
        # 保证金率(按手数)
        ("MarginRateByVolume", c_double),
        # 昨结算价
        ("LastSettlementPrice", c_double),
        # 结算价
        ("SettlementPrice", c_double),
        # 平仓量
        ("CloseVolume", c_int32),
        # 平仓金额
        ("CloseAmount", c_double),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getOpenDate(self):
        return str(self.OpenDate, 'GB2312')

    def getTradeID(self):
        return str(self.TradeID, 'GB2312')
    def getVolume(self):
        return self.Volume
    def getOpenPrice(self):
        return self.OpenPrice

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getTradeType(self):
        return TradeTypeType(ord(self.TradeType))

    def getCombInstrumentID(self):
        return str(self.CombInstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getCloseProfitByDate(self):
        return self.CloseProfitByDate
    def getCloseProfitByTrade(self):
        return self.CloseProfitByTrade
    def getPositionProfitByDate(self):
        return self.PositionProfitByDate
    def getPositionProfitByTrade(self):
        return self.PositionProfitByTrade
    def getMargin(self):
        return self.Margin
    def getExchMargin(self):
        return self.ExchMargin
    def getMarginRateByMoney(self):
        return self.MarginRateByMoney
    def getMarginRateByVolume(self):
        return self.MarginRateByVolume
    def getLastSettlementPrice(self):
        return self.LastSettlementPrice
    def getSettlementPrice(self):
        return self.SettlementPrice
    def getCloseVolume(self):
        return self.CloseVolume
    def getCloseAmount(self):
        return self.CloseAmount

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'InstrumentID = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', HedgeFlag = HedgeFlagType.{3}, Direction = DirectionType.{4}, OpenDate = \'{5}\', TradeID = \'{6}\', Volume = {7}, OpenPrice = {8}, TradingDay = \'{9}\', SettlementID = {10}, TradeType = TradeTypeType.{11}, CombInstrumentID = \'{12}\', ExchangeID = \'{13}\', CloseProfitByDate = {14}, CloseProfitByTrade = {15}, PositionProfitByDate = {16}, PositionProfitByTrade = {17}, Margin = {18}, ExchMargin = {19}, MarginRateByMoney = {20}, MarginRateByVolume = {21}, LastSettlementPrice = {22}, SettlementPrice = {23}, CloseVolume = {24}, CloseAmount = {25}, InvestUnitID = \'{26}\''.format(str(self.InstrumentID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.OpenDate, 'GB2312'), str(self.TradeID, 'GB2312'), self.Volume, self.OpenPrice, str(self.TradingDay, 'GB2312'), self.SettlementID, '' if ord(self.TradeType) == 0 else TradeTypeType(ord(self.TradeType)).name, str(self.CombInstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), self.CloseProfitByDate, self.CloseProfitByTrade, self.PositionProfitByDate, self.PositionProfitByTrade, self.Margin, self.ExchMargin, self.MarginRateByMoney, self.MarginRateByVolume, self.LastSettlementPrice, self.SettlementPrice, self.CloseVolume, self.CloseAmount, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'InstrumentID': str(self.InstrumentID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'OpenDate': str(self.OpenDate, 'GB2312'),'TradeID': str(self.TradeID, 'GB2312'),'Volume': self.Volume,'OpenPrice': self.OpenPrice,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'TradeType': '' if ord(self.TradeType) == 0 else TradeTypeType(ord(self.TradeType)).name,'CombInstrumentID': str(self.CombInstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'CloseProfitByDate': self.CloseProfitByDate,'CloseProfitByTrade': self.CloseProfitByTrade,'PositionProfitByDate': self.PositionProfitByDate,'PositionProfitByTrade': self.PositionProfitByTrade,'Margin': self.Margin,'ExchMargin': self.ExchMargin,'MarginRateByMoney': self.MarginRateByMoney,'MarginRateByVolume': self.MarginRateByVolume,'LastSettlementPrice': self.LastSettlementPrice,'SettlementPrice': self.SettlementPrice,'CloseVolume': self.CloseVolume,'CloseAmount': self.CloseAmount,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestorPositionDetailField()
        obj.InstrumentID=self.InstrumentID
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.HedgeFlag=self.HedgeFlag
        obj.Direction=self.Direction
        obj.OpenDate=self.OpenDate
        obj.TradeID=self.TradeID
        obj.Volume=self.Volume
        obj.OpenPrice=self.OpenPrice
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.TradeType=self.TradeType
        obj.CombInstrumentID=self.CombInstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.CloseProfitByDate=self.CloseProfitByDate
        obj.CloseProfitByTrade=self.CloseProfitByTrade
        obj.PositionProfitByDate=self.PositionProfitByDate
        obj.PositionProfitByTrade=self.PositionProfitByTrade
        obj.Margin=self.Margin
        obj.ExchMargin=self.ExchMargin
        obj.MarginRateByMoney=self.MarginRateByMoney
        obj.MarginRateByVolume=self.MarginRateByVolume
        obj.LastSettlementPrice=self.LastSettlementPrice
        obj.SettlementPrice=self.SettlementPrice
        obj.CloseVolume=self.CloseVolume
        obj.CloseAmount=self.CloseAmount
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcTradingAccountPasswordField(Structure):
    """资金账户口令域"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 密码
        ("Password", c_char*41),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', Password = \'{2}\', CurrencyID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradingAccountPasswordField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcMDTraderOfferField(Structure):
    """交易所行情报盘机"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 交易所交易员连接状态
        ("TraderConnectStatus", c_char),
        # 发出连接请求的日期
        ("ConnectRequestDate", c_char*9),
        # 发出连接请求的时间
        ("ConnectRequestTime", c_char*9),
        # 上次报告日期
        ("LastReportDate", c_char*9),
        # 上次报告时间
        ("LastReportTime", c_char*9),
        # 完成连接日期
        ("ConnectDate", c_char*9),
        # 完成连接时间
        ("ConnectTime", c_char*9),
        # 启动日期
        ("StartDate", c_char*9),
        # 启动时间
        ("StartTime", c_char*9),
        # 交易日
        ("TradingDay", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 本席位最大成交编号
        ("MaxTradeID", c_char*21),
        # 本席位最大报单备拷
        ("MaxOrderMessageReference", c_char*7),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')
    def getTraderConnectStatus(self):
        return TraderConnectStatusType(ord(self.TraderConnectStatus))

    def getConnectRequestDate(self):
        return str(self.ConnectRequestDate, 'GB2312')

    def getConnectRequestTime(self):
        return str(self.ConnectRequestTime, 'GB2312')

    def getLastReportDate(self):
        return str(self.LastReportDate, 'GB2312')

    def getLastReportTime(self):
        return str(self.LastReportTime, 'GB2312')

    def getConnectDate(self):
        return str(self.ConnectDate, 'GB2312')

    def getConnectTime(self):
        return str(self.ConnectTime, 'GB2312')

    def getStartDate(self):
        return str(self.StartDate, 'GB2312')

    def getStartTime(self):
        return str(self.StartTime, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getMaxTradeID(self):
        return str(self.MaxTradeID, 'GB2312')

    def getMaxOrderMessageReference(self):
        return str(self.MaxOrderMessageReference, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', TraderID = \'{1}\', ParticipantID = \'{2}\', Password = \'{3}\', InstallID = {4}, OrderLocalID = \'{5}\', TraderConnectStatus = TraderConnectStatusType.{6}, ConnectRequestDate = \'{7}\', ConnectRequestTime = \'{8}\', LastReportDate = \'{9}\', LastReportTime = \'{10}\', ConnectDate = \'{11}\', ConnectTime = \'{12}\', StartDate = \'{13}\', StartTime = \'{14}\', TradingDay = \'{15}\', BrokerID = \'{16}\', MaxTradeID = \'{17}\', MaxOrderMessageReference = \'{18}\''.format(str(self.ExchangeID, 'GB2312'), str(self.TraderID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, str(self.OrderLocalID, 'GB2312'), '' if ord(self.TraderConnectStatus) == 0 else TraderConnectStatusType(ord(self.TraderConnectStatus)).name, str(self.ConnectRequestDate, 'GB2312'), str(self.ConnectRequestTime, 'GB2312'), str(self.LastReportDate, 'GB2312'), str(self.LastReportTime, 'GB2312'), str(self.ConnectDate, 'GB2312'), str(self.ConnectTime, 'GB2312'), str(self.StartDate, 'GB2312'), str(self.StartTime, 'GB2312'), str(self.TradingDay, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.MaxTradeID, 'GB2312'), str(self.MaxOrderMessageReference, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'TraderConnectStatus': '' if ord(self.TraderConnectStatus) == 0 else TraderConnectStatusType(ord(self.TraderConnectStatus)).name,'ConnectRequestDate': str(self.ConnectRequestDate, 'GB2312'),'ConnectRequestTime': str(self.ConnectRequestTime, 'GB2312'),'LastReportDate': str(self.LastReportDate, 'GB2312'),'LastReportTime': str(self.LastReportTime, 'GB2312'),'ConnectDate': str(self.ConnectDate, 'GB2312'),'ConnectTime': str(self.ConnectTime, 'GB2312'),'StartDate': str(self.StartDate, 'GB2312'),'StartTime': str(self.StartTime, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'MaxTradeID': str(self.MaxTradeID, 'GB2312'),'MaxOrderMessageReference': str(self.MaxOrderMessageReference, 'GB2312')}

    def clone(self):
        obj=CThostFtdcMDTraderOfferField()
        obj.ExchangeID=self.ExchangeID
        obj.TraderID=self.TraderID
        obj.ParticipantID=self.ParticipantID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.OrderLocalID=self.OrderLocalID
        obj.TraderConnectStatus=self.TraderConnectStatus
        obj.ConnectRequestDate=self.ConnectRequestDate
        obj.ConnectRequestTime=self.ConnectRequestTime
        obj.LastReportDate=self.LastReportDate
        obj.LastReportTime=self.LastReportTime
        obj.ConnectDate=self.ConnectDate
        obj.ConnectTime=self.ConnectTime
        obj.StartDate=self.StartDate
        obj.StartTime=self.StartTime
        obj.TradingDay=self.TradingDay
        obj.BrokerID=self.BrokerID
        obj.MaxTradeID=self.MaxTradeID
        obj.MaxOrderMessageReference=self.MaxOrderMessageReference
        return obj

class CThostFtdcQryMDTraderOfferField(Structure):
    """查询行情报盘机"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', ParticipantID = \'{1}\', TraderID = \'{2}\''.format(str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.TraderID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryMDTraderOfferField()
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.TraderID=self.TraderID
        return obj

class CThostFtdcQryNoticeField(Structure):
    """查询客户通知"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\''.format(str(self.BrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryNoticeField()
        obj.BrokerID=self.BrokerID
        return obj

class CThostFtdcNoticeField(Structure):
    """客户通知"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 消息正文
        ("Content", c_char*501),
        # 经纪公司通知内容序列号
        ("SequenceLabel", c_char*2),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getContent(self):
        return str(self.Content, 'GB2312')

    def getSequenceLabel(self):
        return str(self.SequenceLabel, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', Content = \'{1}\', SequenceLabel = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.Content, 'GB2312'), str(self.SequenceLabel, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'Content': str(self.Content, 'GB2312'),'SequenceLabel': str(self.SequenceLabel, 'GB2312')}

    def clone(self):
        obj=CThostFtdcNoticeField()
        obj.BrokerID=self.BrokerID
        obj.Content=self.Content
        obj.SequenceLabel=self.SequenceLabel
        return obj

class CThostFtdcUserRightField(Structure):
    """用户权限"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 客户权限类型
        ("UserRightType", c_char),
        # 是否禁止
        ("IsForbidden", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getUserRightType(self):
        return UserRightTypeType(ord(self.UserRightType))
    def getIsForbidden(self):
        return self.IsForbidden

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', UserRightType = UserRightTypeType.{2}, IsForbidden = {3}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.UserRightType) == 0 else UserRightTypeType(ord(self.UserRightType)).name, self.IsForbidden)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'UserRightType': '' if ord(self.UserRightType) == 0 else UserRightTypeType(ord(self.UserRightType)).name,'IsForbidden': self.IsForbidden}

    def clone(self):
        obj=CThostFtdcUserRightField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.UserRightType=self.UserRightType
        obj.IsForbidden=self.IsForbidden
        return obj

class CThostFtdcQrySettlementInfoConfirmField(Structure):
    """查询结算信息确认域"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', AccountID = \'{2}\', CurrencyID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySettlementInfoConfirmField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcLoadSettlementInfoField(Structure):
    """装载结算信息"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\''.format(str(self.BrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcLoadSettlementInfoField()
        obj.BrokerID=self.BrokerID
        return obj

class CThostFtdcBrokerWithdrawAlgorithmField(Structure):
    """经纪公司可提资金算法表"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 可提资金算法
        ("WithdrawAlgorithm", c_char),
        # 资金使用率
        ("UsingRatio", c_double),
        # 可提是否包含平仓盈利
        ("IncludeCloseProfit", c_char),
        # 本日无仓且无成交客户是否受可提比例限制
        ("AllWithoutTrade", c_char),
        # 可用是否包含平仓盈利
        ("AvailIncludeCloseProfit", c_char),
        # 是否启用用户事件
        ("IsBrokerUserEvent", c_int32),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 货币质押比率
        ("FundMortgageRatio", c_double),
        # 权益算法
        ("BalanceAlgorithm", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')
    def getWithdrawAlgorithm(self):
        return AlgorithmType(ord(self.WithdrawAlgorithm))
    def getUsingRatio(self):
        return self.UsingRatio
    def getIncludeCloseProfit(self):
        return IncludeCloseProfitType(ord(self.IncludeCloseProfit))
    def getAllWithoutTrade(self):
        return AllWithoutTradeType(ord(self.AllWithoutTrade))
    def getAvailIncludeCloseProfit(self):
        return IncludeCloseProfitType(ord(self.AvailIncludeCloseProfit))
    def getIsBrokerUserEvent(self):
        return self.IsBrokerUserEvent

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getFundMortgageRatio(self):
        return self.FundMortgageRatio
    def getBalanceAlgorithm(self):
        return BalanceAlgorithmType(ord(self.BalanceAlgorithm))

    def __str__(self):
        return 'BrokerID = \'{0}\', WithdrawAlgorithm = AlgorithmType.{1}, UsingRatio = {2}, IncludeCloseProfit = IncludeCloseProfitType.{3}, AllWithoutTrade = AllWithoutTradeType.{4}, AvailIncludeCloseProfit = IncludeCloseProfitType.{5}, IsBrokerUserEvent = {6}, CurrencyID = \'{7}\', FundMortgageRatio = {8}, BalanceAlgorithm = BalanceAlgorithmType.{9}'.format(str(self.BrokerID, 'GB2312'), '' if ord(self.WithdrawAlgorithm) == 0 else AlgorithmType(ord(self.WithdrawAlgorithm)).name, self.UsingRatio, '' if ord(self.IncludeCloseProfit) == 0 else IncludeCloseProfitType(ord(self.IncludeCloseProfit)).name, '' if ord(self.AllWithoutTrade) == 0 else AllWithoutTradeType(ord(self.AllWithoutTrade)).name, '' if ord(self.AvailIncludeCloseProfit) == 0 else IncludeCloseProfitType(ord(self.AvailIncludeCloseProfit)).name, self.IsBrokerUserEvent, str(self.CurrencyID, 'GB2312'), self.FundMortgageRatio, '' if ord(self.BalanceAlgorithm) == 0 else BalanceAlgorithmType(ord(self.BalanceAlgorithm)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'WithdrawAlgorithm': '' if ord(self.WithdrawAlgorithm) == 0 else AlgorithmType(ord(self.WithdrawAlgorithm)).name,'UsingRatio': self.UsingRatio,'IncludeCloseProfit': '' if ord(self.IncludeCloseProfit) == 0 else IncludeCloseProfitType(ord(self.IncludeCloseProfit)).name,'AllWithoutTrade': '' if ord(self.AllWithoutTrade) == 0 else AllWithoutTradeType(ord(self.AllWithoutTrade)).name,'AvailIncludeCloseProfit': '' if ord(self.AvailIncludeCloseProfit) == 0 else IncludeCloseProfitType(ord(self.AvailIncludeCloseProfit)).name,'IsBrokerUserEvent': self.IsBrokerUserEvent,'CurrencyID': str(self.CurrencyID, 'GB2312'),'FundMortgageRatio': self.FundMortgageRatio,'BalanceAlgorithm': '' if ord(self.BalanceAlgorithm) == 0 else BalanceAlgorithmType(ord(self.BalanceAlgorithm)).name}

    def clone(self):
        obj=CThostFtdcBrokerWithdrawAlgorithmField()
        obj.BrokerID=self.BrokerID
        obj.WithdrawAlgorithm=self.WithdrawAlgorithm
        obj.UsingRatio=self.UsingRatio
        obj.IncludeCloseProfit=self.IncludeCloseProfit
        obj.AllWithoutTrade=self.AllWithoutTrade
        obj.AvailIncludeCloseProfit=self.AvailIncludeCloseProfit
        obj.IsBrokerUserEvent=self.IsBrokerUserEvent
        obj.CurrencyID=self.CurrencyID
        obj.FundMortgageRatio=self.FundMortgageRatio
        obj.BalanceAlgorithm=self.BalanceAlgorithm
        return obj

class CThostFtdcTradingAccountPasswordUpdateV1Field(Structure):
    """资金账户口令变更域"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 原来的口令
        ("OldPassword", c_char*41),
        # 新的口令
        ("NewPassword", c_char*41),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getOldPassword(self):
        return str(self.OldPassword, 'GB2312')

    def getNewPassword(self):
        return str(self.NewPassword, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OldPassword = \'{2}\', NewPassword = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.OldPassword, 'GB2312'), str(self.NewPassword, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OldPassword': str(self.OldPassword, 'GB2312'),'NewPassword': str(self.NewPassword, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradingAccountPasswordUpdateV1Field()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OldPassword=self.OldPassword
        obj.NewPassword=self.NewPassword
        return obj

class CThostFtdcTradingAccountPasswordUpdateField(Structure):
    """资金账户口令变更域"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 原来的口令
        ("OldPassword", c_char*41),
        # 新的口令
        ("NewPassword", c_char*41),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getOldPassword(self):
        return str(self.OldPassword, 'GB2312')

    def getNewPassword(self):
        return str(self.NewPassword, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', OldPassword = \'{2}\', NewPassword = \'{3}\', CurrencyID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.OldPassword, 'GB2312'), str(self.NewPassword, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'OldPassword': str(self.OldPassword, 'GB2312'),'NewPassword': str(self.NewPassword, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradingAccountPasswordUpdateField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.OldPassword=self.OldPassword
        obj.NewPassword=self.NewPassword
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcQryCombinationLegField(Structure):
    """查询组合合约分腿"""
    _fields_ = [
        # 组合合约代码
        ("CombInstrumentID", c_char*31),
        # 单腿编号
        ("LegID", c_int32),
        # 单腿合约代码
        ("LegInstrumentID", c_char*31),
        ]


    def getCombInstrumentID(self):
        return str(self.CombInstrumentID, 'GB2312')
    def getLegID(self):
        return self.LegID

    def getLegInstrumentID(self):
        return str(self.LegInstrumentID, 'GB2312')

    def __str__(self):
        return 'CombInstrumentID = \'{0}\', LegID = {1}, LegInstrumentID = \'{2}\''.format(str(self.CombInstrumentID, 'GB2312'), self.LegID, str(self.LegInstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'CombInstrumentID': str(self.CombInstrumentID, 'GB2312'),'LegID': self.LegID,'LegInstrumentID': str(self.LegInstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryCombinationLegField()
        obj.CombInstrumentID=self.CombInstrumentID
        obj.LegID=self.LegID
        obj.LegInstrumentID=self.LegInstrumentID
        return obj

class CThostFtdcQrySyncStatusField(Structure):
    """查询组合合约分腿"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\''.format(str(self.TradingDay, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySyncStatusField()
        obj.TradingDay=self.TradingDay
        return obj

class CThostFtdcCombinationLegField(Structure):
    """组合交易合约的单腿"""
    _fields_ = [
        # 组合合约代码
        ("CombInstrumentID", c_char*31),
        # 单腿编号
        ("LegID", c_int32),
        # 单腿合约代码
        ("LegInstrumentID", c_char*31),
        # 买卖方向
        ("Direction", c_char),
        # 单腿乘数
        ("LegMultiple", c_int32),
        # 派生层数
        ("ImplyLevel", c_int32),
        ]


    def getCombInstrumentID(self):
        return str(self.CombInstrumentID, 'GB2312')
    def getLegID(self):
        return self.LegID

    def getLegInstrumentID(self):
        return str(self.LegInstrumentID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getLegMultiple(self):
        return self.LegMultiple
    def getImplyLevel(self):
        return self.ImplyLevel

    def __str__(self):
        return 'CombInstrumentID = \'{0}\', LegID = {1}, LegInstrumentID = \'{2}\', Direction = DirectionType.{3}, LegMultiple = {4}, ImplyLevel = {5}'.format(str(self.CombInstrumentID, 'GB2312'), self.LegID, str(self.LegInstrumentID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, self.LegMultiple, self.ImplyLevel)

    @property
    def __dict__(self):
        return {'CombInstrumentID': str(self.CombInstrumentID, 'GB2312'),'LegID': self.LegID,'LegInstrumentID': str(self.LegInstrumentID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'LegMultiple': self.LegMultiple,'ImplyLevel': self.ImplyLevel}

    def clone(self):
        obj=CThostFtdcCombinationLegField()
        obj.CombInstrumentID=self.CombInstrumentID
        obj.LegID=self.LegID
        obj.LegInstrumentID=self.LegInstrumentID
        obj.Direction=self.Direction
        obj.LegMultiple=self.LegMultiple
        obj.ImplyLevel=self.ImplyLevel
        return obj

class CThostFtdcSyncStatusField(Structure):
    """数据同步状态"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 数据同步状态
        ("DataSyncStatus", c_char),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getDataSyncStatus(self):
        return DataSyncStatusType(ord(self.DataSyncStatus))

    def __str__(self):
        return 'TradingDay = \'{0}\', DataSyncStatus = DataSyncStatusType.{1}'.format(str(self.TradingDay, 'GB2312'), '' if ord(self.DataSyncStatus) == 0 else DataSyncStatusType(ord(self.DataSyncStatus)).name)

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'DataSyncStatus': '' if ord(self.DataSyncStatus) == 0 else DataSyncStatusType(ord(self.DataSyncStatus)).name}

    def clone(self):
        obj=CThostFtdcSyncStatusField()
        obj.TradingDay=self.TradingDay
        obj.DataSyncStatus=self.DataSyncStatus
        return obj

class CThostFtdcQryLinkManField(Structure):
    """查询联系人"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryLinkManField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

class CThostFtdcLinkManField(Structure):
    """联系人"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 联系人类型
        ("PersonType", c_char),
        # 证件类型
        ("IdentifiedCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 名称
        ("PersonName", c_char*81),
        # 联系电话
        ("Telephone", c_char*41),
        # 通讯地址
        ("Address", c_char*101),
        # 邮政编码
        ("ZipCode", c_char*7),
        # 优先级
        ("Priority", c_int32),
        # 开户邮政编码
        ("UOAZipCode", c_char*11),
        # 全称
        ("PersonFullName", c_char*101),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getPersonType(self):
        return PersonTypeType(ord(self.PersonType))
    def getIdentifiedCardType(self):
        return IdCardTypeType(ord(self.IdentifiedCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')

    def getPersonName(self):
        return str(self.PersonName, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')
    def getPriority(self):
        return self.Priority

    def getUOAZipCode(self):
        return str(self.UOAZipCode, 'GB2312')

    def getPersonFullName(self):
        return str(self.PersonFullName, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', PersonType = PersonTypeType.{2}, IdentifiedCardType = IdCardTypeType.{3}, IdentifiedCardNo = \'{4}\', PersonName = \'{5}\', Telephone = \'{6}\', Address = \'{7}\', ZipCode = \'{8}\', Priority = {9}, UOAZipCode = \'{10}\', PersonFullName = \'{11}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.PersonType) == 0 else PersonTypeType(ord(self.PersonType)).name, '' if ord(self.IdentifiedCardType) == 0 else IdCardTypeType(ord(self.IdentifiedCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), str(self.PersonName, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), self.Priority, str(self.UOAZipCode, 'GB2312'), str(self.PersonFullName, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'PersonType': '' if ord(self.PersonType) == 0 else PersonTypeType(ord(self.PersonType)).name,'IdentifiedCardType': '' if ord(self.IdentifiedCardType) == 0 else IdCardTypeType(ord(self.IdentifiedCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'PersonName': str(self.PersonName, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Priority': self.Priority,'UOAZipCode': str(self.UOAZipCode, 'GB2312'),'PersonFullName': str(self.PersonFullName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcLinkManField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.PersonType=self.PersonType
        obj.IdentifiedCardType=self.IdentifiedCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.PersonName=self.PersonName
        obj.Telephone=self.Telephone
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Priority=self.Priority
        obj.UOAZipCode=self.UOAZipCode
        obj.PersonFullName=self.PersonFullName
        return obj

class CThostFtdcQryBrokerUserEventField(Structure):
    """查询经纪公司用户事件"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 用户事件类型
        ("UserEventType", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getUserEventType(self):
        return UserEventTypeType(ord(self.UserEventType))

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', UserEventType = UserEventTypeType.{2}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.UserEventType) == 0 else UserEventTypeType(ord(self.UserEventType)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'UserEventType': '' if ord(self.UserEventType) == 0 else UserEventTypeType(ord(self.UserEventType)).name}

    def clone(self):
        obj=CThostFtdcQryBrokerUserEventField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.UserEventType=self.UserEventType
        return obj

class CThostFtdcBrokerUserEventField(Structure):
    """查询经纪公司用户事件"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 用户事件类型
        ("UserEventType", c_char),
        # 用户事件序号
        ("EventSequenceNo", c_int32),
        # 事件发生日期
        ("EventDate", c_char*9),
        # 事件发生时间
        ("EventTime", c_char*9),
        # 用户事件信息
        ("UserEventInfo", c_char*1025),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getUserEventType(self):
        return UserEventTypeType(ord(self.UserEventType))
    def getEventSequenceNo(self):
        return self.EventSequenceNo

    def getEventDate(self):
        return str(self.EventDate, 'GB2312')

    def getEventTime(self):
        return str(self.EventTime, 'GB2312')

    def getUserEventInfo(self):
        return str(self.UserEventInfo, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', UserEventType = UserEventTypeType.{2}, EventSequenceNo = {3}, EventDate = \'{4}\', EventTime = \'{5}\', UserEventInfo = \'{6}\', InvestorID = \'{7}\', InstrumentID = \'{8}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.UserEventType) == 0 else UserEventTypeType(ord(self.UserEventType)).name, self.EventSequenceNo, str(self.EventDate, 'GB2312'), str(self.EventTime, 'GB2312'), str(self.UserEventInfo, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'UserEventType': '' if ord(self.UserEventType) == 0 else UserEventTypeType(ord(self.UserEventType)).name,'EventSequenceNo': self.EventSequenceNo,'EventDate': str(self.EventDate, 'GB2312'),'EventTime': str(self.EventTime, 'GB2312'),'UserEventInfo': str(self.UserEventInfo, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcBrokerUserEventField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.UserEventType=self.UserEventType
        obj.EventSequenceNo=self.EventSequenceNo
        obj.EventDate=self.EventDate
        obj.EventTime=self.EventTime
        obj.UserEventInfo=self.UserEventInfo
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcQryContractBankField(Structure):
    """查询签约银行请求"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分中心代码
        ("BankBrchID", c_char*5),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBrchID(self):
        return str(self.BankBrchID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', BankID = \'{1}\', BankBrchID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBrchID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBrchID': str(self.BankBrchID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryContractBankField()
        obj.BrokerID=self.BrokerID
        obj.BankID=self.BankID
        obj.BankBrchID=self.BankBrchID
        return obj

class CThostFtdcContractBankField(Structure):
    """查询签约银行响应"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分中心代码
        ("BankBrchID", c_char*5),
        # 银行名称
        ("BankName", c_char*101),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBrchID(self):
        return str(self.BankBrchID, 'GB2312')

    def getBankName(self):
        return str(self.BankName, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', BankID = \'{1}\', BankBrchID = \'{2}\', BankName = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBrchID, 'GB2312'), str(self.BankName, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBrchID': str(self.BankBrchID, 'GB2312'),'BankName': str(self.BankName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcContractBankField()
        obj.BrokerID=self.BrokerID
        obj.BankID=self.BankID
        obj.BankBrchID=self.BankBrchID
        obj.BankName=self.BankName
        return obj

class CThostFtdcInvestorPositionCombineDetailField(Structure):
    """投资者组合持仓明细"""
    _fields_ = [
        # 交易日
        ("TradingDay", c_char*9),
        # 开仓日期
        ("OpenDate", c_char*9),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 组合编号
        ("ComTradeID", c_char*21),
        # 撮合编号
        ("TradeID", c_char*21),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 买卖
        ("Direction", c_char),
        # 持仓量
        ("TotalAmt", c_int32),
        # 投资者保证金
        ("Margin", c_double),
        # 交易所保证金
        ("ExchMargin", c_double),
        # 保证金率
        ("MarginRateByMoney", c_double),
        # 保证金率(按手数)
        ("MarginRateByVolume", c_double),
        # 单腿编号
        ("LegID", c_int32),
        # 单腿乘数
        ("LegMultiple", c_int32),
        # 组合持仓合约编码
        ("CombInstrumentID", c_char*31),
        # 成交组号
        ("TradeGroupID", c_int32),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getOpenDate(self):
        return str(self.OpenDate, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getComTradeID(self):
        return str(self.ComTradeID, 'GB2312')

    def getTradeID(self):
        return str(self.TradeID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getTotalAmt(self):
        return self.TotalAmt
    def getMargin(self):
        return self.Margin
    def getExchMargin(self):
        return self.ExchMargin
    def getMarginRateByMoney(self):
        return self.MarginRateByMoney
    def getMarginRateByVolume(self):
        return self.MarginRateByVolume
    def getLegID(self):
        return self.LegID
    def getLegMultiple(self):
        return self.LegMultiple

    def getCombInstrumentID(self):
        return str(self.CombInstrumentID, 'GB2312')
    def getTradeGroupID(self):
        return self.TradeGroupID

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', OpenDate = \'{1}\', ExchangeID = \'{2}\', SettlementID = {3}, BrokerID = \'{4}\', InvestorID = \'{5}\', ComTradeID = \'{6}\', TradeID = \'{7}\', InstrumentID = \'{8}\', HedgeFlag = HedgeFlagType.{9}, Direction = DirectionType.{10}, TotalAmt = {11}, Margin = {12}, ExchMargin = {13}, MarginRateByMoney = {14}, MarginRateByVolume = {15}, LegID = {16}, LegMultiple = {17}, CombInstrumentID = \'{18}\', TradeGroupID = {19}, InvestUnitID = \'{20}\''.format(str(self.TradingDay, 'GB2312'), str(self.OpenDate, 'GB2312'), str(self.ExchangeID, 'GB2312'), self.SettlementID, str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ComTradeID, 'GB2312'), str(self.TradeID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, self.TotalAmt, self.Margin, self.ExchMargin, self.MarginRateByMoney, self.MarginRateByVolume, self.LegID, self.LegMultiple, str(self.CombInstrumentID, 'GB2312'), self.TradeGroupID, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'OpenDate': str(self.OpenDate, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'SettlementID': self.SettlementID,'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ComTradeID': str(self.ComTradeID, 'GB2312'),'TradeID': str(self.TradeID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'TotalAmt': self.TotalAmt,'Margin': self.Margin,'ExchMargin': self.ExchMargin,'MarginRateByMoney': self.MarginRateByMoney,'MarginRateByVolume': self.MarginRateByVolume,'LegID': self.LegID,'LegMultiple': self.LegMultiple,'CombInstrumentID': str(self.CombInstrumentID, 'GB2312'),'TradeGroupID': self.TradeGroupID,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestorPositionCombineDetailField()
        obj.TradingDay=self.TradingDay
        obj.OpenDate=self.OpenDate
        obj.ExchangeID=self.ExchangeID
        obj.SettlementID=self.SettlementID
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ComTradeID=self.ComTradeID
        obj.TradeID=self.TradeID
        obj.InstrumentID=self.InstrumentID
        obj.HedgeFlag=self.HedgeFlag
        obj.Direction=self.Direction
        obj.TotalAmt=self.TotalAmt
        obj.Margin=self.Margin
        obj.ExchMargin=self.ExchMargin
        obj.MarginRateByMoney=self.MarginRateByMoney
        obj.MarginRateByVolume=self.MarginRateByVolume
        obj.LegID=self.LegID
        obj.LegMultiple=self.LegMultiple
        obj.CombInstrumentID=self.CombInstrumentID
        obj.TradeGroupID=self.TradeGroupID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcParkedOrderField(Structure):
    """预埋单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报单引用
        ("OrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 报单价格条件
        ("OrderPriceType", c_char),
        # 买卖方向
        ("Direction", c_char),
        # 组合开平标志
        ("CombOffsetFlag", c_char*5),
        # 组合投机套保标志
        ("CombHedgeFlag", c_char*5),
        # 价格
        ("LimitPrice", c_double),
        # 数量
        ("VolumeTotalOriginal", c_int32),
        # 有效期类型
        ("TimeCondition", c_char),
        # GTD日期
        ("GTDDate", c_char*9),
        # 成交量类型
        ("VolumeCondition", c_char),
        # 最小成交量
        ("MinVolume", c_int32),
        # 触发条件
        ("ContingentCondition", c_char),
        # 止损价
        ("StopPrice", c_double),
        # 强平原因
        ("ForceCloseReason", c_char),
        # 自动挂起标志
        ("IsAutoSuspend", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 请求编号
        ("RequestID", c_int32),
        # 用户强评标志
        ("UserForceClose", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 预埋报单编号
        ("ParkedOrderID", c_char*13),
        # 用户类型
        ("UserType", c_char),
        # 预埋单状态
        ("Status", c_char),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 互换单标志
        ("IsSwapOrder", c_int32),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 交易编码
        ("ClientID", c_char*11),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getOrderPriceType(self):
        return OrderPriceTypeType(ord(self.OrderPriceType))
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getCombOffsetFlag(self):
        return str(self.CombOffsetFlag, 'GB2312')

    def getCombHedgeFlag(self):
        return str(self.CombHedgeFlag, 'GB2312')
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeTotalOriginal(self):
        return self.VolumeTotalOriginal
    def getTimeCondition(self):
        return TimeConditionType(ord(self.TimeCondition))

    def getGTDDate(self):
        return str(self.GTDDate, 'GB2312')
    def getVolumeCondition(self):
        return VolumeConditionType(ord(self.VolumeCondition))
    def getMinVolume(self):
        return self.MinVolume
    def getContingentCondition(self):
        return ContingentConditionType(ord(self.ContingentCondition))
    def getStopPrice(self):
        return self.StopPrice
    def getForceCloseReason(self):
        return ForceCloseReasonType(ord(self.ForceCloseReason))
    def getIsAutoSuspend(self):
        return self.IsAutoSuspend

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getUserForceClose(self):
        return self.UserForceClose

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParkedOrderID(self):
        return str(self.ParkedOrderID, 'GB2312')
    def getUserType(self):
        return UserTypeType(ord(self.UserType))
    def getStatus(self):
        return ParkedOrderStatusType(ord(self.Status))
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')
    def getIsSwapOrder(self):
        return self.IsSwapOrder

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OrderRef = \'{3}\', UserID = \'{4}\', OrderPriceType = OrderPriceTypeType.{5}, Direction = DirectionType.{6}, CombOffsetFlag = \'{7}\', CombHedgeFlag = \'{8}\', LimitPrice = {9}, VolumeTotalOriginal = {10}, TimeCondition = TimeConditionType.{11}, GTDDate = \'{12}\', VolumeCondition = VolumeConditionType.{13}, MinVolume = {14}, ContingentCondition = ContingentConditionType.{15}, StopPrice = {16}, ForceCloseReason = ForceCloseReasonType.{17}, IsAutoSuspend = {18}, BusinessUnit = \'{19}\', RequestID = {20}, UserForceClose = {21}, ExchangeID = \'{22}\', ParkedOrderID = \'{23}\', UserType = UserTypeType.{24}, Status = ParkedOrderStatusType.{25}, ErrorID = {26}, ErrorMsg = \'{27}\', IsSwapOrder = {28}, AccountID = \'{29}\', CurrencyID = \'{30}\', ClientID = \'{31}\', InvestUnitID = \'{32}\', IPAddress = \'{33}\', MacAddress = \'{34}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OrderRef, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.CombOffsetFlag, 'GB2312'), str(self.CombHedgeFlag, 'GB2312'), self.LimitPrice, self.VolumeTotalOriginal, '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name, str(self.GTDDate, 'GB2312'), '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name, self.MinVolume, '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name, self.StopPrice, '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name, self.IsAutoSuspend, str(self.BusinessUnit, 'GB2312'), self.RequestID, self.UserForceClose, str(self.ExchangeID, 'GB2312'), str(self.ParkedOrderID, 'GB2312'), '' if ord(self.UserType) == 0 else UserTypeType(ord(self.UserType)).name, '' if ord(self.Status) == 0 else ParkedOrderStatusType(ord(self.Status)).name, self.ErrorID, str(self.ErrorMsg, 'GB2312'), self.IsSwapOrder, str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OrderRef': str(self.OrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OrderPriceType': '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'CombOffsetFlag': str(self.CombOffsetFlag, 'GB2312'),'CombHedgeFlag': str(self.CombHedgeFlag, 'GB2312'),'LimitPrice': self.LimitPrice,'VolumeTotalOriginal': self.VolumeTotalOriginal,'TimeCondition': '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name,'GTDDate': str(self.GTDDate, 'GB2312'),'VolumeCondition': '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name,'MinVolume': self.MinVolume,'ContingentCondition': '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name,'StopPrice': self.StopPrice,'ForceCloseReason': '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name,'IsAutoSuspend': self.IsAutoSuspend,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'RequestID': self.RequestID,'UserForceClose': self.UserForceClose,'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParkedOrderID': str(self.ParkedOrderID, 'GB2312'),'UserType': '' if ord(self.UserType) == 0 else UserTypeType(ord(self.UserType)).name,'Status': '' if ord(self.Status) == 0 else ParkedOrderStatusType(ord(self.Status)).name,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'IsSwapOrder': self.IsSwapOrder,'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcParkedOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OrderRef=self.OrderRef
        obj.UserID=self.UserID
        obj.OrderPriceType=self.OrderPriceType
        obj.Direction=self.Direction
        obj.CombOffsetFlag=self.CombOffsetFlag
        obj.CombHedgeFlag=self.CombHedgeFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeTotalOriginal=self.VolumeTotalOriginal
        obj.TimeCondition=self.TimeCondition
        obj.GTDDate=self.GTDDate
        obj.VolumeCondition=self.VolumeCondition
        obj.MinVolume=self.MinVolume
        obj.ContingentCondition=self.ContingentCondition
        obj.StopPrice=self.StopPrice
        obj.ForceCloseReason=self.ForceCloseReason
        obj.IsAutoSuspend=self.IsAutoSuspend
        obj.BusinessUnit=self.BusinessUnit
        obj.RequestID=self.RequestID
        obj.UserForceClose=self.UserForceClose
        obj.ExchangeID=self.ExchangeID
        obj.ParkedOrderID=self.ParkedOrderID
        obj.UserType=self.UserType
        obj.Status=self.Status
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.IsSwapOrder=self.IsSwapOrder
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.ClientID=self.ClientID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcParkedOrderActionField(Structure):
    """输入预埋单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报单操作引用
        ("OrderActionRef", c_int32),
        # 报单引用
        ("OrderRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 价格
        ("LimitPrice", c_double),
        # 数量变化
        ("VolumeChange", c_int32),
        # 用户代码
        ("UserID", c_char*16),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 预埋撤单单编号
        ("ParkedOrderActionID", c_char*13),
        # 用户类型
        ("UserType", c_char),
        # 预埋撤单状态
        ("Status", c_char),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOrderActionRef(self):
        return self.OrderActionRef

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeChange(self):
        return self.VolumeChange

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getParkedOrderActionID(self):
        return str(self.ParkedOrderActionID, 'GB2312')
    def getUserType(self):
        return UserTypeType(ord(self.UserType))
    def getStatus(self):
        return ParkedOrderStatusType(ord(self.Status))
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OrderActionRef = {2}, OrderRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', OrderSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, LimitPrice = {10}, VolumeChange = {11}, UserID = \'{12}\', InstrumentID = \'{13}\', ParkedOrderActionID = \'{14}\', UserType = UserTypeType.{15}, Status = ParkedOrderStatusType.{16}, ErrorID = {17}, ErrorMsg = \'{18}\', InvestUnitID = \'{19}\', IPAddress = \'{20}\', MacAddress = \'{21}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OrderActionRef, str(self.OrderRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, self.LimitPrice, self.VolumeChange, str(self.UserID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ParkedOrderActionID, 'GB2312'), '' if ord(self.UserType) == 0 else UserTypeType(ord(self.UserType)).name, '' if ord(self.Status) == 0 else ParkedOrderStatusType(ord(self.Status)).name, self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OrderActionRef': self.OrderActionRef,'OrderRef': str(self.OrderRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'LimitPrice': self.LimitPrice,'VolumeChange': self.VolumeChange,'UserID': str(self.UserID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ParkedOrderActionID': str(self.ParkedOrderActionID, 'GB2312'),'UserType': '' if ord(self.UserType) == 0 else UserTypeType(ord(self.UserType)).name,'Status': '' if ord(self.Status) == 0 else ParkedOrderStatusType(ord(self.Status)).name,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcParkedOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OrderActionRef=self.OrderActionRef
        obj.OrderRef=self.OrderRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeChange=self.VolumeChange
        obj.UserID=self.UserID
        obj.InstrumentID=self.InstrumentID
        obj.ParkedOrderActionID=self.ParkedOrderActionID
        obj.UserType=self.UserType
        obj.Status=self.Status
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryParkedOrderField(Structure):
    """查询预埋单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryParkedOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryParkedOrderActionField(Structure):
    """查询预埋撤单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryParkedOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcRemoveParkedOrderField(Structure):
    """删除预埋单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 预埋报单编号
        ("ParkedOrderID", c_char*13),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getParkedOrderID(self):
        return str(self.ParkedOrderID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ParkedOrderID = \'{2}\', InvestUnitID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ParkedOrderID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ParkedOrderID': str(self.ParkedOrderID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRemoveParkedOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ParkedOrderID=self.ParkedOrderID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcRemoveParkedOrderActionField(Structure):
    """删除预埋撤单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 预埋撤单编号
        ("ParkedOrderActionID", c_char*13),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getParkedOrderActionID(self):
        return str(self.ParkedOrderActionID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ParkedOrderActionID = \'{2}\', InvestUnitID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ParkedOrderActionID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ParkedOrderActionID': str(self.ParkedOrderActionID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRemoveParkedOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ParkedOrderActionID=self.ParkedOrderActionID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcInvestorWithdrawAlgorithmField(Structure):
    """经纪公司可提资金算法表"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者范围
        ("InvestorRange", c_char),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 可提资金比例
        ("UsingRatio", c_double),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 货币质押比率
        ("FundMortgageRatio", c_double),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getUsingRatio(self):
        return self.UsingRatio

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getFundMortgageRatio(self):
        return self.FundMortgageRatio

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorRange = InvestorRangeType.{1}, InvestorID = \'{2}\', UsingRatio = {3}, CurrencyID = \'{4}\', FundMortgageRatio = {5}'.format(str(self.BrokerID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.InvestorID, 'GB2312'), self.UsingRatio, str(self.CurrencyID, 'GB2312'), self.FundMortgageRatio)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'InvestorID': str(self.InvestorID, 'GB2312'),'UsingRatio': self.UsingRatio,'CurrencyID': str(self.CurrencyID, 'GB2312'),'FundMortgageRatio': self.FundMortgageRatio}

    def clone(self):
        obj=CThostFtdcInvestorWithdrawAlgorithmField()
        obj.BrokerID=self.BrokerID
        obj.InvestorRange=self.InvestorRange
        obj.InvestorID=self.InvestorID
        obj.UsingRatio=self.UsingRatio
        obj.CurrencyID=self.CurrencyID
        obj.FundMortgageRatio=self.FundMortgageRatio
        return obj

class CThostFtdcQryInvestorPositionCombineDetailField(Structure):
    """查询组合持仓明细"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 组合持仓合约编码
        ("CombInstrumentID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getCombInstrumentID(self):
        return str(self.CombInstrumentID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', CombInstrumentID = \'{2}\', ExchangeID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.CombInstrumentID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'CombInstrumentID': str(self.CombInstrumentID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInvestorPositionCombineDetailField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.CombInstrumentID=self.CombInstrumentID
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcMarketDataAveragePriceField(Structure):
    """成交均价"""
    _fields_ = [
        # 当日均价
        ("AveragePrice", c_double),
        ]

    def getAveragePrice(self):
        return self.AveragePrice

    def __str__(self):
        return 'AveragePrice = {0}'.format(self.AveragePrice)

    @property
    def __dict__(self):
        return {'AveragePrice': self.AveragePrice}

    def clone(self):
        obj=CThostFtdcMarketDataAveragePriceField()
        obj.AveragePrice=self.AveragePrice
        return obj

class CThostFtdcVerifyInvestorPasswordField(Structure):
    """校验投资者密码"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 密码
        ("Password", c_char*41),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', Password = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.Password, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'Password': str(self.Password, 'GB2312')}

    def clone(self):
        obj=CThostFtdcVerifyInvestorPasswordField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.Password=self.Password
        return obj

class CThostFtdcUserIPField(Structure):
    """用户IP"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # IP地址
        ("IPAddress", c_char*16),
        # IP地址掩码
        ("IPMask", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getIPMask(self):
        return str(self.IPMask, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', IPAddress = \'{2}\', IPMask = \'{3}\', MacAddress = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.IPMask, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'IPMask': str(self.IPMask, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcUserIPField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.IPAddress=self.IPAddress
        obj.IPMask=self.IPMask
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcTradingNoticeInfoField(Structure):
    """用户事件通知信息"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 发送时间
        ("SendTime", c_char*9),
        # 消息正文
        ("FieldContent", c_char*501),
        # 序列系列号
        ("SequenceSeries", c_int32),
        # 序列号
        ("SequenceNo", c_int32),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getSendTime(self):
        return str(self.SendTime, 'GB2312')

    def getFieldContent(self):
        return str(self.FieldContent, 'GB2312')
    def getSequenceSeries(self):
        return self.SequenceSeries
    def getSequenceNo(self):
        return self.SequenceNo

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', SendTime = \'{2}\', FieldContent = \'{3}\', SequenceSeries = {4}, SequenceNo = {5}, InvestUnitID = \'{6}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.SendTime, 'GB2312'), str(self.FieldContent, 'GB2312'), self.SequenceSeries, self.SequenceNo, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'SendTime': str(self.SendTime, 'GB2312'),'FieldContent': str(self.FieldContent, 'GB2312'),'SequenceSeries': self.SequenceSeries,'SequenceNo': self.SequenceNo,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradingNoticeInfoField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.SendTime=self.SendTime
        obj.FieldContent=self.FieldContent
        obj.SequenceSeries=self.SequenceSeries
        obj.SequenceNo=self.SequenceNo
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcTradingNoticeField(Structure):
    """用户事件通知"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者范围
        ("InvestorRange", c_char),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 序列系列号
        ("SequenceSeries", c_int32),
        # 用户代码
        ("UserID", c_char*16),
        # 发送时间
        ("SendTime", c_char*9),
        # 序列号
        ("SequenceNo", c_int32),
        # 消息正文
        ("FieldContent", c_char*501),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')
    def getInvestorRange(self):
        return InvestorRangeType(ord(self.InvestorRange))

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getSequenceSeries(self):
        return self.SequenceSeries

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getSendTime(self):
        return str(self.SendTime, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo

    def getFieldContent(self):
        return str(self.FieldContent, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorRange = InvestorRangeType.{1}, InvestorID = \'{2}\', SequenceSeries = {3}, UserID = \'{4}\', SendTime = \'{5}\', SequenceNo = {6}, FieldContent = \'{7}\', InvestUnitID = \'{8}\''.format(str(self.BrokerID, 'GB2312'), '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name, str(self.InvestorID, 'GB2312'), self.SequenceSeries, str(self.UserID, 'GB2312'), str(self.SendTime, 'GB2312'), self.SequenceNo, str(self.FieldContent, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorRange': '' if ord(self.InvestorRange) == 0 else InvestorRangeType(ord(self.InvestorRange)).name,'InvestorID': str(self.InvestorID, 'GB2312'),'SequenceSeries': self.SequenceSeries,'UserID': str(self.UserID, 'GB2312'),'SendTime': str(self.SendTime, 'GB2312'),'SequenceNo': self.SequenceNo,'FieldContent': str(self.FieldContent, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradingNoticeField()
        obj.BrokerID=self.BrokerID
        obj.InvestorRange=self.InvestorRange
        obj.InvestorID=self.InvestorID
        obj.SequenceSeries=self.SequenceSeries
        obj.UserID=self.UserID
        obj.SendTime=self.SendTime
        obj.SequenceNo=self.SequenceNo
        obj.FieldContent=self.FieldContent
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryTradingNoticeField(Structure):
    """查询交易事件通知"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InvestUnitID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTradingNoticeField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryErrOrderField(Structure):
    """查询错误报单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryErrOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

class CThostFtdcErrOrderField(Structure):
    """错误报单"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报单引用
        ("OrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 报单价格条件
        ("OrderPriceType", c_char),
        # 买卖方向
        ("Direction", c_char),
        # 组合开平标志
        ("CombOffsetFlag", c_char*5),
        # 组合投机套保标志
        ("CombHedgeFlag", c_char*5),
        # 价格
        ("LimitPrice", c_double),
        # 数量
        ("VolumeTotalOriginal", c_int32),
        # 有效期类型
        ("TimeCondition", c_char),
        # GTD日期
        ("GTDDate", c_char*9),
        # 成交量类型
        ("VolumeCondition", c_char),
        # 最小成交量
        ("MinVolume", c_int32),
        # 触发条件
        ("ContingentCondition", c_char),
        # 止损价
        ("StopPrice", c_double),
        # 强平原因
        ("ForceCloseReason", c_char),
        # 自动挂起标志
        ("IsAutoSuspend", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 请求编号
        ("RequestID", c_int32),
        # 用户强评标志
        ("UserForceClose", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 互换单标志
        ("IsSwapOrder", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 交易编码
        ("ClientID", c_char*11),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getOrderPriceType(self):
        return OrderPriceTypeType(ord(self.OrderPriceType))
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getCombOffsetFlag(self):
        return str(self.CombOffsetFlag, 'GB2312')

    def getCombHedgeFlag(self):
        return str(self.CombHedgeFlag, 'GB2312')
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeTotalOriginal(self):
        return self.VolumeTotalOriginal
    def getTimeCondition(self):
        return TimeConditionType(ord(self.TimeCondition))

    def getGTDDate(self):
        return str(self.GTDDate, 'GB2312')
    def getVolumeCondition(self):
        return VolumeConditionType(ord(self.VolumeCondition))
    def getMinVolume(self):
        return self.MinVolume
    def getContingentCondition(self):
        return ContingentConditionType(ord(self.ContingentCondition))
    def getStopPrice(self):
        return self.StopPrice
    def getForceCloseReason(self):
        return ForceCloseReasonType(ord(self.ForceCloseReason))
    def getIsAutoSuspend(self):
        return self.IsAutoSuspend

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getUserForceClose(self):
        return self.UserForceClose
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')
    def getIsSwapOrder(self):
        return self.IsSwapOrder

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OrderRef = \'{3}\', UserID = \'{4}\', OrderPriceType = OrderPriceTypeType.{5}, Direction = DirectionType.{6}, CombOffsetFlag = \'{7}\', CombHedgeFlag = \'{8}\', LimitPrice = {9}, VolumeTotalOriginal = {10}, TimeCondition = TimeConditionType.{11}, GTDDate = \'{12}\', VolumeCondition = VolumeConditionType.{13}, MinVolume = {14}, ContingentCondition = ContingentConditionType.{15}, StopPrice = {16}, ForceCloseReason = ForceCloseReasonType.{17}, IsAutoSuspend = {18}, BusinessUnit = \'{19}\', RequestID = {20}, UserForceClose = {21}, ErrorID = {22}, ErrorMsg = \'{23}\', IsSwapOrder = {24}, ExchangeID = \'{25}\', InvestUnitID = \'{26}\', AccountID = \'{27}\', CurrencyID = \'{28}\', ClientID = \'{29}\', IPAddress = \'{30}\', MacAddress = \'{31}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OrderRef, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.CombOffsetFlag, 'GB2312'), str(self.CombHedgeFlag, 'GB2312'), self.LimitPrice, self.VolumeTotalOriginal, '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name, str(self.GTDDate, 'GB2312'), '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name, self.MinVolume, '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name, self.StopPrice, '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name, self.IsAutoSuspend, str(self.BusinessUnit, 'GB2312'), self.RequestID, self.UserForceClose, self.ErrorID, str(self.ErrorMsg, 'GB2312'), self.IsSwapOrder, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OrderRef': str(self.OrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OrderPriceType': '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'CombOffsetFlag': str(self.CombOffsetFlag, 'GB2312'),'CombHedgeFlag': str(self.CombHedgeFlag, 'GB2312'),'LimitPrice': self.LimitPrice,'VolumeTotalOriginal': self.VolumeTotalOriginal,'TimeCondition': '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name,'GTDDate': str(self.GTDDate, 'GB2312'),'VolumeCondition': '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name,'MinVolume': self.MinVolume,'ContingentCondition': '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name,'StopPrice': self.StopPrice,'ForceCloseReason': '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name,'IsAutoSuspend': self.IsAutoSuspend,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'RequestID': self.RequestID,'UserForceClose': self.UserForceClose,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'IsSwapOrder': self.IsSwapOrder,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcErrOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OrderRef=self.OrderRef
        obj.UserID=self.UserID
        obj.OrderPriceType=self.OrderPriceType
        obj.Direction=self.Direction
        obj.CombOffsetFlag=self.CombOffsetFlag
        obj.CombHedgeFlag=self.CombHedgeFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeTotalOriginal=self.VolumeTotalOriginal
        obj.TimeCondition=self.TimeCondition
        obj.GTDDate=self.GTDDate
        obj.VolumeCondition=self.VolumeCondition
        obj.MinVolume=self.MinVolume
        obj.ContingentCondition=self.ContingentCondition
        obj.StopPrice=self.StopPrice
        obj.ForceCloseReason=self.ForceCloseReason
        obj.IsAutoSuspend=self.IsAutoSuspend
        obj.BusinessUnit=self.BusinessUnit
        obj.RequestID=self.RequestID
        obj.UserForceClose=self.UserForceClose
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.IsSwapOrder=self.IsSwapOrder
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.ClientID=self.ClientID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcErrorConditionalOrderField(Structure):
    """查询错误报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 报单引用
        ("OrderRef", c_char*13),
        # 用户代码
        ("UserID", c_char*16),
        # 报单价格条件
        ("OrderPriceType", c_char),
        # 买卖方向
        ("Direction", c_char),
        # 组合开平标志
        ("CombOffsetFlag", c_char*5),
        # 组合投机套保标志
        ("CombHedgeFlag", c_char*5),
        # 价格
        ("LimitPrice", c_double),
        # 数量
        ("VolumeTotalOriginal", c_int32),
        # 有效期类型
        ("TimeCondition", c_char),
        # GTD日期
        ("GTDDate", c_char*9),
        # 成交量类型
        ("VolumeCondition", c_char),
        # 最小成交量
        ("MinVolume", c_int32),
        # 触发条件
        ("ContingentCondition", c_char),
        # 止损价
        ("StopPrice", c_double),
        # 强平原因
        ("ForceCloseReason", c_char),
        # 自动挂起标志
        ("IsAutoSuspend", c_int32),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 请求编号
        ("RequestID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 合约在交易所的代码
        ("ExchangeInstID", c_char*31),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 报单提交状态
        ("OrderSubmitStatus", c_char),
        # 报单提示序号
        ("NotifySequence", c_int32),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 报单来源
        ("OrderSource", c_char),
        # 报单状态
        ("OrderStatus", c_char),
        # 报单类型
        ("OrderType", c_char),
        # 今成交数量
        ("VolumeTraded", c_int32),
        # 剩余数量
        ("VolumeTotal", c_int32),
        # 报单日期
        ("InsertDate", c_char*9),
        # 委托时间
        ("InsertTime", c_char*9),
        # 激活时间
        ("ActiveTime", c_char*9),
        # 挂起时间
        ("SuspendTime", c_char*9),
        # 最后修改时间
        ("UpdateTime", c_char*9),
        # 撤销时间
        ("CancelTime", c_char*9),
        # 最后修改交易所交易员代码
        ("ActiveTraderID", c_char*21),
        # 结算会员编号
        ("ClearingPartID", c_char*11),
        # 序号
        ("SequenceNo", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 用户端产品信息
        ("UserProductInfo", c_char*11),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 用户强评标志
        ("UserForceClose", c_int32),
        # 操作用户代码
        ("ActiveUserID", c_char*16),
        # 经纪公司报单编号
        ("BrokerOrderSeq", c_int32),
        # 相关报单
        ("RelativeOrderSysID", c_char*21),
        # 郑商所成交数量
        ("ZCETotalTradedVolume", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 互换单标志
        ("IsSwapOrder", c_int32),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # 资金账号
        ("AccountID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getOrderPriceType(self):
        return OrderPriceTypeType(ord(self.OrderPriceType))
    def getDirection(self):
        return DirectionType(ord(self.Direction))

    def getCombOffsetFlag(self):
        return str(self.CombOffsetFlag, 'GB2312')

    def getCombHedgeFlag(self):
        return str(self.CombHedgeFlag, 'GB2312')
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeTotalOriginal(self):
        return self.VolumeTotalOriginal
    def getTimeCondition(self):
        return TimeConditionType(ord(self.TimeCondition))

    def getGTDDate(self):
        return str(self.GTDDate, 'GB2312')
    def getVolumeCondition(self):
        return VolumeConditionType(ord(self.VolumeCondition))
    def getMinVolume(self):
        return self.MinVolume
    def getContingentCondition(self):
        return ContingentConditionType(ord(self.ContingentCondition))
    def getStopPrice(self):
        return self.StopPrice
    def getForceCloseReason(self):
        return ForceCloseReasonType(ord(self.ForceCloseReason))
    def getIsAutoSuspend(self):
        return self.IsAutoSuspend

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getRequestID(self):
        return self.RequestID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getExchangeInstID(self):
        return str(self.ExchangeInstID, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getOrderSubmitStatus(self):
        return OrderSubmitStatusType(ord(self.OrderSubmitStatus))
    def getNotifySequence(self):
        return self.NotifySequence

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getOrderSource(self):
        return OrderSourceType(ord(self.OrderSource))
    def getOrderStatus(self):
        return OrderStatusType(ord(self.OrderStatus))
    def getOrderType(self):
        return OrderTypeType(ord(self.OrderType))
    def getVolumeTraded(self):
        return self.VolumeTraded
    def getVolumeTotal(self):
        return self.VolumeTotal

    def getInsertDate(self):
        return str(self.InsertDate, 'GB2312')

    def getInsertTime(self):
        return str(self.InsertTime, 'GB2312')

    def getActiveTime(self):
        return str(self.ActiveTime, 'GB2312')

    def getSuspendTime(self):
        return str(self.SuspendTime, 'GB2312')

    def getUpdateTime(self):
        return str(self.UpdateTime, 'GB2312')

    def getCancelTime(self):
        return str(self.CancelTime, 'GB2312')

    def getActiveTraderID(self):
        return str(self.ActiveTraderID, 'GB2312')

    def getClearingPartID(self):
        return str(self.ClearingPartID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getUserProductInfo(self):
        return str(self.UserProductInfo, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')
    def getUserForceClose(self):
        return self.UserForceClose

    def getActiveUserID(self):
        return str(self.ActiveUserID, 'GB2312')
    def getBrokerOrderSeq(self):
        return self.BrokerOrderSeq

    def getRelativeOrderSysID(self):
        return str(self.RelativeOrderSysID, 'GB2312')
    def getZCETotalTradedVolume(self):
        return self.ZCETotalTradedVolume
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')
    def getIsSwapOrder(self):
        return self.IsSwapOrder

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', OrderRef = \'{3}\', UserID = \'{4}\', OrderPriceType = OrderPriceTypeType.{5}, Direction = DirectionType.{6}, CombOffsetFlag = \'{7}\', CombHedgeFlag = \'{8}\', LimitPrice = {9}, VolumeTotalOriginal = {10}, TimeCondition = TimeConditionType.{11}, GTDDate = \'{12}\', VolumeCondition = VolumeConditionType.{13}, MinVolume = {14}, ContingentCondition = ContingentConditionType.{15}, StopPrice = {16}, ForceCloseReason = ForceCloseReasonType.{17}, IsAutoSuspend = {18}, BusinessUnit = \'{19}\', RequestID = {20}, OrderLocalID = \'{21}\', ExchangeID = \'{22}\', ParticipantID = \'{23}\', ClientID = \'{24}\', ExchangeInstID = \'{25}\', TraderID = \'{26}\', InstallID = {27}, OrderSubmitStatus = OrderSubmitStatusType.{28}, NotifySequence = {29}, TradingDay = \'{30}\', SettlementID = {31}, OrderSysID = \'{32}\', OrderSource = OrderSourceType.{33}, OrderStatus = OrderStatusType.{34}, OrderType = OrderTypeType.{35}, VolumeTraded = {36}, VolumeTotal = {37}, InsertDate = \'{38}\', InsertTime = \'{39}\', ActiveTime = \'{40}\', SuspendTime = \'{41}\', UpdateTime = \'{42}\', CancelTime = \'{43}\', ActiveTraderID = \'{44}\', ClearingPartID = \'{45}\', SequenceNo = {46}, FrontID = {47}, SessionID = {48}, UserProductInfo = \'{49}\', StatusMsg = \'{50}\', UserForceClose = {51}, ActiveUserID = \'{52}\', BrokerOrderSeq = {53}, RelativeOrderSysID = \'{54}\', ZCETotalTradedVolume = {55}, ErrorID = {56}, ErrorMsg = \'{57}\', IsSwapOrder = {58}, BranchID = \'{59}\', InvestUnitID = \'{60}\', AccountID = \'{61}\', CurrencyID = \'{62}\', IPAddress = \'{63}\', MacAddress = \'{64}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.OrderRef, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name, '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, str(self.CombOffsetFlag, 'GB2312'), str(self.CombHedgeFlag, 'GB2312'), self.LimitPrice, self.VolumeTotalOriginal, '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name, str(self.GTDDate, 'GB2312'), '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name, self.MinVolume, '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name, self.StopPrice, '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name, self.IsAutoSuspend, str(self.BusinessUnit, 'GB2312'), self.RequestID, str(self.OrderLocalID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.ExchangeInstID, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name, self.NotifySequence, str(self.TradingDay, 'GB2312'), self.SettlementID, str(self.OrderSysID, 'GB2312'), '' if ord(self.OrderSource) == 0 else OrderSourceType(ord(self.OrderSource)).name, '' if ord(self.OrderStatus) == 0 else OrderStatusType(ord(self.OrderStatus)).name, '' if ord(self.OrderType) == 0 else OrderTypeType(ord(self.OrderType)).name, self.VolumeTraded, self.VolumeTotal, str(self.InsertDate, 'GB2312'), str(self.InsertTime, 'GB2312'), str(self.ActiveTime, 'GB2312'), str(self.SuspendTime, 'GB2312'), str(self.UpdateTime, 'GB2312'), str(self.CancelTime, 'GB2312'), str(self.ActiveTraderID, 'GB2312'), str(self.ClearingPartID, 'GB2312'), self.SequenceNo, self.FrontID, self.SessionID, str(self.UserProductInfo, 'GB2312'), str(self.StatusMsg, 'GB2312'), self.UserForceClose, str(self.ActiveUserID, 'GB2312'), self.BrokerOrderSeq, str(self.RelativeOrderSysID, 'GB2312'), self.ZCETotalTradedVolume, self.ErrorID, str(self.ErrorMsg, 'GB2312'), self.IsSwapOrder, str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'OrderRef': str(self.OrderRef, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OrderPriceType': '' if ord(self.OrderPriceType) == 0 else OrderPriceTypeType(ord(self.OrderPriceType)).name,'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'CombOffsetFlag': str(self.CombOffsetFlag, 'GB2312'),'CombHedgeFlag': str(self.CombHedgeFlag, 'GB2312'),'LimitPrice': self.LimitPrice,'VolumeTotalOriginal': self.VolumeTotalOriginal,'TimeCondition': '' if ord(self.TimeCondition) == 0 else TimeConditionType(ord(self.TimeCondition)).name,'GTDDate': str(self.GTDDate, 'GB2312'),'VolumeCondition': '' if ord(self.VolumeCondition) == 0 else VolumeConditionType(ord(self.VolumeCondition)).name,'MinVolume': self.MinVolume,'ContingentCondition': '' if ord(self.ContingentCondition) == 0 else ContingentConditionType(ord(self.ContingentCondition)).name,'StopPrice': self.StopPrice,'ForceCloseReason': '' if ord(self.ForceCloseReason) == 0 else ForceCloseReasonType(ord(self.ForceCloseReason)).name,'IsAutoSuspend': self.IsAutoSuspend,'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'RequestID': self.RequestID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'ExchangeInstID': str(self.ExchangeInstID, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderSubmitStatus': '' if ord(self.OrderSubmitStatus) == 0 else OrderSubmitStatusType(ord(self.OrderSubmitStatus)).name,'NotifySequence': self.NotifySequence,'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'OrderSysID': str(self.OrderSysID, 'GB2312'),'OrderSource': '' if ord(self.OrderSource) == 0 else OrderSourceType(ord(self.OrderSource)).name,'OrderStatus': '' if ord(self.OrderStatus) == 0 else OrderStatusType(ord(self.OrderStatus)).name,'OrderType': '' if ord(self.OrderType) == 0 else OrderTypeType(ord(self.OrderType)).name,'VolumeTraded': self.VolumeTraded,'VolumeTotal': self.VolumeTotal,'InsertDate': str(self.InsertDate, 'GB2312'),'InsertTime': str(self.InsertTime, 'GB2312'),'ActiveTime': str(self.ActiveTime, 'GB2312'),'SuspendTime': str(self.SuspendTime, 'GB2312'),'UpdateTime': str(self.UpdateTime, 'GB2312'),'CancelTime': str(self.CancelTime, 'GB2312'),'ActiveTraderID': str(self.ActiveTraderID, 'GB2312'),'ClearingPartID': str(self.ClearingPartID, 'GB2312'),'SequenceNo': self.SequenceNo,'FrontID': self.FrontID,'SessionID': self.SessionID,'UserProductInfo': str(self.UserProductInfo, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'UserForceClose': self.UserForceClose,'ActiveUserID': str(self.ActiveUserID, 'GB2312'),'BrokerOrderSeq': self.BrokerOrderSeq,'RelativeOrderSysID': str(self.RelativeOrderSysID, 'GB2312'),'ZCETotalTradedVolume': self.ZCETotalTradedVolume,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'IsSwapOrder': self.IsSwapOrder,'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcErrorConditionalOrderField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.OrderRef=self.OrderRef
        obj.UserID=self.UserID
        obj.OrderPriceType=self.OrderPriceType
        obj.Direction=self.Direction
        obj.CombOffsetFlag=self.CombOffsetFlag
        obj.CombHedgeFlag=self.CombHedgeFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeTotalOriginal=self.VolumeTotalOriginal
        obj.TimeCondition=self.TimeCondition
        obj.GTDDate=self.GTDDate
        obj.VolumeCondition=self.VolumeCondition
        obj.MinVolume=self.MinVolume
        obj.ContingentCondition=self.ContingentCondition
        obj.StopPrice=self.StopPrice
        obj.ForceCloseReason=self.ForceCloseReason
        obj.IsAutoSuspend=self.IsAutoSuspend
        obj.BusinessUnit=self.BusinessUnit
        obj.RequestID=self.RequestID
        obj.OrderLocalID=self.OrderLocalID
        obj.ExchangeID=self.ExchangeID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.ExchangeInstID=self.ExchangeInstID
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderSubmitStatus=self.OrderSubmitStatus
        obj.NotifySequence=self.NotifySequence
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.OrderSysID=self.OrderSysID
        obj.OrderSource=self.OrderSource
        obj.OrderStatus=self.OrderStatus
        obj.OrderType=self.OrderType
        obj.VolumeTraded=self.VolumeTraded
        obj.VolumeTotal=self.VolumeTotal
        obj.InsertDate=self.InsertDate
        obj.InsertTime=self.InsertTime
        obj.ActiveTime=self.ActiveTime
        obj.SuspendTime=self.SuspendTime
        obj.UpdateTime=self.UpdateTime
        obj.CancelTime=self.CancelTime
        obj.ActiveTraderID=self.ActiveTraderID
        obj.ClearingPartID=self.ClearingPartID
        obj.SequenceNo=self.SequenceNo
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.UserProductInfo=self.UserProductInfo
        obj.StatusMsg=self.StatusMsg
        obj.UserForceClose=self.UserForceClose
        obj.ActiveUserID=self.ActiveUserID
        obj.BrokerOrderSeq=self.BrokerOrderSeq
        obj.RelativeOrderSysID=self.RelativeOrderSysID
        obj.ZCETotalTradedVolume=self.ZCETotalTradedVolume
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.IsSwapOrder=self.IsSwapOrder
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        return obj

class CThostFtdcQryErrOrderActionField(Structure):
    """查询错误报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryErrOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

class CThostFtdcErrOrderActionField(Structure):
    """错误报单操作"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 报单操作引用
        ("OrderActionRef", c_int32),
        # 报单引用
        ("OrderRef", c_char*13),
        # 请求编号
        ("RequestID", c_int32),
        # 前置编号
        ("FrontID", c_int32),
        # 会话编号
        ("SessionID", c_int32),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 报单编号
        ("OrderSysID", c_char*21),
        # 操作标志
        ("ActionFlag", c_char),
        # 价格
        ("LimitPrice", c_double),
        # 数量变化
        ("VolumeChange", c_int32),
        # 操作日期
        ("ActionDate", c_char*9),
        # 操作时间
        ("ActionTime", c_char*9),
        # 交易所交易员代码
        ("TraderID", c_char*21),
        # 安装编号
        ("InstallID", c_int32),
        # 本地报单编号
        ("OrderLocalID", c_char*13),
        # 操作本地编号
        ("ActionLocalID", c_char*13),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 客户代码
        ("ClientID", c_char*11),
        # 业务单元
        ("BusinessUnit", c_char*21),
        # 报单操作状态
        ("OrderActionStatus", c_char),
        # 用户代码
        ("UserID", c_char*16),
        # 状态信息
        ("StatusMsg", c_char*81),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 营业部编号
        ("BranchID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        # IP地址
        ("IPAddress", c_char*16),
        # Mac地址
        ("MacAddress", c_char*21),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getOrderActionRef(self):
        return self.OrderActionRef

    def getOrderRef(self):
        return str(self.OrderRef, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getFrontID(self):
        return self.FrontID
    def getSessionID(self):
        return self.SessionID

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getOrderSysID(self):
        return str(self.OrderSysID, 'GB2312')
    def getActionFlag(self):
        return ActionFlagType(ord(self.ActionFlag))
    def getLimitPrice(self):
        return self.LimitPrice
    def getVolumeChange(self):
        return self.VolumeChange

    def getActionDate(self):
        return str(self.ActionDate, 'GB2312')

    def getActionTime(self):
        return str(self.ActionTime, 'GB2312')

    def getTraderID(self):
        return str(self.TraderID, 'GB2312')
    def getInstallID(self):
        return self.InstallID

    def getOrderLocalID(self):
        return str(self.OrderLocalID, 'GB2312')

    def getActionLocalID(self):
        return str(self.ActionLocalID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getClientID(self):
        return str(self.ClientID, 'GB2312')

    def getBusinessUnit(self):
        return str(self.BusinessUnit, 'GB2312')
    def getOrderActionStatus(self):
        return OrderActionStatusType(ord(self.OrderActionStatus))

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getStatusMsg(self):
        return str(self.StatusMsg, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getBranchID(self):
        return str(self.BranchID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def getMacAddress(self):
        return str(self.MacAddress, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', OrderActionRef = {2}, OrderRef = \'{3}\', RequestID = {4}, FrontID = {5}, SessionID = {6}, ExchangeID = \'{7}\', OrderSysID = \'{8}\', ActionFlag = ActionFlagType.{9}, LimitPrice = {10}, VolumeChange = {11}, ActionDate = \'{12}\', ActionTime = \'{13}\', TraderID = \'{14}\', InstallID = {15}, OrderLocalID = \'{16}\', ActionLocalID = \'{17}\', ParticipantID = \'{18}\', ClientID = \'{19}\', BusinessUnit = \'{20}\', OrderActionStatus = OrderActionStatusType.{21}, UserID = \'{22}\', StatusMsg = \'{23}\', InstrumentID = \'{24}\', BranchID = \'{25}\', InvestUnitID = \'{26}\', IPAddress = \'{27}\', MacAddress = \'{28}\', ErrorID = {29}, ErrorMsg = \'{30}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.OrderActionRef, str(self.OrderRef, 'GB2312'), self.RequestID, self.FrontID, self.SessionID, str(self.ExchangeID, 'GB2312'), str(self.OrderSysID, 'GB2312'), '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name, self.LimitPrice, self.VolumeChange, str(self.ActionDate, 'GB2312'), str(self.ActionTime, 'GB2312'), str(self.TraderID, 'GB2312'), self.InstallID, str(self.OrderLocalID, 'GB2312'), str(self.ActionLocalID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ClientID, 'GB2312'), str(self.BusinessUnit, 'GB2312'), '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name, str(self.UserID, 'GB2312'), str(self.StatusMsg, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.BranchID, 'GB2312'), str(self.InvestUnitID, 'GB2312'), str(self.IPAddress, 'GB2312'), str(self.MacAddress, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'OrderActionRef': self.OrderActionRef,'OrderRef': str(self.OrderRef, 'GB2312'),'RequestID': self.RequestID,'FrontID': self.FrontID,'SessionID': self.SessionID,'ExchangeID': str(self.ExchangeID, 'GB2312'),'OrderSysID': str(self.OrderSysID, 'GB2312'),'ActionFlag': '' if ord(self.ActionFlag) == 0 else ActionFlagType(ord(self.ActionFlag)).name,'LimitPrice': self.LimitPrice,'VolumeChange': self.VolumeChange,'ActionDate': str(self.ActionDate, 'GB2312'),'ActionTime': str(self.ActionTime, 'GB2312'),'TraderID': str(self.TraderID, 'GB2312'),'InstallID': self.InstallID,'OrderLocalID': str(self.OrderLocalID, 'GB2312'),'ActionLocalID': str(self.ActionLocalID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ClientID': str(self.ClientID, 'GB2312'),'BusinessUnit': str(self.BusinessUnit, 'GB2312'),'OrderActionStatus': '' if ord(self.OrderActionStatus) == 0 else OrderActionStatusType(ord(self.OrderActionStatus)).name,'UserID': str(self.UserID, 'GB2312'),'StatusMsg': str(self.StatusMsg, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'BranchID': str(self.BranchID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312'),'MacAddress': str(self.MacAddress, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcErrOrderActionField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.OrderActionRef=self.OrderActionRef
        obj.OrderRef=self.OrderRef
        obj.RequestID=self.RequestID
        obj.FrontID=self.FrontID
        obj.SessionID=self.SessionID
        obj.ExchangeID=self.ExchangeID
        obj.OrderSysID=self.OrderSysID
        obj.ActionFlag=self.ActionFlag
        obj.LimitPrice=self.LimitPrice
        obj.VolumeChange=self.VolumeChange
        obj.ActionDate=self.ActionDate
        obj.ActionTime=self.ActionTime
        obj.TraderID=self.TraderID
        obj.InstallID=self.InstallID
        obj.OrderLocalID=self.OrderLocalID
        obj.ActionLocalID=self.ActionLocalID
        obj.ParticipantID=self.ParticipantID
        obj.ClientID=self.ClientID
        obj.BusinessUnit=self.BusinessUnit
        obj.OrderActionStatus=self.OrderActionStatus
        obj.UserID=self.UserID
        obj.StatusMsg=self.StatusMsg
        obj.InstrumentID=self.InstrumentID
        obj.BranchID=self.BranchID
        obj.InvestUnitID=self.InvestUnitID
        obj.IPAddress=self.IPAddress
        obj.MacAddress=self.MacAddress
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcQryExchangeSequenceField(Structure):
    """查询交易所状态"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\''.format(str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryExchangeSequenceField()
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcExchangeSequenceField(Structure):
    """交易所状态"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 序号
        ("SequenceNo", c_int32),
        # 合约交易状态
        ("MarketStatus", c_char),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getSequenceNo(self):
        return self.SequenceNo
    def getMarketStatus(self):
        return InstrumentStatusType(ord(self.MarketStatus))

    def __str__(self):
        return 'ExchangeID = \'{0}\', SequenceNo = {1}, MarketStatus = InstrumentStatusType.{2}'.format(str(self.ExchangeID, 'GB2312'), self.SequenceNo, '' if ord(self.MarketStatus) == 0 else InstrumentStatusType(ord(self.MarketStatus)).name)

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'SequenceNo': self.SequenceNo,'MarketStatus': '' if ord(self.MarketStatus) == 0 else InstrumentStatusType(ord(self.MarketStatus)).name}

    def clone(self):
        obj=CThostFtdcExchangeSequenceField()
        obj.ExchangeID=self.ExchangeID
        obj.SequenceNo=self.SequenceNo
        obj.MarketStatus=self.MarketStatus
        return obj

class CThostFtdcQueryMaxOrderVolumeWithPriceField(Structure):
    """根据价格查询最大报单数量"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 买卖方向
        ("Direction", c_char),
        # 开平标志
        ("OffsetFlag", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 最大允许报单数量
        ("MaxVolume", c_int32),
        # 报单价格
        ("Price", c_double),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getOffsetFlag(self):
        return OffsetFlagType(ord(self.OffsetFlag))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getMaxVolume(self):
        return self.MaxVolume
    def getPrice(self):
        return self.Price

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InstrumentID = \'{2}\', Direction = DirectionType.{3}, OffsetFlag = OffsetFlagType.{4}, HedgeFlag = HedgeFlagType.{5}, MaxVolume = {6}, Price = {7}, ExchangeID = \'{8}\', InvestUnitID = \'{9}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.MaxVolume, self.Price, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'OffsetFlag': '' if ord(self.OffsetFlag) == 0 else OffsetFlagType(ord(self.OffsetFlag)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'MaxVolume': self.MaxVolume,'Price': self.Price,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQueryMaxOrderVolumeWithPriceField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InstrumentID=self.InstrumentID
        obj.Direction=self.Direction
        obj.OffsetFlag=self.OffsetFlag
        obj.HedgeFlag=self.HedgeFlag
        obj.MaxVolume=self.MaxVolume
        obj.Price=self.Price
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryBrokerTradingParamsField(Structure):
    """查询经纪公司交易参数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 投资者帐号
        ("AccountID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', CurrencyID = \'{2}\', AccountID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.AccountID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryBrokerTradingParamsField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.CurrencyID=self.CurrencyID
        obj.AccountID=self.AccountID
        return obj

class CThostFtdcBrokerTradingParamsField(Structure):
    """经纪公司交易参数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 保证金价格类型
        ("MarginPriceType", c_char),
        # 盈亏算法
        ("Algorithm", c_char),
        # 可用是否包含平仓盈利
        ("AvailIncludeCloseProfit", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 期权权利金价格类型
        ("OptionRoyaltyPriceType", c_char),
        # 投资者帐号
        ("AccountID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getMarginPriceType(self):
        return MarginPriceTypeType(ord(self.MarginPriceType))
    def getAlgorithm(self):
        return AlgorithmType(ord(self.Algorithm))
    def getAvailIncludeCloseProfit(self):
        return IncludeCloseProfitType(ord(self.AvailIncludeCloseProfit))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getOptionRoyaltyPriceType(self):
        return OptionRoyaltyPriceTypeType(ord(self.OptionRoyaltyPriceType))

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', MarginPriceType = MarginPriceTypeType.{2}, Algorithm = AlgorithmType.{3}, AvailIncludeCloseProfit = IncludeCloseProfitType.{4}, CurrencyID = \'{5}\', OptionRoyaltyPriceType = OptionRoyaltyPriceTypeType.{6}, AccountID = \'{7}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), '' if ord(self.MarginPriceType) == 0 else MarginPriceTypeType(ord(self.MarginPriceType)).name, '' if ord(self.Algorithm) == 0 else AlgorithmType(ord(self.Algorithm)).name, '' if ord(self.AvailIncludeCloseProfit) == 0 else IncludeCloseProfitType(ord(self.AvailIncludeCloseProfit)).name, str(self.CurrencyID, 'GB2312'), '' if ord(self.OptionRoyaltyPriceType) == 0 else OptionRoyaltyPriceTypeType(ord(self.OptionRoyaltyPriceType)).name, str(self.AccountID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'MarginPriceType': '' if ord(self.MarginPriceType) == 0 else MarginPriceTypeType(ord(self.MarginPriceType)).name,'Algorithm': '' if ord(self.Algorithm) == 0 else AlgorithmType(ord(self.Algorithm)).name,'AvailIncludeCloseProfit': '' if ord(self.AvailIncludeCloseProfit) == 0 else IncludeCloseProfitType(ord(self.AvailIncludeCloseProfit)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'OptionRoyaltyPriceType': '' if ord(self.OptionRoyaltyPriceType) == 0 else OptionRoyaltyPriceTypeType(ord(self.OptionRoyaltyPriceType)).name,'AccountID': str(self.AccountID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcBrokerTradingParamsField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.MarginPriceType=self.MarginPriceType
        obj.Algorithm=self.Algorithm
        obj.AvailIncludeCloseProfit=self.AvailIncludeCloseProfit
        obj.CurrencyID=self.CurrencyID
        obj.OptionRoyaltyPriceType=self.OptionRoyaltyPriceType
        obj.AccountID=self.AccountID
        return obj

class CThostFtdcQryBrokerTradingAlgosField(Structure):
    """查询经纪公司交易算法"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', ExchangeID = \'{1}\', InstrumentID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InstrumentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryBrokerTradingAlgosField()
        obj.BrokerID=self.BrokerID
        obj.ExchangeID=self.ExchangeID
        obj.InstrumentID=self.InstrumentID
        return obj

class CThostFtdcBrokerTradingAlgosField(Structure):
    """经纪公司交易算法"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 持仓处理算法编号
        ("HandlePositionAlgoID", c_char),
        # 寻找保证金率算法编号
        ("FindMarginRateAlgoID", c_char),
        # 资金处理算法编号
        ("HandleTradingAccountAlgoID", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getHandlePositionAlgoID(self):
        return HandlePositionAlgoIDType(ord(self.HandlePositionAlgoID))
    def getFindMarginRateAlgoID(self):
        return FindMarginRateAlgoIDType(ord(self.FindMarginRateAlgoID))
    def getHandleTradingAccountAlgoID(self):
        return HandleTradingAccountAlgoIDType(ord(self.HandleTradingAccountAlgoID))

    def __str__(self):
        return 'BrokerID = \'{0}\', ExchangeID = \'{1}\', InstrumentID = \'{2}\', HandlePositionAlgoID = HandlePositionAlgoIDType.{3}, FindMarginRateAlgoID = FindMarginRateAlgoIDType.{4}, HandleTradingAccountAlgoID = HandleTradingAccountAlgoIDType.{5}'.format(str(self.BrokerID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.HandlePositionAlgoID) == 0 else HandlePositionAlgoIDType(ord(self.HandlePositionAlgoID)).name, '' if ord(self.FindMarginRateAlgoID) == 0 else FindMarginRateAlgoIDType(ord(self.FindMarginRateAlgoID)).name, '' if ord(self.HandleTradingAccountAlgoID) == 0 else HandleTradingAccountAlgoIDType(ord(self.HandleTradingAccountAlgoID)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'HandlePositionAlgoID': '' if ord(self.HandlePositionAlgoID) == 0 else HandlePositionAlgoIDType(ord(self.HandlePositionAlgoID)).name,'FindMarginRateAlgoID': '' if ord(self.FindMarginRateAlgoID) == 0 else FindMarginRateAlgoIDType(ord(self.FindMarginRateAlgoID)).name,'HandleTradingAccountAlgoID': '' if ord(self.HandleTradingAccountAlgoID) == 0 else HandleTradingAccountAlgoIDType(ord(self.HandleTradingAccountAlgoID)).name}

    def clone(self):
        obj=CThostFtdcBrokerTradingAlgosField()
        obj.BrokerID=self.BrokerID
        obj.ExchangeID=self.ExchangeID
        obj.InstrumentID=self.InstrumentID
        obj.HandlePositionAlgoID=self.HandlePositionAlgoID
        obj.FindMarginRateAlgoID=self.FindMarginRateAlgoID
        obj.HandleTradingAccountAlgoID=self.HandleTradingAccountAlgoID
        return obj

class CThostFtdcQueryBrokerDepositField(Structure):
    """查询经纪公司资金"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', ExchangeID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQueryBrokerDepositField()
        obj.BrokerID=self.BrokerID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcBrokerDepositField(Structure):
    """经纪公司资金"""
    _fields_ = [
        # 交易日期
        ("TradingDay", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 会员代码
        ("ParticipantID", c_char*11),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 上次结算准备金
        ("PreBalance", c_double),
        # 当前保证金总额
        ("CurrMargin", c_double),
        # 平仓盈亏
        ("CloseProfit", c_double),
        # 期货结算准备金
        ("Balance", c_double),
        # 入金金额
        ("Deposit", c_double),
        # 出金金额
        ("Withdraw", c_double),
        # 可提资金
        ("Available", c_double),
        # 基本准备金
        ("Reserve", c_double),
        # 冻结的保证金
        ("FrozenMargin", c_double),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getPreBalance(self):
        return self.PreBalance
    def getCurrMargin(self):
        return self.CurrMargin
    def getCloseProfit(self):
        return self.CloseProfit
    def getBalance(self):
        return self.Balance
    def getDeposit(self):
        return self.Deposit
    def getWithdraw(self):
        return self.Withdraw
    def getAvailable(self):
        return self.Available
    def getReserve(self):
        return self.Reserve
    def getFrozenMargin(self):
        return self.FrozenMargin

    def __str__(self):
        return 'TradingDay = \'{0}\', BrokerID = \'{1}\', ParticipantID = \'{2}\', ExchangeID = \'{3}\', PreBalance = {4}, CurrMargin = {5}, CloseProfit = {6}, Balance = {7}, Deposit = {8}, Withdraw = {9}, Available = {10}, Reserve = {11}, FrozenMargin = {12}'.format(str(self.TradingDay, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.ExchangeID, 'GB2312'), self.PreBalance, self.CurrMargin, self.CloseProfit, self.Balance, self.Deposit, self.Withdraw, self.Available, self.Reserve, self.FrozenMargin)

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'PreBalance': self.PreBalance,'CurrMargin': self.CurrMargin,'CloseProfit': self.CloseProfit,'Balance': self.Balance,'Deposit': self.Deposit,'Withdraw': self.Withdraw,'Available': self.Available,'Reserve': self.Reserve,'FrozenMargin': self.FrozenMargin}

    def clone(self):
        obj=CThostFtdcBrokerDepositField()
        obj.TradingDay=self.TradingDay
        obj.BrokerID=self.BrokerID
        obj.ParticipantID=self.ParticipantID
        obj.ExchangeID=self.ExchangeID
        obj.PreBalance=self.PreBalance
        obj.CurrMargin=self.CurrMargin
        obj.CloseProfit=self.CloseProfit
        obj.Balance=self.Balance
        obj.Deposit=self.Deposit
        obj.Withdraw=self.Withdraw
        obj.Available=self.Available
        obj.Reserve=self.Reserve
        obj.FrozenMargin=self.FrozenMargin
        return obj

class CThostFtdcQryCFMMCBrokerKeyField(Structure):
    """查询保证金监管系统经纪公司密钥"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\''.format(str(self.BrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryCFMMCBrokerKeyField()
        obj.BrokerID=self.BrokerID
        return obj

class CThostFtdcCFMMCBrokerKeyField(Structure):
    """保证金监管系统经纪公司密钥"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 经纪公司统一编码
        ("ParticipantID", c_char*11),
        # 密钥生成日期
        ("CreateDate", c_char*9),
        # 密钥生成时间
        ("CreateTime", c_char*9),
        # 密钥编号
        ("KeyID", c_int32),
        # 动态密钥
        ("CurrentKey", c_char*21),
        # 动态密钥类型
        ("KeyKind", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getCreateDate(self):
        return str(self.CreateDate, 'GB2312')

    def getCreateTime(self):
        return str(self.CreateTime, 'GB2312')
    def getKeyID(self):
        return self.KeyID

    def getCurrentKey(self):
        return str(self.CurrentKey, 'GB2312')
    def getKeyKind(self):
        return CFMMCKeyKindType(ord(self.KeyKind))

    def __str__(self):
        return 'BrokerID = \'{0}\', ParticipantID = \'{1}\', CreateDate = \'{2}\', CreateTime = \'{3}\', KeyID = {4}, CurrentKey = \'{5}\', KeyKind = CFMMCKeyKindType.{6}'.format(str(self.BrokerID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.CreateDate, 'GB2312'), str(self.CreateTime, 'GB2312'), self.KeyID, str(self.CurrentKey, 'GB2312'), '' if ord(self.KeyKind) == 0 else CFMMCKeyKindType(ord(self.KeyKind)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'CreateDate': str(self.CreateDate, 'GB2312'),'CreateTime': str(self.CreateTime, 'GB2312'),'KeyID': self.KeyID,'CurrentKey': str(self.CurrentKey, 'GB2312'),'KeyKind': '' if ord(self.KeyKind) == 0 else CFMMCKeyKindType(ord(self.KeyKind)).name}

    def clone(self):
        obj=CThostFtdcCFMMCBrokerKeyField()
        obj.BrokerID=self.BrokerID
        obj.ParticipantID=self.ParticipantID
        obj.CreateDate=self.CreateDate
        obj.CreateTime=self.CreateTime
        obj.KeyID=self.KeyID
        obj.CurrentKey=self.CurrentKey
        obj.KeyKind=self.KeyKind
        return obj

class CThostFtdcCFMMCTradingAccountKeyField(Structure):
    """保证金监管系统经纪公司资金账户密钥"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 经纪公司统一编码
        ("ParticipantID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 密钥编号
        ("KeyID", c_int32),
        # 动态密钥
        ("CurrentKey", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')
    def getKeyID(self):
        return self.KeyID

    def getCurrentKey(self):
        return str(self.CurrentKey, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', ParticipantID = \'{1}\', AccountID = \'{2}\', KeyID = {3}, CurrentKey = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.AccountID, 'GB2312'), self.KeyID, str(self.CurrentKey, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'KeyID': self.KeyID,'CurrentKey': str(self.CurrentKey, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCFMMCTradingAccountKeyField()
        obj.BrokerID=self.BrokerID
        obj.ParticipantID=self.ParticipantID
        obj.AccountID=self.AccountID
        obj.KeyID=self.KeyID
        obj.CurrentKey=self.CurrentKey
        return obj

class CThostFtdcQryCFMMCTradingAccountKeyField(Structure):
    """请求查询保证金监管系统经纪公司资金账户密钥"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryCFMMCTradingAccountKeyField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

class CThostFtdcBrokerUserOTPParamField(Structure):
    """用户动态令牌参数"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 动态令牌提供商
        ("OTPVendorsID", c_char*2),
        # 动态令牌序列号
        ("SerialNumber", c_char*17),
        # 令牌密钥
        ("AuthKey", c_char*41),
        # 漂移值
        ("LastDrift", c_int32),
        # 成功值
        ("LastSuccess", c_int32),
        # 动态令牌类型
        ("OTPType", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getOTPVendorsID(self):
        return str(self.OTPVendorsID, 'GB2312')

    def getSerialNumber(self):
        return str(self.SerialNumber, 'GB2312')

    def getAuthKey(self):
        return str(self.AuthKey, 'GB2312')
    def getLastDrift(self):
        return self.LastDrift
    def getLastSuccess(self):
        return self.LastSuccess
    def getOTPType(self):
        return OTPTypeType(ord(self.OTPType))

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', OTPVendorsID = \'{2}\', SerialNumber = \'{3}\', AuthKey = \'{4}\', LastDrift = {5}, LastSuccess = {6}, OTPType = OTPTypeType.{7}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.OTPVendorsID, 'GB2312'), str(self.SerialNumber, 'GB2312'), str(self.AuthKey, 'GB2312'), self.LastDrift, self.LastSuccess, '' if ord(self.OTPType) == 0 else OTPTypeType(ord(self.OTPType)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OTPVendorsID': str(self.OTPVendorsID, 'GB2312'),'SerialNumber': str(self.SerialNumber, 'GB2312'),'AuthKey': str(self.AuthKey, 'GB2312'),'LastDrift': self.LastDrift,'LastSuccess': self.LastSuccess,'OTPType': '' if ord(self.OTPType) == 0 else OTPTypeType(ord(self.OTPType)).name}

    def clone(self):
        obj=CThostFtdcBrokerUserOTPParamField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.OTPVendorsID=self.OTPVendorsID
        obj.SerialNumber=self.SerialNumber
        obj.AuthKey=self.AuthKey
        obj.LastDrift=self.LastDrift
        obj.LastSuccess=self.LastSuccess
        obj.OTPType=self.OTPType
        return obj

class CThostFtdcManualSyncBrokerUserOTPField(Structure):
    """手工同步用户动态令牌"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 动态令牌类型
        ("OTPType", c_char),
        # 第一个动态密码
        ("FirstOTP", c_char*41),
        # 第二个动态密码
        ("SecondOTP", c_char*41),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getOTPType(self):
        return OTPTypeType(ord(self.OTPType))

    def getFirstOTP(self):
        return str(self.FirstOTP, 'GB2312')

    def getSecondOTP(self):
        return str(self.SecondOTP, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', OTPType = OTPTypeType.{2}, FirstOTP = \'{3}\', SecondOTP = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.OTPType) == 0 else OTPTypeType(ord(self.OTPType)).name, str(self.FirstOTP, 'GB2312'), str(self.SecondOTP, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'OTPType': '' if ord(self.OTPType) == 0 else OTPTypeType(ord(self.OTPType)).name,'FirstOTP': str(self.FirstOTP, 'GB2312'),'SecondOTP': str(self.SecondOTP, 'GB2312')}

    def clone(self):
        obj=CThostFtdcManualSyncBrokerUserOTPField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.OTPType=self.OTPType
        obj.FirstOTP=self.FirstOTP
        obj.SecondOTP=self.SecondOTP
        return obj

class CThostFtdcCommRateModelField(Structure):
    """投资者手续费率模板"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 手续费率模板代码
        ("CommModelID", c_char*13),
        # 模板名称
        ("CommModelName", c_char*161),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getCommModelID(self):
        return str(self.CommModelID, 'GB2312')

    def getCommModelName(self):
        return str(self.CommModelName, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', CommModelID = \'{1}\', CommModelName = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.CommModelID, 'GB2312'), str(self.CommModelName, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'CommModelID': str(self.CommModelID, 'GB2312'),'CommModelName': str(self.CommModelName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCommRateModelField()
        obj.BrokerID=self.BrokerID
        obj.CommModelID=self.CommModelID
        obj.CommModelName=self.CommModelName
        return obj

class CThostFtdcQryCommRateModelField(Structure):
    """请求查询投资者手续费率模板"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 手续费率模板代码
        ("CommModelID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getCommModelID(self):
        return str(self.CommModelID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', CommModelID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.CommModelID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'CommModelID': str(self.CommModelID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryCommRateModelField()
        obj.BrokerID=self.BrokerID
        obj.CommModelID=self.CommModelID
        return obj

class CThostFtdcMarginModelField(Structure):
    """投资者保证金率模板"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 保证金率模板代码
        ("MarginModelID", c_char*13),
        # 模板名称
        ("MarginModelName", c_char*161),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getMarginModelID(self):
        return str(self.MarginModelID, 'GB2312')

    def getMarginModelName(self):
        return str(self.MarginModelName, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', MarginModelID = \'{1}\', MarginModelName = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.MarginModelID, 'GB2312'), str(self.MarginModelName, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'MarginModelID': str(self.MarginModelID, 'GB2312'),'MarginModelName': str(self.MarginModelName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcMarginModelField()
        obj.BrokerID=self.BrokerID
        obj.MarginModelID=self.MarginModelID
        obj.MarginModelName=self.MarginModelName
        return obj

class CThostFtdcQryMarginModelField(Structure):
    """请求查询投资者保证金率模板"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 保证金率模板代码
        ("MarginModelID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getMarginModelID(self):
        return str(self.MarginModelID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', MarginModelID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.MarginModelID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'MarginModelID': str(self.MarginModelID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryMarginModelField()
        obj.BrokerID=self.BrokerID
        obj.MarginModelID=self.MarginModelID
        return obj

class CThostFtdcEWarrantOffsetField(Structure):
    """仓单折抵信息"""
    _fields_ = [
        # 交易日期
        ("TradingDay", c_char*9),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 买卖方向
        ("Direction", c_char),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 数量
        ("Volume", c_int32),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')
    def getDirection(self):
        return DirectionType(ord(self.Direction))
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))
    def getVolume(self):
        return self.Volume

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'TradingDay = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', ExchangeID = \'{3}\', InstrumentID = \'{4}\', Direction = DirectionType.{5}, HedgeFlag = HedgeFlagType.{6}, Volume = {7}, InvestUnitID = \'{8}\''.format(str(self.TradingDay, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InstrumentID, 'GB2312'), '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, self.Volume, str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradingDay': str(self.TradingDay, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'Direction': '' if ord(self.Direction) == 0 else DirectionType(ord(self.Direction)).name,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'Volume': self.Volume,'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcEWarrantOffsetField()
        obj.TradingDay=self.TradingDay
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        obj.InstrumentID=self.InstrumentID
        obj.Direction=self.Direction
        obj.HedgeFlag=self.HedgeFlag
        obj.Volume=self.Volume
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryEWarrantOffsetField(Structure):
    """查询仓单折抵信息"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 合约代码
        ("InstrumentID", c_char*31),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInstrumentID(self):
        return str(self.InstrumentID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ExchangeID = \'{2}\', InstrumentID = \'{3}\', InvestUnitID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.InstrumentID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'InstrumentID': str(self.InstrumentID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryEWarrantOffsetField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ExchangeID=self.ExchangeID
        obj.InstrumentID=self.InstrumentID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQryInvestorProductGroupMarginField(Structure):
    """查询投资者品种/跨品种保证金"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 品种/跨品种标示
        ("ProductGroupID", c_char*31),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getProductGroupID(self):
        return str(self.ProductGroupID, 'GB2312')
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', ProductGroupID = \'{2}\', HedgeFlag = HedgeFlagType.{3}, ExchangeID = \'{4}\', InvestUnitID = \'{5}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.ProductGroupID, 'GB2312'), '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'ProductGroupID': str(self.ProductGroupID, 'GB2312'),'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryInvestorProductGroupMarginField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.ProductGroupID=self.ProductGroupID
        obj.HedgeFlag=self.HedgeFlag
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcInvestorProductGroupMarginField(Structure):
    """投资者品种/跨品种保证金"""
    _fields_ = [
        # 品种/跨品种标示
        ("ProductGroupID", c_char*31),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 交易日
        ("TradingDay", c_char*9),
        # 结算编号
        ("SettlementID", c_int32),
        # 冻结的保证金
        ("FrozenMargin", c_double),
        # 多头冻结的保证金
        ("LongFrozenMargin", c_double),
        # 空头冻结的保证金
        ("ShortFrozenMargin", c_double),
        # 占用的保证金
        ("UseMargin", c_double),
        # 多头保证金
        ("LongUseMargin", c_double),
        # 空头保证金
        ("ShortUseMargin", c_double),
        # 交易所保证金
        ("ExchMargin", c_double),
        # 交易所多头保证金
        ("LongExchMargin", c_double),
        # 交易所空头保证金
        ("ShortExchMargin", c_double),
        # 平仓盈亏
        ("CloseProfit", c_double),
        # 冻结的手续费
        ("FrozenCommission", c_double),
        # 手续费
        ("Commission", c_double),
        # 冻结的资金
        ("FrozenCash", c_double),
        # 资金差额
        ("CashIn", c_double),
        # 持仓盈亏
        ("PositionProfit", c_double),
        # 折抵总金额
        ("OffsetAmount", c_double),
        # 多头折抵总金额
        ("LongOffsetAmount", c_double),
        # 空头折抵总金额
        ("ShortOffsetAmount", c_double),
        # 交易所折抵总金额
        ("ExchOffsetAmount", c_double),
        # 交易所多头折抵总金额
        ("LongExchOffsetAmount", c_double),
        # 交易所空头折抵总金额
        ("ShortExchOffsetAmount", c_double),
        # 投机套保标志
        ("HedgeFlag", c_char),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getProductGroupID(self):
        return str(self.ProductGroupID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getSettlementID(self):
        return self.SettlementID
    def getFrozenMargin(self):
        return self.FrozenMargin
    def getLongFrozenMargin(self):
        return self.LongFrozenMargin
    def getShortFrozenMargin(self):
        return self.ShortFrozenMargin
    def getUseMargin(self):
        return self.UseMargin
    def getLongUseMargin(self):
        return self.LongUseMargin
    def getShortUseMargin(self):
        return self.ShortUseMargin
    def getExchMargin(self):
        return self.ExchMargin
    def getLongExchMargin(self):
        return self.LongExchMargin
    def getShortExchMargin(self):
        return self.ShortExchMargin
    def getCloseProfit(self):
        return self.CloseProfit
    def getFrozenCommission(self):
        return self.FrozenCommission
    def getCommission(self):
        return self.Commission
    def getFrozenCash(self):
        return self.FrozenCash
    def getCashIn(self):
        return self.CashIn
    def getPositionProfit(self):
        return self.PositionProfit
    def getOffsetAmount(self):
        return self.OffsetAmount
    def getLongOffsetAmount(self):
        return self.LongOffsetAmount
    def getShortOffsetAmount(self):
        return self.ShortOffsetAmount
    def getExchOffsetAmount(self):
        return self.ExchOffsetAmount
    def getLongExchOffsetAmount(self):
        return self.LongExchOffsetAmount
    def getShortExchOffsetAmount(self):
        return self.ShortExchOffsetAmount
    def getHedgeFlag(self):
        return HedgeFlagType(ord(self.HedgeFlag))

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'ProductGroupID = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', TradingDay = \'{3}\', SettlementID = {4}, FrozenMargin = {5}, LongFrozenMargin = {6}, ShortFrozenMargin = {7}, UseMargin = {8}, LongUseMargin = {9}, ShortUseMargin = {10}, ExchMargin = {11}, LongExchMargin = {12}, ShortExchMargin = {13}, CloseProfit = {14}, FrozenCommission = {15}, Commission = {16}, FrozenCash = {17}, CashIn = {18}, PositionProfit = {19}, OffsetAmount = {20}, LongOffsetAmount = {21}, ShortOffsetAmount = {22}, ExchOffsetAmount = {23}, LongExchOffsetAmount = {24}, ShortExchOffsetAmount = {25}, HedgeFlag = HedgeFlagType.{26}, ExchangeID = \'{27}\', InvestUnitID = \'{28}\''.format(str(self.ProductGroupID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.TradingDay, 'GB2312'), self.SettlementID, self.FrozenMargin, self.LongFrozenMargin, self.ShortFrozenMargin, self.UseMargin, self.LongUseMargin, self.ShortUseMargin, self.ExchMargin, self.LongExchMargin, self.ShortExchMargin, self.CloseProfit, self.FrozenCommission, self.Commission, self.FrozenCash, self.CashIn, self.PositionProfit, self.OffsetAmount, self.LongOffsetAmount, self.ShortOffsetAmount, self.ExchOffsetAmount, self.LongExchOffsetAmount, self.ShortExchOffsetAmount, '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name, str(self.ExchangeID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ProductGroupID': str(self.ProductGroupID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'SettlementID': self.SettlementID,'FrozenMargin': self.FrozenMargin,'LongFrozenMargin': self.LongFrozenMargin,'ShortFrozenMargin': self.ShortFrozenMargin,'UseMargin': self.UseMargin,'LongUseMargin': self.LongUseMargin,'ShortUseMargin': self.ShortUseMargin,'ExchMargin': self.ExchMargin,'LongExchMargin': self.LongExchMargin,'ShortExchMargin': self.ShortExchMargin,'CloseProfit': self.CloseProfit,'FrozenCommission': self.FrozenCommission,'Commission': self.Commission,'FrozenCash': self.FrozenCash,'CashIn': self.CashIn,'PositionProfit': self.PositionProfit,'OffsetAmount': self.OffsetAmount,'LongOffsetAmount': self.LongOffsetAmount,'ShortOffsetAmount': self.ShortOffsetAmount,'ExchOffsetAmount': self.ExchOffsetAmount,'LongExchOffsetAmount': self.LongExchOffsetAmount,'ShortExchOffsetAmount': self.ShortExchOffsetAmount,'HedgeFlag': '' if ord(self.HedgeFlag) == 0 else HedgeFlagType(ord(self.HedgeFlag)).name,'ExchangeID': str(self.ExchangeID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcInvestorProductGroupMarginField()
        obj.ProductGroupID=self.ProductGroupID
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.TradingDay=self.TradingDay
        obj.SettlementID=self.SettlementID
        obj.FrozenMargin=self.FrozenMargin
        obj.LongFrozenMargin=self.LongFrozenMargin
        obj.ShortFrozenMargin=self.ShortFrozenMargin
        obj.UseMargin=self.UseMargin
        obj.LongUseMargin=self.LongUseMargin
        obj.ShortUseMargin=self.ShortUseMargin
        obj.ExchMargin=self.ExchMargin
        obj.LongExchMargin=self.LongExchMargin
        obj.ShortExchMargin=self.ShortExchMargin
        obj.CloseProfit=self.CloseProfit
        obj.FrozenCommission=self.FrozenCommission
        obj.Commission=self.Commission
        obj.FrozenCash=self.FrozenCash
        obj.CashIn=self.CashIn
        obj.PositionProfit=self.PositionProfit
        obj.OffsetAmount=self.OffsetAmount
        obj.LongOffsetAmount=self.LongOffsetAmount
        obj.ShortOffsetAmount=self.ShortOffsetAmount
        obj.ExchOffsetAmount=self.ExchOffsetAmount
        obj.LongExchOffsetAmount=self.LongExchOffsetAmount
        obj.ShortExchOffsetAmount=self.ShortExchOffsetAmount
        obj.HedgeFlag=self.HedgeFlag
        obj.ExchangeID=self.ExchangeID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcQueryCFMMCTradingAccountTokenField(Structure):
    """查询监控中心用户令牌"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 投资单元代码
        ("InvestUnitID", c_char*17),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def getInvestUnitID(self):
        return str(self.InvestUnitID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\', InvestUnitID = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), str(self.InvestUnitID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'InvestUnitID': str(self.InvestUnitID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQueryCFMMCTradingAccountTokenField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.InvestUnitID=self.InvestUnitID
        return obj

class CThostFtdcCFMMCTradingAccountTokenField(Structure):
    """监控中心用户令牌"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 经纪公司统一编码
        ("ParticipantID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 密钥编号
        ("KeyID", c_int32),
        # 动态令牌
        ("Token", c_char*21),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getParticipantID(self):
        return str(self.ParticipantID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')
    def getKeyID(self):
        return self.KeyID

    def getToken(self):
        return str(self.Token, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', ParticipantID = \'{1}\', AccountID = \'{2}\', KeyID = {3}, Token = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.ParticipantID, 'GB2312'), str(self.AccountID, 'GB2312'), self.KeyID, str(self.Token, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'ParticipantID': str(self.ParticipantID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'KeyID': self.KeyID,'Token': str(self.Token, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCFMMCTradingAccountTokenField()
        obj.BrokerID=self.BrokerID
        obj.ParticipantID=self.ParticipantID
        obj.AccountID=self.AccountID
        obj.KeyID=self.KeyID
        obj.Token=self.Token
        return obj

class CThostFtdcQryProductGroupField(Structure):
    """查询产品组"""
    _fields_ = [
        # 产品代码
        ("ProductID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        ]


    def getProductID(self):
        return str(self.ProductID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def __str__(self):
        return 'ProductID = \'{0}\', ExchangeID = \'{1}\''.format(str(self.ProductID, 'GB2312'), str(self.ExchangeID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ProductID': str(self.ProductID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryProductGroupField()
        obj.ProductID=self.ProductID
        obj.ExchangeID=self.ExchangeID
        return obj

class CThostFtdcProductGroupField(Structure):
    """投资者品种/跨品种保证金产品组"""
    _fields_ = [
        # 产品代码
        ("ProductID", c_char*31),
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 产品组代码
        ("ProductGroupID", c_char*31),
        ]


    def getProductID(self):
        return str(self.ProductID, 'GB2312')

    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getProductGroupID(self):
        return str(self.ProductGroupID, 'GB2312')

    def __str__(self):
        return 'ProductID = \'{0}\', ExchangeID = \'{1}\', ProductGroupID = \'{2}\''.format(str(self.ProductID, 'GB2312'), str(self.ExchangeID, 'GB2312'), str(self.ProductGroupID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ProductID': str(self.ProductID, 'GB2312'),'ExchangeID': str(self.ExchangeID, 'GB2312'),'ProductGroupID': str(self.ProductGroupID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcProductGroupField()
        obj.ProductID=self.ProductID
        obj.ExchangeID=self.ExchangeID
        obj.ProductGroupID=self.ProductGroupID
        return obj

class CThostFtdcBulletinField(Structure):
    """交易所公告"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 交易日
        ("TradingDay", c_char*9),
        # 公告编号
        ("BulletinID", c_int32),
        # 序列号
        ("SequenceNo", c_int32),
        # 公告类型
        ("NewsType", c_char*3),
        # 紧急程度
        ("NewsUrgency", c_char),
        # 发送时间
        ("SendTime", c_char*9),
        # 消息摘要
        ("Abstract", c_char*81),
        # 消息来源
        ("ComeFrom", c_char*21),
        # 消息正文
        ("Content", c_char*501),
        # WEB地址
        ("URLLink", c_char*201),
        # 市场代码
        ("MarketID", c_char*31),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getBulletinID(self):
        return self.BulletinID
    def getSequenceNo(self):
        return self.SequenceNo

    def getNewsType(self):
        return str(self.NewsType, 'GB2312')
    def getNewsUrgency(self):
        return NewsUrgencyType(ord(self.NewsUrgency))

    def getSendTime(self):
        return str(self.SendTime, 'GB2312')

    def getAbstract(self):
        return str(self.Abstract, 'GB2312')

    def getComeFrom(self):
        return str(self.ComeFrom, 'GB2312')

    def getContent(self):
        return str(self.Content, 'GB2312')

    def getURLLink(self):
        return str(self.URLLink, 'GB2312')

    def getMarketID(self):
        return str(self.MarketID, 'GB2312')

    def __str__(self):
        return 'ExchangeID = \'{0}\', TradingDay = \'{1}\', BulletinID = {2}, SequenceNo = {3}, NewsType = \'{4}\', NewsUrgency = NewsUrgencyType.{5}, SendTime = \'{6}\', Abstract = \'{7}\', ComeFrom = \'{8}\', Content = \'{9}\', URLLink = \'{10}\', MarketID = \'{11}\''.format(str(self.ExchangeID, 'GB2312'), str(self.TradingDay, 'GB2312'), self.BulletinID, self.SequenceNo, str(self.NewsType, 'GB2312'), '' if ord(self.NewsUrgency) == 0 else NewsUrgencyType(ord(self.NewsUrgency)).name, str(self.SendTime, 'GB2312'), str(self.Abstract, 'GB2312'), str(self.ComeFrom, 'GB2312'), str(self.Content, 'GB2312'), str(self.URLLink, 'GB2312'), str(self.MarketID, 'GB2312'))

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'BulletinID': self.BulletinID,'SequenceNo': self.SequenceNo,'NewsType': str(self.NewsType, 'GB2312'),'NewsUrgency': '' if ord(self.NewsUrgency) == 0 else NewsUrgencyType(ord(self.NewsUrgency)).name,'SendTime': str(self.SendTime, 'GB2312'),'Abstract': str(self.Abstract, 'GB2312'),'ComeFrom': str(self.ComeFrom, 'GB2312'),'Content': str(self.Content, 'GB2312'),'URLLink': str(self.URLLink, 'GB2312'),'MarketID': str(self.MarketID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcBulletinField()
        obj.ExchangeID=self.ExchangeID
        obj.TradingDay=self.TradingDay
        obj.BulletinID=self.BulletinID
        obj.SequenceNo=self.SequenceNo
        obj.NewsType=self.NewsType
        obj.NewsUrgency=self.NewsUrgency
        obj.SendTime=self.SendTime
        obj.Abstract=self.Abstract
        obj.ComeFrom=self.ComeFrom
        obj.Content=self.Content
        obj.URLLink=self.URLLink
        obj.MarketID=self.MarketID
        return obj

class CThostFtdcQryBulletinField(Structure):
    """查询交易所公告"""
    _fields_ = [
        # 交易所代码
        ("ExchangeID", c_char*9),
        # 公告编号
        ("BulletinID", c_int32),
        # 序列号
        ("SequenceNo", c_int32),
        # 公告类型
        ("NewsType", c_char*3),
        # 紧急程度
        ("NewsUrgency", c_char),
        ]


    def getExchangeID(self):
        return str(self.ExchangeID, 'GB2312')
    def getBulletinID(self):
        return self.BulletinID
    def getSequenceNo(self):
        return self.SequenceNo

    def getNewsType(self):
        return str(self.NewsType, 'GB2312')
    def getNewsUrgency(self):
        return NewsUrgencyType(ord(self.NewsUrgency))

    def __str__(self):
        return 'ExchangeID = \'{0}\', BulletinID = {1}, SequenceNo = {2}, NewsType = \'{3}\', NewsUrgency = NewsUrgencyType.{4}'.format(str(self.ExchangeID, 'GB2312'), self.BulletinID, self.SequenceNo, str(self.NewsType, 'GB2312'), '' if ord(self.NewsUrgency) == 0 else NewsUrgencyType(ord(self.NewsUrgency)).name)

    @property
    def __dict__(self):
        return {'ExchangeID': str(self.ExchangeID, 'GB2312'),'BulletinID': self.BulletinID,'SequenceNo': self.SequenceNo,'NewsType': str(self.NewsType, 'GB2312'),'NewsUrgency': '' if ord(self.NewsUrgency) == 0 else NewsUrgencyType(ord(self.NewsUrgency)).name}

    def clone(self):
        obj=CThostFtdcQryBulletinField()
        obj.ExchangeID=self.ExchangeID
        obj.BulletinID=self.BulletinID
        obj.SequenceNo=self.SequenceNo
        obj.NewsType=self.NewsType
        obj.NewsUrgency=self.NewsUrgency
        return obj

class CThostFtdcReqOpenAccountField(Structure):
    """转帐开户请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 汇钞标志
        ("CashExchangeCode", c_char),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 交易ID
        ("TID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getCashExchangeCode(self):
        return CashExchangeCodeType(ord(self.CashExchangeCode))

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getTID(self):
        return self.TID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', AccountID = \'{27}\', Password = \'{28}\', InstallID = {29}, VerifyCertNoFlag = YesNoIndicatorType.{30}, CurrencyID = \'{31}\', CashExchangeCode = CashExchangeCodeType.{32}, Digest = \'{33}\', BankAccType = BankAccTypeType.{34}, DeviceID = \'{35}\', BankSecuAccType = BankAccTypeType.{36}, BrokerIDByBank = \'{37}\', BankSecuAcc = \'{38}\', BankPwdFlag = PwdFlagType.{39}, SecuPwdFlag = PwdFlagType.{40}, OperNo = \'{41}\', TID = {42}, UserID = \'{43}\', LongCustomerName = \'{44}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name, str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.TID, str(self.UserID, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'CashExchangeCode': '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name,'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'TID': self.TID,'UserID': str(self.UserID, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqOpenAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.CashExchangeCode=self.CashExchangeCode
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.TID=self.TID
        obj.UserID=self.UserID
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcReqCancelAccountField(Structure):
    """转帐销户请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 汇钞标志
        ("CashExchangeCode", c_char),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 交易ID
        ("TID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getCashExchangeCode(self):
        return CashExchangeCodeType(ord(self.CashExchangeCode))

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getTID(self):
        return self.TID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', AccountID = \'{27}\', Password = \'{28}\', InstallID = {29}, VerifyCertNoFlag = YesNoIndicatorType.{30}, CurrencyID = \'{31}\', CashExchangeCode = CashExchangeCodeType.{32}, Digest = \'{33}\', BankAccType = BankAccTypeType.{34}, DeviceID = \'{35}\', BankSecuAccType = BankAccTypeType.{36}, BrokerIDByBank = \'{37}\', BankSecuAcc = \'{38}\', BankPwdFlag = PwdFlagType.{39}, SecuPwdFlag = PwdFlagType.{40}, OperNo = \'{41}\', TID = {42}, UserID = \'{43}\', LongCustomerName = \'{44}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name, str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.TID, str(self.UserID, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'CashExchangeCode': '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name,'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'TID': self.TID,'UserID': str(self.UserID, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqCancelAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.CashExchangeCode=self.CashExchangeCode
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.TID=self.TID
        obj.UserID=self.UserID
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcReqChangeAccountField(Structure):
    """变更银行账户请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 新银行帐号
        ("NewBankAccount", c_char*41),
        # 新银行密码
        ("NewBankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易ID
        ("TID", c_int32),
        # 摘要
        ("Digest", c_char*36),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getNewBankAccount(self):
        return str(self.NewBankAccount, 'GB2312')

    def getNewBankPassWord(self):
        return str(self.NewBankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))
    def getTID(self):
        return self.TID

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', NewBankAccount = \'{27}\', NewBankPassWord = \'{28}\', AccountID = \'{29}\', Password = \'{30}\', BankAccType = BankAccTypeType.{31}, InstallID = {32}, VerifyCertNoFlag = YesNoIndicatorType.{33}, CurrencyID = \'{34}\', BrokerIDByBank = \'{35}\', BankPwdFlag = PwdFlagType.{36}, SecuPwdFlag = PwdFlagType.{37}, TID = {38}, Digest = \'{39}\', LongCustomerName = \'{40}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.NewBankAccount, 'GB2312'), str(self.NewBankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, self.TID, str(self.Digest, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'NewBankAccount': str(self.NewBankAccount, 'GB2312'),'NewBankPassWord': str(self.NewBankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'TID': self.TID,'Digest': str(self.Digest, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqChangeAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.NewBankAccount=self.NewBankAccount
        obj.NewBankPassWord=self.NewBankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.BankAccType=self.BankAccType
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.TID=self.TID
        obj.Digest=self.Digest
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcReqTransferField(Structure):
    """转账请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 转帐金额
        ("TradeAmount", c_double),
        # 期货可取金额
        ("FutureFetchAmount", c_double),
        # 费用支付标志
        ("FeePayFlag", c_char),
        # 应收客户费用
        ("CustFee", c_double),
        # 应收期货公司费用
        ("BrokerFee", c_double),
        # 发送方给接收方的消息
        ("Message", c_char*129),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 转账交易状态
        ("TransferStatus", c_char),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getFutureSerial(self):
        return self.FutureSerial

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getTradeAmount(self):
        return self.TradeAmount
    def getFutureFetchAmount(self):
        return self.FutureFetchAmount
    def getFeePayFlag(self):
        return FeePayFlagType(ord(self.FeePayFlag))
    def getCustFee(self):
        return self.CustFee
    def getBrokerFee(self):
        return self.BrokerFee

    def getMessage(self):
        return str(self.Message, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getTransferStatus(self):
        return TransferStatusType(ord(self.TransferStatus))

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', CustType = CustTypeType.{15}, BankAccount = \'{16}\', BankPassWord = \'{17}\', AccountID = \'{18}\', Password = \'{19}\', InstallID = {20}, FutureSerial = {21}, UserID = \'{22}\', VerifyCertNoFlag = YesNoIndicatorType.{23}, CurrencyID = \'{24}\', TradeAmount = {25}, FutureFetchAmount = {26}, FeePayFlag = FeePayFlagType.{27}, CustFee = {28}, BrokerFee = {29}, Message = \'{30}\', Digest = \'{31}\', BankAccType = BankAccTypeType.{32}, DeviceID = \'{33}\', BankSecuAccType = BankAccTypeType.{34}, BrokerIDByBank = \'{35}\', BankSecuAcc = \'{36}\', BankPwdFlag = PwdFlagType.{37}, SecuPwdFlag = PwdFlagType.{38}, OperNo = \'{39}\', RequestID = {40}, TID = {41}, TransferStatus = TransferStatusType.{42}, LongCustomerName = \'{43}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, self.FutureSerial, str(self.UserID, 'GB2312'), '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), self.TradeAmount, self.FutureFetchAmount, '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name, self.CustFee, self.BrokerFee, str(self.Message, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.RequestID, self.TID, '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name, str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'FutureSerial': self.FutureSerial,'UserID': str(self.UserID, 'GB2312'),'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'TradeAmount': self.TradeAmount,'FutureFetchAmount': self.FutureFetchAmount,'FeePayFlag': '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name,'CustFee': self.CustFee,'BrokerFee': self.BrokerFee,'Message': str(self.Message, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'TransferStatus': '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name,'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqTransferField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.FutureSerial=self.FutureSerial
        obj.UserID=self.UserID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.TradeAmount=self.TradeAmount
        obj.FutureFetchAmount=self.FutureFetchAmount
        obj.FeePayFlag=self.FeePayFlag
        obj.CustFee=self.CustFee
        obj.BrokerFee=self.BrokerFee
        obj.Message=self.Message
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.TransferStatus=self.TransferStatus
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcRspTransferField(Structure):
    """银行发起银行资金转期货响应"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 转帐金额
        ("TradeAmount", c_double),
        # 期货可取金额
        ("FutureFetchAmount", c_double),
        # 费用支付标志
        ("FeePayFlag", c_char),
        # 应收客户费用
        ("CustFee", c_double),
        # 应收期货公司费用
        ("BrokerFee", c_double),
        # 发送方给接收方的消息
        ("Message", c_char*129),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 转账交易状态
        ("TransferStatus", c_char),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getFutureSerial(self):
        return self.FutureSerial

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getTradeAmount(self):
        return self.TradeAmount
    def getFutureFetchAmount(self):
        return self.FutureFetchAmount
    def getFeePayFlag(self):
        return FeePayFlagType(ord(self.FeePayFlag))
    def getCustFee(self):
        return self.CustFee
    def getBrokerFee(self):
        return self.BrokerFee

    def getMessage(self):
        return str(self.Message, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getTransferStatus(self):
        return TransferStatusType(ord(self.TransferStatus))
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', CustType = CustTypeType.{15}, BankAccount = \'{16}\', BankPassWord = \'{17}\', AccountID = \'{18}\', Password = \'{19}\', InstallID = {20}, FutureSerial = {21}, UserID = \'{22}\', VerifyCertNoFlag = YesNoIndicatorType.{23}, CurrencyID = \'{24}\', TradeAmount = {25}, FutureFetchAmount = {26}, FeePayFlag = FeePayFlagType.{27}, CustFee = {28}, BrokerFee = {29}, Message = \'{30}\', Digest = \'{31}\', BankAccType = BankAccTypeType.{32}, DeviceID = \'{33}\', BankSecuAccType = BankAccTypeType.{34}, BrokerIDByBank = \'{35}\', BankSecuAcc = \'{36}\', BankPwdFlag = PwdFlagType.{37}, SecuPwdFlag = PwdFlagType.{38}, OperNo = \'{39}\', RequestID = {40}, TID = {41}, TransferStatus = TransferStatusType.{42}, ErrorID = {43}, ErrorMsg = \'{44}\', LongCustomerName = \'{45}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, self.FutureSerial, str(self.UserID, 'GB2312'), '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), self.TradeAmount, self.FutureFetchAmount, '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name, self.CustFee, self.BrokerFee, str(self.Message, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.RequestID, self.TID, '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name, self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'FutureSerial': self.FutureSerial,'UserID': str(self.UserID, 'GB2312'),'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'TradeAmount': self.TradeAmount,'FutureFetchAmount': self.FutureFetchAmount,'FeePayFlag': '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name,'CustFee': self.CustFee,'BrokerFee': self.BrokerFee,'Message': str(self.Message, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'TransferStatus': '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspTransferField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.FutureSerial=self.FutureSerial
        obj.UserID=self.UserID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.TradeAmount=self.TradeAmount
        obj.FutureFetchAmount=self.FutureFetchAmount
        obj.FeePayFlag=self.FeePayFlag
        obj.CustFee=self.CustFee
        obj.BrokerFee=self.BrokerFee
        obj.Message=self.Message
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.TransferStatus=self.TransferStatus
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcReqRepealField(Structure):
    """冲正请求"""
    _fields_ = [
        # 冲正时间间隔
        ("RepealTimeInterval", c_int32),
        # 已经冲正次数
        ("RepealedTimes", c_int32),
        # 银行冲正标志
        ("BankRepealFlag", c_char),
        # 期商冲正标志
        ("BrokerRepealFlag", c_char),
        # 被冲正平台流水号
        ("PlateRepealSerial", c_int32),
        # 被冲正银行流水号
        ("BankRepealSerial", c_char*13),
        # 被冲正期货流水号
        ("FutureRepealSerial", c_int32),
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 转帐金额
        ("TradeAmount", c_double),
        # 期货可取金额
        ("FutureFetchAmount", c_double),
        # 费用支付标志
        ("FeePayFlag", c_char),
        # 应收客户费用
        ("CustFee", c_double),
        # 应收期货公司费用
        ("BrokerFee", c_double),
        # 发送方给接收方的消息
        ("Message", c_char*129),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 转账交易状态
        ("TransferStatus", c_char),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]

    def getRepealTimeInterval(self):
        return self.RepealTimeInterval
    def getRepealedTimes(self):
        return self.RepealedTimes
    def getBankRepealFlag(self):
        return BankRepealFlagType(ord(self.BankRepealFlag))
    def getBrokerRepealFlag(self):
        return BrokerRepealFlagType(ord(self.BrokerRepealFlag))
    def getPlateRepealSerial(self):
        return self.PlateRepealSerial

    def getBankRepealSerial(self):
        return str(self.BankRepealSerial, 'GB2312')
    def getFutureRepealSerial(self):
        return self.FutureRepealSerial

    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getFutureSerial(self):
        return self.FutureSerial

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getTradeAmount(self):
        return self.TradeAmount
    def getFutureFetchAmount(self):
        return self.FutureFetchAmount
    def getFeePayFlag(self):
        return FeePayFlagType(ord(self.FeePayFlag))
    def getCustFee(self):
        return self.CustFee
    def getBrokerFee(self):
        return self.BrokerFee

    def getMessage(self):
        return str(self.Message, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getTransferStatus(self):
        return TransferStatusType(ord(self.TransferStatus))

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'RepealTimeInterval = {0}, RepealedTimes = {1}, BankRepealFlag = BankRepealFlagType.{2}, BrokerRepealFlag = BrokerRepealFlagType.{3}, PlateRepealSerial = {4}, BankRepealSerial = \'{5}\', FutureRepealSerial = {6}, TradeCode = \'{7}\', BankID = \'{8}\', BankBranchID = \'{9}\', BrokerID = \'{10}\', BrokerBranchID = \'{11}\', TradeDate = \'{12}\', TradeTime = \'{13}\', BankSerial = \'{14}\', TradingDay = \'{15}\', PlateSerial = {16}, LastFragment = LastFragmentType.{17}, SessionID = {18}, CustomerName = \'{19}\', IdCardType = IdCardTypeType.{20}, IdentifiedCardNo = \'{21}\', CustType = CustTypeType.{22}, BankAccount = \'{23}\', BankPassWord = \'{24}\', AccountID = \'{25}\', Password = \'{26}\', InstallID = {27}, FutureSerial = {28}, UserID = \'{29}\', VerifyCertNoFlag = YesNoIndicatorType.{30}, CurrencyID = \'{31}\', TradeAmount = {32}, FutureFetchAmount = {33}, FeePayFlag = FeePayFlagType.{34}, CustFee = {35}, BrokerFee = {36}, Message = \'{37}\', Digest = \'{38}\', BankAccType = BankAccTypeType.{39}, DeviceID = \'{40}\', BankSecuAccType = BankAccTypeType.{41}, BrokerIDByBank = \'{42}\', BankSecuAcc = \'{43}\', BankPwdFlag = PwdFlagType.{44}, SecuPwdFlag = PwdFlagType.{45}, OperNo = \'{46}\', RequestID = {47}, TID = {48}, TransferStatus = TransferStatusType.{49}, LongCustomerName = \'{50}\''.format(self.RepealTimeInterval, self.RepealedTimes, '' if ord(self.BankRepealFlag) == 0 else BankRepealFlagType(ord(self.BankRepealFlag)).name, '' if ord(self.BrokerRepealFlag) == 0 else BrokerRepealFlagType(ord(self.BrokerRepealFlag)).name, self.PlateRepealSerial, str(self.BankRepealSerial, 'GB2312'), self.FutureRepealSerial, str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, self.FutureSerial, str(self.UserID, 'GB2312'), '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), self.TradeAmount, self.FutureFetchAmount, '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name, self.CustFee, self.BrokerFee, str(self.Message, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.RequestID, self.TID, '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name, str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'RepealTimeInterval': self.RepealTimeInterval,'RepealedTimes': self.RepealedTimes,'BankRepealFlag': '' if ord(self.BankRepealFlag) == 0 else BankRepealFlagType(ord(self.BankRepealFlag)).name,'BrokerRepealFlag': '' if ord(self.BrokerRepealFlag) == 0 else BrokerRepealFlagType(ord(self.BrokerRepealFlag)).name,'PlateRepealSerial': self.PlateRepealSerial,'BankRepealSerial': str(self.BankRepealSerial, 'GB2312'),'FutureRepealSerial': self.FutureRepealSerial,'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'FutureSerial': self.FutureSerial,'UserID': str(self.UserID, 'GB2312'),'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'TradeAmount': self.TradeAmount,'FutureFetchAmount': self.FutureFetchAmount,'FeePayFlag': '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name,'CustFee': self.CustFee,'BrokerFee': self.BrokerFee,'Message': str(self.Message, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'TransferStatus': '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name,'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqRepealField()
        obj.RepealTimeInterval=self.RepealTimeInterval
        obj.RepealedTimes=self.RepealedTimes
        obj.BankRepealFlag=self.BankRepealFlag
        obj.BrokerRepealFlag=self.BrokerRepealFlag
        obj.PlateRepealSerial=self.PlateRepealSerial
        obj.BankRepealSerial=self.BankRepealSerial
        obj.FutureRepealSerial=self.FutureRepealSerial
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.FutureSerial=self.FutureSerial
        obj.UserID=self.UserID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.TradeAmount=self.TradeAmount
        obj.FutureFetchAmount=self.FutureFetchAmount
        obj.FeePayFlag=self.FeePayFlag
        obj.CustFee=self.CustFee
        obj.BrokerFee=self.BrokerFee
        obj.Message=self.Message
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.TransferStatus=self.TransferStatus
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcRspRepealField(Structure):
    """冲正响应"""
    _fields_ = [
        # 冲正时间间隔
        ("RepealTimeInterval", c_int32),
        # 已经冲正次数
        ("RepealedTimes", c_int32),
        # 银行冲正标志
        ("BankRepealFlag", c_char),
        # 期商冲正标志
        ("BrokerRepealFlag", c_char),
        # 被冲正平台流水号
        ("PlateRepealSerial", c_int32),
        # 被冲正银行流水号
        ("BankRepealSerial", c_char*13),
        # 被冲正期货流水号
        ("FutureRepealSerial", c_int32),
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 转帐金额
        ("TradeAmount", c_double),
        # 期货可取金额
        ("FutureFetchAmount", c_double),
        # 费用支付标志
        ("FeePayFlag", c_char),
        # 应收客户费用
        ("CustFee", c_double),
        # 应收期货公司费用
        ("BrokerFee", c_double),
        # 发送方给接收方的消息
        ("Message", c_char*129),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 转账交易状态
        ("TransferStatus", c_char),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]

    def getRepealTimeInterval(self):
        return self.RepealTimeInterval
    def getRepealedTimes(self):
        return self.RepealedTimes
    def getBankRepealFlag(self):
        return BankRepealFlagType(ord(self.BankRepealFlag))
    def getBrokerRepealFlag(self):
        return BrokerRepealFlagType(ord(self.BrokerRepealFlag))
    def getPlateRepealSerial(self):
        return self.PlateRepealSerial

    def getBankRepealSerial(self):
        return str(self.BankRepealSerial, 'GB2312')
    def getFutureRepealSerial(self):
        return self.FutureRepealSerial

    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getFutureSerial(self):
        return self.FutureSerial

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getTradeAmount(self):
        return self.TradeAmount
    def getFutureFetchAmount(self):
        return self.FutureFetchAmount
    def getFeePayFlag(self):
        return FeePayFlagType(ord(self.FeePayFlag))
    def getCustFee(self):
        return self.CustFee
    def getBrokerFee(self):
        return self.BrokerFee

    def getMessage(self):
        return str(self.Message, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getTransferStatus(self):
        return TransferStatusType(ord(self.TransferStatus))
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'RepealTimeInterval = {0}, RepealedTimes = {1}, BankRepealFlag = BankRepealFlagType.{2}, BrokerRepealFlag = BrokerRepealFlagType.{3}, PlateRepealSerial = {4}, BankRepealSerial = \'{5}\', FutureRepealSerial = {6}, TradeCode = \'{7}\', BankID = \'{8}\', BankBranchID = \'{9}\', BrokerID = \'{10}\', BrokerBranchID = \'{11}\', TradeDate = \'{12}\', TradeTime = \'{13}\', BankSerial = \'{14}\', TradingDay = \'{15}\', PlateSerial = {16}, LastFragment = LastFragmentType.{17}, SessionID = {18}, CustomerName = \'{19}\', IdCardType = IdCardTypeType.{20}, IdentifiedCardNo = \'{21}\', CustType = CustTypeType.{22}, BankAccount = \'{23}\', BankPassWord = \'{24}\', AccountID = \'{25}\', Password = \'{26}\', InstallID = {27}, FutureSerial = {28}, UserID = \'{29}\', VerifyCertNoFlag = YesNoIndicatorType.{30}, CurrencyID = \'{31}\', TradeAmount = {32}, FutureFetchAmount = {33}, FeePayFlag = FeePayFlagType.{34}, CustFee = {35}, BrokerFee = {36}, Message = \'{37}\', Digest = \'{38}\', BankAccType = BankAccTypeType.{39}, DeviceID = \'{40}\', BankSecuAccType = BankAccTypeType.{41}, BrokerIDByBank = \'{42}\', BankSecuAcc = \'{43}\', BankPwdFlag = PwdFlagType.{44}, SecuPwdFlag = PwdFlagType.{45}, OperNo = \'{46}\', RequestID = {47}, TID = {48}, TransferStatus = TransferStatusType.{49}, ErrorID = {50}, ErrorMsg = \'{51}\', LongCustomerName = \'{52}\''.format(self.RepealTimeInterval, self.RepealedTimes, '' if ord(self.BankRepealFlag) == 0 else BankRepealFlagType(ord(self.BankRepealFlag)).name, '' if ord(self.BrokerRepealFlag) == 0 else BrokerRepealFlagType(ord(self.BrokerRepealFlag)).name, self.PlateRepealSerial, str(self.BankRepealSerial, 'GB2312'), self.FutureRepealSerial, str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, self.FutureSerial, str(self.UserID, 'GB2312'), '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), self.TradeAmount, self.FutureFetchAmount, '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name, self.CustFee, self.BrokerFee, str(self.Message, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.RequestID, self.TID, '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name, self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'RepealTimeInterval': self.RepealTimeInterval,'RepealedTimes': self.RepealedTimes,'BankRepealFlag': '' if ord(self.BankRepealFlag) == 0 else BankRepealFlagType(ord(self.BankRepealFlag)).name,'BrokerRepealFlag': '' if ord(self.BrokerRepealFlag) == 0 else BrokerRepealFlagType(ord(self.BrokerRepealFlag)).name,'PlateRepealSerial': self.PlateRepealSerial,'BankRepealSerial': str(self.BankRepealSerial, 'GB2312'),'FutureRepealSerial': self.FutureRepealSerial,'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'FutureSerial': self.FutureSerial,'UserID': str(self.UserID, 'GB2312'),'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'TradeAmount': self.TradeAmount,'FutureFetchAmount': self.FutureFetchAmount,'FeePayFlag': '' if ord(self.FeePayFlag) == 0 else FeePayFlagType(ord(self.FeePayFlag)).name,'CustFee': self.CustFee,'BrokerFee': self.BrokerFee,'Message': str(self.Message, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'TransferStatus': '' if ord(self.TransferStatus) == 0 else TransferStatusType(ord(self.TransferStatus)).name,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspRepealField()
        obj.RepealTimeInterval=self.RepealTimeInterval
        obj.RepealedTimes=self.RepealedTimes
        obj.BankRepealFlag=self.BankRepealFlag
        obj.BrokerRepealFlag=self.BrokerRepealFlag
        obj.PlateRepealSerial=self.PlateRepealSerial
        obj.BankRepealSerial=self.BankRepealSerial
        obj.FutureRepealSerial=self.FutureRepealSerial
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.FutureSerial=self.FutureSerial
        obj.UserID=self.UserID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.TradeAmount=self.TradeAmount
        obj.FutureFetchAmount=self.FutureFetchAmount
        obj.FeePayFlag=self.FeePayFlag
        obj.CustFee=self.CustFee
        obj.BrokerFee=self.BrokerFee
        obj.Message=self.Message
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.TransferStatus=self.TransferStatus
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcReqQueryAccountField(Structure):
    """查询账户信息请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getFutureSerial(self):
        return self.FutureSerial
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', CustType = CustTypeType.{15}, BankAccount = \'{16}\', BankPassWord = \'{17}\', AccountID = \'{18}\', Password = \'{19}\', FutureSerial = {20}, InstallID = {21}, UserID = \'{22}\', VerifyCertNoFlag = YesNoIndicatorType.{23}, CurrencyID = \'{24}\', Digest = \'{25}\', BankAccType = BankAccTypeType.{26}, DeviceID = \'{27}\', BankSecuAccType = BankAccTypeType.{28}, BrokerIDByBank = \'{29}\', BankSecuAcc = \'{30}\', BankPwdFlag = PwdFlagType.{31}, SecuPwdFlag = PwdFlagType.{32}, OperNo = \'{33}\', RequestID = {34}, TID = {35}, LongCustomerName = \'{36}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.FutureSerial, self.InstallID, str(self.UserID, 'GB2312'), '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.RequestID, self.TID, str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'FutureSerial': self.FutureSerial,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqQueryAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.FutureSerial=self.FutureSerial
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcRspQueryAccountField(Structure):
    """查询账户信息响应"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 银行可用金额
        ("BankUseAmount", c_double),
        # 银行可取金额
        ("BankFetchAmount", c_double),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getFutureSerial(self):
        return self.FutureSerial
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getBankUseAmount(self):
        return self.BankUseAmount
    def getBankFetchAmount(self):
        return self.BankFetchAmount

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', CustType = CustTypeType.{15}, BankAccount = \'{16}\', BankPassWord = \'{17}\', AccountID = \'{18}\', Password = \'{19}\', FutureSerial = {20}, InstallID = {21}, UserID = \'{22}\', VerifyCertNoFlag = YesNoIndicatorType.{23}, CurrencyID = \'{24}\', Digest = \'{25}\', BankAccType = BankAccTypeType.{26}, DeviceID = \'{27}\', BankSecuAccType = BankAccTypeType.{28}, BrokerIDByBank = \'{29}\', BankSecuAcc = \'{30}\', BankPwdFlag = PwdFlagType.{31}, SecuPwdFlag = PwdFlagType.{32}, OperNo = \'{33}\', RequestID = {34}, TID = {35}, BankUseAmount = {36}, BankFetchAmount = {37}, LongCustomerName = \'{38}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.FutureSerial, self.InstallID, str(self.UserID, 'GB2312'), '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.BankUseAmount, self.BankFetchAmount, str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'FutureSerial': self.FutureSerial,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'BankUseAmount': self.BankUseAmount,'BankFetchAmount': self.BankFetchAmount,'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspQueryAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.FutureSerial=self.FutureSerial
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.BankUseAmount=self.BankUseAmount
        obj.BankFetchAmount=self.BankFetchAmount
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcFutureSignIOField(Structure):
    """期商签到签退"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 摘要
        ("Digest", c_char*36),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Digest = \'{14}\', CurrencyID = \'{15}\', DeviceID = \'{16}\', BrokerIDByBank = \'{17}\', OperNo = \'{18}\', RequestID = {19}, TID = {20}'.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Digest, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID)

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID}

    def clone(self):
        obj=CThostFtdcFutureSignIOField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Digest=self.Digest
        obj.CurrencyID=self.CurrencyID
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        return obj

class CThostFtdcRspFutureSignInField(Structure):
    """期商签到响应"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 摘要
        ("Digest", c_char*36),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # PIN密钥
        ("PinKey", c_char*129),
        # MAC密钥
        ("MacKey", c_char*129),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getPinKey(self):
        return str(self.PinKey, 'GB2312')

    def getMacKey(self):
        return str(self.MacKey, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Digest = \'{14}\', CurrencyID = \'{15}\', DeviceID = \'{16}\', BrokerIDByBank = \'{17}\', OperNo = \'{18}\', RequestID = {19}, TID = {20}, ErrorID = {21}, ErrorMsg = \'{22}\', PinKey = \'{23}\', MacKey = \'{24}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Digest, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.PinKey, 'GB2312'), str(self.MacKey, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'PinKey': str(self.PinKey, 'GB2312'),'MacKey': str(self.MacKey, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspFutureSignInField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Digest=self.Digest
        obj.CurrencyID=self.CurrencyID
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.PinKey=self.PinKey
        obj.MacKey=self.MacKey
        return obj

class CThostFtdcReqFutureSignOutField(Structure):
    """期商签退请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 摘要
        ("Digest", c_char*36),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Digest = \'{14}\', CurrencyID = \'{15}\', DeviceID = \'{16}\', BrokerIDByBank = \'{17}\', OperNo = \'{18}\', RequestID = {19}, TID = {20}'.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Digest, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID)

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID}

    def clone(self):
        obj=CThostFtdcReqFutureSignOutField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Digest=self.Digest
        obj.CurrencyID=self.CurrencyID
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        return obj

class CThostFtdcRspFutureSignOutField(Structure):
    """期商签退响应"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 摘要
        ("Digest", c_char*36),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Digest = \'{14}\', CurrencyID = \'{15}\', DeviceID = \'{16}\', BrokerIDByBank = \'{17}\', OperNo = \'{18}\', RequestID = {19}, TID = {20}, ErrorID = {21}, ErrorMsg = \'{22}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Digest, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspFutureSignOutField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Digest=self.Digest
        obj.CurrencyID=self.CurrencyID
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcReqQueryTradeResultBySerialField(Structure):
    """查询指定流水号的交易结果请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 流水号
        ("Reference", c_int32),
        # 本流水号发布者的机构类型
        ("RefrenceIssureType", c_char),
        # 本流水号发布者机构编码
        ("RefrenceIssure", c_char*36),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 转帐金额
        ("TradeAmount", c_double),
        # 摘要
        ("Digest", c_char*36),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getReference(self):
        return self.Reference
    def getRefrenceIssureType(self):
        return InstitutionTypeType(ord(self.RefrenceIssureType))

    def getRefrenceIssure(self):
        return str(self.RefrenceIssure, 'GB2312')

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getTradeAmount(self):
        return self.TradeAmount

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, Reference = {12}, RefrenceIssureType = InstitutionTypeType.{13}, RefrenceIssure = \'{14}\', CustomerName = \'{15}\', IdCardType = IdCardTypeType.{16}, IdentifiedCardNo = \'{17}\', CustType = CustTypeType.{18}, BankAccount = \'{19}\', BankPassWord = \'{20}\', AccountID = \'{21}\', Password = \'{22}\', CurrencyID = \'{23}\', TradeAmount = {24}, Digest = \'{25}\', LongCustomerName = \'{26}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.Reference, '' if ord(self.RefrenceIssureType) == 0 else InstitutionTypeType(ord(self.RefrenceIssureType)).name, str(self.RefrenceIssure, 'GB2312'), str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), str(self.CurrencyID, 'GB2312'), self.TradeAmount, str(self.Digest, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'Reference': self.Reference,'RefrenceIssureType': '' if ord(self.RefrenceIssureType) == 0 else InstitutionTypeType(ord(self.RefrenceIssureType)).name,'RefrenceIssure': str(self.RefrenceIssure, 'GB2312'),'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'TradeAmount': self.TradeAmount,'Digest': str(self.Digest, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqQueryTradeResultBySerialField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.Reference=self.Reference
        obj.RefrenceIssureType=self.RefrenceIssureType
        obj.RefrenceIssure=self.RefrenceIssure
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.CurrencyID=self.CurrencyID
        obj.TradeAmount=self.TradeAmount
        obj.Digest=self.Digest
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcRspQueryTradeResultBySerialField(Structure):
    """查询指定流水号的交易结果响应"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 流水号
        ("Reference", c_int32),
        # 本流水号发布者的机构类型
        ("RefrenceIssureType", c_char),
        # 本流水号发布者机构编码
        ("RefrenceIssure", c_char*36),
        # 原始返回代码
        ("OriginReturnCode", c_char*7),
        # 原始返回码描述
        ("OriginDescrInfoForReturnCode", c_char*129),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 转帐金额
        ("TradeAmount", c_double),
        # 摘要
        ("Digest", c_char*36),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')
    def getReference(self):
        return self.Reference
    def getRefrenceIssureType(self):
        return InstitutionTypeType(ord(self.RefrenceIssureType))

    def getRefrenceIssure(self):
        return str(self.RefrenceIssure, 'GB2312')

    def getOriginReturnCode(self):
        return str(self.OriginReturnCode, 'GB2312')

    def getOriginDescrInfoForReturnCode(self):
        return str(self.OriginDescrInfoForReturnCode, 'GB2312')

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getTradeAmount(self):
        return self.TradeAmount

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, ErrorID = {12}, ErrorMsg = \'{13}\', Reference = {14}, RefrenceIssureType = InstitutionTypeType.{15}, RefrenceIssure = \'{16}\', OriginReturnCode = \'{17}\', OriginDescrInfoForReturnCode = \'{18}\', BankAccount = \'{19}\', BankPassWord = \'{20}\', AccountID = \'{21}\', Password = \'{22}\', CurrencyID = \'{23}\', TradeAmount = {24}, Digest = \'{25}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.ErrorID, str(self.ErrorMsg, 'GB2312'), self.Reference, '' if ord(self.RefrenceIssureType) == 0 else InstitutionTypeType(ord(self.RefrenceIssureType)).name, str(self.RefrenceIssure, 'GB2312'), str(self.OriginReturnCode, 'GB2312'), str(self.OriginDescrInfoForReturnCode, 'GB2312'), str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), str(self.CurrencyID, 'GB2312'), self.TradeAmount, str(self.Digest, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'Reference': self.Reference,'RefrenceIssureType': '' if ord(self.RefrenceIssureType) == 0 else InstitutionTypeType(ord(self.RefrenceIssureType)).name,'RefrenceIssure': str(self.RefrenceIssure, 'GB2312'),'OriginReturnCode': str(self.OriginReturnCode, 'GB2312'),'OriginDescrInfoForReturnCode': str(self.OriginDescrInfoForReturnCode, 'GB2312'),'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'TradeAmount': self.TradeAmount,'Digest': str(self.Digest, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspQueryTradeResultBySerialField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.Reference=self.Reference
        obj.RefrenceIssureType=self.RefrenceIssureType
        obj.RefrenceIssure=self.RefrenceIssure
        obj.OriginReturnCode=self.OriginReturnCode
        obj.OriginDescrInfoForReturnCode=self.OriginDescrInfoForReturnCode
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.CurrencyID=self.CurrencyID
        obj.TradeAmount=self.TradeAmount
        obj.Digest=self.Digest
        return obj

class CThostFtdcReqDayEndFileReadyField(Structure):
    """日终文件就绪请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 文件业务功能
        ("FileBusinessCode", c_char),
        # 摘要
        ("Digest", c_char*36),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getFileBusinessCode(self):
        return FileBusinessCodeType(ord(self.FileBusinessCode))

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, FileBusinessCode = FileBusinessCodeType.{12}, Digest = \'{13}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, '' if ord(self.FileBusinessCode) == 0 else FileBusinessCodeType(ord(self.FileBusinessCode)).name, str(self.Digest, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'FileBusinessCode': '' if ord(self.FileBusinessCode) == 0 else FileBusinessCodeType(ord(self.FileBusinessCode)).name,'Digest': str(self.Digest, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReqDayEndFileReadyField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.FileBusinessCode=self.FileBusinessCode
        obj.Digest=self.Digest
        return obj

class CThostFtdcReturnResultField(Structure):
    """返回结果"""
    _fields_ = [
        # 返回代码
        ("ReturnCode", c_char*7),
        # 返回码描述
        ("DescrInfoForReturnCode", c_char*129),
        ]


    def getReturnCode(self):
        return str(self.ReturnCode, 'GB2312')

    def getDescrInfoForReturnCode(self):
        return str(self.DescrInfoForReturnCode, 'GB2312')

    def __str__(self):
        return 'ReturnCode = \'{0}\', DescrInfoForReturnCode = \'{1}\''.format(str(self.ReturnCode, 'GB2312'), str(self.DescrInfoForReturnCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'ReturnCode': str(self.ReturnCode, 'GB2312'),'DescrInfoForReturnCode': str(self.DescrInfoForReturnCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReturnResultField()
        obj.ReturnCode=self.ReturnCode
        obj.DescrInfoForReturnCode=self.DescrInfoForReturnCode
        return obj

class CThostFtdcVerifyFuturePasswordField(Structure):
    """验证期货资金密码"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getTID(self):
        return self.TID

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, AccountID = \'{12}\', Password = \'{13}\', BankAccount = \'{14}\', BankPassWord = \'{15}\', InstallID = {16}, TID = {17}, CurrencyID = \'{18}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), self.InstallID, self.TID, str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'InstallID': self.InstallID,'TID': self.TID,'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcVerifyFuturePasswordField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.InstallID=self.InstallID
        obj.TID=self.TID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcVerifyCustInfoField(Structure):
    """验证客户信息"""
    _fields_ = [
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'CustomerName = \'{0}\', IdCardType = IdCardTypeType.{1}, IdentifiedCardNo = \'{2}\', CustType = CustTypeType.{3}, LongCustomerName = \'{4}\''.format(str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcVerifyCustInfoField()
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcVerifyFuturePasswordAndCustInfoField(Structure):
    """验证期货资金密码和客户信息"""
    _fields_ = [
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'CustomerName = \'{0}\', IdCardType = IdCardTypeType.{1}, IdentifiedCardNo = \'{2}\', CustType = CustTypeType.{3}, AccountID = \'{4}\', Password = \'{5}\', CurrencyID = \'{6}\', LongCustomerName = \'{7}\''.format(str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcVerifyFuturePasswordAndCustInfoField()
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.CurrencyID=self.CurrencyID
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcDepositResultInformField(Structure):
    """验证期货资金密码和客户信息"""
    _fields_ = [
        # 出入金流水号，该流水号为银期报盘返回的流水号
        ("DepositSeqNo", c_char*15),
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 入金金额
        ("Deposit", c_double),
        # 请求编号
        ("RequestID", c_int32),
        # 返回代码
        ("ReturnCode", c_char*7),
        # 返回码描述
        ("DescrInfoForReturnCode", c_char*129),
        ]


    def getDepositSeqNo(self):
        return str(self.DepositSeqNo, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getDeposit(self):
        return self.Deposit
    def getRequestID(self):
        return self.RequestID

    def getReturnCode(self):
        return str(self.ReturnCode, 'GB2312')

    def getDescrInfoForReturnCode(self):
        return str(self.DescrInfoForReturnCode, 'GB2312')

    def __str__(self):
        return 'DepositSeqNo = \'{0}\', BrokerID = \'{1}\', InvestorID = \'{2}\', Deposit = {3}, RequestID = {4}, ReturnCode = \'{5}\', DescrInfoForReturnCode = \'{6}\''.format(str(self.DepositSeqNo, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.Deposit, self.RequestID, str(self.ReturnCode, 'GB2312'), str(self.DescrInfoForReturnCode, 'GB2312'))

    @property
    def __dict__(self):
        return {'DepositSeqNo': str(self.DepositSeqNo, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'Deposit': self.Deposit,'RequestID': self.RequestID,'ReturnCode': str(self.ReturnCode, 'GB2312'),'DescrInfoForReturnCode': str(self.DescrInfoForReturnCode, 'GB2312')}

    def clone(self):
        obj=CThostFtdcDepositResultInformField()
        obj.DepositSeqNo=self.DepositSeqNo
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        obj.Deposit=self.Deposit
        obj.RequestID=self.RequestID
        obj.ReturnCode=self.ReturnCode
        obj.DescrInfoForReturnCode=self.DescrInfoForReturnCode
        return obj

class CThostFtdcReqSyncKeyField(Structure):
    """交易核心向银期报盘发出密钥同步请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 交易核心给银期报盘的消息
        ("Message", c_char*129),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getMessage(self):
        return str(self.Message, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Message = \'{14}\', DeviceID = \'{15}\', BrokerIDByBank = \'{16}\', OperNo = \'{17}\', RequestID = {18}, TID = {19}'.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Message, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID)

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Message': str(self.Message, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID}

    def clone(self):
        obj=CThostFtdcReqSyncKeyField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Message=self.Message
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        return obj

class CThostFtdcRspSyncKeyField(Structure):
    """交易核心向银期报盘发出密钥同步响应"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 交易核心给银期报盘的消息
        ("Message", c_char*129),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getMessage(self):
        return str(self.Message, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Message = \'{14}\', DeviceID = \'{15}\', BrokerIDByBank = \'{16}\', OperNo = \'{17}\', RequestID = {18}, TID = {19}, ErrorID = {20}, ErrorMsg = \'{21}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Message, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Message': str(self.Message, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcRspSyncKeyField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Message=self.Message
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcNotifyQueryAccountField(Structure):
    """查询账户信息通知"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 银行可用金额
        ("BankUseAmount", c_double),
        # 银行可取金额
        ("BankFetchAmount", c_double),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getFutureSerial(self):
        return self.FutureSerial
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getBankUseAmount(self):
        return self.BankUseAmount
    def getBankFetchAmount(self):
        return self.BankFetchAmount
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', CustType = CustTypeType.{15}, BankAccount = \'{16}\', BankPassWord = \'{17}\', AccountID = \'{18}\', Password = \'{19}\', FutureSerial = {20}, InstallID = {21}, UserID = \'{22}\', VerifyCertNoFlag = YesNoIndicatorType.{23}, CurrencyID = \'{24}\', Digest = \'{25}\', BankAccType = BankAccTypeType.{26}, DeviceID = \'{27}\', BankSecuAccType = BankAccTypeType.{28}, BrokerIDByBank = \'{29}\', BankSecuAcc = \'{30}\', BankPwdFlag = PwdFlagType.{31}, SecuPwdFlag = PwdFlagType.{32}, OperNo = \'{33}\', RequestID = {34}, TID = {35}, BankUseAmount = {36}, BankFetchAmount = {37}, ErrorID = {38}, ErrorMsg = \'{39}\', LongCustomerName = \'{40}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.FutureSerial, self.InstallID, str(self.UserID, 'GB2312'), '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.BankUseAmount, self.BankFetchAmount, self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'FutureSerial': self.FutureSerial,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'BankUseAmount': self.BankUseAmount,'BankFetchAmount': self.BankFetchAmount,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcNotifyQueryAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustType=self.CustType
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.FutureSerial=self.FutureSerial
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.BankUseAmount=self.BankUseAmount
        obj.BankFetchAmount=self.BankFetchAmount
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcTransferSerialField(Structure):
    """银期转账交易流水表"""
    _fields_ = [
        # 平台流水号
        ("PlateSerial", c_int32),
        # 交易发起方日期
        ("TradeDate", c_char*9),
        # 交易日期
        ("TradingDay", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 交易代码
        ("TradeCode", c_char*7),
        # 会话编号
        ("SessionID", c_int32),
        # 银行编码
        ("BankID", c_char*4),
        # 银行分支机构编码
        ("BankBranchID", c_char*5),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 期货公司编码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 期货公司帐号类型
        ("FutureAccType", c_char),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 投资者代码
        ("InvestorID", c_char*13),
        # 期货公司流水号
        ("FutureSerial", c_int32),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 交易金额
        ("TradeAmount", c_double),
        # 应收客户费用
        ("CustFee", c_double),
        # 应收期货公司费用
        ("BrokerFee", c_double),
        # 有效标志
        ("AvailabilityFlag", c_char),
        # 操作员
        ("OperatorCode", c_char*17),
        # 新银行帐号
        ("BankNewAccount", c_char*41),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]

    def getPlateSerial(self):
        return self.PlateSerial

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')
    def getSessionID(self):
        return self.SessionID

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')
    def getFutureAccType(self):
        return FutureAccTypeType(ord(self.FutureAccType))

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')
    def getFutureSerial(self):
        return self.FutureSerial
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getTradeAmount(self):
        return self.TradeAmount
    def getCustFee(self):
        return self.CustFee
    def getBrokerFee(self):
        return self.BrokerFee
    def getAvailabilityFlag(self):
        return AvailabilityFlagType(ord(self.AvailabilityFlag))

    def getOperatorCode(self):
        return str(self.OperatorCode, 'GB2312')

    def getBankNewAccount(self):
        return str(self.BankNewAccount, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'PlateSerial = {0}, TradeDate = \'{1}\', TradingDay = \'{2}\', TradeTime = \'{3}\', TradeCode = \'{4}\', SessionID = {5}, BankID = \'{6}\', BankBranchID = \'{7}\', BankAccType = BankAccTypeType.{8}, BankAccount = \'{9}\', BankSerial = \'{10}\', BrokerID = \'{11}\', BrokerBranchID = \'{12}\', FutureAccType = FutureAccTypeType.{13}, AccountID = \'{14}\', InvestorID = \'{15}\', FutureSerial = {16}, IdCardType = IdCardTypeType.{17}, IdentifiedCardNo = \'{18}\', CurrencyID = \'{19}\', TradeAmount = {20}, CustFee = {21}, BrokerFee = {22}, AvailabilityFlag = AvailabilityFlagType.{23}, OperatorCode = \'{24}\', BankNewAccount = \'{25}\', ErrorID = {26}, ErrorMsg = \'{27}\''.format(self.PlateSerial, str(self.TradeDate, 'GB2312'), str(self.TradingDay, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.TradeCode, 'GB2312'), self.SessionID, str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.BankAccount, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), '' if ord(self.FutureAccType) == 0 else FutureAccTypeType(ord(self.FutureAccType)).name, str(self.AccountID, 'GB2312'), str(self.InvestorID, 'GB2312'), self.FutureSerial, '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), str(self.CurrencyID, 'GB2312'), self.TradeAmount, self.CustFee, self.BrokerFee, '' if ord(self.AvailabilityFlag) == 0 else AvailabilityFlagType(ord(self.AvailabilityFlag)).name, str(self.OperatorCode, 'GB2312'), str(self.BankNewAccount, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'PlateSerial': self.PlateSerial,'TradeDate': str(self.TradeDate, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'TradeCode': str(self.TradeCode, 'GB2312'),'SessionID': self.SessionID,'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'FutureAccType': '' if ord(self.FutureAccType) == 0 else FutureAccTypeType(ord(self.FutureAccType)).name,'AccountID': str(self.AccountID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312'),'FutureSerial': self.FutureSerial,'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'TradeAmount': self.TradeAmount,'CustFee': self.CustFee,'BrokerFee': self.BrokerFee,'AvailabilityFlag': '' if ord(self.AvailabilityFlag) == 0 else AvailabilityFlagType(ord(self.AvailabilityFlag)).name,'OperatorCode': str(self.OperatorCode, 'GB2312'),'BankNewAccount': str(self.BankNewAccount, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTransferSerialField()
        obj.PlateSerial=self.PlateSerial
        obj.TradeDate=self.TradeDate
        obj.TradingDay=self.TradingDay
        obj.TradeTime=self.TradeTime
        obj.TradeCode=self.TradeCode
        obj.SessionID=self.SessionID
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BankAccType=self.BankAccType
        obj.BankAccount=self.BankAccount
        obj.BankSerial=self.BankSerial
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.FutureAccType=self.FutureAccType
        obj.AccountID=self.AccountID
        obj.InvestorID=self.InvestorID
        obj.FutureSerial=self.FutureSerial
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CurrencyID=self.CurrencyID
        obj.TradeAmount=self.TradeAmount
        obj.CustFee=self.CustFee
        obj.BrokerFee=self.BrokerFee
        obj.AvailabilityFlag=self.AvailabilityFlag
        obj.OperatorCode=self.OperatorCode
        obj.BankNewAccount=self.BankNewAccount
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcQryTransferSerialField(Structure):
    """请求查询转帐流水"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 银行编码
        ("BankID", c_char*4),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', BankID = \'{2}\', CurrencyID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.BankID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryTransferSerialField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.BankID=self.BankID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcNotifyFutureSignInField(Structure):
    """期商签到通知"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 摘要
        ("Digest", c_char*36),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # PIN密钥
        ("PinKey", c_char*129),
        # MAC密钥
        ("MacKey", c_char*129),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getPinKey(self):
        return str(self.PinKey, 'GB2312')

    def getMacKey(self):
        return str(self.MacKey, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Digest = \'{14}\', CurrencyID = \'{15}\', DeviceID = \'{16}\', BrokerIDByBank = \'{17}\', OperNo = \'{18}\', RequestID = {19}, TID = {20}, ErrorID = {21}, ErrorMsg = \'{22}\', PinKey = \'{23}\', MacKey = \'{24}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Digest, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.PinKey, 'GB2312'), str(self.MacKey, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'PinKey': str(self.PinKey, 'GB2312'),'MacKey': str(self.MacKey, 'GB2312')}

    def clone(self):
        obj=CThostFtdcNotifyFutureSignInField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Digest=self.Digest
        obj.CurrencyID=self.CurrencyID
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.PinKey=self.PinKey
        obj.MacKey=self.MacKey
        return obj

class CThostFtdcNotifyFutureSignOutField(Structure):
    """期商签退通知"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 摘要
        ("Digest", c_char*36),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Digest = \'{14}\', CurrencyID = \'{15}\', DeviceID = \'{16}\', BrokerIDByBank = \'{17}\', OperNo = \'{18}\', RequestID = {19}, TID = {20}, ErrorID = {21}, ErrorMsg = \'{22}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Digest, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcNotifyFutureSignOutField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Digest=self.Digest
        obj.CurrencyID=self.CurrencyID
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcNotifySyncKeyField(Structure):
    """交易核心向银期报盘发出密钥同步处理结果的通知"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 安装编号
        ("InstallID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 交易核心给银期报盘的消息
        ("Message", c_char*129),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易柜员
        ("OperNo", c_char*17),
        # 请求编号
        ("RequestID", c_int32),
        # 交易ID
        ("TID", c_int32),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID
    def getInstallID(self):
        return self.InstallID

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getMessage(self):
        return str(self.Message, 'GB2312')

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getRequestID(self):
        return self.RequestID
    def getTID(self):
        return self.TID
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, InstallID = {12}, UserID = \'{13}\', Message = \'{14}\', DeviceID = \'{15}\', BrokerIDByBank = \'{16}\', OperNo = \'{17}\', RequestID = {18}, TID = {19}, ErrorID = {20}, ErrorMsg = \'{21}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, self.InstallID, str(self.UserID, 'GB2312'), str(self.Message, 'GB2312'), str(self.DeviceID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), str(self.OperNo, 'GB2312'), self.RequestID, self.TID, self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'InstallID': self.InstallID,'UserID': str(self.UserID, 'GB2312'),'Message': str(self.Message, 'GB2312'),'DeviceID': str(self.DeviceID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'OperNo': str(self.OperNo, 'GB2312'),'RequestID': self.RequestID,'TID': self.TID,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcNotifySyncKeyField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.InstallID=self.InstallID
        obj.UserID=self.UserID
        obj.Message=self.Message
        obj.DeviceID=self.DeviceID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.OperNo=self.OperNo
        obj.RequestID=self.RequestID
        obj.TID=self.TID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcQryAccountregisterField(Structure):
    """请求查询银期签约关系"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 银行编码
        ("BankID", c_char*4),
        # 银行分支机构编码
        ("BankBranchID", c_char*5),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', BankID = \'{2}\', BankBranchID = \'{3}\', CurrencyID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryAccountregisterField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcAccountregisterField(Structure):
    """客户开销户信息表"""
    _fields_ = [
        # 交易日期
        ("TradeDay", c_char*9),
        # 银行编码
        ("BankID", c_char*4),
        # 银行分支机构编码
        ("BankBranchID", c_char*5),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 期货公司编码
        ("BrokerID", c_char*11),
        # 期货公司分支机构编码
        ("BrokerBranchID", c_char*31),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 开销户类别
        ("OpenOrDestroy", c_char),
        # 签约日期
        ("RegDate", c_char*9),
        # 解约日期
        ("OutDate", c_char*9),
        # 交易ID
        ("TID", c_int32),
        # 客户类型
        ("CustType", c_char),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeDay(self):
        return str(self.TradeDay, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getOpenOrDestroy(self):
        return OpenOrDestroyType(ord(self.OpenOrDestroy))

    def getRegDate(self):
        return str(self.RegDate, 'GB2312')

    def getOutDate(self):
        return str(self.OutDate, 'GB2312')
    def getTID(self):
        return self.TID
    def getCustType(self):
        return CustTypeType(ord(self.CustType))
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeDay = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BankAccount = \'{3}\', BrokerID = \'{4}\', BrokerBranchID = \'{5}\', AccountID = \'{6}\', IdCardType = IdCardTypeType.{7}, IdentifiedCardNo = \'{8}\', CustomerName = \'{9}\', CurrencyID = \'{10}\', OpenOrDestroy = OpenOrDestroyType.{11}, RegDate = \'{12}\', OutDate = \'{13}\', TID = {14}, CustType = CustTypeType.{15}, BankAccType = BankAccTypeType.{16}, LongCustomerName = \'{17}\''.format(str(self.TradeDay, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BankAccount, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.AccountID, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), str(self.CustomerName, 'GB2312'), str(self.CurrencyID, 'GB2312'), '' if ord(self.OpenOrDestroy) == 0 else OpenOrDestroyType(ord(self.OpenOrDestroy)).name, str(self.RegDate, 'GB2312'), str(self.OutDate, 'GB2312'), self.TID, '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeDay': str(self.TradeDay, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BankAccount': str(self.BankAccount, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'CustomerName': str(self.CustomerName, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'OpenOrDestroy': '' if ord(self.OpenOrDestroy) == 0 else OpenOrDestroyType(ord(self.OpenOrDestroy)).name,'RegDate': str(self.RegDate, 'GB2312'),'OutDate': str(self.OutDate, 'GB2312'),'TID': self.TID,'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcAccountregisterField()
        obj.TradeDay=self.TradeDay
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BankAccount=self.BankAccount
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.AccountID=self.AccountID
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.CustomerName=self.CustomerName
        obj.CurrencyID=self.CurrencyID
        obj.OpenOrDestroy=self.OpenOrDestroy
        obj.RegDate=self.RegDate
        obj.OutDate=self.OutDate
        obj.TID=self.TID
        obj.CustType=self.CustType
        obj.BankAccType=self.BankAccType
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcOpenAccountField(Structure):
    """银期开户信息"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 汇钞标志
        ("CashExchangeCode", c_char),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 交易ID
        ("TID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getCashExchangeCode(self):
        return CashExchangeCodeType(ord(self.CashExchangeCode))

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getTID(self):
        return self.TID

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', AccountID = \'{27}\', Password = \'{28}\', InstallID = {29}, VerifyCertNoFlag = YesNoIndicatorType.{30}, CurrencyID = \'{31}\', CashExchangeCode = CashExchangeCodeType.{32}, Digest = \'{33}\', BankAccType = BankAccTypeType.{34}, DeviceID = \'{35}\', BankSecuAccType = BankAccTypeType.{36}, BrokerIDByBank = \'{37}\', BankSecuAcc = \'{38}\', BankPwdFlag = PwdFlagType.{39}, SecuPwdFlag = PwdFlagType.{40}, OperNo = \'{41}\', TID = {42}, UserID = \'{43}\', ErrorID = {44}, ErrorMsg = \'{45}\', LongCustomerName = \'{46}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name, str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.TID, str(self.UserID, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'CashExchangeCode': '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name,'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'TID': self.TID,'UserID': str(self.UserID, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcOpenAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.CashExchangeCode=self.CashExchangeCode
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.TID=self.TID
        obj.UserID=self.UserID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcCancelAccountField(Structure):
    """银期销户信息"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 汇钞标志
        ("CashExchangeCode", c_char),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 渠道标志
        ("DeviceID", c_char*3),
        # 期货单位帐号类型
        ("BankSecuAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 期货单位帐号
        ("BankSecuAcc", c_char*41),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易柜员
        ("OperNo", c_char*17),
        # 交易ID
        ("TID", c_int32),
        # 用户标识
        ("UserID", c_char*16),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')
    def getCashExchangeCode(self):
        return CashExchangeCodeType(ord(self.CashExchangeCode))

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getDeviceID(self):
        return str(self.DeviceID, 'GB2312')
    def getBankSecuAccType(self):
        return BankAccTypeType(ord(self.BankSecuAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')

    def getBankSecuAcc(self):
        return str(self.BankSecuAcc, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))

    def getOperNo(self):
        return str(self.OperNo, 'GB2312')
    def getTID(self):
        return self.TID

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', AccountID = \'{27}\', Password = \'{28}\', InstallID = {29}, VerifyCertNoFlag = YesNoIndicatorType.{30}, CurrencyID = \'{31}\', CashExchangeCode = CashExchangeCodeType.{32}, Digest = \'{33}\', BankAccType = BankAccTypeType.{34}, DeviceID = \'{35}\', BankSecuAccType = BankAccTypeType.{36}, BrokerIDByBank = \'{37}\', BankSecuAcc = \'{38}\', BankPwdFlag = PwdFlagType.{39}, SecuPwdFlag = PwdFlagType.{40}, OperNo = \'{41}\', TID = {42}, UserID = \'{43}\', ErrorID = {44}, ErrorMsg = \'{45}\', LongCustomerName = \'{46}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name, str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.DeviceID, 'GB2312'), '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name, str(self.BrokerIDByBank, 'GB2312'), str(self.BankSecuAcc, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, str(self.OperNo, 'GB2312'), self.TID, str(self.UserID, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'CashExchangeCode': '' if ord(self.CashExchangeCode) == 0 else CashExchangeCodeType(ord(self.CashExchangeCode)).name,'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'DeviceID': str(self.DeviceID, 'GB2312'),'BankSecuAccType': '' if ord(self.BankSecuAccType) == 0 else BankAccTypeType(ord(self.BankSecuAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankSecuAcc': str(self.BankSecuAcc, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'OperNo': str(self.OperNo, 'GB2312'),'TID': self.TID,'UserID': str(self.UserID, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcCancelAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.CashExchangeCode=self.CashExchangeCode
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.DeviceID=self.DeviceID
        obj.BankSecuAccType=self.BankSecuAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankSecuAcc=self.BankSecuAcc
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.OperNo=self.OperNo
        obj.TID=self.TID
        obj.UserID=self.UserID
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcChangeAccountField(Structure):
    """银期变更银行账号信息"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*51),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 新银行帐号
        ("NewBankAccount", c_char*41),
        # 新银行密码
        ("NewBankPassWord", c_char*41),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 银行密码标志
        ("BankPwdFlag", c_char),
        # 期货资金密码核对标志
        ("SecuPwdFlag", c_char),
        # 交易ID
        ("TID", c_int32),
        # 摘要
        ("Digest", c_char*36),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        # 长客户姓名
        ("LongCustomerName", c_char*161),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')

    def getNewBankAccount(self):
        return str(self.NewBankAccount, 'GB2312')

    def getNewBankPassWord(self):
        return str(self.NewBankPassWord, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')
    def getBankPwdFlag(self):
        return PwdFlagType(ord(self.BankPwdFlag))
    def getSecuPwdFlag(self):
        return PwdFlagType(ord(self.SecuPwdFlag))
    def getTID(self):
        return self.TID

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def getLongCustomerName(self):
        return str(self.LongCustomerName, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', NewBankAccount = \'{27}\', NewBankPassWord = \'{28}\', AccountID = \'{29}\', Password = \'{30}\', BankAccType = BankAccTypeType.{31}, InstallID = {32}, VerifyCertNoFlag = YesNoIndicatorType.{33}, CurrencyID = \'{34}\', BrokerIDByBank = \'{35}\', BankPwdFlag = PwdFlagType.{36}, SecuPwdFlag = PwdFlagType.{37}, TID = {38}, Digest = \'{39}\', ErrorID = {40}, ErrorMsg = \'{41}\', LongCustomerName = \'{42}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), str(self.NewBankAccount, 'GB2312'), str(self.NewBankPassWord, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), str(self.BrokerIDByBank, 'GB2312'), '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name, '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name, self.TID, str(self.Digest, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'), str(self.LongCustomerName, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'NewBankAccount': str(self.NewBankAccount, 'GB2312'),'NewBankPassWord': str(self.NewBankPassWord, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'BankPwdFlag': '' if ord(self.BankPwdFlag) == 0 else PwdFlagType(ord(self.BankPwdFlag)).name,'SecuPwdFlag': '' if ord(self.SecuPwdFlag) == 0 else PwdFlagType(ord(self.SecuPwdFlag)).name,'TID': self.TID,'Digest': str(self.Digest, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312'),'LongCustomerName': str(self.LongCustomerName, 'GB2312')}

    def clone(self):
        obj=CThostFtdcChangeAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.NewBankAccount=self.NewBankAccount
        obj.NewBankPassWord=self.NewBankPassWord
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.BankAccType=self.BankAccType
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.BankPwdFlag=self.BankPwdFlag
        obj.SecuPwdFlag=self.SecuPwdFlag
        obj.TID=self.TID
        obj.Digest=self.Digest
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        obj.LongCustomerName=self.LongCustomerName
        return obj

class CThostFtdcSecAgentACIDMapField(Structure):
    """二级代理操作员银期权限"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 资金账户
        ("AccountID", c_char*13),
        # 币种
        ("CurrencyID", c_char*4),
        # 境外中介机构资金帐号
        ("BrokerSecAgentID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getBrokerSecAgentID(self):
        return str(self.BrokerSecAgentID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', AccountID = \'{2}\', CurrencyID = \'{3}\', BrokerSecAgentID = \'{4}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'), str(self.BrokerSecAgentID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312'),'BrokerSecAgentID': str(self.BrokerSecAgentID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcSecAgentACIDMapField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        obj.BrokerSecAgentID=self.BrokerSecAgentID
        return obj

class CThostFtdcQrySecAgentACIDMapField(Structure):
    """二级代理操作员银期权限查询"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 资金账户
        ("AccountID", c_char*13),
        # 币种
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', AccountID = \'{2}\', CurrencyID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySecAgentACIDMapField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.AccountID=self.AccountID
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcUserRightsAssignField(Structure):
    """灾备中心交易权限"""
    _fields_ = [
        # 应用单元代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 交易中心代码
        ("DRIdentityID", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getDRIdentityID(self):
        return self.DRIdentityID

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', DRIdentityID = {2}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), self.DRIdentityID)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'DRIdentityID': self.DRIdentityID}

    def clone(self):
        obj=CThostFtdcUserRightsAssignField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.DRIdentityID=self.DRIdentityID
        return obj

class CThostFtdcBrokerUserRightAssignField(Structure):
    """经济公司是否有在本标示的交易权限"""
    _fields_ = [
        # 应用单元代码
        ("BrokerID", c_char*11),
        # 交易中心代码
        ("DRIdentityID", c_int32),
        # 能否交易
        ("Tradeable", c_int32),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')
    def getDRIdentityID(self):
        return self.DRIdentityID
    def getTradeable(self):
        return self.Tradeable

    def __str__(self):
        return 'BrokerID = \'{0}\', DRIdentityID = {1}, Tradeable = {2}'.format(str(self.BrokerID, 'GB2312'), self.DRIdentityID, self.Tradeable)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'DRIdentityID': self.DRIdentityID,'Tradeable': self.Tradeable}

    def clone(self):
        obj=CThostFtdcBrokerUserRightAssignField()
        obj.BrokerID=self.BrokerID
        obj.DRIdentityID=self.DRIdentityID
        obj.Tradeable=self.Tradeable
        return obj

class CThostFtdcDRTransferField(Structure):
    """灾备交易转换报文"""
    _fields_ = [
        # 原交易中心代码
        ("OrigDRIdentityID", c_int32),
        # 目标交易中心代码
        ("DestDRIdentityID", c_int32),
        # 原应用单元代码
        ("OrigBrokerID", c_char*11),
        # 目标易用单元代码
        ("DestBrokerID", c_char*11),
        ]

    def getOrigDRIdentityID(self):
        return self.OrigDRIdentityID
    def getDestDRIdentityID(self):
        return self.DestDRIdentityID

    def getOrigBrokerID(self):
        return str(self.OrigBrokerID, 'GB2312')

    def getDestBrokerID(self):
        return str(self.DestBrokerID, 'GB2312')

    def __str__(self):
        return 'OrigDRIdentityID = {0}, DestDRIdentityID = {1}, OrigBrokerID = \'{2}\', DestBrokerID = \'{3}\''.format(self.OrigDRIdentityID, self.DestDRIdentityID, str(self.OrigBrokerID, 'GB2312'), str(self.DestBrokerID, 'GB2312'))

    @property
    def __dict__(self):
        return {'OrigDRIdentityID': self.OrigDRIdentityID,'DestDRIdentityID': self.DestDRIdentityID,'OrigBrokerID': str(self.OrigBrokerID, 'GB2312'),'DestBrokerID': str(self.DestBrokerID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcDRTransferField()
        obj.OrigDRIdentityID=self.OrigDRIdentityID
        obj.DestDRIdentityID=self.DestDRIdentityID
        obj.OrigBrokerID=self.OrigBrokerID
        obj.DestBrokerID=self.DestBrokerID
        return obj

class CThostFtdcFensUserInfoField(Structure):
    """Fens用户信息"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # 登录模式
        ("LoginMode", c_char),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')
    def getLoginMode(self):
        return LoginModeType(ord(self.LoginMode))

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', LoginMode = LoginModeType.{2}'.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), '' if ord(self.LoginMode) == 0 else LoginModeType(ord(self.LoginMode)).name)

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'LoginMode': '' if ord(self.LoginMode) == 0 else LoginModeType(ord(self.LoginMode)).name}

    def clone(self):
        obj=CThostFtdcFensUserInfoField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.LoginMode=self.LoginMode
        return obj

class CThostFtdcCurrTransferIdentityField(Structure):
    """当前银期所属交易中心"""
    _fields_ = [
        # 交易中心代码
        ("IdentityID", c_int32),
        ]

    def getIdentityID(self):
        return self.IdentityID

    def __str__(self):
        return 'IdentityID = {0}'.format(self.IdentityID)

    @property
    def __dict__(self):
        return {'IdentityID': self.IdentityID}

    def clone(self):
        obj=CThostFtdcCurrTransferIdentityField()
        obj.IdentityID=self.IdentityID
        return obj

class CThostFtdcLoginForbiddenUserField(Structure):
    """禁止登录用户"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        # IP地址
        ("IPAddress", c_char*16),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\', IPAddress = \'{2}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'), str(self.IPAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312'),'IPAddress': str(self.IPAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcLoginForbiddenUserField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        obj.IPAddress=self.IPAddress
        return obj

class CThostFtdcQryLoginForbiddenUserField(Structure):
    """查询禁止登录用户"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryLoginForbiddenUserField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        return obj

class CThostFtdcMulticastGroupInfoField(Structure):
    """UDP组播组信息"""
    _fields_ = [
        # 组播组IP地址
        ("GroupIP", c_char*16),
        # 组播组IP端口
        ("GroupPort", c_int32),
        # 源地址
        ("SourceIP", c_char*16),
        ]


    def getGroupIP(self):
        return str(self.GroupIP, 'GB2312')
    def getGroupPort(self):
        return self.GroupPort

    def getSourceIP(self):
        return str(self.SourceIP, 'GB2312')

    def __str__(self):
        return 'GroupIP = \'{0}\', GroupPort = {1}, SourceIP = \'{2}\''.format(str(self.GroupIP, 'GB2312'), self.GroupPort, str(self.SourceIP, 'GB2312'))

    @property
    def __dict__(self):
        return {'GroupIP': str(self.GroupIP, 'GB2312'),'GroupPort': self.GroupPort,'SourceIP': str(self.SourceIP, 'GB2312')}

    def clone(self):
        obj=CThostFtdcMulticastGroupInfoField()
        obj.GroupIP=self.GroupIP
        obj.GroupPort=self.GroupPort
        obj.SourceIP=self.SourceIP
        return obj

class CThostFtdcTradingAccountReserveField(Structure):
    """资金账户基本准备金"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 基本准备金
        ("Reserve", c_double),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')
    def getReserve(self):
        return self.Reserve

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', Reserve = {2}, CurrencyID = \'{3}\''.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), self.Reserve, str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'Reserve': self.Reserve,'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcTradingAccountReserveField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.Reserve=self.Reserve
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcQryLoginForbiddenIPField(Structure):
    """查询禁止登录IP"""
    _fields_ = [
        # IP地址
        ("IPAddress", c_char*16),
        ]


    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def __str__(self):
        return 'IPAddress = \'{0}\''.format(str(self.IPAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'IPAddress': str(self.IPAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryLoginForbiddenIPField()
        obj.IPAddress=self.IPAddress
        return obj

class CThostFtdcQryIPListField(Structure):
    """查询IP列表"""
    _fields_ = [
        # IP地址
        ("IPAddress", c_char*16),
        ]


    def getIPAddress(self):
        return str(self.IPAddress, 'GB2312')

    def __str__(self):
        return 'IPAddress = \'{0}\''.format(str(self.IPAddress, 'GB2312'))

    @property
    def __dict__(self):
        return {'IPAddress': str(self.IPAddress, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryIPListField()
        obj.IPAddress=self.IPAddress
        return obj

class CThostFtdcQryUserRightsAssignField(Structure):
    """查询用户下单权限分配表"""
    _fields_ = [
        # 应用单元代码
        ("BrokerID", c_char*11),
        # 用户代码
        ("UserID", c_char*16),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getUserID(self):
        return str(self.UserID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', UserID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.UserID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'UserID': str(self.UserID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQryUserRightsAssignField()
        obj.BrokerID=self.BrokerID
        obj.UserID=self.UserID
        return obj

class CThostFtdcReserveOpenAccountConfirmField(Structure):
    """银期预约开户确认请求"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*161),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易ID
        ("TID", c_int32),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 期货密码
        ("Password", c_char*41),
        # 预约开户银行流水号
        ("BankReserveOpenSeq", c_char*13),
        # 预约开户日期
        ("BookDate", c_char*9),
        # 预约开户验证密码
        ("BookPsw", c_char*41),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')
    def getTID(self):
        return self.TID

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getPassword(self):
        return str(self.Password, 'GB2312')

    def getBankReserveOpenSeq(self):
        return str(self.BankReserveOpenSeq, 'GB2312')

    def getBookDate(self):
        return str(self.BookDate, 'GB2312')

    def getBookPsw(self):
        return str(self.BookPsw, 'GB2312')
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', InstallID = {27}, VerifyCertNoFlag = YesNoIndicatorType.{28}, CurrencyID = \'{29}\', Digest = \'{30}\', BankAccType = BankAccTypeType.{31}, BrokerIDByBank = \'{32}\', TID = {33}, AccountID = \'{34}\', Password = \'{35}\', BankReserveOpenSeq = \'{36}\', BookDate = \'{37}\', BookPsw = \'{38}\', ErrorID = {39}, ErrorMsg = \'{40}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.BrokerIDByBank, 'GB2312'), self.TID, str(self.AccountID, 'GB2312'), str(self.Password, 'GB2312'), str(self.BankReserveOpenSeq, 'GB2312'), str(self.BookDate, 'GB2312'), str(self.BookPsw, 'GB2312'), self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'TID': self.TID,'AccountID': str(self.AccountID, 'GB2312'),'Password': str(self.Password, 'GB2312'),'BankReserveOpenSeq': str(self.BankReserveOpenSeq, 'GB2312'),'BookDate': str(self.BookDate, 'GB2312'),'BookPsw': str(self.BookPsw, 'GB2312'),'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReserveOpenAccountConfirmField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.TID=self.TID
        obj.AccountID=self.AccountID
        obj.Password=self.Password
        obj.BankReserveOpenSeq=self.BankReserveOpenSeq
        obj.BookDate=self.BookDate
        obj.BookPsw=self.BookPsw
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcReserveOpenAccountField(Structure):
    """银期预约开户"""
    _fields_ = [
        # 业务功能码
        ("TradeCode", c_char*7),
        # 银行代码
        ("BankID", c_char*4),
        # 银行分支机构代码
        ("BankBranchID", c_char*5),
        # 期商代码
        ("BrokerID", c_char*11),
        # 期商分支机构代码
        ("BrokerBranchID", c_char*31),
        # 交易日期
        ("TradeDate", c_char*9),
        # 交易时间
        ("TradeTime", c_char*9),
        # 银行流水号
        ("BankSerial", c_char*13),
        # 交易系统日期 
        ("TradingDay", c_char*9),
        # 银期平台消息流水号
        ("PlateSerial", c_int32),
        # 最后分片标志
        ("LastFragment", c_char),
        # 会话号
        ("SessionID", c_int32),
        # 客户姓名
        ("CustomerName", c_char*161),
        # 证件类型
        ("IdCardType", c_char),
        # 证件号码
        ("IdentifiedCardNo", c_char*51),
        # 性别
        ("Gender", c_char),
        # 国家代码
        ("CountryCode", c_char*21),
        # 客户类型
        ("CustType", c_char),
        # 地址
        ("Address", c_char*101),
        # 邮编
        ("ZipCode", c_char*7),
        # 电话号码
        ("Telephone", c_char*41),
        # 手机
        ("MobilePhone", c_char*21),
        # 传真
        ("Fax", c_char*41),
        # 电子邮件
        ("EMail", c_char*41),
        # 资金账户状态
        ("MoneyAccountStatus", c_char),
        # 银行帐号
        ("BankAccount", c_char*41),
        # 银行密码
        ("BankPassWord", c_char*41),
        # 安装编号
        ("InstallID", c_int32),
        # 验证客户证件号码标志
        ("VerifyCertNoFlag", c_char),
        # 币种代码
        ("CurrencyID", c_char*4),
        # 摘要
        ("Digest", c_char*36),
        # 银行帐号类型
        ("BankAccType", c_char),
        # 期货公司银行编码
        ("BrokerIDByBank", c_char*33),
        # 交易ID
        ("TID", c_int32),
        # 预约开户状态
        ("ReserveOpenAccStas", c_char),
        # 错误代码
        ("ErrorID", c_int32),
        # 错误信息
        ("ErrorMsg", c_char*81),
        ]


    def getTradeCode(self):
        return str(self.TradeCode, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankBranchID(self):
        return str(self.BankBranchID, 'GB2312')

    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getBrokerBranchID(self):
        return str(self.BrokerBranchID, 'GB2312')

    def getTradeDate(self):
        return str(self.TradeDate, 'GB2312')

    def getTradeTime(self):
        return str(self.TradeTime, 'GB2312')

    def getBankSerial(self):
        return str(self.BankSerial, 'GB2312')

    def getTradingDay(self):
        return str(self.TradingDay, 'GB2312')
    def getPlateSerial(self):
        return self.PlateSerial
    def getLastFragment(self):
        return LastFragmentType(ord(self.LastFragment))
    def getSessionID(self):
        return self.SessionID

    def getCustomerName(self):
        return str(self.CustomerName, 'GB2312')
    def getIdCardType(self):
        return IdCardTypeType(ord(self.IdCardType))

    def getIdentifiedCardNo(self):
        return str(self.IdentifiedCardNo, 'GB2312')
    def getGender(self):
        return GenderType(ord(self.Gender))

    def getCountryCode(self):
        return str(self.CountryCode, 'GB2312')
    def getCustType(self):
        return CustTypeType(ord(self.CustType))

    def getAddress(self):
        return str(self.Address, 'GB2312')

    def getZipCode(self):
        return str(self.ZipCode, 'GB2312')

    def getTelephone(self):
        return str(self.Telephone, 'GB2312')

    def getMobilePhone(self):
        return str(self.MobilePhone, 'GB2312')

    def getFax(self):
        return str(self.Fax, 'GB2312')

    def getEMail(self):
        return str(self.EMail, 'GB2312')
    def getMoneyAccountStatus(self):
        return MoneyAccountStatusType(ord(self.MoneyAccountStatus))

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getBankPassWord(self):
        return str(self.BankPassWord, 'GB2312')
    def getInstallID(self):
        return self.InstallID
    def getVerifyCertNoFlag(self):
        return YesNoIndicatorType(ord(self.VerifyCertNoFlag))

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def getDigest(self):
        return str(self.Digest, 'GB2312')
    def getBankAccType(self):
        return BankAccTypeType(ord(self.BankAccType))

    def getBrokerIDByBank(self):
        return str(self.BrokerIDByBank, 'GB2312')
    def getTID(self):
        return self.TID
    def getReserveOpenAccStas(self):
        return ReserveOpenAccStasType(ord(self.ReserveOpenAccStas))
    def getErrorID(self):
        return self.ErrorID

    def getErrorMsg(self):
        return str(self.ErrorMsg, 'GB2312')

    def __str__(self):
        return 'TradeCode = \'{0}\', BankID = \'{1}\', BankBranchID = \'{2}\', BrokerID = \'{3}\', BrokerBranchID = \'{4}\', TradeDate = \'{5}\', TradeTime = \'{6}\', BankSerial = \'{7}\', TradingDay = \'{8}\', PlateSerial = {9}, LastFragment = LastFragmentType.{10}, SessionID = {11}, CustomerName = \'{12}\', IdCardType = IdCardTypeType.{13}, IdentifiedCardNo = \'{14}\', Gender = GenderType.{15}, CountryCode = \'{16}\', CustType = CustTypeType.{17}, Address = \'{18}\', ZipCode = \'{19}\', Telephone = \'{20}\', MobilePhone = \'{21}\', Fax = \'{22}\', EMail = \'{23}\', MoneyAccountStatus = MoneyAccountStatusType.{24}, BankAccount = \'{25}\', BankPassWord = \'{26}\', InstallID = {27}, VerifyCertNoFlag = YesNoIndicatorType.{28}, CurrencyID = \'{29}\', Digest = \'{30}\', BankAccType = BankAccTypeType.{31}, BrokerIDByBank = \'{32}\', TID = {33}, ReserveOpenAccStas = ReserveOpenAccStasType.{34}, ErrorID = {35}, ErrorMsg = \'{36}\''.format(str(self.TradeCode, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankBranchID, 'GB2312'), str(self.BrokerID, 'GB2312'), str(self.BrokerBranchID, 'GB2312'), str(self.TradeDate, 'GB2312'), str(self.TradeTime, 'GB2312'), str(self.BankSerial, 'GB2312'), str(self.TradingDay, 'GB2312'), self.PlateSerial, '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name, self.SessionID, str(self.CustomerName, 'GB2312'), '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name, str(self.IdentifiedCardNo, 'GB2312'), '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name, str(self.CountryCode, 'GB2312'), '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name, str(self.Address, 'GB2312'), str(self.ZipCode, 'GB2312'), str(self.Telephone, 'GB2312'), str(self.MobilePhone, 'GB2312'), str(self.Fax, 'GB2312'), str(self.EMail, 'GB2312'), '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name, str(self.BankAccount, 'GB2312'), str(self.BankPassWord, 'GB2312'), self.InstallID, '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name, str(self.CurrencyID, 'GB2312'), str(self.Digest, 'GB2312'), '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name, str(self.BrokerIDByBank, 'GB2312'), self.TID, '' if ord(self.ReserveOpenAccStas) == 0 else ReserveOpenAccStasType(ord(self.ReserveOpenAccStas)).name, self.ErrorID, str(self.ErrorMsg, 'GB2312'))

    @property
    def __dict__(self):
        return {'TradeCode': str(self.TradeCode, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankBranchID': str(self.BankBranchID, 'GB2312'),'BrokerID': str(self.BrokerID, 'GB2312'),'BrokerBranchID': str(self.BrokerBranchID, 'GB2312'),'TradeDate': str(self.TradeDate, 'GB2312'),'TradeTime': str(self.TradeTime, 'GB2312'),'BankSerial': str(self.BankSerial, 'GB2312'),'TradingDay': str(self.TradingDay, 'GB2312'),'PlateSerial': self.PlateSerial,'LastFragment': '' if ord(self.LastFragment) == 0 else LastFragmentType(ord(self.LastFragment)).name,'SessionID': self.SessionID,'CustomerName': str(self.CustomerName, 'GB2312'),'IdCardType': '' if ord(self.IdCardType) == 0 else IdCardTypeType(ord(self.IdCardType)).name,'IdentifiedCardNo': str(self.IdentifiedCardNo, 'GB2312'),'Gender': '' if ord(self.Gender) == 0 else GenderType(ord(self.Gender)).name,'CountryCode': str(self.CountryCode, 'GB2312'),'CustType': '' if ord(self.CustType) == 0 else CustTypeType(ord(self.CustType)).name,'Address': str(self.Address, 'GB2312'),'ZipCode': str(self.ZipCode, 'GB2312'),'Telephone': str(self.Telephone, 'GB2312'),'MobilePhone': str(self.MobilePhone, 'GB2312'),'Fax': str(self.Fax, 'GB2312'),'EMail': str(self.EMail, 'GB2312'),'MoneyAccountStatus': '' if ord(self.MoneyAccountStatus) == 0 else MoneyAccountStatusType(ord(self.MoneyAccountStatus)).name,'BankAccount': str(self.BankAccount, 'GB2312'),'BankPassWord': str(self.BankPassWord, 'GB2312'),'InstallID': self.InstallID,'VerifyCertNoFlag': '' if ord(self.VerifyCertNoFlag) == 0 else YesNoIndicatorType(ord(self.VerifyCertNoFlag)).name,'CurrencyID': str(self.CurrencyID, 'GB2312'),'Digest': str(self.Digest, 'GB2312'),'BankAccType': '' if ord(self.BankAccType) == 0 else BankAccTypeType(ord(self.BankAccType)).name,'BrokerIDByBank': str(self.BrokerIDByBank, 'GB2312'),'TID': self.TID,'ReserveOpenAccStas': '' if ord(self.ReserveOpenAccStas) == 0 else ReserveOpenAccStasType(ord(self.ReserveOpenAccStas)).name,'ErrorID': self.ErrorID,'ErrorMsg': str(self.ErrorMsg, 'GB2312')}

    def clone(self):
        obj=CThostFtdcReserveOpenAccountField()
        obj.TradeCode=self.TradeCode
        obj.BankID=self.BankID
        obj.BankBranchID=self.BankBranchID
        obj.BrokerID=self.BrokerID
        obj.BrokerBranchID=self.BrokerBranchID
        obj.TradeDate=self.TradeDate
        obj.TradeTime=self.TradeTime
        obj.BankSerial=self.BankSerial
        obj.TradingDay=self.TradingDay
        obj.PlateSerial=self.PlateSerial
        obj.LastFragment=self.LastFragment
        obj.SessionID=self.SessionID
        obj.CustomerName=self.CustomerName
        obj.IdCardType=self.IdCardType
        obj.IdentifiedCardNo=self.IdentifiedCardNo
        obj.Gender=self.Gender
        obj.CountryCode=self.CountryCode
        obj.CustType=self.CustType
        obj.Address=self.Address
        obj.ZipCode=self.ZipCode
        obj.Telephone=self.Telephone
        obj.MobilePhone=self.MobilePhone
        obj.Fax=self.Fax
        obj.EMail=self.EMail
        obj.MoneyAccountStatus=self.MoneyAccountStatus
        obj.BankAccount=self.BankAccount
        obj.BankPassWord=self.BankPassWord
        obj.InstallID=self.InstallID
        obj.VerifyCertNoFlag=self.VerifyCertNoFlag
        obj.CurrencyID=self.CurrencyID
        obj.Digest=self.Digest
        obj.BankAccType=self.BankAccType
        obj.BrokerIDByBank=self.BrokerIDByBank
        obj.TID=self.TID
        obj.ReserveOpenAccStas=self.ReserveOpenAccStas
        obj.ErrorID=self.ErrorID
        obj.ErrorMsg=self.ErrorMsg
        return obj

class CThostFtdcAccountPropertyField(Structure):
    """银行账户属性"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者帐号
        ("AccountID", c_char*13),
        # 银行统一标识类型
        ("BankID", c_char*4),
        # 银行账户
        ("BankAccount", c_char*41),
        # 银行账户的开户人名称
        ("OpenName", c_char*101),
        # 银行账户的开户行
        ("OpenBank", c_char*101),
        # 是否活跃
        ("IsActive", c_int32),
        # 账户来源
        ("AccountSourceType", c_char),
        # 开户日期
        ("OpenDate", c_char*9),
        # 注销日期
        ("CancelDate", c_char*9),
        # 录入员代码
        ("OperatorID", c_char*65),
        # 录入日期
        ("OperateDate", c_char*9),
        # 录入时间
        ("OperateTime", c_char*9),
        # 币种代码
        ("CurrencyID", c_char*4),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getAccountID(self):
        return str(self.AccountID, 'GB2312')

    def getBankID(self):
        return str(self.BankID, 'GB2312')

    def getBankAccount(self):
        return str(self.BankAccount, 'GB2312')

    def getOpenName(self):
        return str(self.OpenName, 'GB2312')

    def getOpenBank(self):
        return str(self.OpenBank, 'GB2312')
    def getIsActive(self):
        return self.IsActive
    def getAccountSourceType(self):
        return AccountSourceTypeType(ord(self.AccountSourceType))

    def getOpenDate(self):
        return str(self.OpenDate, 'GB2312')

    def getCancelDate(self):
        return str(self.CancelDate, 'GB2312')

    def getOperatorID(self):
        return str(self.OperatorID, 'GB2312')

    def getOperateDate(self):
        return str(self.OperateDate, 'GB2312')

    def getOperateTime(self):
        return str(self.OperateTime, 'GB2312')

    def getCurrencyID(self):
        return str(self.CurrencyID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', AccountID = \'{1}\', BankID = \'{2}\', BankAccount = \'{3}\', OpenName = \'{4}\', OpenBank = \'{5}\', IsActive = {6}, AccountSourceType = AccountSourceTypeType.{7}, OpenDate = \'{8}\', CancelDate = \'{9}\', OperatorID = \'{10}\', OperateDate = \'{11}\', OperateTime = \'{12}\', CurrencyID = \'{13}\''.format(str(self.BrokerID, 'GB2312'), str(self.AccountID, 'GB2312'), str(self.BankID, 'GB2312'), str(self.BankAccount, 'GB2312'), str(self.OpenName, 'GB2312'), str(self.OpenBank, 'GB2312'), self.IsActive, '' if ord(self.AccountSourceType) == 0 else AccountSourceTypeType(ord(self.AccountSourceType)).name, str(self.OpenDate, 'GB2312'), str(self.CancelDate, 'GB2312'), str(self.OperatorID, 'GB2312'), str(self.OperateDate, 'GB2312'), str(self.OperateTime, 'GB2312'), str(self.CurrencyID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'AccountID': str(self.AccountID, 'GB2312'),'BankID': str(self.BankID, 'GB2312'),'BankAccount': str(self.BankAccount, 'GB2312'),'OpenName': str(self.OpenName, 'GB2312'),'OpenBank': str(self.OpenBank, 'GB2312'),'IsActive': self.IsActive,'AccountSourceType': '' if ord(self.AccountSourceType) == 0 else AccountSourceTypeType(ord(self.AccountSourceType)).name,'OpenDate': str(self.OpenDate, 'GB2312'),'CancelDate': str(self.CancelDate, 'GB2312'),'OperatorID': str(self.OperatorID, 'GB2312'),'OperateDate': str(self.OperateDate, 'GB2312'),'OperateTime': str(self.OperateTime, 'GB2312'),'CurrencyID': str(self.CurrencyID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcAccountPropertyField()
        obj.BrokerID=self.BrokerID
        obj.AccountID=self.AccountID
        obj.BankID=self.BankID
        obj.BankAccount=self.BankAccount
        obj.OpenName=self.OpenName
        obj.OpenBank=self.OpenBank
        obj.IsActive=self.IsActive
        obj.AccountSourceType=self.AccountSourceType
        obj.OpenDate=self.OpenDate
        obj.CancelDate=self.CancelDate
        obj.OperatorID=self.OperatorID
        obj.OperateDate=self.OperateDate
        obj.OperateTime=self.OperateTime
        obj.CurrencyID=self.CurrencyID
        return obj

class CThostFtdcQryCurrDRIdentityField(Structure):
    """查询当前交易中心"""
    _fields_ = [
        # 交易中心代码
        ("DRIdentityID", c_int32),
        ]

    def getDRIdentityID(self):
        return self.DRIdentityID

    def __str__(self):
        return 'DRIdentityID = {0}'.format(self.DRIdentityID)

    @property
    def __dict__(self):
        return {'DRIdentityID': self.DRIdentityID}

    def clone(self):
        obj=CThostFtdcQryCurrDRIdentityField()
        obj.DRIdentityID=self.DRIdentityID
        return obj

class CThostFtdcCurrDRIdentityField(Structure):
    """当前交易中心"""
    _fields_ = [
        # 交易中心代码
        ("DRIdentityID", c_int32),
        ]

    def getDRIdentityID(self):
        return self.DRIdentityID

    def __str__(self):
        return 'DRIdentityID = {0}'.format(self.DRIdentityID)

    @property
    def __dict__(self):
        return {'DRIdentityID': self.DRIdentityID}

    def clone(self):
        obj=CThostFtdcCurrDRIdentityField()
        obj.DRIdentityID=self.DRIdentityID
        return obj

class CThostFtdcQrySecAgentCheckModeField(Structure):
    """查询二级代理商资金校验模式"""
    _fields_ = [
        # 经纪公司代码
        ("BrokerID", c_char*11),
        # 投资者代码
        ("InvestorID", c_char*13),
        ]


    def getBrokerID(self):
        return str(self.BrokerID, 'GB2312')

    def getInvestorID(self):
        return str(self.InvestorID, 'GB2312')

    def __str__(self):
        return 'BrokerID = \'{0}\', InvestorID = \'{1}\''.format(str(self.BrokerID, 'GB2312'), str(self.InvestorID, 'GB2312'))

    @property
    def __dict__(self):
        return {'BrokerID': str(self.BrokerID, 'GB2312'),'InvestorID': str(self.InvestorID, 'GB2312')}

    def clone(self):
        obj=CThostFtdcQrySecAgentCheckModeField()
        obj.BrokerID=self.BrokerID
        obj.InvestorID=self.InvestorID
        return obj

char_type_def = {}
char_type_def["CThostFtdcDisseminationField.SequenceSeries"] = "SequenceSeriesType"
char_type_def["CThostFtdcDisseminationField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcReqUserLoginField.TradingDay"] = "DateType"
char_type_def["CThostFtdcReqUserLoginField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqUserLoginField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqUserLoginField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqUserLoginField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcReqUserLoginField.InterfaceProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcReqUserLoginField.ProtocolInfo"] = "ProtocolInfoType"
char_type_def["CThostFtdcReqUserLoginField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcReqUserLoginField.OneTimePassword"] = "PasswordType"
char_type_def["CThostFtdcReqUserLoginField.ClientIPAddress"] = "IPAddressType"
char_type_def["CThostFtdcReqUserLoginField.LoginRemark"] = "LoginRemarkType"
char_type_def["CThostFtdcRspUserLoginField.TradingDay"] = "DateType"
char_type_def["CThostFtdcRspUserLoginField.LoginTime"] = "TimeType"
char_type_def["CThostFtdcRspUserLoginField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspUserLoginField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspUserLoginField.SystemName"] = "SystemNameType"
char_type_def["CThostFtdcRspUserLoginField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcRspUserLoginField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspUserLoginField.MaxOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcRspUserLoginField.SHFETime"] = "TimeType"
char_type_def["CThostFtdcRspUserLoginField.DCETime"] = "TimeType"
char_type_def["CThostFtdcRspUserLoginField.CZCETime"] = "TimeType"
char_type_def["CThostFtdcRspUserLoginField.FFEXTime"] = "TimeType"
char_type_def["CThostFtdcRspUserLoginField.INETime"] = "TimeType"
char_type_def["CThostFtdcUserLogoutField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcUserLogoutField.UserID"] = "UserIDType"
char_type_def["CThostFtdcForceUserLogoutField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcForceUserLogoutField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqAuthenticateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqAuthenticateField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqAuthenticateField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcReqAuthenticateField.AuthCode"] = "AuthCodeType"
char_type_def["CThostFtdcRspAuthenticateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspAuthenticateField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspAuthenticateField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcAuthenticationInfoField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcAuthenticationInfoField.UserID"] = "UserIDType"
char_type_def["CThostFtdcAuthenticationInfoField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcAuthenticationInfoField.AuthInfo"] = "AuthInfoType"
char_type_def["CThostFtdcAuthenticationInfoField.IsResult"] = "BoolType"
char_type_def["CThostFtdcRspUserLogin2Field.TradingDay"] = "DateType"
char_type_def["CThostFtdcRspUserLogin2Field.LoginTime"] = "TimeType"
char_type_def["CThostFtdcRspUserLogin2Field.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspUserLogin2Field.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspUserLogin2Field.SystemName"] = "SystemNameType"
char_type_def["CThostFtdcRspUserLogin2Field.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcRspUserLogin2Field.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspUserLogin2Field.MaxOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcRspUserLogin2Field.SHFETime"] = "TimeType"
char_type_def["CThostFtdcRspUserLogin2Field.DCETime"] = "TimeType"
char_type_def["CThostFtdcRspUserLogin2Field.CZCETime"] = "TimeType"
char_type_def["CThostFtdcRspUserLogin2Field.FFEXTime"] = "TimeType"
char_type_def["CThostFtdcRspUserLogin2Field.INETime"] = "TimeType"
char_type_def["CThostFtdcRspUserLogin2Field.RandomString"] = "RandomStringType"
char_type_def["CThostFtdcTransferHeaderField.Version"] = "VersionType"
char_type_def["CThostFtdcTransferHeaderField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcTransferHeaderField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcTransferHeaderField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcTransferHeaderField.TradeSerial"] = "TradeSerialType"
char_type_def["CThostFtdcTransferHeaderField.FutureID"] = "FutureIDType"
char_type_def["CThostFtdcTransferHeaderField.BankID"] = "BankIDType"
char_type_def["CThostFtdcTransferHeaderField.BankBrchID"] = "BankBrchIDType"
char_type_def["CThostFtdcTransferHeaderField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcTransferHeaderField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcTransferHeaderField.RecordNum"] = "RecordNumType"
char_type_def["CThostFtdcTransferHeaderField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcTransferHeaderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcTransferBankToFutureReqField.FutureAccount"] = "AccountIDType"
char_type_def["CThostFtdcTransferBankToFutureReqField.FuturePwdFlag"] = "FuturePwdFlagType"
char_type_def["CThostFtdcTransferBankToFutureReqField.FutureAccPwd"] = "FutureAccPwdType"
char_type_def["CThostFtdcTransferBankToFutureReqField.TradeAmt"] = "MoneyType"
char_type_def["CThostFtdcTransferBankToFutureReqField.CustFee"] = "MoneyType"
char_type_def["CThostFtdcTransferBankToFutureReqField.CurrencyCode"] = "CurrencyCodeType"
char_type_def["CThostFtdcTransferBankToFutureRspField.RetCode"] = "RetCodeType"
char_type_def["CThostFtdcTransferBankToFutureRspField.RetInfo"] = "RetInfoType"
char_type_def["CThostFtdcTransferBankToFutureRspField.FutureAccount"] = "AccountIDType"
char_type_def["CThostFtdcTransferBankToFutureRspField.TradeAmt"] = "MoneyType"
char_type_def["CThostFtdcTransferBankToFutureRspField.CustFee"] = "MoneyType"
char_type_def["CThostFtdcTransferBankToFutureRspField.CurrencyCode"] = "CurrencyCodeType"
char_type_def["CThostFtdcTransferFutureToBankReqField.FutureAccount"] = "AccountIDType"
char_type_def["CThostFtdcTransferFutureToBankReqField.FuturePwdFlag"] = "FuturePwdFlagType"
char_type_def["CThostFtdcTransferFutureToBankReqField.FutureAccPwd"] = "FutureAccPwdType"
char_type_def["CThostFtdcTransferFutureToBankReqField.TradeAmt"] = "MoneyType"
char_type_def["CThostFtdcTransferFutureToBankReqField.CustFee"] = "MoneyType"
char_type_def["CThostFtdcTransferFutureToBankReqField.CurrencyCode"] = "CurrencyCodeType"
char_type_def["CThostFtdcTransferFutureToBankRspField.RetCode"] = "RetCodeType"
char_type_def["CThostFtdcTransferFutureToBankRspField.RetInfo"] = "RetInfoType"
char_type_def["CThostFtdcTransferFutureToBankRspField.FutureAccount"] = "AccountIDType"
char_type_def["CThostFtdcTransferFutureToBankRspField.TradeAmt"] = "MoneyType"
char_type_def["CThostFtdcTransferFutureToBankRspField.CustFee"] = "MoneyType"
char_type_def["CThostFtdcTransferFutureToBankRspField.CurrencyCode"] = "CurrencyCodeType"
char_type_def["CThostFtdcTransferQryBankReqField.FutureAccount"] = "AccountIDType"
char_type_def["CThostFtdcTransferQryBankReqField.FuturePwdFlag"] = "FuturePwdFlagType"
char_type_def["CThostFtdcTransferQryBankReqField.FutureAccPwd"] = "FutureAccPwdType"
char_type_def["CThostFtdcTransferQryBankReqField.CurrencyCode"] = "CurrencyCodeType"
char_type_def["CThostFtdcTransferQryBankRspField.RetCode"] = "RetCodeType"
char_type_def["CThostFtdcTransferQryBankRspField.RetInfo"] = "RetInfoType"
char_type_def["CThostFtdcTransferQryBankRspField.FutureAccount"] = "AccountIDType"
char_type_def["CThostFtdcTransferQryBankRspField.TradeAmt"] = "MoneyType"
char_type_def["CThostFtdcTransferQryBankRspField.UseAmt"] = "MoneyType"
char_type_def["CThostFtdcTransferQryBankRspField.FetchAmt"] = "MoneyType"
char_type_def["CThostFtdcTransferQryBankRspField.CurrencyCode"] = "CurrencyCodeType"
char_type_def["CThostFtdcTransferQryDetailReqField.FutureAccount"] = "AccountIDType"
char_type_def["CThostFtdcTransferQryDetailRspField.TradeDate"] = "DateType"
char_type_def["CThostFtdcTransferQryDetailRspField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcTransferQryDetailRspField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcTransferQryDetailRspField.FutureSerial"] = "TradeSerialNoType"
char_type_def["CThostFtdcTransferQryDetailRspField.FutureID"] = "FutureIDType"
char_type_def["CThostFtdcTransferQryDetailRspField.FutureAccount"] = "FutureAccountType"
char_type_def["CThostFtdcTransferQryDetailRspField.BankSerial"] = "TradeSerialNoType"
char_type_def["CThostFtdcTransferQryDetailRspField.BankID"] = "BankIDType"
char_type_def["CThostFtdcTransferQryDetailRspField.BankBrchID"] = "BankBrchIDType"
char_type_def["CThostFtdcTransferQryDetailRspField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcTransferQryDetailRspField.CertCode"] = "CertCodeType"
char_type_def["CThostFtdcTransferQryDetailRspField.CurrencyCode"] = "CurrencyCodeType"
char_type_def["CThostFtdcTransferQryDetailRspField.TxAmount"] = "MoneyType"
char_type_def["CThostFtdcTransferQryDetailRspField.Flag"] = "TransferValidFlagType"
char_type_def["CThostFtdcRspInfoField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcRspInfoField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcExchangeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeField.ExchangeName"] = "ExchangeNameType"
char_type_def["CThostFtdcExchangeField.ExchangeProperty"] = "ExchangePropertyType"
char_type_def["CThostFtdcProductField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcProductField.ProductName"] = "ProductNameType"
char_type_def["CThostFtdcProductField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcProductField.ProductClass"] = "ProductClassType"
char_type_def["CThostFtdcProductField.VolumeMultiple"] = "VolumeMultipleType"
char_type_def["CThostFtdcProductField.PriceTick"] = "PriceType"
char_type_def["CThostFtdcProductField.MaxMarketOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcProductField.MinMarketOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcProductField.MaxLimitOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcProductField.MinLimitOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcProductField.PositionType"] = "PositionTypeType"
char_type_def["CThostFtdcProductField.PositionDateType"] = "PositionDateTypeType"
char_type_def["CThostFtdcProductField.CloseDealType"] = "CloseDealTypeType"
char_type_def["CThostFtdcProductField.TradeCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcProductField.MortgageFundUseRange"] = "MortgageFundUseRangeType"
char_type_def["CThostFtdcProductField.ExchangeProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcProductField.UnderlyingMultiple"] = "UnderlyingMultipleType"
char_type_def["CThostFtdcInstrumentField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInstrumentField.InstrumentName"] = "InstrumentNameType"
char_type_def["CThostFtdcInstrumentField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcInstrumentField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentField.ProductClass"] = "ProductClassType"
char_type_def["CThostFtdcInstrumentField.DeliveryYear"] = "YearType"
char_type_def["CThostFtdcInstrumentField.DeliveryMonth"] = "MonthType"
char_type_def["CThostFtdcInstrumentField.MaxMarketOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcInstrumentField.MinMarketOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcInstrumentField.MaxLimitOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcInstrumentField.MinLimitOrderVolume"] = "VolumeType"
char_type_def["CThostFtdcInstrumentField.VolumeMultiple"] = "VolumeMultipleType"
char_type_def["CThostFtdcInstrumentField.PriceTick"] = "PriceType"
char_type_def["CThostFtdcInstrumentField.CreateDate"] = "DateType"
char_type_def["CThostFtdcInstrumentField.OpenDate"] = "DateType"
char_type_def["CThostFtdcInstrumentField.ExpireDate"] = "DateType"
char_type_def["CThostFtdcInstrumentField.StartDelivDate"] = "DateType"
char_type_def["CThostFtdcInstrumentField.EndDelivDate"] = "DateType"
char_type_def["CThostFtdcInstrumentField.InstLifePhase"] = "InstLifePhaseType"
char_type_def["CThostFtdcInstrumentField.IsTrading"] = "BoolType"
char_type_def["CThostFtdcInstrumentField.PositionType"] = "PositionTypeType"
char_type_def["CThostFtdcInstrumentField.PositionDateType"] = "PositionDateTypeType"
char_type_def["CThostFtdcInstrumentField.LongMarginRatio"] = "RatioType"
char_type_def["CThostFtdcInstrumentField.ShortMarginRatio"] = "RatioType"
char_type_def["CThostFtdcInstrumentField.MaxMarginSideAlgorithm"] = "MaxMarginSideAlgorithmType"
char_type_def["CThostFtdcInstrumentField.UnderlyingInstrID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentField.StrikePrice"] = "PriceType"
char_type_def["CThostFtdcInstrumentField.OptionsType"] = "OptionsTypeType"
char_type_def["CThostFtdcInstrumentField.UnderlyingMultiple"] = "UnderlyingMultipleType"
char_type_def["CThostFtdcInstrumentField.CombinationType"] = "CombinationTypeType"
char_type_def["CThostFtdcBrokerField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerField.BrokerAbbr"] = "BrokerAbbrType"
char_type_def["CThostFtdcBrokerField.BrokerName"] = "BrokerNameType"
char_type_def["CThostFtdcBrokerField.IsActive"] = "BoolType"
char_type_def["CThostFtdcTraderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcTraderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcTraderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcTraderField.Password"] = "PasswordType"
char_type_def["CThostFtdcTraderField.InstallCount"] = "InstallCountType"
char_type_def["CThostFtdcTraderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorField.InvestorGroupID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorField.InvestorName"] = "PartyNameType"
char_type_def["CThostFtdcInvestorField.IdentifiedCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcInvestorField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcInvestorField.IsActive"] = "BoolType"
char_type_def["CThostFtdcInvestorField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcInvestorField.Address"] = "AddressType"
char_type_def["CThostFtdcInvestorField.OpenDate"] = "DateType"
char_type_def["CThostFtdcInvestorField.Mobile"] = "MobileType"
char_type_def["CThostFtdcInvestorField.CommModelID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorField.MarginModelID"] = "InvestorIDType"
char_type_def["CThostFtdcTradingCodeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcTradingCodeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingCodeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcTradingCodeField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcTradingCodeField.IsActive"] = "BoolType"
char_type_def["CThostFtdcTradingCodeField.ClientIDType"] = "ClientIDTypeType"
char_type_def["CThostFtdcTradingCodeField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcTradingCodeField.BizType"] = "BizTypeType"
char_type_def["CThostFtdcTradingCodeField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcPartBrokerField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcPartBrokerField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcPartBrokerField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcPartBrokerField.IsActive"] = "BoolType"
char_type_def["CThostFtdcSuperUserField.UserID"] = "UserIDType"
char_type_def["CThostFtdcSuperUserField.UserName"] = "UserNameType"
char_type_def["CThostFtdcSuperUserField.Password"] = "PasswordType"
char_type_def["CThostFtdcSuperUserField.IsActive"] = "BoolType"
char_type_def["CThostFtdcSuperUserFunctionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcSuperUserFunctionField.FunctionCode"] = "FunctionCodeType"
char_type_def["CThostFtdcInvestorGroupField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorGroupField.InvestorGroupID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorGroupField.InvestorGroupName"] = "InvestorGroupNameType"
char_type_def["CThostFtdcTradingAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcTradingAccountField.PreMortgage"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.PreCredit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.PreDeposit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.PreBalance"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.PreMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.InterestBase"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Interest"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Deposit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Withdraw"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.FrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.FrozenCash"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.FrozenCommission"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.CurrMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.CashIn"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Commission"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.CloseProfit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.PositionProfit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Balance"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Available"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.WithdrawQuota"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Reserve"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.TradingDay"] = "DateType"
char_type_def["CThostFtdcTradingAccountField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcTradingAccountField.Credit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.Mortgage"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.ExchangeMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.DeliveryMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.ExchangeDeliveryMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.ReserveBalance"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcTradingAccountField.PreFundMortgageIn"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.PreFundMortgageOut"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.FundMortgageIn"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.FundMortgageOut"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.FundMortgageAvailable"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.MortgageableFund"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductFrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductCommission"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductFrozenCommission"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductPositionProfit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductCloseProfit"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductPositionProfitByAlg"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.SpecProductExchangeMargin"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.BizType"] = "BizTypeType"
char_type_def["CThostFtdcTradingAccountField.FrozenSwap"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountField.RemainSwap"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInvestorPositionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorPositionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorPositionField.PosiDirection"] = "PosiDirectionType"
char_type_def["CThostFtdcInvestorPositionField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInvestorPositionField.PositionDate"] = "PositionDateType"
char_type_def["CThostFtdcInvestorPositionField.YdPosition"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.Position"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.LongFrozen"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.ShortFrozen"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.LongFrozenAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.ShortFrozenAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.OpenVolume"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.CloseVolume"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.OpenAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.CloseAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.PositionCost"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.PreMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.UseMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.FrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.FrozenCash"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.FrozenCommission"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.CashIn"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.Commission"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.CloseProfit"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.PositionProfit"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.PreSettlementPrice"] = "PriceType"
char_type_def["CThostFtdcInvestorPositionField.SettlementPrice"] = "PriceType"
char_type_def["CThostFtdcInvestorPositionField.TradingDay"] = "DateType"
char_type_def["CThostFtdcInvestorPositionField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcInvestorPositionField.OpenCost"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.ExchangeMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.CombPosition"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.CombLongFrozen"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.CombShortFrozen"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.CloseProfitByDate"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.CloseProfitByTrade"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.TodayPosition"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.MarginRateByMoney"] = "RatioType"
char_type_def["CThostFtdcInvestorPositionField.MarginRateByVolume"] = "RatioType"
char_type_def["CThostFtdcInvestorPositionField.StrikeFrozen"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.StrikeFrozenAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionField.AbandonFrozen"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInvestorPositionField.YdStrikeFrozen"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInstrumentMarginRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentMarginRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcInstrumentMarginRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInstrumentMarginRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInstrumentMarginRateField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInstrumentMarginRateField.LongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentMarginRateField.LongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcInstrumentMarginRateField.ShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentMarginRateField.ShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcInstrumentMarginRateField.IsRelative"] = "BoolType"
char_type_def["CThostFtdcInstrumentMarginRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInstrumentMarginRateField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInstrumentCommissionRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentCommissionRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcInstrumentCommissionRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInstrumentCommissionRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInstrumentCommissionRateField.OpenRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentCommissionRateField.OpenRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcInstrumentCommissionRateField.CloseRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentCommissionRateField.CloseRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcInstrumentCommissionRateField.CloseTodayRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentCommissionRateField.CloseTodayRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcInstrumentCommissionRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInstrumentCommissionRateField.BizType"] = "BizTypeType"
char_type_def["CThostFtdcInstrumentCommissionRateField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcDepthMarketDataField.TradingDay"] = "DateType"
char_type_def["CThostFtdcDepthMarketDataField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcDepthMarketDataField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcDepthMarketDataField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcDepthMarketDataField.LastPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.PreSettlementPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.PreClosePrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.PreOpenInterest"] = "LargeVolumeType"
char_type_def["CThostFtdcDepthMarketDataField.OpenPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.HighestPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.LowestPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.Volume"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.Turnover"] = "MoneyType"
char_type_def["CThostFtdcDepthMarketDataField.OpenInterest"] = "LargeVolumeType"
char_type_def["CThostFtdcDepthMarketDataField.ClosePrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.SettlementPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.UpperLimitPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.LowerLimitPrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.PreDelta"] = "RatioType"
char_type_def["CThostFtdcDepthMarketDataField.CurrDelta"] = "RatioType"
char_type_def["CThostFtdcDepthMarketDataField.UpdateTime"] = "TimeType"
char_type_def["CThostFtdcDepthMarketDataField.UpdateMillisec"] = "MillisecType"
char_type_def["CThostFtdcDepthMarketDataField.BidPrice1"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.BidVolume1"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.AskPrice1"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.AskVolume1"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.BidPrice2"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.BidVolume2"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.AskPrice2"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.AskVolume2"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.BidPrice3"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.BidVolume3"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.AskPrice3"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.AskVolume3"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.BidPrice4"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.BidVolume4"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.AskPrice4"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.AskVolume4"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.BidPrice5"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.BidVolume5"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.AskPrice5"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.AskVolume5"] = "VolumeType"
char_type_def["CThostFtdcDepthMarketDataField.AveragePrice"] = "PriceType"
char_type_def["CThostFtdcDepthMarketDataField.ActionDay"] = "DateType"
char_type_def["CThostFtdcInstrumentTradingRightField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentTradingRightField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcInstrumentTradingRightField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInstrumentTradingRightField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInstrumentTradingRightField.TradingRight"] = "TradingRightType"
char_type_def["CThostFtdcBrokerUserField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerUserField.UserID"] = "UserIDType"
char_type_def["CThostFtdcBrokerUserField.UserName"] = "UserNameType"
char_type_def["CThostFtdcBrokerUserField.UserType"] = "UserTypeType"
char_type_def["CThostFtdcBrokerUserField.IsActive"] = "BoolType"
char_type_def["CThostFtdcBrokerUserField.IsUsingOTP"] = "BoolType"
char_type_def["CThostFtdcBrokerUserField.IsAuthForce"] = "BoolType"
char_type_def["CThostFtdcBrokerUserPasswordField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerUserPasswordField.UserID"] = "UserIDType"
char_type_def["CThostFtdcBrokerUserPasswordField.Password"] = "PasswordType"
char_type_def["CThostFtdcBrokerUserPasswordField.LastUpdateTime"] = "DateTimeType"
char_type_def["CThostFtdcBrokerUserPasswordField.LastLoginTime"] = "DateTimeType"
char_type_def["CThostFtdcBrokerUserPasswordField.ExpireDate"] = "DateType"
char_type_def["CThostFtdcBrokerUserPasswordField.WeakExpireDate"] = "DateType"
char_type_def["CThostFtdcBrokerUserFunctionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerUserFunctionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcBrokerUserFunctionField.BrokerFunctionCode"] = "BrokerFunctionCodeType"
char_type_def["CThostFtdcTraderOfferField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcTraderOfferField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcTraderOfferField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcTraderOfferField.Password"] = "PasswordType"
char_type_def["CThostFtdcTraderOfferField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcTraderOfferField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcTraderOfferField.TraderConnectStatus"] = "TraderConnectStatusType"
char_type_def["CThostFtdcTraderOfferField.ConnectRequestDate"] = "DateType"
char_type_def["CThostFtdcTraderOfferField.ConnectRequestTime"] = "TimeType"
char_type_def["CThostFtdcTraderOfferField.LastReportDate"] = "DateType"
char_type_def["CThostFtdcTraderOfferField.LastReportTime"] = "TimeType"
char_type_def["CThostFtdcTraderOfferField.ConnectDate"] = "DateType"
char_type_def["CThostFtdcTraderOfferField.ConnectTime"] = "TimeType"
char_type_def["CThostFtdcTraderOfferField.StartDate"] = "DateType"
char_type_def["CThostFtdcTraderOfferField.StartTime"] = "TimeType"
char_type_def["CThostFtdcTraderOfferField.TradingDay"] = "DateType"
char_type_def["CThostFtdcTraderOfferField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTraderOfferField.MaxTradeID"] = "TradeIDType"
char_type_def["CThostFtdcTraderOfferField.MaxOrderMessageReference"] = "ReturnCodeType"
char_type_def["CThostFtdcSettlementInfoField.TradingDay"] = "DateType"
char_type_def["CThostFtdcSettlementInfoField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcSettlementInfoField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSettlementInfoField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSettlementInfoField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcSettlementInfoField.Content"] = "ContentType"
char_type_def["CThostFtdcSettlementInfoField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcSettlementInfoField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.LongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.LongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.ShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.ShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcInstrumentMarginRateAdjustField.IsRelative"] = "BoolType"
char_type_def["CThostFtdcExchangeMarginRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcExchangeMarginRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcExchangeMarginRateField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeMarginRateField.LongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateField.LongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeMarginRateField.ShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateField.ShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeMarginRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.LongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.LongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.ShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.ShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.ExchLongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.ExchLongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.ExchShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.ExchShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.NoLongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.NoLongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.NoShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcExchangeMarginRateAdjustField.NoShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcExchangeRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcExchangeRateField.FromCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcExchangeRateField.FromCurrencyUnit"] = "CurrencyUnitType"
char_type_def["CThostFtdcExchangeRateField.ToCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcExchangeRateField.ExchangeRate"] = "ExchangeRateType"
char_type_def["CThostFtdcSettlementRefField.TradingDay"] = "DateType"
char_type_def["CThostFtdcSettlementRefField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcCurrentTimeField.CurrDate"] = "DateType"
char_type_def["CThostFtdcCurrentTimeField.CurrTime"] = "TimeType"
char_type_def["CThostFtdcCurrentTimeField.CurrMillisec"] = "MillisecType"
char_type_def["CThostFtdcCurrentTimeField.ActionDay"] = "DateType"
char_type_def["CThostFtdcCommPhaseField.TradingDay"] = "DateType"
char_type_def["CThostFtdcCommPhaseField.CommPhaseNo"] = "CommPhaseNoType"
char_type_def["CThostFtdcCommPhaseField.SystemID"] = "SystemIDType"
char_type_def["CThostFtdcLoginInfoField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcLoginInfoField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcLoginInfoField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcLoginInfoField.UserID"] = "UserIDType"
char_type_def["CThostFtdcLoginInfoField.LoginDate"] = "DateType"
char_type_def["CThostFtdcLoginInfoField.LoginTime"] = "TimeType"
char_type_def["CThostFtdcLoginInfoField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcLoginInfoField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcLoginInfoField.InterfaceProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcLoginInfoField.ProtocolInfo"] = "ProtocolInfoType"
char_type_def["CThostFtdcLoginInfoField.SystemName"] = "SystemNameType"
char_type_def["CThostFtdcLoginInfoField.PasswordDeprecated"] = "PasswordType"
char_type_def["CThostFtdcLoginInfoField.MaxOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcLoginInfoField.SHFETime"] = "TimeType"
char_type_def["CThostFtdcLoginInfoField.DCETime"] = "TimeType"
char_type_def["CThostFtdcLoginInfoField.CZCETime"] = "TimeType"
char_type_def["CThostFtdcLoginInfoField.FFEXTime"] = "TimeType"
char_type_def["CThostFtdcLoginInfoField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcLoginInfoField.OneTimePassword"] = "PasswordType"
char_type_def["CThostFtdcLoginInfoField.INETime"] = "TimeType"
char_type_def["CThostFtdcLoginInfoField.IsQryControl"] = "BoolType"
char_type_def["CThostFtdcLoginInfoField.LoginRemark"] = "LoginRemarkType"
char_type_def["CThostFtdcLoginInfoField.Password"] = "PasswordType"
char_type_def["CThostFtdcLogoutAllField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcLogoutAllField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcLogoutAllField.SystemName"] = "SystemNameType"
char_type_def["CThostFtdcFrontStatusField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcFrontStatusField.LastReportDate"] = "DateType"
char_type_def["CThostFtdcFrontStatusField.LastReportTime"] = "TimeType"
char_type_def["CThostFtdcFrontStatusField.IsActive"] = "BoolType"
char_type_def["CThostFtdcUserPasswordUpdateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcUserPasswordUpdateField.UserID"] = "UserIDType"
char_type_def["CThostFtdcUserPasswordUpdateField.OldPassword"] = "PasswordType"
char_type_def["CThostFtdcUserPasswordUpdateField.NewPassword"] = "PasswordType"
char_type_def["CThostFtdcInputOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputOrderField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcInputOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputOrderField.OrderPriceType"] = "OrderPriceTypeType"
char_type_def["CThostFtdcInputOrderField.Direction"] = "DirectionType"
char_type_def["CThostFtdcInputOrderField.CombOffsetFlag"] = "CombOffsetFlagType"
char_type_def["CThostFtdcInputOrderField.CombHedgeFlag"] = "CombHedgeFlagType"
char_type_def["CThostFtdcInputOrderField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcInputOrderField.VolumeTotalOriginal"] = "VolumeType"
char_type_def["CThostFtdcInputOrderField.TimeCondition"] = "TimeConditionType"
char_type_def["CThostFtdcInputOrderField.GTDDate"] = "DateType"
char_type_def["CThostFtdcInputOrderField.VolumeCondition"] = "VolumeConditionType"
char_type_def["CThostFtdcInputOrderField.MinVolume"] = "VolumeType"
char_type_def["CThostFtdcInputOrderField.ContingentCondition"] = "ContingentConditionType"
char_type_def["CThostFtdcInputOrderField.StopPrice"] = "PriceType"
char_type_def["CThostFtdcInputOrderField.ForceCloseReason"] = "ForceCloseReasonType"
char_type_def["CThostFtdcInputOrderField.IsAutoSuspend"] = "BoolType"
char_type_def["CThostFtdcInputOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcInputOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputOrderField.UserForceClose"] = "BoolType"
char_type_def["CThostFtdcInputOrderField.IsSwapOrder"] = "BoolType"
char_type_def["CThostFtdcInputOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcInputOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcInputOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcInputOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOrderField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcOrderField.OrderPriceType"] = "OrderPriceTypeType"
char_type_def["CThostFtdcOrderField.Direction"] = "DirectionType"
char_type_def["CThostFtdcOrderField.CombOffsetFlag"] = "CombOffsetFlagType"
char_type_def["CThostFtdcOrderField.CombHedgeFlag"] = "CombHedgeFlagType"
char_type_def["CThostFtdcOrderField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcOrderField.VolumeTotalOriginal"] = "VolumeType"
char_type_def["CThostFtdcOrderField.TimeCondition"] = "TimeConditionType"
char_type_def["CThostFtdcOrderField.GTDDate"] = "DateType"
char_type_def["CThostFtdcOrderField.VolumeCondition"] = "VolumeConditionType"
char_type_def["CThostFtdcOrderField.MinVolume"] = "VolumeType"
char_type_def["CThostFtdcOrderField.ContingentCondition"] = "ContingentConditionType"
char_type_def["CThostFtdcOrderField.StopPrice"] = "PriceType"
char_type_def["CThostFtdcOrderField.ForceCloseReason"] = "ForceCloseReasonType"
char_type_def["CThostFtdcOrderField.IsAutoSuspend"] = "BoolType"
char_type_def["CThostFtdcOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcOrderField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcOrderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcOrderField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcOrderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcOrderField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcOrderField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcOrderField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcOrderField.TradingDay"] = "DateType"
char_type_def["CThostFtdcOrderField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcOrderField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcOrderField.OrderSource"] = "OrderSourceType"
char_type_def["CThostFtdcOrderField.OrderStatus"] = "OrderStatusType"
char_type_def["CThostFtdcOrderField.OrderType"] = "OrderTypeType"
char_type_def["CThostFtdcOrderField.VolumeTraded"] = "VolumeType"
char_type_def["CThostFtdcOrderField.VolumeTotal"] = "VolumeType"
char_type_def["CThostFtdcOrderField.InsertDate"] = "DateType"
char_type_def["CThostFtdcOrderField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcOrderField.ActiveTime"] = "TimeType"
char_type_def["CThostFtdcOrderField.SuspendTime"] = "TimeType"
char_type_def["CThostFtdcOrderField.UpdateTime"] = "TimeType"
char_type_def["CThostFtdcOrderField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcOrderField.ActiveTraderID"] = "TraderIDType"
char_type_def["CThostFtdcOrderField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcOrderField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcOrderField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcOrderField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcOrderField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcOrderField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcOrderField.UserForceClose"] = "BoolType"
char_type_def["CThostFtdcOrderField.ActiveUserID"] = "UserIDType"
char_type_def["CThostFtdcOrderField.BrokerOrderSeq"] = "SequenceNoType"
char_type_def["CThostFtdcOrderField.RelativeOrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcOrderField.ZCETotalTradedVolume"] = "VolumeType"
char_type_def["CThostFtdcOrderField.IsSwapOrder"] = "BoolType"
char_type_def["CThostFtdcOrderField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExchangeOrderField.OrderPriceType"] = "OrderPriceTypeType"
char_type_def["CThostFtdcExchangeOrderField.Direction"] = "DirectionType"
char_type_def["CThostFtdcExchangeOrderField.CombOffsetFlag"] = "CombOffsetFlagType"
char_type_def["CThostFtdcExchangeOrderField.CombHedgeFlag"] = "CombHedgeFlagType"
char_type_def["CThostFtdcExchangeOrderField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcExchangeOrderField.VolumeTotalOriginal"] = "VolumeType"
char_type_def["CThostFtdcExchangeOrderField.TimeCondition"] = "TimeConditionType"
char_type_def["CThostFtdcExchangeOrderField.GTDDate"] = "DateType"
char_type_def["CThostFtdcExchangeOrderField.VolumeCondition"] = "VolumeConditionType"
char_type_def["CThostFtdcExchangeOrderField.MinVolume"] = "VolumeType"
char_type_def["CThostFtdcExchangeOrderField.ContingentCondition"] = "ContingentConditionType"
char_type_def["CThostFtdcExchangeOrderField.StopPrice"] = "PriceType"
char_type_def["CThostFtdcExchangeOrderField.ForceCloseReason"] = "ForceCloseReasonType"
char_type_def["CThostFtdcExchangeOrderField.IsAutoSuspend"] = "BoolType"
char_type_def["CThostFtdcExchangeOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcExchangeOrderField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeOrderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeOrderField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExchangeOrderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeOrderField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeOrderField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcExchangeOrderField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeOrderField.TradingDay"] = "DateType"
char_type_def["CThostFtdcExchangeOrderField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcExchangeOrderField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeOrderField.OrderSource"] = "OrderSourceType"
char_type_def["CThostFtdcExchangeOrderField.OrderStatus"] = "OrderStatusType"
char_type_def["CThostFtdcExchangeOrderField.OrderType"] = "OrderTypeType"
char_type_def["CThostFtdcExchangeOrderField.VolumeTraded"] = "VolumeType"
char_type_def["CThostFtdcExchangeOrderField.VolumeTotal"] = "VolumeType"
char_type_def["CThostFtdcExchangeOrderField.InsertDate"] = "DateType"
char_type_def["CThostFtdcExchangeOrderField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOrderField.ActiveTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOrderField.SuspendTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOrderField.UpdateTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOrderField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOrderField.ActiveTraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeOrderField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeOrderField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeOrderField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExchangeOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExchangeOrderInsertErrorField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeOrderInsertErrorField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeOrderInsertErrorField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeOrderInsertErrorField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeOrderInsertErrorField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOrderInsertErrorField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcExchangeOrderInsertErrorField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcInputOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputOrderActionField.OrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcInputOrderActionField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcInputOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcInputOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcInputOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputOrderActionField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcInputOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcInputOrderActionField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcInputOrderActionField.VolumeChange"] = "VolumeType"
char_type_def["CThostFtdcInputOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOrderActionField.OrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcOrderActionField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcOrderActionField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcOrderActionField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcOrderActionField.VolumeChange"] = "VolumeType"
char_type_def["CThostFtdcOrderActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcOrderActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcOrderActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcOrderActionField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcOrderActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcOrderActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcOrderActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcOrderActionField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOrderActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExchangeOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeOrderActionField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcExchangeOrderActionField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcExchangeOrderActionField.VolumeChange"] = "VolumeType"
char_type_def["CThostFtdcExchangeOrderActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcExchangeOrderActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeOrderActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeOrderActionField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOrderActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeOrderActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeOrderActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcExchangeOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcExchangeOrderActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExchangeOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcExchangeOrderActionErrorField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcExchangeTradeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeTradeField.TradeID"] = "TradeIDType"
char_type_def["CThostFtdcExchangeTradeField.Direction"] = "DirectionType"
char_type_def["CThostFtdcExchangeTradeField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeTradeField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeTradeField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeTradeField.TradingRole"] = "TradingRoleType"
char_type_def["CThostFtdcExchangeTradeField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExchangeTradeField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcExchangeTradeField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeTradeField.Price"] = "PriceType"
char_type_def["CThostFtdcExchangeTradeField.Volume"] = "VolumeType"
char_type_def["CThostFtdcExchangeTradeField.TradeDate"] = "DateType"
char_type_def["CThostFtdcExchangeTradeField.TradeTime"] = "TimeType"
char_type_def["CThostFtdcExchangeTradeField.TradeType"] = "TradeTypeType"
char_type_def["CThostFtdcExchangeTradeField.PriceSource"] = "PriceSourceType"
char_type_def["CThostFtdcExchangeTradeField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeTradeField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeTradeField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeTradeField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeTradeField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeTradeField.TradeSource"] = "TradeSourceType"
char_type_def["CThostFtdcTradeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcTradeField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcTradeField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcTradeField.UserID"] = "UserIDType"
char_type_def["CThostFtdcTradeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcTradeField.TradeID"] = "TradeIDType"
char_type_def["CThostFtdcTradeField.Direction"] = "DirectionType"
char_type_def["CThostFtdcTradeField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcTradeField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcTradeField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcTradeField.TradingRole"] = "TradingRoleType"
char_type_def["CThostFtdcTradeField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcTradeField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcTradeField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcTradeField.Price"] = "PriceType"
char_type_def["CThostFtdcTradeField.Volume"] = "VolumeType"
char_type_def["CThostFtdcTradeField.TradeDate"] = "DateType"
char_type_def["CThostFtdcTradeField.TradeTime"] = "TimeType"
char_type_def["CThostFtdcTradeField.TradeType"] = "TradeTypeType"
char_type_def["CThostFtdcTradeField.PriceSource"] = "PriceSourceType"
char_type_def["CThostFtdcTradeField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcTradeField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcTradeField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcTradeField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcTradeField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcTradeField.TradingDay"] = "DateType"
char_type_def["CThostFtdcTradeField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcTradeField.BrokerOrderSeq"] = "SequenceNoType"
char_type_def["CThostFtdcTradeField.TradeSource"] = "TradeSourceType"
char_type_def["CThostFtdcTradeField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcUserSessionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcUserSessionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcUserSessionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcUserSessionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcUserSessionField.LoginDate"] = "DateType"
char_type_def["CThostFtdcUserSessionField.LoginTime"] = "TimeType"
char_type_def["CThostFtdcUserSessionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcUserSessionField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcUserSessionField.InterfaceProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcUserSessionField.ProtocolInfo"] = "ProtocolInfoType"
char_type_def["CThostFtdcUserSessionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcUserSessionField.LoginRemark"] = "LoginRemarkType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.Direction"] = "DirectionType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.MaxVolume"] = "VolumeType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcSettlementInfoConfirmField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSettlementInfoConfirmField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSettlementInfoConfirmField.ConfirmDate"] = "DateType"
char_type_def["CThostFtdcSettlementInfoConfirmField.ConfirmTime"] = "TimeType"
char_type_def["CThostFtdcSettlementInfoConfirmField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcSettlementInfoConfirmField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcSettlementInfoConfirmField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSyncDepositField.DepositSeqNo"] = "DepositSeqNoType"
char_type_def["CThostFtdcSyncDepositField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncDepositField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncDepositField.Deposit"] = "MoneyType"
char_type_def["CThostFtdcSyncDepositField.IsForce"] = "BoolType"
char_type_def["CThostFtdcSyncDepositField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSyncFundMortgageField.MortgageSeqNo"] = "DepositSeqNoType"
char_type_def["CThostFtdcSyncFundMortgageField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncFundMortgageField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncFundMortgageField.FromCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSyncFundMortgageField.MortgageAmount"] = "MoneyType"
char_type_def["CThostFtdcSyncFundMortgageField.ToCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcBrokerSyncField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingInvestorField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInvestorField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingInvestorField.InvestorGroupID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInvestorField.InvestorName"] = "PartyNameType"
char_type_def["CThostFtdcSyncingInvestorField.IdentifiedCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcSyncingInvestorField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcSyncingInvestorField.IsActive"] = "BoolType"
char_type_def["CThostFtdcSyncingInvestorField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcSyncingInvestorField.Address"] = "AddressType"
char_type_def["CThostFtdcSyncingInvestorField.OpenDate"] = "DateType"
char_type_def["CThostFtdcSyncingInvestorField.Mobile"] = "MobileType"
char_type_def["CThostFtdcSyncingInvestorField.CommModelID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInvestorField.MarginModelID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingTradingCodeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingTradingCodeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingTradingCodeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcSyncingTradingCodeField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcSyncingTradingCodeField.IsActive"] = "BoolType"
char_type_def["CThostFtdcSyncingTradingCodeField.ClientIDType"] = "ClientIDTypeType"
char_type_def["CThostFtdcSyncingInvestorGroupField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingInvestorGroupField.InvestorGroupID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInvestorGroupField.InvestorGroupName"] = "InvestorGroupNameType"
char_type_def["CThostFtdcSyncingTradingAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingTradingAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcSyncingTradingAccountField.PreMortgage"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.PreCredit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.PreDeposit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.PreBalance"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.PreMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.InterestBase"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Interest"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Deposit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Withdraw"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.FrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.FrozenCash"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.FrozenCommission"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.CurrMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.CashIn"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Commission"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.CloseProfit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.PositionProfit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Balance"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Available"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.WithdrawQuota"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Reserve"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.TradingDay"] = "DateType"
char_type_def["CThostFtdcSyncingTradingAccountField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcSyncingTradingAccountField.Credit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.Mortgage"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.ExchangeMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.DeliveryMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.ExchangeDeliveryMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.ReserveBalance"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSyncingTradingAccountField.PreFundMortgageIn"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.PreFundMortgageOut"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.FundMortgageIn"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.FundMortgageOut"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.FundMortgageAvailable"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.MortgageableFund"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductFrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductCommission"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductFrozenCommission"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductPositionProfit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductCloseProfit"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductPositionProfitByAlg"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.SpecProductExchangeMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.FrozenSwap"] = "MoneyType"
char_type_def["CThostFtdcSyncingTradingAccountField.RemainSwap"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcSyncingInvestorPositionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingInvestorPositionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInvestorPositionField.PosiDirection"] = "PosiDirectionType"
char_type_def["CThostFtdcSyncingInvestorPositionField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcSyncingInvestorPositionField.PositionDate"] = "PositionDateType"
char_type_def["CThostFtdcSyncingInvestorPositionField.YdPosition"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.Position"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.LongFrozen"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.ShortFrozen"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.LongFrozenAmount"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.ShortFrozenAmount"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.OpenVolume"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CloseVolume"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.OpenAmount"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CloseAmount"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.PositionCost"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.PreMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.UseMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.FrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.FrozenCash"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.FrozenCommission"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CashIn"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.Commission"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CloseProfit"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.PositionProfit"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.PreSettlementPrice"] = "PriceType"
char_type_def["CThostFtdcSyncingInvestorPositionField.SettlementPrice"] = "PriceType"
char_type_def["CThostFtdcSyncingInvestorPositionField.TradingDay"] = "DateType"
char_type_def["CThostFtdcSyncingInvestorPositionField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcSyncingInvestorPositionField.OpenCost"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.ExchangeMargin"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CombPosition"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CombLongFrozen"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CombShortFrozen"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CloseProfitByDate"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.CloseProfitByTrade"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.TodayPosition"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.MarginRateByMoney"] = "RatioType"
char_type_def["CThostFtdcSyncingInvestorPositionField.MarginRateByVolume"] = "RatioType"
char_type_def["CThostFtdcSyncingInvestorPositionField.StrikeFrozen"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.StrikeFrozenAmount"] = "MoneyType"
char_type_def["CThostFtdcSyncingInvestorPositionField.AbandonFrozen"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcSyncingInvestorPositionField.YdStrikeFrozen"] = "VolumeType"
char_type_def["CThostFtdcSyncingInvestorPositionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.LongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.LongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.ShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.ShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcSyncingInstrumentMarginRateField.IsRelative"] = "BoolType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.OpenRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.OpenRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.CloseRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.CloseRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.CloseTodayRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentCommissionRateField.CloseTodayRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcSyncingInstrumentTradingRightField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcSyncingInstrumentTradingRightField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcSyncingInstrumentTradingRightField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncingInstrumentTradingRightField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncingInstrumentTradingRightField.TradingRight"] = "TradingRightType"
char_type_def["CThostFtdcQryOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryOrderField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQryOrderField.InsertTimeStart"] = "TimeType"
char_type_def["CThostFtdcQryOrderField.InsertTimeEnd"] = "TimeType"
char_type_def["CThostFtdcQryOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryTradeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryTradeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryTradeField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryTradeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryTradeField.TradeID"] = "TradeIDType"
char_type_def["CThostFtdcQryTradeField.TradeTimeStart"] = "TimeType"
char_type_def["CThostFtdcQryTradeField.TradeTimeEnd"] = "TimeType"
char_type_def["CThostFtdcQryTradeField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryInvestorPositionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInvestorPositionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInvestorPositionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryInvestorPositionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInvestorPositionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryTradingAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryTradingAccountField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryTradingAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryTradingAccountField.BizType"] = "BizTypeType"
char_type_def["CThostFtdcQryTradingAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQryInvestorField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInvestorField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryTradingCodeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryTradingCodeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryTradingCodeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryTradingCodeField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryTradingCodeField.ClientIDType"] = "ClientIDTypeType"
char_type_def["CThostFtdcQryTradingCodeField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryInvestorGroupField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInstrumentMarginRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInstrumentMarginRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInstrumentMarginRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryInstrumentMarginRateField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQryInstrumentMarginRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInstrumentMarginRateField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryInstrumentCommissionRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInstrumentCommissionRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInstrumentCommissionRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryInstrumentCommissionRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInstrumentCommissionRateField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryInstrumentTradingRightField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInstrumentTradingRightField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInstrumentTradingRightField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryBrokerField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryTraderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryTraderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryTraderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQrySuperUserFunctionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQryUserSessionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcQryUserSessionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcQryUserSessionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryUserSessionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQryPartBrokerField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryPartBrokerField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryPartBrokerField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryFrontStatusField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcQryExchangeOrderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeOrderField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcQryExchangeOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeOrderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQryOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQrySuperUserField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQryExchangeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryProductField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryProductField.ProductClass"] = "ProductClassType"
char_type_def["CThostFtdcQryProductField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInstrumentField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryInstrumentField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInstrumentField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcQryInstrumentField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryDepthMarketDataField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryDepthMarketDataField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryBrokerUserField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryBrokerUserField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQryBrokerUserFunctionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryBrokerUserFunctionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQryTraderOfferField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryTraderOfferField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryTraderOfferField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQrySyncDepositField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQrySyncDepositField.DepositSeqNo"] = "DepositSeqNoType"
char_type_def["CThostFtdcQrySettlementInfoField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQrySettlementInfoField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQrySettlementInfoField.TradingDay"] = "DateType"
char_type_def["CThostFtdcQrySettlementInfoField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQrySettlementInfoField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryExchangeMarginRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryExchangeMarginRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryExchangeMarginRateField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQryExchangeMarginRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeMarginRateAdjustField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryExchangeMarginRateAdjustField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryExchangeMarginRateAdjustField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQryExchangeRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryExchangeRateField.FromCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryExchangeRateField.ToCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQrySyncFundMortgageField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQrySyncFundMortgageField.MortgageSeqNo"] = "DepositSeqNoType"
char_type_def["CThostFtdcQryHisOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryHisOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryHisOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryHisOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryHisOrderField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQryHisOrderField.InsertTimeStart"] = "TimeType"
char_type_def["CThostFtdcQryHisOrderField.InsertTimeEnd"] = "TimeType"
char_type_def["CThostFtdcQryHisOrderField.TradingDay"] = "DateType"
char_type_def["CThostFtdcQryHisOrderField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcOptionInstrMiniMarginField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionInstrMiniMarginField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcOptionInstrMiniMarginField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionInstrMiniMarginField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionInstrMiniMarginField.MinMargin"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrMiniMarginField.ValueMethod"] = "ValueMethodType"
char_type_def["CThostFtdcOptionInstrMiniMarginField.IsRelative"] = "BoolType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.SShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.SShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.HShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.HShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.AShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.AShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.IsRelative"] = "BoolType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.MShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrMarginAdjustField.MShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrCommRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionInstrCommRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcOptionInstrCommRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionInstrCommRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionInstrCommRateField.OpenRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.OpenRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.CloseRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.CloseRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.CloseTodayRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.CloseTodayRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.StrikeRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.StrikeRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcOptionInstrCommRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcOptionInstrCommRateField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcOptionInstrTradeCostField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionInstrTradeCostField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionInstrTradeCostField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionInstrTradeCostField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcOptionInstrTradeCostField.FixedMargin"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrTradeCostField.MiniMargin"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrTradeCostField.Royalty"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrTradeCostField.ExchFixedMargin"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrTradeCostField.ExchMiniMargin"] = "MoneyType"
char_type_def["CThostFtdcOptionInstrTradeCostField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcOptionInstrTradeCostField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.InputPrice"] = "PriceType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.UnderlyingPrice"] = "PriceType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryOptionInstrTradeCostField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryOptionInstrCommRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryOptionInstrCommRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryOptionInstrCommRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryOptionInstrCommRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryOptionInstrCommRateField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcIndexPriceField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcIndexPriceField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcIndexPriceField.ClosePrice"] = "PriceType"
char_type_def["CThostFtdcInputExecOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputExecOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputExecOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputExecOrderField.ExecOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcInputExecOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputExecOrderField.Volume"] = "VolumeType"
char_type_def["CThostFtdcInputExecOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputExecOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcInputExecOrderField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcInputExecOrderField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInputExecOrderField.ActionType"] = "ActionTypeType"
char_type_def["CThostFtdcInputExecOrderField.PosiDirection"] = "PosiDirectionType"
char_type_def["CThostFtdcInputExecOrderField.ReservePositionFlag"] = "ExecOrderPositionFlagType"
char_type_def["CThostFtdcInputExecOrderField.CloseFlag"] = "ExecOrderCloseFlagType"
char_type_def["CThostFtdcInputExecOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputExecOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputExecOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcInputExecOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcInputExecOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcInputExecOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputExecOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcInputExecOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputExecOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputExecOrderActionField.ExecOrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcInputExecOrderActionField.ExecOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcInputExecOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputExecOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcInputExecOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcInputExecOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputExecOrderActionField.ExecOrderSysID"] = "ExecOrderSysIDType"
char_type_def["CThostFtdcInputExecOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcInputExecOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputExecOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputExecOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputExecOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputExecOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExecOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcExecOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcExecOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcExecOrderField.ExecOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcExecOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcExecOrderField.Volume"] = "VolumeType"
char_type_def["CThostFtdcExecOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcExecOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExecOrderField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcExecOrderField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExecOrderField.ActionType"] = "ActionTypeType"
char_type_def["CThostFtdcExecOrderField.PosiDirection"] = "PosiDirectionType"
char_type_def["CThostFtdcExecOrderField.ReservePositionFlag"] = "ExecOrderPositionFlagType"
char_type_def["CThostFtdcExecOrderField.CloseFlag"] = "ExecOrderCloseFlagType"
char_type_def["CThostFtdcExecOrderField.ExecOrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExecOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExecOrderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExecOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExecOrderField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExecOrderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExecOrderField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExecOrderField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcExecOrderField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcExecOrderField.TradingDay"] = "DateType"
char_type_def["CThostFtdcExecOrderField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcExecOrderField.ExecOrderSysID"] = "ExecOrderSysIDType"
char_type_def["CThostFtdcExecOrderField.InsertDate"] = "DateType"
char_type_def["CThostFtdcExecOrderField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcExecOrderField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcExecOrderField.ExecResult"] = "ExecResultType"
char_type_def["CThostFtdcExecOrderField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcExecOrderField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExecOrderField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcExecOrderField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcExecOrderField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcExecOrderField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcExecOrderField.ActiveUserID"] = "UserIDType"
char_type_def["CThostFtdcExecOrderField.BrokerExecOrderSeq"] = "SequenceNoType"
char_type_def["CThostFtdcExecOrderField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExecOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcExecOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcExecOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcExecOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExecOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExecOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcExecOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcExecOrderActionField.ExecOrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcExecOrderActionField.ExecOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcExecOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcExecOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcExecOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcExecOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExecOrderActionField.ExecOrderSysID"] = "ExecOrderSysIDType"
char_type_def["CThostFtdcExecOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcExecOrderActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcExecOrderActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcExecOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExecOrderActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExecOrderActionField.ExecOrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExecOrderActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExecOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExecOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExecOrderActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExecOrderActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcExecOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcExecOrderActionField.ActionType"] = "ActionTypeType"
char_type_def["CThostFtdcExecOrderActionField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcExecOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcExecOrderActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExecOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcExecOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExecOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryExecOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryExecOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryExecOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryExecOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExecOrderField.ExecOrderSysID"] = "ExecOrderSysIDType"
char_type_def["CThostFtdcQryExecOrderField.InsertTimeStart"] = "TimeType"
char_type_def["CThostFtdcQryExecOrderField.InsertTimeEnd"] = "TimeType"
char_type_def["CThostFtdcExchangeExecOrderField.Volume"] = "VolumeType"
char_type_def["CThostFtdcExchangeExecOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcExchangeExecOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeExecOrderField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcExchangeExecOrderField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeExecOrderField.ActionType"] = "ActionTypeType"
char_type_def["CThostFtdcExchangeExecOrderField.PosiDirection"] = "PosiDirectionType"
char_type_def["CThostFtdcExchangeExecOrderField.ReservePositionFlag"] = "ExecOrderPositionFlagType"
char_type_def["CThostFtdcExchangeExecOrderField.CloseFlag"] = "ExecOrderCloseFlagType"
char_type_def["CThostFtdcExchangeExecOrderField.ExecOrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeExecOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeExecOrderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeExecOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeExecOrderField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExchangeExecOrderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeExecOrderField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeExecOrderField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcExchangeExecOrderField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeExecOrderField.TradingDay"] = "DateType"
char_type_def["CThostFtdcExchangeExecOrderField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcExchangeExecOrderField.ExecOrderSysID"] = "ExecOrderSysIDType"
char_type_def["CThostFtdcExchangeExecOrderField.InsertDate"] = "DateType"
char_type_def["CThostFtdcExchangeExecOrderField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcExchangeExecOrderField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcExchangeExecOrderField.ExecResult"] = "ExecResultType"
char_type_def["CThostFtdcExchangeExecOrderField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeExecOrderField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeExecOrderField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExchangeExecOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeExecOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryExchangeExecOrderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeExecOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeExecOrderField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcQryExchangeExecOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeExecOrderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQryExecOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryExecOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryExecOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ExecOrderSysID"] = "ExecOrderSysIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcExchangeExecOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ExecOrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeExecOrderActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcExchangeExecOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.ActionType"] = "ActionTypeType"
char_type_def["CThostFtdcExchangeExecOrderActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExchangeExecOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeExecOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryExchangeExecOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeExecOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeExecOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeExecOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcErrExecOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcErrExecOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrExecOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcErrExecOrderField.ExecOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcErrExecOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcErrExecOrderField.Volume"] = "VolumeType"
char_type_def["CThostFtdcErrExecOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcErrExecOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcErrExecOrderField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcErrExecOrderField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcErrExecOrderField.ActionType"] = "ActionTypeType"
char_type_def["CThostFtdcErrExecOrderField.PosiDirection"] = "PosiDirectionType"
char_type_def["CThostFtdcErrExecOrderField.ReservePositionFlag"] = "ExecOrderPositionFlagType"
char_type_def["CThostFtdcErrExecOrderField.CloseFlag"] = "ExecOrderCloseFlagType"
char_type_def["CThostFtdcErrExecOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcErrExecOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcErrExecOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcErrExecOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcErrExecOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcErrExecOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcErrExecOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcErrExecOrderField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcErrExecOrderField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcQryErrExecOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryErrExecOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrExecOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcErrExecOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrExecOrderActionField.ExecOrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcErrExecOrderActionField.ExecOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcErrExecOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcErrExecOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcErrExecOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcErrExecOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcErrExecOrderActionField.ExecOrderSysID"] = "ExecOrderSysIDType"
char_type_def["CThostFtdcErrExecOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcErrExecOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcErrExecOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcErrExecOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcErrExecOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcErrExecOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcErrExecOrderActionField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcErrExecOrderActionField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcQryErrExecOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryErrExecOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionInstrTradingRightField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionInstrTradingRightField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcOptionInstrTradingRightField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionInstrTradingRightField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionInstrTradingRightField.Direction"] = "DirectionType"
char_type_def["CThostFtdcOptionInstrTradingRightField.TradingRight"] = "TradingRightType"
char_type_def["CThostFtdcQryOptionInstrTradingRightField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryOptionInstrTradingRightField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryOptionInstrTradingRightField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryOptionInstrTradingRightField.Direction"] = "DirectionType"
char_type_def["CThostFtdcInputForQuoteField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputForQuoteField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputForQuoteField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputForQuoteField.ForQuoteRef"] = "OrderRefType"
char_type_def["CThostFtdcInputForQuoteField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputForQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputForQuoteField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputForQuoteField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputForQuoteField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcForQuoteField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcForQuoteField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcForQuoteField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcForQuoteField.ForQuoteRef"] = "OrderRefType"
char_type_def["CThostFtdcForQuoteField.UserID"] = "UserIDType"
char_type_def["CThostFtdcForQuoteField.ForQuoteLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcForQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcForQuoteField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcForQuoteField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcForQuoteField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcForQuoteField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcForQuoteField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcForQuoteField.InsertDate"] = "DateType"
char_type_def["CThostFtdcForQuoteField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcForQuoteField.ForQuoteStatus"] = "ForQuoteStatusType"
char_type_def["CThostFtdcForQuoteField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcForQuoteField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcForQuoteField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcForQuoteField.ActiveUserID"] = "UserIDType"
char_type_def["CThostFtdcForQuoteField.BrokerForQutoSeq"] = "SequenceNoType"
char_type_def["CThostFtdcForQuoteField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcForQuoteField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcForQuoteField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryForQuoteField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryForQuoteField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryForQuoteField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryForQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryForQuoteField.InsertTimeStart"] = "TimeType"
char_type_def["CThostFtdcQryForQuoteField.InsertTimeEnd"] = "TimeType"
char_type_def["CThostFtdcQryForQuoteField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcExchangeForQuoteField.ForQuoteLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeForQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeForQuoteField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeForQuoteField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeForQuoteField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExchangeForQuoteField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeForQuoteField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeForQuoteField.InsertDate"] = "DateType"
char_type_def["CThostFtdcExchangeForQuoteField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcExchangeForQuoteField.ForQuoteStatus"] = "ForQuoteStatusType"
char_type_def["CThostFtdcExchangeForQuoteField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeForQuoteField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryExchangeForQuoteField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeForQuoteField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeForQuoteField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcQryExchangeForQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeForQuoteField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcInputQuoteField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputQuoteField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputQuoteField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputQuoteField.QuoteRef"] = "OrderRefType"
char_type_def["CThostFtdcInputQuoteField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputQuoteField.AskPrice"] = "PriceType"
char_type_def["CThostFtdcInputQuoteField.BidPrice"] = "PriceType"
char_type_def["CThostFtdcInputQuoteField.AskVolume"] = "VolumeType"
char_type_def["CThostFtdcInputQuoteField.BidVolume"] = "VolumeType"
char_type_def["CThostFtdcInputQuoteField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputQuoteField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcInputQuoteField.AskOffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcInputQuoteField.BidOffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcInputQuoteField.AskHedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInputQuoteField.BidHedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInputQuoteField.AskOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcInputQuoteField.BidOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcInputQuoteField.ForQuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcInputQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputQuoteField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputQuoteField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcInputQuoteField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputQuoteField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcInputQuoteActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputQuoteActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputQuoteActionField.QuoteActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcInputQuoteActionField.QuoteRef"] = "OrderRefType"
char_type_def["CThostFtdcInputQuoteActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputQuoteActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcInputQuoteActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcInputQuoteActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputQuoteActionField.QuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcInputQuoteActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcInputQuoteActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputQuoteActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputQuoteActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputQuoteActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcInputQuoteActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputQuoteActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQuoteField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQuoteField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQuoteField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQuoteField.QuoteRef"] = "OrderRefType"
char_type_def["CThostFtdcQuoteField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQuoteField.AskPrice"] = "PriceType"
char_type_def["CThostFtdcQuoteField.BidPrice"] = "PriceType"
char_type_def["CThostFtdcQuoteField.AskVolume"] = "VolumeType"
char_type_def["CThostFtdcQuoteField.BidVolume"] = "VolumeType"
char_type_def["CThostFtdcQuoteField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcQuoteField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcQuoteField.AskOffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcQuoteField.BidOffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcQuoteField.AskHedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQuoteField.BidHedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQuoteField.QuoteLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQuoteField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQuoteField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQuoteField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcQuoteField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQuoteField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcQuoteField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcQuoteField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcQuoteField.TradingDay"] = "DateType"
char_type_def["CThostFtdcQuoteField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcQuoteField.QuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQuoteField.InsertDate"] = "DateType"
char_type_def["CThostFtdcQuoteField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcQuoteField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcQuoteField.QuoteStatus"] = "OrderStatusType"
char_type_def["CThostFtdcQuoteField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcQuoteField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcQuoteField.AskOrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQuoteField.BidOrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQuoteField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcQuoteField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcQuoteField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcQuoteField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcQuoteField.ActiveUserID"] = "UserIDType"
char_type_def["CThostFtdcQuoteField.BrokerQuoteSeq"] = "SequenceNoType"
char_type_def["CThostFtdcQuoteField.AskOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcQuoteField.BidOrderRef"] = "OrderRefType"
char_type_def["CThostFtdcQuoteField.ForQuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQuoteField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcQuoteField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQuoteField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQuoteField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQuoteField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcQuoteField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQuoteActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQuoteActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQuoteActionField.QuoteActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcQuoteActionField.QuoteRef"] = "OrderRefType"
char_type_def["CThostFtdcQuoteActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcQuoteActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcQuoteActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcQuoteActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQuoteActionField.QuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQuoteActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcQuoteActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcQuoteActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcQuoteActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQuoteActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcQuoteActionField.QuoteLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcQuoteActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcQuoteActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQuoteActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQuoteActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcQuoteActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcQuoteActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQuoteActionField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcQuoteActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQuoteActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcQuoteActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQuoteActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcQuoteActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryQuoteField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryQuoteField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryQuoteField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryQuoteField.QuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQryQuoteField.InsertTimeStart"] = "TimeType"
char_type_def["CThostFtdcQryQuoteField.InsertTimeEnd"] = "TimeType"
char_type_def["CThostFtdcQryQuoteField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcExchangeQuoteField.AskPrice"] = "PriceType"
char_type_def["CThostFtdcExchangeQuoteField.BidPrice"] = "PriceType"
char_type_def["CThostFtdcExchangeQuoteField.AskVolume"] = "VolumeType"
char_type_def["CThostFtdcExchangeQuoteField.BidVolume"] = "VolumeType"
char_type_def["CThostFtdcExchangeQuoteField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcExchangeQuoteField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeQuoteField.AskOffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcExchangeQuoteField.BidOffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcExchangeQuoteField.AskHedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeQuoteField.BidHedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeQuoteField.QuoteLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeQuoteField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeQuoteField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeQuoteField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExchangeQuoteField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeQuoteField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeQuoteField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeQuoteField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcExchangeQuoteField.TradingDay"] = "DateType"
char_type_def["CThostFtdcExchangeQuoteField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcExchangeQuoteField.QuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeQuoteField.InsertDate"] = "DateType"
char_type_def["CThostFtdcExchangeQuoteField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcExchangeQuoteField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcExchangeQuoteField.QuoteStatus"] = "OrderStatusType"
char_type_def["CThostFtdcExchangeQuoteField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeQuoteField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeQuoteField.AskOrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeQuoteField.BidOrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeQuoteField.ForQuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeQuoteField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExchangeQuoteField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeQuoteField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryExchangeQuoteField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeQuoteField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeQuoteField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcQryExchangeQuoteField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeQuoteField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQryQuoteActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryQuoteActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryQuoteActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.QuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcExchangeQuoteActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcExchangeQuoteActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcExchangeQuoteActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.QuoteLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeQuoteActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcExchangeQuoteActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcExchangeQuoteActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeQuoteActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryExchangeQuoteActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeQuoteActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeQuoteActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeQuoteActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcOptionInstrDeltaField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionInstrDeltaField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcOptionInstrDeltaField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionInstrDeltaField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionInstrDeltaField.Delta"] = "RatioType"
char_type_def["CThostFtdcForQuoteRspField.TradingDay"] = "DateType"
char_type_def["CThostFtdcForQuoteRspField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcForQuoteRspField.ForQuoteSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcForQuoteRspField.ForQuoteTime"] = "TimeType"
char_type_def["CThostFtdcForQuoteRspField.ActionDay"] = "DateType"
char_type_def["CThostFtdcForQuoteRspField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcStrikeOffsetField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcStrikeOffsetField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcStrikeOffsetField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcStrikeOffsetField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcStrikeOffsetField.Offset"] = "MoneyType"
char_type_def["CThostFtdcStrikeOffsetField.OffsetType"] = "StrikeOffsetTypeType"
char_type_def["CThostFtdcQryStrikeOffsetField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryStrikeOffsetField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryStrikeOffsetField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.OrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcInputBatchOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputBatchOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputBatchOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcBatchOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBatchOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcBatchOrderActionField.OrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcBatchOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcBatchOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcBatchOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcBatchOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcBatchOrderActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcBatchOrderActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcBatchOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcBatchOrderActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcBatchOrderActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcBatchOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcBatchOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcBatchOrderActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcBatchOrderActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcBatchOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcBatchOrderActionField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcBatchOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcBatchOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcBatchOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeBatchOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryBatchOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryBatchOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryBatchOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcCombInstrumentGuardField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCombInstrumentGuardField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcCombInstrumentGuardField.GuarantRatio"] = "RatioType"
char_type_def["CThostFtdcCombInstrumentGuardField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryCombInstrumentGuardField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryCombInstrumentGuardField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryCombInstrumentGuardField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputCombActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputCombActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputCombActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputCombActionField.CombActionRef"] = "OrderRefType"
char_type_def["CThostFtdcInputCombActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputCombActionField.Direction"] = "DirectionType"
char_type_def["CThostFtdcInputCombActionField.Volume"] = "VolumeType"
char_type_def["CThostFtdcInputCombActionField.CombDirection"] = "CombDirectionType"
char_type_def["CThostFtdcInputCombActionField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInputCombActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputCombActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputCombActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcInputCombActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcCombActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCombActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcCombActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcCombActionField.CombActionRef"] = "OrderRefType"
char_type_def["CThostFtdcCombActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcCombActionField.Direction"] = "DirectionType"
char_type_def["CThostFtdcCombActionField.Volume"] = "VolumeType"
char_type_def["CThostFtdcCombActionField.CombDirection"] = "CombDirectionType"
char_type_def["CThostFtdcCombActionField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcCombActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcCombActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcCombActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcCombActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcCombActionField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcCombActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcCombActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcCombActionField.ActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcCombActionField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcCombActionField.TradingDay"] = "DateType"
char_type_def["CThostFtdcCombActionField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcCombActionField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcCombActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcCombActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcCombActionField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcCombActionField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcCombActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcCombActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcCombActionField.ComTradeID"] = "TradeIDType"
char_type_def["CThostFtdcCombActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcCombActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryCombActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryCombActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryCombActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryCombActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryCombActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcExchangeCombActionField.Direction"] = "DirectionType"
char_type_def["CThostFtdcExchangeCombActionField.Volume"] = "VolumeType"
char_type_def["CThostFtdcExchangeCombActionField.CombDirection"] = "CombDirectionType"
char_type_def["CThostFtdcExchangeCombActionField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeCombActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeCombActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeCombActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeCombActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeCombActionField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExchangeCombActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeCombActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeCombActionField.ActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcExchangeCombActionField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeCombActionField.TradingDay"] = "DateType"
char_type_def["CThostFtdcExchangeCombActionField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcExchangeCombActionField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeCombActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeCombActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcExchangeCombActionField.ComTradeID"] = "TradeIDType"
char_type_def["CThostFtdcExchangeCombActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcQryExchangeCombActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryExchangeCombActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcQryExchangeCombActionField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcQryExchangeCombActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryExchangeCombActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcProductExchRateField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcProductExchRateField.QuoteCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcProductExchRateField.ExchangeRate"] = "ExchangeRateType"
char_type_def["CThostFtdcProductExchRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryProductExchRateField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryProductExchRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryForQuoteParamField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryForQuoteParamField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryForQuoteParamField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcForQuoteParamField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcForQuoteParamField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcForQuoteParamField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcForQuoteParamField.LastPrice"] = "PriceType"
char_type_def["CThostFtdcForQuoteParamField.PriceInterval"] = "PriceType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.OpenRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.OpenRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.CloseRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.CloseRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.CloseTodayRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.CloseTodayRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.StrikeRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcMMOptionInstrCommRateField.StrikeRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcQryMMOptionInstrCommRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryMMOptionInstrCommRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryMMOptionInstrCommRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.OpenRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.OpenRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.CloseRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.CloseRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.CloseTodayRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcMMInstrumentCommissionRateField.CloseTodayRatioByVolume"] = "RatioType"
char_type_def["CThostFtdcQryMMInstrumentCommissionRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryMMInstrumentCommissionRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryMMInstrumentCommissionRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.OrderCommByVolume"] = "RatioType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.OrderActionCommByVolume"] = "RatioType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInstrumentOrderCommRateField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryInstrumentOrderCommRateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInstrumentOrderCommRateField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInstrumentOrderCommRateField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcTradeParamField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradeParamField.TradeParamID"] = "TradeParamIDType"
char_type_def["CThostFtdcTradeParamField.TradeParamValue"] = "SettlementParamValueType"
char_type_def["CThostFtdcTradeParamField.Memo"] = "MemoType"
char_type_def["CThostFtdcInstrumentMarginRateULField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentMarginRateULField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcInstrumentMarginRateULField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInstrumentMarginRateULField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInstrumentMarginRateULField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInstrumentMarginRateULField.LongMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentMarginRateULField.LongMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcInstrumentMarginRateULField.ShortMarginRatioByMoney"] = "RatioType"
char_type_def["CThostFtdcInstrumentMarginRateULField.ShortMarginRatioByVolume"] = "MoneyType"
char_type_def["CThostFtdcFutureLimitPosiParamField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcFutureLimitPosiParamField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcFutureLimitPosiParamField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcFutureLimitPosiParamField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcFutureLimitPosiParamField.SpecOpenVolume"] = "VolumeType"
char_type_def["CThostFtdcFutureLimitPosiParamField.ArbiOpenVolume"] = "VolumeType"
char_type_def["CThostFtdcFutureLimitPosiParamField.OpenVolume"] = "VolumeType"
char_type_def["CThostFtdcLoginForbiddenIPField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcIPListField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcIPListField.IsWhite"] = "BoolType"
char_type_def["CThostFtdcInputOptionSelfCloseField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.OptionSelfCloseRef"] = "OrderRefType"
char_type_def["CThostFtdcInputOptionSelfCloseField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.Volume"] = "VolumeType"
char_type_def["CThostFtdcInputOptionSelfCloseField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcInputOptionSelfCloseField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInputOptionSelfCloseField.OptSelfCloseFlag"] = "OptSelfCloseFlagType"
char_type_def["CThostFtdcInputOptionSelfCloseField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcInputOptionSelfCloseField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputOptionSelfCloseField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.OptionSelfCloseActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.OptionSelfCloseRef"] = "OrderRefType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.OptionSelfCloseSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcInputOptionSelfCloseActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcOptionSelfCloseField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionSelfCloseField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionSelfCloseField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionSelfCloseField.OptionSelfCloseRef"] = "OrderRefType"
char_type_def["CThostFtdcOptionSelfCloseField.UserID"] = "UserIDType"
char_type_def["CThostFtdcOptionSelfCloseField.Volume"] = "VolumeType"
char_type_def["CThostFtdcOptionSelfCloseField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcOptionSelfCloseField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcOptionSelfCloseField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcOptionSelfCloseField.OptSelfCloseFlag"] = "OptSelfCloseFlagType"
char_type_def["CThostFtdcOptionSelfCloseField.OptionSelfCloseLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcOptionSelfCloseField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcOptionSelfCloseField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcOptionSelfCloseField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcOptionSelfCloseField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcOptionSelfCloseField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcOptionSelfCloseField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcOptionSelfCloseField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcOptionSelfCloseField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcOptionSelfCloseField.TradingDay"] = "DateType"
char_type_def["CThostFtdcOptionSelfCloseField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcOptionSelfCloseField.OptionSelfCloseSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcOptionSelfCloseField.InsertDate"] = "DateType"
char_type_def["CThostFtdcOptionSelfCloseField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcOptionSelfCloseField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcOptionSelfCloseField.ExecResult"] = "ExecResultType"
char_type_def["CThostFtdcOptionSelfCloseField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcOptionSelfCloseField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcOptionSelfCloseField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcOptionSelfCloseField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcOptionSelfCloseField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcOptionSelfCloseField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcOptionSelfCloseField.ActiveUserID"] = "UserIDType"
char_type_def["CThostFtdcOptionSelfCloseField.BrokerOptionSelfCloseSeq"] = "SequenceNoType"
char_type_def["CThostFtdcOptionSelfCloseField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcOptionSelfCloseField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcOptionSelfCloseField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcOptionSelfCloseField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcOptionSelfCloseField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcOptionSelfCloseField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcOptionSelfCloseActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.OptionSelfCloseActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcOptionSelfCloseActionField.OptionSelfCloseRef"] = "OrderRefType"
char_type_def["CThostFtdcOptionSelfCloseActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.OptionSelfCloseSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcOptionSelfCloseActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcOptionSelfCloseActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcOptionSelfCloseActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.OptionSelfCloseLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcOptionSelfCloseActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcOptionSelfCloseActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcOptionSelfCloseActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcOptionSelfCloseActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcOptionSelfCloseActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryOptionSelfCloseField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryOptionSelfCloseField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryOptionSelfCloseField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryOptionSelfCloseField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryOptionSelfCloseField.OptionSelfCloseSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcQryOptionSelfCloseField.InsertTimeStart"] = "TimeType"
char_type_def["CThostFtdcQryOptionSelfCloseField.InsertTimeEnd"] = "TimeType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.Volume"] = "VolumeType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.OptSelfCloseFlag"] = "OptSelfCloseFlagType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.OptionSelfCloseLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.TradingDay"] = "DateType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.OptionSelfCloseSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.InsertDate"] = "DateType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.ExecResult"] = "ExecResultType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeOptionSelfCloseField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryOptionSelfCloseActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryOptionSelfCloseActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryOptionSelfCloseActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.OptionSelfCloseSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.OptionSelfCloseLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcExchangeOptionSelfCloseActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcSyncDelaySwapField.DelaySwapSeqNo"] = "DepositSeqNoType"
char_type_def["CThostFtdcSyncDelaySwapField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSyncDelaySwapField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSyncDelaySwapField.FromCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSyncDelaySwapField.FromAmount"] = "MoneyType"
char_type_def["CThostFtdcSyncDelaySwapField.FromFrozenSwap"] = "MoneyType"
char_type_def["CThostFtdcSyncDelaySwapField.FromRemainSwap"] = "MoneyType"
char_type_def["CThostFtdcSyncDelaySwapField.ToCurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSyncDelaySwapField.ToAmount"] = "MoneyType"
char_type_def["CThostFtdcQrySyncDelaySwapField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQrySyncDelaySwapField.DelaySwapSeqNo"] = "DepositSeqNoType"
char_type_def["CThostFtdcInvestUnitField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestUnitField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestUnitField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInvestUnitField.InvestorUnitName"] = "PartyNameType"
char_type_def["CThostFtdcInvestUnitField.InvestorGroupID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestUnitField.CommModelID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestUnitField.MarginModelID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestUnitField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcInvestUnitField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryInvestUnitField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInvestUnitField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInvestUnitField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcSecAgentCheckModeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcSecAgentCheckModeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSecAgentCheckModeField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSecAgentCheckModeField.BrokerSecAgentID"] = "AccountIDType"
char_type_def["CThostFtdcSecAgentCheckModeField.CheckSelfAccount"] = "BoolType"
char_type_def["CThostFtdcMarketDataField.TradingDay"] = "DateType"
char_type_def["CThostFtdcMarketDataField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcMarketDataField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcMarketDataField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcMarketDataField.LastPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.PreSettlementPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.PreClosePrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.PreOpenInterest"] = "LargeVolumeType"
char_type_def["CThostFtdcMarketDataField.OpenPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.HighestPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.LowestPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.Volume"] = "VolumeType"
char_type_def["CThostFtdcMarketDataField.Turnover"] = "MoneyType"
char_type_def["CThostFtdcMarketDataField.OpenInterest"] = "LargeVolumeType"
char_type_def["CThostFtdcMarketDataField.ClosePrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.SettlementPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.UpperLimitPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.LowerLimitPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataField.PreDelta"] = "RatioType"
char_type_def["CThostFtdcMarketDataField.CurrDelta"] = "RatioType"
char_type_def["CThostFtdcMarketDataField.UpdateTime"] = "TimeType"
char_type_def["CThostFtdcMarketDataField.UpdateMillisec"] = "MillisecType"
char_type_def["CThostFtdcMarketDataField.ActionDay"] = "DateType"
char_type_def["CThostFtdcMarketDataBaseField.TradingDay"] = "DateType"
char_type_def["CThostFtdcMarketDataBaseField.PreSettlementPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataBaseField.PreClosePrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataBaseField.PreOpenInterest"] = "LargeVolumeType"
char_type_def["CThostFtdcMarketDataBaseField.PreDelta"] = "RatioType"
char_type_def["CThostFtdcMarketDataStaticField.OpenPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataStaticField.HighestPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataStaticField.LowestPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataStaticField.ClosePrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataStaticField.UpperLimitPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataStaticField.LowerLimitPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataStaticField.SettlementPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataStaticField.CurrDelta"] = "RatioType"
char_type_def["CThostFtdcMarketDataLastMatchField.LastPrice"] = "PriceType"
char_type_def["CThostFtdcMarketDataLastMatchField.Volume"] = "VolumeType"
char_type_def["CThostFtdcMarketDataLastMatchField.Turnover"] = "MoneyType"
char_type_def["CThostFtdcMarketDataLastMatchField.OpenInterest"] = "LargeVolumeType"
char_type_def["CThostFtdcMarketDataBestPriceField.BidPrice1"] = "PriceType"
char_type_def["CThostFtdcMarketDataBestPriceField.BidVolume1"] = "VolumeType"
char_type_def["CThostFtdcMarketDataBestPriceField.AskPrice1"] = "PriceType"
char_type_def["CThostFtdcMarketDataBestPriceField.AskVolume1"] = "VolumeType"
char_type_def["CThostFtdcMarketDataBid23Field.BidPrice2"] = "PriceType"
char_type_def["CThostFtdcMarketDataBid23Field.BidVolume2"] = "VolumeType"
char_type_def["CThostFtdcMarketDataBid23Field.BidPrice3"] = "PriceType"
char_type_def["CThostFtdcMarketDataBid23Field.BidVolume3"] = "VolumeType"
char_type_def["CThostFtdcMarketDataAsk23Field.AskPrice2"] = "PriceType"
char_type_def["CThostFtdcMarketDataAsk23Field.AskVolume2"] = "VolumeType"
char_type_def["CThostFtdcMarketDataAsk23Field.AskPrice3"] = "PriceType"
char_type_def["CThostFtdcMarketDataAsk23Field.AskVolume3"] = "VolumeType"
char_type_def["CThostFtdcMarketDataBid45Field.BidPrice4"] = "PriceType"
char_type_def["CThostFtdcMarketDataBid45Field.BidVolume4"] = "VolumeType"
char_type_def["CThostFtdcMarketDataBid45Field.BidPrice5"] = "PriceType"
char_type_def["CThostFtdcMarketDataBid45Field.BidVolume5"] = "VolumeType"
char_type_def["CThostFtdcMarketDataAsk45Field.AskPrice4"] = "PriceType"
char_type_def["CThostFtdcMarketDataAsk45Field.AskVolume4"] = "VolumeType"
char_type_def["CThostFtdcMarketDataAsk45Field.AskPrice5"] = "PriceType"
char_type_def["CThostFtdcMarketDataAsk45Field.AskVolume5"] = "VolumeType"
char_type_def["CThostFtdcMarketDataUpdateTimeField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcMarketDataUpdateTimeField.UpdateTime"] = "TimeType"
char_type_def["CThostFtdcMarketDataUpdateTimeField.UpdateMillisec"] = "MillisecType"
char_type_def["CThostFtdcMarketDataUpdateTimeField.ActionDay"] = "DateType"
char_type_def["CThostFtdcMarketDataExchangeField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcSpecificInstrumentField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentStatusField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInstrumentStatusField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcInstrumentStatusField.SettlementGroupID"] = "SettlementGroupIDType"
char_type_def["CThostFtdcInstrumentStatusField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInstrumentStatusField.InstrumentStatus"] = "InstrumentStatusType"
char_type_def["CThostFtdcInstrumentStatusField.TradingSegmentSN"] = "TradingSegmentSNType"
char_type_def["CThostFtdcInstrumentStatusField.EnterTime"] = "TimeType"
char_type_def["CThostFtdcInstrumentStatusField.EnterReason"] = "InstStatusEnterReasonType"
char_type_def["CThostFtdcQryInstrumentStatusField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInstrumentStatusField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcInvestorAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorAccountField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcInvestorAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcPositionProfitAlgorithmField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcPositionProfitAlgorithmField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcPositionProfitAlgorithmField.Algorithm"] = "AlgorithmType"
char_type_def["CThostFtdcPositionProfitAlgorithmField.Memo"] = "MemoType"
char_type_def["CThostFtdcPositionProfitAlgorithmField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcDiscountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcDiscountField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcDiscountField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcDiscountField.Discount"] = "RatioType"
char_type_def["CThostFtdcQryTransferBankField.BankID"] = "BankIDType"
char_type_def["CThostFtdcQryTransferBankField.BankBrchID"] = "BankBrchIDType"
char_type_def["CThostFtdcTransferBankField.BankID"] = "BankIDType"
char_type_def["CThostFtdcTransferBankField.BankBrchID"] = "BankBrchIDType"
char_type_def["CThostFtdcTransferBankField.BankName"] = "BankNameType"
char_type_def["CThostFtdcTransferBankField.IsActive"] = "BoolType"
char_type_def["CThostFtdcQryInvestorPositionDetailField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInvestorPositionDetailField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInvestorPositionDetailField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryInvestorPositionDetailField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInvestorPositionDetailField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInvestorPositionDetailField.Direction"] = "DirectionType"
char_type_def["CThostFtdcInvestorPositionDetailField.OpenDate"] = "DateType"
char_type_def["CThostFtdcInvestorPositionDetailField.TradeID"] = "TradeIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.Volume"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionDetailField.OpenPrice"] = "PriceType"
char_type_def["CThostFtdcInvestorPositionDetailField.TradingDay"] = "DateType"
char_type_def["CThostFtdcInvestorPositionDetailField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.TradeType"] = "TradeTypeType"
char_type_def["CThostFtdcInvestorPositionDetailField.CombInstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInvestorPositionDetailField.CloseProfitByDate"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionDetailField.CloseProfitByTrade"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionDetailField.PositionProfitByDate"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionDetailField.PositionProfitByTrade"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionDetailField.Margin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionDetailField.ExchMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionDetailField.MarginRateByMoney"] = "RatioType"
char_type_def["CThostFtdcInvestorPositionDetailField.MarginRateByVolume"] = "RatioType"
char_type_def["CThostFtdcInvestorPositionDetailField.LastSettlementPrice"] = "PriceType"
char_type_def["CThostFtdcInvestorPositionDetailField.SettlementPrice"] = "PriceType"
char_type_def["CThostFtdcInvestorPositionDetailField.CloseVolume"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionDetailField.CloseAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionDetailField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcTradingAccountPasswordField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingAccountPasswordField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcTradingAccountPasswordField.Password"] = "PasswordType"
char_type_def["CThostFtdcTradingAccountPasswordField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcMDTraderOfferField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcMDTraderOfferField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcMDTraderOfferField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcMDTraderOfferField.Password"] = "PasswordType"
char_type_def["CThostFtdcMDTraderOfferField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcMDTraderOfferField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcMDTraderOfferField.TraderConnectStatus"] = "TraderConnectStatusType"
char_type_def["CThostFtdcMDTraderOfferField.ConnectRequestDate"] = "DateType"
char_type_def["CThostFtdcMDTraderOfferField.ConnectRequestTime"] = "TimeType"
char_type_def["CThostFtdcMDTraderOfferField.LastReportDate"] = "DateType"
char_type_def["CThostFtdcMDTraderOfferField.LastReportTime"] = "TimeType"
char_type_def["CThostFtdcMDTraderOfferField.ConnectDate"] = "DateType"
char_type_def["CThostFtdcMDTraderOfferField.ConnectTime"] = "TimeType"
char_type_def["CThostFtdcMDTraderOfferField.StartDate"] = "DateType"
char_type_def["CThostFtdcMDTraderOfferField.StartTime"] = "TimeType"
char_type_def["CThostFtdcMDTraderOfferField.TradingDay"] = "DateType"
char_type_def["CThostFtdcMDTraderOfferField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcMDTraderOfferField.MaxTradeID"] = "TradeIDType"
char_type_def["CThostFtdcMDTraderOfferField.MaxOrderMessageReference"] = "ReturnCodeType"
char_type_def["CThostFtdcQryMDTraderOfferField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryMDTraderOfferField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcQryMDTraderOfferField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcQryNoticeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcNoticeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcNoticeField.Content"] = "ContentType"
char_type_def["CThostFtdcNoticeField.SequenceLabel"] = "SequenceLabelType"
char_type_def["CThostFtdcUserRightField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcUserRightField.UserID"] = "UserIDType"
char_type_def["CThostFtdcUserRightField.UserRightType"] = "UserRightTypeType"
char_type_def["CThostFtdcUserRightField.IsForbidden"] = "BoolType"
char_type_def["CThostFtdcQrySettlementInfoConfirmField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQrySettlementInfoConfirmField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQrySettlementInfoConfirmField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQrySettlementInfoConfirmField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcLoadSettlementInfoField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.WithdrawAlgorithm"] = "AlgorithmType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.UsingRatio"] = "RatioType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.IncludeCloseProfit"] = "IncludeCloseProfitType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.AllWithoutTrade"] = "AllWithoutTradeType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.AvailIncludeCloseProfit"] = "IncludeCloseProfitType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.IsBrokerUserEvent"] = "BoolType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.FundMortgageRatio"] = "RatioType"
char_type_def["CThostFtdcBrokerWithdrawAlgorithmField.BalanceAlgorithm"] = "BalanceAlgorithmType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateV1Field.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateV1Field.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateV1Field.OldPassword"] = "PasswordType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateV1Field.NewPassword"] = "PasswordType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateField.OldPassword"] = "PasswordType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateField.NewPassword"] = "PasswordType"
char_type_def["CThostFtdcTradingAccountPasswordUpdateField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryCombinationLegField.CombInstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryCombinationLegField.LegID"] = "LegIDType"
char_type_def["CThostFtdcQryCombinationLegField.LegInstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQrySyncStatusField.TradingDay"] = "DateType"
char_type_def["CThostFtdcCombinationLegField.CombInstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcCombinationLegField.LegID"] = "LegIDType"
char_type_def["CThostFtdcCombinationLegField.LegInstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcCombinationLegField.Direction"] = "DirectionType"
char_type_def["CThostFtdcCombinationLegField.LegMultiple"] = "LegMultipleType"
char_type_def["CThostFtdcCombinationLegField.ImplyLevel"] = "ImplyLevelType"
char_type_def["CThostFtdcSyncStatusField.TradingDay"] = "DateType"
char_type_def["CThostFtdcSyncStatusField.DataSyncStatus"] = "DataSyncStatusType"
char_type_def["CThostFtdcQryLinkManField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryLinkManField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcLinkManField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcLinkManField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcLinkManField.PersonType"] = "PersonTypeType"
char_type_def["CThostFtdcLinkManField.IdentifiedCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcLinkManField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcLinkManField.PersonName"] = "PartyNameType"
char_type_def["CThostFtdcLinkManField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcLinkManField.Address"] = "AddressType"
char_type_def["CThostFtdcLinkManField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcLinkManField.Priority"] = "PriorityType"
char_type_def["CThostFtdcLinkManField.UOAZipCode"] = "UOAZipCodeType"
char_type_def["CThostFtdcLinkManField.PersonFullName"] = "InvestorFullNameType"
char_type_def["CThostFtdcQryBrokerUserEventField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryBrokerUserEventField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQryBrokerUserEventField.UserEventType"] = "UserEventTypeType"
char_type_def["CThostFtdcBrokerUserEventField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerUserEventField.UserID"] = "UserIDType"
char_type_def["CThostFtdcBrokerUserEventField.UserEventType"] = "UserEventTypeType"
char_type_def["CThostFtdcBrokerUserEventField.EventSequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcBrokerUserEventField.EventDate"] = "DateType"
char_type_def["CThostFtdcBrokerUserEventField.EventTime"] = "TimeType"
char_type_def["CThostFtdcBrokerUserEventField.UserEventInfo"] = "UserEventInfoType"
char_type_def["CThostFtdcBrokerUserEventField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcBrokerUserEventField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryContractBankField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryContractBankField.BankID"] = "BankIDType"
char_type_def["CThostFtdcQryContractBankField.BankBrchID"] = "BankBrchIDType"
char_type_def["CThostFtdcContractBankField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcContractBankField.BankID"] = "BankIDType"
char_type_def["CThostFtdcContractBankField.BankBrchID"] = "BankBrchIDType"
char_type_def["CThostFtdcContractBankField.BankName"] = "BankNameType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.TradingDay"] = "DateType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.OpenDate"] = "DateType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.ComTradeID"] = "TradeIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.TradeID"] = "TradeIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.Direction"] = "DirectionType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.TotalAmt"] = "VolumeType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.Margin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.ExchMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.MarginRateByMoney"] = "RatioType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.MarginRateByVolume"] = "RatioType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.LegID"] = "LegIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.LegMultiple"] = "LegMultipleType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.CombInstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.TradeGroupID"] = "TradeGroupIDType"
char_type_def["CThostFtdcInvestorPositionCombineDetailField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcParkedOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcParkedOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcParkedOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcParkedOrderField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcParkedOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcParkedOrderField.OrderPriceType"] = "OrderPriceTypeType"
char_type_def["CThostFtdcParkedOrderField.Direction"] = "DirectionType"
char_type_def["CThostFtdcParkedOrderField.CombOffsetFlag"] = "CombOffsetFlagType"
char_type_def["CThostFtdcParkedOrderField.CombHedgeFlag"] = "CombHedgeFlagType"
char_type_def["CThostFtdcParkedOrderField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcParkedOrderField.VolumeTotalOriginal"] = "VolumeType"
char_type_def["CThostFtdcParkedOrderField.TimeCondition"] = "TimeConditionType"
char_type_def["CThostFtdcParkedOrderField.GTDDate"] = "DateType"
char_type_def["CThostFtdcParkedOrderField.VolumeCondition"] = "VolumeConditionType"
char_type_def["CThostFtdcParkedOrderField.MinVolume"] = "VolumeType"
char_type_def["CThostFtdcParkedOrderField.ContingentCondition"] = "ContingentConditionType"
char_type_def["CThostFtdcParkedOrderField.StopPrice"] = "PriceType"
char_type_def["CThostFtdcParkedOrderField.ForceCloseReason"] = "ForceCloseReasonType"
char_type_def["CThostFtdcParkedOrderField.IsAutoSuspend"] = "BoolType"
char_type_def["CThostFtdcParkedOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcParkedOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcParkedOrderField.UserForceClose"] = "BoolType"
char_type_def["CThostFtdcParkedOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcParkedOrderField.ParkedOrderID"] = "ParkedOrderIDType"
char_type_def["CThostFtdcParkedOrderField.UserType"] = "UserTypeType"
char_type_def["CThostFtdcParkedOrderField.Status"] = "ParkedOrderStatusType"
char_type_def["CThostFtdcParkedOrderField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcParkedOrderField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcParkedOrderField.IsSwapOrder"] = "BoolType"
char_type_def["CThostFtdcParkedOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcParkedOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcParkedOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcParkedOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcParkedOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcParkedOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcParkedOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcParkedOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcParkedOrderActionField.OrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcParkedOrderActionField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcParkedOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcParkedOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcParkedOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcParkedOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcParkedOrderActionField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcParkedOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcParkedOrderActionField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcParkedOrderActionField.VolumeChange"] = "VolumeType"
char_type_def["CThostFtdcParkedOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcParkedOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcParkedOrderActionField.ParkedOrderActionID"] = "ParkedOrderActionIDType"
char_type_def["CThostFtdcParkedOrderActionField.UserType"] = "UserTypeType"
char_type_def["CThostFtdcParkedOrderActionField.Status"] = "ParkedOrderStatusType"
char_type_def["CThostFtdcParkedOrderActionField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcParkedOrderActionField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcParkedOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcParkedOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcParkedOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryParkedOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryParkedOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryParkedOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryParkedOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryParkedOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryParkedOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryParkedOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryParkedOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryParkedOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryParkedOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcRemoveParkedOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRemoveParkedOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcRemoveParkedOrderField.ParkedOrderID"] = "ParkedOrderIDType"
char_type_def["CThostFtdcRemoveParkedOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcRemoveParkedOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRemoveParkedOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcRemoveParkedOrderActionField.ParkedOrderActionID"] = "ParkedOrderActionIDType"
char_type_def["CThostFtdcRemoveParkedOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInvestorWithdrawAlgorithmField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorWithdrawAlgorithmField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcInvestorWithdrawAlgorithmField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorWithdrawAlgorithmField.UsingRatio"] = "RatioType"
char_type_def["CThostFtdcInvestorWithdrawAlgorithmField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcInvestorWithdrawAlgorithmField.FundMortgageRatio"] = "RatioType"
char_type_def["CThostFtdcQryInvestorPositionCombineDetailField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInvestorPositionCombineDetailField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInvestorPositionCombineDetailField.CombInstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryInvestorPositionCombineDetailField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInvestorPositionCombineDetailField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcMarketDataAveragePriceField.AveragePrice"] = "PriceType"
char_type_def["CThostFtdcVerifyInvestorPasswordField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcVerifyInvestorPasswordField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcVerifyInvestorPasswordField.Password"] = "PasswordType"
char_type_def["CThostFtdcUserIPField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcUserIPField.UserID"] = "UserIDType"
char_type_def["CThostFtdcUserIPField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcUserIPField.IPMask"] = "IPAddressType"
char_type_def["CThostFtdcUserIPField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcTradingNoticeInfoField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingNoticeInfoField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcTradingNoticeInfoField.SendTime"] = "TimeType"
char_type_def["CThostFtdcTradingNoticeInfoField.FieldContent"] = "ContentType"
char_type_def["CThostFtdcTradingNoticeInfoField.SequenceSeries"] = "SequenceSeriesType"
char_type_def["CThostFtdcTradingNoticeInfoField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcTradingNoticeInfoField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcTradingNoticeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingNoticeField.InvestorRange"] = "InvestorRangeType"
char_type_def["CThostFtdcTradingNoticeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcTradingNoticeField.SequenceSeries"] = "SequenceSeriesType"
char_type_def["CThostFtdcTradingNoticeField.UserID"] = "UserIDType"
char_type_def["CThostFtdcTradingNoticeField.SendTime"] = "TimeType"
char_type_def["CThostFtdcTradingNoticeField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcTradingNoticeField.FieldContent"] = "ContentType"
char_type_def["CThostFtdcTradingNoticeField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryTradingNoticeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryTradingNoticeField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryTradingNoticeField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryErrOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryErrOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcErrOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcErrOrderField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcErrOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcErrOrderField.OrderPriceType"] = "OrderPriceTypeType"
char_type_def["CThostFtdcErrOrderField.Direction"] = "DirectionType"
char_type_def["CThostFtdcErrOrderField.CombOffsetFlag"] = "CombOffsetFlagType"
char_type_def["CThostFtdcErrOrderField.CombHedgeFlag"] = "CombHedgeFlagType"
char_type_def["CThostFtdcErrOrderField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcErrOrderField.VolumeTotalOriginal"] = "VolumeType"
char_type_def["CThostFtdcErrOrderField.TimeCondition"] = "TimeConditionType"
char_type_def["CThostFtdcErrOrderField.GTDDate"] = "DateType"
char_type_def["CThostFtdcErrOrderField.VolumeCondition"] = "VolumeConditionType"
char_type_def["CThostFtdcErrOrderField.MinVolume"] = "VolumeType"
char_type_def["CThostFtdcErrOrderField.ContingentCondition"] = "ContingentConditionType"
char_type_def["CThostFtdcErrOrderField.StopPrice"] = "PriceType"
char_type_def["CThostFtdcErrOrderField.ForceCloseReason"] = "ForceCloseReasonType"
char_type_def["CThostFtdcErrOrderField.IsAutoSuspend"] = "BoolType"
char_type_def["CThostFtdcErrOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcErrOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcErrOrderField.UserForceClose"] = "BoolType"
char_type_def["CThostFtdcErrOrderField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcErrOrderField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcErrOrderField.IsSwapOrder"] = "BoolType"
char_type_def["CThostFtdcErrOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcErrOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcErrOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcErrOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcErrOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcErrOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcErrOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcErrorConditionalOrderField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcErrorConditionalOrderField.UserID"] = "UserIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderPriceType"] = "OrderPriceTypeType"
char_type_def["CThostFtdcErrorConditionalOrderField.Direction"] = "DirectionType"
char_type_def["CThostFtdcErrorConditionalOrderField.CombOffsetFlag"] = "CombOffsetFlagType"
char_type_def["CThostFtdcErrorConditionalOrderField.CombHedgeFlag"] = "CombHedgeFlagType"
char_type_def["CThostFtdcErrorConditionalOrderField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcErrorConditionalOrderField.VolumeTotalOriginal"] = "VolumeType"
char_type_def["CThostFtdcErrorConditionalOrderField.TimeCondition"] = "TimeConditionType"
char_type_def["CThostFtdcErrorConditionalOrderField.GTDDate"] = "DateType"
char_type_def["CThostFtdcErrorConditionalOrderField.VolumeCondition"] = "VolumeConditionType"
char_type_def["CThostFtdcErrorConditionalOrderField.MinVolume"] = "VolumeType"
char_type_def["CThostFtdcErrorConditionalOrderField.ContingentCondition"] = "ContingentConditionType"
char_type_def["CThostFtdcErrorConditionalOrderField.StopPrice"] = "PriceType"
char_type_def["CThostFtdcErrorConditionalOrderField.ForceCloseReason"] = "ForceCloseReasonType"
char_type_def["CThostFtdcErrorConditionalOrderField.IsAutoSuspend"] = "BoolType"
char_type_def["CThostFtdcErrorConditionalOrderField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcErrorConditionalOrderField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.ExchangeInstID"] = "ExchangeInstIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderSubmitStatus"] = "OrderSubmitStatusType"
char_type_def["CThostFtdcErrorConditionalOrderField.NotifySequence"] = "SequenceNoType"
char_type_def["CThostFtdcErrorConditionalOrderField.TradingDay"] = "DateType"
char_type_def["CThostFtdcErrorConditionalOrderField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderSource"] = "OrderSourceType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderStatus"] = "OrderStatusType"
char_type_def["CThostFtdcErrorConditionalOrderField.OrderType"] = "OrderTypeType"
char_type_def["CThostFtdcErrorConditionalOrderField.VolumeTraded"] = "VolumeType"
char_type_def["CThostFtdcErrorConditionalOrderField.VolumeTotal"] = "VolumeType"
char_type_def["CThostFtdcErrorConditionalOrderField.InsertDate"] = "DateType"
char_type_def["CThostFtdcErrorConditionalOrderField.InsertTime"] = "TimeType"
char_type_def["CThostFtdcErrorConditionalOrderField.ActiveTime"] = "TimeType"
char_type_def["CThostFtdcErrorConditionalOrderField.SuspendTime"] = "TimeType"
char_type_def["CThostFtdcErrorConditionalOrderField.UpdateTime"] = "TimeType"
char_type_def["CThostFtdcErrorConditionalOrderField.CancelTime"] = "TimeType"
char_type_def["CThostFtdcErrorConditionalOrderField.ActiveTraderID"] = "TraderIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.ClearingPartID"] = "ParticipantIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcErrorConditionalOrderField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.UserProductInfo"] = "ProductInfoType"
char_type_def["CThostFtdcErrorConditionalOrderField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcErrorConditionalOrderField.UserForceClose"] = "BoolType"
char_type_def["CThostFtdcErrorConditionalOrderField.ActiveUserID"] = "UserIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.BrokerOrderSeq"] = "SequenceNoType"
char_type_def["CThostFtdcErrorConditionalOrderField.RelativeOrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.ZCETotalTradedVolume"] = "VolumeType"
char_type_def["CThostFtdcErrorConditionalOrderField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcErrorConditionalOrderField.IsSwapOrder"] = "BoolType"
char_type_def["CThostFtdcErrorConditionalOrderField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcErrorConditionalOrderField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcErrorConditionalOrderField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcQryErrOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryErrOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrOrderActionField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcErrOrderActionField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcErrOrderActionField.OrderActionRef"] = "OrderActionRefType"
char_type_def["CThostFtdcErrOrderActionField.OrderRef"] = "OrderRefType"
char_type_def["CThostFtdcErrOrderActionField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcErrOrderActionField.FrontID"] = "FrontIDType"
char_type_def["CThostFtdcErrOrderActionField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcErrOrderActionField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcErrOrderActionField.OrderSysID"] = "OrderSysIDType"
char_type_def["CThostFtdcErrOrderActionField.ActionFlag"] = "ActionFlagType"
char_type_def["CThostFtdcErrOrderActionField.LimitPrice"] = "PriceType"
char_type_def["CThostFtdcErrOrderActionField.VolumeChange"] = "VolumeType"
char_type_def["CThostFtdcErrOrderActionField.ActionDate"] = "DateType"
char_type_def["CThostFtdcErrOrderActionField.ActionTime"] = "TimeType"
char_type_def["CThostFtdcErrOrderActionField.TraderID"] = "TraderIDType"
char_type_def["CThostFtdcErrOrderActionField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcErrOrderActionField.OrderLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcErrOrderActionField.ActionLocalID"] = "OrderLocalIDType"
char_type_def["CThostFtdcErrOrderActionField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcErrOrderActionField.ClientID"] = "ClientIDType"
char_type_def["CThostFtdcErrOrderActionField.BusinessUnit"] = "BusinessUnitType"
char_type_def["CThostFtdcErrOrderActionField.OrderActionStatus"] = "OrderActionStatusType"
char_type_def["CThostFtdcErrOrderActionField.UserID"] = "UserIDType"
char_type_def["CThostFtdcErrOrderActionField.StatusMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcErrOrderActionField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcErrOrderActionField.BranchID"] = "BranchIDType"
char_type_def["CThostFtdcErrOrderActionField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcErrOrderActionField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcErrOrderActionField.MacAddress"] = "MacAddressType"
char_type_def["CThostFtdcErrOrderActionField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcErrOrderActionField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcQryExchangeSequenceField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeSequenceField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcExchangeSequenceField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcExchangeSequenceField.MarketStatus"] = "InstrumentStatusType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.Direction"] = "DirectionType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.OffsetFlag"] = "OffsetFlagType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.MaxVolume"] = "VolumeType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.Price"] = "PriceType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQueryMaxOrderVolumeWithPriceField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryBrokerTradingParamsField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryBrokerTradingParamsField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryBrokerTradingParamsField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryBrokerTradingParamsField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcBrokerTradingParamsField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerTradingParamsField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcBrokerTradingParamsField.MarginPriceType"] = "MarginPriceTypeType"
char_type_def["CThostFtdcBrokerTradingParamsField.Algorithm"] = "AlgorithmType"
char_type_def["CThostFtdcBrokerTradingParamsField.AvailIncludeCloseProfit"] = "IncludeCloseProfitType"
char_type_def["CThostFtdcBrokerTradingParamsField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcBrokerTradingParamsField.OptionRoyaltyPriceType"] = "OptionRoyaltyPriceTypeType"
char_type_def["CThostFtdcBrokerTradingParamsField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQryBrokerTradingAlgosField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryBrokerTradingAlgosField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryBrokerTradingAlgosField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcBrokerTradingAlgosField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerTradingAlgosField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcBrokerTradingAlgosField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcBrokerTradingAlgosField.HandlePositionAlgoID"] = "HandlePositionAlgoIDType"
char_type_def["CThostFtdcBrokerTradingAlgosField.FindMarginRateAlgoID"] = "FindMarginRateAlgoIDType"
char_type_def["CThostFtdcBrokerTradingAlgosField.HandleTradingAccountAlgoID"] = "HandleTradingAccountAlgoIDType"
char_type_def["CThostFtdcQueryBrokerDepositField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQueryBrokerDepositField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcBrokerDepositField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcBrokerDepositField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerDepositField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcBrokerDepositField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcBrokerDepositField.PreBalance"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.CurrMargin"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.CloseProfit"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.Balance"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.Deposit"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.Withdraw"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.Available"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.Reserve"] = "MoneyType"
char_type_def["CThostFtdcBrokerDepositField.FrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcQryCFMMCBrokerKeyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCFMMCBrokerKeyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCFMMCBrokerKeyField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcCFMMCBrokerKeyField.CreateDate"] = "DateType"
char_type_def["CThostFtdcCFMMCBrokerKeyField.CreateTime"] = "TimeType"
char_type_def["CThostFtdcCFMMCBrokerKeyField.KeyID"] = "SequenceNoType"
char_type_def["CThostFtdcCFMMCBrokerKeyField.CurrentKey"] = "CFMMCKeyType"
char_type_def["CThostFtdcCFMMCBrokerKeyField.KeyKind"] = "CFMMCKeyKindType"
char_type_def["CThostFtdcCFMMCTradingAccountKeyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCFMMCTradingAccountKeyField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcCFMMCTradingAccountKeyField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcCFMMCTradingAccountKeyField.KeyID"] = "SequenceNoType"
char_type_def["CThostFtdcCFMMCTradingAccountKeyField.CurrentKey"] = "CFMMCKeyType"
char_type_def["CThostFtdcQryCFMMCTradingAccountKeyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryCFMMCTradingAccountKeyField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcBrokerUserOTPParamField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerUserOTPParamField.UserID"] = "UserIDType"
char_type_def["CThostFtdcBrokerUserOTPParamField.OTPVendorsID"] = "OTPVendorsIDType"
char_type_def["CThostFtdcBrokerUserOTPParamField.SerialNumber"] = "SerialNumberType"
char_type_def["CThostFtdcBrokerUserOTPParamField.AuthKey"] = "AuthKeyType"
char_type_def["CThostFtdcBrokerUserOTPParamField.LastDrift"] = "LastDriftType"
char_type_def["CThostFtdcBrokerUserOTPParamField.LastSuccess"] = "LastSuccessType"
char_type_def["CThostFtdcBrokerUserOTPParamField.OTPType"] = "OTPTypeType"
char_type_def["CThostFtdcManualSyncBrokerUserOTPField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcManualSyncBrokerUserOTPField.UserID"] = "UserIDType"
char_type_def["CThostFtdcManualSyncBrokerUserOTPField.OTPType"] = "OTPTypeType"
char_type_def["CThostFtdcManualSyncBrokerUserOTPField.FirstOTP"] = "PasswordType"
char_type_def["CThostFtdcManualSyncBrokerUserOTPField.SecondOTP"] = "PasswordType"
char_type_def["CThostFtdcCommRateModelField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCommRateModelField.CommModelID"] = "InvestorIDType"
char_type_def["CThostFtdcCommRateModelField.CommModelName"] = "CommModelNameType"
char_type_def["CThostFtdcQryCommRateModelField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryCommRateModelField.CommModelID"] = "InvestorIDType"
char_type_def["CThostFtdcMarginModelField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcMarginModelField.MarginModelID"] = "InvestorIDType"
char_type_def["CThostFtdcMarginModelField.MarginModelName"] = "CommModelNameType"
char_type_def["CThostFtdcQryMarginModelField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryMarginModelField.MarginModelID"] = "InvestorIDType"
char_type_def["CThostFtdcEWarrantOffsetField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcEWarrantOffsetField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcEWarrantOffsetField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcEWarrantOffsetField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcEWarrantOffsetField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcEWarrantOffsetField.Direction"] = "DirectionType"
char_type_def["CThostFtdcEWarrantOffsetField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcEWarrantOffsetField.Volume"] = "VolumeType"
char_type_def["CThostFtdcEWarrantOffsetField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryEWarrantOffsetField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryEWarrantOffsetField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryEWarrantOffsetField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryEWarrantOffsetField.InstrumentID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryEWarrantOffsetField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQryInvestorProductGroupMarginField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryInvestorProductGroupMarginField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQryInvestorProductGroupMarginField.ProductGroupID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryInvestorProductGroupMarginField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcQryInvestorProductGroupMarginField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryInvestorProductGroupMarginField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ProductGroupID"] = "InstrumentIDType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.TradingDay"] = "DateType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.SettlementID"] = "SettlementIDType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.FrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.LongFrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ShortFrozenMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.UseMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.LongUseMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ShortUseMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ExchMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.LongExchMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ShortExchMargin"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.CloseProfit"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.FrozenCommission"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.Commission"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.FrozenCash"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.CashIn"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.PositionProfit"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.OffsetAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.LongOffsetAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ShortOffsetAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ExchOffsetAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.LongExchOffsetAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ShortExchOffsetAmount"] = "MoneyType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.HedgeFlag"] = "HedgeFlagType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcInvestorProductGroupMarginField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcQueryCFMMCTradingAccountTokenField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQueryCFMMCTradingAccountTokenField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcQueryCFMMCTradingAccountTokenField.InvestUnitID"] = "InvestUnitIDType"
char_type_def["CThostFtdcCFMMCTradingAccountTokenField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCFMMCTradingAccountTokenField.ParticipantID"] = "ParticipantIDType"
char_type_def["CThostFtdcCFMMCTradingAccountTokenField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcCFMMCTradingAccountTokenField.KeyID"] = "SequenceNoType"
char_type_def["CThostFtdcCFMMCTradingAccountTokenField.Token"] = "CFMMCTokenType"
char_type_def["CThostFtdcQryProductGroupField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcQryProductGroupField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcProductGroupField.ProductID"] = "InstrumentIDType"
char_type_def["CThostFtdcProductGroupField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcProductGroupField.ProductGroupID"] = "InstrumentIDType"
char_type_def["CThostFtdcBulletinField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcBulletinField.TradingDay"] = "DateType"
char_type_def["CThostFtdcBulletinField.BulletinID"] = "BulletinIDType"
char_type_def["CThostFtdcBulletinField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcBulletinField.NewsType"] = "NewsTypeType"
char_type_def["CThostFtdcBulletinField.NewsUrgency"] = "NewsUrgencyType"
char_type_def["CThostFtdcBulletinField.SendTime"] = "TimeType"
char_type_def["CThostFtdcBulletinField.Abstract"] = "AbstractType"
char_type_def["CThostFtdcBulletinField.ComeFrom"] = "ComeFromType"
char_type_def["CThostFtdcBulletinField.Content"] = "ContentType"
char_type_def["CThostFtdcBulletinField.URLLink"] = "URLLinkType"
char_type_def["CThostFtdcBulletinField.MarketID"] = "MarketIDType"
char_type_def["CThostFtdcQryBulletinField.ExchangeID"] = "ExchangeIDType"
char_type_def["CThostFtdcQryBulletinField.BulletinID"] = "BulletinIDType"
char_type_def["CThostFtdcQryBulletinField.SequenceNo"] = "SequenceNoType"
char_type_def["CThostFtdcQryBulletinField.NewsType"] = "NewsTypeType"
char_type_def["CThostFtdcQryBulletinField.NewsUrgency"] = "NewsUrgencyType"
char_type_def["CThostFtdcReqOpenAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqOpenAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqOpenAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqOpenAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqOpenAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqOpenAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqOpenAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqOpenAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqOpenAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqOpenAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqOpenAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqOpenAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqOpenAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcReqOpenAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReqOpenAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReqOpenAccountField.Gender"] = "GenderType"
char_type_def["CThostFtdcReqOpenAccountField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcReqOpenAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReqOpenAccountField.Address"] = "AddressType"
char_type_def["CThostFtdcReqOpenAccountField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcReqOpenAccountField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcReqOpenAccountField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcReqOpenAccountField.Fax"] = "FaxType"
char_type_def["CThostFtdcReqOpenAccountField.EMail"] = "EMailType"
char_type_def["CThostFtdcReqOpenAccountField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcReqOpenAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqOpenAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqOpenAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReqOpenAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqOpenAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqOpenAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReqOpenAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqOpenAccountField.CashExchangeCode"] = "CashExchangeCodeType"
char_type_def["CThostFtdcReqOpenAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqOpenAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqOpenAccountField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcReqOpenAccountField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqOpenAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqOpenAccountField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcReqOpenAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqOpenAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqOpenAccountField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcReqOpenAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcReqOpenAccountField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqOpenAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcReqCancelAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqCancelAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqCancelAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqCancelAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqCancelAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqCancelAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqCancelAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqCancelAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqCancelAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqCancelAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqCancelAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqCancelAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqCancelAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcReqCancelAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReqCancelAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReqCancelAccountField.Gender"] = "GenderType"
char_type_def["CThostFtdcReqCancelAccountField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcReqCancelAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReqCancelAccountField.Address"] = "AddressType"
char_type_def["CThostFtdcReqCancelAccountField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcReqCancelAccountField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcReqCancelAccountField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcReqCancelAccountField.Fax"] = "FaxType"
char_type_def["CThostFtdcReqCancelAccountField.EMail"] = "EMailType"
char_type_def["CThostFtdcReqCancelAccountField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcReqCancelAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqCancelAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqCancelAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReqCancelAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqCancelAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqCancelAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReqCancelAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqCancelAccountField.CashExchangeCode"] = "CashExchangeCodeType"
char_type_def["CThostFtdcReqCancelAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqCancelAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqCancelAccountField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcReqCancelAccountField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqCancelAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqCancelAccountField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcReqCancelAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqCancelAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqCancelAccountField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcReqCancelAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcReqCancelAccountField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqCancelAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcReqChangeAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqChangeAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqChangeAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqChangeAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqChangeAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqChangeAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqChangeAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqChangeAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqChangeAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqChangeAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqChangeAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqChangeAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqChangeAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcReqChangeAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReqChangeAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReqChangeAccountField.Gender"] = "GenderType"
char_type_def["CThostFtdcReqChangeAccountField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcReqChangeAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReqChangeAccountField.Address"] = "AddressType"
char_type_def["CThostFtdcReqChangeAccountField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcReqChangeAccountField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcReqChangeAccountField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcReqChangeAccountField.Fax"] = "FaxType"
char_type_def["CThostFtdcReqChangeAccountField.EMail"] = "EMailType"
char_type_def["CThostFtdcReqChangeAccountField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcReqChangeAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqChangeAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqChangeAccountField.NewBankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqChangeAccountField.NewBankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqChangeAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReqChangeAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqChangeAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqChangeAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqChangeAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReqChangeAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqChangeAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqChangeAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqChangeAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqChangeAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcReqChangeAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqChangeAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcReqTransferField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqTransferField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqTransferField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqTransferField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqTransferField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqTransferField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqTransferField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqTransferField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqTransferField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqTransferField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqTransferField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqTransferField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqTransferField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcReqTransferField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReqTransferField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReqTransferField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReqTransferField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqTransferField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqTransferField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReqTransferField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqTransferField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqTransferField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcReqTransferField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqTransferField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReqTransferField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqTransferField.TradeAmount"] = "TradeAmountType"
char_type_def["CThostFtdcReqTransferField.FutureFetchAmount"] = "TradeAmountType"
char_type_def["CThostFtdcReqTransferField.FeePayFlag"] = "FeePayFlagType"
char_type_def["CThostFtdcReqTransferField.CustFee"] = "CustFeeType"
char_type_def["CThostFtdcReqTransferField.BrokerFee"] = "FutureFeeType"
char_type_def["CThostFtdcReqTransferField.Message"] = "AddInfoType"
char_type_def["CThostFtdcReqTransferField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqTransferField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqTransferField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcReqTransferField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqTransferField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqTransferField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcReqTransferField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqTransferField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqTransferField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcReqTransferField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcReqTransferField.TID"] = "TIDType"
char_type_def["CThostFtdcReqTransferField.TransferStatus"] = "TransferStatusType"
char_type_def["CThostFtdcReqTransferField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcRspTransferField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcRspTransferField.BankID"] = "BankIDType"
char_type_def["CThostFtdcRspTransferField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcRspTransferField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspTransferField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcRspTransferField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcRspTransferField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcRspTransferField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspTransferField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcRspTransferField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcRspTransferField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcRspTransferField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspTransferField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcRspTransferField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcRspTransferField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcRspTransferField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcRspTransferField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcRspTransferField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcRspTransferField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcRspTransferField.Password"] = "PasswordType"
char_type_def["CThostFtdcRspTransferField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcRspTransferField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcRspTransferField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspTransferField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcRspTransferField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcRspTransferField.TradeAmount"] = "TradeAmountType"
char_type_def["CThostFtdcRspTransferField.FutureFetchAmount"] = "TradeAmountType"
char_type_def["CThostFtdcRspTransferField.FeePayFlag"] = "FeePayFlagType"
char_type_def["CThostFtdcRspTransferField.CustFee"] = "CustFeeType"
char_type_def["CThostFtdcRspTransferField.BrokerFee"] = "FutureFeeType"
char_type_def["CThostFtdcRspTransferField.Message"] = "AddInfoType"
char_type_def["CThostFtdcRspTransferField.Digest"] = "DigestType"
char_type_def["CThostFtdcRspTransferField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcRspTransferField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcRspTransferField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcRspTransferField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcRspTransferField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcRspTransferField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcRspTransferField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcRspTransferField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcRspTransferField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcRspTransferField.TID"] = "TIDType"
char_type_def["CThostFtdcRspTransferField.TransferStatus"] = "TransferStatusType"
char_type_def["CThostFtdcRspTransferField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcRspTransferField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcRspTransferField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcReqRepealField.RepealTimeInterval"] = "RepealTimeIntervalType"
char_type_def["CThostFtdcReqRepealField.RepealedTimes"] = "RepealedTimesType"
char_type_def["CThostFtdcReqRepealField.BankRepealFlag"] = "BankRepealFlagType"
char_type_def["CThostFtdcReqRepealField.BrokerRepealFlag"] = "BrokerRepealFlagType"
char_type_def["CThostFtdcReqRepealField.PlateRepealSerial"] = "PlateSerialType"
char_type_def["CThostFtdcReqRepealField.BankRepealSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqRepealField.FutureRepealSerial"] = "FutureSerialType"
char_type_def["CThostFtdcReqRepealField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqRepealField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqRepealField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqRepealField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqRepealField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqRepealField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqRepealField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqRepealField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqRepealField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqRepealField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqRepealField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqRepealField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqRepealField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcReqRepealField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReqRepealField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReqRepealField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReqRepealField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqRepealField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqRepealField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReqRepealField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqRepealField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqRepealField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcReqRepealField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqRepealField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReqRepealField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqRepealField.TradeAmount"] = "TradeAmountType"
char_type_def["CThostFtdcReqRepealField.FutureFetchAmount"] = "TradeAmountType"
char_type_def["CThostFtdcReqRepealField.FeePayFlag"] = "FeePayFlagType"
char_type_def["CThostFtdcReqRepealField.CustFee"] = "CustFeeType"
char_type_def["CThostFtdcReqRepealField.BrokerFee"] = "FutureFeeType"
char_type_def["CThostFtdcReqRepealField.Message"] = "AddInfoType"
char_type_def["CThostFtdcReqRepealField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqRepealField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqRepealField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcReqRepealField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqRepealField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqRepealField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcReqRepealField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqRepealField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqRepealField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcReqRepealField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcReqRepealField.TID"] = "TIDType"
char_type_def["CThostFtdcReqRepealField.TransferStatus"] = "TransferStatusType"
char_type_def["CThostFtdcReqRepealField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcRspRepealField.RepealTimeInterval"] = "RepealTimeIntervalType"
char_type_def["CThostFtdcRspRepealField.RepealedTimes"] = "RepealedTimesType"
char_type_def["CThostFtdcRspRepealField.BankRepealFlag"] = "BankRepealFlagType"
char_type_def["CThostFtdcRspRepealField.BrokerRepealFlag"] = "BrokerRepealFlagType"
char_type_def["CThostFtdcRspRepealField.PlateRepealSerial"] = "PlateSerialType"
char_type_def["CThostFtdcRspRepealField.BankRepealSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspRepealField.FutureRepealSerial"] = "FutureSerialType"
char_type_def["CThostFtdcRspRepealField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcRspRepealField.BankID"] = "BankIDType"
char_type_def["CThostFtdcRspRepealField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcRspRepealField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspRepealField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcRspRepealField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcRspRepealField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcRspRepealField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspRepealField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcRspRepealField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcRspRepealField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcRspRepealField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspRepealField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcRspRepealField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcRspRepealField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcRspRepealField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcRspRepealField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcRspRepealField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcRspRepealField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcRspRepealField.Password"] = "PasswordType"
char_type_def["CThostFtdcRspRepealField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcRspRepealField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcRspRepealField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspRepealField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcRspRepealField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcRspRepealField.TradeAmount"] = "TradeAmountType"
char_type_def["CThostFtdcRspRepealField.FutureFetchAmount"] = "TradeAmountType"
char_type_def["CThostFtdcRspRepealField.FeePayFlag"] = "FeePayFlagType"
char_type_def["CThostFtdcRspRepealField.CustFee"] = "CustFeeType"
char_type_def["CThostFtdcRspRepealField.BrokerFee"] = "FutureFeeType"
char_type_def["CThostFtdcRspRepealField.Message"] = "AddInfoType"
char_type_def["CThostFtdcRspRepealField.Digest"] = "DigestType"
char_type_def["CThostFtdcRspRepealField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcRspRepealField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcRspRepealField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcRspRepealField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcRspRepealField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcRspRepealField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcRspRepealField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcRspRepealField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcRspRepealField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcRspRepealField.TID"] = "TIDType"
char_type_def["CThostFtdcRspRepealField.TransferStatus"] = "TransferStatusType"
char_type_def["CThostFtdcRspRepealField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcRspRepealField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcRspRepealField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcReqQueryAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqQueryAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqQueryAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqQueryAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqQueryAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqQueryAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqQueryAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqQueryAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqQueryAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqQueryAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqQueryAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqQueryAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqQueryAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcReqQueryAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReqQueryAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReqQueryAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReqQueryAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqQueryAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqQueryAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReqQueryAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqQueryAccountField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcReqQueryAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqQueryAccountField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqQueryAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReqQueryAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqQueryAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqQueryAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqQueryAccountField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcReqQueryAccountField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReqQueryAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqQueryAccountField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcReqQueryAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqQueryAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcReqQueryAccountField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcReqQueryAccountField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcReqQueryAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcReqQueryAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcRspQueryAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcRspQueryAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcRspQueryAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcRspQueryAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspQueryAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcRspQueryAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcRspQueryAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcRspQueryAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspQueryAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcRspQueryAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcRspQueryAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcRspQueryAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspQueryAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcRspQueryAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcRspQueryAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcRspQueryAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcRspQueryAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcRspQueryAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcRspQueryAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcRspQueryAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcRspQueryAccountField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcRspQueryAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcRspQueryAccountField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspQueryAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcRspQueryAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcRspQueryAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcRspQueryAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcRspQueryAccountField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcRspQueryAccountField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcRspQueryAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcRspQueryAccountField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcRspQueryAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcRspQueryAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcRspQueryAccountField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcRspQueryAccountField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcRspQueryAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcRspQueryAccountField.BankUseAmount"] = "TradeAmountType"
char_type_def["CThostFtdcRspQueryAccountField.BankFetchAmount"] = "TradeAmountType"
char_type_def["CThostFtdcRspQueryAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcFutureSignIOField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcFutureSignIOField.BankID"] = "BankIDType"
char_type_def["CThostFtdcFutureSignIOField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcFutureSignIOField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcFutureSignIOField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcFutureSignIOField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcFutureSignIOField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcFutureSignIOField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcFutureSignIOField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcFutureSignIOField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcFutureSignIOField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcFutureSignIOField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcFutureSignIOField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcFutureSignIOField.UserID"] = "UserIDType"
char_type_def["CThostFtdcFutureSignIOField.Digest"] = "DigestType"
char_type_def["CThostFtdcFutureSignIOField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcFutureSignIOField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcFutureSignIOField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcFutureSignIOField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcFutureSignIOField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcFutureSignIOField.TID"] = "TIDType"
char_type_def["CThostFtdcRspFutureSignInField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcRspFutureSignInField.BankID"] = "BankIDType"
char_type_def["CThostFtdcRspFutureSignInField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcRspFutureSignInField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspFutureSignInField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcRspFutureSignInField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcRspFutureSignInField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcRspFutureSignInField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspFutureSignInField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcRspFutureSignInField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcRspFutureSignInField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcRspFutureSignInField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspFutureSignInField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcRspFutureSignInField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspFutureSignInField.Digest"] = "DigestType"
char_type_def["CThostFtdcRspFutureSignInField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcRspFutureSignInField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcRspFutureSignInField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcRspFutureSignInField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcRspFutureSignInField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcRspFutureSignInField.TID"] = "TIDType"
char_type_def["CThostFtdcRspFutureSignInField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcRspFutureSignInField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcRspFutureSignInField.PinKey"] = "PasswordKeyType"
char_type_def["CThostFtdcRspFutureSignInField.MacKey"] = "PasswordKeyType"
char_type_def["CThostFtdcReqFutureSignOutField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqFutureSignOutField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqFutureSignOutField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqFutureSignOutField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqFutureSignOutField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqFutureSignOutField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqFutureSignOutField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqFutureSignOutField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqFutureSignOutField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqFutureSignOutField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqFutureSignOutField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqFutureSignOutField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqFutureSignOutField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqFutureSignOutField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqFutureSignOutField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqFutureSignOutField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqFutureSignOutField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcReqFutureSignOutField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqFutureSignOutField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcReqFutureSignOutField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcReqFutureSignOutField.TID"] = "TIDType"
char_type_def["CThostFtdcRspFutureSignOutField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcRspFutureSignOutField.BankID"] = "BankIDType"
char_type_def["CThostFtdcRspFutureSignOutField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcRspFutureSignOutField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspFutureSignOutField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcRspFutureSignOutField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcRspFutureSignOutField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcRspFutureSignOutField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspFutureSignOutField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcRspFutureSignOutField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcRspFutureSignOutField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcRspFutureSignOutField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspFutureSignOutField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcRspFutureSignOutField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspFutureSignOutField.Digest"] = "DigestType"
char_type_def["CThostFtdcRspFutureSignOutField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcRspFutureSignOutField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcRspFutureSignOutField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcRspFutureSignOutField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcRspFutureSignOutField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcRspFutureSignOutField.TID"] = "TIDType"
char_type_def["CThostFtdcRspFutureSignOutField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcRspFutureSignOutField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.Reference"] = "SerialType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.RefrenceIssureType"] = "InstitutionTypeType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.RefrenceIssure"] = "OrganCodeType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.Password"] = "PasswordType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.TradeAmount"] = "TradeAmountType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqQueryTradeResultBySerialField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.BankID"] = "BankIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.Reference"] = "SerialType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.RefrenceIssureType"] = "InstitutionTypeType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.RefrenceIssure"] = "OrganCodeType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.OriginReturnCode"] = "ReturnCodeType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.OriginDescrInfoForReturnCode"] = "DescrInfoForReturnCodeType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.Password"] = "PasswordType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.TradeAmount"] = "TradeAmountType"
char_type_def["CThostFtdcRspQueryTradeResultBySerialField.Digest"] = "DigestType"
char_type_def["CThostFtdcReqDayEndFileReadyField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqDayEndFileReadyField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqDayEndFileReadyField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqDayEndFileReadyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqDayEndFileReadyField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqDayEndFileReadyField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqDayEndFileReadyField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqDayEndFileReadyField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqDayEndFileReadyField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqDayEndFileReadyField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqDayEndFileReadyField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqDayEndFileReadyField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqDayEndFileReadyField.FileBusinessCode"] = "FileBusinessCodeType"
char_type_def["CThostFtdcReqDayEndFileReadyField.Digest"] = "DigestType"
char_type_def["CThostFtdcReturnResultField.ReturnCode"] = "ReturnCodeType"
char_type_def["CThostFtdcReturnResultField.DescrInfoForReturnCode"] = "DescrInfoForReturnCodeType"
char_type_def["CThostFtdcVerifyFuturePasswordField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcVerifyFuturePasswordField.BankID"] = "BankIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcVerifyFuturePasswordField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcVerifyFuturePasswordField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcVerifyFuturePasswordField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcVerifyFuturePasswordField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcVerifyFuturePasswordField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcVerifyFuturePasswordField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.Password"] = "PasswordType"
char_type_def["CThostFtdcVerifyFuturePasswordField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcVerifyFuturePasswordField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcVerifyFuturePasswordField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.TID"] = "TIDType"
char_type_def["CThostFtdcVerifyFuturePasswordField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcVerifyCustInfoField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcVerifyCustInfoField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcVerifyCustInfoField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcVerifyCustInfoField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcVerifyCustInfoField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.Password"] = "PasswordType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcVerifyFuturePasswordAndCustInfoField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcDepositResultInformField.DepositSeqNo"] = "DepositSeqNoType"
char_type_def["CThostFtdcDepositResultInformField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcDepositResultInformField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcDepositResultInformField.Deposit"] = "MoneyType"
char_type_def["CThostFtdcDepositResultInformField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcDepositResultInformField.ReturnCode"] = "ReturnCodeType"
char_type_def["CThostFtdcDepositResultInformField.DescrInfoForReturnCode"] = "DescrInfoForReturnCodeType"
char_type_def["CThostFtdcReqSyncKeyField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReqSyncKeyField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReqSyncKeyField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReqSyncKeyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReqSyncKeyField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReqSyncKeyField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReqSyncKeyField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReqSyncKeyField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReqSyncKeyField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReqSyncKeyField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReqSyncKeyField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReqSyncKeyField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReqSyncKeyField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReqSyncKeyField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReqSyncKeyField.Message"] = "AddInfoType"
char_type_def["CThostFtdcReqSyncKeyField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcReqSyncKeyField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReqSyncKeyField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcReqSyncKeyField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcReqSyncKeyField.TID"] = "TIDType"
char_type_def["CThostFtdcRspSyncKeyField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcRspSyncKeyField.BankID"] = "BankIDType"
char_type_def["CThostFtdcRspSyncKeyField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcRspSyncKeyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcRspSyncKeyField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcRspSyncKeyField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcRspSyncKeyField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcRspSyncKeyField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcRspSyncKeyField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcRspSyncKeyField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcRspSyncKeyField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcRspSyncKeyField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcRspSyncKeyField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcRspSyncKeyField.UserID"] = "UserIDType"
char_type_def["CThostFtdcRspSyncKeyField.Message"] = "AddInfoType"
char_type_def["CThostFtdcRspSyncKeyField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcRspSyncKeyField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcRspSyncKeyField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcRspSyncKeyField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcRspSyncKeyField.TID"] = "TIDType"
char_type_def["CThostFtdcRspSyncKeyField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcRspSyncKeyField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcNotifyQueryAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcNotifyQueryAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcNotifyQueryAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcNotifyQueryAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcNotifyQueryAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcNotifyQueryAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcNotifyQueryAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcNotifyQueryAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcNotifyQueryAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcNotifyQueryAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcNotifyQueryAccountField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcNotifyQueryAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.UserID"] = "UserIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcNotifyQueryAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcNotifyQueryAccountField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcNotifyQueryAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcNotifyQueryAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcNotifyQueryAccountField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcNotifyQueryAccountField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankUseAmount"] = "TradeAmountType"
char_type_def["CThostFtdcNotifyQueryAccountField.BankFetchAmount"] = "TradeAmountType"
char_type_def["CThostFtdcNotifyQueryAccountField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcNotifyQueryAccountField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcNotifyQueryAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcTransferSerialField.PlateSerial"] = "PlateSerialType"
char_type_def["CThostFtdcTransferSerialField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcTransferSerialField.TradingDay"] = "DateType"
char_type_def["CThostFtdcTransferSerialField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcTransferSerialField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcTransferSerialField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcTransferSerialField.BankID"] = "BankIDType"
char_type_def["CThostFtdcTransferSerialField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcTransferSerialField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcTransferSerialField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcTransferSerialField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcTransferSerialField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTransferSerialField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcTransferSerialField.FutureAccType"] = "FutureAccTypeType"
char_type_def["CThostFtdcTransferSerialField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcTransferSerialField.InvestorID"] = "InvestorIDType"
char_type_def["CThostFtdcTransferSerialField.FutureSerial"] = "FutureSerialType"
char_type_def["CThostFtdcTransferSerialField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcTransferSerialField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcTransferSerialField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcTransferSerialField.TradeAmount"] = "TradeAmountType"
char_type_def["CThostFtdcTransferSerialField.CustFee"] = "CustFeeType"
char_type_def["CThostFtdcTransferSerialField.BrokerFee"] = "FutureFeeType"
char_type_def["CThostFtdcTransferSerialField.AvailabilityFlag"] = "AvailabilityFlagType"
char_type_def["CThostFtdcTransferSerialField.OperatorCode"] = "OperatorCodeType"
char_type_def["CThostFtdcTransferSerialField.BankNewAccount"] = "BankAccountType"
char_type_def["CThostFtdcTransferSerialField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcTransferSerialField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcQryTransferSerialField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryTransferSerialField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQryTransferSerialField.BankID"] = "BankIDType"
char_type_def["CThostFtdcQryTransferSerialField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcNotifyFutureSignInField.BankID"] = "BankIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcNotifyFutureSignInField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcNotifyFutureSignInField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcNotifyFutureSignInField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcNotifyFutureSignInField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcNotifyFutureSignInField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcNotifyFutureSignInField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.UserID"] = "UserIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.Digest"] = "DigestType"
char_type_def["CThostFtdcNotifyFutureSignInField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcNotifyFutureSignInField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcNotifyFutureSignInField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.TID"] = "TIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcNotifyFutureSignInField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcNotifyFutureSignInField.PinKey"] = "PasswordKeyType"
char_type_def["CThostFtdcNotifyFutureSignInField.MacKey"] = "PasswordKeyType"
char_type_def["CThostFtdcNotifyFutureSignOutField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcNotifyFutureSignOutField.BankID"] = "BankIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcNotifyFutureSignOutField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcNotifyFutureSignOutField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcNotifyFutureSignOutField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcNotifyFutureSignOutField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcNotifyFutureSignOutField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcNotifyFutureSignOutField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.UserID"] = "UserIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.Digest"] = "DigestType"
char_type_def["CThostFtdcNotifyFutureSignOutField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcNotifyFutureSignOutField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcNotifyFutureSignOutField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.TID"] = "TIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcNotifyFutureSignOutField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcNotifySyncKeyField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcNotifySyncKeyField.BankID"] = "BankIDType"
char_type_def["CThostFtdcNotifySyncKeyField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcNotifySyncKeyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcNotifySyncKeyField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcNotifySyncKeyField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcNotifySyncKeyField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcNotifySyncKeyField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcNotifySyncKeyField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcNotifySyncKeyField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcNotifySyncKeyField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcNotifySyncKeyField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcNotifySyncKeyField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcNotifySyncKeyField.UserID"] = "UserIDType"
char_type_def["CThostFtdcNotifySyncKeyField.Message"] = "AddInfoType"
char_type_def["CThostFtdcNotifySyncKeyField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcNotifySyncKeyField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcNotifySyncKeyField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcNotifySyncKeyField.RequestID"] = "RequestIDType"
char_type_def["CThostFtdcNotifySyncKeyField.TID"] = "TIDType"
char_type_def["CThostFtdcNotifySyncKeyField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcNotifySyncKeyField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcQryAccountregisterField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryAccountregisterField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQryAccountregisterField.BankID"] = "BankIDType"
char_type_def["CThostFtdcQryAccountregisterField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcQryAccountregisterField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcAccountregisterField.TradeDay"] = "TradeDateType"
char_type_def["CThostFtdcAccountregisterField.BankID"] = "BankIDType"
char_type_def["CThostFtdcAccountregisterField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcAccountregisterField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcAccountregisterField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcAccountregisterField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcAccountregisterField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcAccountregisterField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcAccountregisterField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcAccountregisterField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcAccountregisterField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcAccountregisterField.OpenOrDestroy"] = "OpenOrDestroyType"
char_type_def["CThostFtdcAccountregisterField.RegDate"] = "TradeDateType"
char_type_def["CThostFtdcAccountregisterField.OutDate"] = "TradeDateType"
char_type_def["CThostFtdcAccountregisterField.TID"] = "TIDType"
char_type_def["CThostFtdcAccountregisterField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcAccountregisterField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcAccountregisterField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcOpenAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcOpenAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcOpenAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcOpenAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcOpenAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcOpenAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcOpenAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcOpenAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcOpenAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcOpenAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcOpenAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcOpenAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcOpenAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcOpenAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcOpenAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcOpenAccountField.Gender"] = "GenderType"
char_type_def["CThostFtdcOpenAccountField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcOpenAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcOpenAccountField.Address"] = "AddressType"
char_type_def["CThostFtdcOpenAccountField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcOpenAccountField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcOpenAccountField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcOpenAccountField.Fax"] = "FaxType"
char_type_def["CThostFtdcOpenAccountField.EMail"] = "EMailType"
char_type_def["CThostFtdcOpenAccountField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcOpenAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcOpenAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcOpenAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcOpenAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcOpenAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcOpenAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcOpenAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcOpenAccountField.CashExchangeCode"] = "CashExchangeCodeType"
char_type_def["CThostFtdcOpenAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcOpenAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcOpenAccountField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcOpenAccountField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcOpenAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcOpenAccountField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcOpenAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcOpenAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcOpenAccountField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcOpenAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcOpenAccountField.UserID"] = "UserIDType"
char_type_def["CThostFtdcOpenAccountField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcOpenAccountField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcOpenAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcCancelAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcCancelAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcCancelAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcCancelAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcCancelAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcCancelAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcCancelAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcCancelAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcCancelAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcCancelAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcCancelAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcCancelAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcCancelAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcCancelAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcCancelAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcCancelAccountField.Gender"] = "GenderType"
char_type_def["CThostFtdcCancelAccountField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcCancelAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcCancelAccountField.Address"] = "AddressType"
char_type_def["CThostFtdcCancelAccountField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcCancelAccountField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcCancelAccountField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcCancelAccountField.Fax"] = "FaxType"
char_type_def["CThostFtdcCancelAccountField.EMail"] = "EMailType"
char_type_def["CThostFtdcCancelAccountField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcCancelAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcCancelAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcCancelAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcCancelAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcCancelAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcCancelAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcCancelAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcCancelAccountField.CashExchangeCode"] = "CashExchangeCodeType"
char_type_def["CThostFtdcCancelAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcCancelAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcCancelAccountField.DeviceID"] = "DeviceIDType"
char_type_def["CThostFtdcCancelAccountField.BankSecuAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcCancelAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcCancelAccountField.BankSecuAcc"] = "BankAccountType"
char_type_def["CThostFtdcCancelAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcCancelAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcCancelAccountField.OperNo"] = "OperNoType"
char_type_def["CThostFtdcCancelAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcCancelAccountField.UserID"] = "UserIDType"
char_type_def["CThostFtdcCancelAccountField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcCancelAccountField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcCancelAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcChangeAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcChangeAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcChangeAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcChangeAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcChangeAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcChangeAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcChangeAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcChangeAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcChangeAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcChangeAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcChangeAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcChangeAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcChangeAccountField.CustomerName"] = "IndividualNameType"
char_type_def["CThostFtdcChangeAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcChangeAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcChangeAccountField.Gender"] = "GenderType"
char_type_def["CThostFtdcChangeAccountField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcChangeAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcChangeAccountField.Address"] = "AddressType"
char_type_def["CThostFtdcChangeAccountField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcChangeAccountField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcChangeAccountField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcChangeAccountField.Fax"] = "FaxType"
char_type_def["CThostFtdcChangeAccountField.EMail"] = "EMailType"
char_type_def["CThostFtdcChangeAccountField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcChangeAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcChangeAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcChangeAccountField.NewBankAccount"] = "BankAccountType"
char_type_def["CThostFtdcChangeAccountField.NewBankPassWord"] = "PasswordType"
char_type_def["CThostFtdcChangeAccountField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcChangeAccountField.Password"] = "PasswordType"
char_type_def["CThostFtdcChangeAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcChangeAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcChangeAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcChangeAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcChangeAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcChangeAccountField.BankPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcChangeAccountField.SecuPwdFlag"] = "PwdFlagType"
char_type_def["CThostFtdcChangeAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcChangeAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcChangeAccountField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcChangeAccountField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcChangeAccountField.LongCustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcSecAgentACIDMapField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcSecAgentACIDMapField.UserID"] = "UserIDType"
char_type_def["CThostFtdcSecAgentACIDMapField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcSecAgentACIDMapField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcSecAgentACIDMapField.BrokerSecAgentID"] = "AccountIDType"
char_type_def["CThostFtdcQrySecAgentACIDMapField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQrySecAgentACIDMapField.UserID"] = "UserIDType"
char_type_def["CThostFtdcQrySecAgentACIDMapField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcQrySecAgentACIDMapField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcUserRightsAssignField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcUserRightsAssignField.UserID"] = "UserIDType"
char_type_def["CThostFtdcUserRightsAssignField.DRIdentityID"] = "DRIdentityIDType"
char_type_def["CThostFtdcBrokerUserRightAssignField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcBrokerUserRightAssignField.DRIdentityID"] = "DRIdentityIDType"
char_type_def["CThostFtdcBrokerUserRightAssignField.Tradeable"] = "BoolType"
char_type_def["CThostFtdcDRTransferField.OrigDRIdentityID"] = "DRIdentityIDType"
char_type_def["CThostFtdcDRTransferField.DestDRIdentityID"] = "DRIdentityIDType"
char_type_def["CThostFtdcDRTransferField.OrigBrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcDRTransferField.DestBrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcFensUserInfoField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcFensUserInfoField.UserID"] = "UserIDType"
char_type_def["CThostFtdcFensUserInfoField.LoginMode"] = "LoginModeType"
char_type_def["CThostFtdcCurrTransferIdentityField.IdentityID"] = "DRIdentityIDType"
char_type_def["CThostFtdcLoginForbiddenUserField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcLoginForbiddenUserField.UserID"] = "UserIDType"
char_type_def["CThostFtdcLoginForbiddenUserField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcQryLoginForbiddenUserField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryLoginForbiddenUserField.UserID"] = "UserIDType"
char_type_def["CThostFtdcMulticastGroupInfoField.GroupIP"] = "IPAddressType"
char_type_def["CThostFtdcMulticastGroupInfoField.GroupPort"] = "IPPortType"
char_type_def["CThostFtdcMulticastGroupInfoField.SourceIP"] = "IPAddressType"
char_type_def["CThostFtdcTradingAccountReserveField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcTradingAccountReserveField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcTradingAccountReserveField.Reserve"] = "MoneyType"
char_type_def["CThostFtdcTradingAccountReserveField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryLoginForbiddenIPField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcQryIPListField.IPAddress"] = "IPAddressType"
char_type_def["CThostFtdcQryUserRightsAssignField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQryUserRightsAssignField.UserID"] = "UserIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.CustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.Gender"] = "GenderType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.Address"] = "AddressType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.Fax"] = "FaxType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.EMail"] = "EMailType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.Digest"] = "DigestType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.TID"] = "TIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.Password"] = "PasswordType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BankReserveOpenSeq"] = "BankSerialType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BookDate"] = "TradeDateType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.BookPsw"] = "PasswordType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcReserveOpenAccountConfirmField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcReserveOpenAccountField.TradeCode"] = "TradeCodeType"
char_type_def["CThostFtdcReserveOpenAccountField.BankID"] = "BankIDType"
char_type_def["CThostFtdcReserveOpenAccountField.BankBranchID"] = "BankBrchIDType"
char_type_def["CThostFtdcReserveOpenAccountField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcReserveOpenAccountField.BrokerBranchID"] = "FutureBranchIDType"
char_type_def["CThostFtdcReserveOpenAccountField.TradeDate"] = "TradeDateType"
char_type_def["CThostFtdcReserveOpenAccountField.TradeTime"] = "TradeTimeType"
char_type_def["CThostFtdcReserveOpenAccountField.BankSerial"] = "BankSerialType"
char_type_def["CThostFtdcReserveOpenAccountField.TradingDay"] = "TradeDateType"
char_type_def["CThostFtdcReserveOpenAccountField.PlateSerial"] = "SerialType"
char_type_def["CThostFtdcReserveOpenAccountField.LastFragment"] = "LastFragmentType"
char_type_def["CThostFtdcReserveOpenAccountField.SessionID"] = "SessionIDType"
char_type_def["CThostFtdcReserveOpenAccountField.CustomerName"] = "LongIndividualNameType"
char_type_def["CThostFtdcReserveOpenAccountField.IdCardType"] = "IdCardTypeType"
char_type_def["CThostFtdcReserveOpenAccountField.IdentifiedCardNo"] = "IdentifiedCardNoType"
char_type_def["CThostFtdcReserveOpenAccountField.Gender"] = "GenderType"
char_type_def["CThostFtdcReserveOpenAccountField.CountryCode"] = "CountryCodeType"
char_type_def["CThostFtdcReserveOpenAccountField.CustType"] = "CustTypeType"
char_type_def["CThostFtdcReserveOpenAccountField.Address"] = "AddressType"
char_type_def["CThostFtdcReserveOpenAccountField.ZipCode"] = "ZipCodeType"
char_type_def["CThostFtdcReserveOpenAccountField.Telephone"] = "TelephoneType"
char_type_def["CThostFtdcReserveOpenAccountField.MobilePhone"] = "MobilePhoneType"
char_type_def["CThostFtdcReserveOpenAccountField.Fax"] = "FaxType"
char_type_def["CThostFtdcReserveOpenAccountField.EMail"] = "EMailType"
char_type_def["CThostFtdcReserveOpenAccountField.MoneyAccountStatus"] = "MoneyAccountStatusType"
char_type_def["CThostFtdcReserveOpenAccountField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcReserveOpenAccountField.BankPassWord"] = "PasswordType"
char_type_def["CThostFtdcReserveOpenAccountField.InstallID"] = "InstallIDType"
char_type_def["CThostFtdcReserveOpenAccountField.VerifyCertNoFlag"] = "YesNoIndicatorType"
char_type_def["CThostFtdcReserveOpenAccountField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcReserveOpenAccountField.Digest"] = "DigestType"
char_type_def["CThostFtdcReserveOpenAccountField.BankAccType"] = "BankAccTypeType"
char_type_def["CThostFtdcReserveOpenAccountField.BrokerIDByBank"] = "BankCodingForFutureType"
char_type_def["CThostFtdcReserveOpenAccountField.TID"] = "TIDType"
char_type_def["CThostFtdcReserveOpenAccountField.ReserveOpenAccStas"] = "ReserveOpenAccStasType"
char_type_def["CThostFtdcReserveOpenAccountField.ErrorID"] = "ErrorIDType"
char_type_def["CThostFtdcReserveOpenAccountField.ErrorMsg"] = "ErrorMsgType"
char_type_def["CThostFtdcAccountPropertyField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcAccountPropertyField.AccountID"] = "AccountIDType"
char_type_def["CThostFtdcAccountPropertyField.BankID"] = "BankIDType"
char_type_def["CThostFtdcAccountPropertyField.BankAccount"] = "BankAccountType"
char_type_def["CThostFtdcAccountPropertyField.OpenName"] = "InvestorFullNameType"
char_type_def["CThostFtdcAccountPropertyField.OpenBank"] = "OpenBankType"
char_type_def["CThostFtdcAccountPropertyField.IsActive"] = "BoolType"
char_type_def["CThostFtdcAccountPropertyField.AccountSourceType"] = "AccountSourceTypeType"
char_type_def["CThostFtdcAccountPropertyField.OpenDate"] = "DateType"
char_type_def["CThostFtdcAccountPropertyField.CancelDate"] = "DateType"
char_type_def["CThostFtdcAccountPropertyField.OperatorID"] = "OperatorIDType"
char_type_def["CThostFtdcAccountPropertyField.OperateDate"] = "DateType"
char_type_def["CThostFtdcAccountPropertyField.OperateTime"] = "TimeType"
char_type_def["CThostFtdcAccountPropertyField.CurrencyID"] = "CurrencyIDType"
char_type_def["CThostFtdcQryCurrDRIdentityField.DRIdentityID"] = "DRIdentityIDType"
char_type_def["CThostFtdcCurrDRIdentityField.DRIdentityID"] = "DRIdentityIDType"
char_type_def["CThostFtdcQrySecAgentCheckModeField.BrokerID"] = "BrokerIDType"
char_type_def["CThostFtdcQrySecAgentCheckModeField.InvestorID"] = "InvestorIDType"
