# generated by datamodel-codegen:
#   filename:  structs_flat.json
#   timestamp: 2023-07-18T07:22:38+00:00

from __future__ import annotations

from typing import Any, ClassVar, Optional

from pydantic import BaseModel, Field, constr


class CtpField(BaseModel):
    _ctp_type_: ClassVar[callable] = None

    def ctp_object(self) -> any:
        obj = self._ctp_type_()
        for key, value in self.dict().items():
            if value is not None:
                setattr(obj, key, value)
        return obj

    class Config:
        orm_mode = True


class DisseminationField(CtpField):
    SequenceSeries: Optional[int] = Field(None, description='序列系列号')
    SequenceNo: Optional[int] = Field(None, description='序列号')


class ReqUserLoginField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    InterfaceProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='接口端产品信息'
    )
    ProtocolInfo: Optional[constr(max_length=11)] = Field(None, description='协议信息')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    OneTimePassword: Optional[constr(max_length=41)] = Field(None, description='动态密码')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    LoginRemark: Optional[constr(max_length=36)] = Field(None, description='登录备注')
    ClientIPPort: Optional[int] = Field(None, description='终端IP端口')
    ClientIPAddress: Optional[constr(max_length=33)] = Field(None, description='终端IP地址')


class RspUserLoginField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    LoginTime: Optional[constr(max_length=9)] = Field(None, description='登录成功时间')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    SystemName: Optional[constr(max_length=41)] = Field(None, description='交易系统名称')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    MaxOrderRef: Optional[constr(max_length=13)] = Field(None, description='最大报单引用')
    SHFETime: Optional[constr(max_length=9)] = Field(None, description='上期所时间')
    DCETime: Optional[constr(max_length=9)] = Field(None, description='大商所时间')
    CZCETime: Optional[constr(max_length=9)] = Field(None, description='郑商所时间')
    FFEXTime: Optional[constr(max_length=9)] = Field(None, description='中金所时间')
    INETime: Optional[constr(max_length=9)] = Field(None, description='能源中心时间')
    SysVersion: Optional[constr(max_length=41)] = Field(None, description='后台版本信息')


class UserLogoutField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class ForceUserLogoutField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class ReqAuthenticateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    AuthCode: Optional[constr(max_length=17)] = Field(None, description='认证码')
    AppID: Optional[constr(max_length=33)] = Field(None, description='App代码')


class RspAuthenticateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    AppID: Optional[constr(max_length=33)] = Field(None, description='App代码')
    AppType: Optional[constr(max_length=1)] = Field(None, description='App类型')


class AuthenticationInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    AuthInfo: Optional[constr(max_length=129)] = Field(None, description='认证信息')
    IsResult: Optional[int] = Field(None, description='是否为认证结果')
    AppID: Optional[constr(max_length=33)] = Field(None, description='App代码')
    AppType: Optional[constr(max_length=1)] = Field(None, description='App类型')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    ClientIPAddress: Optional[constr(max_length=33)] = Field(None, description='终端IP地址')


class RspUserLogin2Field(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    LoginTime: Optional[constr(max_length=9)] = Field(None, description='登录成功时间')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    SystemName: Optional[constr(max_length=41)] = Field(None, description='交易系统名称')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    MaxOrderRef: Optional[constr(max_length=13)] = Field(None, description='最大报单引用')
    SHFETime: Optional[constr(max_length=9)] = Field(None, description='上期所时间')
    DCETime: Optional[constr(max_length=9)] = Field(None, description='大商所时间')
    CZCETime: Optional[constr(max_length=9)] = Field(None, description='郑商所时间')
    FFEXTime: Optional[constr(max_length=9)] = Field(None, description='中金所时间')
    INETime: Optional[constr(max_length=9)] = Field(None, description='能源中心时间')
    RandomString: Optional[constr(max_length=17)] = Field(None, description='随机串')


class TransferHeaderField(CtpField):
    Version: Optional[constr(max_length=4)] = Field(None, description='版本号，常量，1.0')
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='交易代码，必填')
    TradeDate: Optional[constr(max_length=9)] = Field(
        None, description='交易日期，必填，格式：yyyymmdd'
    )
    TradeTime: Optional[constr(max_length=9)] = Field(
        None, description='交易时间，必填，格式：hhmmss'
    )
    TradeSerial: Optional[constr(max_length=9)] = Field(None, description='发起方流水号，N/A')
    FutureID: Optional[constr(max_length=11)] = Field(None, description='期货公司代码，必填')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码，根据查询银行得到，必填')
    BankBrchID: Optional[constr(max_length=5)] = Field(
        None, description='银行分中心代码，根据查询银行得到，必填'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='操作员，N/A')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='交易设备类型，N/A')
    RecordNum: Optional[constr(max_length=7)] = Field(None, description='记录数，N/A')
    SessionID: Optional[int] = Field(None, description='会话编号，N/A')
    RequestID: Optional[int] = Field(None, description='请求编号，N/A')


class TransferBankToFutureReqField(CtpField):
    FutureAccount: Optional[constr(max_length=13)] = Field(None, description='期货资金账户')
    FuturePwdFlag: Optional[constr(max_length=1)] = Field(None, description='密码标志')
    FutureAccPwd: Optional[constr(max_length=17)] = Field(None, description='密码')
    TradeAmt: Optional[float] = Field(None, description='转账金额')
    CustFee: Optional[float] = Field(None, description='客户手续费')
    CurrencyCode: Optional[constr(max_length=4)] = Field(
        None, description='币种：RMB-人民币 USD-美圆 HKD-港元'
    )


class TransferBankToFutureRspField(CtpField):
    RetCode: Optional[constr(max_length=5)] = Field(None, description='响应代码')
    RetInfo: Optional[constr(max_length=129)] = Field(None, description='响应信息')
    FutureAccount: Optional[constr(max_length=13)] = Field(None, description='资金账户')
    TradeAmt: Optional[float] = Field(None, description='转帐金额')
    CustFee: Optional[float] = Field(None, description='应收客户手续费')
    CurrencyCode: Optional[constr(max_length=4)] = Field(None, description='币种')


class TransferFutureToBankReqField(CtpField):
    FutureAccount: Optional[constr(max_length=13)] = Field(None, description='期货资金账户')
    FuturePwdFlag: Optional[constr(max_length=1)] = Field(None, description='密码标志')
    FutureAccPwd: Optional[constr(max_length=17)] = Field(None, description='密码')
    TradeAmt: Optional[float] = Field(None, description='转账金额')
    CustFee: Optional[float] = Field(None, description='客户手续费')
    CurrencyCode: Optional[constr(max_length=4)] = Field(
        None, description='币种：RMB-人民币 USD-美圆 HKD-港元'
    )


class TransferFutureToBankRspField(CtpField):
    RetCode: Optional[constr(max_length=5)] = Field(None, description='响应代码')
    RetInfo: Optional[constr(max_length=129)] = Field(None, description='响应信息')
    FutureAccount: Optional[constr(max_length=13)] = Field(None, description='资金账户')
    TradeAmt: Optional[float] = Field(None, description='转帐金额')
    CustFee: Optional[float] = Field(None, description='应收客户手续费')
    CurrencyCode: Optional[constr(max_length=4)] = Field(None, description='币种')


class TransferQryBankReqField(CtpField):
    FutureAccount: Optional[constr(max_length=13)] = Field(None, description='期货资金账户')
    FuturePwdFlag: Optional[constr(max_length=1)] = Field(None, description='密码标志')
    FutureAccPwd: Optional[constr(max_length=17)] = Field(None, description='密码')
    CurrencyCode: Optional[constr(max_length=4)] = Field(
        None, description='币种：RMB-人民币 USD-美圆 HKD-港元'
    )


class TransferQryBankRspField(CtpField):
    RetCode: Optional[constr(max_length=5)] = Field(None, description='响应代码')
    RetInfo: Optional[constr(max_length=129)] = Field(None, description='响应信息')
    FutureAccount: Optional[constr(max_length=13)] = Field(None, description='资金账户')
    TradeAmt: Optional[float] = Field(None, description='银行余额')
    UseAmt: Optional[float] = Field(None, description='银行可用余额')
    FetchAmt: Optional[float] = Field(None, description='银行可取余额')
    CurrencyCode: Optional[constr(max_length=4)] = Field(None, description='币种')


class TransferQryDetailReqField(CtpField):
    FutureAccount: Optional[constr(max_length=13)] = Field(None, description='期货资金账户')


class TransferQryDetailRspField(CtpField):
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='交易代码')
    FutureSerial: Optional[int] = Field(None, description='期货流水号')
    FutureID: Optional[constr(max_length=11)] = Field(None, description='期货公司代码')
    FutureAccount: Optional[constr(max_length=22)] = Field(None, description='资金帐号')
    BankSerial: Optional[int] = Field(None, description='银行流水号')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBrchID: Optional[constr(max_length=5)] = Field(None, description='银行分中心代码')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行账号')
    CertCode: Optional[constr(max_length=21)] = Field(None, description='证件号码')
    CurrencyCode: Optional[constr(max_length=4)] = Field(None, description='货币代码')
    TxAmount: Optional[float] = Field(None, description='发生金额')
    Flag: Optional[constr(max_length=1)] = Field(None, description='有效标志')


class RspInfoField(CtpField):
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class ExchangeField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExchangeName: Optional[constr(max_length=61)] = Field(None, description='交易所名称')
    ExchangeProperty: Optional[constr(max_length=1)] = Field(None, description='交易所属性')


class ProductField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ProductName: Optional[constr(max_length=21)] = Field(None, description='产品名称')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ProductClass: Optional[constr(max_length=1)] = Field(None, description='产品类型')
    VolumeMultiple: Optional[int] = Field(None, description='合约数量乘数')
    PriceTick: Optional[float] = Field(None, description='最小变动价位')
    MaxMarketOrderVolume: Optional[int] = Field(None, description='市价单最大下单量')
    MinMarketOrderVolume: Optional[int] = Field(None, description='市价单最小下单量')
    MaxLimitOrderVolume: Optional[int] = Field(None, description='限价单最大下单量')
    MinLimitOrderVolume: Optional[int] = Field(None, description='限价单最小下单量')
    PositionType: Optional[constr(max_length=1)] = Field(None, description='持仓类型')
    PositionDateType: Optional[constr(max_length=1)] = Field(None, description='持仓日期类型')
    CloseDealType: Optional[constr(max_length=1)] = Field(None, description='平仓处理类型')
    TradeCurrencyID: Optional[constr(max_length=4)] = Field(None, description='交易币种类型')
    MortgageFundUseRange: Optional[constr(max_length=1)] = Field(
        None, description='质押资金可用范围'
    )
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    UnderlyingMultiple: Optional[float] = Field(None, description='合约基础商品乘数')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')
    ExchangeProductID: Optional[constr(max_length=81)] = Field(
        None, description='交易所产品代码'
    )
    OpenLimitControlLevel: Optional[constr(max_length=1)] = Field(
        None, description='开仓量限制粒度'
    )
    OrderFreqControlLevel: Optional[constr(max_length=1)] = Field(
        None, description='报单频率控制粒度'
    )


class InstrumentField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentName: Optional[constr(max_length=21)] = Field(None, description='合约名称')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    reserve3: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ProductClass: Optional[constr(max_length=1)] = Field(None, description='产品类型')
    DeliveryYear: Optional[int] = Field(None, description='交割年份')
    DeliveryMonth: Optional[int] = Field(None, description='交割月')
    MaxMarketOrderVolume: Optional[int] = Field(None, description='市价单最大下单量')
    MinMarketOrderVolume: Optional[int] = Field(None, description='市价单最小下单量')
    MaxLimitOrderVolume: Optional[int] = Field(None, description='限价单最大下单量')
    MinLimitOrderVolume: Optional[int] = Field(None, description='限价单最小下单量')
    VolumeMultiple: Optional[int] = Field(None, description='合约数量乘数')
    PriceTick: Optional[float] = Field(None, description='最小变动价位')
    CreateDate: Optional[constr(max_length=9)] = Field(None, description='创建日')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='上市日')
    ExpireDate: Optional[constr(max_length=9)] = Field(None, description='到期日')
    StartDelivDate: Optional[constr(max_length=9)] = Field(None, description='开始交割日')
    EndDelivDate: Optional[constr(max_length=9)] = Field(None, description='结束交割日')
    InstLifePhase: Optional[constr(max_length=1)] = Field(None, description='合约生命周期状态')
    IsTrading: Optional[int] = Field(None, description='当前是否交易')
    PositionType: Optional[constr(max_length=1)] = Field(None, description='持仓类型')
    PositionDateType: Optional[constr(max_length=1)] = Field(None, description='持仓日期类型')
    LongMarginRatio: Optional[float] = Field(None, description='多头保证金率')
    ShortMarginRatio: Optional[float] = Field(None, description='空头保证金率')
    MaxMarginSideAlgorithm: Optional[constr(max_length=1)] = Field(
        None, description='是否使用大额单边保证金算法'
    )
    reserve4: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    StrikePrice: Optional[float] = Field(None, description='执行价')
    OptionsType: Optional[constr(max_length=1)] = Field(None, description='期权类型')
    UnderlyingMultiple: Optional[float] = Field(None, description='合约基础商品乘数')
    CombinationType: Optional[constr(max_length=1)] = Field(None, description='组合类型')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')
    UnderlyingInstrID: Optional[constr(max_length=81)] = Field(
        None, description='基础商品代码'
    )


class BrokerField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    BrokerAbbr: Optional[constr(max_length=9)] = Field(None, description='经纪公司简称')
    BrokerName: Optional[constr(max_length=81)] = Field(None, description='经纪公司名称')
    IsActive: Optional[int] = Field(None, description='是否活跃')


class TraderField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    InstallCount: Optional[int] = Field(None, description='安装数量')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    OrderCancelAlg: Optional[constr(max_length=1)] = Field(
        None, description='撤单时选择席位算法'
    )


class InvestorField(CtpField):
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorGroupID: Optional[constr(max_length=13)] = Field(
        None, description='投资者分组代码'
    )
    InvestorName: Optional[constr(max_length=81)] = Field(None, description='投资者名称')
    IdentifiedCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    IsActive: Optional[int] = Field(None, description='是否活跃')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='联系电话')
    Address: Optional[constr(max_length=101)] = Field(None, description='通讯地址')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='开户日期')
    Mobile: Optional[constr(max_length=41)] = Field(None, description='手机')
    CommModelID: Optional[constr(max_length=13)] = Field(None, description='手续费率模板代码')
    MarginModelID: Optional[constr(max_length=13)] = Field(None, description='保证金率模板代码')
    IsOrderFreq: Optional[constr(max_length=1)] = Field(None, description='是否频率控制')
    IsOpenVolLimit: Optional[constr(max_length=1)] = Field(None, description='是否开仓限制')


class TradingCodeField(CtpField):
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    IsActive: Optional[int] = Field(None, description='是否活跃')
    ClientIDType: Optional[constr(max_length=1)] = Field(None, description='交易编码类型')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    BizType: Optional[constr(max_length=1)] = Field(None, description='业务类型')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class PartBrokerField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    IsActive: Optional[int] = Field(None, description='是否活跃')


class SuperUserField(CtpField):
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserName: Optional[constr(max_length=81)] = Field(None, description='用户名称')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    IsActive: Optional[int] = Field(None, description='是否活跃')


class SuperUserFunctionField(CtpField):
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    FunctionCode: Optional[constr(max_length=1)] = Field(None, description='功能代码')


class InvestorGroupField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorGroupID: Optional[constr(max_length=13)] = Field(
        None, description='投资者分组代码'
    )
    InvestorGroupName: Optional[constr(max_length=41)] = Field(
        None, description='投资者分组名称'
    )


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


class InvestorPositionField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    PosiDirection: Optional[constr(max_length=1)] = Field(None, description='持仓多空方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    PositionDate: Optional[constr(max_length=1)] = Field(None, description='持仓日期')
    YdPosition: Optional[int] = Field(None, description='上日持仓')
    Position: Optional[int] = Field(None, description='今日持仓')
    LongFrozen: Optional[int] = Field(None, description='多头冻结')
    ShortFrozen: Optional[int] = Field(None, description='空头冻结')
    LongFrozenAmount: Optional[float] = Field(None, description='开仓冻结金额')
    ShortFrozenAmount: Optional[float] = Field(None, description='开仓冻结金额')
    OpenVolume: Optional[int] = Field(None, description='开仓量')
    CloseVolume: Optional[int] = Field(None, description='平仓量')
    OpenAmount: Optional[float] = Field(None, description='开仓金额')
    CloseAmount: Optional[float] = Field(None, description='平仓金额')
    PositionCost: Optional[float] = Field(None, description='持仓成本')
    PreMargin: Optional[float] = Field(None, description='上次占用的保证金')
    UseMargin: Optional[float] = Field(None, description='占用的保证金')
    FrozenMargin: Optional[float] = Field(None, description='冻结的保证金')
    FrozenCash: Optional[float] = Field(None, description='冻结的资金')
    FrozenCommission: Optional[float] = Field(None, description='冻结的手续费')
    CashIn: Optional[float] = Field(None, description='资金差额')
    Commission: Optional[float] = Field(None, description='手续费')
    CloseProfit: Optional[float] = Field(None, description='平仓盈亏')
    PositionProfit: Optional[float] = Field(None, description='持仓盈亏')
    PreSettlementPrice: Optional[float] = Field(None, description='上次结算价')
    SettlementPrice: Optional[float] = Field(None, description='本次结算价')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    OpenCost: Optional[float] = Field(None, description='开仓成本')
    ExchangeMargin: Optional[float] = Field(None, description='交易所保证金')
    CombPosition: Optional[int] = Field(None, description='组合成交形成的持仓')
    CombLongFrozen: Optional[int] = Field(None, description='组合多头冻结')
    CombShortFrozen: Optional[int] = Field(None, description='组合空头冻结')
    CloseProfitByDate: Optional[float] = Field(None, description='逐日盯市平仓盈亏')
    CloseProfitByTrade: Optional[float] = Field(None, description='逐笔对冲平仓盈亏')
    TodayPosition: Optional[int] = Field(None, description='今日持仓')
    MarginRateByMoney: Optional[float] = Field(None, description='保证金率')
    MarginRateByVolume: Optional[float] = Field(None, description='保证金率(按手数)')
    StrikeFrozen: Optional[int] = Field(None, description='执行冻结')
    StrikeFrozenAmount: Optional[float] = Field(None, description='执行冻结金额')
    AbandonFrozen: Optional[int] = Field(None, description='放弃执行冻结')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    YdStrikeFrozen: Optional[int] = Field(None, description='执行冻结的昨仓')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    PositionCostOffset: Optional[float] = Field(None, description='大商所持仓成本差值，只有大商所使用')
    TasPosition: Optional[int] = Field(None, description='tas持仓手数')
    TasPositionCost: Optional[float] = Field(None, description='tas持仓成本')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InstrumentMarginRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    IsRelative: Optional[int] = Field(None, description='是否相对交易所收取')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InstrumentCommissionRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OpenRatioByMoney: Optional[float] = Field(None, description='开仓手续费率')
    OpenRatioByVolume: Optional[float] = Field(None, description='开仓手续费')
    CloseRatioByMoney: Optional[float] = Field(None, description='平仓手续费率')
    CloseRatioByVolume: Optional[float] = Field(None, description='平仓手续费')
    CloseTodayRatioByMoney: Optional[float] = Field(None, description='平今手续费率')
    CloseTodayRatioByVolume: Optional[float] = Field(None, description='平今手续费')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    BizType: Optional[constr(max_length=1)] = Field(None, description='业务类型')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class DepthMarketDataField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    LastPrice: Optional[float] = Field(None, description='最新价')
    PreSettlementPrice: Optional[float] = Field(None, description='上次结算价')
    PreClosePrice: Optional[float] = Field(None, description='昨收盘')
    PreOpenInterest: Optional[float] = Field(None, description='昨持仓量')
    OpenPrice: Optional[float] = Field(None, description='今开盘')
    HighestPrice: Optional[float] = Field(None, description='最高价')
    LowestPrice: Optional[float] = Field(None, description='最低价')
    Volume: Optional[int] = Field(None, description='数量')
    Turnover: Optional[float] = Field(None, description='成交金额')
    OpenInterest: Optional[float] = Field(None, description='持仓量')
    ClosePrice: Optional[float] = Field(None, description='今收盘')
    SettlementPrice: Optional[float] = Field(None, description='本次结算价')
    UpperLimitPrice: Optional[float] = Field(None, description='涨停板价')
    LowerLimitPrice: Optional[float] = Field(None, description='跌停板价')
    PreDelta: Optional[float] = Field(None, description='昨虚实度')
    CurrDelta: Optional[float] = Field(None, description='今虚实度')
    UpdateTime: Optional[constr(max_length=9)] = Field(None, description='最后修改时间')
    UpdateMillisec: Optional[int] = Field(None, description='最后修改毫秒')
    BidPrice1: Optional[float] = Field(None, description='申买价一')
    BidVolume1: Optional[int] = Field(None, description='申买量一')
    AskPrice1: Optional[float] = Field(None, description='申卖价一')
    AskVolume1: Optional[int] = Field(None, description='申卖量一')
    BidPrice2: Optional[float] = Field(None, description='申买价二')
    BidVolume2: Optional[int] = Field(None, description='申买量二')
    AskPrice2: Optional[float] = Field(None, description='申卖价二')
    AskVolume2: Optional[int] = Field(None, description='申卖量二')
    BidPrice3: Optional[float] = Field(None, description='申买价三')
    BidVolume3: Optional[int] = Field(None, description='申买量三')
    AskPrice3: Optional[float] = Field(None, description='申卖价三')
    AskVolume3: Optional[int] = Field(None, description='申卖量三')
    BidPrice4: Optional[float] = Field(None, description='申买价四')
    BidVolume4: Optional[int] = Field(None, description='申买量四')
    AskPrice4: Optional[float] = Field(None, description='申卖价四')
    AskVolume4: Optional[int] = Field(None, description='申卖量四')
    BidPrice5: Optional[float] = Field(None, description='申买价五')
    BidVolume5: Optional[int] = Field(None, description='申买量五')
    AskPrice5: Optional[float] = Field(None, description='申卖价五')
    AskVolume5: Optional[int] = Field(None, description='申卖量五')
    AveragePrice: Optional[float] = Field(None, description='当日均价')
    ActionDay: Optional[constr(max_length=9)] = Field(None, description='业务日期')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    BandingUpperPrice: Optional[float] = Field(None, description='上带价')
    BandingLowerPrice: Optional[float] = Field(None, description='下带价')


class InstrumentTradingRightField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    TradingRight: Optional[constr(max_length=1)] = Field(None, description='交易权限')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class BrokerUserField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserName: Optional[constr(max_length=81)] = Field(None, description='用户名称')
    UserType: Optional[constr(max_length=1)] = Field(None, description='用户类型')
    IsActive: Optional[int] = Field(None, description='是否活跃')
    IsUsingOTP: Optional[int] = Field(None, description='是否使用令牌')
    IsAuthForce: Optional[int] = Field(None, description='是否强制终端认证')


class BrokerUserPasswordField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    LastUpdateTime: Optional[constr(max_length=17)] = Field(None, description='上次修改时间')
    LastLoginTime: Optional[constr(max_length=17)] = Field(None, description='上次登陆时间')
    ExpireDate: Optional[constr(max_length=9)] = Field(None, description='密码过期时间')
    WeakExpireDate: Optional[constr(max_length=9)] = Field(None, description='弱密码过期时间')


class BrokerUserFunctionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    BrokerFunctionCode: Optional[constr(max_length=1)] = Field(
        None, description='经纪公司功能代码'
    )


class TraderOfferField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    TraderConnectStatus: Optional[constr(max_length=1)] = Field(
        None, description='交易所交易员连接状态'
    )
    ConnectRequestDate: Optional[constr(max_length=9)] = Field(
        None, description='发出连接请求的日期'
    )
    ConnectRequestTime: Optional[constr(max_length=9)] = Field(
        None, description='发出连接请求的时间'
    )
    LastReportDate: Optional[constr(max_length=9)] = Field(None, description='上次报告日期')
    LastReportTime: Optional[constr(max_length=9)] = Field(None, description='上次报告时间')
    ConnectDate: Optional[constr(max_length=9)] = Field(None, description='完成连接日期')
    ConnectTime: Optional[constr(max_length=9)] = Field(None, description='完成连接时间')
    StartDate: Optional[constr(max_length=9)] = Field(None, description='启动日期')
    StartTime: Optional[constr(max_length=9)] = Field(None, description='启动时间')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    MaxTradeID: Optional[constr(max_length=21)] = Field(None, description='本席位最大成交编号')
    MaxOrderMessageReference: Optional[constr(max_length=7)] = Field(
        None, description='本席位最大报单备拷'
    )
    OrderCancelAlg: Optional[constr(max_length=1)] = Field(
        None, description='撤单时选择席位算法'
    )


class SettlementInfoField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    SequenceNo: Optional[int] = Field(None, description='序号')
    Content: Optional[constr(max_length=501)] = Field(None, description='消息正文')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class InstrumentMarginRateAdjustField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    IsRelative: Optional[int] = Field(None, description='是否相对交易所收取')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeMarginRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeMarginRateAdjustField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='跟随交易所投资者多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='跟随交易所投资者多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='跟随交易所投资者空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(
        None, description='跟随交易所投资者空头保证金费'
    )
    ExchLongMarginRatioByMoney: Optional[float] = Field(None, description='交易所多头保证金率')
    ExchLongMarginRatioByVolume: Optional[float] = Field(None, description='交易所多头保证金费')
    ExchShortMarginRatioByMoney: Optional[float] = Field(None, description='交易所空头保证金率')
    ExchShortMarginRatioByVolume: Optional[float] = Field(None, description='交易所空头保证金费')
    NoLongMarginRatioByMoney: Optional[float] = Field(
        None, description='不跟随交易所投资者多头保证金率'
    )
    NoLongMarginRatioByVolume: Optional[float] = Field(
        None, description='不跟随交易所投资者多头保证金费'
    )
    NoShortMarginRatioByMoney: Optional[float] = Field(
        None, description='不跟随交易所投资者空头保证金率'
    )
    NoShortMarginRatioByVolume: Optional[float] = Field(
        None, description='不跟随交易所投资者空头保证金费'
    )
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    FromCurrencyID: Optional[constr(max_length=4)] = Field(None, description='源币种')
    FromCurrencyUnit: Optional[float] = Field(None, description='源币种单位数量')
    ToCurrencyID: Optional[constr(max_length=4)] = Field(None, description='目标币种')
    ExchangeRate: Optional[float] = Field(None, description='汇率')


class SettlementRefField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')


class CurrentTimeField(CtpField):
    CurrDate: Optional[constr(max_length=9)] = Field(None, description='当前交易日')
    CurrTime: Optional[constr(max_length=9)] = Field(None, description='当前时间')
    CurrMillisec: Optional[int] = Field(None, description='当前时间（毫秒）')
    ActionDay: Optional[constr(max_length=9)] = Field(None, description='自然日期')


class CommPhaseField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    CommPhaseNo: Optional[int] = Field(None, description='通讯时段编号')
    SystemID: Optional[constr(max_length=21)] = Field(None, description='系统编号')


class LoginInfoField(CtpField):
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    LoginDate: Optional[constr(max_length=9)] = Field(None, description='登录日期')
    LoginTime: Optional[constr(max_length=9)] = Field(None, description='登录时间')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    InterfaceProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='接口端产品信息'
    )
    ProtocolInfo: Optional[constr(max_length=11)] = Field(None, description='协议信息')
    SystemName: Optional[constr(max_length=41)] = Field(None, description='系统名称')
    PasswordDeprecated: Optional[constr(max_length=41)] = Field(
        None, description='密码,已弃用'
    )
    MaxOrderRef: Optional[constr(max_length=13)] = Field(None, description='最大报单引用')
    SHFETime: Optional[constr(max_length=9)] = Field(None, description='上期所时间')
    DCETime: Optional[constr(max_length=9)] = Field(None, description='大商所时间')
    CZCETime: Optional[constr(max_length=9)] = Field(None, description='郑商所时间')
    FFEXTime: Optional[constr(max_length=9)] = Field(None, description='中金所时间')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    OneTimePassword: Optional[constr(max_length=41)] = Field(None, description='动态密码')
    INETime: Optional[constr(max_length=9)] = Field(None, description='能源中心时间')
    IsQryControl: Optional[int] = Field(None, description='查询时是否需要流控')
    LoginRemark: Optional[constr(max_length=36)] = Field(None, description='登录备注')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class LogoutAllField(CtpField):
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    SystemName: Optional[constr(max_length=41)] = Field(None, description='系统名称')


class FrontStatusField(CtpField):
    FrontID: Optional[int] = Field(None, description='前置编号')
    LastReportDate: Optional[constr(max_length=9)] = Field(None, description='上次报告日期')
    LastReportTime: Optional[constr(max_length=9)] = Field(None, description='上次报告时间')
    IsActive: Optional[int] = Field(None, description='是否活跃')


class UserPasswordUpdateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    OldPassword: Optional[constr(max_length=41)] = Field(None, description='原来的口令')
    NewPassword: Optional[constr(max_length=41)] = Field(None, description='新的口令')


class InputOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    OrderPriceType: Optional[constr(max_length=1)] = Field(None, description='报单价格条件')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    CombOffsetFlag: Optional[constr(max_length=5)] = Field(None, description='组合开平标志')
    CombHedgeFlag: Optional[constr(max_length=5)] = Field(None, description='组合投机套保标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeTotalOriginal: Optional[int] = Field(None, description='数量')
    TimeCondition: Optional[constr(max_length=1)] = Field(None, description='有效期类型')
    GTDDate: Optional[constr(max_length=9)] = Field(None, description='GTD日期')
    VolumeCondition: Optional[constr(max_length=1)] = Field(None, description='成交量类型')
    MinVolume: Optional[int] = Field(None, description='最小成交量')
    ContingentCondition: Optional[constr(max_length=1)] = Field(
        None, description='触发条件'
    )
    StopPrice: Optional[float] = Field(None, description='止损价')
    ForceCloseReason: Optional[constr(max_length=1)] = Field(None, description='强平原因')
    IsAutoSuspend: Optional[int] = Field(None, description='自动挂起标志')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    RequestID: Optional[int] = Field(None, description='请求编号')
    UserForceClose: Optional[int] = Field(None, description='用户强评标志')
    IsSwapOrder: Optional[int] = Field(None, description='互换单标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


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


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


class ExchangeOrderInsertErrorField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class InputOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OrderActionRef: Optional[int] = Field(None, description='报单操作引用')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeChange: Optional[int] = Field(None, description='数量变化')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class OrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OrderActionRef: Optional[int] = Field(None, description='报单操作引用')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeChange: Optional[int] = Field(None, description='数量变化')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class ExchangeOrderActionField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeChange: Optional[int] = Field(None, description='数量变化')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class ExchangeOrderActionErrorField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class ExchangeTradeField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TradeID: Optional[constr(max_length=21)] = Field(None, description='成交编号')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    TradingRole: Optional[constr(max_length=1)] = Field(None, description='交易角色')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Price: Optional[float] = Field(None, description='价格')
    Volume: Optional[int] = Field(None, description='数量')
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='成交时期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='成交时间')
    TradeType: Optional[constr(max_length=1)] = Field(None, description='成交类型')
    PriceSource: Optional[constr(max_length=1)] = Field(None, description='成交价来源')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    SequenceNo: Optional[int] = Field(None, description='序号')
    TradeSource: Optional[constr(max_length=1)] = Field(None, description='成交来源')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class TradeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TradeID: Optional[constr(max_length=21)] = Field(None, description='成交编号')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    TradingRole: Optional[constr(max_length=1)] = Field(None, description='交易角色')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Price: Optional[float] = Field(None, description='价格')
    Volume: Optional[int] = Field(None, description='数量')
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='成交时期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='成交时间')
    TradeType: Optional[constr(max_length=1)] = Field(None, description='成交类型')
    PriceSource: Optional[constr(max_length=1)] = Field(None, description='成交价来源')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    SequenceNo: Optional[int] = Field(None, description='序号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    BrokerOrderSeq: Optional[int] = Field(None, description='经纪公司报单编号')
    TradeSource: Optional[constr(max_length=1)] = Field(None, description='成交来源')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class UserSessionField(CtpField):
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    LoginDate: Optional[constr(max_length=9)] = Field(None, description='登录日期')
    LoginTime: Optional[constr(max_length=9)] = Field(None, description='登录时间')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    InterfaceProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='接口端产品信息'
    )
    ProtocolInfo: Optional[constr(max_length=11)] = Field(None, description='协议信息')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    LoginRemark: Optional[constr(max_length=36)] = Field(None, description='登录备注')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QueryMaxOrderVolumeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    MaxVolume: Optional[int] = Field(None, description='最大允许报单数量')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class SettlementInfoConfirmField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ConfirmDate: Optional[constr(max_length=9)] = Field(None, description='确认日期')
    ConfirmTime: Optional[constr(max_length=9)] = Field(None, description='确认时间')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class SyncDepositField(CtpField):
    DepositSeqNo: Optional[constr(max_length=15)] = Field(None, description='出入金流水号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    Deposit: Optional[float] = Field(None, description='入金金额')
    IsForce: Optional[int] = Field(None, description='是否强制进行')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    IsFromSopt: Optional[int] = Field(None, description='是否是个股期权内转')
    TradingPassword: Optional[constr(max_length=41)] = Field(None, description='资金密码')


class SyncFundMortgageField(CtpField):
    MortgageSeqNo: Optional[constr(max_length=15)] = Field(None, description='货币质押流水号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    FromCurrencyID: Optional[constr(max_length=4)] = Field(None, description='源币种')
    MortgageAmount: Optional[float] = Field(None, description='质押金额')
    ToCurrencyID: Optional[constr(max_length=4)] = Field(None, description='目标币种')


class BrokerSyncField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')


class SyncingInvestorField(CtpField):
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorGroupID: Optional[constr(max_length=13)] = Field(
        None, description='投资者分组代码'
    )
    InvestorName: Optional[constr(max_length=81)] = Field(None, description='投资者名称')
    IdentifiedCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    IsActive: Optional[int] = Field(None, description='是否活跃')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='联系电话')
    Address: Optional[constr(max_length=101)] = Field(None, description='通讯地址')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='开户日期')
    Mobile: Optional[constr(max_length=41)] = Field(None, description='手机')
    CommModelID: Optional[constr(max_length=13)] = Field(None, description='手续费率模板代码')
    MarginModelID: Optional[constr(max_length=13)] = Field(None, description='保证金率模板代码')
    IsOrderFreq: Optional[constr(max_length=1)] = Field(None, description='是否频率控制')
    IsOpenVolLimit: Optional[constr(max_length=1)] = Field(None, description='是否开仓限制')


class SyncingTradingCodeField(CtpField):
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    IsActive: Optional[int] = Field(None, description='是否活跃')
    ClientIDType: Optional[constr(max_length=1)] = Field(None, description='交易编码类型')


class SyncingInvestorGroupField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorGroupID: Optional[constr(max_length=13)] = Field(
        None, description='投资者分组代码'
    )
    InvestorGroupName: Optional[constr(max_length=41)] = Field(
        None, description='投资者分组名称'
    )


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


class SyncingInvestorPositionField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    PosiDirection: Optional[constr(max_length=1)] = Field(None, description='持仓多空方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    PositionDate: Optional[constr(max_length=1)] = Field(None, description='持仓日期')
    YdPosition: Optional[int] = Field(None, description='上日持仓')
    Position: Optional[int] = Field(None, description='今日持仓')
    LongFrozen: Optional[int] = Field(None, description='多头冻结')
    ShortFrozen: Optional[int] = Field(None, description='空头冻结')
    LongFrozenAmount: Optional[float] = Field(None, description='开仓冻结金额')
    ShortFrozenAmount: Optional[float] = Field(None, description='开仓冻结金额')
    OpenVolume: Optional[int] = Field(None, description='开仓量')
    CloseVolume: Optional[int] = Field(None, description='平仓量')
    OpenAmount: Optional[float] = Field(None, description='开仓金额')
    CloseAmount: Optional[float] = Field(None, description='平仓金额')
    PositionCost: Optional[float] = Field(None, description='持仓成本')
    PreMargin: Optional[float] = Field(None, description='上次占用的保证金')
    UseMargin: Optional[float] = Field(None, description='占用的保证金')
    FrozenMargin: Optional[float] = Field(None, description='冻结的保证金')
    FrozenCash: Optional[float] = Field(None, description='冻结的资金')
    FrozenCommission: Optional[float] = Field(None, description='冻结的手续费')
    CashIn: Optional[float] = Field(None, description='资金差额')
    Commission: Optional[float] = Field(None, description='手续费')
    CloseProfit: Optional[float] = Field(None, description='平仓盈亏')
    PositionProfit: Optional[float] = Field(None, description='持仓盈亏')
    PreSettlementPrice: Optional[float] = Field(None, description='上次结算价')
    SettlementPrice: Optional[float] = Field(None, description='本次结算价')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    OpenCost: Optional[float] = Field(None, description='开仓成本')
    ExchangeMargin: Optional[float] = Field(None, description='交易所保证金')
    CombPosition: Optional[int] = Field(None, description='组合成交形成的持仓')
    CombLongFrozen: Optional[int] = Field(None, description='组合多头冻结')
    CombShortFrozen: Optional[int] = Field(None, description='组合空头冻结')
    CloseProfitByDate: Optional[float] = Field(None, description='逐日盯市平仓盈亏')
    CloseProfitByTrade: Optional[float] = Field(None, description='逐笔对冲平仓盈亏')
    TodayPosition: Optional[int] = Field(None, description='今日持仓')
    MarginRateByMoney: Optional[float] = Field(None, description='保证金率')
    MarginRateByVolume: Optional[float] = Field(None, description='保证金率(按手数)')
    StrikeFrozen: Optional[int] = Field(None, description='执行冻结')
    StrikeFrozenAmount: Optional[float] = Field(None, description='执行冻结金额')
    AbandonFrozen: Optional[int] = Field(None, description='放弃执行冻结')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    YdStrikeFrozen: Optional[int] = Field(None, description='执行冻结的昨仓')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    PositionCostOffset: Optional[float] = Field(None, description='大商所持仓成本差值，只有大商所使用')
    TasPosition: Optional[int] = Field(None, description='tas持仓手数')
    TasPositionCost: Optional[float] = Field(None, description='tas持仓成本')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class SyncingInstrumentMarginRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    IsRelative: Optional[int] = Field(None, description='是否相对交易所收取')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class SyncingInstrumentCommissionRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OpenRatioByMoney: Optional[float] = Field(None, description='开仓手续费率')
    OpenRatioByVolume: Optional[float] = Field(None, description='开仓手续费')
    CloseRatioByMoney: Optional[float] = Field(None, description='平仓手续费率')
    CloseRatioByVolume: Optional[float] = Field(None, description='平仓手续费')
    CloseTodayRatioByMoney: Optional[float] = Field(None, description='平今手续费率')
    CloseTodayRatioByVolume: Optional[float] = Field(None, description='平今手续费')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class SyncingInstrumentTradingRightField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    TradingRight: Optional[constr(max_length=1)] = Field(None, description='交易权限')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    InsertTimeStart: Optional[constr(max_length=9)] = Field(None, description='开始时间')
    InsertTimeEnd: Optional[constr(max_length=9)] = Field(None, description='结束时间')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryTradeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TradeID: Optional[constr(max_length=21)] = Field(None, description='成交编号')
    TradeTimeStart: Optional[constr(max_length=9)] = Field(None, description='开始时间')
    TradeTimeEnd: Optional[constr(max_length=9)] = Field(None, description='结束时间')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryInvestorPositionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryTradingAccountField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    BizType: Optional[constr(max_length=1)] = Field(None, description='业务类型')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')


class QryInvestorField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class QryTradingCodeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    ClientIDType: Optional[constr(max_length=1)] = Field(None, description='交易编码类型')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class QryInvestorGroupField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')


class QryInstrumentMarginRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryInstrumentCommissionRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryInstrumentTradingRightField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryBrokerField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')


class QryTraderField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')


class QrySuperUserFunctionField(CtpField):
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class QryUserSessionField(CtpField):
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class QryPartBrokerField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')


class QryFrontStatusField(CtpField):
    FrontID: Optional[int] = Field(None, description='前置编号')


class QryExchangeOrderField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class QryOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class QryExchangeOrderActionField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')


class QrySuperUserField(CtpField):
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class QryExchangeField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class QryProductField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ProductClass: Optional[constr(max_length=1)] = Field(None, description='产品类型')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')


class QryInstrumentField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    reserve3: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')


class QryDepthMarketDataField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryBrokerUserField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class QryBrokerUserFunctionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class QryTraderOfferField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')


class QrySyncDepositField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    DepositSeqNo: Optional[constr(max_length=15)] = Field(None, description='出入金流水号')


class QrySettlementInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class QryExchangeMarginRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryExchangeMarginRateAdjustField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryExchangeRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    FromCurrencyID: Optional[constr(max_length=4)] = Field(None, description='源币种')
    ToCurrencyID: Optional[constr(max_length=4)] = Field(None, description='目标币种')


class QrySyncFundMortgageField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    MortgageSeqNo: Optional[constr(max_length=15)] = Field(None, description='货币质押流水号')


class QryHisOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    InsertTimeStart: Optional[constr(max_length=9)] = Field(None, description='开始时间')
    InsertTimeEnd: Optional[constr(max_length=9)] = Field(None, description='结束时间')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class OptionInstrMiniMarginField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    MinMargin: Optional[float] = Field(None, description='单位（手）期权合约最小保证金')
    ValueMethod: Optional[constr(max_length=1)] = Field(None, description='取值方式')
    IsRelative: Optional[int] = Field(None, description='是否跟随交易所收取')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class OptionInstrMarginAdjustField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    SShortMarginRatioByMoney: Optional[float] = Field(None, description='投机空头保证金调整系数')
    SShortMarginRatioByVolume: Optional[float] = Field(None, description='投机空头保证金调整系数')
    HShortMarginRatioByMoney: Optional[float] = Field(None, description='保值空头保证金调整系数')
    HShortMarginRatioByVolume: Optional[float] = Field(None, description='保值空头保证金调整系数')
    AShortMarginRatioByMoney: Optional[float] = Field(None, description='套利空头保证金调整系数')
    AShortMarginRatioByVolume: Optional[float] = Field(None, description='套利空头保证金调整系数')
    IsRelative: Optional[int] = Field(None, description='是否跟随交易所收取')
    MShortMarginRatioByMoney: Optional[float] = Field(None, description='做市商空头保证金调整系数')
    MShortMarginRatioByVolume: Optional[float] = Field(None, description='做市商空头保证金调整系数')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class OptionInstrCommRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OpenRatioByMoney: Optional[float] = Field(None, description='开仓手续费率')
    OpenRatioByVolume: Optional[float] = Field(None, description='开仓手续费')
    CloseRatioByMoney: Optional[float] = Field(None, description='平仓手续费率')
    CloseRatioByVolume: Optional[float] = Field(None, description='平仓手续费')
    CloseTodayRatioByMoney: Optional[float] = Field(None, description='平今手续费率')
    CloseTodayRatioByVolume: Optional[float] = Field(None, description='平今手续费')
    StrikeRatioByMoney: Optional[float] = Field(None, description='执行手续费率')
    StrikeRatioByVolume: Optional[float] = Field(None, description='执行手续费')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class OptionInstrTradeCostField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    FixedMargin: Optional[float] = Field(None, description='期权合约保证金不变部分')
    MiniMargin: Optional[float] = Field(None, description='期权合约最小保证金')
    Royalty: Optional[float] = Field(None, description='期权合约权利金')
    ExchFixedMargin: Optional[float] = Field(None, description='交易所期权合约保证金不变部分')
    ExchMiniMargin: Optional[float] = Field(None, description='交易所期权合约最小保证金')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryOptionInstrTradeCostField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    InputPrice: Optional[float] = Field(None, description='期权合约报价')
    UnderlyingPrice: Optional[float] = Field(None, description='标的价格,填0则用昨结算价')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryOptionInstrCommRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class IndexPriceField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ClosePrice: Optional[float] = Field(None, description='指数现货收盘价')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InputExecOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExecOrderRef: Optional[constr(max_length=13)] = Field(None, description='执行宣告引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Volume: Optional[int] = Field(None, description='数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ActionType: Optional[constr(max_length=1)] = Field(None, description='执行类型')
    PosiDirection: Optional[constr(max_length=1)] = Field(
        None, description='保留头寸申请的持仓方向'
    )
    ReservePositionFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后是否保留期货头寸的标记,该字段已废弃'
    )
    CloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后生成的头寸是否自动平仓'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class InputExecOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExecOrderActionRef: Optional[int] = Field(None, description='执行宣告操作引用')
    ExecOrderRef: Optional[constr(max_length=13)] = Field(None, description='执行宣告引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExecOrderSysID: Optional[constr(max_length=21)] = Field(
        None, description='执行宣告操作编号'
    )
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class ExecOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExecOrderRef: Optional[constr(max_length=13)] = Field(None, description='执行宣告引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Volume: Optional[int] = Field(None, description='数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ActionType: Optional[constr(max_length=1)] = Field(None, description='执行类型')
    PosiDirection: Optional[constr(max_length=1)] = Field(
        None, description='保留头寸申请的持仓方向'
    )
    ReservePositionFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后是否保留期货头寸的标记,该字段已废弃'
    )
    CloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后生成的头寸是否自动平仓'
    )
    ExecOrderLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地执行宣告编号'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderSubmitStatus: Optional[constr(max_length=1)] = Field(
        None, description='执行宣告提交状态'
    )
    NotifySequence: Optional[int] = Field(None, description='报单提示序号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    ExecOrderSysID: Optional[constr(max_length=21)] = Field(None, description='执行宣告编号')
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    CancelTime: Optional[constr(max_length=9)] = Field(None, description='撤销时间')
    ExecResult: Optional[constr(max_length=1)] = Field(None, description='执行结果')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    ActiveUserID: Optional[constr(max_length=16)] = Field(None, description='操作用户代码')
    BrokerExecOrderSeq: Optional[int] = Field(None, description='经纪公司报单编号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    reserve3: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class ExecOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExecOrderActionRef: Optional[int] = Field(None, description='执行宣告操作引用')
    ExecOrderRef: Optional[constr(max_length=13)] = Field(None, description='执行宣告引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExecOrderSysID: Optional[constr(max_length=21)] = Field(
        None, description='执行宣告操作编号'
    )
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    ExecOrderLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地执行宣告编号'
    )
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    ActionType: Optional[constr(max_length=1)] = Field(None, description='执行类型')
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryExecOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExecOrderSysID: Optional[constr(max_length=21)] = Field(None, description='执行宣告编号')
    InsertTimeStart: Optional[constr(max_length=9)] = Field(None, description='开始时间')
    InsertTimeEnd: Optional[constr(max_length=9)] = Field(None, description='结束时间')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeExecOrderField(CtpField):
    Volume: Optional[int] = Field(None, description='数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ActionType: Optional[constr(max_length=1)] = Field(None, description='执行类型')
    PosiDirection: Optional[constr(max_length=1)] = Field(
        None, description='保留头寸申请的持仓方向'
    )
    ReservePositionFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后是否保留期货头寸的标记,该字段已废弃'
    )
    CloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后生成的头寸是否自动平仓'
    )
    ExecOrderLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地执行宣告编号'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderSubmitStatus: Optional[constr(max_length=1)] = Field(
        None, description='执行宣告提交状态'
    )
    NotifySequence: Optional[int] = Field(None, description='报单提示序号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    ExecOrderSysID: Optional[constr(max_length=21)] = Field(None, description='执行宣告编号')
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    CancelTime: Optional[constr(max_length=9)] = Field(None, description='撤销时间')
    ExecResult: Optional[constr(max_length=1)] = Field(None, description='执行结果')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryExchangeExecOrderField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class QryExecOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class ExchangeExecOrderActionField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExecOrderSysID: Optional[constr(max_length=21)] = Field(
        None, description='执行宣告操作编号'
    )
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    ExecOrderLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地执行宣告编号'
    )
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    ActionType: Optional[constr(max_length=1)] = Field(None, description='执行类型')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    Volume: Optional[int] = Field(None, description='数量')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class QryExchangeExecOrderActionField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')


class ErrExecOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExecOrderRef: Optional[constr(max_length=13)] = Field(None, description='执行宣告引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Volume: Optional[int] = Field(None, description='数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ActionType: Optional[constr(max_length=1)] = Field(None, description='执行类型')
    PosiDirection: Optional[constr(max_length=1)] = Field(
        None, description='保留头寸申请的持仓方向'
    )
    ReservePositionFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后是否保留期货头寸的标记,该字段已废弃'
    )
    CloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权后生成的头寸是否自动平仓'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryErrExecOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class ErrExecOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExecOrderActionRef: Optional[int] = Field(None, description='执行宣告操作引用')
    ExecOrderRef: Optional[constr(max_length=13)] = Field(None, description='执行宣告引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExecOrderSysID: Optional[constr(max_length=21)] = Field(
        None, description='执行宣告操作编号'
    )
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryErrExecOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class OptionInstrTradingRightField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    TradingRight: Optional[constr(max_length=1)] = Field(None, description='交易权限')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryOptionInstrTradingRightField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InputForQuoteField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ForQuoteRef: Optional[constr(max_length=13)] = Field(None, description='询价引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class ForQuoteField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ForQuoteRef: Optional[constr(max_length=13)] = Field(None, description='询价引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    ForQuoteLocalID: Optional[constr(max_length=13)] = Field(None, description='本地询价编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    ForQuoteStatus: Optional[constr(max_length=1)] = Field(None, description='询价状态')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    ActiveUserID: Optional[constr(max_length=16)] = Field(None, description='操作用户代码')
    BrokerForQutoSeq: Optional[int] = Field(None, description='经纪公司询价编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve3: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryForQuoteField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InsertTimeStart: Optional[constr(max_length=9)] = Field(None, description='开始时间')
    InsertTimeEnd: Optional[constr(max_length=9)] = Field(None, description='结束时间')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeForQuoteField(CtpField):
    ForQuoteLocalID: Optional[constr(max_length=13)] = Field(None, description='本地询价编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    ForQuoteStatus: Optional[constr(max_length=1)] = Field(None, description='询价状态')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryExchangeForQuoteField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class InputQuoteField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    QuoteRef: Optional[constr(max_length=13)] = Field(None, description='报价引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    AskPrice: Optional[float] = Field(None, description='卖价格')
    BidPrice: Optional[float] = Field(None, description='买价格')
    AskVolume: Optional[int] = Field(None, description='卖数量')
    BidVolume: Optional[int] = Field(None, description='买数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    AskOffsetFlag: Optional[constr(max_length=1)] = Field(None, description='卖开平标志')
    BidOffsetFlag: Optional[constr(max_length=1)] = Field(None, description='买开平标志')
    AskHedgeFlag: Optional[constr(max_length=1)] = Field(None, description='卖投机套保标志')
    BidHedgeFlag: Optional[constr(max_length=1)] = Field(None, description='买投机套保标志')
    AskOrderRef: Optional[constr(max_length=13)] = Field(None, description='衍生卖报单引用')
    BidOrderRef: Optional[constr(max_length=13)] = Field(None, description='衍生买报单引用')
    ForQuoteSysID: Optional[constr(max_length=21)] = Field(None, description='应价编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')
    ReplaceSysID: Optional[constr(max_length=21)] = Field(None, description='被顶单编号')


class InputQuoteActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    QuoteActionRef: Optional[int] = Field(None, description='报价操作引用')
    QuoteRef: Optional[constr(max_length=13)] = Field(None, description='报价引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    QuoteSysID: Optional[constr(max_length=21)] = Field(None, description='报价操作编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QuoteField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    QuoteRef: Optional[constr(max_length=13)] = Field(None, description='报价引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    AskPrice: Optional[float] = Field(None, description='卖价格')
    BidPrice: Optional[float] = Field(None, description='买价格')
    AskVolume: Optional[int] = Field(None, description='卖数量')
    BidVolume: Optional[int] = Field(None, description='买数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    AskOffsetFlag: Optional[constr(max_length=1)] = Field(None, description='卖开平标志')
    BidOffsetFlag: Optional[constr(max_length=1)] = Field(None, description='买开平标志')
    AskHedgeFlag: Optional[constr(max_length=1)] = Field(None, description='卖投机套保标志')
    BidHedgeFlag: Optional[constr(max_length=1)] = Field(None, description='买投机套保标志')
    QuoteLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报价编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    NotifySequence: Optional[int] = Field(None, description='报价提示序号')
    OrderSubmitStatus: Optional[constr(max_length=1)] = Field(
        None, description='报价提交状态'
    )
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    QuoteSysID: Optional[constr(max_length=21)] = Field(None, description='报价编号')
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    CancelTime: Optional[constr(max_length=9)] = Field(None, description='撤销时间')
    QuoteStatus: Optional[constr(max_length=1)] = Field(None, description='报价状态')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    AskOrderSysID: Optional[constr(max_length=21)] = Field(None, description='卖方报单编号')
    BidOrderSysID: Optional[constr(max_length=21)] = Field(None, description='买方报单编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    ActiveUserID: Optional[constr(max_length=16)] = Field(None, description='操作用户代码')
    BrokerQuoteSeq: Optional[int] = Field(None, description='经纪公司报价编号')
    AskOrderRef: Optional[constr(max_length=13)] = Field(None, description='衍生卖报单引用')
    BidOrderRef: Optional[constr(max_length=13)] = Field(None, description='衍生买报单引用')
    ForQuoteSysID: Optional[constr(max_length=21)] = Field(None, description='应价编号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    reserve3: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')
    ReplaceSysID: Optional[constr(max_length=21)] = Field(None, description='被顶单编号')


class QuoteActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    QuoteActionRef: Optional[int] = Field(None, description='报价操作引用')
    QuoteRef: Optional[constr(max_length=13)] = Field(None, description='报价引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    QuoteSysID: Optional[constr(max_length=21)] = Field(None, description='报价操作编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    QuoteLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报价编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryQuoteField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    QuoteSysID: Optional[constr(max_length=21)] = Field(None, description='报价编号')
    InsertTimeStart: Optional[constr(max_length=9)] = Field(None, description='开始时间')
    InsertTimeEnd: Optional[constr(max_length=9)] = Field(None, description='结束时间')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeQuoteField(CtpField):
    AskPrice: Optional[float] = Field(None, description='卖价格')
    BidPrice: Optional[float] = Field(None, description='买价格')
    AskVolume: Optional[int] = Field(None, description='卖数量')
    BidVolume: Optional[int] = Field(None, description='买数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    AskOffsetFlag: Optional[constr(max_length=1)] = Field(None, description='卖开平标志')
    BidOffsetFlag: Optional[constr(max_length=1)] = Field(None, description='买开平标志')
    AskHedgeFlag: Optional[constr(max_length=1)] = Field(None, description='卖投机套保标志')
    BidHedgeFlag: Optional[constr(max_length=1)] = Field(None, description='买投机套保标志')
    QuoteLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报价编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    NotifySequence: Optional[int] = Field(None, description='报价提示序号')
    OrderSubmitStatus: Optional[constr(max_length=1)] = Field(
        None, description='报价提交状态'
    )
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    QuoteSysID: Optional[constr(max_length=21)] = Field(None, description='报价编号')
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    CancelTime: Optional[constr(max_length=9)] = Field(None, description='撤销时间')
    QuoteStatus: Optional[constr(max_length=1)] = Field(None, description='报价状态')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    AskOrderSysID: Optional[constr(max_length=21)] = Field(None, description='卖方报单编号')
    BidOrderSysID: Optional[constr(max_length=21)] = Field(None, description='买方报单编号')
    ForQuoteSysID: Optional[constr(max_length=21)] = Field(None, description='应价编号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryExchangeQuoteField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class QryQuoteActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class ExchangeQuoteActionField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    QuoteSysID: Optional[constr(max_length=21)] = Field(None, description='报价操作编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    QuoteLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报价编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryExchangeQuoteActionField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')


class OptionInstrDeltaField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    Delta: Optional[float] = Field(None, description='Delta值')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ForQuoteRspField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ForQuoteSysID: Optional[constr(max_length=21)] = Field(None, description='询价编号')
    ForQuoteTime: Optional[constr(max_length=9)] = Field(None, description='询价时间')
    ActionDay: Optional[constr(max_length=9)] = Field(None, description='业务日期')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class StrikeOffsetField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    Offset: Optional[float] = Field(None, description='执行偏移值')
    OffsetType: Optional[constr(max_length=1)] = Field(None, description='执行偏移类型')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryStrikeOffsetField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InputBatchOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OrderActionRef: Optional[int] = Field(None, description='报单操作引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class BatchOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OrderActionRef: Optional[int] = Field(None, description='报单操作引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class ExchangeBatchOrderActionField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryBatchOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class CombInstrumentGuardField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    GuarantRatio: Optional[float] = Field(None, description='')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryCombInstrumentGuardField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InputCombActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    CombActionRef: Optional[constr(max_length=13)] = Field(None, description='组合引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    Volume: Optional[int] = Field(None, description='数量')
    CombDirection: Optional[constr(max_length=1)] = Field(None, description='组合指令方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class CombActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    CombActionRef: Optional[constr(max_length=13)] = Field(None, description='组合引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    Volume: Optional[int] = Field(None, description='数量')
    CombDirection: Optional[constr(max_length=1)] = Field(None, description='组合指令方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='本地申请组合编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    ActionStatus: Optional[constr(max_length=1)] = Field(None, description='组合状态')
    NotifySequence: Optional[int] = Field(None, description='报单提示序号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    reserve3: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ComTradeID: Optional[constr(max_length=21)] = Field(None, description='组合编号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryCombActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeCombActionField(CtpField):
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    Volume: Optional[int] = Field(None, description='数量')
    CombDirection: Optional[constr(max_length=1)] = Field(None, description='组合指令方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='本地申请组合编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    ActionStatus: Optional[constr(max_length=1)] = Field(None, description='组合状态')
    NotifySequence: Optional[int] = Field(None, description='报单提示序号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ComTradeID: Optional[constr(max_length=21)] = Field(None, description='组合编号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryExchangeCombActionField(CtpField):
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class ProductExchRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    QuoteCurrencyID: Optional[constr(max_length=4)] = Field(None, description='报价币种类型')
    ExchangeRate: Optional[float] = Field(None, description='汇率')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')


class QryProductExchRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')


class QryForQuoteParamField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ForQuoteParamField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    LastPrice: Optional[float] = Field(None, description='最新价')
    PriceInterval: Optional[float] = Field(None, description='价差')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class MMOptionInstrCommRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OpenRatioByMoney: Optional[float] = Field(None, description='开仓手续费率')
    OpenRatioByVolume: Optional[float] = Field(None, description='开仓手续费')
    CloseRatioByMoney: Optional[float] = Field(None, description='平仓手续费率')
    CloseRatioByVolume: Optional[float] = Field(None, description='平仓手续费')
    CloseTodayRatioByMoney: Optional[float] = Field(None, description='平今手续费率')
    CloseTodayRatioByVolume: Optional[float] = Field(None, description='平今手续费')
    StrikeRatioByMoney: Optional[float] = Field(None, description='执行手续费率')
    StrikeRatioByVolume: Optional[float] = Field(None, description='执行手续费')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryMMOptionInstrCommRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class MMInstrumentCommissionRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OpenRatioByMoney: Optional[float] = Field(None, description='开仓手续费率')
    OpenRatioByVolume: Optional[float] = Field(None, description='开仓手续费')
    CloseRatioByMoney: Optional[float] = Field(None, description='平仓手续费率')
    CloseRatioByVolume: Optional[float] = Field(None, description='平仓手续费')
    CloseTodayRatioByMoney: Optional[float] = Field(None, description='平今手续费率')
    CloseTodayRatioByVolume: Optional[float] = Field(None, description='平今手续费')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryMMInstrumentCommissionRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InstrumentOrderCommRateField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    OrderCommByVolume: Optional[float] = Field(None, description='报单手续费')
    OrderActionCommByVolume: Optional[float] = Field(None, description='撤单手续费')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    OrderCommByTrade: Optional[float] = Field(None, description='报单手续费')
    OrderActionCommByTrade: Optional[float] = Field(None, description='撤单手续费')


class QryInstrumentOrderCommRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class TradeParamField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    TradeParamID: Optional[constr(max_length=1)] = Field(None, description='参数代码')
    TradeParamValue: Optional[constr(max_length=256)] = Field(None, description='参数代码值')
    Memo: Optional[constr(max_length=161)] = Field(None, description='备注')


class InstrumentMarginRateULField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class FutureLimitPosiParamField(CtpField):
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    SpecOpenVolume: Optional[int] = Field(None, description='当日投机开仓数量限制')
    ArbiOpenVolume: Optional[int] = Field(None, description='当日套利开仓数量限制')
    OpenVolume: Optional[int] = Field(None, description='当日投机+套利开仓数量限制')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')


class LoginForbiddenIPField(CtpField):
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class IPListField(CtpField):
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    IsWhite: Optional[int] = Field(None, description='是否白名单')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class InputOptionSelfCloseField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OptionSelfCloseRef: Optional[constr(max_length=13)] = Field(
        None, description='期权自对冲引用'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Volume: Optional[int] = Field(None, description='数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    OptSelfCloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权的头寸是否自对冲'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class InputOptionSelfCloseActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OptionSelfCloseActionRef: Optional[int] = Field(None, description='期权自对冲操作引用')
    OptionSelfCloseRef: Optional[constr(max_length=13)] = Field(
        None, description='期权自对冲引用'
    )
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OptionSelfCloseSysID: Optional[constr(max_length=21)] = Field(
        None, description='期权自对冲操作编号'
    )
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class OptionSelfCloseField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OptionSelfCloseRef: Optional[constr(max_length=13)] = Field(
        None, description='期权自对冲引用'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Volume: Optional[int] = Field(None, description='数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    OptSelfCloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权的头寸是否自对冲'
    )
    OptionSelfCloseLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地期权自对冲编号'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderSubmitStatus: Optional[constr(max_length=1)] = Field(
        None, description='期权自对冲提交状态'
    )
    NotifySequence: Optional[int] = Field(None, description='报单提示序号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    OptionSelfCloseSysID: Optional[constr(max_length=21)] = Field(
        None, description='期权自对冲编号'
    )
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    CancelTime: Optional[constr(max_length=9)] = Field(None, description='撤销时间')
    ExecResult: Optional[constr(max_length=1)] = Field(None, description='自对冲结果')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    ActiveUserID: Optional[constr(max_length=16)] = Field(None, description='操作用户代码')
    BrokerOptionSelfCloseSeq: Optional[int] = Field(None, description='经纪公司报单编号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    reserve3: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class OptionSelfCloseActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OptionSelfCloseActionRef: Optional[int] = Field(None, description='期权自对冲操作引用')
    OptionSelfCloseRef: Optional[constr(max_length=13)] = Field(
        None, description='期权自对冲引用'
    )
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OptionSelfCloseSysID: Optional[constr(max_length=21)] = Field(
        None, description='期权自对冲操作编号'
    )
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OptionSelfCloseLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地期权自对冲编号'
    )
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryOptionSelfCloseField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OptionSelfCloseSysID: Optional[constr(max_length=21)] = Field(
        None, description='期权自对冲编号'
    )
    InsertTimeStart: Optional[constr(max_length=9)] = Field(None, description='开始时间')
    InsertTimeEnd: Optional[constr(max_length=9)] = Field(None, description='结束时间')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class ExchangeOptionSelfCloseField(CtpField):
    Volume: Optional[int] = Field(None, description='数量')
    RequestID: Optional[int] = Field(None, description='请求编号')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    OptSelfCloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权的头寸是否自对冲'
    )
    OptionSelfCloseLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地期权自对冲编号'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderSubmitStatus: Optional[constr(max_length=1)] = Field(
        None, description='期权自对冲提交状态'
    )
    NotifySequence: Optional[int] = Field(None, description='报单提示序号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    OptionSelfCloseSysID: Optional[constr(max_length=21)] = Field(
        None, description='期权自对冲编号'
    )
    InsertDate: Optional[constr(max_length=9)] = Field(None, description='报单日期')
    InsertTime: Optional[constr(max_length=9)] = Field(None, description='插入时间')
    CancelTime: Optional[constr(max_length=9)] = Field(None, description='撤销时间')
    ExecResult: Optional[constr(max_length=1)] = Field(None, description='自对冲结果')
    ClearingPartID: Optional[constr(max_length=11)] = Field(None, description='结算会员编号')
    SequenceNo: Optional[int] = Field(None, description='序号')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryOptionSelfCloseActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class ExchangeOptionSelfCloseActionField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OptionSelfCloseSysID: Optional[constr(max_length=21)] = Field(
        None, description='期权自对冲操作编号'
    )
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OptionSelfCloseLocalID: Optional[constr(max_length=13)] = Field(
        None, description='本地期权自对冲编号'
    )
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OptSelfCloseFlag: Optional[constr(max_length=1)] = Field(
        None, description='期权行权的头寸是否自对冲'
    )
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class SyncDelaySwapField(CtpField):
    DelaySwapSeqNo: Optional[constr(max_length=15)] = Field(None, description='换汇流水号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    FromCurrencyID: Optional[constr(max_length=4)] = Field(None, description='源币种')
    FromAmount: Optional[float] = Field(None, description='源金额')
    FromFrozenSwap: Optional[float] = Field(None, description='源换汇冻结金额(可用冻结)')
    FromRemainSwap: Optional[float] = Field(None, description='源剩余换汇额度(可提冻结)')
    ToCurrencyID: Optional[constr(max_length=4)] = Field(None, description='目标币种')
    ToAmount: Optional[float] = Field(None, description='目标金额')
    IsManualSwap: Optional[int] = Field(None, description='是否手工换汇')
    IsAllRemainSetZero: Optional[int] = Field(None, description='是否将所有外币的剩余换汇额度设置为0')


class QrySyncDelaySwapField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    DelaySwapSeqNo: Optional[constr(max_length=15)] = Field(None, description='延时换汇流水号')


class InvestUnitField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InvestorUnitName: Optional[constr(max_length=81)] = Field(
        None, description='投资者单元名称'
    )
    InvestorGroupID: Optional[constr(max_length=13)] = Field(
        None, description='投资者分组代码'
    )
    CommModelID: Optional[constr(max_length=13)] = Field(None, description='手续费率模板代码')
    MarginModelID: Optional[constr(max_length=13)] = Field(None, description='保证金率模板代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class QryInvestUnitField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class SecAgentCheckModeField(CtpField):
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种')
    BrokerSecAgentID: Optional[constr(max_length=13)] = Field(
        None, description='境外中介机构资金帐号'
    )
    CheckSelfAccount: Optional[int] = Field(None, description='是否需要校验自己的资金账户')


class SecAgentTradeInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    BrokerSecAgentID: Optional[constr(max_length=13)] = Field(
        None, description='境外中介机构资金帐号'
    )
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='二级代理商姓名'
    )


class MarketDataField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    LastPrice: Optional[float] = Field(None, description='最新价')
    PreSettlementPrice: Optional[float] = Field(None, description='上次结算价')
    PreClosePrice: Optional[float] = Field(None, description='昨收盘')
    PreOpenInterest: Optional[float] = Field(None, description='昨持仓量')
    OpenPrice: Optional[float] = Field(None, description='今开盘')
    HighestPrice: Optional[float] = Field(None, description='最高价')
    LowestPrice: Optional[float] = Field(None, description='最低价')
    Volume: Optional[int] = Field(None, description='数量')
    Turnover: Optional[float] = Field(None, description='成交金额')
    OpenInterest: Optional[float] = Field(None, description='持仓量')
    ClosePrice: Optional[float] = Field(None, description='今收盘')
    SettlementPrice: Optional[float] = Field(None, description='本次结算价')
    UpperLimitPrice: Optional[float] = Field(None, description='涨停板价')
    LowerLimitPrice: Optional[float] = Field(None, description='跌停板价')
    PreDelta: Optional[float] = Field(None, description='昨虚实度')
    CurrDelta: Optional[float] = Field(None, description='今虚实度')
    UpdateTime: Optional[constr(max_length=9)] = Field(None, description='最后修改时间')
    UpdateMillisec: Optional[int] = Field(None, description='最后修改毫秒')
    ActionDay: Optional[constr(max_length=9)] = Field(None, description='业务日期')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class MarketDataBaseField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    PreSettlementPrice: Optional[float] = Field(None, description='上次结算价')
    PreClosePrice: Optional[float] = Field(None, description='昨收盘')
    PreOpenInterest: Optional[float] = Field(None, description='昨持仓量')
    PreDelta: Optional[float] = Field(None, description='昨虚实度')


class MarketDataStaticField(CtpField):
    OpenPrice: Optional[float] = Field(None, description='今开盘')
    HighestPrice: Optional[float] = Field(None, description='最高价')
    LowestPrice: Optional[float] = Field(None, description='最低价')
    ClosePrice: Optional[float] = Field(None, description='今收盘')
    UpperLimitPrice: Optional[float] = Field(None, description='涨停板价')
    LowerLimitPrice: Optional[float] = Field(None, description='跌停板价')
    SettlementPrice: Optional[float] = Field(None, description='本次结算价')
    CurrDelta: Optional[float] = Field(None, description='今虚实度')


class MarketDataLastMatchField(CtpField):
    LastPrice: Optional[float] = Field(None, description='最新价')
    Volume: Optional[int] = Field(None, description='数量')
    Turnover: Optional[float] = Field(None, description='成交金额')
    OpenInterest: Optional[float] = Field(None, description='持仓量')


class MarketDataBestPriceField(CtpField):
    BidPrice1: Optional[float] = Field(None, description='申买价一')
    BidVolume1: Optional[int] = Field(None, description='申买量一')
    AskPrice1: Optional[float] = Field(None, description='申卖价一')
    AskVolume1: Optional[int] = Field(None, description='申卖量一')


class MarketDataBid23Field(CtpField):
    BidPrice2: Optional[float] = Field(None, description='申买价二')
    BidVolume2: Optional[int] = Field(None, description='申买量二')
    BidPrice3: Optional[float] = Field(None, description='申买价三')
    BidVolume3: Optional[int] = Field(None, description='申买量三')


class MarketDataAsk23Field(CtpField):
    AskPrice2: Optional[float] = Field(None, description='申卖价二')
    AskVolume2: Optional[int] = Field(None, description='申卖量二')
    AskPrice3: Optional[float] = Field(None, description='申卖价三')
    AskVolume3: Optional[int] = Field(None, description='申卖量三')


class MarketDataBid45Field(CtpField):
    BidPrice4: Optional[float] = Field(None, description='申买价四')
    BidVolume4: Optional[int] = Field(None, description='申买量四')
    BidPrice5: Optional[float] = Field(None, description='申买价五')
    BidVolume5: Optional[int] = Field(None, description='申买量五')


class MarketDataAsk45Field(CtpField):
    AskPrice4: Optional[float] = Field(None, description='申卖价四')
    AskVolume4: Optional[int] = Field(None, description='申卖量四')
    AskPrice5: Optional[float] = Field(None, description='申卖价五')
    AskVolume5: Optional[int] = Field(None, description='申卖量五')


class MarketDataUpdateTimeField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    UpdateTime: Optional[constr(max_length=9)] = Field(None, description='最后修改时间')
    UpdateMillisec: Optional[int] = Field(None, description='最后修改毫秒')
    ActionDay: Optional[constr(max_length=9)] = Field(None, description='业务日期')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class MarketDataExchangeField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class SpecificInstrumentField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InstrumentStatusField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    SettlementGroupID: Optional[constr(max_length=9)] = Field(None, description='结算组代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentStatus: Optional[constr(max_length=1)] = Field(None, description='合约交易状态')
    TradingSegmentSN: Optional[int] = Field(None, description='交易阶段编号')
    EnterTime: Optional[constr(max_length=9)] = Field(None, description='进入本状态时间')
    EnterReason: Optional[constr(max_length=1)] = Field(None, description='进入本状态原因')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryInstrumentStatusField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )


class InvestorAccountField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class PositionProfitAlgorithmField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Algorithm: Optional[constr(max_length=1)] = Field(None, description='盈亏算法')
    Memo: Optional[constr(max_length=161)] = Field(None, description='备注')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class DiscountField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    Discount: Optional[float] = Field(None, description='资金折扣比例')


class QryTransferBankField(CtpField):
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBrchID: Optional[constr(max_length=5)] = Field(None, description='银行分中心代码')


class TransferBankField(CtpField):
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBrchID: Optional[constr(max_length=5)] = Field(None, description='银行分中心代码')
    BankName: Optional[constr(max_length=101)] = Field(None, description='银行名称')
    IsActive: Optional[int] = Field(None, description='是否活跃')


class QryInvestorPositionDetailField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class InvestorPositionDetailField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='开仓日期')
    TradeID: Optional[constr(max_length=21)] = Field(None, description='成交编号')
    Volume: Optional[int] = Field(None, description='数量')
    OpenPrice: Optional[float] = Field(None, description='开仓价')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    TradeType: Optional[constr(max_length=1)] = Field(None, description='成交类型')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    CloseProfitByDate: Optional[float] = Field(None, description='逐日盯市平仓盈亏')
    CloseProfitByTrade: Optional[float] = Field(None, description='逐笔对冲平仓盈亏')
    PositionProfitByDate: Optional[float] = Field(None, description='逐日盯市持仓盈亏')
    PositionProfitByTrade: Optional[float] = Field(None, description='逐笔对冲持仓盈亏')
    Margin: Optional[float] = Field(None, description='投资者保证金')
    ExchMargin: Optional[float] = Field(None, description='交易所保证金')
    MarginRateByMoney: Optional[float] = Field(None, description='保证金率')
    MarginRateByVolume: Optional[float] = Field(None, description='保证金率(按手数)')
    LastSettlementPrice: Optional[float] = Field(None, description='昨结算价')
    SettlementPrice: Optional[float] = Field(None, description='结算价')
    CloseVolume: Optional[int] = Field(None, description='平仓量')
    CloseAmount: Optional[float] = Field(None, description='平仓金额')
    TimeFirstVolume: Optional[int] = Field(None, description='先开先平剩余数量（DCE）')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    SpecPosiType: Optional[constr(max_length=1)] = Field(None, description='特殊持仓标志')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    CombInstrumentID: Optional[constr(max_length=81)] = Field(
        None, description='组合合约代码'
    )


class TradingAccountPasswordField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class MDTraderOfferField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    TraderConnectStatus: Optional[constr(max_length=1)] = Field(
        None, description='交易所交易员连接状态'
    )
    ConnectRequestDate: Optional[constr(max_length=9)] = Field(
        None, description='发出连接请求的日期'
    )
    ConnectRequestTime: Optional[constr(max_length=9)] = Field(
        None, description='发出连接请求的时间'
    )
    LastReportDate: Optional[constr(max_length=9)] = Field(None, description='上次报告日期')
    LastReportTime: Optional[constr(max_length=9)] = Field(None, description='上次报告时间')
    ConnectDate: Optional[constr(max_length=9)] = Field(None, description='完成连接日期')
    ConnectTime: Optional[constr(max_length=9)] = Field(None, description='完成连接时间')
    StartDate: Optional[constr(max_length=9)] = Field(None, description='启动日期')
    StartTime: Optional[constr(max_length=9)] = Field(None, description='启动时间')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    MaxTradeID: Optional[constr(max_length=21)] = Field(None, description='本席位最大成交编号')
    MaxOrderMessageReference: Optional[constr(max_length=7)] = Field(
        None, description='本席位最大报单备拷'
    )
    OrderCancelAlg: Optional[constr(max_length=1)] = Field(
        None, description='撤单时选择席位算法'
    )


class QryMDTraderOfferField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')


class QryNoticeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')


class NoticeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    Content: Optional[constr(max_length=501)] = Field(None, description='消息正文')
    SequenceLabel: Optional[constr(max_length=2)] = Field(
        None, description='经纪公司通知内容序列号'
    )


class UserRightField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserRightType: Optional[constr(max_length=1)] = Field(None, description='客户权限类型')
    IsForbidden: Optional[int] = Field(None, description='是否禁止')


class QrySettlementInfoConfirmField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class LoadSettlementInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')


class BrokerWithdrawAlgorithmField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    WithdrawAlgorithm: Optional[constr(max_length=1)] = Field(
        None, description='可提资金算法'
    )
    UsingRatio: Optional[float] = Field(None, description='资金使用率')
    IncludeCloseProfit: Optional[constr(max_length=1)] = Field(
        None, description='可提是否包含平仓盈利'
    )
    AllWithoutTrade: Optional[constr(max_length=1)] = Field(
        None, description='本日无仓且无成交客户是否受可提比例限制'
    )
    AvailIncludeCloseProfit: Optional[constr(max_length=1)] = Field(
        None, description='可用是否包含平仓盈利'
    )
    IsBrokerUserEvent: Optional[int] = Field(None, description='是否启用用户事件')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    FundMortgageRatio: Optional[float] = Field(None, description='货币质押比率')
    BalanceAlgorithm: Optional[constr(max_length=1)] = Field(None, description='权益算法')


class TradingAccountPasswordUpdateV1Field(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OldPassword: Optional[constr(max_length=41)] = Field(None, description='原来的口令')
    NewPassword: Optional[constr(max_length=41)] = Field(None, description='新的口令')


class TradingAccountPasswordUpdateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    OldPassword: Optional[constr(max_length=41)] = Field(None, description='原来的口令')
    NewPassword: Optional[constr(max_length=41)] = Field(None, description='新的口令')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class QryCombinationLegField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    LegID: Optional[int] = Field(None, description='单腿编号')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    CombInstrumentID: Optional[constr(max_length=81)] = Field(
        None, description='组合合约代码'
    )
    LegInstrumentID: Optional[constr(max_length=81)] = Field(None, description='单腿合约代码')


class QrySyncStatusField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')


class CombinationLegField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    LegID: Optional[int] = Field(None, description='单腿编号')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    LegMultiple: Optional[int] = Field(None, description='单腿乘数')
    ImplyLevel: Optional[int] = Field(None, description='派生层数')
    CombInstrumentID: Optional[constr(max_length=81)] = Field(
        None, description='组合合约代码'
    )
    LegInstrumentID: Optional[constr(max_length=81)] = Field(None, description='单腿合约代码')


class SyncStatusField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    DataSyncStatus: Optional[constr(max_length=1)] = Field(None, description='数据同步状态')


class QryLinkManField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class LinkManField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    PersonType: Optional[constr(max_length=1)] = Field(None, description='联系人类型')
    IdentifiedCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    PersonName: Optional[constr(max_length=81)] = Field(None, description='名称')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='联系电话')
    Address: Optional[constr(max_length=101)] = Field(None, description='通讯地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮政编码')
    Priority: Optional[int] = Field(None, description='优先级')
    UOAZipCode: Optional[constr(max_length=11)] = Field(None, description='开户邮政编码')
    PersonFullName: Optional[constr(max_length=101)] = Field(None, description='全称')


class QryBrokerUserEventField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserEventType: Optional[constr(max_length=1)] = Field(None, description='用户事件类型')


class BrokerUserEventField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    UserEventType: Optional[constr(max_length=1)] = Field(None, description='用户事件类型')
    EventSequenceNo: Optional[int] = Field(None, description='用户事件序号')
    EventDate: Optional[constr(max_length=9)] = Field(None, description='事件发生日期')
    EventTime: Optional[constr(max_length=9)] = Field(None, description='事件发生时间')
    UserEventInfo: Optional[constr(max_length=1025)] = Field(None, description='用户事件信息')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryContractBankField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBrchID: Optional[constr(max_length=5)] = Field(None, description='银行分中心代码')


class ContractBankField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBrchID: Optional[constr(max_length=5)] = Field(None, description='银行分中心代码')
    BankName: Optional[constr(max_length=101)] = Field(None, description='银行名称')


class InvestorPositionCombineDetailField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='开仓日期')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ComTradeID: Optional[constr(max_length=21)] = Field(None, description='组合编号')
    TradeID: Optional[constr(max_length=21)] = Field(None, description='撮合编号')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖')
    TotalAmt: Optional[int] = Field(None, description='持仓量')
    Margin: Optional[float] = Field(None, description='投资者保证金')
    ExchMargin: Optional[float] = Field(None, description='交易所保证金')
    MarginRateByMoney: Optional[float] = Field(None, description='保证金率')
    MarginRateByVolume: Optional[float] = Field(None, description='保证金率(按手数)')
    LegID: Optional[int] = Field(None, description='单腿编号')
    LegMultiple: Optional[int] = Field(None, description='单腿乘数')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    TradeGroupID: Optional[int] = Field(None, description='成交组号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    CombInstrumentID: Optional[constr(max_length=81)] = Field(
        None, description='组合持仓合约编码'
    )


class ParkedOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    OrderPriceType: Optional[constr(max_length=1)] = Field(None, description='报单价格条件')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    CombOffsetFlag: Optional[constr(max_length=5)] = Field(None, description='组合开平标志')
    CombHedgeFlag: Optional[constr(max_length=5)] = Field(None, description='组合投机套保标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeTotalOriginal: Optional[int] = Field(None, description='数量')
    TimeCondition: Optional[constr(max_length=1)] = Field(None, description='有效期类型')
    GTDDate: Optional[constr(max_length=9)] = Field(None, description='GTD日期')
    VolumeCondition: Optional[constr(max_length=1)] = Field(None, description='成交量类型')
    MinVolume: Optional[int] = Field(None, description='最小成交量')
    ContingentCondition: Optional[constr(max_length=1)] = Field(
        None, description='触发条件'
    )
    StopPrice: Optional[float] = Field(None, description='止损价')
    ForceCloseReason: Optional[constr(max_length=1)] = Field(None, description='强平原因')
    IsAutoSuspend: Optional[int] = Field(None, description='自动挂起标志')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    RequestID: Optional[int] = Field(None, description='请求编号')
    UserForceClose: Optional[int] = Field(None, description='用户强评标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ParkedOrderID: Optional[constr(max_length=13)] = Field(None, description='预埋报单编号')
    UserType: Optional[constr(max_length=1)] = Field(None, description='用户类型')
    Status: Optional[constr(max_length=1)] = Field(None, description='预埋单状态')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    IsSwapOrder: Optional[int] = Field(None, description='互换单标志')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class ParkedOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OrderActionRef: Optional[int] = Field(None, description='报单操作引用')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeChange: Optional[int] = Field(None, description='数量变化')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ParkedOrderActionID: Optional[constr(max_length=13)] = Field(
        None, description='预埋撤单单编号'
    )
    UserType: Optional[constr(max_length=1)] = Field(None, description='用户类型')
    Status: Optional[constr(max_length=1)] = Field(None, description='预埋撤单状态')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryParkedOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryParkedOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class RemoveParkedOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ParkedOrderID: Optional[constr(max_length=13)] = Field(None, description='预埋报单编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class RemoveParkedOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ParkedOrderActionID: Optional[constr(max_length=13)] = Field(
        None, description='预埋撤单编号'
    )
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class InvestorWithdrawAlgorithmField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    UsingRatio: Optional[float] = Field(None, description='可提资金比例')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    FundMortgageRatio: Optional[float] = Field(None, description='货币质押比率')


class QryInvestorPositionCombineDetailField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    CombInstrumentID: Optional[constr(max_length=81)] = Field(
        None, description='组合持仓合约编码'
    )


class MarketDataAveragePriceField(CtpField):
    AveragePrice: Optional[float] = Field(None, description='当日均价')


class VerifyInvestorPasswordField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')


class UserIPField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')
    IPMask: Optional[constr(max_length=33)] = Field(None, description='IP地址掩码')


class TradingNoticeInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    SendTime: Optional[constr(max_length=9)] = Field(None, description='发送时间')
    FieldContent: Optional[constr(max_length=501)] = Field(None, description='消息正文')
    SequenceSeries: Optional[int] = Field(None, description='序列系列号')
    SequenceNo: Optional[int] = Field(None, description='序列号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class TradingNoticeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    SequenceSeries: Optional[int] = Field(None, description='序列系列号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    SendTime: Optional[constr(max_length=9)] = Field(None, description='发送时间')
    SequenceNo: Optional[int] = Field(None, description='序列号')
    FieldContent: Optional[constr(max_length=501)] = Field(None, description='消息正文')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class QryTradingNoticeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class QryErrOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class ErrOrderField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    OrderPriceType: Optional[constr(max_length=1)] = Field(None, description='报单价格条件')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    CombOffsetFlag: Optional[constr(max_length=5)] = Field(None, description='组合开平标志')
    CombHedgeFlag: Optional[constr(max_length=5)] = Field(None, description='组合投机套保标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeTotalOriginal: Optional[int] = Field(None, description='数量')
    TimeCondition: Optional[constr(max_length=1)] = Field(None, description='有效期类型')
    GTDDate: Optional[constr(max_length=9)] = Field(None, description='GTD日期')
    VolumeCondition: Optional[constr(max_length=1)] = Field(None, description='成交量类型')
    MinVolume: Optional[int] = Field(None, description='最小成交量')
    ContingentCondition: Optional[constr(max_length=1)] = Field(
        None, description='触发条件'
    )
    StopPrice: Optional[float] = Field(None, description='止损价')
    ForceCloseReason: Optional[constr(max_length=1)] = Field(None, description='强平原因')
    IsAutoSuspend: Optional[int] = Field(None, description='自动挂起标志')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    RequestID: Optional[int] = Field(None, description='请求编号')
    UserForceClose: Optional[int] = Field(None, description='用户强评标志')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    IsSwapOrder: Optional[int] = Field(None, description='互换单标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账号')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='交易编码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


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


class QryErrOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class ErrOrderActionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OrderActionRef: Optional[int] = Field(None, description='报单操作引用')
    OrderRef: Optional[constr(max_length=13)] = Field(None, description='报单引用')
    RequestID: Optional[int] = Field(None, description='请求编号')
    FrontID: Optional[int] = Field(None, description='前置编号')
    SessionID: Optional[int] = Field(None, description='会话编号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    OrderSysID: Optional[constr(max_length=21)] = Field(None, description='报单编号')
    ActionFlag: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    LimitPrice: Optional[float] = Field(None, description='价格')
    VolumeChange: Optional[int] = Field(None, description='数量变化')
    ActionDate: Optional[constr(max_length=9)] = Field(None, description='操作日期')
    ActionTime: Optional[constr(max_length=9)] = Field(None, description='操作时间')
    TraderID: Optional[constr(max_length=21)] = Field(None, description='交易所交易员代码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    OrderLocalID: Optional[constr(max_length=13)] = Field(None, description='本地报单编号')
    ActionLocalID: Optional[constr(max_length=13)] = Field(None, description='操作本地编号')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ClientID: Optional[constr(max_length=11)] = Field(None, description='客户代码')
    BusinessUnit: Optional[constr(max_length=21)] = Field(None, description='业务单元')
    OrderActionStatus: Optional[constr(max_length=1)] = Field(
        None, description='报单操作状态'
    )
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    StatusMsg: Optional[constr(max_length=81)] = Field(None, description='状态信息')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BranchID: Optional[constr(max_length=9)] = Field(None, description='营业部编号')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    reserve2: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryExchangeSequenceField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class ExchangeSequenceField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    SequenceNo: Optional[int] = Field(None, description='序号')
    MarketStatus: Optional[constr(max_length=1)] = Field(None, description='合约交易状态')


class QueryMaxOrderVolumeWithPriceField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    MaxVolume: Optional[int] = Field(None, description='最大允许报单数量')
    Price: Optional[float] = Field(None, description='报单价格')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class QryBrokerTradingParamsField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')


class BrokerTradingParamsField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    MarginPriceType: Optional[constr(max_length=1)] = Field(None, description='保证金价格类型')
    Algorithm: Optional[constr(max_length=1)] = Field(None, description='盈亏算法')
    AvailIncludeCloseProfit: Optional[constr(max_length=1)] = Field(
        None, description='可用是否包含平仓盈利'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    OptionRoyaltyPriceType: Optional[constr(max_length=1)] = Field(
        None, description='期权权利金价格类型'
    )
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')


class QryBrokerTradingAlgosField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class BrokerTradingAlgosField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HandlePositionAlgoID: Optional[constr(max_length=1)] = Field(
        None, description='持仓处理算法编号'
    )
    FindMarginRateAlgoID: Optional[constr(max_length=1)] = Field(
        None, description='寻找保证金率算法编号'
    )
    HandleTradingAccountAlgoID: Optional[constr(max_length=1)] = Field(
        None, description='资金处理算法编号'
    )
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QueryBrokerDepositField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')


class BrokerDepositField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='会员代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    PreBalance: Optional[float] = Field(None, description='上次结算准备金')
    CurrMargin: Optional[float] = Field(None, description='当前保证金总额')
    CloseProfit: Optional[float] = Field(None, description='平仓盈亏')
    Balance: Optional[float] = Field(None, description='期货结算准备金')
    Deposit: Optional[float] = Field(None, description='入金金额')
    Withdraw: Optional[float] = Field(None, description='出金金额')
    Available: Optional[float] = Field(None, description='可提资金')
    Reserve: Optional[float] = Field(None, description='基本准备金')
    FrozenMargin: Optional[float] = Field(None, description='冻结的保证金')


class QryCFMMCBrokerKeyField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')


class CFMMCBrokerKeyField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='经纪公司统一编码')
    CreateDate: Optional[constr(max_length=9)] = Field(None, description='密钥生成日期')
    CreateTime: Optional[constr(max_length=9)] = Field(None, description='密钥生成时间')
    KeyID: Optional[int] = Field(None, description='密钥编号')
    CurrentKey: Optional[constr(max_length=21)] = Field(None, description='动态密钥')
    KeyKind: Optional[constr(max_length=1)] = Field(None, description='动态密钥类型')


class CFMMCTradingAccountKeyField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='经纪公司统一编码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    KeyID: Optional[int] = Field(None, description='密钥编号')
    CurrentKey: Optional[constr(max_length=21)] = Field(None, description='动态密钥')


class QryCFMMCTradingAccountKeyField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class BrokerUserOTPParamField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    OTPVendorsID: Optional[constr(max_length=2)] = Field(None, description='动态令牌提供商')
    SerialNumber: Optional[constr(max_length=17)] = Field(None, description='动态令牌序列号')
    AuthKey: Optional[constr(max_length=41)] = Field(None, description='令牌密钥')
    LastDrift: Optional[int] = Field(None, description='漂移值')
    LastSuccess: Optional[int] = Field(None, description='成功值')
    OTPType: Optional[constr(max_length=1)] = Field(None, description='动态令牌类型')


class ManualSyncBrokerUserOTPField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    OTPType: Optional[constr(max_length=1)] = Field(None, description='动态令牌类型')
    FirstOTP: Optional[constr(max_length=41)] = Field(None, description='第一个动态密码')
    SecondOTP: Optional[constr(max_length=41)] = Field(None, description='第二个动态密码')


class CommRateModelField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    CommModelID: Optional[constr(max_length=13)] = Field(None, description='手续费率模板代码')
    CommModelName: Optional[constr(max_length=161)] = Field(None, description='模板名称')


class QryCommRateModelField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    CommModelID: Optional[constr(max_length=13)] = Field(None, description='手续费率模板代码')


class MarginModelField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    MarginModelID: Optional[constr(max_length=13)] = Field(None, description='保证金率模板代码')
    MarginModelName: Optional[constr(max_length=161)] = Field(None, description='模板名称')


class QryMarginModelField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    MarginModelID: Optional[constr(max_length=13)] = Field(None, description='保证金率模板代码')


class EWarrantOffsetField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Volume: Optional[int] = Field(None, description='数量')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryEWarrantOffsetField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryInvestorProductGroupMarginField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    ProductGroupID: Optional[constr(max_length=81)] = Field(
        None, description='品种/跨品种标示'
    )


class InvestorProductGroupMarginField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    FrozenMargin: Optional[float] = Field(None, description='冻结的保证金')
    LongFrozenMargin: Optional[float] = Field(None, description='多头冻结的保证金')
    ShortFrozenMargin: Optional[float] = Field(None, description='空头冻结的保证金')
    UseMargin: Optional[float] = Field(None, description='占用的保证金')
    LongUseMargin: Optional[float] = Field(None, description='多头保证金')
    ShortUseMargin: Optional[float] = Field(None, description='空头保证金')
    ExchMargin: Optional[float] = Field(None, description='交易所保证金')
    LongExchMargin: Optional[float] = Field(None, description='交易所多头保证金')
    ShortExchMargin: Optional[float] = Field(None, description='交易所空头保证金')
    CloseProfit: Optional[float] = Field(None, description='平仓盈亏')
    FrozenCommission: Optional[float] = Field(None, description='冻结的手续费')
    Commission: Optional[float] = Field(None, description='手续费')
    FrozenCash: Optional[float] = Field(None, description='冻结的资金')
    CashIn: Optional[float] = Field(None, description='资金差额')
    PositionProfit: Optional[float] = Field(None, description='持仓盈亏')
    OffsetAmount: Optional[float] = Field(None, description='折抵总金额')
    LongOffsetAmount: Optional[float] = Field(None, description='多头折抵总金额')
    ShortOffsetAmount: Optional[float] = Field(None, description='空头折抵总金额')
    ExchOffsetAmount: Optional[float] = Field(None, description='交易所折抵总金额')
    LongExchOffsetAmount: Optional[float] = Field(None, description='交易所多头折抵总金额')
    ShortExchOffsetAmount: Optional[float] = Field(None, description='交易所空头折抵总金额')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    ProductGroupID: Optional[constr(max_length=81)] = Field(
        None, description='品种/跨品种标示'
    )


class QueryCFMMCTradingAccountTokenField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')


class CFMMCTradingAccountTokenField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    ParticipantID: Optional[constr(max_length=11)] = Field(None, description='经纪公司统一编码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    KeyID: Optional[int] = Field(None, description='密钥编号')
    Token: Optional[constr(max_length=21)] = Field(None, description='动态令牌')


class QryProductGroupField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')


class ProductGroupField(CtpField):
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    reserve2: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')
    ProductGroupID: Optional[constr(max_length=81)] = Field(None, description='产品组代码')


class BulletinField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BulletinID: Optional[int] = Field(None, description='公告编号')
    SequenceNo: Optional[int] = Field(None, description='序列号')
    NewsType: Optional[constr(max_length=3)] = Field(None, description='公告类型')
    NewsUrgency: Optional[constr(max_length=1)] = Field(None, description='紧急程度')
    SendTime: Optional[constr(max_length=9)] = Field(None, description='发送时间')
    Abstract: Optional[constr(max_length=81)] = Field(None, description='消息摘要')
    ComeFrom: Optional[constr(max_length=21)] = Field(None, description='消息来源')
    Content: Optional[constr(max_length=501)] = Field(None, description='消息正文')
    URLLink: Optional[constr(max_length=201)] = Field(None, description='WEB地址')
    MarketID: Optional[constr(max_length=31)] = Field(None, description='市场代码')


class QryBulletinField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    BulletinID: Optional[int] = Field(None, description='公告编号')
    SequenceNo: Optional[int] = Field(None, description='序列号')
    NewsType: Optional[constr(max_length=3)] = Field(None, description='公告类型')
    NewsUrgency: Optional[constr(max_length=1)] = Field(None, description='紧急程度')


class ReqOpenAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    CashExchangeCode: Optional[constr(max_length=1)] = Field(None, description='汇钞标志')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    TID: Optional[int] = Field(None, description='交易ID')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class ReqCancelAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    CashExchangeCode: Optional[constr(max_length=1)] = Field(None, description='汇钞标志')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    TID: Optional[int] = Field(None, description='交易ID')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class ReqChangeAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    NewBankAccount: Optional[constr(max_length=41)] = Field(None, description='新银行帐号')
    NewBankPassWord: Optional[constr(max_length=41)] = Field(None, description='新银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    TID: Optional[int] = Field(None, description='交易ID')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class ReqTransferField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    TradeAmount: Optional[float] = Field(None, description='转帐金额')
    FutureFetchAmount: Optional[float] = Field(None, description='期货可取金额')
    FeePayFlag: Optional[constr(max_length=1)] = Field(None, description='费用支付标志')
    CustFee: Optional[float] = Field(None, description='应收客户费用')
    BrokerFee: Optional[float] = Field(None, description='应收期货公司费用')
    Message: Optional[constr(max_length=129)] = Field(None, description='发送方给接收方的消息')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    TransferStatus: Optional[constr(max_length=1)] = Field(None, description='转账交易状态')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class RspTransferField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    TradeAmount: Optional[float] = Field(None, description='转帐金额')
    FutureFetchAmount: Optional[float] = Field(None, description='期货可取金额')
    FeePayFlag: Optional[constr(max_length=1)] = Field(None, description='费用支付标志')
    CustFee: Optional[float] = Field(None, description='应收客户费用')
    BrokerFee: Optional[float] = Field(None, description='应收期货公司费用')
    Message: Optional[constr(max_length=129)] = Field(None, description='发送方给接收方的消息')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    TransferStatus: Optional[constr(max_length=1)] = Field(None, description='转账交易状态')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class ReqRepealField(CtpField):
    RepealTimeInterval: Optional[int] = Field(None, description='冲正时间间隔')
    RepealedTimes: Optional[int] = Field(None, description='已经冲正次数')
    BankRepealFlag: Optional[constr(max_length=1)] = Field(None, description='银行冲正标志')
    BrokerRepealFlag: Optional[constr(max_length=1)] = Field(None, description='期商冲正标志')
    PlateRepealSerial: Optional[int] = Field(None, description='被冲正平台流水号')
    BankRepealSerial: Optional[constr(max_length=13)] = Field(
        None, description='被冲正银行流水号'
    )
    FutureRepealSerial: Optional[int] = Field(None, description='被冲正期货流水号')
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    TradeAmount: Optional[float] = Field(None, description='转帐金额')
    FutureFetchAmount: Optional[float] = Field(None, description='期货可取金额')
    FeePayFlag: Optional[constr(max_length=1)] = Field(None, description='费用支付标志')
    CustFee: Optional[float] = Field(None, description='应收客户费用')
    BrokerFee: Optional[float] = Field(None, description='应收期货公司费用')
    Message: Optional[constr(max_length=129)] = Field(None, description='发送方给接收方的消息')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    TransferStatus: Optional[constr(max_length=1)] = Field(None, description='转账交易状态')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class RspRepealField(CtpField):
    RepealTimeInterval: Optional[int] = Field(None, description='冲正时间间隔')
    RepealedTimes: Optional[int] = Field(None, description='已经冲正次数')
    BankRepealFlag: Optional[constr(max_length=1)] = Field(None, description='银行冲正标志')
    BrokerRepealFlag: Optional[constr(max_length=1)] = Field(None, description='期商冲正标志')
    PlateRepealSerial: Optional[int] = Field(None, description='被冲正平台流水号')
    BankRepealSerial: Optional[constr(max_length=13)] = Field(
        None, description='被冲正银行流水号'
    )
    FutureRepealSerial: Optional[int] = Field(None, description='被冲正期货流水号')
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    TradeAmount: Optional[float] = Field(None, description='转帐金额')
    FutureFetchAmount: Optional[float] = Field(None, description='期货可取金额')
    FeePayFlag: Optional[constr(max_length=1)] = Field(None, description='费用支付标志')
    CustFee: Optional[float] = Field(None, description='应收客户费用')
    BrokerFee: Optional[float] = Field(None, description='应收期货公司费用')
    Message: Optional[constr(max_length=129)] = Field(None, description='发送方给接收方的消息')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    TransferStatus: Optional[constr(max_length=1)] = Field(None, description='转账交易状态')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class ReqQueryAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class RspQueryAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    BankUseAmount: Optional[float] = Field(None, description='银行可用金额')
    BankFetchAmount: Optional[float] = Field(None, description='银行可取金额')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class FutureSignIOField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')


class RspFutureSignInField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    PinKey: Optional[constr(max_length=129)] = Field(None, description='PIN密钥')
    MacKey: Optional[constr(max_length=129)] = Field(None, description='MAC密钥')


class ReqFutureSignOutField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')


class RspFutureSignOutField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class ReqQueryTradeResultBySerialField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    Reference: Optional[int] = Field(None, description='流水号')
    RefrenceIssureType: Optional[constr(max_length=1)] = Field(
        None, description='本流水号发布者的机构类型'
    )
    RefrenceIssure: Optional[constr(max_length=36)] = Field(
        None, description='本流水号发布者机构编码'
    )
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    TradeAmount: Optional[float] = Field(None, description='转帐金额')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class RspQueryTradeResultBySerialField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    Reference: Optional[int] = Field(None, description='流水号')
    RefrenceIssureType: Optional[constr(max_length=1)] = Field(
        None, description='本流水号发布者的机构类型'
    )
    RefrenceIssure: Optional[constr(max_length=36)] = Field(
        None, description='本流水号发布者机构编码'
    )
    OriginReturnCode: Optional[constr(max_length=7)] = Field(None, description='原始返回代码')
    OriginDescrInfoForReturnCode: Optional[constr(max_length=129)] = Field(
        None, description='原始返回码描述'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    TradeAmount: Optional[float] = Field(None, description='转帐金额')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')


class ReqDayEndFileReadyField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    FileBusinessCode: Optional[constr(max_length=1)] = Field(None, description='文件业务功能')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')


class ReturnResultField(CtpField):
    ReturnCode: Optional[constr(max_length=7)] = Field(None, description='返回代码')
    DescrInfoForReturnCode: Optional[constr(max_length=129)] = Field(
        None, description='返回码描述'
    )


class VerifyFuturePasswordField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    TID: Optional[int] = Field(None, description='交易ID')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class VerifyCustInfoField(CtpField):
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class VerifyFuturePasswordAndCustInfoField(CtpField):
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class DepositResultInformField(CtpField):
    DepositSeqNo: Optional[constr(max_length=15)] = Field(
        None, description='出入金流水号，该流水号为银期报盘返回的流水号'
    )
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    Deposit: Optional[float] = Field(None, description='入金金额')
    RequestID: Optional[int] = Field(None, description='请求编号')
    ReturnCode: Optional[constr(max_length=7)] = Field(None, description='返回代码')
    DescrInfoForReturnCode: Optional[constr(max_length=129)] = Field(
        None, description='返回码描述'
    )


class ReqSyncKeyField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Message: Optional[constr(max_length=129)] = Field(None, description='交易核心给银期报盘的消息')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')


class RspSyncKeyField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Message: Optional[constr(max_length=129)] = Field(None, description='交易核心给银期报盘的消息')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class NotifyQueryAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    BankUseAmount: Optional[float] = Field(None, description='银行可用金额')
    BankFetchAmount: Optional[float] = Field(None, description='银行可取金额')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class TransferSerialField(CtpField):
    PlateSerial: Optional[int] = Field(None, description='平台流水号')
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易发起方日期')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='交易代码')
    SessionID: Optional[int] = Field(None, description='会话编号')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行编码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构编码')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期货公司编码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    FutureAccType: Optional[constr(max_length=1)] = Field(None, description='期货公司帐号类型')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    FutureSerial: Optional[int] = Field(None, description='期货公司流水号')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    TradeAmount: Optional[float] = Field(None, description='交易金额')
    CustFee: Optional[float] = Field(None, description='应收客户费用')
    BrokerFee: Optional[float] = Field(None, description='应收期货公司费用')
    AvailabilityFlag: Optional[constr(max_length=1)] = Field(None, description='有效标志')
    OperatorCode: Optional[constr(max_length=17)] = Field(None, description='操作员')
    BankNewAccount: Optional[constr(max_length=41)] = Field(None, description='新银行帐号')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class QryTransferSerialField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行编码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class NotifyFutureSignInField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    PinKey: Optional[constr(max_length=129)] = Field(None, description='PIN密钥')
    MacKey: Optional[constr(max_length=129)] = Field(None, description='MAC密钥')


class NotifyFutureSignOutField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class NotifySyncKeyField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    InstallID: Optional[int] = Field(None, description='安装编号')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    Message: Optional[constr(max_length=129)] = Field(None, description='交易核心给银期报盘的消息')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    RequestID: Optional[int] = Field(None, description='请求编号')
    TID: Optional[int] = Field(None, description='交易ID')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class QryAccountregisterField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行编码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构编码')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class AccountregisterField(CtpField):
    TradeDay: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行编码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构编码')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期货公司编码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期货公司分支机构编码'
    )
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    OpenOrDestroy: Optional[constr(max_length=1)] = Field(None, description='开销户类别')
    RegDate: Optional[constr(max_length=9)] = Field(None, description='签约日期')
    OutDate: Optional[constr(max_length=9)] = Field(None, description='解约日期')
    TID: Optional[int] = Field(None, description='交易ID')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class OpenAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    CashExchangeCode: Optional[constr(max_length=1)] = Field(None, description='汇钞标志')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    TID: Optional[int] = Field(None, description='交易ID')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class CancelAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    CashExchangeCode: Optional[constr(max_length=1)] = Field(None, description='汇钞标志')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    DeviceID: Optional[constr(max_length=3)] = Field(None, description='渠道标志')
    BankSecuAccType: Optional[constr(max_length=1)] = Field(
        None, description='期货单位帐号类型'
    )
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankSecuAcc: Optional[constr(max_length=41)] = Field(None, description='期货单位帐号')
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    OperNo: Optional[constr(max_length=17)] = Field(None, description='交易柜员')
    TID: Optional[int] = Field(None, description='交易ID')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户标识')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class ChangeAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=51)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    NewBankAccount: Optional[constr(max_length=41)] = Field(None, description='新银行帐号')
    NewBankPassWord: Optional[constr(max_length=41)] = Field(None, description='新银行密码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    BankPwdFlag: Optional[constr(max_length=1)] = Field(None, description='银行密码标志')
    SecuPwdFlag: Optional[constr(max_length=1)] = Field(None, description='期货资金密码核对标志')
    TID: Optional[int] = Field(None, description='交易ID')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')
    LongCustomerName: Optional[constr(max_length=161)] = Field(
        None, description='长客户姓名'
    )


class SecAgentACIDMapField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账户')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种')
    BrokerSecAgentID: Optional[constr(max_length=13)] = Field(
        None, description='境外中介机构资金帐号'
    )


class QrySecAgentACIDMapField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='资金账户')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种')


class UserRightsAssignField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='应用单元代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    DRIdentityID: Optional[int] = Field(None, description='交易中心代码')


class BrokerUserRightAssignField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='应用单元代码')
    DRIdentityID: Optional[int] = Field(None, description='交易中心代码')
    Tradeable: Optional[int] = Field(None, description='能否交易')


class DRTransferField(CtpField):
    OrigDRIdentityID: Optional[int] = Field(None, description='原交易中心代码')
    DestDRIdentityID: Optional[int] = Field(None, description='目标交易中心代码')
    OrigBrokerID: Optional[constr(max_length=11)] = Field(None, description='原应用单元代码')
    DestBrokerID: Optional[constr(max_length=11)] = Field(None, description='目标易用单元代码')


class FensUserInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    LoginMode: Optional[constr(max_length=1)] = Field(None, description='登录模式')


class CurrTransferIdentityField(CtpField):
    IdentityID: Optional[int] = Field(None, description='交易中心代码')


class LoginForbiddenUserField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryLoginForbiddenUserField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class MulticastGroupInfoField(CtpField):
    GroupIP: Optional[constr(max_length=33)] = Field(None, description='组播组IP地址')
    GroupPort: Optional[int] = Field(None, description='组播组IP端口')
    SourceIP: Optional[constr(max_length=33)] = Field(None, description='源地址')


class TradingAccountReserveField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Reserve: Optional[float] = Field(None, description='基本准备金')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class QryLoginForbiddenIPField(CtpField):
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryIPListField(CtpField):
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryUserRightsAssignField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='应用单元代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class ReserveOpenAccountConfirmField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=161)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    TID: Optional[int] = Field(None, description='交易ID')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    Password: Optional[constr(max_length=41)] = Field(None, description='期货密码')
    BankReserveOpenSeq: Optional[constr(max_length=13)] = Field(
        None, description='预约开户银行流水号'
    )
    BookDate: Optional[constr(max_length=9)] = Field(None, description='预约开户日期')
    BookPsw: Optional[constr(max_length=41)] = Field(None, description='预约开户验证密码')
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class ReserveOpenAccountField(CtpField):
    TradeCode: Optional[constr(max_length=7)] = Field(None, description='业务功能码')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行代码')
    BankBranchID: Optional[constr(max_length=5)] = Field(None, description='银行分支机构代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='期商代码')
    BrokerBranchID: Optional[constr(max_length=31)] = Field(
        None, description='期商分支机构代码'
    )
    TradeDate: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    TradeTime: Optional[constr(max_length=9)] = Field(None, description='交易时间')
    BankSerial: Optional[constr(max_length=13)] = Field(None, description='银行流水号')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易系统日期 ')
    PlateSerial: Optional[int] = Field(None, description='银期平台消息流水号')
    LastFragment: Optional[constr(max_length=1)] = Field(None, description='最后分片标志')
    SessionID: Optional[int] = Field(None, description='会话号')
    CustomerName: Optional[constr(max_length=161)] = Field(None, description='客户姓名')
    IdCardType: Optional[constr(max_length=1)] = Field(None, description='证件类型')
    IdentifiedCardNo: Optional[constr(max_length=51)] = Field(None, description='证件号码')
    Gender: Optional[constr(max_length=1)] = Field(None, description='性别')
    CountryCode: Optional[constr(max_length=21)] = Field(None, description='国家代码')
    CustType: Optional[constr(max_length=1)] = Field(None, description='客户类型')
    Address: Optional[constr(max_length=101)] = Field(None, description='地址')
    ZipCode: Optional[constr(max_length=7)] = Field(None, description='邮编')
    Telephone: Optional[constr(max_length=41)] = Field(None, description='电话号码')
    MobilePhone: Optional[constr(max_length=21)] = Field(None, description='手机')
    Fax: Optional[constr(max_length=41)] = Field(None, description='传真')
    EMail: Optional[constr(max_length=41)] = Field(None, description='电子邮件')
    MoneyAccountStatus: Optional[constr(max_length=1)] = Field(
        None, description='资金账户状态'
    )
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行帐号')
    BankPassWord: Optional[constr(max_length=41)] = Field(None, description='银行密码')
    InstallID: Optional[int] = Field(None, description='安装编号')
    VerifyCertNoFlag: Optional[constr(max_length=1)] = Field(
        None, description='验证客户证件号码标志'
    )
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')
    Digest: Optional[constr(max_length=36)] = Field(None, description='摘要')
    BankAccType: Optional[constr(max_length=1)] = Field(None, description='银行帐号类型')
    BrokerIDByBank: Optional[constr(max_length=33)] = Field(
        None, description='期货公司银行编码'
    )
    TID: Optional[int] = Field(None, description='交易ID')
    ReserveOpenAccStas: Optional[constr(max_length=1)] = Field(
        None, description='预约开户状态'
    )
    ErrorID: Optional[int] = Field(None, description='错误代码')
    ErrorMsg: Optional[constr(max_length=81)] = Field(None, description='错误信息')


class AccountPropertyField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AccountID: Optional[constr(max_length=13)] = Field(None, description='投资者帐号')
    BankID: Optional[constr(max_length=4)] = Field(None, description='银行统一标识类型')
    BankAccount: Optional[constr(max_length=41)] = Field(None, description='银行账户')
    OpenName: Optional[constr(max_length=101)] = Field(None, description='银行账户的开户人名称')
    OpenBank: Optional[constr(max_length=101)] = Field(None, description='银行账户的开户行')
    IsActive: Optional[int] = Field(None, description='是否活跃')
    AccountSourceType: Optional[constr(max_length=1)] = Field(None, description='账户来源')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='开户日期')
    CancelDate: Optional[constr(max_length=9)] = Field(None, description='注销日期')
    OperatorID: Optional[constr(max_length=65)] = Field(None, description='录入员代码')
    OperateDate: Optional[constr(max_length=9)] = Field(None, description='录入日期')
    OperateTime: Optional[constr(max_length=9)] = Field(None, description='录入时间')
    CurrencyID: Optional[constr(max_length=4)] = Field(None, description='币种代码')


class QryCurrDRIdentityField(CtpField):
    DRIdentityID: Optional[int] = Field(None, description='交易中心代码')


class CurrDRIdentityField(CtpField):
    DRIdentityID: Optional[int] = Field(None, description='交易中心代码')


class QrySecAgentCheckModeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class QrySecAgentTradeInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    BrokerSecAgentID: Optional[constr(max_length=13)] = Field(
        None, description='境外中介机构资金帐号'
    )


class UserSystemInfoField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    ClientSystemInfoLen: Optional[int] = Field(None, description='用户端系统内部信息长度')
    ClientSystemInfo: Optional[constr(max_length=273)] = Field(
        None, description='用户端系统内部信息'
    )
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    ClientIPPort: Optional[int] = Field(None, description='终端IP端口')
    ClientLoginTime: Optional[constr(max_length=9)] = Field(None, description='登录成功时间')
    ClientAppID: Optional[constr(max_length=33)] = Field(None, description='App代码')
    ClientPublicIP: Optional[constr(max_length=33)] = Field(None, description='用户公网IP')
    ClientLoginRemark: Optional[constr(max_length=151)] = Field(
        None, description='客户登录备注2'
    )


class ReqUserAuthMethodField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class RspUserAuthMethodField(CtpField):
    UsableAuthMethod: Optional[int] = Field(None, description='当前可以用的认证模式')


class ReqGenUserCaptchaField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class RspGenUserCaptchaField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    CaptchaInfoLen: Optional[int] = Field(None, description='图片信息长度')
    CaptchaInfo: Optional[constr(max_length=2561)] = Field(None, description='图片信息')


class ReqGenUserTextField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')


class RspGenUserTextField(CtpField):
    UserTextSeq: Optional[int] = Field(None, description='短信验证码序号')


class ReqUserLoginWithCaptchaField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    InterfaceProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='接口端产品信息'
    )
    ProtocolInfo: Optional[constr(max_length=11)] = Field(None, description='协议信息')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    LoginRemark: Optional[constr(max_length=36)] = Field(None, description='登录备注')
    Captcha: Optional[constr(max_length=41)] = Field(None, description='图形验证码的文字内容')
    ClientIPPort: Optional[int] = Field(None, description='终端IP端口')
    ClientIPAddress: Optional[constr(max_length=33)] = Field(None, description='终端IP地址')


class ReqUserLoginWithTextField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    InterfaceProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='接口端产品信息'
    )
    ProtocolInfo: Optional[constr(max_length=11)] = Field(None, description='协议信息')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    LoginRemark: Optional[constr(max_length=36)] = Field(None, description='登录备注')
    Text: Optional[constr(max_length=41)] = Field(None, description='短信验证码文字内容')
    ClientIPPort: Optional[int] = Field(None, description='终端IP端口')
    ClientIPAddress: Optional[constr(max_length=33)] = Field(None, description='终端IP地址')


class ReqUserLoginWithOTPField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    InterfaceProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='接口端产品信息'
    )
    ProtocolInfo: Optional[constr(max_length=11)] = Field(None, description='协议信息')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    reserve1: Optional[constr(max_length=16)] = Field(None, description='保留的无效字段')
    LoginRemark: Optional[constr(max_length=36)] = Field(None, description='登录备注')
    OTPPassword: Optional[constr(max_length=41)] = Field(None, description='OTP密码')
    ClientIPPort: Optional[int] = Field(None, description='终端IP端口')
    ClientIPAddress: Optional[constr(max_length=33)] = Field(None, description='终端IP地址')


class ReqApiHandshakeField(CtpField):
    CryptoKeyVersion: Optional[constr(max_length=31)] = Field(
        None, description='api与front通信密钥版本号'
    )


class RspApiHandshakeField(CtpField):
    FrontHandshakeDataLen: Optional[int] = Field(None, description='握手回复数据长度')
    FrontHandshakeData: Optional[constr(max_length=301)] = Field(
        None, description='握手回复数据'
    )
    IsApiAuthEnabled: Optional[int] = Field(None, description='API认证是否开启')


class ReqVerifyApiKeyField(CtpField):
    ApiHandshakeDataLen: Optional[int] = Field(None, description='握手回复数据长度')
    ApiHandshakeData: Optional[constr(max_length=301)] = Field(
        None, description='握手回复数据'
    )


class DepartmentUserField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')


class QueryFreqField(CtpField):
    QueryFreq: Optional[int] = Field(None, description='查询频率')


class MulticastInstrumentField(CtpField):
    TopicID: Optional[int] = Field(None, description='主题号')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentNo: Optional[int] = Field(None, description='合约编号')
    CodePrice: Optional[float] = Field(None, description='基准价')
    VolumeMultiple: Optional[int] = Field(None, description='合约数量乘数')
    PriceTick: Optional[float] = Field(None, description='最小变动价位')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryMulticastInstrumentField(CtpField):
    TopicID: Optional[int] = Field(None, description='主题号')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class AppIDAuthAssignField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AppID: Optional[constr(max_length=33)] = Field(None, description='App代码')
    DRIdentityID: Optional[int] = Field(None, description='交易中心代码')


class AuthForbiddenIPField(CtpField):
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class QryAuthForbiddenIPField(CtpField):
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='IP地址')


class SyncDelaySwapFrozenField(CtpField):
    DelaySwapSeqNo: Optional[constr(max_length=15)] = Field(None, description='换汇流水号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    FromCurrencyID: Optional[constr(max_length=4)] = Field(None, description='源币种')
    FromRemainSwap: Optional[float] = Field(None, description='源剩余换汇额度(可提冻结)')
    IsManualSwap: Optional[int] = Field(None, description='是否手工换汇')


class QryMaxOrderVolumeField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    MaxVolume: Optional[int] = Field(None, description='最大允许报单数量')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryMaxOrderVolumeWithPriceField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    reserve1: Optional[constr(max_length=31)] = Field(None, description='保留的无效字段')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    OffsetFlag: Optional[constr(max_length=1)] = Field(None, description='开平标志')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    MaxVolume: Optional[int] = Field(None, description='最大允许报单数量')
    Price: Optional[float] = Field(None, description='报单价格')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class AuthUserIDField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AppID: Optional[constr(max_length=33)] = Field(None, description='App代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    AuthType: Optional[constr(max_length=1)] = Field(None, description='校验类型')


class AuthIPField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    AppID: Optional[constr(max_length=33)] = Field(None, description='App代码')
    IPAddress: Optional[constr(max_length=33)] = Field(None, description='用户代码')


class QryClassifiedInstrumentField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')
    TradingType: Optional[constr(max_length=1)] = Field(None, description='合约交易状态')
    ClassType: Optional[constr(max_length=1)] = Field(None, description='合约分类类型')


class QryCombPromotionParamField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class CombPromotionParamField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    CombHedgeFlag: Optional[constr(max_length=5)] = Field(None, description='投机套保标志')
    Xparameter: Optional[float] = Field(None, description='期权组合保证金比例')


class MarketDataBandingPriceField(CtpField):
    BandingUpperPrice: Optional[float] = Field(None, description='上带价')
    BandingLowerPrice: Optional[float] = Field(None, description='下带价')


class QryRiskSettleInvstPositionField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')


class QryRiskSettleProductStatusField(CtpField):
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')


class RiskSettleInvstPositionField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    PosiDirection: Optional[constr(max_length=1)] = Field(None, description='持仓多空方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    PositionDate: Optional[constr(max_length=1)] = Field(None, description='持仓日期')
    YdPosition: Optional[int] = Field(None, description='上日持仓')
    Position: Optional[int] = Field(None, description='今日持仓')
    LongFrozen: Optional[int] = Field(None, description='多头冻结')
    ShortFrozen: Optional[int] = Field(None, description='空头冻结')
    LongFrozenAmount: Optional[float] = Field(None, description='开仓冻结金额')
    ShortFrozenAmount: Optional[float] = Field(None, description='开仓冻结金额')
    OpenVolume: Optional[int] = Field(None, description='开仓量')
    CloseVolume: Optional[int] = Field(None, description='平仓量')
    OpenAmount: Optional[float] = Field(None, description='开仓金额')
    CloseAmount: Optional[float] = Field(None, description='平仓金额')
    PositionCost: Optional[float] = Field(None, description='持仓成本')
    PreMargin: Optional[float] = Field(None, description='上次占用的保证金')
    UseMargin: Optional[float] = Field(None, description='占用的保证金')
    FrozenMargin: Optional[float] = Field(None, description='冻结的保证金')
    FrozenCash: Optional[float] = Field(None, description='冻结的资金')
    FrozenCommission: Optional[float] = Field(None, description='冻结的手续费')
    CashIn: Optional[float] = Field(None, description='资金差额')
    Commission: Optional[float] = Field(None, description='手续费')
    CloseProfit: Optional[float] = Field(None, description='平仓盈亏')
    PositionProfit: Optional[float] = Field(None, description='持仓盈亏')
    PreSettlementPrice: Optional[float] = Field(None, description='上次结算价')
    SettlementPrice: Optional[float] = Field(None, description='本次结算价')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    OpenCost: Optional[float] = Field(None, description='开仓成本')
    ExchangeMargin: Optional[float] = Field(None, description='交易所保证金')
    CombPosition: Optional[int] = Field(None, description='组合成交形成的持仓')
    CombLongFrozen: Optional[int] = Field(None, description='组合多头冻结')
    CombShortFrozen: Optional[int] = Field(None, description='组合空头冻结')
    CloseProfitByDate: Optional[float] = Field(None, description='逐日盯市平仓盈亏')
    CloseProfitByTrade: Optional[float] = Field(None, description='逐笔对冲平仓盈亏')
    TodayPosition: Optional[int] = Field(None, description='今日持仓')
    MarginRateByMoney: Optional[float] = Field(None, description='保证金率')
    MarginRateByVolume: Optional[float] = Field(None, description='保证金率(按手数)')
    StrikeFrozen: Optional[int] = Field(None, description='执行冻结')
    StrikeFrozenAmount: Optional[float] = Field(None, description='执行冻结金额')
    AbandonFrozen: Optional[int] = Field(None, description='放弃执行冻结')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    YdStrikeFrozen: Optional[int] = Field(None, description='执行冻结的昨仓')
    InvestUnitID: Optional[constr(max_length=17)] = Field(None, description='投资单元代码')
    PositionCostOffset: Optional[float] = Field(None, description='大商所持仓成本差值，只有大商所使用')
    TasPosition: Optional[int] = Field(None, description='tas持仓手数')
    TasPositionCost: Optional[float] = Field(None, description='tas持仓成本')


class RiskSettleProductStatusField(CtpField):
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品编号')
    ProductStatus: Optional[constr(max_length=1)] = Field(None, description='产品结算状态')


class SyncDeltaInfoField(CtpField):
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')
    SyncDeltaStatus: Optional[constr(max_length=1)] = Field(None, description='追平状态')
    SyncDescription: Optional[constr(max_length=257)] = Field(None, description='追平描述')
    IsOnlyTrdDelta: Optional[int] = Field(None, description='是否只有资金追平')


class SyncDeltaProductStatusField(CtpField):
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')
    ProductStatus: Optional[constr(max_length=1)] = Field(None, description='是否允许交易')


class SyncDeltaInvstPosDtlField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='开仓日期')
    TradeID: Optional[constr(max_length=21)] = Field(None, description='成交编号')
    Volume: Optional[int] = Field(None, description='数量')
    OpenPrice: Optional[float] = Field(None, description='开仓价')
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    TradeType: Optional[constr(max_length=1)] = Field(None, description='成交类型')
    CombInstrumentID: Optional[constr(max_length=81)] = Field(
        None, description='组合合约代码'
    )
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    CloseProfitByDate: Optional[float] = Field(None, description='逐日盯市平仓盈亏')
    CloseProfitByTrade: Optional[float] = Field(None, description='逐笔对冲平仓盈亏')
    PositionProfitByDate: Optional[float] = Field(None, description='逐日盯市持仓盈亏')
    PositionProfitByTrade: Optional[float] = Field(None, description='逐笔对冲持仓盈亏')
    Margin: Optional[float] = Field(None, description='投资者保证金')
    ExchMargin: Optional[float] = Field(None, description='交易所保证金')
    MarginRateByMoney: Optional[float] = Field(None, description='保证金率')
    MarginRateByVolume: Optional[float] = Field(None, description='保证金率(按手数)')
    LastSettlementPrice: Optional[float] = Field(None, description='昨结算价')
    SettlementPrice: Optional[float] = Field(None, description='结算价')
    CloseVolume: Optional[int] = Field(None, description='平仓量')
    CloseAmount: Optional[float] = Field(None, description='平仓金额')
    TimeFirstVolume: Optional[int] = Field(None, description='先开先平剩余数量（DCE）')
    SpecPosiType: Optional[constr(max_length=1)] = Field(None, description='特殊持仓标志')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaInvstPosCombDtlField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    OpenDate: Optional[constr(max_length=9)] = Field(None, description='开仓日期')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    SettlementID: Optional[int] = Field(None, description='结算编号')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ComTradeID: Optional[constr(max_length=21)] = Field(None, description='组合编号')
    TradeID: Optional[constr(max_length=21)] = Field(None, description='撮合编号')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖')
    TotalAmt: Optional[int] = Field(None, description='持仓量')
    Margin: Optional[float] = Field(None, description='投资者保证金')
    ExchMargin: Optional[float] = Field(None, description='交易所保证金')
    MarginRateByMoney: Optional[float] = Field(None, description='保证金率')
    MarginRateByVolume: Optional[float] = Field(None, description='保证金率(按手数)')
    LegID: Optional[int] = Field(None, description='单腿编号')
    LegMultiple: Optional[int] = Field(None, description='单腿乘数')
    TradeGroupID: Optional[int] = Field(None, description='成交组号')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


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


class SyncDeltaInitInvstMarginField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    LastRiskTotalInvstMargin: Optional[float] = Field(None, description='追平前总风险保证金')
    LastRiskTotalExchMargin: Optional[float] = Field(None, description='追平前交易所总风险保证金')
    ThisSyncInvstMargin: Optional[float] = Field(None, description='本次追平品种总保证金')
    ThisSyncExchMargin: Optional[float] = Field(None, description='本次追平品种交易所总保证金')
    RemainRiskInvstMargin: Optional[float] = Field(None, description='本次未追平品种总保证金')
    RemainRiskExchMargin: Optional[float] = Field(None, description='本次未追平品种交易所总保证金')
    LastRiskSpecTotalInvstMargin: Optional[float] = Field(
        None, description='追平前总特殊产品风险保证金'
    )
    LastRiskSpecTotalExchMargin: Optional[float] = Field(
        None, description='追平前总特殊产品交易所风险保证金'
    )
    ThisSyncSpecInvstMargin: Optional[float] = Field(None, description='本次追平品种特殊产品总保证金')
    ThisSyncSpecExchMargin: Optional[float] = Field(
        None, description='本次追平品种特殊产品交易所总保证金'
    )
    RemainRiskSpecInvstMargin: Optional[float] = Field(
        None, description='本次未追平品种特殊产品总保证金'
    )
    RemainRiskSpecExchMargin: Optional[float] = Field(
        None, description='本次未追平品种特殊产品交易所总保证金'
    )
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaDceCombInstrumentField(CtpField):
    CombInstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    TradeGroupID: Optional[int] = Field(None, description='成交组号')
    CombHedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    CombinationType: Optional[constr(max_length=1)] = Field(None, description='组合类型')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖')
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')
    Xparameter: Optional[float] = Field(None, description='期权组合保证金比例')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaInvstMarginRateField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    IsRelative: Optional[int] = Field(None, description='是否相对交易所收取')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaExchMarginRateField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaOptExchMarginField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    SShortMarginRatioByMoney: Optional[float] = Field(None, description='投机空头保证金调整系数')
    SShortMarginRatioByVolume: Optional[float] = Field(None, description='投机空头保证金调整系数')
    HShortMarginRatioByMoney: Optional[float] = Field(None, description='保值空头保证金调整系数')
    HShortMarginRatioByVolume: Optional[float] = Field(None, description='保值空头保证金调整系数')
    AShortMarginRatioByMoney: Optional[float] = Field(None, description='套利空头保证金调整系数')
    AShortMarginRatioByVolume: Optional[float] = Field(None, description='套利空头保证金调整系数')
    MShortMarginRatioByMoney: Optional[float] = Field(None, description='做市商空头保证金调整系数')
    MShortMarginRatioByVolume: Optional[float] = Field(None, description='做市商空头保证金调整系数')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaOptInvstMarginField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    SShortMarginRatioByMoney: Optional[float] = Field(None, description='投机空头保证金调整系数')
    SShortMarginRatioByVolume: Optional[float] = Field(None, description='投机空头保证金调整系数')
    HShortMarginRatioByMoney: Optional[float] = Field(None, description='保值空头保证金调整系数')
    HShortMarginRatioByVolume: Optional[float] = Field(None, description='保值空头保证金调整系数')
    AShortMarginRatioByMoney: Optional[float] = Field(None, description='套利空头保证金调整系数')
    AShortMarginRatioByVolume: Optional[float] = Field(None, description='套利空头保证金调整系数')
    IsRelative: Optional[int] = Field(None, description='是否跟随交易所收取')
    MShortMarginRatioByMoney: Optional[float] = Field(None, description='做市商空头保证金调整系数')
    MShortMarginRatioByVolume: Optional[float] = Field(None, description='做市商空头保证金调整系数')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaInvstMarginRateULField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    LongMarginRatioByMoney: Optional[float] = Field(None, description='多头保证金率')
    LongMarginRatioByVolume: Optional[float] = Field(None, description='多头保证金费')
    ShortMarginRatioByMoney: Optional[float] = Field(None, description='空头保证金率')
    ShortMarginRatioByVolume: Optional[float] = Field(None, description='空头保证金费')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaOptInvstCommRateField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OpenRatioByMoney: Optional[float] = Field(None, description='开仓手续费率')
    OpenRatioByVolume: Optional[float] = Field(None, description='开仓手续费')
    CloseRatioByMoney: Optional[float] = Field(None, description='平仓手续费率')
    CloseRatioByVolume: Optional[float] = Field(None, description='平仓手续费')
    CloseTodayRatioByMoney: Optional[float] = Field(None, description='平今手续费率')
    CloseTodayRatioByVolume: Optional[float] = Field(None, description='平今手续费')
    StrikeRatioByMoney: Optional[float] = Field(None, description='执行手续费率')
    StrikeRatioByVolume: Optional[float] = Field(None, description='执行手续费')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaInvstCommRateField(CtpField):
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    InvestorRange: Optional[constr(max_length=1)] = Field(None, description='投资者范围')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    OpenRatioByMoney: Optional[float] = Field(None, description='开仓手续费率')
    OpenRatioByVolume: Optional[float] = Field(None, description='开仓手续费')
    CloseRatioByMoney: Optional[float] = Field(None, description='平仓手续费率')
    CloseRatioByVolume: Optional[float] = Field(None, description='平仓手续费')
    CloseTodayRatioByMoney: Optional[float] = Field(None, description='平今手续费率')
    CloseTodayRatioByVolume: Optional[float] = Field(None, description='平今手续费')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaProductExchRateField(CtpField):
    ProductID: Optional[constr(max_length=81)] = Field(None, description='产品代码')
    QuoteCurrencyID: Optional[constr(max_length=4)] = Field(None, description='报价币种类型')
    ExchangeRate: Optional[float] = Field(None, description='汇率')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaDepthMarketDataField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    ExchangeInstID: Optional[constr(max_length=81)] = Field(
        None, description='合约在交易所的代码'
    )
    LastPrice: Optional[float] = Field(None, description='最新价')
    PreSettlementPrice: Optional[float] = Field(None, description='上次结算价')
    PreClosePrice: Optional[float] = Field(None, description='昨收盘')
    PreOpenInterest: Optional[float] = Field(None, description='昨持仓量')
    OpenPrice: Optional[float] = Field(None, description='今开盘')
    HighestPrice: Optional[float] = Field(None, description='最高价')
    LowestPrice: Optional[float] = Field(None, description='最低价')
    Volume: Optional[int] = Field(None, description='数量')
    Turnover: Optional[float] = Field(None, description='成交金额')
    OpenInterest: Optional[float] = Field(None, description='持仓量')
    ClosePrice: Optional[float] = Field(None, description='今收盘')
    SettlementPrice: Optional[float] = Field(None, description='本次结算价')
    UpperLimitPrice: Optional[float] = Field(None, description='涨停板价')
    LowerLimitPrice: Optional[float] = Field(None, description='跌停板价')
    PreDelta: Optional[float] = Field(None, description='昨虚实度')
    CurrDelta: Optional[float] = Field(None, description='今虚实度')
    UpdateTime: Optional[constr(max_length=9)] = Field(None, description='最后修改时间')
    UpdateMillisec: Optional[int] = Field(None, description='最后修改毫秒')
    BidPrice1: Optional[float] = Field(None, description='申买价一')
    BidVolume1: Optional[int] = Field(None, description='申买量一')
    AskPrice1: Optional[float] = Field(None, description='申卖价一')
    AskVolume1: Optional[int] = Field(None, description='申卖量一')
    BidPrice2: Optional[float] = Field(None, description='申买价二')
    BidVolume2: Optional[int] = Field(None, description='申买量二')
    AskPrice2: Optional[float] = Field(None, description='申卖价二')
    AskVolume2: Optional[int] = Field(None, description='申卖量二')
    BidPrice3: Optional[float] = Field(None, description='申买价三')
    BidVolume3: Optional[int] = Field(None, description='申买量三')
    AskPrice3: Optional[float] = Field(None, description='申卖价三')
    AskVolume3: Optional[int] = Field(None, description='申卖量三')
    BidPrice4: Optional[float] = Field(None, description='申买价四')
    BidVolume4: Optional[int] = Field(None, description='申买量四')
    AskPrice4: Optional[float] = Field(None, description='申卖价四')
    AskVolume4: Optional[int] = Field(None, description='申卖量四')
    BidPrice5: Optional[float] = Field(None, description='申买价五')
    BidVolume5: Optional[int] = Field(None, description='申买量五')
    AskPrice5: Optional[float] = Field(None, description='申卖价五')
    AskVolume5: Optional[int] = Field(None, description='申卖量五')
    AveragePrice: Optional[float] = Field(None, description='当日均价')
    ActionDay: Optional[constr(max_length=9)] = Field(None, description='业务日期')
    BandingUpperPrice: Optional[float] = Field(None, description='上带价')
    BandingLowerPrice: Optional[float] = Field(None, description='下带价')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaIndexPriceField(CtpField):
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    ClosePrice: Optional[float] = Field(None, description='指数现货收盘价')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class SyncDeltaEWarrantOffsetField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日期')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    InvestorID: Optional[constr(max_length=13)] = Field(None, description='投资者代码')
    ExchangeID: Optional[constr(max_length=9)] = Field(None, description='交易所代码')
    InstrumentID: Optional[constr(max_length=81)] = Field(None, description='合约代码')
    Direction: Optional[constr(max_length=1)] = Field(None, description='买卖方向')
    HedgeFlag: Optional[constr(max_length=1)] = Field(None, description='投机套保标志')
    Volume: Optional[int] = Field(None, description='数量')
    ActionDirection: Optional[constr(max_length=1)] = Field(None, description='操作标志')
    SyncDeltaSequenceNo: Optional[int] = Field(None, description='追平序号')


class ReqUserLoginSCField(CtpField):
    TradingDay: Optional[constr(max_length=9)] = Field(None, description='交易日')
    BrokerID: Optional[constr(max_length=11)] = Field(None, description='经纪公司代码')
    UserID: Optional[constr(max_length=16)] = Field(None, description='用户代码')
    Password: Optional[constr(max_length=41)] = Field(None, description='密码')
    UserProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='用户端产品信息'
    )
    InterfaceProductInfo: Optional[constr(max_length=11)] = Field(
        None, description='接口端产品信息'
    )
    ProtocolInfo: Optional[constr(max_length=11)] = Field(None, description='协议信息')
    MacAddress: Optional[constr(max_length=21)] = Field(None, description='Mac地址')
    OneTimePassword: Optional[constr(max_length=41)] = Field(None, description='动态密码')
    ClientIPAddress: Optional[constr(max_length=33)] = Field(None, description='终端IP地址')
    LoginRemark: Optional[constr(max_length=36)] = Field(None, description='登录备注')
    ClientIPPort: Optional[int] = Field(None, description='终端IP端口')
    AuthCode: Optional[constr(max_length=17)] = Field(None, description='认证码')
    AppID: Optional[constr(max_length=33)] = Field(None, description='App代码')
