[
  {
    "path": ".gitignore",
    "content": "# ===== Python =====\r\n__pycache__/\r\n*.py[cod]\r\n*$py.class\r\n*.pyd\r\n*.so\r\n*.egg-info/\r\n.Python\r\n.github/\r\n# Virtual environments\r\n.venv/\r\nvenv/\r\nenv/\r\nENV/\r\n.python-version\r\n\r\n# Packaging / build artifacts\r\nbuild/\r\ndist/\r\npip-wheel-metadata/\r\n\r\n# Test / type-check / coverage caches\r\n.pytest_cache/\r\n.mypy_cache/\r\n.ruff_cache/\r\n.pyre/\r\n.hypothesis/\r\n.coverage\r\n.coverage.*\r\nhtmlcov/\r\n\r\n# ===== Django =====\r\n*.log\r\ndb.sqlite3\r\ndb.sqlite3-journal\r\nmedia/\r\nstaticfiles/\r\n\r\n# ===== Local runtime/config/secrets =====\r\nconfig.ini\r\nconfig.yaml\r\nexamples/\r\ntest/\r\ndeploy/\r\nbrother3.py\r\ndoc/\r\nmigrations/\r\n# ===== IDE / Editor =====\r\n.idea/\r\n.vscode/\r\n*.swp\r\n*.swo\r\n.cache/\r\n**/.cache/\r\n.clang*\r\n# ===== OS files =====\r\n.DS_Store\r\nThumbs.db\r\nDesktop.ini\r\n\r\n# ===== C/C++ / CMake / Visual Studio artifacts =====\r\nCMakeCache.txt\r\nCMakeFiles/\r\ncmake_install.cmake\r\ncompile_commands.json\r\nMakefile\r\n*.dir/\r\n*.vcxproj.user\r\n*.suo\r\n*.user\r\n*.userosscache\r\n*.sln.docstates\r\n*.obj\r\n*.o\r\n*.pdb\r\n*.idb\r\n*.ilk\r\n*.exp\r\n\r\n# Project-native build outputs\r\nnative/**/build/\r\nnative/**/x64/\r\nnative/**/Release/\r\nnative/**/Debug/\r\nctp_native/**/build/\r\n\r\n# CTP runtime flow/log dirs\r\nnative/ctp_bridge/flow/\r\ndashboard/Logs/\r\n\r\n# Runtime state / local snapshots\r\nnative_state.json\r\n*.pid\r\n"
  },
  {
    "path": "LICENSE.md",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1.  Definitions.\n\n    \"License\" shall mean the terms and conditions for use, reproduction,\n    and distribution as defined by Sections 1 through 9 of this document.\n\n    \"Licensor\" shall mean the copyright owner or entity authorized by\n    the copyright owner that is granting the License.\n\n    \"Legal Entity\" shall mean the union of the acting entity and all\n    other entities that control, are controlled by, or are under common\n    control with that entity. For the purposes of this definition,\n    \"control\" means (i) the power, direct or indirect, to cause the\n    direction or management of such entity, whether by contract or\n    otherwise, or (ii) ownership of fifty percent (50%) or more of the\n    outstanding shares, or (iii) beneficial ownership of such entity.\n\n    \"You\" (or \"Your\") shall mean an individual or Legal Entity\n    exercising permissions granted by this License.\n\n    \"Source\" form shall mean the preferred form for making modifications,\n    including but not limited to software source code, documentation\n    source, and configuration files.\n\n    \"Object\" form shall mean any form resulting from mechanical\n    transformation or translation of a Source form, including but\n    not limited to compiled object code, generated documentation,\n    and conversions to other media types.\n\n    \"Work\" shall mean the work of authorship, whether in Source or\n    Object form, made available under the License, as indicated by a\n    copyright notice that is included in or attached to the work\n    (an example is provided in the Appendix below).\n\n    \"Derivative Works\" shall mean any work, whether in Source or Object\n    form, that is based on (or derived from) the Work and for which the\n    editorial revisions, annotations, elaborations, or other modifications\n    represent, as a whole, an original work of authorship. For the purposes\n    of this License, Derivative Works shall not include works that remain\n    separable from, or merely link (or bind by name) to the interfaces of,\n    the Work and Derivative Works thereof.\n\n    \"Contribution\" shall mean any work of authorship, including\n    the original version of the Work and any modifications or additions\n    to that Work or Derivative Works thereof, that is intentionally\n    submitted to Licensor for inclusion in the Work by the copyright owner\n    or by an individual or Legal Entity authorized to submit on behalf of\n    the copyright owner. For the purposes of this definition, \"submitted\"\n    means any form of electronic, verbal, or written communication sent\n    to the Licensor or its representatives, including but not limited to\n    communication on electronic mailing lists, source code control systems,\n    and issue tracking systems that are managed by, or on behalf of, the\n    Licensor for the purpose of discussing and improving the Work, but\n    excluding communication that is conspicuously marked or otherwise\n    designated in writing by the copyright owner as \"Not a Contribution.\"\n\n    \"Contributor\" shall mean Licensor and any individual or Legal Entity\n    on behalf of whom a Contribution has been received by Licensor and\n    subsequently incorporated within the Work.\n\n2.  Grant of Copyright License. Subject to the terms and conditions of\n    this License, each Contributor hereby grants to You a perpetual,\n    worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n    copyright license to reproduce, prepare Derivative Works of,\n    publicly display, publicly perform, sublicense, and distribute the\n    Work and such Derivative Works in Source or Object form.\n\n3.  Grant of Patent License. Subject to the terms and conditions of\n    this License, each Contributor hereby grants to You a perpetual,\n    worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n    (except as stated in this section) patent license to make, have made,\n    use, offer to sell, sell, import, and otherwise transfer the Work,\n    where such license applies only to those patent claims licensable\n    by such Contributor that are necessarily infringed by their\n    Contribution(s) alone or by combination of their Contribution(s)\n    with the Work to which such Contribution(s) was submitted. If You\n    institute patent litigation against any entity (including a\n    cross-claim or counterclaim in a lawsuit) alleging that the Work\n    or a Contribution incorporated within the Work constitutes direct\n    or contributory patent infringement, then any patent licenses\n    granted to You under this License for that Work shall terminate\n    as of the date such litigation is filed.\n\n4.  Redistribution. You may reproduce and distribute copies of the\n    Work or Derivative Works thereof in any medium, with or without\n    modifications, and in Source or Object form, provided that You\n    meet the following conditions:\n\n    (a) You must give any other recipients of the Work or\n    Derivative Works a copy of this License; and\n\n    (b) You must cause any modified files to carry prominent notices\n    stating that You changed the files; and\n\n    (c) You must retain, in the Source form of any Derivative Works\n    that You distribute, all copyright, patent, trademark, and\n    attribution notices from the Source form of the Work,\n    excluding those notices that do not pertain to any part of\n    the Derivative Works; and\n\n    (d) If the Work includes a \"NOTICE\" text file as part of its\n    distribution, then any Derivative Works that You distribute must\n    include a readable copy of the attribution notices contained\n    within such NOTICE file, excluding those notices that do not\n    pertain to any part of the Derivative Works, in at least one\n    of the following places: within a NOTICE text file distributed\n    as part of the Derivative Works; within the Source form or\n    documentation, if provided along with the Derivative Works; or,\n    within a display generated by the Derivative Works, if and\n    wherever such third-party notices normally appear. The contents\n    of the NOTICE file are for informational purposes only and\n    do not modify the License. You may add Your own attribution\n    notices within Derivative Works that You distribute, alongside\n    or as an addendum to the NOTICE text from the Work, provided\n    that such additional attribution notices cannot be construed\n    as modifying the License.\n\n    You may add Your own copyright statement to Your modifications and\n    may provide additional or different license terms and conditions\n    for use, reproduction, or distribution of Your modifications, or\n    for any such Derivative Works as a whole, provided Your use,\n    reproduction, and distribution of the Work otherwise complies with\n    the conditions stated in this License.\n\n5.  Submission of Contributions. Unless You explicitly state otherwise,\n    any Contribution intentionally submitted for inclusion in the Work\n    by You to the Licensor shall be under the terms and conditions of\n    this License, without any additional terms or conditions.\n    Notwithstanding the above, nothing herein shall supersede or modify\n    the terms of any separate license agreement you may have executed\n    with Licensor regarding such Contributions.\n\n6.  Trademarks. This License does not grant permission to use the trade\n    names, trademarks, service marks, or product names of the Licensor,\n    except as required for reasonable and customary use in describing the\n    origin of the Work and reproducing the content of the NOTICE file.\n\n7.  Disclaimer of Warranty. Unless required by applicable law or\n    agreed to in writing, Licensor provides the Work (and each\n    Contributor provides its Contributions) on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n    implied, including, without limitation, any warranties or conditions\n    of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n    PARTICULAR PURPOSE. You are solely responsible for determining the\n    appropriateness of using or redistributing the Work and assume any\n    risks associated with Your exercise of permissions under this License.\n\n8.  Limitation of Liability. In no event and under no legal theory,\n    whether in tort (including negligence), contract, or otherwise,\n    unless required by applicable law (such as deliberate and grossly\n    negligent acts) or agreed to in writing, shall any Contributor be\n    liable to You for damages, including any direct, indirect, special,\n    incidental, or consequential damages of any character arising as a\n    result of this License or out of the use or inability to use the\n    Work (including but not limited to damages for loss of goodwill,\n    work stoppage, computer failure or malfunction, or any and all\n    other commercial damages or losses), even if such Contributor\n    has been advised of the possibility of such damages.\n\n9.  Accepting Warranty or Additional Liability. While redistributing\n    the Work or Derivative Works thereof, You may choose to offer,\n    and charge a fee for, acceptance of support, warranty, indemnity,\n    or other liability obligations and/or rights consistent with this\n    License. However, in accepting such obligations, You may act only\n    on Your own behalf and on Your sole responsibility, not on behalf\n    of any other Contributor, and only if You agree to indemnify,\n    defend, and hold each Contributor harmless for any liability\n    incurred by, or claims asserted against, such Contributor by reason\n    of your accepting any such warranty or additional liability.\n\nEND OF TERMS AND CONDITIONS\n\nAPPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\nCopyright 2016 timercrack\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# trader\r\n\r\n`trader` 是一个以 **CTP 原生链路** 为核心的交易项目，包含：\r\n\r\n- 原生网关（`native/ctp_bridge` + `ctp_native`）\r\n- 策略执行（`strategy`）\r\n- Django 管理与可视化（`dashboard` + `panel`）\r\n\r\n## 架构概览\r\n\r\n### 核心模块\r\n\r\n- `runtime_config.py`：运行时配置入口（仅读取根目录 `config.yaml`）\r\n- `ctp_native/`：Python 侧网关与本地消息总线\r\n- `native/ctp_bridge/`：pybind11 C++ 扩展，连接 Thost API\r\n- `strategy/`：交易策略与查询/报单流程\r\n- `dashboard/` + `panel/`：Django 后台与页面展示\r\n\r\n### 运行链路（简化）\r\n\r\n1. 读取 `config.yaml`\r\n2. 初始化 `ctp_bridge_native` 并登录 CTP\r\n3. `ctp_native` 在本地总线上分发请求/回报\r\n4. `strategy` 消费事件并执行策略逻辑\r\n\r\n## 快速开始\r\n\r\n### 1) 环境准备\r\n\r\n- Python 3.14（项目当前使用版本）\r\n- 安装依赖：`requirements.txt`\r\n- Windows 如使用 CTP 原生扩展：需可用 MSVC + CMake\r\n\r\n### 2) 配置\r\n\r\n编辑项目根目录 `config.yaml`，重点检查 `ctp_native` 章节：\r\n\r\n- `gateway = pybind`\r\n- `module = ctp_bridge_native`\r\n- `module_path` 指向本地编译输出目录\r\n- 补齐登录参数（`broker_id`、`investor_id`、`password`、`appid`、`authcode` 等）\r\n\r\n企业微信日志推送配置在 `weixin` 章节：\r\n\r\n- `CorpID`\r\n- `Secret`\r\n- `Token`、`EncodingAESKey`（保留与 flower 配置结构对齐）\r\n\r\n发送策略默认沿用旧 flower 行为：`agentid=0`、`touser=@all`。\r\n\r\n配置后，`trader` 会直接推送日志到企业微信，不再依赖单独运行 `flower`。\r\n\r\n默认配置键结构（示例值）如下，和当前代码中的默认配置字典保持一致：\r\n\r\n```yaml\r\ntrade:\r\n  command_timeout: 5\r\n  ignore_inst: \"\"\r\n  transport: native\r\n\r\nctp_native:\r\n  gateway: pybind\r\n  module: ctp_bridge_native\r\n  client_class: CtpClient\r\n  module_path: /path/to/trader/native/ctp_bridge/build\r\n  dll_dir: /path/to/trader/native/ctp_bridge/api/win\r\n  trade_front: tcp://xxx:xxx\r\n  market_front: tcp://xxx:xxx\r\n  broker_id: \"9999\"\r\n  investor_id: \"123456\"\r\n  password: passwd\r\n  appid: xxx\r\n  authcode: xxx\r\n  userinfo: xxx\r\n  flow_path: /path/to/trader/native/ctp_bridge/flow\r\n  request_timeout_ms: 10000\r\n  test_instrument: IF99\r\n\r\nlog:\r\n  level: DEBUG\r\n  format: \"%(asctime)s %(name)s [%(levelname)s] %(message)s\"\r\n  weixin_level: INFO\r\n  weixin_format: \"[%(levelname)s] %(message)s\"\r\n\r\nhost:\r\n  ip: 1.2.3.4\r\n  mac: 02:03:04:5a:6b:7c\r\n\r\nssh_tunnel:\r\n  enabled: false\r\n  host: 127.0.0.1\r\n  port: 22\r\n  local_node: localhost\r\n  private_key_linux: /root/.ssh/id_ed25519\r\n  private_key_win: C:\\\\Users\\\\timer\\\\.ssh\\\\id_ed25519.ppk\r\n\r\nweixin:\r\n  Token: \"\"\r\n  EncodingAESKey: \"\"\r\n  CorpID: \"\"\r\n  Secret: \"\"\r\n```\r\n\r\n### 3) 常用命令\r\n\r\n- 启动交易主程序：`python main.py`\r\n- Django 检查：`python manage.py check`\r\n- Native 查询烟测：`python test/test_ctp.py`\r\n\r\n### 4) 原生扩展构建（可选）\r\n\r\n若需要本地编译 `ctp_bridge_native`：\r\n\r\n- Windows（MSVC）：\r\n\r\n```powershell\r\ncd native/ctp_bridge\r\ncmake -S . -B build -G \"Visual Studio 17 2022\" -A x64\r\ncmake --build build --config Release\r\n```\r\n\r\n- Linux：\r\n\r\n```bash\r\ncd native/ctp_bridge\r\ncmake -S . -B build -DCMAKE_BUILD_TYPE=Release\r\ncmake --build build -j\r\n```\r\n\r\n详细说明见：`native/ctp_bridge/README.md`\r\n\r\n## 目录说明\r\n\r\n- `native/ctp_bridge`：C++ 扩展源码与 CMake\r\n- `ctp_native`：Python 网关封装\r\n- `strategy`：策略实现\r\n- `dashboard`、`panel`、`templates`、`static`：Web 展示与后台\r\n"
  },
  {
    "path": "README.rst",
    "content": "trader\n======\n\n操盘大哥的交易组件\n\n\nINSTALL\n=======\n\n先装talib的C库，再用pip装依赖。\n\n修改 mysql 配置文件 /etc/my.cnf.d/server.cnf ，增加如下配置:\n\n    [mysqld]\n\n    wait_timeout=31536000\n\n    interactive_timeout=31536000\n\n重启mysql服务\n\nLicense\n-------\n\n``trader`` is offered under the Apache 2 license.\n"
  },
  {
    "path": "__init__.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\n\n# version is a human-readable version number.\n\n# version_info is a four-tuple for programmatic comparison. The first\n# three numbers are the components of the version number.  The fourth\n# is zero for an official release, positive for a development branch,\n# or negative for a release candidate or beta (after the base version\n# number has been incremented)\n\nversion = \"0.1\"\nversion_info = (0, 1, 0, 0)\n"
  },
  {
    "path": "ctp_native/__init__.py",
    "content": "# coding=utf-8\r\n\r\nfrom .bus import LocalRedisLikeClient\r\nfrom .gateway import NativeGateway, get_gateway\r\nfrom .state_store import state_store\r\n\r\n__all__ = [\r\n    'LocalRedisLikeClient',\r\n    'NativeGateway',\r\n    'get_gateway',\r\n    'state_store',\r\n]\r\n"
  },
  {
    "path": "ctp_native/bus.py",
    "content": "# coding=utf-8\r\nfrom __future__ import annotations\r\n\r\nimport asyncio\r\nimport fnmatch\r\nimport inspect\r\nimport logging\r\nfrom typing import Any\r\nimport orjson\r\n\r\nfrom ctp_native.gateway import NativeGateway, get_gateway\r\nfrom ctp_native.state_store import state_store\r\nfrom runtime_config import runtime_config\r\n\r\nlogger = logging.getLogger('NativeBus')\r\n\r\n\r\nclass LocalPubSub:\r\n    def __init__(self, bus: 'LocalEventBus', ignore_subscribe_messages: bool = True):\r\n        self._bus = bus\r\n        self._ignore_subscribe_messages = ignore_subscribe_messages\r\n        self._queue: asyncio.Queue[dict[str, Any]] = asyncio.Queue()\r\n        self._patterns: set[str] = set()\r\n        self.in_pubsub = False\r\n        self._closed = False\r\n\r\n    async def psubscribe(self, *patterns: str):\r\n        for pattern in patterns:\r\n            self._patterns.add(pattern)\r\n            self._bus.register(pattern, self)\r\n            if not self._ignore_subscribe_messages:\r\n                await self._queue.put({'type': 'psubscribe', 'pattern': pattern, 'channel': None, 'data': 1})\r\n        self.in_pubsub = len(self._patterns) > 0\r\n\r\n    async def punsubscribe(self, *patterns: str):\r\n        targets = set(patterns) if patterns else set(self._patterns)\r\n        for pattern in list(targets):\r\n            self._bus.unregister(pattern, self)\r\n            self._patterns.discard(pattern)\r\n            if not self._ignore_subscribe_messages:\r\n                await self._queue.put({'type': 'punsubscribe', 'pattern': pattern, 'channel': None, 'data': 0})\r\n        self.in_pubsub = len(self._patterns) > 0\r\n        await self._queue.put({'type': 'punsubscribe', 'pattern': None, 'channel': None, 'data': 0})\r\n\r\n    async def unsubscribe(self):\r\n        await self.punsubscribe()\r\n\r\n    async def close(self):\r\n        if self._closed:\r\n            return\r\n        await self.punsubscribe()\r\n        self._closed = True\r\n\r\n    async def _push(self, pattern: str, channel: str, data: Any):\r\n        await self._queue.put({'type': 'pmessage', 'pattern': pattern, 'channel': channel, 'data': data})\r\n\r\n    async def listen(self):\r\n        while True:\r\n            msg = await self._queue.get()\r\n            yield msg\r\n            if msg.get('type') == 'punsubscribe' and not self.in_pubsub:\r\n                break\r\n\r\n\r\nclass LocalEventBus:\r\n    def __init__(self):\r\n        self._subs: dict[str, set[LocalPubSub]] = {}\r\n\r\n    def register(self, pattern: str, sub: LocalPubSub):\r\n        self._subs.setdefault(pattern, set()).add(sub)\r\n\r\n    def unregister(self, pattern: str, sub: LocalPubSub):\r\n        subs = self._subs.get(pattern)\r\n        if not subs:\r\n            return\r\n        subs.discard(sub)\r\n        if not subs:\r\n            self._subs.pop(pattern, None)\r\n\r\n    async def publish(self, channel: str, payload: Any):\r\n        for pattern, subs in list(self._subs.items()):\r\n            if not fnmatch.fnmatch(channel, pattern):\r\n                continue\r\n            for sub in list(subs):\r\n                await sub._push(pattern, channel, payload)\r\n\r\n\r\nclass LocalRedisLikeClient:\r\n    def __init__(self, loop: asyncio.AbstractEventLoop):\r\n        self._loop = loop\r\n        self._bus = LocalEventBus()\r\n        self._gateway: NativeGateway = get_gateway()\r\n        self._request_format = runtime_config.get('MSG_CHANNEL', 'request_format', fallback='MSG:CTP:REQ:{}')\r\n        self._trade_response_format = runtime_config.get('MSG_CHANNEL', 'trade_response_format', fallback='MSG:CTP:RSP:TRADE:{}:{}')\r\n        self._market_response_format = runtime_config.get('MSG_CHANNEL', 'market_response_format', fallback='MSG:CTP:RSP:MARKET:{}:{}')\r\n        self._request_prefix = self._request_format.split('{}')[0]\r\n        self._gateway.set_event_callback(self._on_gateway_event_sync)\r\n\r\n    async def start(self):\r\n        await self._gateway.start()\r\n\r\n    async def stop(self):\r\n        await self._gateway.stop()\r\n        state_store.dump_snapshot()\r\n\r\n    def pubsub(self, ignore_subscribe_messages: bool = True):\r\n        return LocalPubSub(self._bus, ignore_subscribe_messages=ignore_subscribe_messages)\r\n\r\n    def get(self, key: str):\r\n        return state_store.get(key)\r\n\r\n    def set(self, key: str, value: Any, ex: int | None = None):\r\n        state_store.set(key, value, ex=ex)\r\n\r\n    def publish(self, channel: str, payload: Any):\r\n        if channel.startswith(self._request_prefix):\r\n            req_name = channel[len(self._request_prefix):]\r\n            self._schedule(self._handle_request(req_name, payload))\r\n            return 1\r\n        self._schedule(self._bus.publish(channel, payload))\r\n        return 1\r\n\r\n    async def _on_gateway_event(self, topic: str, data: dict[str, Any]):\r\n        if topic in {\r\n            'OnFrontConnected',\r\n            'OnFrontDisconnected',\r\n            'OnFrontConnectedMd',\r\n            'OnFrontDisconnectedMd',\r\n            'OnRspAuthenticate',\r\n            'OnRspUserLogin',\r\n            'OnRspUserLoginMd',\r\n            'OnRspSettlementInfoConfirm',\r\n            'OnRspError',\r\n        }:\r\n            logger.debug('gateway event %s: %s', topic, data)\r\n        # 统一兼容历史 channel 风格\r\n        if topic.startswith('OnRtnDepthMarketData'):\r\n            inst = data.get('InstrumentID', 'UNKNOWN')\r\n            channel = self._market_response_format.format('OnRtnDepthMarketData', inst)\r\n        else:\r\n            order_ref = data.get('OrderRef', data.get('RequestID', 0))\r\n            channel = self._trade_response_format.format(topic, order_ref)\r\n        await self._bus.publish(channel, orjson.dumps(data))\r\n\r\n    def _on_gateway_event_sync(self, topic: str, data: dict[str, Any]):\r\n        self._schedule(self._on_gateway_event(topic, data))\r\n\r\n    async def _handle_request(self, req_name: str, payload: Any):\r\n        try:\r\n            data = orjson.loads(payload) if payload else {}\r\n        except Exception:\r\n            data = payload\r\n        request_id = 0\r\n        if isinstance(data, dict):\r\n            request_id = int(data.get('RequestID', 0) or 0)\r\n        try:\r\n            rows = await self._gateway.request(req_name, data)\r\n            rows = rows or []\r\n            if req_name.startswith('ReqQry'):\r\n                rsp_name = 'OnRspQry' + req_name[6:]\r\n                await self._publish_rows(self._trade_response_format.format(rsp_name, request_id), rows)\r\n            elif req_name in {'SubscribeMarketData', 'UnSubscribeMarketData'}:\r\n                rsp_name = 'OnRspSubMarketData' if req_name == 'SubscribeMarketData' else 'OnRspUnSubMarketData'\r\n                await self._publish_rows(self._market_response_format.format(rsp_name, 0), rows)\r\n            elif req_name == 'ReqOrderAction':\r\n                await self._publish_rows(self._trade_response_format.format('OnRspOrderAction', 0), rows)\r\n            else:\r\n                # ReqOrderInsert 无需同步回包，回报由 OnRtnOrder/OnRtnTrade 异步事件提供\r\n                pass\r\n        except Exception as e:\r\n            logger.warning('native request failed: %s payload=%s err=%s', req_name, data, repr(e), exc_info=True)\r\n            err_row = {'ErrorID': -1, 'ErrorMsg': repr(e), 'RequestID': request_id, 'bIsLast': True}\r\n            if req_name in {'SubscribeMarketData', 'UnSubscribeMarketData'}:\r\n                await self._bus.publish(self._market_response_format.format('OnRspError', request_id), orjson.dumps(err_row))\r\n            else:\r\n                await self._bus.publish(self._trade_response_format.format('OnRspError', request_id), orjson.dumps(err_row))\r\n\r\n    async def _publish_rows(self, channel: str, rows: list[dict[str, Any]]):\r\n        if not rows:\r\n            await self._bus.publish(channel, orjson.dumps({'empty': True, 'bIsLast': True}))\r\n            return\r\n        for idx, row in enumerate(rows):\r\n            if 'bIsLast' not in row:\r\n                row['bIsLast'] = idx == len(rows) - 1\r\n            await self._bus.publish(channel, orjson.dumps(row))\r\n\r\n    def _schedule(self, coro):\r\n        if inspect.isawaitable(coro):\r\n            self._loop.call_soon_threadsafe(asyncio.create_task, coro)  # type: ignore[arg-type]\r\n"
  },
  {
    "path": "ctp_native/gateway.py",
    "content": "# coding=utf-8\r\nfrom __future__ import annotations\r\n\r\nimport logging\r\nimport importlib\r\nimport sys\r\nimport os\r\nimport asyncio\r\nfrom abc import ABC, abstractmethod\r\nfrom typing import Any, Callable\r\n\r\nfrom runtime_config import runtime_config\r\n\r\nlogger = logging.getLogger('NativeGateway')\r\nREPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))).replace('\\\\', '/')\r\n\r\n\r\nclass NativeGateway(ABC):\r\n    @abstractmethod\r\n    async def start(self):\r\n        raise NotImplementedError()\r\n\r\n    @abstractmethod\r\n    async def stop(self):\r\n        raise NotImplementedError()\r\n\r\n    @abstractmethod\r\n    async def request(self, req_name: str, payload: Any) -> list[dict[str, Any]]:\r\n        raise NotImplementedError()\r\n\r\n    @abstractmethod\r\n    def set_event_callback(self, cb: Callable[[str, dict[str, Any]], Any]):\r\n        raise NotImplementedError()\r\n\r\n\r\nclass PlaceholderGateway(NativeGateway):\r\n    def __init__(self):\r\n        self._cb = None\r\n\r\n    async def start(self):\r\n        logger.warning('当前使用 PlaceholderGateway，请接入 pybind11 Thost 原生扩展。')\r\n\r\n    async def stop(self):\r\n        return None\r\n\r\n    async def request(self, req_name: str, payload: Any) -> list[dict[str, Any]]:\r\n        request_id = 0\r\n        if isinstance(payload, dict):\r\n            request_id = int(payload.get('RequestID', 0) or 0)\r\n        return [{\r\n            'ErrorID': -1,\r\n            'ErrorMsg': f'Native gateway is not implemented for {req_name}',\r\n            'RequestID': request_id,\r\n            'bIsLast': True,\r\n            'empty': True,\r\n        }]\r\n\r\n    def set_event_callback(self, cb: Callable[[str, dict[str, Any]], Any]):\r\n        self._cb = cb\r\n\r\n\r\nclass PybindGateway(NativeGateway):\r\n    def __init__(self):\r\n        self._cb = None\r\n        self._client = None\r\n        self._fallback_reason = None\r\n        self._request_timeout_ms = 10000\r\n\r\n    async def start(self):\r\n        try:\r\n            def _resolve(path: str) -> str:\r\n                \"\"\"将相对路径解析为相对于项目根目录的绝对路径\"\"\"\r\n                if path and not os.path.isabs(path):\r\n                    return os.path.normpath(os.path.join(REPO_ROOT, path))\r\n                return path\r\n\r\n            dll_dir = _resolve(runtime_config.get('CTP_NATIVE', 'dll_dir', fallback=f'{REPO_ROOT}/native/ctp_bridge/api/win').strip())\r\n            if os.name == 'nt' and dll_dir and os.path.isdir(dll_dir):\r\n                os.add_dll_directory(dll_dir)\r\n            module_path = _resolve(runtime_config.get('CTP_NATIVE', 'module_path', fallback=f'{REPO_ROOT}/native/ctp_bridge/build').strip())\r\n            if module_path and module_path not in sys.path:\r\n                sys.path.insert(0, module_path)\r\n            module_name = runtime_config.get('CTP_NATIVE', 'module', fallback='ctp_bridge_native')\r\n            class_name = runtime_config.get('CTP_NATIVE', 'client_class', fallback='CtpClient')\r\n            module = importlib.import_module(module_name)\r\n            client_cls = getattr(module, class_name)\r\n            self._client = client_cls()\r\n\r\n            login_cfg = {\r\n                'trade_front': runtime_config.get('CTP_NATIVE', 'trade_front', fallback='').strip(),\r\n                'market_front': runtime_config.get('CTP_NATIVE', 'market_front', fallback='').strip(),\r\n                'broker_id': runtime_config.get('CTP_NATIVE', 'broker_id', fallback='').strip(),\r\n                'investor_id': runtime_config.get('CTP_NATIVE', 'investor_id', fallback='').strip(),\r\n                'password': runtime_config.get('CTP_NATIVE', 'password', fallback='').strip(),\r\n                'appid': runtime_config.get('CTP_NATIVE', 'appid', fallback='').strip(),\r\n                'authcode': runtime_config.get('CTP_NATIVE', 'authcode', fallback='').strip(),\r\n                'userinfo': runtime_config.get('CTP_NATIVE', 'userinfo', fallback='').strip(),\r\n            }\r\n            missing = [k for k, v in login_cfg.items() if not v]\r\n            if missing:\r\n                raise RuntimeError(f'CTP_NATIVE required config missing: {\", \".join(missing)}')\r\n\r\n            if hasattr(self._client, 'configure'):\r\n                self._request_timeout_ms = runtime_config.getint('CTP_NATIVE', 'request_timeout_ms', fallback=10000)\r\n                self._client.configure({\r\n                    **login_cfg,\r\n                    'ip': runtime_config.get('CTP_NATIVE', 'ip', fallback='1.2.3.4'),\r\n                    'mac': runtime_config.get('CTP_NATIVE', 'mac', fallback='02:03:04:5a:6b:7c'),\r\n                    'flow_path': _resolve(runtime_config.get('CTP_NATIVE', 'flow_path', fallback=f'{REPO_ROOT}/native/ctp_bridge/flow')),\r\n                    'request_timeout_ms': self._request_timeout_ms,\r\n                })\r\n            if self._cb and hasattr(self._client, 'set_event_callback'):\r\n                self._client.set_event_callback(self._cb)\r\n            if hasattr(self._client, 'start'):\r\n                self._client.start()\r\n            self._fallback_reason = None\r\n        except Exception as e:\r\n            self._client = None\r\n            self._fallback_reason = repr(e)\r\n            logger.warning('Pybind gateway unavailable, fallback to placeholder mode: %s', self._fallback_reason)\r\n\r\n    async def stop(self):\r\n        if self._client and hasattr(self._client, 'stop'):\r\n            loop = asyncio.get_running_loop()\r\n            await loop.run_in_executor(None, self._client.stop)\r\n\r\n    async def request(self, req_name: str, payload: Any) -> list[dict[str, Any]]:\r\n        if not self._client:\r\n            request_id = 0\r\n            if isinstance(payload, dict):\r\n                request_id = int(payload.get('RequestID', 0) or 0)\r\n            return [{\r\n                'ErrorID': -1,\r\n                'ErrorMsg': f'Pybind gateway unavailable: {self._fallback_reason}',\r\n                'RequestID': request_id,\r\n                'bIsLast': True,\r\n                'empty': True,\r\n            }]\r\n        if not hasattr(self._client, 'request'):\r\n            raise RuntimeError('pybind client missing request(req_name, payload) method')\r\n        loop = asyncio.get_running_loop()\r\n        timeout_s = max(float(self._request_timeout_ms) / 1000.0 + 2.0, 3.0)\r\n        try:\r\n            result = await asyncio.wait_for(\r\n                loop.run_in_executor(None, self._client.request, req_name, payload),\r\n                timeout=timeout_s,\r\n            )\r\n        except asyncio.TimeoutError as exc:\r\n            raise TimeoutError(f'Pybind request timeout after {timeout_s:.1f}s: {req_name}') from exc\r\n        if result is None:\r\n            return []\r\n        if isinstance(result, dict):\r\n            return [result]\r\n        return list(result)\r\n\r\n    def set_event_callback(self, cb: Callable[[str, dict[str, Any]], Any]):\r\n        self._cb = cb\r\n        if self._client and hasattr(self._client, 'set_event_callback'):\r\n            self._client.set_event_callback(cb)\r\n\r\n\r\ndef get_gateway() -> NativeGateway:\r\n    gateway_name = runtime_config.get('CTP_NATIVE', 'gateway', fallback='placeholder').lower().strip()\r\n    if gateway_name == 'pybind':\r\n        return PybindGateway()\r\n    if gateway_name == 'placeholder':\r\n        return PlaceholderGateway()\r\n    logger.warning('未知 native gateway=%s，自动回退 placeholder', gateway_name)\r\n    return PlaceholderGateway()\r\n"
  },
  {
    "path": "ctp_native/state_store.py",
    "content": "# coding=utf-8\r\nimport os\r\nimport threading\r\nimport time\r\nfrom typing import Any\r\n\r\nfrom appdirs import AppDirs\r\nimport orjson\r\n\r\n\r\nclass NativeStateStore:\r\n    def __init__(self):\r\n        self._lock = threading.RLock()\r\n        self._kv: dict[str, Any] = {}\r\n        self._expire_at: dict[str, float] = {}\r\n        dirs = AppDirs('trader')\r\n        self._cache_dir = dirs.user_cache_dir\r\n        self._snapshot_file = os.path.join(self._cache_dir, 'native_state.json')\r\n        self._load_snapshot()\r\n\r\n    def _load_snapshot(self):\r\n        if not os.path.exists(self._snapshot_file):\r\n            return\r\n        try:\r\n            with open(self._snapshot_file, 'rt', encoding='utf-8') as f:\r\n                data = orjson.loads(f.read())\r\n            if isinstance(data, dict):\r\n                self._kv.update(data.get('kv', {}))\r\n                expire_at = data.get('expire_at', {})\r\n                if isinstance(expire_at, dict):\r\n                    self._expire_at.update({str(k): float(v) for k, v in expire_at.items()})\r\n        except Exception:\r\n            # 快照损坏不应阻塞主流程\r\n            pass\r\n\r\n    def dump_snapshot(self):\r\n        try:\r\n            if not os.path.exists(self._cache_dir):\r\n                os.makedirs(self._cache_dir)\r\n            payload = {\r\n                'kv': self._kv,\r\n                'expire_at': self._expire_at,\r\n            }\r\n            with open(self._snapshot_file, 'wb') as f:\r\n                f.write(orjson.dumps(payload))\r\n        except Exception:\r\n            # 快照失败不影响交易流程\r\n            pass\r\n\r\n    def _is_expired(self, key: str) -> bool:\r\n        expire_at = self._expire_at.get(key)\r\n        if expire_at is None:\r\n            return False\r\n        if expire_at <= time.time():\r\n            self._kv.pop(key, None)\r\n            self._expire_at.pop(key, None)\r\n            return True\r\n        return False\r\n\r\n    def get(self, key: str, default: Any = None):\r\n        with self._lock:\r\n            if self._is_expired(key):\r\n                return default\r\n            return self._kv.get(key, default)\r\n\r\n    def set(self, key: str, value: Any, ex: int | None = None):\r\n        with self._lock:\r\n            self._kv[key] = value\r\n            if ex is not None:\r\n                self._expire_at[key] = time.time() + ex\r\n            else:\r\n                self._expire_at.pop(key, None)\r\n\r\n    def delete(self, key: str):\r\n        with self._lock:\r\n            self._kv.pop(key, None)\r\n            self._expire_at.pop(key, None)\r\n\r\n\r\nstate_store = NativeStateStore()\r\n"
  },
  {
    "path": "dashboard/__init__.py",
    "content": "# coding=utf-8\r\n#\r\n# Copyright 2016 timercrack\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n# not use this file except in compliance with the License. You may obtain\r\n# a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n# License for the specific language governing permissions and limitations\r\n# under the License.\r\n"
  },
  {
    "path": "dashboard/settings.py",
    "content": "\"\"\"\r\nDjango settings for mysite project.\r\n\r\nGenerated by 'django-admin startproject' using Django 3.2.9.\r\n\r\nFor more information on this file, see\r\nhttps://docs.djangoproject.com/en/3.2/topics/settings/\r\n\r\nFor the full list of settings and their values, see\r\nhttps://docs.djangoproject.com/en/3.2/ref/settings/\r\n\"\"\"\r\nimport os\r\nimport sys\r\nimport atexit\r\nimport logging\r\nfrom appdirs import AppDirs\r\nfrom pathlib import Path\r\nimport platform\r\nimport yaml\r\n\r\nLOCAL_PORT = 3306\r\nlogger = logging.getLogger('dashboard.settings')\r\nssh_tunnel = None\r\nBASE_DIR = Path(__file__).resolve().parent.parent\r\n\r\n\r\ndef _load_root_config_yaml():\r\n    config_path = BASE_DIR / 'config.yaml'\r\n    if not config_path.exists():\r\n        return {}\r\n    with open(config_path, 'rt', encoding='utf-8') as f:\r\n        data = yaml.safe_load(f) or {}\r\n    return data if isinstance(data, dict) else {}\r\n\r\n\r\nROOT_CONFIG = _load_root_config_yaml()\r\n\r\n\r\ndef _start_ssh_tunnel_if_needed():\r\n    global ssh_tunnel, LOCAL_PORT\r\n    tunnel_cfg = ROOT_CONFIG.get('ssh_tunnel', {}) if isinstance(ROOT_CONFIG.get('ssh_tunnel', {}), dict) else {}\r\n    local_node = str(tunnel_cfg.get('local_node', '')).strip()\r\n    if local_node and platform.node() == local_node:\r\n        return\r\n    try:\r\n        enabled = bool(tunnel_cfg.get('enabled', True))\r\n        if not enabled:\r\n            logger.info('SSH tunnel disabled by config.yaml ssh_tunnel.enabled=false')\r\n            return\r\n\r\n        from sshtunnel import SSHTunnelForwarder\r\n        ssh_host = str(tunnel_cfg.get('host', '')).strip()\r\n        ssh_port = int(tunnel_cfg.get('port', 22) or 22)\r\n        ssh_username = 'root'\r\n        if sys.platform == 'win32':\r\n            ssh_key = str(tunnel_cfg.get('private_key_win', '')).strip()\r\n        else:\r\n            ssh_key = str(tunnel_cfg.get('private_key_linux', '')).strip()\r\n\r\n        if not ssh_host or not ssh_key:\r\n            logger.warning('SSH tunnel config missing required fields(host/private_key_[linux|win]), fallback to local mysql 3306')\r\n            LOCAL_PORT = 3306\r\n            return\r\n\r\n        ssh_tunnel = SSHTunnelForwarder(\r\n            (ssh_host, ssh_port),\r\n            ssh_private_key=ssh_key,\r\n            ssh_username=ssh_username,\r\n            remote_bind_address=('127.0.0.1', 3306),\r\n        )\r\n        ssh_tunnel.start()\r\n        LOCAL_PORT = ssh_tunnel.local_bind_port\r\n\r\n        def _cleanup_tunnel():\r\n            try:\r\n                if ssh_tunnel:\r\n                    ssh_tunnel.stop()\r\n            except Exception:\r\n                pass\r\n\r\n        atexit.register(_cleanup_tunnel)\r\n    except Exception as e:\r\n        logger.warning('SSH tunnel start failed, fallback to local mysql 3306: %s', repr(e))\r\n        LOCAL_PORT = 3306\r\n\r\n\r\n_start_ssh_tunnel_if_needed()\r\n\r\n# Quick-start development settings - unsuitable for production\r\n# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/\r\n\r\n# SECURITY WARNING: keep the secret key used in production secret!\r\nSECRET_KEY = 'django-insecure-m@zyyr4j=$8t4n^cj7!y4$yep&6-&kor6+zn8bk)ygfq*l2kk('\r\n\r\n# SECURITY WARNING: don't run with debug turned on in production!\r\nDEBUG = True\r\n\r\nALLOWED_HOSTS = []\r\n\r\n\r\n# Application definition\r\n\r\nINSTALLED_APPS = [\r\n    'django.contrib.admin',\r\n    'django.contrib.auth',\r\n    'django.contrib.contenttypes',\r\n    'django.contrib.sessions',\r\n    'django.contrib.messages',\r\n    'django.contrib.staticfiles',\r\n    'panel.apps.PanelConfig'\r\n]\r\n\r\nMIDDLEWARE = [\r\n    'django.middleware.security.SecurityMiddleware',\r\n    'django.contrib.sessions.middleware.SessionMiddleware',\r\n    'django.middleware.common.CommonMiddleware',\r\n    'django.middleware.csrf.CsrfViewMiddleware',\r\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n    'django.contrib.messages.middleware.MessageMiddleware',\r\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\r\n]\r\n\r\nROOT_URLCONF = 'dashboard.urls'\r\n\r\nTEMPLATES = [\r\n    {\r\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\r\n        'DIRS': [os.path.join(BASE_DIR, 'templates')],\r\n        'APP_DIRS': True,\r\n        'OPTIONS': {\r\n            'context_processors': [\r\n                'django.template.context_processors.debug',\r\n                'django.template.context_processors.request',\r\n                'django.contrib.auth.context_processors.auth',\r\n                'django.contrib.messages.context_processors.messages',\r\n            ],\r\n        },\r\n    },\r\n]\r\n\r\nWSGI_APPLICATION = 'dashboard.wsgi.application'\r\n\r\n\r\n# Database\r\n# https://docs.djangoproject.com/en/3.2/ref/settings/#databases\r\n\r\nDATABASES = {\r\n    'default': {\r\n        'ENGINE': 'django.db.backends.mysql',\r\n        'NAME': 'quantdb',\r\n        'HOST': '127.0.0.1',\r\n        'USER': 'quant',\r\n        'PASSWORD': '123456',\r\n        'PORT': LOCAL_PORT\r\n    },\r\n}\r\n\r\napp_dir = AppDirs('dashboard')\r\nLOGGING = {\r\n    'version': 1,\r\n    'formatters': {'my_formatter': {'format': '%(asctime)s %(name)s [%(levelname)s] %(message)s'}},\r\n    'handlers': {\r\n        'file': {\r\n            'level': 'DEBUG',\r\n            'class': 'logging.handlers.RotatingFileHandler',\r\n            'filename': os.path.join(app_dir.user_log_dir, 'dashboard.log'),\r\n            'maxBytes': 1024 * 1024 * 5,  # 5 MB\r\n            'backupCount': 5,\r\n            'formatter': 'my_formatter',\r\n        },\r\n        'console': {'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'my_formatter'},\r\n    },\r\n    'loggers': {\r\n        'panel': {'handlers': ['file', 'console'], 'level': 'DEBUG'},\r\n        'dashboard.settings': {'handlers': ['file', 'console'], 'level': 'DEBUG'},\r\n    }\r\n}\r\n\r\n# Password validation\r\n# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators\r\n\r\nAUTH_PASSWORD_VALIDATORS = [\r\n    {\r\n        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',\r\n    },\r\n    {\r\n        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',\r\n    },\r\n    {\r\n        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',\r\n    },\r\n    {\r\n        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',\r\n    },\r\n]\r\n\r\nCACHES = {\r\n    \"default\": {\r\n        \"BACKEND\": \"django.core.cache.backends.locmem.LocMemCache\",\r\n        \"LOCATION\": \"trader-dashboard-local-cache\",\r\n        \"TIMEOUT\": 3600 * 24,  # one day\r\n    }\r\n}\r\n\r\n# Internationalization\r\n# https://docs.djangoproject.com/en/3.2/topics/i18n/\r\n\r\nLANGUAGE_CODE = 'zh-hans'\r\n\r\nTIME_ZONE = 'Asia/Shanghai'\r\n\r\nUSE_I18N = True\r\n\r\nUSE_L10N = True\r\n\r\nUSE_TZ = True\r\n\r\n\r\n# Static files (CSS, JavaScript, Images)\r\n# https://docs.djangoproject.com/en/3.2/howto/static-files/\r\n\r\nSTATIC_URL = '/static/'\r\nSTATICFILES_DIRS = [\r\n    os.path.join(BASE_DIR, \"static\"),\r\n]\r\nLOGIN_URL = '/admin/'\r\nLOGIN_REDIRECT_URL = '/'\r\n# Default primary key field type\r\n# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field\r\n\r\nDEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'\r\nif sys.platform == 'linux':\r\n    DEBUG = True\r\n    ALLOWED_HOSTS = ['*']\r\n"
  },
  {
    "path": "dashboard/static/css/global.css",
    "content": "body {\r\n    font-family: -apple-system, \"Helvetica Neue\", \"Arial\", \"PingFang SC\", \"Hiragino Sans GB\", \"STHeiti\", \"Microsoft YaHei\", \"Microsoft JhengHei\", \"Source Han Sans SC\", \"Noto Sans CJK SC\", \"Source Han Sans CN\", \"Noto Sans SC\", \"Source Han Sans TC\", \"Noto Sans CJK TC\", \"WenQuanYi Micro Hei\", SimSun, sans-serif;\r\n}\r\n\r\n.panel-heading-sm{\r\n    height: 28px;\r\n    padding: 4px 10px;\r\n}\r\n\r\n.panel-body-sm{\r\n   padding: 5px 10px;\r\n}\r\n\r\ntable.table-heading-sm thead tr th, table.table-heading-sm  tbody tr td{\r\n  \tfont-size: 12px;\r\n    height: 28px;\r\n    padding: 4px 10px;\r\n}\r\n\r\n.table-body-sm{\r\n   padding: 5px 10px;\r\n}\r\n\r\n.capitalize {\r\n    text-transform: capitalize;\r\n}\r\n\r\n.navbar-default {\r\n  background-color: #2da8e4;\r\n  border-color: #108ec9;\r\n}\r\n.navbar-default .navbar-brand {\r\n  color: #ffffff;\r\n}\r\n.navbar-default .navbar-brand:hover,\r\n.navbar-default .navbar-brand:focus {\r\n  color: #ffffff;\r\n}\r\n.navbar-default .navbar-text {\r\n  color: #ffffff;\r\n}\r\n.navbar-default .navbar-nav > li > a {\r\n  color: #ffffff;\r\n}\r\n.navbar-default .navbar-nav > li > a:hover,\r\n.navbar-default .navbar-nav > li > a:focus {\r\n  color: #ffffff;\r\n}\r\n.navbar-default .navbar-nav > li > .dropdown-menu {\r\n  background-color: #2da8e4;\r\n}\r\n.navbar-default .navbar-nav > li > .dropdown-menu > li > a {\r\n  color: #ffffff;\r\n}\r\n.navbar-default .navbar-nav > li > .dropdown-menu > li > a:hover,\r\n.navbar-default .navbar-nav > li > .dropdown-menu > li > a:focus {\r\n  color: #ffffff;\r\n  background-color: #108ec9;\r\n}\r\n.navbar-default .navbar-nav > li > .dropdown-menu > li > .divider {\r\n  background-color: #108ec9;\r\n}\r\n.navbar-default .navbar-nav .open .dropdown-menu > .active > a,\r\n.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\r\n.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\r\n  color: #ffffff;\r\n  background-color: #108ec9;\r\n}\r\n.navbar-default .navbar-nav > .active > a,\r\n.navbar-default .navbar-nav > .active > a:hover,\r\n.navbar-default .navbar-nav > .active > a:focus {\r\n  color: #ffffff;\r\n  background-color: #108ec9;\r\n}\r\n.navbar-default .navbar-nav > .open > a,\r\n.navbar-default .navbar-nav > .open > a:hover,\r\n.navbar-default .navbar-nav > .open > a:focus {\r\n  color: #ffffff;\r\n  background-color: #108ec9;\r\n}\r\n.navbar-default .navbar-toggle {\r\n  border-color: #108ec9;\r\n}\r\n.navbar-default .navbar-toggle:hover,\r\n.navbar-default .navbar-toggle:focus {\r\n  background-color: #108ec9;\r\n}\r\n.navbar-default .navbar-toggle .icon-bar {\r\n  background-color: #ffffff;\r\n}\r\n.navbar-default .navbar-collapse,\r\n.navbar-default .navbar-form {\r\n  border-color: #ffffff;\r\n}\r\n.navbar-default .navbar-link {\r\n  color: #ffffff;\r\n}\r\n.navbar-default .navbar-link:hover {\r\n  color: #ffffff;\r\n}\r\n\r\n@media (max-width: 767px) {\r\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\r\n    color: #ffffff;\r\n  }\r\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\r\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\r\n    color: #ffffff;\r\n  }\r\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\r\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\r\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\r\n    color: #ffffff;\r\n    background-color: #108ec9;\r\n  }\r\n}"
  },
  {
    "path": "dashboard/static/js/bar.js",
    "content": "// 基于准备好的dom，初始化echarts实例\nvar myChart = echarts.init(document.getElementById(\"main\"));\n\noption = {\n  backgroundColor: \"#000000\",\n  color: [\n    \"#ff0\",\n    \"#0f0\",\n    \"#61a0a8\",\n    \"#d48265\",\n    \"#91c7ae\",\n    \"#749f83\",\n    \"#ca8622\",\n    \"#bda29a\",\n    \"#6e7074\",\n    \"#546570\",\n    \"#c4ccd3\",\n  ],\n  title: {\n    text: \"交易信号\",\n    left: 0,\n    textStyle: {\n      color: \"#ffdf00\",\n    },\n  },\n  animation: false,\n  grid: {\n    left: \"4%\",\n    right: \"3%\",\n  },\n  tooltip: {\n    trigger: \"axis\",\n    axisPointer: {\n      type: \"line\",\n    },\n  },\n  legend: {\n    data: [\n      \"日K\",\n      {\n        name: \"UP_LINE\",\n      },\n      {\n        name: \"DOWN_LINE\",\n      },\n    ],\n    selectedMode: false,\n    textStyle: {\n      color: \"#fff\",\n    },\n  },\n  xAxis: {\n    type: \"category\",\n    data: [],\n    axisLine: {\n      lineStyle: {\n        color: \"#9c0000\",\n      },\n    },\n    boundaryGap: false,\n  },\n  yAxis: {\n    type: \"value\",\n    splitNumber: 3,\n    splitLine: {\n      lineStyle: {\n        color: \"#9c0000\",\n      },\n    },\n    axisLine: {\n      lineStyle: {\n        color: \"#9c0000\",\n      },\n    },\n    scale: true,\n    min: \"dataMin\",\n    max: \"dataMax\",\n  },\n  dataZoom: [\n    {\n      show: true,\n      type: \"slider\",\n      backgroundColor: \"#000\",\n      fillerColor: \"#212421\",\n      borderColor: \"#525152\",\n      handleIcon:\n        \"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z\",\n      handleSize: \"70%\",\n      textStyle: {\n        color: \"#94aede\",\n      },\n      throttle: 0,\n      start: 80,\n      end: 100,\n    },\n  ],\n  series: [\n    {\n      name: \"日K\",\n      type: \"candlestick\",\n      data: [],\n      itemStyle: {\n        normal: {\n          color: \"#000000\",\n          color0: \"#6be7ff\",\n          borderColor: \"#ff4142\",\n          borderColor0: \"#6be7ff\",\n        },\n      },\n      markLine: {\n        symbol: [\"none\", \"none\"],\n        label: {\n          normal: { show: false },\n          emphasis: { show: false },\n        },\n        lineStyle: {\n          normal: {\n            width: 3,\n            type: \"solid\",\n            color: \"#fff\",\n          },\n        },\n        animation: false,\n        data: [],\n      },\n    },\n    {\n      name: \"UP_LINE\",\n      type: \"line\",\n      lineStyle: { normal: { width: 1, color: \"#ff0\" } },\n      showSymbol: false,\n      data: [],\n    },\n    {\n      name: \"DOWN_LINE\",\n      type: \"line\",\n      lineStyle: { normal: { width: 1, color: \"#0f0\" } },\n      showSymbol: false,\n      data: [],\n    },\n  ],\n};\n\n// 使用刚指定的配置项和数据显示图表。\nmyChart.setOption(option);\n\n$.get(\n  \"/bar_data?strategy=\" +\n    getUrlParameter(\"strategy\") +\n    \"&inst_id=\" +\n    getUrlParameter(\"inst_id\"),\n  function (rst) {\n    myChart.setOption({\n      title: {\n        text: rst.title,\n      },\n      xAxis: {\n        data: rst.x,\n      },\n      series: [\n        {\n          name: \"日K\",\n          data: rst.k,\n          markLine: {\n            data: rst.trade,\n          },\n        },\n        {\n          name: \"UP_LINE\",\n          data: rst.up,\n        },\n        {\n          name: \"DOWN_LINE\",\n          data: rst.down,\n        },\n      ],\n    });\n  },\n);\n\n$(window).on(\"resize\", function () {\n  myChart.resize();\n});\n"
  },
  {
    "path": "dashboard/static/js/corr.js",
    "content": "// 基于准备好的dom，初始化echarts实例\nvar myChart = echarts.init(document.getElementById(\"main\"));\n\noption = {\n  tooltip: {\n    position: \"top\",\n  },\n  grid: {\n    top: \"8%\",\n    left: \"11%\",\n    right: \"1%\",\n    bottom: \"1%\",\n  },\n  xAxis: {\n    type: \"category\",\n    position: \"top\",\n    axisLabel: {\n      interval: 0,\n      rotate: -45,\n    },\n    data: [],\n  },\n  yAxis: {\n    type: \"category\",\n    axisLabel: { interval: 0 },\n    inverse: true,\n    data: [],\n  },\n  visualMap: {\n    type: \"piecewise\",\n    min: -1,\n    max: 1,\n    calculable: true,\n    precision: 0.01,\n    splitNumber: 8,\n    orient: \"vertical\",\n    left: \"right\",\n    bottom: \"19%\",\n    inRange: {\n      color: [\n        \"#313695\",\n        \"#4575b4\",\n        \"#74add1\",\n        \"#abd9e9\",\n        \"#e0f3f8\",\n        \"#ffffbf\",\n        \"#fee090\",\n        \"#fdae61\",\n        \"#f46d43\",\n        \"#d73027\",\n        \"#a50026\",\n      ],\n    },\n  },\n  series: [\n    {\n      name: \"相关性系数\",\n      type: \"heatmap\",\n      data: [],\n    },\n    {\n      name: \"投资组合评分\",\n      title: { offsetCenter: [0, \"20%\"] },\n      type: \"gauge\",\n      axisLine: {\n        lineStyle: {\n          color: [\n            [0.2, \"#be201f\"],\n            [0.4, \"#f99a27\"],\n            [0.6, \"#fade00\"],\n            [0.8, \"#8bc536\"],\n            [1, \"#009f47\"],\n          ],\n        },\n      },\n      splitLine: { show: false },\n      min: 0,\n      max: 100,\n      center: [\"75%\", \"31%\"],\n      radius: \"45%\",\n      data: [],\n    },\n  ],\n};\n\n// 使用刚指定的配置项和数据显示图表。\nmyChart.showLoading();\nmyChart.setOption(option);\n\nfunction load_chart() {\n  myChart.showLoading();\n  var $checked = $(\"input[type=checkbox]:checked\");\n  if ($checked.length == 0) {\n    return;\n  }\n  var ids = [];\n  $checked.each(function () {\n    ids.push($(this).val());\n  });\n  $.get(\n    \"/corr_data?strategy=\" +\n      getUrlParameter(\"strategy\") +\n      \"&year=\" +\n      getUrlParameter(\"year\") +\n      \"&insts=\" +\n      JSON.stringify(ids),\n    function (rst) {\n      myChart.hideLoading();\n      myChart.setOption({\n        xAxis: {\n          data: rst.index,\n        },\n        yAxis: {\n          data: rst.index,\n        },\n        series: [\n          {\n            name: \"相关性系数\",\n            data: rst.data,\n          },\n          {\n            name: \"投资组合评分\",\n            data: [{ value: rst.score, name: \"投资组合评分\" }],\n          },\n        ],\n      });\n    },\n  );\n}\n\n$(window).on(\"resize\", function () {\n  myChart.resize();\n});\n\n$(function () {\n  $(\".button-checkbox\").each(function () {\n    // Settings\n    var $widget = $(this),\n      $button = $widget.find(\"button\"),\n      $checkbox = $widget.find(\"input:checkbox\"),\n      color = $button.data(\"color\"),\n      settings = {\n        on: {\n          icon: \"glyphicon glyphicon-check\",\n        },\n        off: {\n          icon: \"glyphicon glyphicon-unchecked\",\n        },\n      };\n    // Event Handlers\n    $button.on(\"click\", function () {\n      $checkbox.prop(\"checked\", !$checkbox.is(\":checked\"));\n      var checks = $(\n        \"#div\" + $(this).data(\"sec\") + \" > span > input:checked\",\n      ).length;\n      $(\"#\" + $(this).data(\"sec\") + \" > b\").text(checks);\n      load_chart();\n      $checkbox.triggerHandler(\"change\");\n      updateDisplay();\n    });\n    $checkbox.on(\"change\", function () {\n      updateDisplay();\n    });\n    // Actions\n    function updateDisplay() {\n      var isChecked = $checkbox.is(\":checked\");\n      // Set the button's state\n      $button.data(\"state\", isChecked ? \"on\" : \"off\");\n      // Set the button's icon\n      $button\n        .find(\".state-icon\")\n        .removeClass()\n        .addClass(\"state-icon \" + settings[$button.data(\"state\")].icon);\n      // Update the button's color\n      if (isChecked) {\n        $button.removeClass(\"btn-default\").addClass(\"btn-\" + color + \" active\");\n      } else {\n        $button.removeClass(\"btn-\" + color + \" active\").addClass(\"btn-default\");\n      }\n    }\n    // Initialization\n    function init() {\n      updateDisplay();\n      // Inject the icon if applicable\n      if ($button.find(\".state-icon\").length == 0) {\n        $button.prepend(\n          '<i class=\"state-icon ' +\n            settings[$button.data(\"state\")].icon +\n            '\"></i>',\n        );\n      }\n    }\n    init();\n  });\n  load_chart();\n});\n"
  },
  {
    "path": "dashboard/static/js/global.js",
    "content": "var getUrlParameter = function getUrlParameter(sParam) {\r\n    var sPageURL = decodeURIComponent(window.location.search.substring(1)),\r\n        sURLVariables = sPageURL.split('&'),\r\n        sParameterName,\r\n        i;\r\n\r\n    for (i = 0; i < sURLVariables.length; i++) {\r\n        sParameterName = sURLVariables[i].split('=');\r\n\r\n        if (sParameterName[0] === sParam) {\r\n            return sParameterName[1] === undefined ? true : sParameterName[1];\r\n        }\r\n    }\r\n};\r\n"
  },
  {
    "path": "dashboard/static/js/nav.js",
    "content": "// 基于准备好的dom，初始化echarts实例\nvar myChart = echarts.init(document.getElementById(\"main\"));\n\n// 指定图表的配置项和数据\nvar option = {\n  title: {\n    text: \"操盘大哥v2.0\",\n  },\n  tooltip: {\n    trigger: \"axis\",\n  },\n  toolbox: {\n    feature: {\n      saveAsImage: {},\n    },\n  },\n  legend: {\n    data: [\"单位净值\"],\n  },\n  xAxis: {\n    type: \"time\",\n    splitLine: {\n      show: false,\n    },\n  },\n  yAxis: {\n    type: \"value\",\n    splitLine: {\n      show: false,\n    },\n    scale: true,\n    boundaryGap: [\"10%\", \"10%\"],\n  },\n  // dataZoom: [\n  //     {   // 这个dataZoom组件，默认控制x轴。\n  //         type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件\n  //         start: 50,      // 左边在 10% 的位置。\n  //         end: 100         // 右边在 60% 的位置。\n  //     }\n  // ],\n  series: [\n    {\n      name: \"单位净值\",\n      type: \"line\",\n      data: [],\n    },\n  ],\n};\n\n// 使用刚指定的配置项和数据显示图表。\nmyChart.setOption(option);\n\n$.get(\"/nav_data?strategy=\" + getUrlParameter(\"strategy\"), function (rst) {\n  myChart.setOption({\n    series: [\n      {\n        name: \"单位净值\",\n        data: rst,\n      },\n    ],\n  });\n});\n\n$(window).on(\"resize\", function () {\n  myChart.resize();\n});\n"
  },
  {
    "path": "dashboard/static/js/status.js",
    "content": "// 基于准备好的dom，初始化echarts实例\r\nvar secChart = echarts.init(document.getElementById(\"section\"));\r\nvar posChart = echarts.init(document.getElementById(\"position\"));\r\n\r\nsecChart.setOption({\r\n  title: {\r\n    text: \"持仓合约分类\",\r\n  },\r\n  tooltip: {\r\n    trigger: \"axis\",\r\n  },\r\n  legend: {\r\n    x: \"center\",\r\n    data: [\"持仓\"],\r\n  },\r\n  radar: [\r\n    {\r\n      indicator: [],\r\n    },\r\n  ],\r\n  series: [\r\n    {\r\n      type: \"radar\",\r\n      tooltip: {\r\n        trigger: \"item\",\r\n      },\r\n      itemStyle: { normal: { areaStyle: { type: \"default\" } } },\r\n      data: [\r\n        {\r\n          value: [],\r\n          name: \"持仓\",\r\n        },\r\n      ],\r\n    },\r\n  ],\r\n  color: [\"#2e78b9\"],\r\n});\r\n\r\nposChart.setOption({\r\n  title: {\r\n    text: \"持仓方向对比\",\r\n    x: \"center\",\r\n  },\r\n  color: [\r\n    \"#ab4340\",\r\n    \"#3a773a\",\r\n    \"#61a0a8\",\r\n    \"#d48265\",\r\n    \"#91c7ae\",\r\n    \"#749f83\",\r\n    \"#ca8622\",\r\n    \"#bda29a\",\r\n    \"#6e7074\",\r\n    \"#546570\",\r\n    \"#c4ccd3\",\r\n  ],\r\n  tooltip: {\r\n    trigger: \"item\",\r\n    formatter: \"{a} <br/>{b} : {c} ({d}%)\",\r\n  },\r\n  legend: {\r\n    orient: \"vertical\",\r\n    left: \"left\",\r\n    data: [\"多头持仓\", \"空头持仓\"],\r\n  },\r\n  series: [\r\n    {\r\n      name: \"持仓\",\r\n      type: \"pie\",\r\n      data: [],\r\n      label: {\r\n        normal: {\r\n          show: true,\r\n          position: \"inside\",\r\n          formatter: \"{c}\",\r\n        },\r\n      },\r\n      itemStyle: {\r\n        emphasis: {\r\n          shadowBlur: 10,\r\n          shadowOffsetX: 0,\r\n          shadowColor: \"rgba(0, 0, 0, 0.5)\",\r\n        },\r\n      },\r\n    },\r\n  ],\r\n});\r\n\r\n$.get(\"/status_data?strategy=\" + getUrlParameter(\"strategy\"), function (rst) {\r\n  var maxVal = Math.max.apply(null, rst.section) || 10;\r\n  secChart.setOption({\r\n    radar: [\r\n      {\r\n        indicator: rst.section_labels.map(function (label) {\r\n          return { text: label, max: maxVal };\r\n        }),\r\n      },\r\n    ],\r\n    series: [\r\n      {\r\n        data: [\r\n          {\r\n            value: rst.section,\r\n            name: \"持仓\",\r\n          },\r\n        ],\r\n      },\r\n    ],\r\n  });\r\n  posChart.setOption({\r\n    series: [\r\n      {\r\n        name: \"持仓\",\r\n        data: [\r\n          { value: rst.long, name: \"多头持仓\" },\r\n          { value: rst.short, name: \"空头持仓\" },\r\n        ],\r\n      },\r\n    ],\r\n  });\r\n});\r\n\r\n$(window).on(\"resize\", function () {\r\n  secChart.resize();\r\n});\r\n"
  },
  {
    "path": "dashboard/templates/global/base_site.html",
    "content": "{% load static %}\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"utf-8\">\r\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n    <meta name=\"author\" content=\"timercrack\">\r\n    <title>和弦基金</title>\r\n    <link rel=\"icon\" href=\"{% static 'image/favicon.ico' %}\">\r\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css\">\r\n    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/font-awesome@4.6.3/css/font-awesome.min.css\">\r\n    <link rel=\"stylesheet\" href=\"{% static \"css/global.css\" %}\">\r\n    {% block extracss %}{% endblock %}\r\n</head>\r\n<body>\r\n{% include 'global/top_navbar.html' %}\r\n<div class=\"container-fluid\" role=\"main\">\r\n    {% block content %}{% endblock %}\r\n    <footer class=\"modal-footer\">\r\n        <p>© 2016 V2.0 timercrack.me All Rights Reserved. timercrack 版权所有</p>\r\n    </footer>\r\n</div>\r\n<script src=\"https://cdn.jsdelivr.net/npm/jquery@3.1.0/dist/jquery.min.js\"></script>\r\n<script src=\"https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js\"></script>\r\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.3/echarts.min.js\"></script>\r\n<script src=\"{% static \"js/global.js\" %}\"></script>\r\n{% block extrajs %}{% endblock %}\r\n</body>\r\n</html>\r\n"
  },
  {
    "path": "dashboard/templates/global/paginator-mobile.html",
    "content": "{% load custom_tag %}\r\n{% if paginator %}\r\n    <div class=\"content-block\">\r\n        <p class=\"buttons-row\">\r\n            {% if page_obj.has_previous %}\r\n                <a class=\"button button-round\"\r\n                   href=\"?page={{ page_obj.previous_page_number }}{{ request | format_query_string }}\">上一页</a>\r\n            {% endif %}\r\n            {% if page_obj.has_next %}\r\n                <a class=\"button button-round\"\r\n                   href=\"?page={{ page_obj.next_page_number }}{{ request | format_query_string }}\">下一页</a>\r\n            {% endif %}\r\n        </p>\r\n    </div>\r\n{% endif %}"
  },
  {
    "path": "dashboard/templates/global/paginator.html",
    "content": "{% load custom_tag %}\r\n{% if paginator %}\r\n    <div class=\"container-fluid\" id=\"split-page\">\r\n        <div class=\"page_size\">\r\n            共<span>&nbsp;{{ paginator.count }}&nbsp;</span>条\r\n            <label for=\"page_size\">每页条数</label>\r\n            <select id=\"page_size\">\r\n                <option value=\"5\">5</option>\r\n                <option value=\"10\">10</option>\r\n                <option value=\"20\">20</option>\r\n                <option value=\"50\">50</option>\r\n            </select>\r\n        </div>\r\n        <ul class=\"pagination\" style=\"float: right\">\r\n            {% if page_obj.has_previous %}\r\n                <li><a href=\"?page={{ page_obj.previous_page_number }}{{ request | format_query_string }}\"\r\n                       aria-label=\"Previous\"><span\r\n                        aria-hidden=\"true\">&laquo;</span></a></li>\r\n            {% endif %}\r\n            {% for number in paginator.page_range %}\r\n                {% if paginator.num_pages <= 14 %}\r\n                    <li {% if number == page_obj.number %}class=\"active\"{% endif %}>\r\n                        <a href=\"?page={{ number }}{{ request | format_query_string }}\">{{ number }}</a>\r\n                    </li>\r\n                {% else %}\r\n                    {% if number|add:\"5\" > page_obj.number and number|add:\"-5\" < page_obj.number %}\r\n                        <li {% if number == page_obj.number %}class=\"active\"{% endif %}>\r\n                            <a href=\"?page={{ number }}{{ request | format_query_string }}\">{{ number }}</a>\r\n                        </li>\r\n                    {% elif number|add:\"5\" == page_obj.number or number|add:\"-5\" == page_obj.number %}\r\n                        <li class=\"disabled\">\r\n                            <a>...</a>\r\n                        </li>\r\n                    {% elif number <= 3 %}\r\n                        <li>\r\n                            <a href=\"?page={{ number }}{{ request | format_query_string }}\">{{ number }}</a>\r\n                        </li>\r\n                    {% elif number|add:\"3\" > paginator.num_pages %}\r\n                        <li>\r\n                            <a href=\"?page={{ number }}{{ request | format_query_string }}\">{{ number }}</a>\r\n                        </li>\r\n                    {% endif %}\r\n                {% endif %}\r\n            {% endfor %}\r\n            {% if page_obj.has_next %}\r\n                <li><a href=\"?page={{ page_obj.next_page_number }}{{ request | format_query_string }}\"\r\n                       aria-label=\"Next\"><span\r\n                        aria-hidden=\"true\">&raquo;</span></a></li>\r\n            {% endif %}\r\n        </ul>\r\n    </div>\r\n{% endif %}"
  },
  {
    "path": "dashboard/templates/global/top_navbar.html",
    "content": "{% load custom_tag %}\n<nav class=\"navbar navbar-default\">\n    <div class=\"container-fluid\">\n        <!-- Brand and toggle get grouped for better mobile display -->\n        <div class=\"navbar-header\">\n            <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\"\n                    data-target=\"#bs-example-navbar-collapse-1\" aria-expanded=\"false\">\n                <span class=\"sr-only\">Toggle navigation</span>\n                <span class=\"icon-bar\"></span>\n                <span class=\"icon-bar\"></span>\n                <span class=\"icon-bar\"></span>\n            </button>\n            <a class=\"navbar-brand\" href=\"#\">策略展示</a>\n        </div>\n        <!-- Collect the nav links, forms, and other content for toggling -->\n        <div class=\"collapse navbar-collapse\" id=\"bs-example-navbar-collapse-1\">\n            <ul class=\"nav navbar-nav\">\n                <li class=\"dropdown\">\n                    <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-haspopup=\"true\"\n                       aria-expanded=\"false\">{{ cur_stra.name }}<span class=\"caret\"></span></a>\n                    <ul class=\"dropdown-menu\">\n                        {% for stra in stra_list %}\n                            <li><a href=\"{{ request|change_strategy:stra.id }}\">{{ stra.name }}</a></li>\n                        {% endfor %}\n                    </ul>\n                </li>\n                {% url 'panel:status_view' as stat_url %}\n                {% url 'panel:performance_view' as perf_url %}\n                {% url 'panel:instrument_view' as inst_url %}\n                {% url 'panel:correlation_view' as corr_url %}\n                <li {% if stat_url in request.get_full_path %}class=\"active\"{% endif %}><a\n                        href=\"{{ stat_url }}?strategy={{ cur_stra.id }}\">状态监控</a></li>\n                <li {% if perf_url in request.get_full_path %}class=\"active\"{% endif %}><a\n                        href=\"{{ perf_url }}?strategy={{ cur_stra.id }}\">绩效分析</a></li>\n                <li {% if inst_url in request.get_full_path %}class=\"active\"{% endif %}><a\n                        href=\"{{ inst_url }}?strategy={{ cur_stra.id }}&inst_id=1\">合约分析</a></li>\n                <li {% if corr_url in request.get_full_path %}class=\"active\"{% endif %}><a\n                        href=\"{{ corr_url }}?strategy={{ cur_stra.id }}&year=3\">组合分析</a>\n                </li>\n                <li><a href=\"{% url 'admin:index' %}\">后台管理</a></li>\n            </ul>\n            <ul class=\"nav navbar-nav navbar-right\">\n                <li><a href=\"#\">欢迎:<strong>{{ user.get_full_name }}</strong></a></li>\n                <li><a href=\"{% url 'admin:logout' %}?next={% url 'admin:login' %}\">\n                    <span class=\"glyphicon glyphicon-log-out\"></span> 注销</a></li>\n            </ul>\n        </div>\n    </div>\n</nav>\n"
  },
  {
    "path": "dashboard/templates/panel/correlation.html",
    "content": "{% extends 'global/base_site.html' %}\n{% load static %}\n{% block extrajs %}\n    {{ block.super }}\n    <script src=\"{% static 'js/corr.js' %}\"></script>\n{% endblock %}\n{% block content %}\n    <div class=\"row\">\n        <div class=\"col-md-6\" id=\"main\" style=\"width: 600px;height:550px;\"></div>\n        <div class=\"col-md-6\">\n            {% for section, insts in inst_list %}\n                <div class=\"row\">\n                    <div class=\"panel panel-{% if section == '农牧' %}success{% elif section == '贵金属' %}warning{% elif section == '金融' %}danger{% elif section == '有色金属' %}info{% elif section == '新能源' %}info{% elif section == '黑色产业' %}default{% elif section == '能源' %}danger{% elif section == '化工' %}primary{% else %}primary{% endif %}\">\n                        <div class=\"panel-heading panel-heading-sm\">\n                            <h3 class=\"panel-title\" id=\"{{ section }}\">{{ section }} <b>{{ insts.count }}</b> / {{ insts.count }}</h3>\n                        </div>\n                        <div class=\"panel-body panel-body-sm\" id=\"div{{ section }}\">\n                            {% for inst in insts %}\n                                <span class=\"button-checkbox\">\n                                <button type=\"button\" class=\"btn\" data-sec=\"{{ section }}\" data-color=\"{% if section == '农牧' %}success{% elif section == '贵金属' %}warning{% elif section == '金融' %}danger{% elif section == '有色金属' %}info{% elif section == '新能源' %}info{% elif section == '黑色产业' %}default{% elif section == '能源' %}danger{% elif section == '化工' %}primary{% else %}primary{% endif %}\">{{ inst.name }}</button>\n                                <input type=\"checkbox\" class=\"hidden\" title=\"\" value=\"{{ inst.id }}\"\n                                       {% if inst.id in strategy_inst %}checked{% endif %}/>\n                            </span>\n                            {% endfor %}\n                        </div>\n                    </div>\n                </div>\n            {% endfor %}\n        </div>\n    </div>\n{% endblock %}\n"
  },
  {
    "path": "dashboard/templates/panel/instrument.html",
    "content": "{% extends 'global/base_site.html' %}\r\n{% load static %}\r\n{% block extrajs %}\r\n    {{ block.super }}\r\n    <script src=\"{% static 'js/bar.js' %}\"></script>\r\n{% endblock %}\r\n{% block content %}\r\n    <div class=\"row\">\r\n        {% for exchange, insts in inst_list.items %}\r\n            <div class=\"col-md-1\">\r\n                <div class=\"dropdown\">\r\n                    <button id=\"dLabel\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\"\r\n                            aria-expanded=\"false\">{{ exchange }}<span class=\"caret\"></span></button>\r\n                    <ul class=\"dropdown-menu\" aria-labelledby=\"dLabel\">\r\n                        {% for obj in insts %}\r\n                            <li><a href=\"{% url 'panel:instrument_view' %}?strategy={{ cur_stra.id }}&inst_id={{ obj.id }}\">{{ obj.name }}</a></li>\r\n                        {% endfor %}\r\n                    </ul>\r\n                </div>\r\n            </div>\r\n        {% endfor %}\r\n    </div>\r\n    <div class=\"row\">\r\n        <div class=\"col-md-12\" id=\"main\" style=\"width: 100%;height:500px;\"></div>\r\n    </div>\r\n{% endblock %}\r\n"
  },
  {
    "path": "dashboard/templates/panel/performance.html",
    "content": "{% extends 'global/base_site.html' %}\r\n{% load static %}\r\n{% block extrajs %}\r\n    {{ block.super }}\r\n    <script src=\"{% static 'js/nav.js' %}\"></script>\r\n{% endblock %}\r\n{% block content %}\r\n    <div id=\"main\" style=\"width: 100%;height:500px;\"></div>\r\n{% endblock %}\r\n"
  },
  {
    "path": "dashboard/templates/panel/status.html",
    "content": "{% extends 'global/base_site.html' %}\r\n{% load static %}\r\n{% load custom_tag %}\r\n{% block extrajs %}\r\n    {{ block.super }}\r\n    <script src=\"{% static 'js/status.js' %}\"></script>\r\n{% endblock %}\r\n{% block content %}\r\n    <div class=\"row\">\r\n        <div class=\"col-md-2\">\r\n            <div class=\"panel panel-info\">\r\n                <div class=\"panel-heading panel-heading-sm\">\r\n                    <h3 class=\"panel-title\">静态市值</h3>\r\n                </div>\r\n                <div class=\"panel-body panel-body-sm\">\r\n                    <span class=\"fa fa-rmb\">{{ pre_balance }}</span>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <div class=\"col-md-2\">\r\n            <div class=\"panel panel-primary\">\r\n                <div class=\"panel-heading panel-heading-sm\">\r\n                    <h3 class=\"panel-title\">动态市值</h3>\r\n                </div>\r\n                <div class=\"panel-body panel-body-sm\">\r\n                    <span class=\"fa fa-rmb\">{{ current }}</span>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        <div class=\"col-md-4\">\r\n            <div class=\"panel panel-{% if margin <= 50 %}success{% elif margin <= 75 %}warning{% else %}danger{% endif %}\">\r\n                <div class=\"panel-heading panel-heading-sm\">\r\n                    <h3 class=\"panel-title\">保证金占用</h3>\r\n                </div>\r\n                <div class=\"panel-body panel-body-sm\">\r\n                    <div class=\"progress\">\r\n                        <div class=\"progress-bar progress-bar-{% if margin <= 50 %}success{% elif margin <= 75 %}warning{% else %}danger{% endif %} progress-bar-striped\"\r\n                             role=\"progressbar\"\r\n                             aria-valuenow=\"{{ margin }}\" aria-valuemin=\"0\" aria-valuemax=\"100\"\r\n                             style=\"width: {{ margin }}%\">\r\n                            <span>{{ margin }}%</span>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div class=\"row\">\r\n        <div class=\"col-md-6\" id=\"section\" style=\"width: 600px;height:400px;\"></div>\r\n        <div class=\"col-md-6\" id=\"position\" style=\"width: 600px;height:400px;\"></div>\r\n    </div>\r\n    <div class=\"row table-responsive\">\r\n        <div class=\"col-md-12\">\r\n            <table class=\"table table-striped table-hover\">\r\n                <thead>\r\n                <tr>\r\n                    <th>合约</th>\r\n                    <th>代码</th>\r\n                    <th>夜盘</th>\r\n                    <th>方向</th>\r\n                    <th>数量</th>\r\n                    <th>持仓均价</th>\r\n                    <th>开仓日期</th>\r\n                    <th>持仓盈亏</th>\r\n                </tr>\r\n                </thead>\r\n                <tbody>\r\n                {% for sig in open_list %}\r\n                    <tr class=\"success\">\r\n                        <td>{{ sig.instrument }} <b>(开仓)</b></td>\r\n                        <td>{{ sig.code }}</td>\r\n                        <td>{% if sig.instrument.night_trade == 1 %}有{% endif %}</td>\r\n                        <td>{{ sig.get_type_display }}</td>\r\n                        <td>{{ sig.volume }}</td>\r\n                        <td>{{ sig.price|number }}</td>\r\n                        <td>{{ sig.trigger_time.date }}</td>\r\n                        <td>-</td>\r\n                    </tr>\r\n                {% endfor %}\r\n                {% for pos in pos_list %}\r\n                    <tr class=\"{% if pos.code in close_list %}danger{% elif pos.code in roll_list %}warning{% endif %}\">\r\n                        <td>{{ pos.instrument }}{% if pos.code in close_list %} <b>(平仓)</b>{% elif pos.code in roll_list %} <b>(换月)</b>{% endif %}</td>\r\n                        <td>{{ pos.code }}</td>\r\n                        <td>{% if pos.instrument.night_trade == 1 %}有{% endif %}</td>\r\n                        <td>{{ pos.direction }}</td>\r\n                        <td>{{ pos.shares }}</td>\r\n                        <td>{{ pos.avg_entry_price|number }}</td>\r\n                        <td>{{ pos.open_time.date }}</td>\r\n                        <td><span class=\"fa fa-rmb\"> {% if pos.profit == None %}0{% else %}{{ pos.profit|number }}{% endif %}</span></td>\r\n                    </tr>\r\n                {% endfor %}\r\n                </tbody>\r\n            </table>\r\n        </div>\r\n    </div>\r\n{% endblock %}\r\n"
  },
  {
    "path": "dashboard/urls.py",
    "content": "\"\"\"dashboard URL Configuration\r\n\r\nThe `urlpatterns` list routes URLs to views. For more information please see:\r\n    https://docs.djangoproject.com/en/1.10/topics/http/urls/\r\nExamples:\r\nFunction views\r\n    1. Add an import:  from my_app import views\r\n    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')\r\nClass-based views\r\n    1. Add an import:  from other_app.views import Home\r\n    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')\r\nIncluding another URLconf\r\n    1. Import the include() function: from django.conf.urls import url, include\r\n    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))\r\n\"\"\"\r\nfrom django.urls import include, re_path\r\nfrom django.contrib import admin\r\nfrom django.views.generic import RedirectView\r\n\r\nadmin.site.site_header = '操盘大哥v2.0-商品期货版'\r\n\r\nurlpatterns = [\r\n    re_path(r'^admin/', admin.site.urls),\r\n    re_path(r'^', include('panel.urls', namespace='panel')),\r\n    re_path(r'^$', RedirectView.as_view(url='/status?strategy=1'), name='go-to-status'),\r\n]\r\n"
  },
  {
    "path": "dashboard/wsgi.py",
    "content": "\"\"\"\r\nWSGI config for dashboard project.\r\n\r\nIt exposes the WSGI callable as a module-level variable named ``application``.\r\n\r\nFor more information on this file, see\r\nhttps://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/\r\n\"\"\"\r\n\r\nimport os\r\n\r\nfrom django.core.wsgi import get_wsgi_application\r\n\r\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"dashboard.settings\")\r\n\r\napplication = get_wsgi_application()\r\n"
  },
  {
    "path": "main.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nimport sys\nimport os\nimport re\nimport importlib\nimport pathlib\nimport django\nROOT = os.path.dirname(os.path.abspath(__file__))\nif ROOT not in sys.path:\n    sys.path.insert(0, ROOT)\nos.environ[\"DJANGO_SETTINGS_MODULE\"] = \"dashboard.settings\"\nos.environ[\"DJANGO_ALLOW_ASYNC_UNSAFE\"] = \"true\"\ndjango.setup()\nimport logging\nfrom logging import handlers\n\n_strategy_dir = pathlib.Path(ROOT) / 'strategy'\n_brother_re = re.compile(r'^brother(\\d+)\\.py$')\n_candidates: list[tuple[int, str]] = []\nfor f in _strategy_dir.iterdir():\n    m = _brother_re.match(f.name)\n    if m:\n        _candidates.append((int(m.group(1)), f.stem))\n_candidates.sort(reverse=True)\n\nTradeStrategy = None\n_strategy_name = None\nfor _ver, _mod_name in _candidates:\n    try:\n        _mod = importlib.import_module(f'strategy.{_mod_name}')\n        TradeStrategy = _mod.TradeStrategy\n        _strategy_name = getattr(TradeStrategy, '__doc__', '')\n        if '—' in _strategy_name:\n            _strategy_name = _strategy_name.split('—')[0].strip()\n        elif '-' in _strategy_name:\n            _strategy_name = _strategy_name.split('-')[0].strip()\n        break\n    except ImportError:\n        continue\n\nif TradeStrategy is None:\n    raise RuntimeError('未找到任何 strategy/brotherXXX.py 策略文件')\n\nfrom utils.read_config import config_file, app_dir, config\nfrom weixin_notifier import install_weixin_log_handler\n\n\nif __name__ == '__main__':\n    if not os.path.exists(app_dir.user_log_dir):\n        os.makedirs(app_dir.user_log_dir)\n    log_file = os.path.join(app_dir.user_log_dir, 'trader.log')\n    file_handler = handlers.RotatingFileHandler(log_file, encoding='utf-8', maxBytes=1024*1024, backupCount=1)\n    general_formatter = logging.Formatter(config.get('LOG', 'format'))\n    file_handler.setFormatter(general_formatter)\n    file_handler.setLevel(config.get('LOG', 'file_level', fallback='DEBUG'))\n    console_handler = logging.StreamHandler()\n    console_handler.setFormatter(general_formatter)\n    console_handler.setLevel('DEBUG')\n    logger = logging.getLogger()\n    logger.setLevel('DEBUG')\n    logger.addHandler(file_handler)\n    logger.addHandler(console_handler)\n    install_weixin_log_handler(logger)\n    logger = logging.getLogger(\"main\")\n    pid_path = os.path.join(app_dir.user_cache_dir, 'trader.pid')\n    if not os.path.exists(pid_path):\n        if not os.path.exists(app_dir.user_cache_dir):\n            os.makedirs(app_dir.user_cache_dir)\n    with open(pid_path, 'w') as pid_file:\n        pid_file.write(str(os.getpid()))\n    print('Big Brother is watching you!')\n    print('used config file:', config_file)\n    print('log stored in:', app_dir.user_log_dir)\n    print('pid file:', pid_path)\n    print('strategy:', _strategy_name)\n    TradeStrategy(name=_strategy_name).run()\n"
  },
  {
    "path": "manage.py",
    "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n    os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"dashboard.settings\")\n    from django.core.management import execute_from_command_line\n    execute_from_command_line(sys.argv)\n"
  },
  {
    "path": "native/ctp_bridge/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.31)\r\n\r\nif(POLICY CMP0091)\r\n    cmake_policy(SET CMP0091 NEW)\r\nendif()\r\n\r\nproject(ctp_bridge_native VERSION 0.1.0 LANGUAGES CXX)\r\n\r\nset(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL \"Export compile_commands.json\" FORCE)\r\n\r\noption(CTP_STRICT_LINK \"Fail configure when Thost native libs are missing\" OFF)\r\n\r\nfind_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)\r\n\r\nexecute_process(\r\n    COMMAND \"${Python3_EXECUTABLE}\" -m pybind11 --cmakedir\r\n    OUTPUT_VARIABLE _pybind11_cmake_dir\r\n    OUTPUT_STRIP_TRAILING_WHITESPACE\r\n    COMMAND_ERROR_IS_FATAL ANY\r\n)\r\nset(pybind11_DIR \"${_pybind11_cmake_dir}\" CACHE PATH \"pybind11 CMake config dir\")\r\nfind_package(pybind11 CONFIG REQUIRED)\r\n\r\npybind11_add_module(ctp_bridge_native src/py_module.cpp)\r\n\r\ntarget_compile_features(ctp_bridge_native PRIVATE cxx_std_23)\r\nset_target_properties(ctp_bridge_native PROPERTIES\r\n    CXX_EXTENSIONS OFF\r\n)\r\n\r\nif(MSVC)\r\n    target_compile_options(ctp_bridge_native PRIVATE /std:c++latest /utf-8 /bigobj /EHsc)\r\nendif()\r\n\r\nif(WIN32)\r\n    set(THOST_API_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/api/win\")\r\nelseif(UNIX)\r\n    set(THOST_API_DIR \"${CMAKE_CURRENT_SOURCE_DIR}/api/linux\")\r\nelse()\r\n    message(FATAL_ERROR \"Unsupported platform for Thost API\")\r\nendif()\r\n\r\ntarget_include_directories(ctp_bridge_native PRIVATE\r\n    \"$<BUILD_INTERFACE:${THOST_API_DIR}>\"\r\n)\r\n\r\nif(WIN32)\r\n    set(THOST_TRADER_LIB \"${THOST_API_DIR}/thosttraderapi_se.lib\")\r\n    set(THOST_MD_LIB \"${THOST_API_DIR}/thostmduserapi_se.lib\")\r\n    if(EXISTS \"${THOST_TRADER_LIB}\" AND EXISTS \"${THOST_MD_LIB}\")\r\n        target_link_libraries(ctp_bridge_native PRIVATE\r\n            \"${THOST_TRADER_LIB}\"\r\n            \"${THOST_MD_LIB}\"\r\n        )\r\n    elseif(CTP_STRICT_LINK)\r\n        message(FATAL_ERROR \"Thost .lib files not found under ${THOST_API_DIR}\")\r\n    else()\r\n        message(WARNING \"Thost .lib files not found under ${THOST_API_DIR}, build will use header-only skeleton.\")\r\n    endif()\r\nendif()\r\n\r\nif(UNIX)\r\n    set(THOST_TRADER_SO \"${THOST_API_DIR}/thosttraderapi_se.so\")\r\n    set(THOST_MD_SO \"${THOST_API_DIR}/thostmduserapi_se.so\")\r\n    if(EXISTS \"${THOST_TRADER_SO}\" AND EXISTS \"${THOST_MD_SO}\")\r\n        # 使用 -l:filename 兼容非 lib*.so 命名，并通过 target_link_libraries 保证库顺序正确\r\n        target_link_directories(ctp_bridge_native PRIVATE \"${THOST_API_DIR}\")\r\n        target_link_libraries(ctp_bridge_native PRIVATE\r\n            \"-l:thosttraderapi_se.so\"\r\n            \"-l:thostmduserapi_se.so\"\r\n        )\r\n        set_target_properties(ctp_bridge_native PROPERTIES\r\n            BUILD_RPATH \"${THOST_API_DIR}\"\r\n            INSTALL_RPATH \"$ORIGIN/native/ctp_bridge/api/linux;$ORIGIN\"\r\n        )\r\n    elseif(CTP_STRICT_LINK)\r\n        message(FATAL_ERROR \"Thost .so files not found under ${THOST_API_DIR}\")\r\n    else()\r\n        message(WARNING \"Thost .so files not found under ${THOST_API_DIR}, build will use header-only skeleton.\")\r\n    endif()\r\nendif()\r\n"
  },
  {
    "path": "native/ctp_bridge/CMakePresets.json",
    "content": "{\r\n  \"version\": 3,\r\n  \"configurePresets\": [\r\n    {\r\n      \"name\": \"win\",\r\n      \"displayName\": \"Windows (Ninja)\",\r\n      \"description\": \"Use Ninja + MSVC cl and generate compile_commands.json\",\r\n      \"generator\": \"Ninja\",\r\n      \"binaryDir\": \"${sourceDir}/build\",\r\n      \"cacheVariables\": {\r\n        \"CMAKE_BUILD_TYPE\": \"Release\",\r\n        \"CMAKE_EXPORT_COMPILE_COMMANDS\": \"ON\"\r\n      }\r\n    },\r\n    {\r\n      \"name\": \"linux\",\r\n      \"displayName\": \"Linux (Default Generator)\",\r\n      \"description\": \"Use system default generator and generate compile_commands.json\",\r\n      \"binaryDir\": \"${sourceDir}/build\",\r\n      \"cacheVariables\": {\r\n        \"CMAKE_BUILD_TYPE\": \"Release\",\r\n        \"CMAKE_EXPORT_COMPILE_COMMANDS\": \"ON\"\r\n      }\r\n    }\r\n  ],\r\n  \"buildPresets\": [\r\n    {\r\n      \"name\": \"win\",\r\n      \"configurePreset\": \"win\"\r\n    },\r\n    {\r\n      \"name\": \"linux\",\r\n      \"configurePreset\": \"linux\"\r\n    }\r\n  ]\r\n}\r\n"
  },
  {
    "path": "native/ctp_bridge/README.md",
    "content": "# ctp_bridge_native（简化说明）\r\n\r\n`ctp_bridge_native` 是 `trader` 的本地 C++ 扩展，用于通过 pybind11 直连 CTP Thost API。\r\n\r\n## 目录结构\r\n\r\n- `CMakeLists.txt`：构建入口\r\n- `src/py_module.cpp`：`CtpClient` 导出与回调桥接\r\n- `api/win`、`api/linux`：Thost 头文件与库\r\n\r\n## 构建\r\n\r\n在 `native/ctp_bridge` 目录下执行 CMake 构建。\r\n\r\n当前构建设置：\r\n\r\n- C++ 标准：`C++23`\r\n- Windows + MSVC：启用 `/std:c++latest` 与 `/utf-8`\r\n\r\n### Windows（MSVC）最小命令\r\n\r\n```powershell\r\ncd native/ctp_bridge\r\ncmake -S . -B build -G \"Visual Studio 17 2022\" -A x64\r\ncmake --build build --config Release\r\n```\r\n\r\n### Linux（GCC/Clang）最小命令\r\n\r\n```bash\r\ncd native/ctp_bridge\r\ncmake -S . -B build -DCMAKE_BUILD_TYPE=Release\r\ncmake --build build -j\r\n```\r\n\r\n### 动态库准备（按平台，必须）\r\n\r\n除了头文件，还需要把 CTP 动态库放到对应平台目录：\r\n\r\n- Linux：`native/ctp_bridge/api/linux/`\r\n  - `thosttraderapi_se.so`\r\n  - `thostmduserapi_se.so`\r\n  - `DataCollect.so` 或 `LinuxDataCollect.so`\r\n- Windows：`native/ctp_bridge/api/win/`\r\n  - 对应的 Trader/Md/DataCollect 运行库（通常为 `.dll`，并与 `.lib` 配套）\r\n\r\n> 注意：前两个交易/行情库用于编译与链接 Python 扩展模块；`DataCollect` 库为行情链路运行时自动调用依赖，也必须放在对应目录。\r\n\r\n编译成功后，通常模块输出在：\r\n\r\n- `native/ctp_bridge/build`\r\n\r\n## 配置\r\n\r\n在项目根目录 `config.yaml` 的 `ctp_native` 章节确保：\r\n\r\n- `gateway = pybind`\r\n- `module = ctp_bridge_native`\r\n- `module_path = <构建输出目录>`（例如 `native/ctp_bridge/build`）\r\n\r\n## 快速验证\r\n\r\n回到项目根目录执行：\r\n\r\n- `python test/test_ctp.py`\r\n\r\nLinux 建议先做一次依赖检查（确认模块已正确链接 Thost 动态库）：\r\n\r\n```bash\r\nldd ctp_bridge_native.cpython-314-x86_64-linux-gnu.so\r\n```\r\n\r\n输出中应能看到：\r\n\r\n- `thosttraderapi_se.so => .../native/ctp_bridge/api/linux/thosttraderapi_se.so`\r\n- `thostmduserapi_se.so => .../native/ctp_bridge/api/linux/thostmduserapi_se.so`\r\n\r\n按当前配置方案，只需在 `config.yaml` 里设置好 `ctp_native.module_path`，无需把扩展模块复制到项目根目录。\r\n\r\n若需要企业微信日志推送，请在 `config.yaml` 的 `weixin` 章节补齐 `CorpID`、`Secret`（以及可选 `AgentID`、`ToUser`）。\r\n当前 `trader` 已内置该推送能力，无需再单独运行 `flower`。\r\n\r\n可选环境变量：\r\n\r\n- `CTP_TEST_WARMUP_SECONDS`：登录预热秒数\r\n- `CTP_TEST_INSTRUMENT`：优先测试合约（若无效会自动回退）\r\n\r\n## 常见问题（Linux）\r\n\r\n- `ModuleNotFoundError: No module named 'ctp_bridge_native'`\r\n  - 原因：`ctp_native.module_path` 未指向构建目录。\r\n  - 处理：检查 `config.yaml` 中 `ctp_native.module_path` 是否正确。\r\n\r\n- `ImportError: undefined symbol: CThostFtdc...CreateFtdc...`\r\n  - 原因：模块未正确链接/加载 Thost 动态库。\r\n  - 处理：确认 `api/linux` 下两个 `thost*.so` 文件存在，重新执行 CMake 构建，并用 `ldd` 验证依赖是否解析成功。\r\n"
  },
  {
    "path": "native/ctp_bridge/api/linux/DataCollect.h",
    "content": "#ifndef DATA_COLLECT_H\r\n#define DATA_COLLECT_H\r\n\r\n#define DLL_EXPORT __declspec(dllexport)\r\n\r\n#if defined(IS_WINCOLLECT_LIB) && defined(WIN32)\r\n#ifdef LIB_DATA_COLLECT_API_EXPORT\r\n#define DATA_COLLECT_API_EXPORT __declspec(dllexport)\r\n#else\r\n#define DATA_COLLECT_API_EXPORT __declspec(dllimport)\r\n#endif\r\n#else\r\n#define DATA_COLLECT_API_EXPORT\r\n#endif\r\n\r\n/// 获取AES加密和RSA加密的终端信息 pSystemInfo的空间需要调用者自己分配\r\n/// 至少270个字节\r\n///  windows返回值定义\r\n/* 返回的int值 不为0 表示采集信息有误 具体哪个采集项有问题需要做如下判断\r\n从低位开始分别标示 终端信息 ->系统盘分区信息\r\n返回值 & （0x01 << 0） 不为0 表示终端类型未采集到\r\n返回值 & （0x01 << 1） 不为0 表示 信息采集时间获取异常\r\n返回值 & （0x01 << 2） 不为0 表示ip 获取失败\r\n（采集多个相同类型信息的场景有一个采集到 即表示采集成功） 返回值 & （0x01 << 3）\r\n不为0 表示mac 获取失败 返回值 & （0x01 << 4） 不为0 表示 设备名 获取失败 返回值\r\n& （0x01 << 5） 不为0 表示 操作系统版本 获取失败 返回值 & （0x01 << 6） 不为0\r\n表示 硬盘序列号 获取失败 返回值 & （0x01 << 7） 不为0 表示 CPU序列号 获取失败\r\n返回值 & （0x01 << 8） 不为0 表示 BIOS 获取失败\r\n返回值 & （0x01 << 9） 不为0 表示 系统盘分区信息 获取失败\r\n*/\r\n\r\n/// linux返回值定义\r\n/* 返回的int值 不为0 表示采集信息有误 具体哪个采集项有问题需要做如下判断\r\n从低位开始分别标示 终端信息 -> BIOS信息\r\n返回值 & （0x01 << 0） 不为0 表示终端类型未采集到\r\n返回值 & （0x01 << 1） 不为0 表示 信息采集时间获取异常\r\n返回值 & （0x01 << 2） 不为0 表示ip 获取失败\r\n（采集多个相同类型信息的场景有一个采集到 即表示采集成功） 返回值 & （0x01 << 3）\r\n不为0 表示mac 获取失败 返回值 & （0x01 << 4） 不为0 表示 设备名 获取失败 返回值\r\n& （0x01 << 5） 不为0 表示 操作系统版本 获取失败 返回值 & （0x01 << 6） 不为0\r\n表示 硬盘序列号 获取失败 返回值 & （0x01 << 7） 不为0 表示 CPU序列号 获取失败\r\n返回值 & （0x01 << 8） 不为0 表示 BIOS 获取失败\r\n*/\r\n\r\nDATA_COLLECT_API_EXPORT int CTP_GetSystemInfo(char *pSystemInfo, int &nLen);\r\n\r\n// 版本号格式\r\n// Sfit + 生产还是测试秘钥(pro/tst) + 秘钥版本 + 编译时间 + 版本(内部)\r\n\r\nDATA_COLLECT_API_EXPORT const char *CTP_GetDataCollectApiVersion(void);\r\n\r\n#endif\r\n"
  },
  {
    "path": "native/ctp_bridge/api/linux/ThostFtdcMdApi.h",
    "content": "/////////////////////////////////////////////////////////////////////////\n///@system 新一代交易所系统\n///@company 上海期货信息技术有限公司\n///@file ThostFtdcMdApi.h\n///@brief 定义了客户端接口\n///@history \n///20060106\t赵鸿昊\t\t创建该文件\n/////////////////////////////////////////////////////////////////////////\n\n#if !defined(THOST_FTDCMDAPI_H)\n#define THOST_FTDCMDAPI_H\n\n#if _MSC_VER > 1000\n#pragma once\n#endif // _MSC_VER > 1000\n\n#include \"ThostFtdcUserApiStruct.h\"\n\n#if defined(ISLIB) && defined(WIN32)\n#ifdef LIB_MD_API_EXPORT\n#define MD_API_EXPORT __declspec(dllexport)\n#else\n#define MD_API_EXPORT __declspec(dllimport)\n#endif\n#else\n#define MD_API_EXPORT \n#endif\n\nclass CThostFtdcMdSpi\n{\npublic:\n\t///当客户端与交易后台建立起通信连接时（还未登录前），该方法被调用。\n\tvirtual void OnFrontConnected(){};\n\t\n\t///当客户端与交易后台通信连接断开时，该方法被调用。当发生这个情况后，API会自动重新连接，客户端可不做处理。\n\t///@param nReason 错误原因\n\t///        0x1001 网络读失败\n\t///        0x1002 网络写失败\n\t///        0x2001 接收心跳超时\n\t///        0x2002 发送心跳失败\n\t///        0x2003 收到错误报文\n\tvirtual void OnFrontDisconnected(int nReason){};\n\t\t\n\t///心跳超时警告。当长时间未收到报文时，该方法被调用。\n\t///@param nTimeLapse 距离上次接收报文的时间\n\tvirtual void OnHeartBeatWarning(int nTimeLapse){};\n\t\n\n\t///登录请求响应\n\tvirtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///登出请求响应\n\tvirtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询组播合约响应\n\tvirtual void OnRspQryMulticastInstrument(CThostFtdcMulticastInstrumentField *pMulticastInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///错误应答\n\tvirtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///订阅行情应答\n\tvirtual void OnRspSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///取消订阅行情应答\n\tvirtual void OnRspUnSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///订阅询价应答\n\tvirtual void OnRspSubForQuoteRsp(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///取消订阅询价应答\n\tvirtual void OnRspUnSubForQuoteRsp(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///深度行情通知\n\tvirtual void OnRtnDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData) {};\n\n\t///询价通知\n\tvirtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) {};\n};\n\nclass MD_API_EXPORT CThostFtdcMdApi\n{\npublic:\n\t///创建MdApi\n\t///@param pszFlowPath 存贮订阅信息文件的目录，默认为当前目录\n\t///@param bIsProductionMode true:使用生产版本的API  false:使用测评版本API\n\t///@return 创建出的UserApi\n\t///modify for udp marketdata\n\tstatic CThostFtdcMdApi *CreateFtdcMdApi(const char *pszFlowPath = \"\", const bool bIsUsingUdp=false, const bool bIsMulticast=false, bool bIsProductionMode=true);\n\t\n\t///获取API的版本信息\n\t///@retrun 获取到的版本号\n\tstatic const char *GetApiVersion();\n\t\n\t///删除接口对象本身\n\t///@remark 不再使用本接口对象时,调用该函数删除接口对象\n\tvirtual void Release() = 0;\n\t\n\t///初始化\n\t///@remark 初始化运行环境,只有调用后,接口才开始工作\n\tvirtual void Init() = 0;\n\t\n\t///等待接口线程结束运行\n\t///@return 线程退出代码\n\tvirtual int Join() = 0;\n\t\n\t///获取当前交易日\n\t///@retrun 获取到的交易日\n\t///@remark 只有登录成功后,才能得到正确的交易日\n\tvirtual const char *GetTradingDay() = 0;\n\t\n\t///注册前置机网络地址\n\t///@param pszFrontAddress：前置机网络地址。\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:17001”。 \n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。\n\tvirtual void RegisterFront(char *pszFrontAddress) = 0;\n\t\n\t///注册名字服务器网络地址\n\t///@param pszNsAddress：名字服务器网络地址。\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:12001”。 \n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。\n\t///@remark RegisterNameServer优先于RegisterFront\n\tvirtual void RegisterNameServer(char *pszNsAddress) = 0;\n\t\n\t///注册名字服务器用户信息\n\t///@param pFensUserInfo：用户信息。\n\tvirtual void RegisterFensUserInfo(CThostFtdcFensUserInfoField * pFensUserInfo) = 0;\n\t\n\t///注册回调接口\n\t///@param pSpi 派生自回调接口类的实例\n\tvirtual void RegisterSpi(CThostFtdcMdSpi *pSpi) = 0;\n\t\n\t///订阅行情。\n\t///@param ppInstrumentID 合约ID  \n\t///@param nCount 要订阅/退订行情的合约个数\n\t///@remark \n\tvirtual int SubscribeMarketData(char *ppInstrumentID[], int nCount) = 0;\n\n\t///退订行情。\n\t///@param ppInstrumentID 合约ID  \n\t///@param nCount 要订阅/退订行情的合约个数\n\t///@remark \n\tvirtual int UnSubscribeMarketData(char *ppInstrumentID[], int nCount) = 0;\n\t\n\t///订阅询价。\n\t///@param ppInstrumentID 合约ID  \n\t///@param nCount 要订阅/退订行情的合约个数\n\t///@remark \n\tvirtual int SubscribeForQuoteRsp(char *ppInstrumentID[], int nCount) = 0;\n\n\t///退订询价。\n\t///@param ppInstrumentID 合约ID  \n\t///@param nCount 要订阅/退订行情的合约个数\n\t///@remark \n\tvirtual int UnSubscribeForQuoteRsp(char *ppInstrumentID[], int nCount) = 0;\n\n\t///用户登录请求\n\tvirtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID) = 0;\n\t\n\n\t///登出请求\n\tvirtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0;\n\n\t///请求查询组播合约\n\tvirtual int ReqQryMulticastInstrument(CThostFtdcQryMulticastInstrumentField *pQryMulticastInstrument, int nRequestID) = 0;\nprotected:\n\t~CThostFtdcMdApi(){};\n};\n\n#endif\n"
  },
  {
    "path": "native/ctp_bridge/api/linux/ThostFtdcTraderApi.h",
    "content": "/////////////////////////////////////////////////////////////////////////\n///@system 新一代交易所系统\n///@company 上海期货信息技术有限公司\n///@file ThostFtdcTraderApi.h\n///@brief 定义了客户端接口\n///@history \n///20060106\t赵鸿昊\t\t创建该文件\n/////////////////////////////////////////////////////////////////////////\n\n#if !defined(THOST_FTDCTRADERAPI_H)\n#define THOST_FTDCTRADERAPI_H\n\n#if _MSC_VER > 1000\n#pragma once\n#endif // _MSC_VER > 1000\n\n#include \"ThostFtdcUserApiStruct.h\"\n\n#if defined(ISLIB) && defined(WIN32)\n#ifdef LIB_TRADER_API_EXPORT\n#define TRADER_API_EXPORT __declspec(dllexport)\n#else\n#define TRADER_API_EXPORT __declspec(dllimport)\n#endif\n#else\n#define TRADER_API_EXPORT \n#endif\n\nclass CThostFtdcTraderSpi\n{\npublic:\n\t///当客户端与交易后台建立起通信连接时（还未登录前），该方法被调用。\n\tvirtual void OnFrontConnected(){};\n\t\n\t///当客户端与交易后台通信连接断开时，该方法被调用。当发生这个情况后，API会自动重新连接，客户端可不做处理。\n\t///@param nReason 错误原因\n\t///        0x1001 网络读失败\n\t///        0x1002 网络写失败\n\t///        0x2001 接收心跳超时\n\t///        0x2002 发送心跳失败\n\t///        0x2003 收到错误报文\n\tvirtual void OnFrontDisconnected(int nReason){};\n\t\t\n\t///心跳超时警告。当长时间未收到报文时，该方法被调用。\n\t///@param nTimeLapse 距离上次接收报文的时间\n\tvirtual void OnHeartBeatWarning(int nTimeLapse){};\n\t\n\t///客户端认证响应\n\tvirtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\t\n\n\t///登录请求响应\n\tvirtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///登出请求响应\n\tvirtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///用户口令更新请求响应\n\tvirtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///资金账户口令更新请求响应\n\tvirtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///查询用户当前支持的认证模式的回复\n\tvirtual void OnRspUserAuthMethod(CThostFtdcRspUserAuthMethodField *pRspUserAuthMethod, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///获取图形验证码请求的回复\n\tvirtual void OnRspGenUserCaptcha(CThostFtdcRspGenUserCaptchaField *pRspGenUserCaptcha, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///获取短信验证码请求的回复\n\tvirtual void OnRspGenUserText(CThostFtdcRspGenUserTextField *pRspGenUserText, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///报单录入请求响应\n\tvirtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///预埋单录入请求响应\n\tvirtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///预埋撤单录入请求响应\n\tvirtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///报单操作请求响应\n\tvirtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///查询最大报单数量响应\n\tvirtual void OnRspQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者结算结果确认响应\n\tvirtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///删除预埋单响应\n\tvirtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///删除预埋撤单响应\n\tvirtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///执行宣告录入请求响应\n\tvirtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///执行宣告操作请求响应\n\tvirtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///询价录入请求响应\n\tvirtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///报价录入请求响应\n\tvirtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///报价操作请求响应\n\tvirtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///批量报单操作请求响应\n\tvirtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///期权自对冲录入请求响应\n\tvirtual void OnRspOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///期权自对冲操作请求响应\n\tvirtual void OnRspOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///申请组合录入请求响应\n\tvirtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询报单响应\n\tvirtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询成交响应\n\tvirtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询投资者持仓响应\n\tvirtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询资金账户响应\n\tvirtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询投资者响应\n\tvirtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询交易编码响应\n\tvirtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询合约保证金率响应\n\tvirtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询合约手续费率响应\n\tvirtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询用户会话响应\n\tvirtual void OnRspQryUserSession(CThostFtdcUserSessionField *pUserSession, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询交易所响应\n\tvirtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询产品响应\n\tvirtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询合约响应\n\tvirtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询行情响应\n\tvirtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询交易员报盘机响应\n\tvirtual void OnRspQryTraderOffer(CThostFtdcTraderOfferField *pTraderOffer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询投资者结算结果响应\n\tvirtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询转帐银行响应\n\tvirtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询投资者持仓明细响应\n\tvirtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询客户通知响应\n\tvirtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询结算信息确认响应\n\tvirtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询投资者持仓明细响应\n\tvirtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///查询保证金监管系统经纪公司资金账户密钥响应\n\tvirtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询仓单折抵信息响应\n\tvirtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询投资者品种/跨品种保证金响应\n\tvirtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询交易所保证金率响应\n\tvirtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询交易所调整保证金率响应\n\tvirtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询汇率响应\n\tvirtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询二级代理操作员银期权限响应\n\tvirtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询产品报价汇率\n\tvirtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询产品组\n\tvirtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询做市商合约手续费率响应\n\tvirtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询做市商期权合约手续费响应\n\tvirtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询报单手续费响应\n\tvirtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询资金账户响应\n\tvirtual void OnRspQrySecAgentTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询二级代理商资金校验模式响应\n\tvirtual void OnRspQrySecAgentCheckMode(CThostFtdcSecAgentCheckModeField *pSecAgentCheckMode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询二级代理商信息响应\n\tvirtual void OnRspQrySecAgentTradeInfo(CThostFtdcSecAgentTradeInfoField *pSecAgentTradeInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询期权交易成本响应\n\tvirtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询期权合约手续费响应\n\tvirtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询执行宣告响应\n\tvirtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询询价响应\n\tvirtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询报价响应\n\tvirtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询期权自对冲响应\n\tvirtual void OnRspQryOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询投资单元响应\n\tvirtual void OnRspQryInvestUnit(CThostFtdcInvestUnitField *pInvestUnit, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询组合合约安全系数响应\n\tvirtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询申请组合响应\n\tvirtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询转帐流水响应\n\tvirtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询银期签约关系响应\n\tvirtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///错误应答\n\tvirtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///报单通知\n\tvirtual void OnRtnOrder(CThostFtdcOrderField *pOrder) {};\n\n\t///成交通知\n\tvirtual void OnRtnTrade(CThostFtdcTradeField *pTrade) {};\n\n\t///报单录入错误回报\n\tvirtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///报单操作错误回报\n\tvirtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///合约交易状态通知\n\tvirtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) {};\n\n\t///交易所公告通知\n\tvirtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin) {};\n\n\t///交易通知\n\tvirtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) {};\n\n\t///提示条件单校验错误\n\tvirtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) {};\n\n\t///执行宣告通知\n\tvirtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder) {};\n\n\t///执行宣告录入错误回报\n\tvirtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///执行宣告操作错误回报\n\tvirtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///询价录入错误回报\n\tvirtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///报价通知\n\tvirtual void OnRtnQuote(CThostFtdcQuoteField *pQuote) {};\n\n\t///报价录入错误回报\n\tvirtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///报价操作错误回报\n\tvirtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///询价通知\n\tvirtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) {};\n\n\t///保证金监控中心用户令牌\n\tvirtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken) {};\n\n\t///批量报单操作错误回报\n\tvirtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///期权自对冲通知\n\tvirtual void OnRtnOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose) {};\n\n\t///期权自对冲录入错误回报\n\tvirtual void OnErrRtnOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///期权自对冲操作错误回报\n\tvirtual void OnErrRtnOptionSelfCloseAction(CThostFtdcOptionSelfCloseActionField *pOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///申请组合通知\n\tvirtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction) {};\n\n\t///申请组合录入错误回报\n\tvirtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///请求查询签约银行响应\n\tvirtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询预埋单响应\n\tvirtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询预埋撤单响应\n\tvirtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询交易通知响应\n\tvirtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询经纪公司交易参数响应\n\tvirtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询经纪公司交易算法响应\n\tvirtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求查询监控中心用户令牌\n\tvirtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///银行发起银行资金转期货通知\n\tvirtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) {};\n\n\t///银行发起期货资金转银行通知\n\tvirtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) {};\n\n\t///银行发起冲正银行转期货通知\n\tvirtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) {};\n\n\t///银行发起冲正期货转银行通知\n\tvirtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) {};\n\n\t///期货发起银行资金转期货通知\n\tvirtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) {};\n\n\t///期货发起期货资金转银行通知\n\tvirtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) {};\n\n\t///系统运行时期货端手工发起冲正银行转期货请求，银行处理完毕后报盘发回的通知\n\tvirtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {};\n\n\t///系统运行时期货端手工发起冲正期货转银行请求，银行处理完毕后报盘发回的通知\n\tvirtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {};\n\n\t///期货发起查询银行余额通知\n\tvirtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) {};\n\n\t///期货发起银行资金转期货错误回报\n\tvirtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///期货发起期货资金转银行错误回报\n\tvirtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///系统运行时期货端手工发起冲正银行转期货错误回报\n\tvirtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///系统运行时期货端手工发起冲正期货转银行错误回报\n\tvirtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///期货发起查询银行余额错误回报\n\tvirtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///期货发起冲正银行转期货请求，银行处理完毕后报盘发回的通知\n\tvirtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) {};\n\n\t///期货发起冲正期货转银行请求，银行处理完毕后报盘发回的通知\n\tvirtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) {};\n\n\t///期货发起银行资金转期货应答\n\tvirtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///期货发起期货资金转银行应答\n\tvirtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///期货发起查询银行余额应答\n\tvirtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///银行发起银期开户通知\n\tvirtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) {};\n\n\t///银行发起银期销户通知\n\tvirtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) {};\n\n\t///银行发起变更银行账号通知\n\tvirtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) {};\n\n\t///请求查询分类合约响应\n\tvirtual void OnRspQryClassifiedInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///请求组合优惠比例响应\n\tvirtual void OnRspQryCombPromotionParam(CThostFtdcCombPromotionParamField *pCombPromotionParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者风险结算持仓查询响应\n\tvirtual void OnRspQryRiskSettleInvstPosition(CThostFtdcRiskSettleInvstPositionField *pRiskSettleInvstPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///风险结算产品查询响应\n\tvirtual void OnRspQryRiskSettleProductStatus(CThostFtdcRiskSettleProductStatusField *pRiskSettleProductStatus, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPBM期货合约参数查询响应\n\tvirtual void OnRspQrySPBMFutureParameter(CThostFtdcSPBMFutureParameterField *pSPBMFutureParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPBM期权合约参数查询响应\n\tvirtual void OnRspQrySPBMOptionParameter(CThostFtdcSPBMOptionParameterField *pSPBMOptionParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPBM品种内对锁仓折扣参数查询响应\n\tvirtual void OnRspQrySPBMIntraParameter(CThostFtdcSPBMIntraParameterField *pSPBMIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPBM跨品种抵扣参数查询响应\n\tvirtual void OnRspQrySPBMInterParameter(CThostFtdcSPBMInterParameterField *pSPBMInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPBM组合保证金套餐查询响应\n\tvirtual void OnRspQrySPBMPortfDefinition(CThostFtdcSPBMPortfDefinitionField *pSPBMPortfDefinition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者SPBM套餐选择查询响应\n\tvirtual void OnRspQrySPBMInvestorPortfDef(CThostFtdcSPBMInvestorPortfDefField *pSPBMInvestorPortfDef, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者新型组合保证金系数查询响应\n\tvirtual void OnRspQryInvestorPortfMarginRatio(CThostFtdcInvestorPortfMarginRatioField *pInvestorPortfMarginRatio, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者产品SPBM明细查询响应\n\tvirtual void OnRspQryInvestorProdSPBMDetail(CThostFtdcInvestorProdSPBMDetailField *pInvestorProdSPBMDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者商品组SPMM记录查询响应\n\tvirtual void OnRspQryInvestorCommoditySPMMMargin(CThostFtdcInvestorCommoditySPMMMarginField *pInvestorCommoditySPMMMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者商品群SPMM记录查询响应\n\tvirtual void OnRspQryInvestorCommodityGroupSPMMMargin(CThostFtdcInvestorCommodityGroupSPMMMarginField *pInvestorCommodityGroupSPMMMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPMM合约参数查询响应\n\tvirtual void OnRspQrySPMMInstParam(CThostFtdcSPMMInstParamField *pSPMMInstParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPMM产品参数查询响应\n\tvirtual void OnRspQrySPMMProductParam(CThostFtdcSPMMProductParamField *pSPMMProductParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///SPBM附加跨品种抵扣参数查询响应\n\tvirtual void OnRspQrySPBMAddOnInterParameter(CThostFtdcSPBMAddOnInterParameterField *pSPBMAddOnInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RCAMS产品组合信息查询响应\n\tvirtual void OnRspQryRCAMSCombProductInfo(CThostFtdcRCAMSCombProductInfoField *pRCAMSCombProductInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RCAMS同合约风险对冲参数查询响应\n\tvirtual void OnRspQryRCAMSInstrParameter(CThostFtdcRCAMSInstrParameterField *pRCAMSInstrParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RCAMS品种内风险对冲参数查询响应\n\tvirtual void OnRspQryRCAMSIntraParameter(CThostFtdcRCAMSIntraParameterField *pRCAMSIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RCAMS跨品种风险折抵参数查询响应\n\tvirtual void OnRspQryRCAMSInterParameter(CThostFtdcRCAMSInterParameterField *pRCAMSInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RCAMS空头期权风险调整参数查询响应\n\tvirtual void OnRspQryRCAMSShortOptAdjustParam(CThostFtdcRCAMSShortOptAdjustParamField *pRCAMSShortOptAdjustParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RCAMS策略组合持仓查询响应\n\tvirtual void OnRspQryRCAMSInvestorCombPosition(CThostFtdcRCAMSInvestorCombPositionField *pRCAMSInvestorCombPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者品种RCAMS保证金查询响应\n\tvirtual void OnRspQryInvestorProdRCAMSMargin(CThostFtdcInvestorProdRCAMSMarginField *pInvestorProdRCAMSMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RULE合约保证金参数查询响应\n\tvirtual void OnRspQryRULEInstrParameter(CThostFtdcRULEInstrParameterField *pRULEInstrParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RULE品种内对锁仓折扣参数查询响应\n\tvirtual void OnRspQryRULEIntraParameter(CThostFtdcRULEIntraParameterField *pRULEIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///RULE跨品种抵扣参数查询响应\n\tvirtual void OnRspQryRULEInterParameter(CThostFtdcRULEInterParameterField *pRULEInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者产品RULE保证金查询响应\n\tvirtual void OnRspQryInvestorProdRULEMargin(CThostFtdcInvestorProdRULEMarginField *pInvestorProdRULEMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者新型组合保证金开关查询响应\n\tvirtual void OnRspQryInvestorPortfSetting(CThostFtdcInvestorPortfSettingField *pInvestorPortfSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///投资者申报费阶梯收取记录查询响应\n\tvirtual void OnRspQryInvestorInfoCommRec(CThostFtdcInvestorInfoCommRecField *pInvestorInfoCommRec, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///组合腿信息查询响应\n\tvirtual void OnRspQryCombLeg(CThostFtdcCombLegField *pCombLeg, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///对冲设置请求响应\n\tvirtual void OnRspOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///对冲设置撤销请求响应\n\tvirtual void OnRspCancelOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n\n\t///对冲设置通知\n\tvirtual void OnRtnOffsetSetting(CThostFtdcOffsetSettingField *pOffsetSetting) {};\n\n\t///对冲设置错误回报\n\tvirtual void OnErrRtnOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///对冲设置撤销错误回报\n\tvirtual void OnErrRtnCancelOffsetSetting(CThostFtdcCancelOffsetSettingField *pCancelOffsetSetting, CThostFtdcRspInfoField *pRspInfo) {};\n\n\t///投资者对冲设置查询响应\n\tvirtual void OnRspQryOffsetSetting(CThostFtdcOffsetSettingField *pOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\n};\n\nclass TRADER_API_EXPORT CThostFtdcTraderApi\n{\npublic:\n\t///创建TraderApi\n\t///@param pszFlowPath 存贮订阅信息文件的目录，默认为当前目录\n\t///@param bIsProductionMode true:使用生产版本的API  false:使用测评版本的API\n\t///@return 创建出的UserApi\n\tstatic CThostFtdcTraderApi *CreateFtdcTraderApi(const char *pszFlowPath = \"\", bool bIsProductionMode = true);\n\t\n\t///获取API的版本信息\n\t///@retrun 获取到的版本号\n\tstatic const char *GetApiVersion();\n\t\n\t///删除接口对象本身\n\t///@remark 不再使用本接口对象时,调用该函数删除接口对象\n\tvirtual void Release() = 0;\n\t\n\t///初始化\n\t///@remark 初始化运行环境,只有调用后,接口才开始工作\n\tvirtual void Init() = 0;\n\t\n\t///等待接口线程结束运行\n\t///@return 线程退出代码\n\tvirtual int Join() = 0;\n\t\n\t///获取当前交易日\n\t///@retrun 获取到的交易日\n\t///@remark 只有登录成功后,才能得到正确的交易日\n\tvirtual const char *GetTradingDay() = 0;\n\t\n\t///获取已连接的前置的信息\n\t/// @param pFrontInfo：输入输出参数，用于存储获取到的前置信息，不能为空\n\t/// @remark 连接成功后，可获取正确的前置地址信息\n\t/// @remark 登录成功后，可获取正确的前置流控信息\n\tvirtual void GetFrontInfo(CThostFtdcFrontInfoField* pFrontInfo) =0;\n\t\n\t///注册前置机网络地址\n\t///@param pszFrontAddress：前置机网络地址。\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:17001”。 \n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。\n\tvirtual void RegisterFront(char *pszFrontAddress) = 0;\n\t\n\t///注册名字服务器网络地址\n\t///@param pszNsAddress：名字服务器网络地址。\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:12001”。 \n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。\n\t///@remark RegisterNameServer优先于RegisterFront\n\tvirtual void RegisterNameServer(char *pszNsAddress) = 0;\n\t\n\t///注册名字服务器用户信息\n\t///@param pFensUserInfo：用户信息。\n\tvirtual void RegisterFensUserInfo(CThostFtdcFensUserInfoField * pFensUserInfo) = 0;\n\t\n\t///注册回调接口\n\t///@param pSpi 派生自回调接口类的实例\n\tvirtual void RegisterSpi(CThostFtdcTraderSpi *pSpi) = 0;\n\t\n\t///订阅私有流。\n\t///@param nResumeType 私有流重传方式  \n\t///        THOST_TERT_RESTART:从本交易日开始重传\n\t///        THOST_TERT_RESUME:从上次收到的续传\n\t///        THOST_TERT_QUICK:只传送登录后私有流的内容\n\t///@remark 该方法要在Init方法前调用。若不调用则不会收到私有流的数据。\n\tvirtual void SubscribePrivateTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;\n\t\n\t///订阅公共流。\n\t///@param nResumeType 公共流重传方式  \n\t///        THOST_TERT_RESTART:从本交易日开始重传\n\t///        THOST_TERT_RESUME:从上次收到的续传\n\t///        THOST_TERT_QUICK:只传送登录后公共流的内容\n\t///        THOST_TERT_NONE:取消订阅公共流\n\t///@remark 该方法要在Init方法前调用。若不调用则不会收到公共流的数据。\n\tvirtual void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;\n\n\t///客户端认证请求\n\tvirtual int ReqAuthenticate(CThostFtdcReqAuthenticateField *pReqAuthenticateField, int nRequestID) = 0;\n\n\t///注册用户终端信息，用于中继服务器多连接模式\n\t///需要在终端认证成功后，用户登录前调用该接口\n\tvirtual int RegisterUserSystemInfo(CThostFtdcUserSystemInfoField *pUserSystemInfo) = 0;\n\n\t///上报用户终端信息，用于中继服务器操作员登录模式\n\t///操作员登录后，可以多次调用该接口上报客户信息\n\tvirtual int SubmitUserSystemInfo(CThostFtdcUserSystemInfoField *pUserSystemInfo) = 0;\n\t///注册用户终端信息，用于中继服务器多连接模式.用于微信小程序等应用上报信息.\n\tvirtual int RegisterWechatUserSystemInfo(CThostFtdcWechatUserSystemInfoField *pUserSystemInfo) = 0;\n\t///上报用户终端信息，用于中继服务器操作员登录模式.用于微信小程序等应用上报信息.\n\tvirtual int SubmitWechatUserSystemInfo(CThostFtdcWechatUserSystemInfoField *pUserSystemInfo) = 0;\n\n\t///用户登录请求\n\tvirtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID) = 0;\n\n\t///登出请求\n\tvirtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0;\n\n\t///用户口令更新请求\n\tvirtual int ReqUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, int nRequestID) = 0;\n\n\t///资金账户口令更新请求\n\tvirtual int ReqTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, int nRequestID) = 0;\n\n\t///查询用户当前支持的认证模式\n\tvirtual int ReqUserAuthMethod(CThostFtdcReqUserAuthMethodField *pReqUserAuthMethod, int nRequestID) = 0;\n\n\t///用户发出获取图形验证码请求\n\tvirtual int ReqGenUserCaptcha(CThostFtdcReqGenUserCaptchaField *pReqGenUserCaptcha, int nRequestID) = 0;\n\n\t///用户发出获取短信验证码请求\n\tvirtual int ReqGenUserText(CThostFtdcReqGenUserTextField *pReqGenUserText, int nRequestID) = 0;\n\n\t///用户发出带有图片验证码的登陆请求\n\tvirtual int ReqUserLoginWithCaptcha(CThostFtdcReqUserLoginWithCaptchaField *pReqUserLoginWithCaptcha, int nRequestID) = 0;\n\n\t///用户发出带有短信验证码的登陆请求\n\tvirtual int ReqUserLoginWithText(CThostFtdcReqUserLoginWithTextField *pReqUserLoginWithText, int nRequestID) = 0;\n\n\t///用户发出带有动态口令的登陆请求\n\tvirtual int ReqUserLoginWithOTP(CThostFtdcReqUserLoginWithOTPField *pReqUserLoginWithOTP, int nRequestID) = 0;\n\n\t///报单录入请求\n\tvirtual int ReqOrderInsert(CThostFtdcInputOrderField *pInputOrder, int nRequestID) = 0;\n\n\t///预埋单录入请求\n\tvirtual int ReqParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, int nRequestID) = 0;\n\n\t///预埋撤单录入请求\n\tvirtual int ReqParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, int nRequestID) = 0;\n\n\t///报单操作请求\n\tvirtual int ReqOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, int nRequestID) = 0;\n\n\t///查询最大报单数量请求\n\tvirtual int ReqQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, int nRequestID) = 0;\n\n\t///投资者结算结果确认\n\tvirtual int ReqSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, int nRequestID) = 0;\n\n\t///请求删除预埋单\n\tvirtual int ReqRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, int nRequestID) = 0;\n\n\t///请求删除预埋撤单\n\tvirtual int ReqRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, int nRequestID) = 0;\n\n\t///执行宣告录入请求\n\tvirtual int ReqExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, int nRequestID) = 0;\n\n\t///执行宣告操作请求\n\tvirtual int ReqExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, int nRequestID) = 0;\n\n\t///询价录入请求\n\tvirtual int ReqForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, int nRequestID) = 0;\n\n\t///报价录入请求\n\tvirtual int ReqQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, int nRequestID) = 0;\n\n\t///报价操作请求\n\tvirtual int ReqQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, int nRequestID) = 0;\n\n\t///批量报单操作请求\n\tvirtual int ReqBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, int nRequestID) = 0;\n\n\t///期权自对冲录入请求\n\tvirtual int ReqOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, int nRequestID) = 0;\n\n\t///期权自对冲操作请求\n\tvirtual int ReqOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, int nRequestID) = 0;\n\n\t///申请组合录入请求\n\tvirtual int ReqCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, int nRequestID) = 0;\n\n\t///请求查询报单\n\tvirtual int ReqQryOrder(CThostFtdcQryOrderField *pQryOrder, int nRequestID) = 0;\n\n\t///请求查询成交\n\tvirtual int ReqQryTrade(CThostFtdcQryTradeField *pQryTrade, int nRequestID) = 0;\n\n\t///请求查询投资者持仓\n\tvirtual int ReqQryInvestorPosition(CThostFtdcQryInvestorPositionField *pQryInvestorPosition, int nRequestID) = 0;\n\n\t///请求查询资金账户\n\tvirtual int ReqQryTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0;\n\n\t///请求查询投资者\n\tvirtual int ReqQryInvestor(CThostFtdcQryInvestorField *pQryInvestor, int nRequestID) = 0;\n\n\t///请求查询交易编码\n\tvirtual int ReqQryTradingCode(CThostFtdcQryTradingCodeField *pQryTradingCode, int nRequestID) = 0;\n\n\t///请求查询合约保证金率\n\tvirtual int ReqQryInstrumentMarginRate(CThostFtdcQryInstrumentMarginRateField *pQryInstrumentMarginRate, int nRequestID) = 0;\n\n\t///请求查询合约手续费率\n\tvirtual int ReqQryInstrumentCommissionRate(CThostFtdcQryInstrumentCommissionRateField *pQryInstrumentCommissionRate, int nRequestID) = 0;\n\n\t///请求查询用户会话\n\tvirtual int ReqQryUserSession(CThostFtdcQryUserSessionField *pQryUserSession, int nRequestID) = 0;\n\n\t///请求查询交易所\n\tvirtual int ReqQryExchange(CThostFtdcQryExchangeField *pQryExchange, int nRequestID) = 0;\n\n\t///请求查询产品\n\tvirtual int ReqQryProduct(CThostFtdcQryProductField *pQryProduct, int nRequestID) = 0;\n\n\t///请求查询合约\n\tvirtual int ReqQryInstrument(CThostFtdcQryInstrumentField *pQryInstrument, int nRequestID) = 0;\n\n\t///请求查询行情\n\tvirtual int ReqQryDepthMarketData(CThostFtdcQryDepthMarketDataField *pQryDepthMarketData, int nRequestID) = 0;\n\n\t///请求查询交易员报盘机\n\tvirtual int ReqQryTraderOffer(CThostFtdcQryTraderOfferField *pQryTraderOffer, int nRequestID) = 0;\n\n\t///请求查询投资者结算结果\n\tvirtual int ReqQrySettlementInfo(CThostFtdcQrySettlementInfoField *pQrySettlementInfo, int nRequestID) = 0;\n\n\t///请求查询转帐银行\n\tvirtual int ReqQryTransferBank(CThostFtdcQryTransferBankField *pQryTransferBank, int nRequestID) = 0;\n\n\t///请求查询投资者持仓明细\n\tvirtual int ReqQryInvestorPositionDetail(CThostFtdcQryInvestorPositionDetailField *pQryInvestorPositionDetail, int nRequestID) = 0;\n\n\t///请求查询客户通知\n\tvirtual int ReqQryNotice(CThostFtdcQryNoticeField *pQryNotice, int nRequestID) = 0;\n\n\t///请求查询结算信息确认\n\tvirtual int ReqQrySettlementInfoConfirm(CThostFtdcQrySettlementInfoConfirmField *pQrySettlementInfoConfirm, int nRequestID) = 0;\n\n\t///请求查询投资者持仓明细\n\tvirtual int ReqQryInvestorPositionCombineDetail(CThostFtdcQryInvestorPositionCombineDetailField *pQryInvestorPositionCombineDetail, int nRequestID) = 0;\n\n\t///请求查询保证金监管系统经纪公司资金账户密钥\n\tvirtual int ReqQryCFMMCTradingAccountKey(CThostFtdcQryCFMMCTradingAccountKeyField *pQryCFMMCTradingAccountKey, int nRequestID) = 0;\n\n\t///请求查询仓单折抵信息\n\tvirtual int ReqQryEWarrantOffset(CThostFtdcQryEWarrantOffsetField *pQryEWarrantOffset, int nRequestID) = 0;\n\n\t///请求查询投资者品种/跨品种保证金\n\tvirtual int ReqQryInvestorProductGroupMargin(CThostFtdcQryInvestorProductGroupMarginField *pQryInvestorProductGroupMargin, int nRequestID) = 0;\n\n\t///请求查询交易所保证金率\n\tvirtual int ReqQryExchangeMarginRate(CThostFtdcQryExchangeMarginRateField *pQryExchangeMarginRate, int nRequestID) = 0;\n\n\t///请求查询交易所调整保证金率\n\tvirtual int ReqQryExchangeMarginRateAdjust(CThostFtdcQryExchangeMarginRateAdjustField *pQryExchangeMarginRateAdjust, int nRequestID) = 0;\n\n\t///请求查询汇率\n\tvirtual int ReqQryExchangeRate(CThostFtdcQryExchangeRateField *pQryExchangeRate, int nRequestID) = 0;\n\n\t///请求查询二级代理操作员银期权限\n\tvirtual int ReqQrySecAgentACIDMap(CThostFtdcQrySecAgentACIDMapField *pQrySecAgentACIDMap, int nRequestID) = 0;\n\n\t///请求查询产品报价汇率\n\tvirtual int ReqQryProductExchRate(CThostFtdcQryProductExchRateField *pQryProductExchRate, int nRequestID) = 0;\n\n\t///请求查询产品组\n\tvirtual int ReqQryProductGroup(CThostFtdcQryProductGroupField *pQryProductGroup, int nRequestID) = 0;\n\n\t///请求查询做市商合约手续费率\n\tvirtual int ReqQryMMInstrumentCommissionRate(CThostFtdcQryMMInstrumentCommissionRateField *pQryMMInstrumentCommissionRate, int nRequestID) = 0;\n\n\t///请求查询做市商期权合约手续费\n\tvirtual int ReqQryMMOptionInstrCommRate(CThostFtdcQryMMOptionInstrCommRateField *pQryMMOptionInstrCommRate, int nRequestID) = 0;\n\n\t///请求查询报单手续费\n\tvirtual int ReqQryInstrumentOrderCommRate(CThostFtdcQryInstrumentOrderCommRateField *pQryInstrumentOrderCommRate, int nRequestID) = 0;\n\n\t///请求查询资金账户\n\tvirtual int ReqQrySecAgentTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0;\n\n\t///请求查询二级代理商资金校验模式\n\tvirtual int ReqQrySecAgentCheckMode(CThostFtdcQrySecAgentCheckModeField *pQrySecAgentCheckMode, int nRequestID) = 0;\n\n\t///请求查询二级代理商信息\n\tvirtual int ReqQrySecAgentTradeInfo(CThostFtdcQrySecAgentTradeInfoField *pQrySecAgentTradeInfo, int nRequestID) = 0;\n\n\t///请求查询期权交易成本\n\tvirtual int ReqQryOptionInstrTradeCost(CThostFtdcQryOptionInstrTradeCostField *pQryOptionInstrTradeCost, int nRequestID) = 0;\n\n\t///请求查询期权合约手续费\n\tvirtual int ReqQryOptionInstrCommRate(CThostFtdcQryOptionInstrCommRateField *pQryOptionInstrCommRate, int nRequestID) = 0;\n\n\t///请求查询执行宣告\n\tvirtual int ReqQryExecOrder(CThostFtdcQryExecOrderField *pQryExecOrder, int nRequestID) = 0;\n\n\t///请求查询询价\n\tvirtual int ReqQryForQuote(CThostFtdcQryForQuoteField *pQryForQuote, int nRequestID) = 0;\n\n\t///请求查询报价\n\tvirtual int ReqQryQuote(CThostFtdcQryQuoteField *pQryQuote, int nRequestID) = 0;\n\n\t///请求查询期权自对冲\n\tvirtual int ReqQryOptionSelfClose(CThostFtdcQryOptionSelfCloseField *pQryOptionSelfClose, int nRequestID) = 0;\n\n\t///请求查询投资单元\n\tvirtual int ReqQryInvestUnit(CThostFtdcQryInvestUnitField *pQryInvestUnit, int nRequestID) = 0;\n\n\t///请求查询组合合约安全系数\n\tvirtual int ReqQryCombInstrumentGuard(CThostFtdcQryCombInstrumentGuardField *pQryCombInstrumentGuard, int nRequestID) = 0;\n\n\t///请求查询申请组合\n\tvirtual int ReqQryCombAction(CThostFtdcQryCombActionField *pQryCombAction, int nRequestID) = 0;\n\n\t///请求查询转帐流水\n\tvirtual int ReqQryTransferSerial(CThostFtdcQryTransferSerialField *pQryTransferSerial, int nRequestID) = 0;\n\n\t///请求查询银期签约关系\n\tvirtual int ReqQryAccountregister(CThostFtdcQryAccountregisterField *pQryAccountregister, int nRequestID) = 0;\n\n\t///请求查询签约银行\n\tvirtual int ReqQryContractBank(CThostFtdcQryContractBankField *pQryContractBank, int nRequestID) = 0;\n\n\t///请求查询预埋单\n\tvirtual int ReqQryParkedOrder(CThostFtdcQryParkedOrderField *pQryParkedOrder, int nRequestID) = 0;\n\n\t///请求查询预埋撤单\n\tvirtual int ReqQryParkedOrderAction(CThostFtdcQryParkedOrderActionField *pQryParkedOrderAction, int nRequestID) = 0;\n\n\t///请求查询交易通知\n\tvirtual int ReqQryTradingNotice(CThostFtdcQryTradingNoticeField *pQryTradingNotice, int nRequestID) = 0;\n\n\t///请求查询经纪公司交易参数\n\tvirtual int ReqQryBrokerTradingParams(CThostFtdcQryBrokerTradingParamsField *pQryBrokerTradingParams, int nRequestID) = 0;\n\n\t///请求查询经纪公司交易算法\n\tvirtual int ReqQryBrokerTradingAlgos(CThostFtdcQryBrokerTradingAlgosField *pQryBrokerTradingAlgos, int nRequestID) = 0;\n\n\t///请求查询监控中心用户令牌\n\tvirtual int ReqQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, int nRequestID) = 0;\n\n\t///期货发起银行资金转期货请求\n\tvirtual int ReqFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;\n\n\t///期货发起期货资金转银行请求\n\tvirtual int ReqFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;\n\n\t///期货发起查询银行余额请求\n\tvirtual int ReqQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, int nRequestID) = 0;\n\n\t///请求查询分类合约\n\tvirtual int ReqQryClassifiedInstrument(CThostFtdcQryClassifiedInstrumentField *pQryClassifiedInstrument, int nRequestID) = 0;\n\n\t///请求组合优惠比例\n\tvirtual int ReqQryCombPromotionParam(CThostFtdcQryCombPromotionParamField *pQryCombPromotionParam, int nRequestID) = 0;\n\n\t///投资者风险结算持仓查询\n\tvirtual int ReqQryRiskSettleInvstPosition(CThostFtdcQryRiskSettleInvstPositionField *pQryRiskSettleInvstPosition, int nRequestID) = 0;\n\n\t///风险结算产品查询\n\tvirtual int ReqQryRiskSettleProductStatus(CThostFtdcQryRiskSettleProductStatusField *pQryRiskSettleProductStatus, int nRequestID) = 0;\n\n\t///SPBM期货合约参数查询\n\tvirtual int ReqQrySPBMFutureParameter(CThostFtdcQrySPBMFutureParameterField *pQrySPBMFutureParameter, int nRequestID) = 0;\n\n\t///SPBM期权合约参数查询\n\tvirtual int ReqQrySPBMOptionParameter(CThostFtdcQrySPBMOptionParameterField *pQrySPBMOptionParameter, int nRequestID) = 0;\n\n\t///SPBM品种内对锁仓折扣参数查询\n\tvirtual int ReqQrySPBMIntraParameter(CThostFtdcQrySPBMIntraParameterField *pQrySPBMIntraParameter, int nRequestID) = 0;\n\n\t///SPBM跨品种抵扣参数查询\n\tvirtual int ReqQrySPBMInterParameter(CThostFtdcQrySPBMInterParameterField *pQrySPBMInterParameter, int nRequestID) = 0;\n\n\t///SPBM组合保证金套餐查询\n\tvirtual int ReqQrySPBMPortfDefinition(CThostFtdcQrySPBMPortfDefinitionField *pQrySPBMPortfDefinition, int nRequestID) = 0;\n\n\t///投资者SPBM套餐选择查询\n\tvirtual int ReqQrySPBMInvestorPortfDef(CThostFtdcQrySPBMInvestorPortfDefField *pQrySPBMInvestorPortfDef, int nRequestID) = 0;\n\n\t///投资者新型组合保证金系数查询\n\tvirtual int ReqQryInvestorPortfMarginRatio(CThostFtdcQryInvestorPortfMarginRatioField *pQryInvestorPortfMarginRatio, int nRequestID) = 0;\n\n\t///投资者产品SPBM明细查询\n\tvirtual int ReqQryInvestorProdSPBMDetail(CThostFtdcQryInvestorProdSPBMDetailField *pQryInvestorProdSPBMDetail, int nRequestID) = 0;\n\n\t///投资者商品组SPMM记录查询\n\tvirtual int ReqQryInvestorCommoditySPMMMargin(CThostFtdcQryInvestorCommoditySPMMMarginField *pQryInvestorCommoditySPMMMargin, int nRequestID) = 0;\n\n\t///投资者商品群SPMM记录查询\n\tvirtual int ReqQryInvestorCommodityGroupSPMMMargin(CThostFtdcQryInvestorCommodityGroupSPMMMarginField *pQryInvestorCommodityGroupSPMMMargin, int nRequestID) = 0;\n\n\t///SPMM合约参数查询\n\tvirtual int ReqQrySPMMInstParam(CThostFtdcQrySPMMInstParamField *pQrySPMMInstParam, int nRequestID) = 0;\n\n\t///SPMM产品参数查询\n\tvirtual int ReqQrySPMMProductParam(CThostFtdcQrySPMMProductParamField *pQrySPMMProductParam, int nRequestID) = 0;\n\n\t///SPBM附加跨品种抵扣参数查询\n\tvirtual int ReqQrySPBMAddOnInterParameter(CThostFtdcQrySPBMAddOnInterParameterField *pQrySPBMAddOnInterParameter, int nRequestID) = 0;\n\n\t///RCAMS产品组合信息查询\n\tvirtual int ReqQryRCAMSCombProductInfo(CThostFtdcQryRCAMSCombProductInfoField *pQryRCAMSCombProductInfo, int nRequestID) = 0;\n\n\t///RCAMS同合约风险对冲参数查询\n\tvirtual int ReqQryRCAMSInstrParameter(CThostFtdcQryRCAMSInstrParameterField *pQryRCAMSInstrParameter, int nRequestID) = 0;\n\n\t///RCAMS品种内风险对冲参数查询\n\tvirtual int ReqQryRCAMSIntraParameter(CThostFtdcQryRCAMSIntraParameterField *pQryRCAMSIntraParameter, int nRequestID) = 0;\n\n\t///RCAMS跨品种风险折抵参数查询\n\tvirtual int ReqQryRCAMSInterParameter(CThostFtdcQryRCAMSInterParameterField *pQryRCAMSInterParameter, int nRequestID) = 0;\n\n\t///RCAMS空头期权风险调整参数查询\n\tvirtual int ReqQryRCAMSShortOptAdjustParam(CThostFtdcQryRCAMSShortOptAdjustParamField *pQryRCAMSShortOptAdjustParam, int nRequestID) = 0;\n\n\t///RCAMS策略组合持仓查询\n\tvirtual int ReqQryRCAMSInvestorCombPosition(CThostFtdcQryRCAMSInvestorCombPositionField *pQryRCAMSInvestorCombPosition, int nRequestID) = 0;\n\n\t///投资者品种RCAMS保证金查询\n\tvirtual int ReqQryInvestorProdRCAMSMargin(CThostFtdcQryInvestorProdRCAMSMarginField *pQryInvestorProdRCAMSMargin, int nRequestID) = 0;\n\n\t///RULE合约保证金参数查询\n\tvirtual int ReqQryRULEInstrParameter(CThostFtdcQryRULEInstrParameterField *pQryRULEInstrParameter, int nRequestID) = 0;\n\n\t///RULE品种内对锁仓折扣参数查询\n\tvirtual int ReqQryRULEIntraParameter(CThostFtdcQryRULEIntraParameterField *pQryRULEIntraParameter, int nRequestID) = 0;\n\n\t///RULE跨品种抵扣参数查询\n\tvirtual int ReqQryRULEInterParameter(CThostFtdcQryRULEInterParameterField *pQryRULEInterParameter, int nRequestID) = 0;\n\n\t///投资者产品RULE保证金查询\n\tvirtual int ReqQryInvestorProdRULEMargin(CThostFtdcQryInvestorProdRULEMarginField *pQryInvestorProdRULEMargin, int nRequestID) = 0;\n\n\t///投资者新型组合保证金开关查询\n\tvirtual int ReqQryInvestorPortfSetting(CThostFtdcQryInvestorPortfSettingField *pQryInvestorPortfSetting, int nRequestID) = 0;\n\n\t///投资者申报费阶梯收取记录查询\n\tvirtual int ReqQryInvestorInfoCommRec(CThostFtdcQryInvestorInfoCommRecField *pQryInvestorInfoCommRec, int nRequestID) = 0;\n\n\t///组合腿信息查询\n\tvirtual int ReqQryCombLeg(CThostFtdcQryCombLegField *pQryCombLeg, int nRequestID) = 0;\n\n\t///对冲设置请求\n\tvirtual int ReqOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, int nRequestID) = 0;\n\n\t///对冲设置撤销请求\n\tvirtual int ReqCancelOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, int nRequestID) = 0;\n\n\t///投资者对冲设置查询\n\tvirtual int ReqQryOffsetSetting(CThostFtdcQryOffsetSettingField *pQryOffsetSetting, int nRequestID) = 0;\nprotected:\n\t~CThostFtdcTraderApi(){};\n};\n\n#endif\n"
  },
  {
    "path": "native/ctp_bridge/api/linux/ThostFtdcUserApiDataType.h",
    "content": "/////////////////////////////////////////////////////////////////////////\n///@system 新一代交易所系统\n///@company 上海期货信息技术有限公司\n///@file ThostFtdcUserApiDataType.h\n///@brief 定义了客户端接口使用的业务数据类型\n///@history \n///20060106\t赵鸿昊\t\t创建该文件\n/////////////////////////////////////////////////////////////////////////\n\n#ifndef THOST_FTDCDATATYPE_H\n#define THOST_FTDCDATATYPE_H\n\nenum THOST_TE_RESUME_TYPE\n{\n\tTHOST_TERT_RESTART = 0,\n\tTHOST_TERT_RESUME,\n\tTHOST_TERT_QUICK,\n\tTHOST_TERT_NONE\n};\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTraderIDType是一个交易所交易员代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTraderIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorIDType是一个投资者代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvestorIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerIDType是一个经纪公司代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBrokerIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerAbbrType是一个经纪公司简称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBrokerAbbrType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerNameType是一个经纪公司名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBrokerNameType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOldExchangeInstIDType是一个合约在交易所的代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOldExchangeInstIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeInstIDType是一个合约在交易所的代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcExchangeInstIDType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderRefType是一个报单引用类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrderRefType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcParticipantIDType是一个会员代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcParticipantIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserIDType是一个用户代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUserIDType[16];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPasswordType是一个密码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPasswordType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientIDType是一个交易编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClientIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentIDType是一个合约代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInstrumentIDType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOldInstrumentIDType是一个合约代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOldInstrumentIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentCodeType是一个合约标识码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInstrumentCodeType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMarketIDType是一个市场代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcMarketIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductNameType是一个产品名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProductNameType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeIDType是一个交易所代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcExchangeIDType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeNameType是一个交易所名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcExchangeNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeAbbrType是一个交易所简称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcExchangeAbbrType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeFlagType是一个交易所标志类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcExchangeFlagType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMacAddressType是一个Mac地址类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcMacAddressType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSystemIDType是一个系统编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSystemIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientLoginRemarkType是一个客户登录备注2类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClientLoginRemarkType[151];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangePropertyType是一个交易所属性类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_EXP_Normal '0'\n///根据成交生成报单\n#define THOST_FTDC_EXP_GenOrderByTrade '1'\n\ntypedef char TThostFtdcExchangePropertyType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDateType是一个日期类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDateType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTimeType是一个时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTimeType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLongTimeType是一个长时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLongTimeType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentNameType是一个合约名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInstrumentNameType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettlementGroupIDType是一个结算组代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSettlementGroupIDType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderSysIDType是一个报单编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrderSysIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeIDType是一个成交编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTradeIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommandTypeType是一个DB命令类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCommandTypeType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOldIPAddressType是一个IP地址类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOldIPAddressType[16];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIPAddressType是一个IP地址类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIPAddressType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIPPortType是一个IP端口类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcIPPortType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductInfoType是一个产品信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProductInfoType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProtocolInfoType是一个协议信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProtocolInfoType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBusinessUnitType是一个业务单元类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBusinessUnitType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDepositSeqNoType是一个出入金流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDepositSeqNoType[15];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIdentifiedCardNoType是一个证件号码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIdentifiedCardNoType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIdCardTypeType是一个证件类型类型\n/////////////////////////////////////////////////////////////////////////\n///组织机构代码\n#define THOST_FTDC_ICT_EID '0'\n///中国公民身份证\n#define THOST_FTDC_ICT_IDCard '1'\n///军官证\n#define THOST_FTDC_ICT_OfficerIDCard '2'\n///警官证\n#define THOST_FTDC_ICT_PoliceIDCard '3'\n///士兵证\n#define THOST_FTDC_ICT_SoldierIDCard '4'\n///户口簿\n#define THOST_FTDC_ICT_HouseholdRegister  '5'\n///护照\n#define THOST_FTDC_ICT_Passport '6'\n///台胞证\n#define THOST_FTDC_ICT_TaiwanCompatriotIDCard  '7'\n///回乡证\n#define THOST_FTDC_ICT_HomeComingCard '8'\n///营业执照号\n#define THOST_FTDC_ICT_LicenseNo '9'\n///税务登记号/当地纳税ID\n#define THOST_FTDC_ICT_TaxNo 'A'\n///港澳居民来往内地通行证\n#define THOST_FTDC_ICT_HMMainlandTravelPermit  'B'\n///台湾居民来往大陆通行证\n#define THOST_FTDC_ICT_TwMainlandTravelPermit 'C'\n///驾照\n#define THOST_FTDC_ICT_DrivingLicense 'D'\n///当地社保ID\n#define THOST_FTDC_ICT_SocialID 'F'\n///当地身份证\n#define THOST_FTDC_ICT_LocalID 'G'\n///商业登记证\n#define THOST_FTDC_ICT_BusinessRegistration  'H'\n///港澳永久性居民身份证\n#define THOST_FTDC_ICT_HKMCIDCard 'I'\n///人行开户许可证\n#define THOST_FTDC_ICT_AccountsPermits 'J'\n///外国人永久居留证\n#define THOST_FTDC_ICT_FrgPrmtRdCard 'K'\n///资管产品备案函\n#define THOST_FTDC_ICT_CptMngPrdLetter 'L'\n///港澳台居民居住证\n#define THOST_FTDC_ICT_HKMCTwResidencePermit 'M'\n///统一社会信用代码\n#define THOST_FTDC_ICT_UniformSocialCreditCode 'N'\n///机构成立证明文件\n#define THOST_FTDC_ICT_CorporationCertNo 'O'\n///其他证件\n#define THOST_FTDC_ICT_OtherCard 'x'\n\ntypedef char TThostFtdcIdCardTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderLocalIDType是一个本地报单编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrderLocalIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserNameType是一个用户名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUserNameType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPartyNameType是一个参与人名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPartyNameType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcErrorMsgType是一个错误信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcErrorMsgType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFieldNameType是一个字段名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFieldNameType[2049];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFieldContentType是一个字段内容类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFieldContentType[2049];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSystemNameType是一个系统名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSystemNameType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcContentType是一个消息正文类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcContentType[501];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorRangeType是一个投资者范围类型\n/////////////////////////////////////////////////////////////////////////\n///所有\n#define THOST_FTDC_IR_All '1'\n///投资者组\n#define THOST_FTDC_IR_Group '2'\n///单一投资者\n#define THOST_FTDC_IR_Single '3'\n\ntypedef char TThostFtdcInvestorRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDepartmentRangeType是一个投资者范围类型\n/////////////////////////////////////////////////////////////////////////\n///所有\n#define THOST_FTDC_DR_All '1'\n///组织架构\n#define THOST_FTDC_DR_Group '2'\n///单一投资者\n#define THOST_FTDC_DR_Single '3'\n\ntypedef char TThostFtdcDepartmentRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDataSyncStatusType是一个数据同步状态类型\n/////////////////////////////////////////////////////////////////////////\n///未同步\n#define THOST_FTDC_DS_Asynchronous '1'\n///同步中\n#define THOST_FTDC_DS_Synchronizing '2'\n///已同步\n#define THOST_FTDC_DS_Synchronized '3'\n\ntypedef char TThostFtdcDataSyncStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerDataSyncStatusType是一个经纪公司数据同步状态类型\n/////////////////////////////////////////////////////////////////////////\n///已同步\n#define THOST_FTDC_BDS_Synchronized '1'\n///同步中\n#define THOST_FTDC_BDS_Synchronizing '2'\n\ntypedef char TThostFtdcBrokerDataSyncStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeConnectStatusType是一个交易所连接状态类型\n/////////////////////////////////////////////////////////////////////////\n///没有任何连接\n#define THOST_FTDC_ECS_NoConnection '1'\n///已经发出合约查询请求\n#define THOST_FTDC_ECS_QryInstrumentSent '2'\n///已经获取信息\n#define THOST_FTDC_ECS_GotInformation '9'\n\ntypedef char TThostFtdcExchangeConnectStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTraderConnectStatusType是一个交易所交易员连接状态类型\n/////////////////////////////////////////////////////////////////////////\n///没有任何连接\n#define THOST_FTDC_TCS_NotConnected '1'\n///已经连接\n#define THOST_FTDC_TCS_Connected '2'\n///已经发出合约查询请求\n#define THOST_FTDC_TCS_QryInstrumentSent '3'\n///订阅私有流\n#define THOST_FTDC_TCS_SubPrivateFlow '4'\n\ntypedef char TThostFtdcTraderConnectStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFunctionCodeType是一个功能代码类型\n/////////////////////////////////////////////////////////////////////////\n///数据异步化\n#define THOST_FTDC_FC_DataAsync '1'\n///强制用户登出\n#define THOST_FTDC_FC_ForceUserLogout '2'\n///变更管理用户口令\n#define THOST_FTDC_FC_UserPasswordUpdate '3'\n///变更经纪公司口令\n#define THOST_FTDC_FC_BrokerPasswordUpdate '4'\n///变更投资者口令\n#define THOST_FTDC_FC_InvestorPasswordUpdate '5'\n///报单插入\n#define THOST_FTDC_FC_OrderInsert '6'\n///报单操作\n#define THOST_FTDC_FC_OrderAction '7'\n///同步系统数据\n#define THOST_FTDC_FC_SyncSystemData '8'\n///同步经纪公司数据\n#define THOST_FTDC_FC_SyncBrokerData '9'\n///批量同步经纪公司数据\n#define THOST_FTDC_FC_BachSyncBrokerData 'A'\n///超级查询\n#define THOST_FTDC_FC_SuperQuery 'B'\n///预埋报单插入\n#define THOST_FTDC_FC_ParkedOrderInsert 'C'\n///预埋报单操作\n#define THOST_FTDC_FC_ParkedOrderAction 'D'\n///同步动态令牌\n#define THOST_FTDC_FC_SyncOTP 'E'\n///删除未知单\n#define THOST_FTDC_FC_DeleteOrder 'F'\n///退出紧急状态\n#define THOST_FTDC_FC_ExitEmergency 'G'\n\ntypedef char TThostFtdcFunctionCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerFunctionCodeType是一个经纪公司功能代码类型\n/////////////////////////////////////////////////////////////////////////\n///强制用户登出\n#define THOST_FTDC_BFC_ForceUserLogout '1'\n///变更用户口令\n#define THOST_FTDC_BFC_UserPasswordUpdate '2'\n///同步经纪公司数据\n#define THOST_FTDC_BFC_SyncBrokerData '3'\n///批量同步经纪公司数据\n#define THOST_FTDC_BFC_BachSyncBrokerData '4'\n///报单插入\n#define THOST_FTDC_BFC_OrderInsert '5'\n///报单操作\n#define THOST_FTDC_BFC_OrderAction '6'\n///全部查询\n#define THOST_FTDC_BFC_AllQuery '7'\n///系统功能：登入/登出/修改密码等\n#define THOST_FTDC_BFC_log 'a'\n///基本查询：查询基础数据，如合约，交易所等常量\n#define THOST_FTDC_BFC_BaseQry 'b'\n///交易查询：如查成交，委托\n#define THOST_FTDC_BFC_TradeQry 'c'\n///交易功能：报单，撤单\n#define THOST_FTDC_BFC_Trade 'd'\n///银期转账\n#define THOST_FTDC_BFC_Virement 'e'\n///风险监控\n#define THOST_FTDC_BFC_Risk 'f'\n///查询/管理：查询会话，踢人等\n#define THOST_FTDC_BFC_Session 'g'\n///风控通知控制\n#define THOST_FTDC_BFC_RiskNoticeCtl 'h'\n///风控通知发送\n#define THOST_FTDC_BFC_RiskNotice 'i'\n///察看经纪公司资金权限\n#define THOST_FTDC_BFC_BrokerDeposit 'j'\n///资金查询\n#define THOST_FTDC_BFC_QueryFund 'k'\n///报单查询\n#define THOST_FTDC_BFC_QueryOrder 'l'\n///成交查询\n#define THOST_FTDC_BFC_QueryTrade 'm'\n///持仓查询\n#define THOST_FTDC_BFC_QueryPosition 'n'\n///行情查询\n#define THOST_FTDC_BFC_QueryMarketData 'o'\n///用户事件查询\n#define THOST_FTDC_BFC_QueryUserEvent 'p'\n///风险通知查询\n#define THOST_FTDC_BFC_QueryRiskNotify 'q'\n///出入金查询\n#define THOST_FTDC_BFC_QueryFundChange 'r'\n///投资者信息查询\n#define THOST_FTDC_BFC_QueryInvestor 's'\n///交易编码查询\n#define THOST_FTDC_BFC_QueryTradingCode 't'\n///强平\n#define THOST_FTDC_BFC_ForceClose 'u'\n///压力测试\n#define THOST_FTDC_BFC_PressTest 'v'\n///权益反算\n#define THOST_FTDC_BFC_RemainCalc 'w'\n///净持仓保证金指标\n#define THOST_FTDC_BFC_NetPositionInd 'x'\n///风险预算\n#define THOST_FTDC_BFC_RiskPredict 'y'\n///数据导出\n#define THOST_FTDC_BFC_DataExport 'z'\n///风控指标设置\n#define THOST_FTDC_BFC_RiskTargetSetup 'A'\n///行情预警\n#define THOST_FTDC_BFC_MarketDataWarn 'B'\n///业务通知查询\n#define THOST_FTDC_BFC_QryBizNotice 'C'\n///业务通知模板设置\n#define THOST_FTDC_BFC_CfgBizNotice 'D'\n///同步动态令牌\n#define THOST_FTDC_BFC_SyncOTP 'E'\n///发送业务通知\n#define THOST_FTDC_BFC_SendBizNotice 'F'\n///风险级别标准设置\n#define THOST_FTDC_BFC_CfgRiskLevelStd 'G'\n///交易终端应急功能\n#define THOST_FTDC_BFC_TbCommand 'H'\n///删除未知单\n#define THOST_FTDC_BFC_DeleteOrder 'J'\n///预埋报单插入\n#define THOST_FTDC_BFC_ParkedOrderInsert 'K'\n///预埋报单操作\n#define THOST_FTDC_BFC_ParkedOrderAction 'L'\n///资金不够仍允许行权\n#define THOST_FTDC_BFC_ExecOrderNoCheck 'M'\n///指定\n#define THOST_FTDC_BFC_Designate 'N'\n///证券处置\n#define THOST_FTDC_BFC_StockDisposal 'O'\n///席位资金预警\n#define THOST_FTDC_BFC_BrokerDepositWarn 'Q'\n///备兑不足预警\n#define THOST_FTDC_BFC_CoverWarn 'S'\n///行权试算\n#define THOST_FTDC_BFC_PreExecOrder 'T'\n///行权交收风险\n#define THOST_FTDC_BFC_ExecOrderRisk 'P'\n///持仓限额预警\n#define THOST_FTDC_BFC_PosiLimitWarn 'U'\n///持仓限额查询\n#define THOST_FTDC_BFC_QryPosiLimit 'V'\n///银期签到签退\n#define THOST_FTDC_BFC_FBSign 'W'\n///银期签约解约\n#define THOST_FTDC_BFC_FBAccount 'X'\n\ntypedef char TThostFtdcBrokerFunctionCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderActionStatusType是一个报单操作状态类型\n/////////////////////////////////////////////////////////////////////////\n///已经提交\n#define THOST_FTDC_OAS_Submitted 'a'\n///已经接受\n#define THOST_FTDC_OAS_Accepted 'b'\n///已经被拒绝\n#define THOST_FTDC_OAS_Rejected 'c'\n\ntypedef char TThostFtdcOrderActionStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderStatusType是一个报单状态类型\n/////////////////////////////////////////////////////////////////////////\n///全部成交\n#define THOST_FTDC_OST_AllTraded '0'\n///部分成交还在队列中\n#define THOST_FTDC_OST_PartTradedQueueing '1'\n///部分成交不在队列中\n#define THOST_FTDC_OST_PartTradedNotQueueing '2'\n///未成交还在队列中\n#define THOST_FTDC_OST_NoTradeQueueing '3'\n///未成交不在队列中\n#define THOST_FTDC_OST_NoTradeNotQueueing '4'\n///撤单\n#define THOST_FTDC_OST_Canceled '5'\n///未知\n#define THOST_FTDC_OST_Unknown 'a'\n///尚未触发\n#define THOST_FTDC_OST_NotTouched 'b'\n///已触发\n#define THOST_FTDC_OST_Touched 'c'\n\ntypedef char TThostFtdcOrderStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderSubmitStatusType是一个报单提交状态类型\n/////////////////////////////////////////////////////////////////////////\n///已经提交\n#define THOST_FTDC_OSS_InsertSubmitted '0'\n///撤单已经提交\n#define THOST_FTDC_OSS_CancelSubmitted '1'\n///修改已经提交\n#define THOST_FTDC_OSS_ModifySubmitted '2'\n///已经接受\n#define THOST_FTDC_OSS_Accepted '3'\n///报单已经被拒绝\n#define THOST_FTDC_OSS_InsertRejected '4'\n///撤单已经被拒绝\n#define THOST_FTDC_OSS_CancelRejected '5'\n///改单已经被拒绝\n#define THOST_FTDC_OSS_ModifyRejected '6'\n\ntypedef char TThostFtdcOrderSubmitStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPositionDateType是一个持仓日期类型\n/////////////////////////////////////////////////////////////////////////\n///今日持仓\n#define THOST_FTDC_PSD_Today '1'\n///历史持仓\n#define THOST_FTDC_PSD_History '2'\n\ntypedef char TThostFtdcPositionDateType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPositionDateTypeType是一个持仓日期类型类型\n/////////////////////////////////////////////////////////////////////////\n///使用历史持仓\n#define THOST_FTDC_PDT_UseHistory '1'\n///不使用历史持仓\n#define THOST_FTDC_PDT_NoUseHistory '2'\n\ntypedef char TThostFtdcPositionDateTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradingRoleType是一个交易角色类型\n/////////////////////////////////////////////////////////////////////////\n///代理\n#define THOST_FTDC_ER_Broker '1'\n///自营\n#define THOST_FTDC_ER_Host '2'\n///做市商\n#define THOST_FTDC_ER_Maker '3'\n\ntypedef char TThostFtdcTradingRoleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductClassType是一个产品类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货\n#define THOST_FTDC_PC_Futures '1'\n///期货期权\n#define THOST_FTDC_PC_Options '2'\n///组合\n#define THOST_FTDC_PC_Combination '3'\n///即期\n#define THOST_FTDC_PC_Spot '4'\n///期转现\n#define THOST_FTDC_PC_EFP '5'\n///现货期权\n#define THOST_FTDC_PC_SpotOption '6'\n///TAS合约\n#define THOST_FTDC_PC_TAS '7'\n///金属指数\n#define THOST_FTDC_PC_MI 'I'\n\ntypedef char TThostFtdcProductClassType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAPIProductClassType是一个产品类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货单一合约\n#define THOST_FTDC_APC_FutureSingle '1'\n///期权单一合约\n#define THOST_FTDC_APC_OptionSingle '2'\n///可交易期货(含期货组合和期货单一合约)\n#define THOST_FTDC_APC_Futures '3'\n///可交易期权(含期权组合和期权单一合约)\n#define THOST_FTDC_APC_Options '4'\n///可下单套利组合\n#define THOST_FTDC_APC_TradingComb '5'\n///可申请的组合（可以申请的组合合约 包含可以交易的合约）\n#define THOST_FTDC_APC_UnTradingComb '6'\n///所有可以交易合约\n#define THOST_FTDC_APC_AllTrading '7'\n///所有合约（包含不能交易合约 慎用）\n#define THOST_FTDC_APC_All '8'\n\ntypedef char TThostFtdcAPIProductClassType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstLifePhaseType是一个合约生命周期状态类型\n/////////////////////////////////////////////////////////////////////////\n///未上市\n#define THOST_FTDC_IP_NotStart '0'\n///上市\n#define THOST_FTDC_IP_Started '1'\n///停牌\n#define THOST_FTDC_IP_Pause '2'\n///到期\n#define THOST_FTDC_IP_Expired '3'\n\ntypedef char TThostFtdcInstLifePhaseType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDirectionType是一个买卖方向类型\n/////////////////////////////////////////////////////////////////////////\n///买\n#define THOST_FTDC_D_Buy '0'\n///卖\n#define THOST_FTDC_D_Sell '1'\n\ntypedef char TThostFtdcDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPositionTypeType是一个持仓类型类型\n/////////////////////////////////////////////////////////////////////////\n///净持仓\n#define THOST_FTDC_PT_Net '1'\n///综合持仓\n#define THOST_FTDC_PT_Gross '2'\n\ntypedef char TThostFtdcPositionTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPosiDirectionType是一个持仓多空方向类型\n/////////////////////////////////////////////////////////////////////////\n///净\n#define THOST_FTDC_PD_Net '1'\n///多头\n#define THOST_FTDC_PD_Long '2'\n///空头\n#define THOST_FTDC_PD_Short '3'\n\ntypedef char TThostFtdcPosiDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSysSettlementStatusType是一个系统结算状态类型\n/////////////////////////////////////////////////////////////////////////\n///不活跃\n#define THOST_FTDC_SS_NonActive '1'\n///启动\n#define THOST_FTDC_SS_Startup '2'\n///操作\n#define THOST_FTDC_SS_Operating '3'\n///结算\n#define THOST_FTDC_SS_Settlement '4'\n///结算完成\n#define THOST_FTDC_SS_SettlementFinished '5'\n\ntypedef char TThostFtdcSysSettlementStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRatioAttrType是一个费率属性类型\n/////////////////////////////////////////////////////////////////////////\n///交易费率\n#define THOST_FTDC_RA_Trade '0'\n///结算费率\n#define THOST_FTDC_RA_Settlement '1'\n\ntypedef char TThostFtdcRatioAttrType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHedgeFlagType是一个投机套保标志类型\n/////////////////////////////////////////////////////////////////////////\n///投机\n#define THOST_FTDC_HF_Speculation '1'\n///套利\n#define THOST_FTDC_HF_Arbitrage '2'\n///套保\n#define THOST_FTDC_HF_Hedge '3'\n///做市商\n#define THOST_FTDC_HF_MarketMaker '5'\n///第一腿投机第二腿套保\n#define THOST_FTDC_HF_SpecHedge '6'\n///第一腿套保第二腿投机\n#define THOST_FTDC_HF_HedgeSpec '7'\n\ntypedef char TThostFtdcHedgeFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBillHedgeFlagType是一个投机套保标志类型\n/////////////////////////////////////////////////////////////////////////\n///投机\n#define THOST_FTDC_BHF_Speculation '1'\n///套利\n#define THOST_FTDC_BHF_Arbitrage '2'\n///套保\n#define THOST_FTDC_BHF_Hedge '3'\n\ntypedef char TThostFtdcBillHedgeFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientIDTypeType是一个交易编码类型类型\n/////////////////////////////////////////////////////////////////////////\n///投机\n#define THOST_FTDC_CIDT_Speculation '1'\n///套利\n#define THOST_FTDC_CIDT_Arbitrage '2'\n///套保\n#define THOST_FTDC_CIDT_Hedge '3'\n///做市商\n#define THOST_FTDC_CIDT_MarketMaker '5'\n\ntypedef char TThostFtdcClientIDTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderPriceTypeType是一个报单价格条件类型\n/////////////////////////////////////////////////////////////////////////\n///任意价\n#define THOST_FTDC_OPT_AnyPrice '1'\n///限价\n#define THOST_FTDC_OPT_LimitPrice '2'\n///最优价\n#define THOST_FTDC_OPT_BestPrice '3'\n///最新价\n#define THOST_FTDC_OPT_LastPrice '4'\n///最新价浮动上浮1个ticks\n#define THOST_FTDC_OPT_LastPricePlusOneTicks '5'\n///最新价浮动上浮2个ticks\n#define THOST_FTDC_OPT_LastPricePlusTwoTicks '6'\n///最新价浮动上浮3个ticks\n#define THOST_FTDC_OPT_LastPricePlusThreeTicks '7'\n///卖一价\n#define THOST_FTDC_OPT_AskPrice1 '8'\n///卖一价浮动上浮1个ticks\n#define THOST_FTDC_OPT_AskPrice1PlusOneTicks '9'\n///卖一价浮动上浮2个ticks\n#define THOST_FTDC_OPT_AskPrice1PlusTwoTicks 'A'\n///卖一价浮动上浮3个ticks\n#define THOST_FTDC_OPT_AskPrice1PlusThreeTicks 'B'\n///买一价\n#define THOST_FTDC_OPT_BidPrice1 'C'\n///买一价浮动上浮1个ticks\n#define THOST_FTDC_OPT_BidPrice1PlusOneTicks 'D'\n///买一价浮动上浮2个ticks\n#define THOST_FTDC_OPT_BidPrice1PlusTwoTicks 'E'\n///买一价浮动上浮3个ticks\n#define THOST_FTDC_OPT_BidPrice1PlusThreeTicks 'F'\n///五档价\n#define THOST_FTDC_OPT_FiveLevelPrice 'G'\n\ntypedef char TThostFtdcOrderPriceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOffsetFlagType是一个开平标志类型\n/////////////////////////////////////////////////////////////////////////\n///开仓\n#define THOST_FTDC_OF_Open '0'\n///平仓\n#define THOST_FTDC_OF_Close '1'\n///强平\n#define THOST_FTDC_OF_ForceClose '2'\n///平今\n#define THOST_FTDC_OF_CloseToday '3'\n///平昨\n#define THOST_FTDC_OF_CloseYesterday '4'\n///强减\n#define THOST_FTDC_OF_ForceOff '5'\n///本地强平\n#define THOST_FTDC_OF_LocalForceClose '6'\n\ntypedef char TThostFtdcOffsetFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcForceCloseReasonType是一个强平原因类型\n/////////////////////////////////////////////////////////////////////////\n///非强平\n#define THOST_FTDC_FCC_NotForceClose '0'\n///资金不足\n#define THOST_FTDC_FCC_LackDeposit '1'\n///客户超仓\n#define THOST_FTDC_FCC_ClientOverPositionLimit '2'\n///会员超仓\n#define THOST_FTDC_FCC_MemberOverPositionLimit '3'\n///持仓非整数倍\n#define THOST_FTDC_FCC_NotMultiple '4'\n///违规\n#define THOST_FTDC_FCC_Violation '5'\n///其它\n#define THOST_FTDC_FCC_Other '6'\n///自然人临近交割\n#define THOST_FTDC_FCC_PersonDeliv '7'\n///本地强平资金不足忽略敞口\n#define THOST_FTDC_FCC_Notverifycapital '8'\n///本地强平资金不足\n#define THOST_FTDC_FCC_LocalLackDeposit '9'\n///本地强平违规持仓忽略敞口\n#define THOST_FTDC_FCC_LocalViolationNocheck 'a'\n///本地强平违规持仓\n#define THOST_FTDC_FCC_LocalViolation 'b'\n\ntypedef char TThostFtdcForceCloseReasonType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderTypeType是一个报单类型类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_ORDT_Normal '0'\n///报价衍生\n#define THOST_FTDC_ORDT_DeriveFromQuote '1'\n///组合衍生\n#define THOST_FTDC_ORDT_DeriveFromCombination '2'\n///组合报单\n#define THOST_FTDC_ORDT_Combination '3'\n///条件单\n#define THOST_FTDC_ORDT_ConditionalOrder '4'\n///互换单\n#define THOST_FTDC_ORDT_Swap '5'\n///大宗交易成交衍生\n#define THOST_FTDC_ORDT_DeriveFromBlockTrade '6'\n///期转现成交衍生\n#define THOST_FTDC_ORDT_DeriveFromEFPTrade '7'\n\ntypedef char TThostFtdcOrderTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTimeConditionType是一个有效期类型类型\n/////////////////////////////////////////////////////////////////////////\n///立即完成，否则撤销\n#define THOST_FTDC_TC_IOC '1'\n///本节有效\n#define THOST_FTDC_TC_GFS '2'\n///当日有效\n#define THOST_FTDC_TC_GFD '3'\n///指定日期前有效\n#define THOST_FTDC_TC_GTD '4'\n///撤销前有效\n#define THOST_FTDC_TC_GTC '5'\n///集合竞价有效\n#define THOST_FTDC_TC_GFA '6'\n\ntypedef char TThostFtdcTimeConditionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVolumeConditionType是一个成交量类型类型\n/////////////////////////////////////////////////////////////////////////\n///任何数量\n#define THOST_FTDC_VC_AV '1'\n///最小数量\n#define THOST_FTDC_VC_MV '2'\n///全部数量\n#define THOST_FTDC_VC_CV '3'\n\ntypedef char TThostFtdcVolumeConditionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcContingentConditionType是一个触发条件类型\n/////////////////////////////////////////////////////////////////////////\n///立即\n#define THOST_FTDC_CC_Immediately '1'\n///止损\n#define THOST_FTDC_CC_Touch '2'\n///止赢\n#define THOST_FTDC_CC_TouchProfit '3'\n///预埋单\n#define THOST_FTDC_CC_ParkedOrder '4'\n///最新价大于条件价\n#define THOST_FTDC_CC_LastPriceGreaterThanStopPrice '5'\n///最新价大于等于条件价\n#define THOST_FTDC_CC_LastPriceGreaterEqualStopPrice '6'\n///最新价小于条件价\n#define THOST_FTDC_CC_LastPriceLesserThanStopPrice '7'\n///最新价小于等于条件价\n#define THOST_FTDC_CC_LastPriceLesserEqualStopPrice '8'\n///卖一价大于条件价\n#define THOST_FTDC_CC_AskPriceGreaterThanStopPrice '9'\n///卖一价大于等于条件价\n#define THOST_FTDC_CC_AskPriceGreaterEqualStopPrice 'A'\n///卖一价小于条件价\n#define THOST_FTDC_CC_AskPriceLesserThanStopPrice 'B'\n///卖一价小于等于条件价\n#define THOST_FTDC_CC_AskPriceLesserEqualStopPrice 'C'\n///买一价大于条件价\n#define THOST_FTDC_CC_BidPriceGreaterThanStopPrice 'D'\n///买一价大于等于条件价\n#define THOST_FTDC_CC_BidPriceGreaterEqualStopPrice 'E'\n///买一价小于条件价\n#define THOST_FTDC_CC_BidPriceLesserThanStopPrice 'F'\n///买一价小于等于条件价\n#define THOST_FTDC_CC_BidPriceLesserEqualStopPrice 'H'\n\ntypedef char TThostFtdcContingentConditionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcActionFlagType是一个操作标志类型\n/////////////////////////////////////////////////////////////////////////\n///删除\n#define THOST_FTDC_AF_Delete '0'\n///修改\n#define THOST_FTDC_AF_Modify '3'\n\ntypedef char TThostFtdcActionFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradingRightType是一个交易权限类型\n/////////////////////////////////////////////////////////////////////////\n///可以交易\n#define THOST_FTDC_TR_Allow '0'\n///只能平仓\n#define THOST_FTDC_TR_CloseOnly '1'\n///不能交易\n#define THOST_FTDC_TR_Forbidden '2'\n\ntypedef char TThostFtdcTradingRightType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderSourceType是一个报单来源类型\n/////////////////////////////////////////////////////////////////////////\n///来自参与者\n#define THOST_FTDC_OSRC_Participant '0'\n///来自管理员\n#define THOST_FTDC_OSRC_Administrator '1'\n\ntypedef char TThostFtdcOrderSourceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeTypeType是一个成交类型类型\n/////////////////////////////////////////////////////////////////////////\n///组合持仓拆分为单一持仓,初始化不应包含该类型的持仓\n#define THOST_FTDC_TRDT_SplitCombination '#'\n///普通成交\n#define THOST_FTDC_TRDT_Common '0'\n///期权执行\n#define THOST_FTDC_TRDT_OptionsExecution '1'\n///OTC成交\n#define THOST_FTDC_TRDT_OTC '2'\n///期转现衍生成交\n#define THOST_FTDC_TRDT_EFPDerived '3'\n///组合衍生成交\n#define THOST_FTDC_TRDT_CombinationDerived '4'\n///大宗交易成交\n#define THOST_FTDC_TRDT_BlockTrade '5'\n\ntypedef char TThostFtdcTradeTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSpecPosiTypeType是一个特殊持仓明细标识类型\n/////////////////////////////////////////////////////////////////////////\n///普通持仓明细\n#define THOST_FTDC_SPOST_Common '#'\n///TAS合约成交产生的标的合约持仓明细\n#define THOST_FTDC_SPOST_Tas '0'\n\ntypedef char TThostFtdcSpecPosiTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPriceSourceType是一个成交价来源类型\n/////////////////////////////////////////////////////////////////////////\n///前成交价\n#define THOST_FTDC_PSRC_LastPrice '0'\n///买委托价\n#define THOST_FTDC_PSRC_Buy '1'\n///卖委托价\n#define THOST_FTDC_PSRC_Sell '2'\n///场外成交价\n#define THOST_FTDC_PSRC_OTC '3'\n\ntypedef char TThostFtdcPriceSourceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentStatusType是一个合约交易状态类型\n/////////////////////////////////////////////////////////////////////////\n///开盘前\n#define THOST_FTDC_IS_BeforeTrading '0'\n///非交易\n#define THOST_FTDC_IS_NoTrading '1'\n///连续交易\n#define THOST_FTDC_IS_Continous '2'\n///集合竞价报单\n#define THOST_FTDC_IS_AuctionOrdering '3'\n///集合竞价价格平衡\n#define THOST_FTDC_IS_AuctionBalance '4'\n///集合竞价撮合\n#define THOST_FTDC_IS_AuctionMatch '5'\n///收盘\n#define THOST_FTDC_IS_Closed '6'\n///交易业务处理\n#define THOST_FTDC_IS_TransactionProcessing '7'\n\ntypedef char TThostFtdcInstrumentStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstStatusEnterReasonType是一个品种进入交易状态原因类型\n/////////////////////////////////////////////////////////////////////////\n///自动切换\n#define THOST_FTDC_IER_Automatic '1'\n///手动切换\n#define THOST_FTDC_IER_Manual '2'\n///熔断\n#define THOST_FTDC_IER_Fuse '3'\n\ntypedef char TThostFtdcInstStatusEnterReasonType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderActionRefType是一个报单操作引用类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcOrderActionRefType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstallCountType是一个安装数量类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcInstallCountType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstallIDType是一个安装编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcInstallIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcErrorIDType是一个错误代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcErrorIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettlementIDType是一个结算编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSettlementIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVolumeType是一个数量类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcVolumeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFrontIDType是一个前置编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcFrontIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSessionIDType是一个会话编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSessionIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSequenceNoType是一个序号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSequenceNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommandNoType是一个DB命令序号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCommandNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMillisecType是一个时间（毫秒）类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcMillisecType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSecType是一个时间（秒）类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSecType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVolumeMultipleType是一个合约数量乘数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcVolumeMultipleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradingSegmentSNType是一个交易阶段编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcTradingSegmentSNType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRequestIDType是一个请求编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcRequestIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcYearType是一个年份类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcYearType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMonthType是一个月份类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcMonthType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBoolType是一个布尔型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcBoolType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPriceType是一个价格类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcPriceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombOffsetFlagType是一个组合开平标志类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCombOffsetFlagType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombHedgeFlagType是一个组合投机套保标志类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCombHedgeFlagType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRatioType是一个比率类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcRatioType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMoneyType是一个资金类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcMoneyType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLargeVolumeType是一个大额数量类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcLargeVolumeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSequenceSeriesType是一个序列系列号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef short TThostFtdcSequenceSeriesType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommPhaseNoType是一个通讯时段编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef short TThostFtdcCommPhaseNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSequenceLabelType是一个序列编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSequenceLabelType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUnderlyingMultipleType是一个基础商品乘数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcUnderlyingMultipleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPriorityType是一个优先级类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcPriorityType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcContractCodeType是一个合同编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcContractCodeType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCityType是一个市类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCityType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIsStockType是一个是否股民类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIsStockType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcChannelType是一个渠道类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcChannelType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAddressType是一个通讯地址类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAddressType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcZipCodeType是一个邮政编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcZipCodeType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTelephoneType是一个联系电话类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTelephoneType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFaxType是一个传真类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFaxType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMobileType是一个手机类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcMobileType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEMailType是一个电子邮件类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcEMailType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMemoType是一个备注类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcMemoType[161];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCompanyCodeType是一个企业代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCompanyCodeType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWebsiteType是一个网站地址类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcWebsiteType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTaxNoType是一个税务登记号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTaxNoType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBatchStatusType是一个处理状态类型\n/////////////////////////////////////////////////////////////////////////\n///未上传\n#define THOST_FTDC_BS_NoUpload '1'\n///已上传\n#define THOST_FTDC_BS_Uploaded '2'\n///审核失败\n#define THOST_FTDC_BS_Failed '3'\n\ntypedef char TThostFtdcBatchStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPropertyIDType是一个属性代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPropertyIDType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPropertyNameType是一个属性名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPropertyNameType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLicenseNoType是一个营业执照号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLicenseNoType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAgentIDType是一个经纪人代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAgentIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAgentNameType是一个经纪人名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAgentNameType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAgentGroupIDType是一个经纪人组代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAgentGroupIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAgentGroupNameType是一个经纪人组名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAgentGroupNameType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReturnStyleType是一个按品种返还方式类型\n/////////////////////////////////////////////////////////////////////////\n///按所有品种\n#define THOST_FTDC_RS_All '1'\n///按品种\n#define THOST_FTDC_RS_ByProduct '2'\n\ntypedef char TThostFtdcReturnStyleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReturnPatternType是一个返还模式类型\n/////////////////////////////////////////////////////////////////////////\n///按成交手数\n#define THOST_FTDC_RP_ByVolume '1'\n///按留存手续费\n#define THOST_FTDC_RP_ByFeeOnHand '2'\n\ntypedef char TThostFtdcReturnPatternType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReturnLevelType是一个返还级别类型\n/////////////////////////////////////////////////////////////////////////\n///级别1\n#define THOST_FTDC_RL_Level1 '1'\n///级别2\n#define THOST_FTDC_RL_Level2 '2'\n///级别3\n#define THOST_FTDC_RL_Level3 '3'\n///级别4\n#define THOST_FTDC_RL_Level4 '4'\n///级别5\n#define THOST_FTDC_RL_Level5 '5'\n///级别6\n#define THOST_FTDC_RL_Level6 '6'\n///级别7\n#define THOST_FTDC_RL_Level7 '7'\n///级别8\n#define THOST_FTDC_RL_Level8 '8'\n///级别9\n#define THOST_FTDC_RL_Level9 '9'\n\ntypedef char TThostFtdcReturnLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReturnStandardType是一个返还标准类型\n/////////////////////////////////////////////////////////////////////////\n///分阶段返还\n#define THOST_FTDC_RSD_ByPeriod '1'\n///按某一标准\n#define THOST_FTDC_RSD_ByStandard '2'\n\ntypedef char TThostFtdcReturnStandardType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMortgageTypeType是一个质押类型类型\n/////////////////////////////////////////////////////////////////////////\n///质出\n#define THOST_FTDC_MT_Out '0'\n///质入\n#define THOST_FTDC_MT_In '1'\n\ntypedef char TThostFtdcMortgageTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorSettlementParamIDType是一个投资者结算参数代码类型\n/////////////////////////////////////////////////////////////////////////\n///质押比例\n#define THOST_FTDC_ISPI_MortgageRatio '4'\n///保证金算法\n#define THOST_FTDC_ISPI_MarginWay '5'\n///结算单结存是否包含质押\n#define THOST_FTDC_ISPI_BillDeposit '9'\n\ntypedef char TThostFtdcInvestorSettlementParamIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeSettlementParamIDType是一个交易所结算参数代码类型\n/////////////////////////////////////////////////////////////////////////\n///质押比例\n#define THOST_FTDC_ESPI_MortgageRatio '1'\n///分项资金导入项\n#define THOST_FTDC_ESPI_OtherFundItem '2'\n///分项资金入交易所出入金\n#define THOST_FTDC_ESPI_OtherFundImport '3'\n///中金所开户最低可用金额\n#define THOST_FTDC_ESPI_CFFEXMinPrepa '6'\n///郑商所结算方式\n#define THOST_FTDC_ESPI_CZCESettlementType '7'\n///交易所交割手续费收取方式\n#define THOST_FTDC_ESPI_ExchDelivFeeMode '9'\n///投资者交割手续费收取方式\n#define THOST_FTDC_ESPI_DelivFeeMode '0'\n///郑商所组合持仓保证金收取方式\n#define THOST_FTDC_ESPI_CZCEComMarginType 'A'\n///大商所套利保证金是否优惠\n#define THOST_FTDC_ESPI_DceComMarginType 'B'\n///虚值期权保证金优惠比率\n#define THOST_FTDC_ESPI_OptOutDisCountRate 'a'\n///最低保障系数\n#define THOST_FTDC_ESPI_OptMiniGuarantee 'b'\n\ntypedef char TThostFtdcExchangeSettlementParamIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSystemParamIDType是一个系统参数代码类型\n/////////////////////////////////////////////////////////////////////////\n///投资者代码最小长度\n#define THOST_FTDC_SPI_InvestorIDMinLength '1'\n///投资者帐号代码最小长度\n#define THOST_FTDC_SPI_AccountIDMinLength '2'\n///投资者开户默认登录权限\n#define THOST_FTDC_SPI_UserRightLogon '3'\n///投资者交易结算单成交汇总方式\n#define THOST_FTDC_SPI_SettlementBillTrade '4'\n///统一开户更新交易编码方式\n#define THOST_FTDC_SPI_TradingCode '5'\n///结算是否判断存在未复核的出入金和分项资金\n#define THOST_FTDC_SPI_CheckFund '6'\n///是否启用手续费模板数据权限\n#define THOST_FTDC_SPI_CommModelRight '7'\n///是否启用保证金率模板数据权限\n#define THOST_FTDC_SPI_MarginModelRight '9'\n///是否规范用户才能激活\n#define THOST_FTDC_SPI_IsStandardActive '8'\n///上传的交易所结算文件路径\n#define THOST_FTDC_SPI_UploadSettlementFile 'U'\n///上报保证金监控中心文件路径\n#define THOST_FTDC_SPI_DownloadCSRCFile 'D'\n///生成的结算单文件路径\n#define THOST_FTDC_SPI_SettlementBillFile 'S'\n///证监会文件标识\n#define THOST_FTDC_SPI_CSRCOthersFile 'C'\n///投资者照片路径\n#define THOST_FTDC_SPI_InvestorPhoto 'P'\n///全结经纪公司上传文件路径\n#define THOST_FTDC_SPI_CSRCData 'R'\n///开户密码录入方式\n#define THOST_FTDC_SPI_InvestorPwdModel 'I'\n///投资者中金所结算文件下载路径\n#define THOST_FTDC_SPI_CFFEXInvestorSettleFile 'F'\n///投资者代码编码方式\n#define THOST_FTDC_SPI_InvestorIDType 'a'\n///休眠户最高权益\n#define THOST_FTDC_SPI_FreezeMaxReMain 'r'\n///手续费相关操作实时上场开关\n#define THOST_FTDC_SPI_IsSync 'A'\n///解除开仓权限限制\n#define THOST_FTDC_SPI_RelieveOpenLimit 'O'\n///是否规范用户才能休眠\n#define THOST_FTDC_SPI_IsStandardFreeze 'X'\n///郑商所是否开放所有品种套保交易\n#define THOST_FTDC_SPI_CZCENormalProductHedge 'B'\n\ntypedef char TThostFtdcSystemParamIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeParamIDType是一个交易系统参数代码类型\n/////////////////////////////////////////////////////////////////////////\n///系统加密算法\n#define THOST_FTDC_TPID_EncryptionStandard 'E'\n///系统风险算法\n#define THOST_FTDC_TPID_RiskMode 'R'\n///系统风险算法是否全局 0-否 1-是\n#define THOST_FTDC_TPID_RiskModeGlobal 'G'\n///密码加密算法\n#define THOST_FTDC_TPID_modeEncode 'P'\n///价格小数位数参数\n#define THOST_FTDC_TPID_tickMode 'T'\n///用户最大会话数\n#define THOST_FTDC_TPID_SingleUserSessionMaxNum 'S'\n///最大连续登录失败数\n#define THOST_FTDC_TPID_LoginFailMaxNum 'L'\n///是否强制认证\n#define THOST_FTDC_TPID_IsAuthForce 'A'\n///是否冻结证券持仓\n#define THOST_FTDC_TPID_IsPosiFreeze 'F'\n///是否限仓\n#define THOST_FTDC_TPID_IsPosiLimit 'M'\n///郑商所询价时间间隔\n#define THOST_FTDC_TPID_ForQuoteTimeInterval 'Q'\n///是否期货限仓\n#define THOST_FTDC_TPID_IsFuturePosiLimit 'B'\n///是否期货下单频率限制\n#define THOST_FTDC_TPID_IsFutureOrderFreq 'C'\n///行权冻结是否计算盈利\n#define THOST_FTDC_TPID_IsExecOrderProfit 'H'\n///银期开户是否验证开户银行卡号是否是预留银行账户\n#define THOST_FTDC_TPID_IsCheckBankAcc 'I'\n///弱密码最后修改日期\n#define THOST_FTDC_TPID_PasswordDeadLine 'J'\n///强密码校验\n#define THOST_FTDC_TPID_IsStrongPassword 'K'\n///自有资金质押比\n#define THOST_FTDC_TPID_BalanceMorgage 'a'\n///最小密码长度\n#define THOST_FTDC_TPID_MinPwdLen 'O'\n///IP当日最大登陆失败次数\n#define THOST_FTDC_TPID_LoginFailMaxNumForIP 'U'\n///密码有效期\n#define THOST_FTDC_TPID_PasswordPeriod 'V'\n///历史密码重复限制次数\n#define THOST_FTDC_TPID_PwdHistoryCmp 'X'\n///转账是否验证预留银行账户\n#define THOST_FTDC_TPID_TranferChkProperty 'i'\n///非交易时间异常报单校验参数\n#define THOST_FTDC_TPID_TradeChkPhase 'j'\n///其他异常报单校验参数（价格和手数）\n#define THOST_FTDC_TPID_TradeChkPriceVol 'k'\n///卖出垂直价差组合新算法\n#define THOST_FTDC_TPID_NewBESMarginAlgo 'l'\n\ntypedef char TThostFtdcTradeParamIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettlementParamValueType是一个参数代码值类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSettlementParamValueType[256];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCounterIDType是一个计数器代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCounterIDType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorGroupNameType是一个投资者分组名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvestorGroupNameType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrandCodeType是一个牌号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBrandCodeType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWarehouseType是一个仓库类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcWarehouseType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductDateType是一个产期类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProductDateType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcGradeType是一个等级类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcGradeType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClassifyType是一个类别类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClassifyType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPositionType是一个货位类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPositionType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcYieldlyType是一个产地类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcYieldlyType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWeightType是一个公定重量类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcWeightType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSubEntryFundNoType是一个分项资金流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSubEntryFundNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileIDType是一个文件标识类型\n/////////////////////////////////////////////////////////////////////////\n///资金数据\n#define THOST_FTDC_FI_SettlementFund 'F'\n///成交数据\n#define THOST_FTDC_FI_Trade 'T'\n///投资者持仓数据\n#define THOST_FTDC_FI_InvestorPosition 'P'\n///投资者分项资金数据\n#define THOST_FTDC_FI_SubEntryFund 'O'\n///组合持仓数据\n#define THOST_FTDC_FI_CZCECombinationPos 'C'\n///上报保证金监控中心数据\n#define THOST_FTDC_FI_CSRCData 'R'\n///郑商所平仓了结数据\n#define THOST_FTDC_FI_CZCEClose 'L'\n///郑商所非平仓了结数据\n#define THOST_FTDC_FI_CZCENoClose 'N'\n///持仓明细数据\n#define THOST_FTDC_FI_PositionDtl 'D'\n///期权执行文件\n#define THOST_FTDC_FI_OptionStrike 'S'\n///结算价比对文件\n#define THOST_FTDC_FI_SettlementPriceComparison 'M'\n///上期所非持仓变动明细\n#define THOST_FTDC_FI_NonTradePosChange 'B'\n\ntypedef char TThostFtdcFileIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileNameType是一个文件名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFileNameType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileTypeType是一个文件上传类型类型\n/////////////////////////////////////////////////////////////////////////\n///结算\n#define THOST_FTDC_FUT_Settlement '0'\n///核对\n#define THOST_FTDC_FUT_Check '1'\n\ntypedef char TThostFtdcFileTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileFormatType是一个文件格式类型\n/////////////////////////////////////////////////////////////////////////\n///文本文件(.txt)\n#define THOST_FTDC_FFT_Txt '0'\n///压缩文件(.zip)\n#define THOST_FTDC_FFT_Zip '1'\n///DBF文件(.dbf)\n#define THOST_FTDC_FFT_DBF '2'\n\ntypedef char TThostFtdcFileFormatType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileUploadStatusType是一个文件状态类型\n/////////////////////////////////////////////////////////////////////////\n///上传成功\n#define THOST_FTDC_FUS_SucceedUpload '1'\n///上传失败\n#define THOST_FTDC_FUS_FailedUpload '2'\n///导入成功\n#define THOST_FTDC_FUS_SucceedLoad '3'\n///导入部分成功\n#define THOST_FTDC_FUS_PartSucceedLoad '4'\n///导入失败\n#define THOST_FTDC_FUS_FailedLoad '5'\n\ntypedef char TThostFtdcFileUploadStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTransferDirectionType是一个移仓方向类型\n/////////////////////////////////////////////////////////////////////////\n///移出\n#define THOST_FTDC_TD_Out '0'\n///移入\n#define THOST_FTDC_TD_In '1'\n\ntypedef char TThostFtdcTransferDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUploadModeType是一个上传文件类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUploadModeType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAccountIDType是一个投资者帐号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAccountIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankFlagType是一个银行统一标识类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankFlagType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankAccountType是一个银行账户类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankAccountType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOpenNameType是一个银行账户的开户人名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOpenNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOpenBankType是一个银行账户的开户行类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOpenBankType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankNameType是一个银行名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankNameType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPublishPathType是一个发布路径类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPublishPathType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOperatorIDType是一个操作员代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOperatorIDType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMonthCountType是一个月份数量类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcMonthCountType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAdvanceMonthArrayType是一个月份提前数组类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAdvanceMonthArrayType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDateExprType是一个日期表达式类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDateExprType[1025];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentIDExprType是一个合约代码表达式类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInstrumentIDExprType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentNameExprType是一个合约名称表达式类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInstrumentNameExprType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSpecialCreateRuleType是一个特殊的创建规则类型\n/////////////////////////////////////////////////////////////////////////\n///没有特殊创建规则\n#define THOST_FTDC_SC_NoSpecialRule '0'\n///不包含春节\n#define THOST_FTDC_SC_NoSpringFestival '1'\n\ntypedef char TThostFtdcSpecialCreateRuleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBasisPriceTypeType是一个挂牌基准价类型类型\n/////////////////////////////////////////////////////////////////////////\n///上一合约结算价\n#define THOST_FTDC_IPT_LastSettlement '1'\n///上一合约收盘价\n#define THOST_FTDC_IPT_LaseClose '2'\n\ntypedef char TThostFtdcBasisPriceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductLifePhaseType是一个产品生命周期状态类型\n/////////////////////////////////////////////////////////////////////////\n///活跃\n#define THOST_FTDC_PLP_Active '1'\n///不活跃\n#define THOST_FTDC_PLP_NonActive '2'\n///注销\n#define THOST_FTDC_PLP_Canceled '3'\n\ntypedef char TThostFtdcProductLifePhaseType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDeliveryModeType是一个交割方式类型\n/////////////////////////////////////////////////////////////////////////\n///现金交割\n#define THOST_FTDC_DM_CashDeliv '1'\n///实物交割\n#define THOST_FTDC_DM_CommodityDeliv '2'\n\ntypedef char TThostFtdcDeliveryModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLogLevelType是一个日志级别类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLogLevelType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProcessNameType是一个存储过程名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProcessNameType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOperationMemoType是一个操作摘要类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOperationMemoType[1025];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundIOTypeType是一个出入金类型类型\n/////////////////////////////////////////////////////////////////////////\n///出入金\n#define THOST_FTDC_FIOT_FundIO '1'\n///银期转帐\n#define THOST_FTDC_FIOT_Transfer '2'\n///银期换汇\n#define THOST_FTDC_FIOT_SwapCurrency '3'\n\ntypedef char TThostFtdcFundIOTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundTypeType是一个资金类型类型\n/////////////////////////////////////////////////////////////////////////\n///银行存款\n#define THOST_FTDC_FT_Deposite '1'\n///分项资金\n#define THOST_FTDC_FT_ItemFund '2'\n///公司调整\n#define THOST_FTDC_FT_Company '3'\n///资金内转\n#define THOST_FTDC_FT_InnerTransfer '4'\n\ntypedef char TThostFtdcFundTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundDirectionType是一个出入金方向类型\n/////////////////////////////////////////////////////////////////////////\n///入金\n#define THOST_FTDC_FD_In '1'\n///出金\n#define THOST_FTDC_FD_Out '2'\n\ntypedef char TThostFtdcFundDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundStatusType是一个资金状态类型\n/////////////////////////////////////////////////////////////////////////\n///已录入\n#define THOST_FTDC_FS_Record '1'\n///已复核\n#define THOST_FTDC_FS_Check '2'\n///已冲销\n#define THOST_FTDC_FS_Charge '3'\n\ntypedef char TThostFtdcFundStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBillNoType是一个票据号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBillNoType[15];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBillNameType是一个票据名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBillNameType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPublishStatusType是一个发布状态类型\n/////////////////////////////////////////////////////////////////////////\n///未发布\n#define THOST_FTDC_PS_None '1'\n///正在发布\n#define THOST_FTDC_PS_Publishing '2'\n///已发布\n#define THOST_FTDC_PS_Published '3'\n\ntypedef char TThostFtdcPublishStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEnumValueIDType是一个枚举值代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcEnumValueIDType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEnumValueTypeType是一个枚举值类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcEnumValueTypeType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEnumValueLabelType是一个枚举值名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcEnumValueLabelType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEnumValueResultType是一个枚举值结果类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcEnumValueResultType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSystemStatusType是一个系统状态类型\n/////////////////////////////////////////////////////////////////////////\n///不活跃\n#define THOST_FTDC_ES_NonActive '1'\n///启动\n#define THOST_FTDC_ES_Startup '2'\n///交易开始初始化\n#define THOST_FTDC_ES_Initialize '3'\n///交易完成初始化\n#define THOST_FTDC_ES_Initialized '4'\n///收市开始\n#define THOST_FTDC_ES_Close '5'\n///收市完成\n#define THOST_FTDC_ES_Closed '6'\n///结算\n#define THOST_FTDC_ES_Settlement '7'\n\ntypedef char TThostFtdcSystemStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettlementStatusType是一个结算状态类型\n/////////////////////////////////////////////////////////////////////////\n///初始\n#define THOST_FTDC_STS_Initialize '0'\n///结算中\n#define THOST_FTDC_STS_Settlementing '1'\n///已结算\n#define THOST_FTDC_STS_Settlemented '2'\n///结算完成\n#define THOST_FTDC_STS_Finished '3'\n\ntypedef char TThostFtdcSettlementStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRangeIntTypeType是一个限定值类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRangeIntTypeType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRangeIntFromType是一个限定值下限类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRangeIntFromType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRangeIntToType是一个限定值上限类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRangeIntToType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFunctionIDType是一个功能代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFunctionIDType[25];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFunctionValueCodeType是一个功能编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFunctionValueCodeType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFunctionNameType是一个功能名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFunctionNameType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRoleIDType是一个角色编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRoleIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRoleNameType是一个角色名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRoleNameType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDescriptionType是一个描述类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDescriptionType[401];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombineIDType是一个组合编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCombineIDType[25];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombineTypeType是一个组合类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCombineTypeType[25];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorTypeType是一个投资者类型类型\n/////////////////////////////////////////////////////////////////////////\n///自然人\n#define THOST_FTDC_CT_Person '0'\n///法人\n#define THOST_FTDC_CT_Company '1'\n///投资基金\n#define THOST_FTDC_CT_Fund '2'\n///特殊法人\n#define THOST_FTDC_CT_SpecialOrgan '3'\n///资管户\n#define THOST_FTDC_CT_Asset '4'\n\ntypedef char TThostFtdcInvestorTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerTypeType是一个经纪公司类型类型\n/////////////////////////////////////////////////////////////////////////\n///交易会员\n#define THOST_FTDC_BT_Trade '0'\n///交易结算会员\n#define THOST_FTDC_BT_TradeSettle '1'\n\ntypedef char TThostFtdcBrokerTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRiskLevelType是一个风险等级类型\n/////////////////////////////////////////////////////////////////////////\n///低风险客户\n#define THOST_FTDC_FAS_Low '1'\n///普通客户\n#define THOST_FTDC_FAS_Normal '2'\n///关注客户\n#define THOST_FTDC_FAS_Focus '3'\n///风险客户\n#define THOST_FTDC_FAS_Risk '4'\n\ntypedef char TThostFtdcRiskLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFeeAcceptStyleType是一个手续费收取方式类型\n/////////////////////////////////////////////////////////////////////////\n///按交易收取\n#define THOST_FTDC_FAS_ByTrade '1'\n///按交割收取\n#define THOST_FTDC_FAS_ByDeliv '2'\n///不收\n#define THOST_FTDC_FAS_None '3'\n///按指定手续费收取\n#define THOST_FTDC_FAS_FixFee '4'\n\ntypedef char TThostFtdcFeeAcceptStyleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPasswordTypeType是一个密码类型类型\n/////////////////////////////////////////////////////////////////////////\n///交易密码\n#define THOST_FTDC_PWDT_Trade '1'\n///资金密码\n#define THOST_FTDC_PWDT_Account '2'\n\ntypedef char TThostFtdcPasswordTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAlgorithmType是一个盈亏算法类型\n/////////////////////////////////////////////////////////////////////////\n///浮盈浮亏都计算\n#define THOST_FTDC_AG_All '1'\n///浮盈不计，浮亏计\n#define THOST_FTDC_AG_OnlyLost '2'\n///浮盈计，浮亏不计\n#define THOST_FTDC_AG_OnlyGain '3'\n///浮盈浮亏都不计算\n#define THOST_FTDC_AG_None '4'\n\ntypedef char TThostFtdcAlgorithmType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIncludeCloseProfitType是一个是否包含平仓盈利类型\n/////////////////////////////////////////////////////////////////////////\n///包含平仓盈利\n#define THOST_FTDC_ICP_Include '0'\n///不包含平仓盈利\n#define THOST_FTDC_ICP_NotInclude '2'\n\ntypedef char TThostFtdcIncludeCloseProfitType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAllWithoutTradeType是一个是否受可提比例限制类型\n/////////////////////////////////////////////////////////////////////////\n///无仓无成交不受可提比例限制\n#define THOST_FTDC_AWT_Enable '0'\n///受可提比例限制\n#define THOST_FTDC_AWT_Disable '2'\n///无仓不受可提比例限制\n#define THOST_FTDC_AWT_NoHoldEnable '3'\n\ntypedef char TThostFtdcAllWithoutTradeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommentType是一个盈亏算法说明类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCommentType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVersionType是一个版本号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcVersionType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeCodeType是一个交易代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTradeCodeType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeDateType是一个交易日期类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTradeDateType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeTimeType是一个交易时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTradeTimeType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeSerialType是一个发起方流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTradeSerialType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeSerialNoType是一个发起方流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcTradeSerialNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureIDType是一个期货公司代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankIDType是一个银行代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankIDType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankBrchIDType是一个银行分中心代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankBrchIDType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankBranchIDType是一个分中心代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankBranchIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOperNoType是一个交易柜员类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOperNoType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDeviceIDType是一个渠道标志类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDeviceIDType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRecordNumType是一个记录数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRecordNumType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureAccountType是一个期货资金账号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureAccountType[22];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFuturePwdFlagType是一个资金密码核对标志类型\n/////////////////////////////////////////////////////////////////////////\n///不核对\n#define THOST_FTDC_FPWD_UnCheck '0'\n///核对\n#define THOST_FTDC_FPWD_Check '1'\n\ntypedef char TThostFtdcFuturePwdFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTransferTypeType是一个银期转账类型类型\n/////////////////////////////////////////////////////////////////////////\n///银行转期货\n#define THOST_FTDC_TT_BankToFuture '0'\n///期货转银行\n#define THOST_FTDC_TT_FutureToBank '1'\n\ntypedef char TThostFtdcTransferTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureAccPwdType是一个期货资金密码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureAccPwdType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrencyCodeType是一个币种类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCurrencyCodeType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRetCodeType是一个响应代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRetCodeType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRetInfoType是一个响应信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRetInfoType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeAmtType是一个银行总余额类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTradeAmtType[20];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUseAmtType是一个银行可用余额类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUseAmtType[20];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFetchAmtType是一个银行可取余额类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFetchAmtType[20];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTransferValidFlagType是一个转账有效标志类型\n/////////////////////////////////////////////////////////////////////////\n///无效或失败\n#define THOST_FTDC_TVF_Invalid '0'\n///有效\n#define THOST_FTDC_TVF_Valid '1'\n///冲正\n#define THOST_FTDC_TVF_Reverse '2'\n\ntypedef char TThostFtdcTransferValidFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCertCodeType是一个证件号码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCertCodeType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReasonType是一个事由类型\n/////////////////////////////////////////////////////////////////////////\n///错单\n#define THOST_FTDC_RN_CD '0'\n///资金在途\n#define THOST_FTDC_RN_ZT '1'\n///其它\n#define THOST_FTDC_RN_QT '2'\n\ntypedef char TThostFtdcReasonType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundProjectIDType是一个资金项目编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFundProjectIDType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSexType是一个性别类型\n/////////////////////////////////////////////////////////////////////////\n///未知\n#define THOST_FTDC_SEX_None '0'\n///男\n#define THOST_FTDC_SEX_Man '1'\n///女\n#define THOST_FTDC_SEX_Woman '2'\n\ntypedef char TThostFtdcSexType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProfessionType是一个职业类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProfessionType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcNationalType是一个国籍类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcNationalType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProvinceType是一个省类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProvinceType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRegionType是一个区类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRegionType[16];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCountryType是一个国家类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCountryType[16];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLicenseNOType是一个营业执照类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLicenseNOType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCompanyTypeType是一个企业性质类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCompanyTypeType[16];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBusinessScopeType是一个经营范围类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBusinessScopeType[1001];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCapitalCurrencyType是一个注册资本币种类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCapitalCurrencyType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserTypeType是一个用户类型类型\n/////////////////////////////////////////////////////////////////////////\n///投资者\n#define THOST_FTDC_UT_Investor '0'\n///操作员\n#define THOST_FTDC_UT_Operator '1'\n///管理员\n#define THOST_FTDC_UT_SuperUser '2'\n\ntypedef char TThostFtdcUserTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBranchIDType是一个营业部编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBranchIDType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRateTypeType是一个费率类型类型\n/////////////////////////////////////////////////////////////////////////\n///保证金率\n#define THOST_FTDC_RATETYPE_MarginRate '2'\n\ntypedef char TThostFtdcRateTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcNoteTypeType是一个通知类型类型\n/////////////////////////////////////////////////////////////////////////\n///交易结算单\n#define THOST_FTDC_NOTETYPE_TradeSettleBill '1'\n///交易结算月报\n#define THOST_FTDC_NOTETYPE_TradeSettleMonth '2'\n///追加保证金通知书\n#define THOST_FTDC_NOTETYPE_CallMarginNotes '3'\n///强行平仓通知书\n#define THOST_FTDC_NOTETYPE_ForceCloseNotes '4'\n///成交通知书\n#define THOST_FTDC_NOTETYPE_TradeNotes '5'\n///交割通知书\n#define THOST_FTDC_NOTETYPE_DelivNotes '6'\n\ntypedef char TThostFtdcNoteTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettlementStyleType是一个结算单方式类型\n/////////////////////////////////////////////////////////////////////////\n///逐日盯市\n#define THOST_FTDC_SBS_Day '1'\n///逐笔对冲\n#define THOST_FTDC_SBS_Volume '2'\n\ntypedef char TThostFtdcSettlementStyleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerDNSType是一个域名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBrokerDNSType[256];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSentenceType是一个语句类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSentenceType[501];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettlementBillTypeType是一个结算单类型类型\n/////////////////////////////////////////////////////////////////////////\n///日报\n#define THOST_FTDC_ST_Day '0'\n///月报\n#define THOST_FTDC_ST_Month '1'\n\ntypedef char TThostFtdcSettlementBillTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserRightTypeType是一个客户权限类型类型\n/////////////////////////////////////////////////////////////////////////\n///登录\n#define THOST_FTDC_URT_Logon '1'\n///银期转帐\n#define THOST_FTDC_URT_Transfer '2'\n///邮寄结算单\n#define THOST_FTDC_URT_EMail '3'\n///传真结算单\n#define THOST_FTDC_URT_Fax '4'\n///条件单\n#define THOST_FTDC_URT_ConditionOrder '5'\n\ntypedef char TThostFtdcUserRightTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMarginPriceTypeType是一个保证金价格类型类型\n/////////////////////////////////////////////////////////////////////////\n///昨结算价\n#define THOST_FTDC_MPT_PreSettlementPrice '1'\n///最新价\n#define THOST_FTDC_MPT_SettlementPrice '2'\n///成交均价\n#define THOST_FTDC_MPT_AveragePrice '3'\n///开仓价\n#define THOST_FTDC_MPT_OpenPrice '4'\n\ntypedef char TThostFtdcMarginPriceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBillGenStatusType是一个结算单生成状态类型\n/////////////////////////////////////////////////////////////////////////\n///未生成\n#define THOST_FTDC_BGS_None '0'\n///生成中\n#define THOST_FTDC_BGS_NoGenerated '1'\n///已生成\n#define THOST_FTDC_BGS_Generated '2'\n\ntypedef char TThostFtdcBillGenStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAlgoTypeType是一个算法类型类型\n/////////////////////////////////////////////////////////////////////////\n///持仓处理算法\n#define THOST_FTDC_AT_HandlePositionAlgo '1'\n///寻找保证金率算法\n#define THOST_FTDC_AT_FindMarginRateAlgo '2'\n\ntypedef char TThostFtdcAlgoTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHandlePositionAlgoIDType是一个持仓处理算法编号类型\n/////////////////////////////////////////////////////////////////////////\n///基本\n#define THOST_FTDC_HPA_Base '1'\n///大连商品交易所\n#define THOST_FTDC_HPA_DCE '2'\n///郑州商品交易所\n#define THOST_FTDC_HPA_CZCE '3'\n\ntypedef char TThostFtdcHandlePositionAlgoIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFindMarginRateAlgoIDType是一个寻找保证金率算法编号类型\n/////////////////////////////////////////////////////////////////////////\n///基本\n#define THOST_FTDC_FMRA_Base '1'\n///大连商品交易所\n#define THOST_FTDC_FMRA_DCE '2'\n///郑州商品交易所\n#define THOST_FTDC_FMRA_CZCE '3'\n\ntypedef char TThostFtdcFindMarginRateAlgoIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHandleTradingAccountAlgoIDType是一个资金处理算法编号类型\n/////////////////////////////////////////////////////////////////////////\n///基本\n#define THOST_FTDC_HTAA_Base '1'\n///大连商品交易所\n#define THOST_FTDC_HTAA_DCE '2'\n///郑州商品交易所\n#define THOST_FTDC_HTAA_CZCE '3'\n\ntypedef char TThostFtdcHandleTradingAccountAlgoIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPersonTypeType是一个联系人类型类型\n/////////////////////////////////////////////////////////////////////////\n///指定下单人\n#define THOST_FTDC_PST_Order '1'\n///开户授权人\n#define THOST_FTDC_PST_Open '2'\n///资金调拨人\n#define THOST_FTDC_PST_Fund '3'\n///结算单确认人\n#define THOST_FTDC_PST_Settlement '4'\n///法人\n#define THOST_FTDC_PST_Company '5'\n///法人代表\n#define THOST_FTDC_PST_Corporation '6'\n///投资者联系人\n#define THOST_FTDC_PST_LinkMan '7'\n///分户管理资产负责人\n#define THOST_FTDC_PST_Ledger '8'\n///托（保）管人\n#define THOST_FTDC_PST_Trustee '9'\n///托（保）管机构法人代表\n#define THOST_FTDC_PST_TrusteeCorporation 'A'\n///托（保）管机构开户授权人\n#define THOST_FTDC_PST_TrusteeOpen 'B'\n///托（保）管机构联系人\n#define THOST_FTDC_PST_TrusteeContact 'C'\n///境外自然人参考证件\n#define THOST_FTDC_PST_ForeignerRefer 'D'\n///法人代表参考证件\n#define THOST_FTDC_PST_CorporationRefer 'E'\n\ntypedef char TThostFtdcPersonTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcQueryInvestorRangeType是一个查询范围类型\n/////////////////////////////////////////////////////////////////////////\n///所有\n#define THOST_FTDC_QIR_All '1'\n///查询分类\n#define THOST_FTDC_QIR_Group '2'\n///单一投资者\n#define THOST_FTDC_QIR_Single '3'\n\ntypedef char TThostFtdcQueryInvestorRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorRiskStatusType是一个投资者风险状态类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_IRS_Normal '1'\n///警告\n#define THOST_FTDC_IRS_Warn '2'\n///追保\n#define THOST_FTDC_IRS_Call '3'\n///强平\n#define THOST_FTDC_IRS_Force '4'\n///异常\n#define THOST_FTDC_IRS_Exception '5'\n\ntypedef char TThostFtdcInvestorRiskStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLegIDType是一个单腿编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcLegIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLegMultipleType是一个单腿乘数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcLegMultipleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcImplyLevelType是一个派生层数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcImplyLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClearAccountType是一个结算账户类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClearAccountType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrganNOType是一个结算账户类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrganNOType[6];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClearbarchIDType是一个结算账户联行号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClearbarchIDType[6];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserEventTypeType是一个用户事件类型类型\n/////////////////////////////////////////////////////////////////////////\n///登录\n#define THOST_FTDC_UET_Login '1'\n///登出\n#define THOST_FTDC_UET_Logout '2'\n///CTP校验通过\n#define THOST_FTDC_UET_Trading '3'\n///CTP校验失败\n#define THOST_FTDC_UET_TradingError '4'\n///修改密码\n#define THOST_FTDC_UET_UpdatePassword '5'\n///客户端认证\n#define THOST_FTDC_UET_Authenticate '6'\n///终端信息上报\n#define THOST_FTDC_UET_SubmitSysInfo '7'\n///转账\n#define THOST_FTDC_UET_Transfer '8'\n///其他\n#define THOST_FTDC_UET_Other '9'\n///修改资金密码\n#define THOST_FTDC_UET_UpdateTradingAccountPassword 'a'\n\ntypedef char TThostFtdcUserEventTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserEventInfoType是一个用户事件信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUserEventInfoType[1025];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCloseStyleType是一个平仓方式类型\n/////////////////////////////////////////////////////////////////////////\n///先开先平\n#define THOST_FTDC_ICS_Close '0'\n///先平今再平昨\n#define THOST_FTDC_ICS_CloseToday '1'\n\ntypedef char TThostFtdcCloseStyleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStatModeType是一个统计方式类型\n/////////////////////////////////////////////////////////////////////////\n///----\n#define THOST_FTDC_SM_Non '0'\n///按合约统计\n#define THOST_FTDC_SM_Instrument '1'\n///按产品统计\n#define THOST_FTDC_SM_Product '2'\n///按投资者统计\n#define THOST_FTDC_SM_Investor '3'\n\ntypedef char TThostFtdcStatModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcParkedOrderStatusType是一个预埋单状态类型\n/////////////////////////////////////////////////////////////////////////\n///未发送\n#define THOST_FTDC_PAOS_NotSend '1'\n///已发送\n#define THOST_FTDC_PAOS_Send '2'\n///已删除\n#define THOST_FTDC_PAOS_Deleted '3'\n\ntypedef char TThostFtdcParkedOrderStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcParkedOrderIDType是一个预埋报单编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcParkedOrderIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcParkedOrderActionIDType是一个预埋撤单编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcParkedOrderActionIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVirDealStatusType是一个处理状态类型\n/////////////////////////////////////////////////////////////////////////\n///正在处理\n#define THOST_FTDC_VDS_Dealing '1'\n///处理成功\n#define THOST_FTDC_VDS_DeaclSucceed '2'\n\ntypedef char TThostFtdcVirDealStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrgSystemIDType是一个原有系统代码类型\n/////////////////////////////////////////////////////////////////////////\n///综合交易平台\n#define THOST_FTDC_ORGS_Standard '0'\n///易盛系统\n#define THOST_FTDC_ORGS_ESunny '1'\n///金仕达V6系统\n#define THOST_FTDC_ORGS_KingStarV6 '2'\n\ntypedef char TThostFtdcOrgSystemIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVirTradeStatusType是一个交易状态类型\n/////////////////////////////////////////////////////////////////////////\n///正常处理中\n#define THOST_FTDC_VTS_NaturalDeal '0'\n///成功结束\n#define THOST_FTDC_VTS_SucceedEnd '1'\n///失败结束\n#define THOST_FTDC_VTS_FailedEND '2'\n///异常中\n#define THOST_FTDC_VTS_Exception '3'\n///已人工异常处理\n#define THOST_FTDC_VTS_ManualDeal '4'\n///通讯异常 ，请人工处理\n#define THOST_FTDC_VTS_MesException '5'\n///系统出错，请人工处理\n#define THOST_FTDC_VTS_SysException '6'\n\ntypedef char TThostFtdcVirTradeStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVirBankAccTypeType是一个银行帐户类型类型\n/////////////////////////////////////////////////////////////////////////\n///存折\n#define THOST_FTDC_VBAT_BankBook '1'\n///储蓄卡\n#define THOST_FTDC_VBAT_BankCard '2'\n///信用卡\n#define THOST_FTDC_VBAT_CreditCard '3'\n\ntypedef char TThostFtdcVirBankAccTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVirementStatusType是一个银行帐户类型类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_VMS_Natural '0'\n///销户\n#define THOST_FTDC_VMS_Canceled '9'\n\ntypedef char TThostFtdcVirementStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVirementAvailAbilityType是一个有效标志类型\n/////////////////////////////////////////////////////////////////////////\n///未确认\n#define THOST_FTDC_VAA_NoAvailAbility '0'\n///有效\n#define THOST_FTDC_VAA_AvailAbility '1'\n///冲正\n#define THOST_FTDC_VAA_Repeal '2'\n\ntypedef char TThostFtdcVirementAvailAbilityType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcVirementTradeCodeType是一个交易代码类型\n/////////////////////////////////////////////////////////////////////////\n///银行发起银行资金转期货\n#define THOST_FTDC_VTC_BankBankToFuture '102001'\n///银行发起期货资金转银行\n#define THOST_FTDC_VTC_BankFutureToBank '102002'\n///期货发起银行资金转期货\n#define THOST_FTDC_VTC_FutureBankToFuture '202001'\n///期货发起期货资金转银行\n#define THOST_FTDC_VTC_FutureFutureToBank '202002'\n\ntypedef char TThostFtdcVirementTradeCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPhotoTypeNameType是一个影像类型名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPhotoTypeNameType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPhotoTypeIDType是一个影像类型代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPhotoTypeIDType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPhotoNameType是一个影像名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPhotoNameType[161];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTopicIDType是一个主题代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcTopicIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReportTypeIDType是一个交易报告类型标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcReportTypeIDType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCharacterIDType是一个交易特征代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCharacterIDType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLParamIDType是一个参数代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLParamIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLInvestorTypeType是一个投资者类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLInvestorTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLIdCardTypeType是一个证件类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLIdCardTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLTradeDirectType是一个资金进出方向类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLTradeDirectType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLTradeModelType是一个资金进出方式类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLTradeModelType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLOpParamValueType是一个业务参数代码值类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcAMLOpParamValueType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLCustomerCardTypeType是一个客户身份证件/证明文件类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLCustomerCardTypeType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLInstitutionNameType是一个金融机构网点名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLInstitutionNameType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLDistrictIDType是一个金融机构网点所在地区行政区划代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLDistrictIDType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLRelationShipType是一个金融机构网点与大额交易的关系类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLRelationShipType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLInstitutionTypeType是一个金融机构网点代码类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLInstitutionTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLInstitutionIDType是一个金融机构网点代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLInstitutionIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLAccountTypeType是一个账户类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLAccountTypeType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLTradingTypeType是一个交易方式类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLTradingTypeType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLTransactClassType是一个涉外收支交易分类与代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLTransactClassType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLCapitalIOType是一个资金收付标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLCapitalIOType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLSiteType是一个交易地点类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLSiteType[10];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLCapitalPurposeType是一个资金用途类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLCapitalPurposeType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLReportTypeType是一个报文类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLReportTypeType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLSerialNoType是一个编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLSerialNoType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLStatusType是一个状态类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLStatusType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLGenStatusType是一个Aml生成方式类型\n/////////////////////////////////////////////////////////////////////////\n///程序生成\n#define THOST_FTDC_GEN_Program '0'\n///人工生成\n#define THOST_FTDC_GEN_HandWork '1'\n\ntypedef char TThostFtdcAMLGenStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLSeqCodeType是一个业务标识号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLSeqCodeType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLFileNameType是一个AML文件名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLFileNameType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLMoneyType是一个反洗钱资金类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcAMLMoneyType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLFileAmountType是一个反洗钱资金类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcAMLFileAmountType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCFMMCKeyType是一个密钥类型(保证金监管)类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCFMMCKeyType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCFMMCTokenType是一个令牌类型(保证金监管)类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCFMMCTokenType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCFMMCKeyKindType是一个动态密钥类别(保证金监管)类型\n/////////////////////////////////////////////////////////////////////////\n///主动请求更新\n#define THOST_FTDC_CFMMCKK_REQUEST 'R'\n///CFMMC自动更新\n#define THOST_FTDC_CFMMCKK_AUTO 'A'\n///CFMMC手动更新\n#define THOST_FTDC_CFMMCKK_MANUAL 'M'\n\ntypedef char TThostFtdcCFMMCKeyKindType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLReportNameType是一个报文名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAMLReportNameType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIndividualNameType是一个个人姓名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIndividualNameType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrencyIDType是一个币种代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCurrencyIDType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCustNumberType是一个客户编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCustNumberType[36];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrganCodeType是一个机构编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrganCodeType[36];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrganNameType是一个机构名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrganNameType[71];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSuperOrganCodeType是一个上级机构编码,即期货公司总部、银行总行类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSuperOrganCodeType[12];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSubBranchIDType是一个分支机构类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSubBranchIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSubBranchNameType是一个分支机构名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSubBranchNameType[71];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBranchNetCodeType是一个机构网点号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBranchNetCodeType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBranchNetNameType是一个机构网点名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBranchNetNameType[71];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrganFlagType是一个机构标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrganFlagType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankCodingForFutureType是一个银行对期货公司的编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankCodingForFutureType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankReturnCodeType是一个银行对返回码的定义类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankReturnCodeType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPlateReturnCodeType是一个银期转帐平台对返回码的定义类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPlateReturnCodeType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankSubBranchIDType是一个银行分支机构编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankSubBranchIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureBranchIDType是一个期货分支机构编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureBranchIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReturnCodeType是一个返回代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcReturnCodeType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOperatorCodeType是一个操作员类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOperatorCodeType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClearDepIDType是一个机构结算帐户机构号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClearDepIDType[6];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClearBrchIDType是一个机构结算帐户联行号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClearBrchIDType[6];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClearNameType是一个机构结算帐户名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClearNameType[71];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankAccountNameType是一个银行帐户名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankAccountNameType[71];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvDepIDType是一个机构投资人账号机构号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvDepIDType[6];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvBrchIDType是一个机构投资人联行号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvBrchIDType[6];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMessageFormatVersionType是一个信息格式版本类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcMessageFormatVersionType[36];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDigestType是一个摘要类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDigestType[36];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAuthenticDataType是一个认证数据类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAuthenticDataType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPasswordKeyType是一个密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPasswordKeyType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureAccountNameType是一个期货帐户名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureAccountNameType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMobilePhoneType是一个手机类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcMobilePhoneType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureMainKeyType是一个期货公司主密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureMainKeyType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureWorkKeyType是一个期货公司工作密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureWorkKeyType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureTransKeyType是一个期货公司传输密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFutureTransKeyType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankMainKeyType是一个银行主密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankMainKeyType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankWorkKeyType是一个银行工作密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankWorkKeyType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankTransKeyType是一个银行传输密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankTransKeyType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankServerDescriptionType是一个银行服务器描述信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankServerDescriptionType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAddInfoType是一个附加信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAddInfoType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDescrInfoForReturnCodeType是一个返回码描述类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDescrInfoForReturnCodeType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCountryCodeType是一个国家代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCountryCodeType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSerialType是一个流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSerialType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPlateSerialType是一个平台流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcPlateSerialType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankSerialType是一个银行流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankSerialType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCorrectSerialType是一个被冲正交易流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCorrectSerialType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureSerialType是一个期货公司流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcFutureSerialType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcApplicationIDType是一个应用标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcApplicationIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankProxyIDType是一个银行代理标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcBankProxyIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBTCoreIDType是一个银期转帐核心系统标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcFBTCoreIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcServerPortType是一个服务端口号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcServerPortType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRepealedTimesType是一个已经冲正次数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcRepealedTimesType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRepealTimeIntervalType是一个冲正时间间隔类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcRepealTimeIntervalType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTotalTimesType是一个每日累计转帐次数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcTotalTimesType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBTRequestIDType是一个请求ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcFBTRequestIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTIDType是一个交易ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcTIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeAmountType是一个交易金额（元）类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcTradeAmountType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCustFeeType是一个应收客户费用（元）类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcCustFeeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureFeeType是一个应收期货公司费用（元）类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcFutureFeeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSingleMaxAmtType是一个单笔最高限额类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcSingleMaxAmtType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSingleMinAmtType是一个单笔最低限额类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcSingleMinAmtType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTotalAmtType是一个每日累计转帐额度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcTotalAmtType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCertificationTypeType是一个证件类型类型\n/////////////////////////////////////////////////////////////////////////\n///身份证\n#define THOST_FTDC_CFT_IDCard '0'\n///护照\n#define THOST_FTDC_CFT_Passport '1'\n///军官证\n#define THOST_FTDC_CFT_OfficerIDCard '2'\n///士兵证\n#define THOST_FTDC_CFT_SoldierIDCard '3'\n///回乡证\n#define THOST_FTDC_CFT_HomeComingCard '4'\n///户口簿\n#define THOST_FTDC_CFT_HouseholdRegister  '5'\n///营业执照号\n#define THOST_FTDC_CFT_LicenseNo '6'\n///组织机构代码证\n#define THOST_FTDC_CFT_InstitutionCodeCard '7'\n///临时营业执照号\n#define THOST_FTDC_CFT_TempLicenseNo '8'\n///民办非企业登记证书\n#define THOST_FTDC_CFT_NoEnterpriseLicenseNo '9'\n///其他证件\n#define THOST_FTDC_CFT_OtherCard 'x'\n///主管部门批文\n#define THOST_FTDC_CFT_SuperDepAgree 'a'\n\ntypedef char TThostFtdcCertificationTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileBusinessCodeType是一个文件业务功能类型\n/////////////////////////////////////////////////////////////////////////\n///其他\n#define THOST_FTDC_FBC_Others '0'\n///转账交易明细对账\n#define THOST_FTDC_FBC_TransferDetails '1'\n///客户账户状态对账\n#define THOST_FTDC_FBC_CustAccStatus '2'\n///账户类交易明细对账\n#define THOST_FTDC_FBC_AccountTradeDetails '3'\n///期货账户信息变更明细对账\n#define THOST_FTDC_FBC_FutureAccountChangeInfoDetails '4'\n///客户资金台账余额明细对账\n#define THOST_FTDC_FBC_CustMoneyDetail '5'\n///客户销户结息明细对账\n#define THOST_FTDC_FBC_CustCancelAccountInfo '6'\n///客户资金余额对账结果\n#define THOST_FTDC_FBC_CustMoneyResult '7'\n///其它对账异常结果文件\n#define THOST_FTDC_FBC_OthersExceptionResult '8'\n///客户结息净额明细\n#define THOST_FTDC_FBC_CustInterestNetMoneyDetails '9'\n///客户资金交收明细\n#define THOST_FTDC_FBC_CustMoneySendAndReceiveDetails 'a'\n///法人存管银行资金交收汇总\n#define THOST_FTDC_FBC_CorporationMoneyTotal 'b'\n///主体间资金交收汇总\n#define THOST_FTDC_FBC_MainbodyMoneyTotal 'c'\n///总分平衡监管数据\n#define THOST_FTDC_FBC_MainPartMonitorData 'd'\n///存管银行备付金余额\n#define THOST_FTDC_FBC_PreparationMoney 'e'\n///协办存管银行资金监管数据\n#define THOST_FTDC_FBC_BankMoneyMonitorData 'f'\n\ntypedef char TThostFtdcFileBusinessCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCashExchangeCodeType是一个汇钞标志类型\n/////////////////////////////////////////////////////////////////////////\n///汇\n#define THOST_FTDC_CEC_Exchange '1'\n///钞\n#define THOST_FTDC_CEC_Cash '2'\n\ntypedef char TThostFtdcCashExchangeCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcYesNoIndicatorType是一个是或否标识类型\n/////////////////////////////////////////////////////////////////////////\n///是\n#define THOST_FTDC_YNI_Yes '0'\n///否\n#define THOST_FTDC_YNI_No '1'\n\ntypedef char TThostFtdcYesNoIndicatorType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBanlanceTypeType是一个余额类型类型\n/////////////////////////////////////////////////////////////////////////\n///当前余额\n#define THOST_FTDC_BLT_CurrentMoney '0'\n///可用余额\n#define THOST_FTDC_BLT_UsableMoney '1'\n///可取余额\n#define THOST_FTDC_BLT_FetchableMoney '2'\n///冻结余额\n#define THOST_FTDC_BLT_FreezeMoney '3'\n\ntypedef char TThostFtdcBanlanceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcGenderType是一个性别类型\n/////////////////////////////////////////////////////////////////////////\n///未知状态\n#define THOST_FTDC_GD_Unknown '0'\n///男\n#define THOST_FTDC_GD_Male '1'\n///女\n#define THOST_FTDC_GD_Female '2'\n\ntypedef char TThostFtdcGenderType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFeePayFlagType是一个费用支付标志类型\n/////////////////////////////////////////////////////////////////////////\n///由受益方支付费用\n#define THOST_FTDC_FPF_BEN '0'\n///由发送方支付费用\n#define THOST_FTDC_FPF_OUR '1'\n///由发送方支付发起的费用，受益方支付接受的费用\n#define THOST_FTDC_FPF_SHA '2'\n\ntypedef char TThostFtdcFeePayFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPassWordKeyTypeType是一个密钥类型类型\n/////////////////////////////////////////////////////////////////////////\n///交换密钥\n#define THOST_FTDC_PWKT_ExchangeKey '0'\n///密码密钥\n#define THOST_FTDC_PWKT_PassWordKey '1'\n///MAC密钥\n#define THOST_FTDC_PWKT_MACKey '2'\n///报文密钥\n#define THOST_FTDC_PWKT_MessageKey '3'\n\ntypedef char TThostFtdcPassWordKeyTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBTPassWordTypeType是一个密码类型类型\n/////////////////////////////////////////////////////////////////////////\n///查询\n#define THOST_FTDC_PWT_Query '0'\n///取款\n#define THOST_FTDC_PWT_Fetch '1'\n///转帐\n#define THOST_FTDC_PWT_Transfer '2'\n///交易\n#define THOST_FTDC_PWT_Trade '3'\n\ntypedef char TThostFtdcFBTPassWordTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBTEncryModeType是一个加密方式类型\n/////////////////////////////////////////////////////////////////////////\n///不加密\n#define THOST_FTDC_EM_NoEncry '0'\n///DES\n#define THOST_FTDC_EM_DES '1'\n///3DES\n#define THOST_FTDC_EM_3DES '2'\n\ntypedef char TThostFtdcFBTEncryModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankRepealFlagType是一个银行冲正标志类型\n/////////////////////////////////////////////////////////////////////////\n///银行无需自动冲正\n#define THOST_FTDC_BRF_BankNotNeedRepeal '0'\n///银行待自动冲正\n#define THOST_FTDC_BRF_BankWaitingRepeal '1'\n///银行已自动冲正\n#define THOST_FTDC_BRF_BankBeenRepealed '2'\n\ntypedef char TThostFtdcBankRepealFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerRepealFlagType是一个期商冲正标志类型\n/////////////////////////////////////////////////////////////////////////\n///期商无需自动冲正\n#define THOST_FTDC_BRORF_BrokerNotNeedRepeal '0'\n///期商待自动冲正\n#define THOST_FTDC_BRORF_BrokerWaitingRepeal '1'\n///期商已自动冲正\n#define THOST_FTDC_BRORF_BrokerBeenRepealed '2'\n\ntypedef char TThostFtdcBrokerRepealFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstitutionTypeType是一个机构类别类型\n/////////////////////////////////////////////////////////////////////////\n///银行\n#define THOST_FTDC_TS_Bank '0'\n///期商\n#define THOST_FTDC_TS_Future '1'\n///券商\n#define THOST_FTDC_TS_Store '2'\n\ntypedef char TThostFtdcInstitutionTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLastFragmentType是一个最后分片标志类型\n/////////////////////////////////////////////////////////////////////////\n///是最后分片\n#define THOST_FTDC_LF_Yes '0'\n///不是最后分片\n#define THOST_FTDC_LF_No '1'\n\ntypedef char TThostFtdcLastFragmentType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankAccStatusType是一个银行账户状态类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_BAS_Normal '0'\n///冻结\n#define THOST_FTDC_BAS_Freeze '1'\n///挂失\n#define THOST_FTDC_BAS_ReportLoss '2'\n\ntypedef char TThostFtdcBankAccStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMoneyAccountStatusType是一个资金账户状态类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_MAS_Normal '0'\n///销户\n#define THOST_FTDC_MAS_Cancel '1'\n\ntypedef char TThostFtdcMoneyAccountStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcManageStatusType是一个存管状态类型\n/////////////////////////////////////////////////////////////////////////\n///指定存管\n#define THOST_FTDC_MSS_Point '0'\n///预指定\n#define THOST_FTDC_MSS_PrePoint '1'\n///撤销指定\n#define THOST_FTDC_MSS_CancelPoint '2'\n\ntypedef char TThostFtdcManageStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSystemTypeType是一个应用系统类型类型\n/////////////////////////////////////////////////////////////////////////\n///银期转帐\n#define THOST_FTDC_SYT_FutureBankTransfer '0'\n///银证转帐\n#define THOST_FTDC_SYT_StockBankTransfer '1'\n///第三方存管\n#define THOST_FTDC_SYT_TheThirdPartStore '2'\n\ntypedef char TThostFtdcSystemTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTxnEndFlagType是一个银期转帐划转结果标志类型\n/////////////////////////////////////////////////////////////////////////\n///正常处理中\n#define THOST_FTDC_TEF_NormalProcessing '0'\n///成功结束\n#define THOST_FTDC_TEF_Success '1'\n///失败结束\n#define THOST_FTDC_TEF_Failed '2'\n///异常中\n#define THOST_FTDC_TEF_Abnormal '3'\n///已人工异常处理\n#define THOST_FTDC_TEF_ManualProcessedForException '4'\n///通讯异常 ，请人工处理\n#define THOST_FTDC_TEF_CommuFailedNeedManualProcess '5'\n///系统出错，请人工处理\n#define THOST_FTDC_TEF_SysErrorNeedManualProcess '6'\n\ntypedef char TThostFtdcTxnEndFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProcessStatusType是一个银期转帐服务处理状态类型\n/////////////////////////////////////////////////////////////////////////\n///未处理\n#define THOST_FTDC_PSS_NotProcess '0'\n///开始处理\n#define THOST_FTDC_PSS_StartProcess '1'\n///处理完成\n#define THOST_FTDC_PSS_Finished '2'\n\ntypedef char TThostFtdcProcessStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCustTypeType是一个客户类型类型\n/////////////////////////////////////////////////////////////////////////\n///自然人\n#define THOST_FTDC_CUSTT_Person '0'\n///机构户\n#define THOST_FTDC_CUSTT_Institution '1'\n\ntypedef char TThostFtdcCustTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBTTransferDirectionType是一个银期转帐方向类型\n/////////////////////////////////////////////////////////////////////////\n///入金，银行转期货\n#define THOST_FTDC_FBTTD_FromBankToFuture '1'\n///出金，期货转银行\n#define THOST_FTDC_FBTTD_FromFutureToBank '2'\n\ntypedef char TThostFtdcFBTTransferDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOpenOrDestroyType是一个开销户类别类型\n/////////////////////////////////////////////////////////////////////////\n///开户\n#define THOST_FTDC_OOD_Open '1'\n///销户\n#define THOST_FTDC_OOD_Destroy '0'\n\ntypedef char TThostFtdcOpenOrDestroyType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAvailabilityFlagType是一个有效标志类型\n/////////////////////////////////////////////////////////////////////////\n///未确认\n#define THOST_FTDC_AVAF_Invalid '0'\n///有效\n#define THOST_FTDC_AVAF_Valid '1'\n///冲正\n#define THOST_FTDC_AVAF_Repeal '2'\n\ntypedef char TThostFtdcAvailabilityFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrganTypeType是一个机构类型类型\n/////////////////////////////////////////////////////////////////////////\n///银行代理\n#define THOST_FTDC_OT_Bank '1'\n///交易前置\n#define THOST_FTDC_OT_Future '2'\n///银期转帐平台管理\n#define THOST_FTDC_OT_PlateForm '9'\n\ntypedef char TThostFtdcOrganTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrganLevelType是一个机构级别类型\n/////////////////////////////////////////////////////////////////////////\n///银行总行或期商总部\n#define THOST_FTDC_OL_HeadQuarters '1'\n///银行分中心或期货公司营业部\n#define THOST_FTDC_OL_Branch '2'\n\ntypedef char TThostFtdcOrganLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProtocalIDType是一个协议类型类型\n/////////////////////////////////////////////////////////////////////////\n///期商协议\n#define THOST_FTDC_PID_FutureProtocal '0'\n///工行协议\n#define THOST_FTDC_PID_ICBCProtocal '1'\n///农行协议\n#define THOST_FTDC_PID_ABCProtocal '2'\n///中国银行协议\n#define THOST_FTDC_PID_CBCProtocal '3'\n///建行协议\n#define THOST_FTDC_PID_CCBProtocal '4'\n///交行协议\n#define THOST_FTDC_PID_BOCOMProtocal '5'\n///银期转帐平台协议\n#define THOST_FTDC_PID_FBTPlateFormProtocal 'X'\n\ntypedef char TThostFtdcProtocalIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcConnectModeType是一个套接字连接方式类型\n/////////////////////////////////////////////////////////////////////////\n///短连接\n#define THOST_FTDC_CM_ShortConnect '0'\n///长连接\n#define THOST_FTDC_CM_LongConnect '1'\n\ntypedef char TThostFtdcConnectModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSyncModeType是一个套接字通信方式类型\n/////////////////////////////////////////////////////////////////////////\n///异步\n#define THOST_FTDC_SRM_ASync '0'\n///同步\n#define THOST_FTDC_SRM_Sync '1'\n\ntypedef char TThostFtdcSyncModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankAccTypeType是一个银行帐号类型类型\n/////////////////////////////////////////////////////////////////////////\n///银行存折\n#define THOST_FTDC_BAT_BankBook '1'\n///储蓄卡\n#define THOST_FTDC_BAT_SavingCard '2'\n///信用卡\n#define THOST_FTDC_BAT_CreditCard '3'\n\ntypedef char TThostFtdcBankAccTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureAccTypeType是一个期货公司帐号类型类型\n/////////////////////////////////////////////////////////////////////////\n///银行存折\n#define THOST_FTDC_FAT_BankBook '1'\n///储蓄卡\n#define THOST_FTDC_FAT_SavingCard '2'\n///信用卡\n#define THOST_FTDC_FAT_CreditCard '3'\n\ntypedef char TThostFtdcFutureAccTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrganStatusType是一个接入机构状态类型\n/////////////////////////////////////////////////////////////////////////\n///启用\n#define THOST_FTDC_OS_Ready '0'\n///签到\n#define THOST_FTDC_OS_CheckIn '1'\n///签退\n#define THOST_FTDC_OS_CheckOut '2'\n///对帐文件到达\n#define THOST_FTDC_OS_CheckFileArrived '3'\n///对帐\n#define THOST_FTDC_OS_CheckDetail '4'\n///日终清理\n#define THOST_FTDC_OS_DayEndClean '5'\n///注销\n#define THOST_FTDC_OS_Invalid '9'\n\ntypedef char TThostFtdcOrganStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCCBFeeModeType是一个建行收费模式类型\n/////////////////////////////////////////////////////////////////////////\n///按金额扣收\n#define THOST_FTDC_CCBFM_ByAmount '1'\n///按月扣收\n#define THOST_FTDC_CCBFM_ByMonth '2'\n\ntypedef char TThostFtdcCCBFeeModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommApiTypeType是一个通讯API类型类型\n/////////////////////////////////////////////////////////////////////////\n///客户端\n#define THOST_FTDC_CAPIT_Client '1'\n///服务端\n#define THOST_FTDC_CAPIT_Server '2'\n///交易系统的UserApi\n#define THOST_FTDC_CAPIT_UserApi '3'\n\ntypedef char TThostFtdcCommApiTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcServiceIDType是一个服务编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcServiceIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcServiceLineNoType是一个服务线路编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcServiceLineNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcServiceNameType是一个服务名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcServiceNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLinkStatusType是一个连接状态类型\n/////////////////////////////////////////////////////////////////////////\n///已经连接\n#define THOST_FTDC_LS_Connected '1'\n///没有连接\n#define THOST_FTDC_LS_Disconnected '2'\n\ntypedef char TThostFtdcLinkStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommApiPointerType是一个通讯API指针类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCommApiPointerType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPwdFlagType是一个密码核对标志类型\n/////////////////////////////////////////////////////////////////////////\n///不核对\n#define THOST_FTDC_BPWDF_NoCheck '0'\n///明文核对\n#define THOST_FTDC_BPWDF_BlankCheck '1'\n///密文核对\n#define THOST_FTDC_BPWDF_EncryptCheck '2'\n\ntypedef char TThostFtdcPwdFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSecuAccTypeType是一个期货帐号类型类型\n/////////////////////////////////////////////////////////////////////////\n///资金帐号\n#define THOST_FTDC_SAT_AccountID '1'\n///资金卡号\n#define THOST_FTDC_SAT_CardID '2'\n///上海股东帐号\n#define THOST_FTDC_SAT_SHStockholderID '3'\n///深圳股东帐号\n#define THOST_FTDC_SAT_SZStockholderID '4'\n\ntypedef char TThostFtdcSecuAccTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTransferStatusType是一个转账交易状态类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_TRFS_Normal '0'\n///被冲正\n#define THOST_FTDC_TRFS_Repealed '1'\n\ntypedef char TThostFtdcTransferStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSponsorTypeType是一个发起方类型\n/////////////////////////////////////////////////////////////////////////\n///期商\n#define THOST_FTDC_SPTYPE_Broker '0'\n///银行\n#define THOST_FTDC_SPTYPE_Bank '1'\n\ntypedef char TThostFtdcSponsorTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReqRspTypeType是一个请求响应类别类型\n/////////////////////////////////////////////////////////////////////////\n///请求\n#define THOST_FTDC_REQRSP_Request '0'\n///响应\n#define THOST_FTDC_REQRSP_Response '1'\n\ntypedef char TThostFtdcReqRspTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBTUserEventTypeType是一个银期转帐用户事件类型类型\n/////////////////////////////////////////////////////////////////////////\n///签到\n#define THOST_FTDC_FBTUET_SignIn '0'\n///银行转期货\n#define THOST_FTDC_FBTUET_FromBankToFuture '1'\n///期货转银行\n#define THOST_FTDC_FBTUET_FromFutureToBank '2'\n///开户\n#define THOST_FTDC_FBTUET_OpenAccount '3'\n///销户\n#define THOST_FTDC_FBTUET_CancelAccount '4'\n///变更银行账户\n#define THOST_FTDC_FBTUET_ChangeAccount '5'\n///冲正银行转期货\n#define THOST_FTDC_FBTUET_RepealFromBankToFuture '6'\n///冲正期货转银行\n#define THOST_FTDC_FBTUET_RepealFromFutureToBank '7'\n///查询银行账户\n#define THOST_FTDC_FBTUET_QueryBankAccount '8'\n///查询期货账户\n#define THOST_FTDC_FBTUET_QueryFutureAccount '9'\n///签退\n#define THOST_FTDC_FBTUET_SignOut 'A'\n///密钥同步\n#define THOST_FTDC_FBTUET_SyncKey 'B'\n///预约开户\n#define THOST_FTDC_FBTUET_ReserveOpenAccount 'C'\n///撤销预约开户\n#define THOST_FTDC_FBTUET_CancelReserveOpenAccount 'D'\n///预约开户确认\n#define THOST_FTDC_FBTUET_ReserveOpenAccountConfirm 'E'\n///其他\n#define THOST_FTDC_FBTUET_Other 'Z'\n\ntypedef char TThostFtdcFBTUserEventTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankIDByBankType是一个银行自己的编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankIDByBankType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankOperNoType是一个银行操作员号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankOperNoType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankCustNoType是一个银行客户号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankCustNoType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDBOPSeqNoType是一个递增的序列号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcDBOPSeqNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTableNameType是一个FBT表名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTableNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPKNameType是一个FBT表操作主键名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPKNameType[201];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPKValueType是一个FBT表操作主键值类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPKValueType[501];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDBOperationType是一个记录操作类型类型\n/////////////////////////////////////////////////////////////////////////\n///插入\n#define THOST_FTDC_DBOP_Insert '0'\n///更新\n#define THOST_FTDC_DBOP_Update '1'\n///删除\n#define THOST_FTDC_DBOP_Delete '2'\n\ntypedef char TThostFtdcDBOperationType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSyncFlagType是一个同步标记类型\n/////////////////////////////////////////////////////////////////////////\n///已同步\n#define THOST_FTDC_SYNF_Yes '0'\n///未同步\n#define THOST_FTDC_SYNF_No '1'\n\ntypedef char TThostFtdcSyncFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTargetIDType是一个同步目标编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTargetIDType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSyncTypeType是一个同步类型类型\n/////////////////////////////////////////////////////////////////////////\n///一次同步\n#define THOST_FTDC_SYNT_OneOffSync '0'\n///定时同步\n#define THOST_FTDC_SYNT_TimerSync '1'\n///定时完全同步\n#define THOST_FTDC_SYNT_TimerFullSync '2'\n\ntypedef char TThostFtdcSyncTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBETimeType是一个各种换汇时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBETimeType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEBankNoType是一个换汇银行行号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEBankNoType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBECertNoType是一个换汇凭证号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBECertNoType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExDirectionType是一个换汇方向类型\n/////////////////////////////////////////////////////////////////////////\n///结汇\n#define THOST_FTDC_FBEDIR_Settlement '0'\n///售汇\n#define THOST_FTDC_FBEDIR_Sale '1'\n\ntypedef char TThostFtdcExDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEBankAccountType是一个换汇银行账户类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEBankAccountType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEBankAccountNameType是一个换汇银行账户名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEBankAccountNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEAmtType是一个各种换汇金额类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcFBEAmtType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEBusinessTypeType是一个换汇业务类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEBusinessTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEPostScriptType是一个换汇附言类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEPostScriptType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBERemarkType是一个换汇备注类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBERemarkType[71];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExRateType是一个换汇汇率类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcExRateType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEResultFlagType是一个换汇成功标志类型\n/////////////////////////////////////////////////////////////////////////\n///成功\n#define THOST_FTDC_FBERES_Success '0'\n///账户余额不足\n#define THOST_FTDC_FBERES_InsufficientBalance '1'\n///交易结果未知\n#define THOST_FTDC_FBERES_UnknownTrading '8'\n///失败\n#define THOST_FTDC_FBERES_Fail 'x'\n\ntypedef char TThostFtdcFBEResultFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBERtnMsgType是一个换汇返回信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBERtnMsgType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEExtendMsgType是一个换汇扩展信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEExtendMsgType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEBusinessSerialType是一个换汇记账流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEBusinessSerialType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBESystemSerialType是一个换汇流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBESystemSerialType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBETotalExCntType是一个换汇交易总笔数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcFBETotalExCntType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEExchStatusType是一个换汇交易状态类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_FBEES_Normal '0'\n///交易重发\n#define THOST_FTDC_FBEES_ReExchange '1'\n\ntypedef char TThostFtdcFBEExchStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEFileFlagType是一个换汇文件标志类型\n/////////////////////////////////////////////////////////////////////////\n///数据包\n#define THOST_FTDC_FBEFG_DataPackage '0'\n///文件\n#define THOST_FTDC_FBEFG_File '1'\n\ntypedef char TThostFtdcFBEFileFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEAlreadyTradeType是一个换汇已交易标志类型\n/////////////////////////////////////////////////////////////////////////\n///未交易\n#define THOST_FTDC_FBEAT_NotTrade '0'\n///已交易\n#define THOST_FTDC_FBEAT_Trade '1'\n\ntypedef char TThostFtdcFBEAlreadyTradeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEOpenBankType是一个换汇账户开户行类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEOpenBankType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEUserEventTypeType是一个银期换汇用户事件类型类型\n/////////////////////////////////////////////////////////////////////////\n///签到\n#define THOST_FTDC_FBEUET_SignIn '0'\n///换汇\n#define THOST_FTDC_FBEUET_Exchange '1'\n///换汇重发\n#define THOST_FTDC_FBEUET_ReExchange '2'\n///银行账户查询\n#define THOST_FTDC_FBEUET_QueryBankAccount '3'\n///换汇明细查询\n#define THOST_FTDC_FBEUET_QueryExchDetial '4'\n///换汇汇总查询\n#define THOST_FTDC_FBEUET_QueryExchSummary '5'\n///换汇汇率查询\n#define THOST_FTDC_FBEUET_QueryExchRate '6'\n///对账文件通知\n#define THOST_FTDC_FBEUET_CheckBankAccount '7'\n///签退\n#define THOST_FTDC_FBEUET_SignOut '8'\n///其他\n#define THOST_FTDC_FBEUET_Other 'Z'\n\ntypedef char TThostFtdcFBEUserEventTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEFileNameType是一个换汇相关文件名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEFileNameType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEBatchSerialType是一个换汇批次号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFBEBatchSerialType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBEReqFlagType是一个换汇发送标志类型\n/////////////////////////////////////////////////////////////////////////\n///未处理\n#define THOST_FTDC_FBERF_UnProcessed '0'\n///等待发送\n#define THOST_FTDC_FBERF_WaitSend '1'\n///发送成功\n#define THOST_FTDC_FBERF_SendSuccess '2'\n///发送失败\n#define THOST_FTDC_FBERF_SendFailed '3'\n///等待重发\n#define THOST_FTDC_FBERF_WaitReSend '4'\n\ntypedef char TThostFtdcFBEReqFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcNotifyClassType是一个风险通知类型类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_NC_NOERROR '0'\n///警示\n#define THOST_FTDC_NC_Warn '1'\n///追保\n#define THOST_FTDC_NC_Call '2'\n///强平\n#define THOST_FTDC_NC_Force '3'\n///穿仓\n#define THOST_FTDC_NC_CHUANCANG '4'\n///异常\n#define THOST_FTDC_NC_Exception '5'\n\ntypedef char TThostFtdcNotifyClassType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRiskNofityInfoType是一个客户风险通知消息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRiskNofityInfoType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcForceCloseSceneIdType是一个强平场景编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcForceCloseSceneIdType[24];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcForceCloseTypeType是一个强平单类型类型\n/////////////////////////////////////////////////////////////////////////\n///手工强平\n#define THOST_FTDC_FCT_Manual '0'\n///单一投资者辅助强平\n#define THOST_FTDC_FCT_Single '1'\n///批量投资者辅助强平\n#define THOST_FTDC_FCT_Group '2'\n\ntypedef char TThostFtdcForceCloseTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentIDsType是一个多个产品代码,用+分隔,如cu+zn类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInstrumentIDsType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRiskNotifyMethodType是一个风险通知途径类型\n/////////////////////////////////////////////////////////////////////////\n///系统通知\n#define THOST_FTDC_RNM_System '0'\n///短信通知\n#define THOST_FTDC_RNM_SMS '1'\n///邮件通知\n#define THOST_FTDC_RNM_EMail '2'\n///人工通知\n#define THOST_FTDC_RNM_Manual '3'\n\ntypedef char TThostFtdcRiskNotifyMethodType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRiskNotifyStatusType是一个风险通知状态类型\n/////////////////////////////////////////////////////////////////////////\n///未生成\n#define THOST_FTDC_RNS_NotGen '0'\n///已生成未发送\n#define THOST_FTDC_RNS_Generated '1'\n///发送失败\n#define THOST_FTDC_RNS_SendError '2'\n///已发送未接收\n#define THOST_FTDC_RNS_SendOk '3'\n///已接收未确认\n#define THOST_FTDC_RNS_Received '4'\n///已确认\n#define THOST_FTDC_RNS_Confirmed '5'\n\ntypedef char TThostFtdcRiskNotifyStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRiskUserEventType是一个风控用户操作事件类型\n/////////////////////////////////////////////////////////////////////////\n///导出数据\n#define THOST_FTDC_RUE_ExportData '0'\n\ntypedef char TThostFtdcRiskUserEventType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcParamIDType是一个参数代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcParamIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcParamNameType是一个参数名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcParamNameType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcParamValueType是一个参数值类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcParamValueType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcConditionalOrderSortTypeType是一个条件单索引条件类型\n/////////////////////////////////////////////////////////////////////////\n///使用最新价升序\n#define THOST_FTDC_COST_LastPriceAsc '0'\n///使用最新价降序\n#define THOST_FTDC_COST_LastPriceDesc '1'\n///使用卖价升序\n#define THOST_FTDC_COST_AskPriceAsc '2'\n///使用卖价降序\n#define THOST_FTDC_COST_AskPriceDesc '3'\n///使用买价升序\n#define THOST_FTDC_COST_BidPriceAsc '4'\n///使用买价降序\n#define THOST_FTDC_COST_BidPriceDesc '5'\n\ntypedef char TThostFtdcConditionalOrderSortTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSendTypeType是一个报送状态类型\n/////////////////////////////////////////////////////////////////////////\n///未发送\n#define THOST_FTDC_UOAST_NoSend '0'\n///已发送\n#define THOST_FTDC_UOAST_Sended '1'\n///已生成\n#define THOST_FTDC_UOAST_Generated '2'\n///报送失败\n#define THOST_FTDC_UOAST_SendFail '3'\n///接收成功\n#define THOST_FTDC_UOAST_Success '4'\n///接收失败\n#define THOST_FTDC_UOAST_Fail '5'\n///取消报送\n#define THOST_FTDC_UOAST_Cancel '6'\n\ntypedef char TThostFtdcSendTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientIDStatusType是一个交易编码状态类型\n/////////////////////////////////////////////////////////////////////////\n///未申请\n#define THOST_FTDC_UOACS_NoApply '1'\n///已提交申请\n#define THOST_FTDC_UOACS_Submited '2'\n///已发送申请\n#define THOST_FTDC_UOACS_Sended '3'\n///完成\n#define THOST_FTDC_UOACS_Success '4'\n///拒绝\n#define THOST_FTDC_UOACS_Refuse '5'\n///已撤销编码\n#define THOST_FTDC_UOACS_Cancel '6'\n\ntypedef char TThostFtdcClientIDStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIndustryIDType是一个行业编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIndustryIDType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcQuestionIDType是一个特有信息编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcQuestionIDType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcQuestionContentType是一个特有信息说明类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcQuestionContentType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOptionIDType是一个选项编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOptionIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOptionContentType是一个选项说明类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOptionContentType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcQuestionTypeType是一个特有信息类型类型\n/////////////////////////////////////////////////////////////////////////\n///单选\n#define THOST_FTDC_QT_Radio '1'\n///多选\n#define THOST_FTDC_QT_Option '2'\n///填空\n#define THOST_FTDC_QT_Blank '3'\n\ntypedef char TThostFtdcQuestionTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProcessIDType是一个业务流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProcessIDType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSeqNoType是一个流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSeqNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOAProcessStatusType是一个流程状态类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOAProcessStatusType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProcessTypeType是一个流程功能类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProcessTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBusinessTypeType是一个业务类型类型\n/////////////////////////////////////////////////////////////////////////\n///请求\n#define THOST_FTDC_BT_Request '1'\n///应答\n#define THOST_FTDC_BT_Response '2'\n///通知\n#define THOST_FTDC_BT_Notice '3'\n\ntypedef char TThostFtdcBusinessTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCfmmcReturnCodeType是一个监控中心返回码类型\n/////////////////////////////////////////////////////////////////////////\n///成功\n#define THOST_FTDC_CRC_Success '0'\n///该客户已经有流程在处理中\n#define THOST_FTDC_CRC_Working '1'\n///监控中客户资料检查失败\n#define THOST_FTDC_CRC_InfoFail '2'\n///监控中实名制检查失败\n#define THOST_FTDC_CRC_IDCardFail '3'\n///其他错误\n#define THOST_FTDC_CRC_OtherFail '4'\n\ntypedef char TThostFtdcCfmmcReturnCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExReturnCodeType是一个交易所返回码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcExReturnCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientTypeType是一个客户类型类型\n/////////////////////////////////////////////////////////////////////////\n///所有\n#define THOST_FTDC_CfMMCCT_All '0'\n///个人\n#define THOST_FTDC_CfMMCCT_Person '1'\n///单位\n#define THOST_FTDC_CfMMCCT_Company '2'\n///其他\n#define THOST_FTDC_CfMMCCT_Other '3'\n///特殊法人\n#define THOST_FTDC_CfMMCCT_SpecialOrgan '4'\n///资管户\n#define THOST_FTDC_CfMMCCT_Asset '5'\n\ntypedef char TThostFtdcClientTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeIDTypeType是一个交易所编号类型\n/////////////////////////////////////////////////////////////////////////\n///上海期货交易所\n#define THOST_FTDC_EIDT_SHFE 'S'\n///郑州商品交易所\n#define THOST_FTDC_EIDT_CZCE 'Z'\n///大连商品交易所\n#define THOST_FTDC_EIDT_DCE 'D'\n///中国金融期货交易所\n#define THOST_FTDC_EIDT_CFFEX 'J'\n///上海国际能源交易中心股份有限公司\n#define THOST_FTDC_EIDT_INE 'N'\n\ntypedef char TThostFtdcExchangeIDTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExClientIDTypeType是一个交易编码类型类型\n/////////////////////////////////////////////////////////////////////////\n///套保\n#define THOST_FTDC_ECIDT_Hedge '1'\n///套利\n#define THOST_FTDC_ECIDT_Arbitrage '2'\n///投机\n#define THOST_FTDC_ECIDT_Speculation '3'\n\ntypedef char TThostFtdcExClientIDTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientClassifyType是一个客户分类码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClientClassifyType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOAOrganTypeType是一个单位性质类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOAOrganTypeType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOACountryCodeType是一个国家代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOACountryCodeType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAreaCodeType是一个区号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAreaCodeType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFuturesIDType是一个监控中心为客户分配的代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFuturesIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCffmcDateType是一个日期类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCffmcDateType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCffmcTimeType是一个时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCffmcTimeType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcNocIDType是一个组织机构代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcNocIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUpdateFlagType是一个更新状态类型\n/////////////////////////////////////////////////////////////////////////\n///未更新\n#define THOST_FTDC_UF_NoUpdate '0'\n///更新全部信息成功\n#define THOST_FTDC_UF_Success '1'\n///更新全部信息失败\n#define THOST_FTDC_UF_Fail '2'\n///更新交易编码成功\n#define THOST_FTDC_UF_TCSuccess '3'\n///更新交易编码失败\n#define THOST_FTDC_UF_TCFail '4'\n///已丢弃\n#define THOST_FTDC_UF_Cancel '5'\n\ntypedef char TThostFtdcUpdateFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcApplyOperateIDType是一个申请动作类型\n/////////////////////////////////////////////////////////////////////////\n///开户\n#define THOST_FTDC_AOID_OpenInvestor '1'\n///修改身份信息\n#define THOST_FTDC_AOID_ModifyIDCard '2'\n///修改一般信息\n#define THOST_FTDC_AOID_ModifyNoIDCard '3'\n///申请交易编码\n#define THOST_FTDC_AOID_ApplyTradingCode '4'\n///撤销交易编码\n#define THOST_FTDC_AOID_CancelTradingCode '5'\n///销户\n#define THOST_FTDC_AOID_CancelInvestor '6'\n///账户休眠\n#define THOST_FTDC_AOID_FreezeAccount '8'\n///激活休眠账户\n#define THOST_FTDC_AOID_ActiveFreezeAccount '9'\n\ntypedef char TThostFtdcApplyOperateIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcApplyStatusIDType是一个申请状态类型\n/////////////////////////////////////////////////////////////////////////\n///未补全\n#define THOST_FTDC_ASID_NoComplete '1'\n///已提交\n#define THOST_FTDC_ASID_Submited '2'\n///已审核\n#define THOST_FTDC_ASID_Checked '3'\n///已拒绝\n#define THOST_FTDC_ASID_Refused '4'\n///已删除\n#define THOST_FTDC_ASID_Deleted '5'\n\ntypedef char TThostFtdcApplyStatusIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSendMethodType是一个发送方式类型\n/////////////////////////////////////////////////////////////////////////\n///文件发送\n#define THOST_FTDC_UOASM_ByAPI '1'\n///电子发送\n#define THOST_FTDC_UOASM_ByFile '2'\n\ntypedef char TThostFtdcSendMethodType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEventTypeType是一个业务操作类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcEventTypeType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEventModeType是一个操作方法类型\n/////////////////////////////////////////////////////////////////////////\n///增加\n#define THOST_FTDC_EvM_ADD '1'\n///修改\n#define THOST_FTDC_EvM_UPDATE '2'\n///删除\n#define THOST_FTDC_EvM_DELETE '3'\n///复核\n#define THOST_FTDC_EvM_CHECK '4'\n///复制\n#define THOST_FTDC_EvM_COPY '5'\n///注销\n#define THOST_FTDC_EvM_CANCEL '6'\n///冲销\n#define THOST_FTDC_EvM_Reverse '7'\n\ntypedef char TThostFtdcEventModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOAAutoSendType是一个统一开户申请自动发送类型\n/////////////////////////////////////////////////////////////////////////\n///自动发送并接收\n#define THOST_FTDC_UOAA_ASR '1'\n///自动发送，不自动接收\n#define THOST_FTDC_UOAA_ASNR '2'\n///不自动发送，自动接收\n#define THOST_FTDC_UOAA_NSAR '3'\n///不自动发送，也不自动接收\n#define THOST_FTDC_UOAA_NSR '4'\n\ntypedef char TThostFtdcUOAAutoSendType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcQueryDepthType是一个查询深度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcQueryDepthType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDataCenterIDType是一个数据中心代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcDataCenterIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFlowIDType是一个流程ID类型\n/////////////////////////////////////////////////////////////////////////\n///投资者对应投资者组设置\n#define THOST_FTDC_EvM_InvestorGroupFlow '1'\n///投资者手续费率设置\n#define THOST_FTDC_EvM_InvestorRate '2'\n///投资者手续费率模板关系设置\n#define THOST_FTDC_EvM_InvestorCommRateModel '3'\n\ntypedef char TThostFtdcFlowIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCheckLevelType是一个复核级别类型\n/////////////////////////////////////////////////////////////////////////\n///零级复核\n#define THOST_FTDC_CL_Zero '0'\n///一级复核\n#define THOST_FTDC_CL_One '1'\n///二级复核\n#define THOST_FTDC_CL_Two '2'\n\ntypedef char TThostFtdcCheckLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCheckNoType是一个操作次数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCheckNoType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCheckStatusType是一个复核级别类型\n/////////////////////////////////////////////////////////////////////////\n///未复核\n#define THOST_FTDC_CHS_Init '0'\n///复核中\n#define THOST_FTDC_CHS_Checking '1'\n///已复核\n#define THOST_FTDC_CHS_Checked '2'\n///拒绝\n#define THOST_FTDC_CHS_Refuse '3'\n///作废\n#define THOST_FTDC_CHS_Cancel '4'\n\ntypedef char TThostFtdcCheckStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUsedStatusType是一个生效状态类型\n/////////////////////////////////////////////////////////////////////////\n///未生效\n#define THOST_FTDC_CHU_Unused '0'\n///已生效\n#define THOST_FTDC_CHU_Used '1'\n///生效失败\n#define THOST_FTDC_CHU_Fail '2'\n\ntypedef char TThostFtdcUsedStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRateTemplateNameType是一个模型名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRateTemplateNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPropertyStringType是一个用于查询的投资属性字段类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPropertyStringType[2049];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankAcountOriginType是一个账户来源类型\n/////////////////////////////////////////////////////////////////////////\n///手工录入\n#define THOST_FTDC_BAO_ByAccProperty '0'\n///银期转账\n#define THOST_FTDC_BAO_ByFBTransfer '1'\n\ntypedef char TThostFtdcBankAcountOriginType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMonthBillTradeSumType是一个结算单月报成交汇总方式类型\n/////////////////////////////////////////////////////////////////////////\n///同日同合约\n#define THOST_FTDC_MBTS_ByInstrument '0'\n///同日同合约同价格\n#define THOST_FTDC_MBTS_ByDayInsPrc '1'\n///同合约\n#define THOST_FTDC_MBTS_ByDayIns '2'\n\ntypedef char TThostFtdcMonthBillTradeSumType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFBTTradeCodeEnumType是一个银期交易代码枚举类型\n/////////////////////////////////////////////////////////////////////////\n///银行发起银行转期货\n#define THOST_FTDC_FTC_BankLaunchBankToBroker '102001'\n///期货发起银行转期货\n#define THOST_FTDC_FTC_BrokerLaunchBankToBroker '202001'\n///银行发起期货转银行\n#define THOST_FTDC_FTC_BankLaunchBrokerToBank '102002'\n///期货发起期货转银行\n#define THOST_FTDC_FTC_BrokerLaunchBrokerToBank '202002'\n\ntypedef char TThostFtdcFBTTradeCodeEnumType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRateTemplateIDType是一个模型代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRateTemplateIDType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRiskRateType是一个风险度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRiskRateType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTimestampType是一个时间戳类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcTimestampType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorIDRuleNameType是一个号段规则名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvestorIDRuleNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorIDRuleExprType是一个号段规则表达式类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvestorIDRuleExprType[513];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLastDriftType是一个上次OTP漂移值类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcLastDriftType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLastSuccessType是一个上次OTP成功值类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcLastSuccessType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAuthKeyType是一个令牌密钥类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAuthKeyType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSerialNumberType是一个序列号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSerialNumberType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOTPTypeType是一个动态令牌类型类型\n/////////////////////////////////////////////////////////////////////////\n///无动态令牌\n#define THOST_FTDC_OTP_NONE '0'\n///时间令牌\n#define THOST_FTDC_OTP_TOTP '1'\n\ntypedef char TThostFtdcOTPTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOTPVendorsIDType是一个动态令牌提供商类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOTPVendorsIDType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOTPVendorsNameType是一个动态令牌提供商名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOTPVendorsNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOTPStatusType是一个动态令牌状态类型\n/////////////////////////////////////////////////////////////////////////\n///未使用\n#define THOST_FTDC_OTPS_Unused '0'\n///已使用\n#define THOST_FTDC_OTPS_Used '1'\n///注销\n#define THOST_FTDC_OTPS_Disuse '2'\n\ntypedef char TThostFtdcOTPStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBrokerUserTypeType是一个经济公司用户类型类型\n/////////////////////////////////////////////////////////////////////////\n///投资者\n#define THOST_FTDC_BUT_Investor '1'\n///操作员\n#define THOST_FTDC_BUT_BrokerUser '2'\n\ntypedef char TThostFtdcBrokerUserTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFutureTypeType是一个期货类型类型\n/////////////////////////////////////////////////////////////////////////\n///商品期货\n#define THOST_FTDC_FUTT_Commodity '1'\n///金融期货\n#define THOST_FTDC_FUTT_Financial '2'\n\ntypedef char TThostFtdcFutureTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundEventTypeType是一个资金管理操作类型类型\n/////////////////////////////////////////////////////////////////////////\n///转账限额\n#define THOST_FTDC_FET_Restriction '0'\n///当日转账限额\n#define THOST_FTDC_FET_TodayRestriction '1'\n///期商流水\n#define THOST_FTDC_FET_Transfer '2'\n///资金冻结\n#define THOST_FTDC_FET_Credit '3'\n///投资者可提资金比例\n#define THOST_FTDC_FET_InvestorWithdrawAlm '4'\n///单个银行帐户转账限额\n#define THOST_FTDC_FET_BankRestriction '5'\n///银期签约账户\n#define THOST_FTDC_FET_Accountregister '6'\n///交易所出入金\n#define THOST_FTDC_FET_ExchangeFundIO '7'\n///投资者出入金\n#define THOST_FTDC_FET_InvestorFundIO '8'\n\ntypedef char TThostFtdcFundEventTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAccountSourceTypeType是一个资金账户来源类型\n/////////////////////////////////////////////////////////////////////////\n///银期同步\n#define THOST_FTDC_AST_FBTransfer '0'\n///手工录入\n#define THOST_FTDC_AST_ManualEntry '1'\n\ntypedef char TThostFtdcAccountSourceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCodeSourceTypeType是一个交易编码来源类型\n/////////////////////////////////////////////////////////////////////////\n///统一开户(已规范)\n#define THOST_FTDC_CST_UnifyAccount '0'\n///手工录入(未规范)\n#define THOST_FTDC_CST_ManualEntry '1'\n\ntypedef char TThostFtdcCodeSourceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserRangeType是一个操作员范围类型\n/////////////////////////////////////////////////////////////////////////\n///所有\n#define THOST_FTDC_UR_All '0'\n///单一操作员\n#define THOST_FTDC_UR_Single '1'\n\ntypedef char TThostFtdcUserRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTimeSpanType是一个时间跨度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcTimeSpanType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcImportSequenceIDType是一个动态令牌导入批次编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcImportSequenceIDType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcByGroupType是一个交易统计表按客户统计方式类型\n/////////////////////////////////////////////////////////////////////////\n///按投资者统计\n#define THOST_FTDC_BG_Investor '2'\n///按类统计\n#define THOST_FTDC_BG_Group '1'\n\ntypedef char TThostFtdcByGroupType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeSumStatModeType是一个交易统计表按范围统计方式类型\n/////////////////////////////////////////////////////////////////////////\n///按合约统计\n#define THOST_FTDC_TSSM_Instrument '1'\n///按产品统计\n#define THOST_FTDC_TSSM_Product '2'\n///按交易所统计\n#define THOST_FTDC_TSSM_Exchange '3'\n\ntypedef char TThostFtdcTradeSumStatModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcComTypeType是一个组合成交类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcComTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserProductIDType是一个产品标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUserProductIDType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserProductNameType是一个产品名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUserProductNameType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserProductMemoType是一个产品说明类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUserProductMemoType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCCancelFlagType是一个新增或变更标志类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCCancelFlagType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCDateType是一个日期类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCDateType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCInvestorNameType是一个客户名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCInvestorNameType[201];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCOpenInvestorNameType是一个客户名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCOpenInvestorNameType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCInvestorIDType是一个客户代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCInvestorIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCIdentifiedCardNoType是一个证件号码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCIdentifiedCardNoType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCClientIDType是一个交易编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCClientIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCBankFlagType是一个银行标识类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCBankFlagType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCBankAccountType是一个银行账户类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCBankAccountType[23];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCOpenNameType是一个开户人类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCOpenNameType[401];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCMemoType是一个说明类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCMemoType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCTimeType是一个时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCTimeType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCTradeIDType是一个成交流水号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCTradeIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCExchangeInstIDType是一个合约代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCExchangeInstIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCMortgageNameType是一个质押品名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCMortgageNameType[7];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCReasonType是一个事由类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCReasonType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIsSettlementType是一个是否为非结算会员类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIsSettlementType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCMoneyType是一个资金类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcCSRCMoneyType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCPriceType是一个价格类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcCSRCPriceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCOptionsTypeType是一个期权类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCOptionsTypeType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCStrikePriceType是一个执行价类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcCSRCStrikePriceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCTargetProductIDType是一个标的品种类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCTargetProductIDType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCTargetInstrIDType是一个标的合约类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCTargetInstrIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommModelNameType是一个手续费率模板名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCommModelNameType[161];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommModelMemoType是一个手续费率模板备注类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCommModelMemoType[1025];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExprSetModeType是一个日期表达式设置类型类型\n/////////////////////////////////////////////////////////////////////////\n///相对已有规则设置\n#define THOST_FTDC_ESM_Relative '1'\n///典型设置\n#define THOST_FTDC_ESM_Typical '2'\n\ntypedef char TThostFtdcExprSetModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRateInvestorRangeType是一个投资者范围类型\n/////////////////////////////////////////////////////////////////////////\n///公司标准\n#define THOST_FTDC_RIR_All '1'\n///模板\n#define THOST_FTDC_RIR_Model '2'\n///单一投资者\n#define THOST_FTDC_RIR_Single '3'\n\ntypedef char TThostFtdcRateInvestorRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAgentBrokerIDType是一个代理经纪公司代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAgentBrokerIDType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDRIdentityIDType是一个交易中心代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcDRIdentityIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDRIdentityNameType是一个交易中心名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDRIdentityNameType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDBLinkIDType是一个DBLink标识号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDBLinkIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSyncDataStatusType是一个主次用系统数据同步状态类型\n/////////////////////////////////////////////////////////////////////////\n///未同步\n#define THOST_FTDC_SDS_Initialize '0'\n///同步中\n#define THOST_FTDC_SDS_Settlementing '1'\n///已同步\n#define THOST_FTDC_SDS_Settlemented '2'\n\ntypedef char TThostFtdcSyncDataStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeSourceType是一个成交来源类型\n/////////////////////////////////////////////////////////////////////////\n///来自交易所普通回报\n#define THOST_FTDC_TSRC_NORMAL '0'\n///来自查询\n#define THOST_FTDC_TSRC_QUERY '1'\n\ntypedef char TThostFtdcTradeSourceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFlexStatModeType是一个产品合约统计方式类型\n/////////////////////////////////////////////////////////////////////////\n///产品统计\n#define THOST_FTDC_FSM_Product '1'\n///交易所统计\n#define THOST_FTDC_FSM_Exchange '2'\n///统计所有\n#define THOST_FTDC_FSM_All '3'\n\ntypedef char TThostFtdcFlexStatModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcByInvestorRangeType是一个投资者范围统计方式类型\n/////////////////////////////////////////////////////////////////////////\n///属性统计\n#define THOST_FTDC_BIR_Property '1'\n///统计所有\n#define THOST_FTDC_BIR_All '2'\n\ntypedef char TThostFtdcByInvestorRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSRiskRateType是一个风险度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSRiskRateType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSequenceNo12Type是一个序号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSequenceNo12Type;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPropertyInvestorRangeType是一个投资者范围类型\n/////////////////////////////////////////////////////////////////////////\n///所有\n#define THOST_FTDC_PIR_All '1'\n///投资者属性\n#define THOST_FTDC_PIR_Property '2'\n///单一投资者\n#define THOST_FTDC_PIR_Single '3'\n\ntypedef char TThostFtdcPropertyInvestorRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileStatusType是一个文件状态类型\n/////////////////////////////////////////////////////////////////////////\n///未生成\n#define THOST_FTDC_FIS_NoCreate '0'\n///已生成\n#define THOST_FTDC_FIS_Created '1'\n///生成失败\n#define THOST_FTDC_FIS_Failed '2'\n\ntypedef char TThostFtdcFileStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFileGenStyleType是一个文件生成方式类型\n/////////////////////////////////////////////////////////////////////////\n///下发\n#define THOST_FTDC_FGS_FileTransmit '0'\n///生成\n#define THOST_FTDC_FGS_FileGen '1'\n\ntypedef char TThostFtdcFileGenStyleType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSysOperModeType是一个系统日志操作方法类型\n/////////////////////////////////////////////////////////////////////////\n///增加\n#define THOST_FTDC_SoM_Add '1'\n///修改\n#define THOST_FTDC_SoM_Update '2'\n///删除\n#define THOST_FTDC_SoM_Delete '3'\n///复制\n#define THOST_FTDC_SoM_Copy '4'\n///激活\n#define THOST_FTDC_SoM_AcTive '5'\n///注销\n#define THOST_FTDC_SoM_CanCel '6'\n///重置\n#define THOST_FTDC_SoM_ReSet '7'\n\ntypedef char TThostFtdcSysOperModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSysOperTypeType是一个系统日志操作类型类型\n/////////////////////////////////////////////////////////////////////////\n///修改操作员密码\n#define THOST_FTDC_SoT_UpdatePassword '0'\n///操作员组织架构关系\n#define THOST_FTDC_SoT_UserDepartment '1'\n///角色管理\n#define THOST_FTDC_SoT_RoleManager '2'\n///角色功能设置\n#define THOST_FTDC_SoT_RoleFunction '3'\n///基础参数设置\n#define THOST_FTDC_SoT_BaseParam '4'\n///设置操作员\n#define THOST_FTDC_SoT_SetUserID '5'\n///用户角色设置\n#define THOST_FTDC_SoT_SetUserRole '6'\n///用户IP限制\n#define THOST_FTDC_SoT_UserIpRestriction '7'\n///组织架构管理\n#define THOST_FTDC_SoT_DepartmentManager '8'\n///组织架构向查询分类复制\n#define THOST_FTDC_SoT_DepartmentCopy '9'\n///交易编码管理\n#define THOST_FTDC_SoT_Tradingcode 'A'\n///投资者状态维护\n#define THOST_FTDC_SoT_InvestorStatus 'B'\n///投资者权限管理\n#define THOST_FTDC_SoT_InvestorAuthority 'C'\n///属性设置\n#define THOST_FTDC_SoT_PropertySet 'D'\n///重置投资者密码\n#define THOST_FTDC_SoT_ReSetInvestorPasswd 'E'\n///投资者个性信息维护\n#define THOST_FTDC_SoT_InvestorPersonalityInfo 'F'\n\ntypedef char TThostFtdcSysOperTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCDataQueyTypeType是一个上报数据查询类型类型\n/////////////////////////////////////////////////////////////////////////\n///查询当前交易日报送的数据\n#define THOST_FTDC_CSRCQ_Current '0'\n///查询历史报送的代理经纪公司的数据\n#define THOST_FTDC_CSRCQ_History '1'\n\ntypedef char TThostFtdcCSRCDataQueyTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFreezeStatusType是一个休眠状态类型\n/////////////////////////////////////////////////////////////////////////\n///活跃\n#define THOST_FTDC_FRS_Normal '1'\n///休眠\n#define THOST_FTDC_FRS_Freeze '0'\n\ntypedef char TThostFtdcFreezeStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStandardStatusType是一个规范状态类型\n/////////////////////////////////////////////////////////////////////////\n///已规范\n#define THOST_FTDC_STST_Standard '0'\n///未规范\n#define THOST_FTDC_STST_NonStandard '1'\n\ntypedef char TThostFtdcStandardStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCFreezeStatusType是一个休眠状态类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCFreezeStatusType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRightParamTypeType是一个配置类型类型\n/////////////////////////////////////////////////////////////////////////\n///休眠户\n#define THOST_FTDC_RPT_Freeze '1'\n///激活休眠户\n#define THOST_FTDC_RPT_FreezeActive '2'\n///开仓权限限制\n#define THOST_FTDC_RPT_OpenLimit '3'\n///解除开仓权限限制\n#define THOST_FTDC_RPT_RelieveOpenLimit '4'\n\ntypedef char TThostFtdcRightParamTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRightTemplateIDType是一个模板代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRightTemplateIDType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRightTemplateNameType是一个模板名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRightTemplateNameType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDataStatusType是一个反洗钱审核表数据状态类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_AMLDS_Normal '0'\n///已删除\n#define THOST_FTDC_AMLDS_Deleted '1'\n\ntypedef char TThostFtdcDataStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAMLCheckStatusType是一个审核状态类型\n/////////////////////////////////////////////////////////////////////////\n///未复核\n#define THOST_FTDC_AMLCHS_Init '0'\n///复核中\n#define THOST_FTDC_AMLCHS_Checking '1'\n///已复核\n#define THOST_FTDC_AMLCHS_Checked '2'\n///拒绝上报\n#define THOST_FTDC_AMLCHS_RefuseReport '3'\n\ntypedef char TThostFtdcAMLCheckStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAmlDateTypeType是一个日期类型类型\n/////////////////////////////////////////////////////////////////////////\n///检查日期\n#define THOST_FTDC_AMLDT_DrawDay '0'\n///发生日期\n#define THOST_FTDC_AMLDT_TouchDay '1'\n\ntypedef char TThostFtdcAmlDateTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAmlCheckLevelType是一个审核级别类型\n/////////////////////////////////////////////////////////////////////////\n///零级审核\n#define THOST_FTDC_AMLCL_CheckLevel0 '0'\n///一级审核\n#define THOST_FTDC_AMLCL_CheckLevel1 '1'\n///二级审核\n#define THOST_FTDC_AMLCL_CheckLevel2 '2'\n///三级审核\n#define THOST_FTDC_AMLCL_CheckLevel3 '3'\n\ntypedef char TThostFtdcAmlCheckLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAmlCheckFlowType是一个反洗钱数据抽取审核流程类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAmlCheckFlowType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDataTypeType是一个数据类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDataTypeType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExportFileTypeType是一个导出文件类型类型\n/////////////////////////////////////////////////////////////////////////\n///CSV\n#define THOST_FTDC_EFT_CSV '0'\n///Excel\n#define THOST_FTDC_EFT_EXCEL '1'\n///DBF\n#define THOST_FTDC_EFT_DBF '2'\n\ntypedef char TThostFtdcExportFileTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettleManagerTypeType是一个结算配置类型类型\n/////////////////////////////////////////////////////////////////////////\n///结算前准备\n#define THOST_FTDC_SMT_Before '1'\n///结算\n#define THOST_FTDC_SMT_Settlement '2'\n///结算后核对\n#define THOST_FTDC_SMT_After '3'\n///结算后处理\n#define THOST_FTDC_SMT_Settlemented '4'\n\ntypedef char TThostFtdcSettleManagerTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettleManagerIDType是一个结算配置代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSettleManagerIDType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettleManagerNameType是一个结算配置名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSettleManagerNameType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettleManagerLevelType是一个结算配置等级类型\n/////////////////////////////////////////////////////////////////////////\n///必要\n#define THOST_FTDC_SML_Must '1'\n///警告\n#define THOST_FTDC_SML_Alarm '2'\n///提示\n#define THOST_FTDC_SML_Prompt '3'\n///不检查\n#define THOST_FTDC_SML_Ignore '4'\n\ntypedef char TThostFtdcSettleManagerLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettleManagerGroupType是一个模块分组类型\n/////////////////////////////////////////////////////////////////////////\n///交易所核对\n#define THOST_FTDC_SMG_Exhcange '1'\n///内部核对\n#define THOST_FTDC_SMG_ASP '2'\n///上报数据核对\n#define THOST_FTDC_SMG_CSRC '3'\n\ntypedef char TThostFtdcSettleManagerGroupType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCheckResultMemoType是一个核对结果说明类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCheckResultMemoType[1025];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFunctionUrlType是一个功能链接类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcFunctionUrlType[1025];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAuthInfoType是一个客户端认证信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAuthInfoType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAuthCodeType是一个客户端认证码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAuthCodeType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLimitUseTypeType是一个保值额度使用类型类型\n/////////////////////////////////////////////////////////////////////////\n///可重复使用\n#define THOST_FTDC_LUT_Repeatable '1'\n///不可重复使用\n#define THOST_FTDC_LUT_Unrepeatable '2'\n\ntypedef char TThostFtdcLimitUseTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDataResourceType是一个数据来源类型\n/////////////////////////////////////////////////////////////////////////\n///本系统\n#define THOST_FTDC_DAR_Settle '1'\n///交易所\n#define THOST_FTDC_DAR_Exchange '2'\n///报送数据\n#define THOST_FTDC_DAR_CSRC '3'\n\ntypedef char TThostFtdcDataResourceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMarginTypeType是一个保证金类型类型\n/////////////////////////////////////////////////////////////////////////\n///交易所保证金率\n#define THOST_FTDC_MGT_ExchMarginRate '0'\n///投资者保证金率\n#define THOST_FTDC_MGT_InstrMarginRate '1'\n///投资者交易保证金率\n#define THOST_FTDC_MGT_InstrMarginRateTrade '2'\n\ntypedef char TThostFtdcMarginTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcActiveTypeType是一个生效类型类型\n/////////////////////////////////////////////////////////////////////////\n///仅当日生效\n#define THOST_FTDC_ACT_Intraday '1'\n///长期生效\n#define THOST_FTDC_ACT_Long '2'\n\ntypedef char TThostFtdcActiveTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMarginRateTypeType是一个冲突保证金率类型类型\n/////////////////////////////////////////////////////////////////////////\n///交易所保证金率\n#define THOST_FTDC_MRT_Exchange '1'\n///投资者保证金率\n#define THOST_FTDC_MRT_Investor '2'\n///投资者交易保证金率\n#define THOST_FTDC_MRT_InvestorTrade '3'\n\ntypedef char TThostFtdcMarginRateTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBackUpStatusType是一个备份数据状态类型\n/////////////////////////////////////////////////////////////////////////\n///未生成备份数据\n#define THOST_FTDC_BUS_UnBak '0'\n///备份数据生成中\n#define THOST_FTDC_BUS_BakUp '1'\n///已生成备份数据\n#define THOST_FTDC_BUS_BakUped '2'\n///备份数据失败\n#define THOST_FTDC_BUS_BakFail '3'\n\ntypedef char TThostFtdcBackUpStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInitSettlementType是一个结算初始化状态类型\n/////////////////////////////////////////////////////////////////////////\n///结算初始化未开始\n#define THOST_FTDC_SIS_UnInitialize '0'\n///结算初始化中\n#define THOST_FTDC_SIS_Initialize '1'\n///结算初始化完成\n#define THOST_FTDC_SIS_Initialized '2'\n\ntypedef char TThostFtdcInitSettlementType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReportStatusType是一个报表数据生成状态类型\n/////////////////////////////////////////////////////////////////////////\n///未生成报表数据\n#define THOST_FTDC_SRS_NoCreate '0'\n///报表数据生成中\n#define THOST_FTDC_SRS_Create '1'\n///已生成报表数据\n#define THOST_FTDC_SRS_Created '2'\n///生成报表数据失败\n#define THOST_FTDC_SRS_CreateFail '3'\n\ntypedef char TThostFtdcReportStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSaveStatusType是一个数据归档状态类型\n/////////////////////////////////////////////////////////////////////////\n///归档未完成\n#define THOST_FTDC_SSS_UnSaveData '0'\n///归档完成\n#define THOST_FTDC_SSS_SaveDatad '1'\n\ntypedef char TThostFtdcSaveStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSettArchiveStatusType是一个结算确认数据归档状态类型\n/////////////////////////////////////////////////////////////////////////\n///未归档数据\n#define THOST_FTDC_SAS_UnArchived '0'\n///数据归档中\n#define THOST_FTDC_SAS_Archiving '1'\n///已归档数据\n#define THOST_FTDC_SAS_Archived '2'\n///归档数据失败\n#define THOST_FTDC_SAS_ArchiveFail '3'\n\ntypedef char TThostFtdcSettArchiveStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCTPTypeType是一个CTP交易系统类型类型\n/////////////////////////////////////////////////////////////////////////\n///未知类型\n#define THOST_FTDC_CTPT_Unkown '0'\n///主中心\n#define THOST_FTDC_CTPT_MainCenter '1'\n///备中心\n#define THOST_FTDC_CTPT_BackUp '2'\n\ntypedef char TThostFtdcCTPTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcToolIDType是一个工具代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcToolIDType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcToolNameType是一个工具名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcToolNameType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCloseDealTypeType是一个平仓处理类型类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_CDT_Normal '0'\n///投机平仓优先\n#define THOST_FTDC_CDT_SpecFirst '1'\n\ntypedef char TThostFtdcCloseDealTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMortgageFundUseRangeType是一个货币质押资金可用范围类型\n/////////////////////////////////////////////////////////////////////////\n///不能使用\n#define THOST_FTDC_MFUR_None '0'\n///用于保证金\n#define THOST_FTDC_MFUR_Margin '1'\n///用于手续费、盈亏、保证金\n#define THOST_FTDC_MFUR_All '2'\n///人民币方案3\n#define THOST_FTDC_MFUR_CNY3 '3'\n\ntypedef char TThostFtdcMortgageFundUseRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrencyUnitType是一个币种单位数量类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcCurrencyUnitType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExchangeRateType是一个汇率类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcExchangeRateType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSpecProductTypeType是一个特殊产品类型类型\n/////////////////////////////////////////////////////////////////////////\n///郑商所套保产品\n#define THOST_FTDC_SPT_CzceHedge '1'\n///货币质押产品\n#define THOST_FTDC_SPT_IneForeignCurrency '2'\n///大连短线开平仓产品\n#define THOST_FTDC_SPT_DceOpenClose '3'\n\ntypedef char TThostFtdcSpecProductTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundMortgageTypeType是一个货币质押类型类型\n/////////////////////////////////////////////////////////////////////////\n///质押\n#define THOST_FTDC_FMT_Mortgage '1'\n///解质\n#define THOST_FTDC_FMT_Redemption '2'\n\ntypedef char TThostFtdcFundMortgageTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAccountSettlementParamIDType是一个投资者账户结算参数代码类型\n/////////////////////////////////////////////////////////////////////////\n///基础保证金\n#define THOST_FTDC_ASPI_BaseMargin '1'\n///最低权益标准\n#define THOST_FTDC_ASPI_LowestInterest '2'\n\ntypedef char TThostFtdcAccountSettlementParamIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrencyNameType是一个币种名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCurrencyNameType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrencySignType是一个币种符号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCurrencySignType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundMortDirectionType是一个货币质押方向类型\n/////////////////////////////////////////////////////////////////////////\n///货币质入\n#define THOST_FTDC_FMD_In '1'\n///货币质出\n#define THOST_FTDC_FMD_Out '2'\n\ntypedef char TThostFtdcFundMortDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBusinessClassType是一个换汇类别类型\n/////////////////////////////////////////////////////////////////////////\n///盈利\n#define THOST_FTDC_BT_Profit '0'\n///亏损\n#define THOST_FTDC_BT_Loss '1'\n///其他\n#define THOST_FTDC_BT_Other 'Z'\n\ntypedef char TThostFtdcBusinessClassType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSwapSourceTypeType是一个换汇数据来源类型\n/////////////////////////////////////////////////////////////////////////\n///手工\n#define THOST_FTDC_SST_Manual '0'\n///自动生成\n#define THOST_FTDC_SST_Automatic '1'\n\ntypedef char TThostFtdcSwapSourceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrExDirectionType是一个换汇类型类型\n/////////////////////////////////////////////////////////////////////////\n///结汇\n#define THOST_FTDC_CED_Settlement '0'\n///售汇\n#define THOST_FTDC_CED_Sale '1'\n\ntypedef char TThostFtdcCurrExDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrencySwapStatusType是一个申请状态类型\n/////////////////////////////////////////////////////////////////////////\n///已录入\n#define THOST_FTDC_CSS_Entry '1'\n///已审核\n#define THOST_FTDC_CSS_Approve '2'\n///已拒绝\n#define THOST_FTDC_CSS_Refuse '3'\n///已撤销\n#define THOST_FTDC_CSS_Revoke '4'\n///已发送\n#define THOST_FTDC_CSS_Send '5'\n///换汇成功\n#define THOST_FTDC_CSS_Success '6'\n///换汇失败\n#define THOST_FTDC_CSS_Failure '7'\n\ntypedef char TThostFtdcCurrencySwapStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrExchCertNoType是一个凭证号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCurrExchCertNoType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBatchSerialNoType是一个批次号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBatchSerialNoType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReqFlagType是一个换汇发送标志类型\n/////////////////////////////////////////////////////////////////////////\n///未发送\n#define THOST_FTDC_REQF_NoSend '0'\n///发送成功\n#define THOST_FTDC_REQF_SendSuccess '1'\n///发送失败\n#define THOST_FTDC_REQF_SendFailed '2'\n///等待重发\n#define THOST_FTDC_REQF_WaitReSend '3'\n\ntypedef char TThostFtdcReqFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcResFlagType是一个换汇返回成功标志类型\n/////////////////////////////////////////////////////////////////////////\n///成功\n#define THOST_FTDC_RESF_Success '0'\n///账户余额不足\n#define THOST_FTDC_RESF_InsuffiCient '1'\n///交易结果未知\n#define THOST_FTDC_RESF_UnKnown '8'\n\ntypedef char TThostFtdcResFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPageControlType是一个换汇页面控制类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPageControlType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRecordCountType是一个记录数类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcRecordCountType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrencySwapMemoType是一个换汇需确认信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCurrencySwapMemoType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExStatusType是一个修改状态类型\n/////////////////////////////////////////////////////////////////////////\n///修改前\n#define THOST_FTDC_EXS_Before '0'\n///修改后\n#define THOST_FTDC_EXS_After '1'\n\ntypedef char TThostFtdcExStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientRegionType是一个开户客户地域类型\n/////////////////////////////////////////////////////////////////////////\n///国内客户\n#define THOST_FTDC_CR_Domestic '1'\n///港澳台客户\n#define THOST_FTDC_CR_GMT '2'\n///国外客户\n#define THOST_FTDC_CR_Foreign '3'\n\ntypedef char TThostFtdcClientRegionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWorkPlaceType是一个工作单位类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcWorkPlaceType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBusinessPeriodType是一个经营期限类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBusinessPeriodType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWebSiteType是一个网址类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcWebSiteType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOAIdCardTypeType是一个统一开户证件类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOAIdCardTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientModeType是一个开户模式类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClientModeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestorFullNameType是一个投资者全称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvestorFullNameType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOABrokerIDType是一个境外中介机构ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOABrokerIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOAZipCodeType是一个邮政编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOAZipCodeType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOAEMailType是一个电子邮箱类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOAEMailType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOldCityType是一个城市类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOldCityType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCorporateIdentifiedCardNoType是一个法人代表证件号码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCorporateIdentifiedCardNoType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHasBoardType是一个是否有董事会类型\n/////////////////////////////////////////////////////////////////////////\n///没有\n#define THOST_FTDC_HB_No '0'\n///有\n#define THOST_FTDC_HB_Yes '1'\n\ntypedef char TThostFtdcHasBoardType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStartModeType是一个启动模式类型\n/////////////////////////////////////////////////////////////////////////\n///正常\n#define THOST_FTDC_SM_Normal '1'\n///应急\n#define THOST_FTDC_SM_Emerge '2'\n///恢复\n#define THOST_FTDC_SM_Restore '3'\n\ntypedef char TThostFtdcStartModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTemplateTypeType是一个模型类型类型\n/////////////////////////////////////////////////////////////////////////\n///全量\n#define THOST_FTDC_TPT_Full '1'\n///增量\n#define THOST_FTDC_TPT_Increment '2'\n///备份\n#define THOST_FTDC_TPT_BackUp '3'\n\ntypedef char TThostFtdcTemplateTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLoginModeType是一个登录模式类型\n/////////////////////////////////////////////////////////////////////////\n///交易\n#define THOST_FTDC_LM_Trade '0'\n///转账\n#define THOST_FTDC_LM_Transfer '1'\n\ntypedef char TThostFtdcLoginModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPromptTypeType是一个日历提示类型类型\n/////////////////////////////////////////////////////////////////////////\n///合约上下市\n#define THOST_FTDC_CPT_Instrument '1'\n///保证金分段生效\n#define THOST_FTDC_CPT_Margin '2'\n\ntypedef char TThostFtdcPromptTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLedgerManageIDType是一个分户管理资产编码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLedgerManageIDType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestVarietyType是一个投资品种类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvestVarietyType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBankAccountTypeType是一个账户类别类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBankAccountTypeType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLedgerManageBankType是一个开户银行类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLedgerManageBankType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCffexDepartmentNameType是一个开户营业部类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCffexDepartmentNameType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCffexDepartmentCodeType是一个营业部代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCffexDepartmentCodeType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHasTrusteeType是一个是否有托管人类型\n/////////////////////////////////////////////////////////////////////////\n///有\n#define THOST_FTDC_HT_Yes '1'\n///没有\n#define THOST_FTDC_HT_No '0'\n\ntypedef char TThostFtdcHasTrusteeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCMemo1Type是一个说明类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCMemo1Type[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAssetmgrCFullNameType是一个代理资产管理业务的期货公司全称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAssetmgrCFullNameType[101];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAssetmgrApprovalNOType是一个资产管理业务批文号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAssetmgrApprovalNOType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAssetmgrMgrNameType是一个资产管理业务负责人姓名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAssetmgrMgrNameType[401];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAmTypeType是一个机构类型类型\n/////////////////////////////////////////////////////////////////////////\n///银行\n#define THOST_FTDC_AMT_Bank '1'\n///证券公司\n#define THOST_FTDC_AMT_Securities '2'\n///基金公司\n#define THOST_FTDC_AMT_Fund '3'\n///保险公司\n#define THOST_FTDC_AMT_Insurance '4'\n///信托公司\n#define THOST_FTDC_AMT_Trust '5'\n///其他\n#define THOST_FTDC_AMT_Other '9'\n\ntypedef char TThostFtdcAmTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCAmTypeType是一个机构类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCAmTypeType[5];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCFundIOTypeType是一个出入金类型类型\n/////////////////////////////////////////////////////////////////////////\n///出入金\n#define THOST_FTDC_CFIOT_FundIO '0'\n///银期换汇\n#define THOST_FTDC_CFIOT_SwapCurrency '1'\n\ntypedef char TThostFtdcCSRCFundIOTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCusAccountTypeType是一个结算账户类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货结算账户\n#define THOST_FTDC_CAT_Futures '1'\n///纯期货资管业务下的资管结算账户\n#define THOST_FTDC_CAT_AssetmgrFuture '2'\n///综合类资管业务下的期货资管托管账户\n#define THOST_FTDC_CAT_AssetmgrTrustee '3'\n///综合类资管业务下的资金中转账户\n#define THOST_FTDC_CAT_AssetmgrTransfer '4'\n\ntypedef char TThostFtdcCusAccountTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCNationalType是一个国籍类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCNationalType[4];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCSRCSecAgentIDType是一个二级代理ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCSRCSecAgentIDType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLanguageTypeType是一个通知语言类型类型\n/////////////////////////////////////////////////////////////////////////\n///中文\n#define THOST_FTDC_LT_Chinese '1'\n///英文\n#define THOST_FTDC_LT_English '2'\n\ntypedef char TThostFtdcLanguageTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAmAccountType是一个投资账户类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAmAccountType[23];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAssetmgrClientTypeType是一个资产管理客户类型类型\n/////////////////////////////////////////////////////////////////////////\n///个人资管客户\n#define THOST_FTDC_AMCT_Person '1'\n///单位资管客户\n#define THOST_FTDC_AMCT_Organ '2'\n///特殊单位资管客户\n#define THOST_FTDC_AMCT_SpecialOrgan '4'\n\ntypedef char TThostFtdcAssetmgrClientTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAssetmgrTypeType是一个投资类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货类\n#define THOST_FTDC_ASST_Futures '3'\n///综合类\n#define THOST_FTDC_ASST_SpecialOrgan '4'\n\ntypedef char TThostFtdcAssetmgrTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOMType是一个计量单位类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcUOMType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSHFEInstLifePhaseType是一个上期所合约生命周期状态类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSHFEInstLifePhaseType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSHFEProductClassType是一个产品类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSHFEProductClassType[11];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPriceDecimalType是一个价格小数位类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcPriceDecimalType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInTheMoneyFlagType是一个平值期权标志类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInTheMoneyFlagType[2];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCheckInstrTypeType是一个合约比较类型类型\n/////////////////////////////////////////////////////////////////////////\n///合约交易所不存在\n#define THOST_FTDC_CIT_HasExch '0'\n///合约本系统不存在\n#define THOST_FTDC_CIT_HasATP '1'\n///合约比较不一致\n#define THOST_FTDC_CIT_HasDiff '2'\n\ntypedef char TThostFtdcCheckInstrTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDeliveryTypeType是一个交割类型类型\n/////////////////////////////////////////////////////////////////////////\n///手工交割\n#define THOST_FTDC_DT_HandDeliv '1'\n///到期交割\n#define THOST_FTDC_DT_PersonDeliv '2'\n\ntypedef char TThostFtdcDeliveryTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBigMoneyType是一个资金类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcBigMoneyType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMaxMarginSideAlgorithmType是一个大额单边保证金算法类型\n/////////////////////////////////////////////////////////////////////////\n///不使用大额单边保证金算法\n#define THOST_FTDC_MMSA_NO '0'\n///使用大额单边保证金算法\n#define THOST_FTDC_MMSA_YES '1'\n\ntypedef char TThostFtdcMaxMarginSideAlgorithmType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDAClientTypeType是一个资产管理客户类型类型\n/////////////////////////////////////////////////////////////////////////\n///自然人\n#define THOST_FTDC_CACT_Person '0'\n///法人\n#define THOST_FTDC_CACT_Company '1'\n///其他\n#define THOST_FTDC_CACT_Other '2'\n\ntypedef char TThostFtdcDAClientTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombinInstrIDType是一个套利合约代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCombinInstrIDType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombinSettlePriceType是一个各腿结算价类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCombinSettlePriceType[61];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDCEPriorityType是一个优先级类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcDCEPriorityType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradeGroupIDType是一个成交组号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcTradeGroupIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIsCheckPrepaType是一个是否校验开户可用资金类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcIsCheckPrepaType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUOAAssetmgrTypeType是一个投资类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货类\n#define THOST_FTDC_UOAAT_Futures '1'\n///综合类\n#define THOST_FTDC_UOAAT_SpecialOrgan '2'\n\ntypedef char TThostFtdcUOAAssetmgrTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDirectionEnType是一个买卖方向类型\n/////////////////////////////////////////////////////////////////////////\n///Buy\n#define THOST_FTDC_DEN_Buy '0'\n///Sell\n#define THOST_FTDC_DEN_Sell '1'\n\ntypedef char TThostFtdcDirectionEnType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOffsetFlagEnType是一个开平标志类型\n/////////////////////////////////////////////////////////////////////////\n///Position Opening\n#define THOST_FTDC_OFEN_Open '0'\n///Position Close\n#define THOST_FTDC_OFEN_Close '1'\n///Forced Liquidation\n#define THOST_FTDC_OFEN_ForceClose '2'\n///Close Today\n#define THOST_FTDC_OFEN_CloseToday '3'\n///Close Prev.\n#define THOST_FTDC_OFEN_CloseYesterday '4'\n///Forced Reduction\n#define THOST_FTDC_OFEN_ForceOff '5'\n///Local Forced Liquidation\n#define THOST_FTDC_OFEN_LocalForceClose '6'\n\ntypedef char TThostFtdcOffsetFlagEnType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHedgeFlagEnType是一个投机套保标志类型\n/////////////////////////////////////////////////////////////////////////\n///Speculation\n#define THOST_FTDC_HFEN_Speculation '1'\n///Arbitrage\n#define THOST_FTDC_HFEN_Arbitrage '2'\n///Hedge\n#define THOST_FTDC_HFEN_Hedge '3'\n\ntypedef char TThostFtdcHedgeFlagEnType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundIOTypeEnType是一个出入金类型类型\n/////////////////////////////////////////////////////////////////////////\n///Deposit/Withdrawal\n#define THOST_FTDC_FIOTEN_FundIO '1'\n///Bank-Futures Transfer\n#define THOST_FTDC_FIOTEN_Transfer '2'\n///Bank-Futures FX Exchange\n#define THOST_FTDC_FIOTEN_SwapCurrency '3'\n\ntypedef char TThostFtdcFundIOTypeEnType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundTypeEnType是一个资金类型类型\n/////////////////////////////////////////////////////////////////////////\n///Bank Deposit\n#define THOST_FTDC_FTEN_Deposite '1'\n///Payment/Fee\n#define THOST_FTDC_FTEN_ItemFund '2'\n///Brokerage Adj\n#define THOST_FTDC_FTEN_Company '3'\n///Internal Transfer\n#define THOST_FTDC_FTEN_InnerTransfer '4'\n\ntypedef char TThostFtdcFundTypeEnType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundDirectionEnType是一个出入金方向类型\n/////////////////////////////////////////////////////////////////////////\n///Deposit\n#define THOST_FTDC_FDEN_In '1'\n///Withdrawal\n#define THOST_FTDC_FDEN_Out '2'\n\ntypedef char TThostFtdcFundDirectionEnType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcFundMortDirectionEnType是一个货币质押方向类型\n/////////////////////////////////////////////////////////////////////////\n///Pledge\n#define THOST_FTDC_FMDEN_In '1'\n///Redemption\n#define THOST_FTDC_FMDEN_Out '2'\n\ntypedef char TThostFtdcFundMortDirectionEnType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSwapBusinessTypeType是一个换汇业务种类类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSwapBusinessTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOptionsTypeType是一个期权类型类型\n/////////////////////////////////////////////////////////////////////////\n///看涨\n#define THOST_FTDC_CP_CallOptions '1'\n///看跌\n#define THOST_FTDC_CP_PutOptions '2'\n\ntypedef char TThostFtdcOptionsTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStrikeModeType是一个执行方式类型\n/////////////////////////////////////////////////////////////////////////\n///欧式\n#define THOST_FTDC_STM_Continental '0'\n///美式\n#define THOST_FTDC_STM_American '1'\n///百慕大\n#define THOST_FTDC_STM_Bermuda '2'\n\ntypedef char TThostFtdcStrikeModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStrikeTypeType是一个执行类型类型\n/////////////////////////////////////////////////////////////////////////\n///自身对冲\n#define THOST_FTDC_STT_Hedge '0'\n///匹配执行\n#define THOST_FTDC_STT_Match '1'\n\ntypedef char TThostFtdcStrikeTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcApplyTypeType是一个中金所期权放弃执行申请类型类型\n/////////////////////////////////////////////////////////////////////////\n///不执行数量\n#define THOST_FTDC_APPT_NotStrikeNum '4'\n\ntypedef char TThostFtdcApplyTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcGiveUpDataSourceType是一个放弃执行申请数据来源类型\n/////////////////////////////////////////////////////////////////////////\n///系统生成\n#define THOST_FTDC_GUDS_Gen '0'\n///手工添加\n#define THOST_FTDC_GUDS_Hand '1'\n\ntypedef char TThostFtdcGiveUpDataSourceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExecOrderSysIDType是一个执行宣告系统编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcExecOrderSysIDType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExecResultType是一个执行结果类型\n/////////////////////////////////////////////////////////////////////////\n///没有执行\n#define THOST_FTDC_OER_NoExec 'n'\n///已经取消\n#define THOST_FTDC_OER_Canceled 'c'\n///执行成功\n#define THOST_FTDC_OER_OK '0'\n///期权持仓不够\n#define THOST_FTDC_OER_NoPosition '1'\n///资金不够\n#define THOST_FTDC_OER_NoDeposit '2'\n///会员不存在\n#define THOST_FTDC_OER_NoParticipant '3'\n///客户不存在\n#define THOST_FTDC_OER_NoClient '4'\n///合约不存在\n#define THOST_FTDC_OER_NoInstrument '6'\n///没有执行权限\n#define THOST_FTDC_OER_NoRight '7'\n///不合理的数量\n#define THOST_FTDC_OER_InvalidVolume '8'\n///没有足够的历史成交\n#define THOST_FTDC_OER_NoEnoughHistoryTrade '9'\n///未知\n#define THOST_FTDC_OER_Unknown 'a'\n\ntypedef char TThostFtdcExecResultType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStrikeSequenceType是一个执行序号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcStrikeSequenceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStrikeTimeType是一个执行时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcStrikeTimeType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombinationTypeType是一个组合类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货组合\n#define THOST_FTDC_COMBT_Future '0'\n///垂直价差BUL\n#define THOST_FTDC_COMBT_BUL '1'\n///垂直价差BER\n#define THOST_FTDC_COMBT_BER '2'\n///跨式组合\n#define THOST_FTDC_COMBT_STD '3'\n///宽跨式组合\n#define THOST_FTDC_COMBT_STG '4'\n///备兑组合\n#define THOST_FTDC_COMBT_PRT '5'\n///时间价差组合\n#define THOST_FTDC_COMBT_CAS '6'\n///期权对锁组合\n#define THOST_FTDC_COMBT_OPL '7'\n///买备兑组合\n#define THOST_FTDC_COMBT_BFO '8'\n///买入期权垂直价差组合\n#define THOST_FTDC_COMBT_BLS '9'\n///卖出期权垂直价差组合\n#define THOST_FTDC_COMBT_BES 'a'\n\ntypedef char TThostFtdcCombinationTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDceCombinationTypeType是一个组合类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货对锁组合\n#define THOST_FTDC_DCECOMBT_SPL '0'\n///期权对锁组合\n#define THOST_FTDC_DCECOMBT_OPL '1'\n///期货跨期组合\n#define THOST_FTDC_DCECOMBT_SP '2'\n///期货跨品种组合\n#define THOST_FTDC_DCECOMBT_SPC '3'\n///买入期权垂直价差组合\n#define THOST_FTDC_DCECOMBT_BLS '4'\n///卖出期权垂直价差组合\n#define THOST_FTDC_DCECOMBT_BES '5'\n///期权日历价差组合\n#define THOST_FTDC_DCECOMBT_CAS '6'\n///期权跨式组合\n#define THOST_FTDC_DCECOMBT_STD '7'\n///期权宽跨式组合\n#define THOST_FTDC_DCECOMBT_STG '8'\n///买入期货期权组合\n#define THOST_FTDC_DCECOMBT_BFO '9'\n///卖出期货期权组合\n#define THOST_FTDC_DCECOMBT_SFO 'a'\n\ntypedef char TThostFtdcDceCombinationTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOptionRoyaltyPriceTypeType是一个期权权利金价格类型类型\n/////////////////////////////////////////////////////////////////////////\n///昨结算价\n#define THOST_FTDC_ORPT_PreSettlementPrice '1'\n///开仓价\n#define THOST_FTDC_ORPT_OpenPrice '4'\n///最新价与昨结算价较大值\n#define THOST_FTDC_ORPT_MaxPreSettlementPrice '5'\n\ntypedef char TThostFtdcOptionRoyaltyPriceTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBalanceAlgorithmType是一个权益算法类型\n/////////////////////////////////////////////////////////////////////////\n///不计算期权市值盈亏\n#define THOST_FTDC_BLAG_Default '1'\n///计算期权市值亏损\n#define THOST_FTDC_BLAG_IncludeOptValLost '2'\n\ntypedef char TThostFtdcBalanceAlgorithmType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcActionTypeType是一个执行类型类型\n/////////////////////////////////////////////////////////////////////////\n///执行\n#define THOST_FTDC_ACTP_Exec '1'\n///放弃\n#define THOST_FTDC_ACTP_Abandon '2'\n\ntypedef char TThostFtdcActionTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcForQuoteStatusType是一个询价状态类型\n/////////////////////////////////////////////////////////////////////////\n///已经提交\n#define THOST_FTDC_FQST_Submitted 'a'\n///已经接受\n#define THOST_FTDC_FQST_Accepted 'b'\n///已经被拒绝\n#define THOST_FTDC_FQST_Rejected 'c'\n\ntypedef char TThostFtdcForQuoteStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcValueMethodType是一个取值方式类型\n/////////////////////////////////////////////////////////////////////////\n///按绝对值\n#define THOST_FTDC_VM_Absolute '0'\n///按比率\n#define THOST_FTDC_VM_Ratio '1'\n\ntypedef char TThostFtdcValueMethodType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExecOrderPositionFlagType是一个期权行权后是否保留期货头寸的标记类型\n/////////////////////////////////////////////////////////////////////////\n///保留\n#define THOST_FTDC_EOPF_Reserve '0'\n///不保留\n#define THOST_FTDC_EOPF_UnReserve '1'\n\ntypedef char TThostFtdcExecOrderPositionFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcExecOrderCloseFlagType是一个期权行权后生成的头寸是否自动平仓类型\n/////////////////////////////////////////////////////////////////////////\n///自动平仓\n#define THOST_FTDC_EOCF_AutoClose '0'\n///免于自动平仓\n#define THOST_FTDC_EOCF_NotToClose '1'\n\ntypedef char TThostFtdcExecOrderCloseFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductTypeType是一个产品类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货\n#define THOST_FTDC_PTE_Futures '1'\n///期权\n#define THOST_FTDC_PTE_Options '2'\n\ntypedef char TThostFtdcProductTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCZCEUploadFileNameType是一个郑商所结算文件名类型\n/////////////////////////////////////////////////////////////////////////\n///^\\d{8}_zz_\\d{4}\n#define THOST_FTDC_CUFN_CUFN_O 'O'\n///^\\d{8}成交表\n#define THOST_FTDC_CUFN_CUFN_T 'T'\n///^\\d{8}单腿持仓表new\n#define THOST_FTDC_CUFN_CUFN_P 'P'\n///^\\d{8}非平仓了结表\n#define THOST_FTDC_CUFN_CUFN_N 'N'\n///^\\d{8}平仓表\n#define THOST_FTDC_CUFN_CUFN_L 'L'\n///^\\d{8}资金表\n#define THOST_FTDC_CUFN_CUFN_F 'F'\n///^\\d{8}组合持仓表\n#define THOST_FTDC_CUFN_CUFN_C 'C'\n///^\\d{8}保证金参数表\n#define THOST_FTDC_CUFN_CUFN_M 'M'\n\ntypedef char TThostFtdcCZCEUploadFileNameType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDCEUploadFileNameType是一个大商所结算文件名类型\n/////////////////////////////////////////////////////////////////////////\n///^\\d{8}_dl_\\d{3}\n#define THOST_FTDC_DUFN_DUFN_O 'O'\n///^\\d{8}_成交表\n#define THOST_FTDC_DUFN_DUFN_T 'T'\n///^\\d{8}_持仓表\n#define THOST_FTDC_DUFN_DUFN_P 'P'\n///^\\d{8}_资金结算表\n#define THOST_FTDC_DUFN_DUFN_F 'F'\n///^\\d{8}_优惠组合持仓明细表\n#define THOST_FTDC_DUFN_DUFN_C 'C'\n///^\\d{8}_持仓明细表\n#define THOST_FTDC_DUFN_DUFN_D 'D'\n///^\\d{8}_保证金参数表\n#define THOST_FTDC_DUFN_DUFN_M 'M'\n///^\\d{8}_期权执行表\n#define THOST_FTDC_DUFN_DUFN_S 'S'\n\ntypedef char TThostFtdcDCEUploadFileNameType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSHFEUploadFileNameType是一个上期所结算文件名类型\n/////////////////////////////////////////////////////////////////////////\n///^\\d{4}_\\d{8}_\\d{8}_DailyFundChg\n#define THOST_FTDC_SUFN_SUFN_O 'O'\n///^\\d{4}_\\d{8}_\\d{8}_Trade\n#define THOST_FTDC_SUFN_SUFN_T 'T'\n///^\\d{4}_\\d{8}_\\d{8}_SettlementDetail\n#define THOST_FTDC_SUFN_SUFN_P 'P'\n///^\\d{4}_\\d{8}_\\d{8}_Capital\n#define THOST_FTDC_SUFN_SUFN_F 'F'\n\ntypedef char TThostFtdcSHFEUploadFileNameType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCFFEXUploadFileNameType是一个中金所结算文件名类型\n/////////////////////////////////////////////////////////////////////////\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_Trade\n#define THOST_FTDC_CFUFN_SUFN_T 'T'\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_SettlementDetail\n#define THOST_FTDC_CFUFN_SUFN_P 'P'\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_Capital\n#define THOST_FTDC_CFUFN_SUFN_F 'F'\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_OptionExec\n#define THOST_FTDC_CFUFN_SUFN_S 'S'\n\ntypedef char TThostFtdcCFFEXUploadFileNameType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCombDirectionType是一个组合指令方向类型\n/////////////////////////////////////////////////////////////////////////\n///申请组合\n#define THOST_FTDC_CMDR_Comb '0'\n///申请拆分\n#define THOST_FTDC_CMDR_UnComb '1'\n///操作员删组合单\n#define THOST_FTDC_CMDR_DelComb '2'\n\ntypedef char TThostFtdcCombDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStrikeOffsetTypeType是一个行权偏移类型类型\n/////////////////////////////////////////////////////////////////////////\n///实值额\n#define THOST_FTDC_STOV_RealValue '1'\n///盈利额\n#define THOST_FTDC_STOV_ProfitValue '2'\n///实值比例\n#define THOST_FTDC_STOV_RealRatio '3'\n///盈利比例\n#define THOST_FTDC_STOV_ProfitRatio '4'\n\ntypedef char TThostFtdcStrikeOffsetTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReserveOpenAccStasType是一个预约开户状态类型\n/////////////////////////////////////////////////////////////////////////\n///等待处理中\n#define THOST_FTDC_ROAST_Processing '0'\n///已撤销\n#define THOST_FTDC_ROAST_Cancelled '1'\n///已开户\n#define THOST_FTDC_ROAST_Opened '2'\n///无效请求\n#define THOST_FTDC_ROAST_Invalid '3'\n\ntypedef char TThostFtdcReserveOpenAccStasType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLoginRemarkType是一个登录备注类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLoginRemarkType[36];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvestUnitIDType是一个投资单元代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcInvestUnitIDType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBulletinIDType是一个公告编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcBulletinIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcNewsTypeType是一个公告类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcNewsTypeType[3];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcNewsUrgencyType是一个紧急程度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcNewsUrgencyType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAbstractType是一个消息摘要类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAbstractType[81];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcComeFromType是一个消息来源类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcComeFromType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcURLLinkType是一个WEB地址类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcURLLinkType[201];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLongIndividualNameType是一个长个人姓名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLongIndividualNameType[161];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcLongFBEBankAccountNameType是一个长换汇银行账户名类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcLongFBEBankAccountNameType[161];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDateTimeType是一个日期时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcDateTimeType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWeakPasswordSourceType是一个弱密码来源类型\n/////////////////////////////////////////////////////////////////////////\n///弱密码库\n#define THOST_FTDC_WPSR_Lib '1'\n///手工录入\n#define THOST_FTDC_WPSR_Manual '2'\n\ntypedef char TThostFtdcWeakPasswordSourceType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRandomStringType是一个随机串类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRandomStringType[17];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderMemoType是一个报单回显字段类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOrderMemoType[13];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOptSelfCloseFlagType是一个期权行权的头寸是否自对冲类型\n/////////////////////////////////////////////////////////////////////////\n///自对冲期权仓位\n#define THOST_FTDC_OSCF_CloseSelfOptionPosition '1'\n///保留期权仓位\n#define THOST_FTDC_OSCF_ReserveOptionPosition '2'\n///自对冲卖方履约后的期货仓位\n#define THOST_FTDC_OSCF_SellCloseSelfFuturePosition '3'\n///保留卖方履约后的期货仓位\n#define THOST_FTDC_OSCF_ReserveFuturePosition '4'\n\ntypedef char TThostFtdcOptSelfCloseFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBizTypeType是一个业务类型类型\n/////////////////////////////////////////////////////////////////////////\n///期货\n#define THOST_FTDC_BZTP_Future '1'\n///证券\n#define THOST_FTDC_BZTP_Stock '2'\n\ntypedef char TThostFtdcBizTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAppTypeType是一个用户App类型类型\n/////////////////////////////////////////////////////////////////////////\n///直连的投资者\n#define THOST_FTDC_APP_TYPE_Investor '1'\n///为每个投资者都创建连接的中继\n#define THOST_FTDC_APP_TYPE_InvestorRelay '2'\n///所有投资者共享一个操作员连接的中继\n#define THOST_FTDC_APP_TYPE_OperatorRelay '3'\n///未知\n#define THOST_FTDC_APP_TYPE_UnKnown '4'\n\ntypedef char TThostFtdcAppTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAppIDType是一个App代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAppIDType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSystemInfoLenType是一个系统信息长度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSystemInfoLenType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAdditionalInfoLenType是一个补充信息长度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcAdditionalInfoLenType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClientSystemInfoType是一个交易终端系统信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcClientSystemInfoType[273];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAdditionalInfoType是一个系统外部信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAdditionalInfoType[261];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBase64ClientSystemInfoType是一个base64交易终端系统信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBase64ClientSystemInfoType[365];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcBase64AdditionalInfoType是一个base64系统外部信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcBase64AdditionalInfoType[349];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCurrentAuthMethodType是一个当前可用的认证模式，0代表无需认证模式 A从低位开始最后一位代表图片验证码，倒数第二位代表动态口令，倒数第三位代表短信验证码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCurrentAuthMethodType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCaptchaInfoLenType是一个图片验证信息长度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCaptchaInfoLenType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCaptchaInfoType是一个图片验证信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCaptchaInfoType[2561];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcUserTextSeqType是一个用户短信验证码的编号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcUserTextSeqType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHandshakeDataType是一个握手数据内容类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcHandshakeDataType[301];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHandshakeDataLenType是一个握手数据内容长度类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcHandshakeDataLenType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCryptoKeyVersionType是一个api与front通信密钥版本号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCryptoKeyVersionType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRsaKeyVersionType是一个公钥版本号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcRsaKeyVersionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSoftwareProviderIDType是一个交易软件商ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSoftwareProviderIDType[22];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCollectTimeType是一个信息采集时间类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcCollectTimeType[21];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcQueryFreqType是一个查询频率类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcQueryFreqType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcResponseValueType是一个应答类型类型\n/////////////////////////////////////////////////////////////////////////\n///检查成功\n#define THOST_FTDC_RV_Right '0'\n///检查失败\n#define THOST_FTDC_RV_Refuse '1'\n\ntypedef char TThostFtdcResponseValueType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOTCTradeTypeType是一个OTC成交类型类型\n/////////////////////////////////////////////////////////////////////////\n///大宗交易\n#define THOST_FTDC_OTC_TRDT_Block '0'\n///期转现\n#define THOST_FTDC_OTC_TRDT_EFP '1'\n\ntypedef char TThostFtdcOTCTradeTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcMatchTypeType是一个期现风险匹配方式类型\n/////////////////////////////////////////////////////////////////////////\n///基点价值\n#define THOST_FTDC_OTC_MT_DV01 '1'\n///面值\n#define THOST_FTDC_OTC_MT_ParValue '2'\n\ntypedef char TThostFtdcMatchTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOTCTraderIDType是一个OTC交易员代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcOTCTraderIDType[31];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRiskValueType是一个期货风险值类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcRiskValueType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIDBNameType是一个握手数据内容类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIDBNameType[100];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDiscountRatioType是一个折扣率类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcDiscountRatioType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAuthTypeType是一个用户终端认证方式类型\n/////////////////////////////////////////////////////////////////////////\n///白名单校验\n#define THOST_FTDC_AU_WHITE '0'\n///黑名单校验\n#define THOST_FTDC_AU_BLACK '1'\n\ntypedef char TThostFtdcAuthTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcClassTypeType是一个合约分类方式类型\n/////////////////////////////////////////////////////////////////////////\n///所有合约\n#define THOST_FTDC_INS_ALL '0'\n///期货、即期、期转现、Tas、金属指数合约\n#define THOST_FTDC_INS_FUTURE '1'\n///期货、现货期权合约\n#define THOST_FTDC_INS_OPTION '2'\n///组合合约\n#define THOST_FTDC_INS_COMB '3'\n\ntypedef char TThostFtdcClassTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTradingTypeType是一个合约交易状态分类方式类型\n/////////////////////////////////////////////////////////////////////////\n///所有状态\n#define THOST_FTDC_TD_ALL '0'\n///交易\n#define THOST_FTDC_TD_TRADE '1'\n///非交易\n#define THOST_FTDC_TD_UNTRADE '2'\n\ntypedef char TThostFtdcTradingTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductStatusType是一个产品状态类型\n/////////////////////////////////////////////////////////////////////////\n///可交易\n#define THOST_FTDC_PS_tradeable '1'\n///不可交易\n#define THOST_FTDC_PS_untradeable '2'\n\ntypedef char TThostFtdcProductStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSyncDeltaStatusType是一个追平状态类型\n/////////////////////////////////////////////////////////////////////////\n///交易可读\n#define THOST_FTDC_SDS_Readable '1'\n///交易在读\n#define THOST_FTDC_SDS_Reading '2'\n///交易读取完成\n#define THOST_FTDC_SDS_Readend '3'\n///追平失败 交易本地状态结算不存在\n#define THOST_FTDC_SDS_OptErr 'e'\n\ntypedef char TThostFtdcSyncDeltaStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcActionDirectionType是一个操作标志类型\n/////////////////////////////////////////////////////////////////////////\n///增加\n#define THOST_FTDC_ACD_Add '1'\n///删除\n#define THOST_FTDC_ACD_Del '2'\n///更新\n#define THOST_FTDC_ACD_Upd '3'\n\ntypedef char TThostFtdcActionDirectionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderCancelAlgType是一个撤单时选择席位算法类型\n/////////////////////////////////////////////////////////////////////////\n///轮询席位撤单\n#define THOST_FTDC_OAC_Balance '1'\n///优先原报单席位撤单\n#define THOST_FTDC_OAC_OrigFirst '2'\n\ntypedef char TThostFtdcOrderCancelAlgType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSyncDescriptionType是一个追平描述类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSyncDescriptionType[257];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommonIntType是一个通用int类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCommonIntType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSysVersionType是一个系统版本类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSysVersionType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOpenLimitControlLevelType是一个开仓量限制粒度类型\n/////////////////////////////////////////////////////////////////////////\n///不控制\n#define THOST_FTDC_PLCL_None '0'\n///产品级别\n#define THOST_FTDC_PLCL_Product '1'\n///合约级别\n#define THOST_FTDC_PLCL_Inst '2'\n\ntypedef char TThostFtdcOpenLimitControlLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOrderFreqControlLevelType是一个报单频率控制粒度类型\n/////////////////////////////////////////////////////////////////////////\n///不控制\n#define THOST_FTDC_OFCL_None '0'\n///产品级别\n#define THOST_FTDC_OFCL_Product '1'\n///合约级别\n#define THOST_FTDC_OFCL_Inst '2'\n\ntypedef char TThostFtdcOrderFreqControlLevelType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcEnumBoolType是一个枚举bool类型类型\n/////////////////////////////////////////////////////////////////////////\n///false\n#define THOST_FTDC_EBL_False '0'\n///true\n#define THOST_FTDC_EBL_True '1'\n\ntypedef char TThostFtdcEnumBoolType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTimeRangeType是一个期货合约阶段标识类型\n/////////////////////////////////////////////////////////////////////////\n///一般月份\n#define THOST_FTDC_ETR_USUAL '1'\n///交割月前一个月上半月\n#define THOST_FTDC_ETR_FNSP '2'\n///交割月前一个月下半月\n#define THOST_FTDC_ETR_BNSP '3'\n///交割月份\n#define THOST_FTDC_ETR_SPOT '4'\n\ntypedef char TThostFtdcTimeRangeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcDeltaType是一个Delta类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcDeltaType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSpreadIdType是一个抵扣组优先级类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcSpreadIdType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPortfolioType是一个新型组保算法类型\n/////////////////////////////////////////////////////////////////////////\n///不使用新型组保算法\n#define THOST_FTDC_EPF_None '0'\n///SPBM算法\n#define THOST_FTDC_EPF_SPBM '1'\n///RULE算法\n#define THOST_FTDC_EPF_RULE '2'\n///SPMM算法\n#define THOST_FTDC_EPF_SPMM '3'\n///RCAMS算法\n#define THOST_FTDC_EPF_RCAMS '4'\n\ntypedef char TThostFtdcPortfolioType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPortfolioDefIDType是一个SPBM组合套餐ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcPortfolioDefIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWithDrawParamIDType是一个可提参数代码类型\n/////////////////////////////////////////////////////////////////////////\n///权利金收支是否可提 1 代表可提 0 不可提\n#define THOST_FTDC_WDPID_CashIn 'C'\n\ntypedef char TThostFtdcWithDrawParamIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcWithDrawParamValueType是一个可提控制参数内容类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcWithDrawParamValueType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInvstTradingRightType是一个投资者交易权限类型\n/////////////////////////////////////////////////////////////////////////\n///只能平仓\n#define THOST_FTDC_ITR_CloseOnly '1'\n///不能交易\n#define THOST_FTDC_ITR_Forbidden '2'\n\ntypedef char TThostFtdcInvstTradingRightType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcThostFunctionCodeType是一个Thost终端功能代码类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcThostFunctionCodeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSPMMDiscountRatioType是一个SPMM折扣率类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcSPMMDiscountRatioType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSPMMModelDescType是一个SPMM模板描述类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSPMMModelDescType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSPMMModelIDType是一个SPMM模板ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSPMMModelIDType[33];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSPMMProductIDType是一个SPMM商品群商品组ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSPMMProductIDType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstMarginCalIDType是一个SPMM合约保证金算法类型\n/////////////////////////////////////////////////////////////////////////\n///标准算法收取双边\n#define THOST_FTDC_IMID_BothSide '1'\n///单向大边\n#define THOST_FTDC_IMID_MMSA '2'\n///新组保SPMM\n#define THOST_FTDC_IMID_SPMM '3'\n\ntypedef char TThostFtdcInstMarginCalIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProductIDType是一个产品ID类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcProductIDType[41];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcHedgeRateType是一个HedgeRate类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcHedgeRateType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRCAMSPriorityType是一个优先级类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcRCAMSPriorityType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAdjustValueType是一个空头期权风险调整标准类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcAdjustValueType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRCAMSCombinationTypeType是一个RCAMS组合类型类型\n/////////////////////////////////////////////////////////////////////////\n///牛市看涨价差组合\n#define THOST_FTDC_ERComb_BUC '0'\n///熊市看涨价差组合\n#define THOST_FTDC_ERComb_BEC '1'\n///熊市看跌价差组合\n#define THOST_FTDC_ERComb_BEP '2'\n///牛市看跌价差组合\n#define THOST_FTDC_ERComb_BUP '3'\n///日历价差组合\n#define THOST_FTDC_ERComb_CAS '4'\n\ntypedef char TThostFtdcRCAMSCombinationTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcRuleIdType是一个策略id类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcRuleIdType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPortfTypeType是一个新组保算法启用类型类型\n/////////////////////////////////////////////////////////////////////////\n///使用初版交易所算法\n#define THOST_FTDC_EET_None '0'\n///SPBM算法V1.1.0_附加保证金调整\n#define THOST_FTDC_EET_SPBM_AddOnHedge '1'\n\ntypedef char TThostFtdcPortfTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcInstrumentClassType是一个合约类型类型\n/////////////////////////////////////////////////////////////////////////\n///一般月份合约\n#define THOST_FTDC_EIC_Usual '1'\n///临近交割合约\n#define THOST_FTDC_EIC_Delivery '2'\n///非组合合约\n#define THOST_FTDC_EIC_NonComb '3'\n\ntypedef char TThostFtdcInstrumentClassType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcCommodityGroupIDType是一个商品群号类型\n/////////////////////////////////////////////////////////////////////////\ntypedef int TThostFtdcCommodityGroupIDType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcStdPositionType是一个标准持仓类型类型\n/////////////////////////////////////////////////////////////////////////\ntypedef double TThostFtdcStdPositionType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcProdChangeFlagType是一个品种记录改变状态类型\n/////////////////////////////////////////////////////////////////////////\n///持仓量和冻结量均无变化\n#define THOST_FTDC_PCF_None '0'\n///持仓量无变化，冻结量有变化\n#define THOST_FTDC_PCF_OnlyFrozen '1'\n///持仓量有变化\n#define THOST_FTDC_PCF_PositionChange '2'\n\ntypedef char TThostFtdcProdChangeFlagType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcPwdRcdSrcType是一个历史密码来源类型\n/////////////////////////////////////////////////////////////////////////\n///来源于Sync初始化数据\n#define THOST_FTDC_PRS_Init '0'\n///来源于实时上场数据\n#define THOST_FTDC_PRS_Sync '1'\n///来源于用户修改\n#define THOST_FTDC_PRS_UserUpd '2'\n///来源于超户修改，很可能来自主席同步数据\n#define THOST_FTDC_PRS_SuperUserUpd '3'\n///来源于次席同步的修改\n#define THOST_FTDC_PRS_SecUpd '4'\n\ntypedef char TThostFtdcPwdRcdSrcType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAddrSrvModeType是一个地址服务类型类型\n/////////////////////////////////////////////////////////////////////////\n///交易地址\n#define THOST_FTDC_ASM_Trade '0'\n///行情地址\n#define THOST_FTDC_ASM_MarketData '1'\n///其他\n#define THOST_FTDC_ASM_Other '2'\n\ntypedef char TThostFtdcAddrSrvModeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAddrVerType是一个地址版本类型\n/////////////////////////////////////////////////////////////////////////\n///IPV4\n#define THOST_FTDC_ADV_V4 '0'\n///IPV6\n#define THOST_FTDC_ADV_V6 '1'\n\ntypedef char TThostFtdcAddrVerType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAddrRemarkType是一个地址备注类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAddrRemarkType[161];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcAddrNameType是一个地址名称类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcAddrNameType[65];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcIpAddrType是一个服务地址IP类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcIpAddrType[129];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcTGSessionQryStatusType是一个TGATE会话查询状态类型\n/////////////////////////////////////////////////////////////////////////\n///查询状态空闲\n#define THOST_FTDC_TGQS_QryIdle '1'\n///查询状态频繁\n#define THOST_FTDC_TGQS_QryBusy '2'\n\ntypedef char TThostFtdcTGSessionQryStatusType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcOffsetTypeType是一个对冲类型类型\n/////////////////////////////////////////////////////////////////////////\n///期权对冲\n#define THOST_FTDC_OT_OPT_OFFSET '0'\n///期货对冲\n#define THOST_FTDC_OT_FUT_OFFSET '1'\n///行权后期货对冲\n#define THOST_FTDC_OT_EXEC_OFFSET '2'\n///履约后期货对冲\n#define THOST_FTDC_OT_PERFORM_OFFSET '3'\n\ntypedef char TThostFtdcOffsetTypeType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcSiteType是一个站点类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcSiteType[51];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcNetOperatorType是一个网络运营商类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcNetOperatorType[9];\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcApplySrcType是一个申请来源类型\n/////////////////////////////////////////////////////////////////////////\n///交易\n#define THOST_FTDC_AS_Trade '0'\n///会服\n#define THOST_FTDC_AS_Member '1'\n\ntypedef char TThostFtdcApplySrcType;\n\n/////////////////////////////////////////////////////////////////////////\n///TFtdcReserveInfoType是一个预留信息类型\n/////////////////////////////////////////////////////////////////////////\ntypedef char TThostFtdcReserveInfoType[65];\n\n#endif\n"
  },
  {
    "path": "native/ctp_bridge/api/linux/ThostFtdcUserApiStruct.h",
    "content": "/////////////////////////////////////////////////////////////////////////\n///@system 新一代交易所系统\n///@company 上海期货信息技术有限公司\n///@file ThostFtdcUserApiStruct.h\n///@brief 定义了客户端接口使用的业务数据结构\n///@history \n///20060106\t赵鸿昊\t\t创建该文件\n/////////////////////////////////////////////////////////////////////////\n\n#if !defined(THOST_FTDCSTRUCT_H)\n#define THOST_FTDCSTRUCT_H\n\n#if _MSC_VER > 1000\n#pragma once\n#endif // _MSC_VER > 1000\n\n\n#include \"ThostFtdcUserApiDataType.h\"\n\n///信息分发\nstruct CThostFtdcDisseminationField\n{\n\t///序列系列号\n\tTThostFtdcSequenceSeriesType\tSequenceSeries;\n\t///序列号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n};\n\n///用户登录请求\nstruct CThostFtdcReqUserLoginField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///接口端产品信息\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\n\t///协议信息\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///动态密码\n\tTThostFtdcPasswordType\tOneTimePassword;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///登录备注\n\tTThostFtdcLoginRemarkType\tLoginRemark;\n\t///终端IP端口\n\tTThostFtdcIPPortType\tClientIPPort;\n\t///终端IP地址\n\tTThostFtdcIPAddressType\tClientIPAddress;\n};\n\n///用户登录应答\nstruct CThostFtdcRspUserLoginField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///登录成功时间\n\tTThostFtdcTimeType\tLoginTime;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易系统名称\n\tTThostFtdcSystemNameType\tSystemName;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///最大报单引用\n\tTThostFtdcOrderRefType\tMaxOrderRef;\n\t///上期所时间\n\tTThostFtdcTimeType\tSHFETime;\n\t///大商所时间\n\tTThostFtdcTimeType\tDCETime;\n\t///郑商所时间\n\tTThostFtdcTimeType\tCZCETime;\n\t///中金所时间\n\tTThostFtdcTimeType\tFFEXTime;\n\t///能源中心时间\n\tTThostFtdcTimeType\tINETime;\n\t///后台版本信息\n\tTThostFtdcSysVersionType\tSysVersion;\n\t///广期所时间\n\tTThostFtdcTimeType\tGFEXTime;\n\t///当前登录中心号\n\tTThostFtdcDRIdentityIDType\tLoginDRIdentityID;\n\t///用户所属中心号\n\tTThostFtdcDRIdentityIDType\tUserDRIdentityID;\n\t///上次登陆时间\n\tTThostFtdcDateTimeType\tLastLoginTime;\n\t///预留信息\n\tTThostFtdcReserveInfoType\tReserveInfo;\n};\n\n///用户登出请求\nstruct CThostFtdcUserLogoutField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///强制交易员退出\nstruct CThostFtdcForceUserLogoutField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///客户端认证请求\nstruct CThostFtdcReqAuthenticateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///认证码\n\tTThostFtdcAuthCodeType\tAuthCode;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n};\n\n///客户端认证响应\nstruct CThostFtdcRspAuthenticateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n\t///App类型\n\tTThostFtdcAppTypeType\tAppType;\n};\n\n///客户端认证信息\nstruct CThostFtdcAuthenticationInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///认证信息\n\tTThostFtdcAuthInfoType\tAuthInfo;\n\t///是否为认证结果\n\tTThostFtdcBoolType\tIsResult;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n\t///App类型\n\tTThostFtdcAppTypeType\tAppType;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///终端IP地址\n\tTThostFtdcIPAddressType\tClientIPAddress;\n};\n\n///用户登录应答2\nstruct CThostFtdcRspUserLogin2Field\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///登录成功时间\n\tTThostFtdcTimeType\tLoginTime;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易系统名称\n\tTThostFtdcSystemNameType\tSystemName;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///最大报单引用\n\tTThostFtdcOrderRefType\tMaxOrderRef;\n\t///上期所时间\n\tTThostFtdcTimeType\tSHFETime;\n\t///大商所时间\n\tTThostFtdcTimeType\tDCETime;\n\t///郑商所时间\n\tTThostFtdcTimeType\tCZCETime;\n\t///中金所时间\n\tTThostFtdcTimeType\tFFEXTime;\n\t///能源中心时间\n\tTThostFtdcTimeType\tINETime;\n\t///随机串\n\tTThostFtdcRandomStringType\tRandomString;\n};\n\n///银期转帐报文头\nstruct CThostFtdcTransferHeaderField\n{\n\t///版本号，常量，1.0\n\tTThostFtdcVersionType\tVersion;\n\t///交易代码，必填\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///交易日期，必填，格式：yyyymmdd\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间，必填，格式：hhmmss\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///发起方流水号，N/A\n\tTThostFtdcTradeSerialType\tTradeSerial;\n\t///期货公司代码，必填\n\tTThostFtdcFutureIDType\tFutureID;\n\t///银行代码，根据查询银行得到，必填\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分中心代码，根据查询银行得到，必填\n\tTThostFtdcBankBrchIDType\tBankBrchID;\n\t///操作员，N/A\n\tTThostFtdcOperNoType\tOperNo;\n\t///交易设备类型，N/A\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///记录数，N/A\n\tTThostFtdcRecordNumType\tRecordNum;\n\t///会话编号，N/A\n\tTThostFtdcSessionIDType\tSessionID;\n\t///请求编号，N/A\n\tTThostFtdcRequestIDType\tRequestID;\n};\n\n///银行资金转期货请求，TradeCode=202001\nstruct CThostFtdcTransferBankToFutureReqField\n{\n\t///期货资金账户\n\tTThostFtdcAccountIDType\tFutureAccount;\n\t///密码标志\n\tTThostFtdcFuturePwdFlagType\tFuturePwdFlag;\n\t///密码\n\tTThostFtdcFutureAccPwdType\tFutureAccPwd;\n\t///转账金额\n\tTThostFtdcMoneyType\tTradeAmt;\n\t///客户手续费\n\tTThostFtdcMoneyType\tCustFee;\n\t///币种：RMB-人民币 USD-美圆 HKD-港元\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\n};\n\n///银行资金转期货请求响应\nstruct CThostFtdcTransferBankToFutureRspField\n{\n\t///响应代码\n\tTThostFtdcRetCodeType\tRetCode;\n\t///响应信息\n\tTThostFtdcRetInfoType\tRetInfo;\n\t///资金账户\n\tTThostFtdcAccountIDType\tFutureAccount;\n\t///转帐金额\n\tTThostFtdcMoneyType\tTradeAmt;\n\t///应收客户手续费\n\tTThostFtdcMoneyType\tCustFee;\n\t///币种\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\n};\n\n///期货资金转银行请求，TradeCode=202002\nstruct CThostFtdcTransferFutureToBankReqField\n{\n\t///期货资金账户\n\tTThostFtdcAccountIDType\tFutureAccount;\n\t///密码标志\n\tTThostFtdcFuturePwdFlagType\tFuturePwdFlag;\n\t///密码\n\tTThostFtdcFutureAccPwdType\tFutureAccPwd;\n\t///转账金额\n\tTThostFtdcMoneyType\tTradeAmt;\n\t///客户手续费\n\tTThostFtdcMoneyType\tCustFee;\n\t///币种：RMB-人民币 USD-美圆 HKD-港元\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\n};\n\n///期货资金转银行请求响应\nstruct CThostFtdcTransferFutureToBankRspField\n{\n\t///响应代码\n\tTThostFtdcRetCodeType\tRetCode;\n\t///响应信息\n\tTThostFtdcRetInfoType\tRetInfo;\n\t///资金账户\n\tTThostFtdcAccountIDType\tFutureAccount;\n\t///转帐金额\n\tTThostFtdcMoneyType\tTradeAmt;\n\t///应收客户手续费\n\tTThostFtdcMoneyType\tCustFee;\n\t///币种\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\n};\n\n///查询银行资金请求，TradeCode=204002\nstruct CThostFtdcTransferQryBankReqField\n{\n\t///期货资金账户\n\tTThostFtdcAccountIDType\tFutureAccount;\n\t///密码标志\n\tTThostFtdcFuturePwdFlagType\tFuturePwdFlag;\n\t///密码\n\tTThostFtdcFutureAccPwdType\tFutureAccPwd;\n\t///币种：RMB-人民币 USD-美圆 HKD-港元\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\n};\n\n///查询银行资金请求响应\nstruct CThostFtdcTransferQryBankRspField\n{\n\t///响应代码\n\tTThostFtdcRetCodeType\tRetCode;\n\t///响应信息\n\tTThostFtdcRetInfoType\tRetInfo;\n\t///资金账户\n\tTThostFtdcAccountIDType\tFutureAccount;\n\t///银行余额\n\tTThostFtdcMoneyType\tTradeAmt;\n\t///银行可用余额\n\tTThostFtdcMoneyType\tUseAmt;\n\t///银行可取余额\n\tTThostFtdcMoneyType\tFetchAmt;\n\t///币种\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\n};\n\n///查询银行交易明细请求，TradeCode=204999\nstruct CThostFtdcTransferQryDetailReqField\n{\n\t///期货资金账户\n\tTThostFtdcAccountIDType\tFutureAccount;\n};\n\n///查询银行交易明细请求响应\nstruct CThostFtdcTransferQryDetailRspField\n{\n\t///交易日期\n\tTThostFtdcDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///交易代码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///期货流水号\n\tTThostFtdcTradeSerialNoType\tFutureSerial;\n\t///期货公司代码\n\tTThostFtdcFutureIDType\tFutureID;\n\t///资金帐号\n\tTThostFtdcFutureAccountType\tFutureAccount;\n\t///银行流水号\n\tTThostFtdcTradeSerialNoType\tBankSerial;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分中心代码\n\tTThostFtdcBankBrchIDType\tBankBrchID;\n\t///银行账号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///证件号码\n\tTThostFtdcCertCodeType\tCertCode;\n\t///货币代码\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\n\t///发生金额\n\tTThostFtdcMoneyType\tTxAmount;\n\t///有效标志\n\tTThostFtdcTransferValidFlagType\tFlag;\n};\n\n///响应信息\nstruct CThostFtdcRspInfoField\n{\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///交易所\nstruct CThostFtdcExchangeField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所名称\n\tTThostFtdcExchangeNameType\tExchangeName;\n\t///交易所属性\n\tTThostFtdcExchangePropertyType\tExchangeProperty;\n};\n\n///产品\nstruct CThostFtdcProductField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///产品名称\n\tTThostFtdcProductNameType\tProductName;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品类型\n\tTThostFtdcProductClassType\tProductClass;\n\t///合约数量乘数\n\tTThostFtdcVolumeMultipleType\tVolumeMultiple;\n\t///最小变动价位\n\tTThostFtdcPriceType\tPriceTick;\n\t///市价单最大下单量\n\tTThostFtdcVolumeType\tMaxMarketOrderVolume;\n\t///市价单最小下单量\n\tTThostFtdcVolumeType\tMinMarketOrderVolume;\n\t///限价单最大下单量\n\tTThostFtdcVolumeType\tMaxLimitOrderVolume;\n\t///限价单最小下单量\n\tTThostFtdcVolumeType\tMinLimitOrderVolume;\n\t///持仓类型\n\tTThostFtdcPositionTypeType\tPositionType;\n\t///持仓日期类型\n\tTThostFtdcPositionDateTypeType\tPositionDateType;\n\t///平仓处理类型\n\tTThostFtdcCloseDealTypeType\tCloseDealType;\n\t///交易币种类型\n\tTThostFtdcCurrencyIDType\tTradeCurrencyID;\n\t///质押资金可用范围\n\tTThostFtdcMortgageFundUseRangeType\tMortgageFundUseRange;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve2;\n\t///合约基础商品乘数\n\tTThostFtdcUnderlyingMultipleType\tUnderlyingMultiple;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///交易所产品代码\n\tTThostFtdcInstrumentIDType\tExchangeProductID;\n\t///开仓量限制粒度\n\tTThostFtdcOpenLimitControlLevelType\tOpenLimitControlLevel;\n\t///报单频率控制粒度\n\tTThostFtdcOrderFreqControlLevelType\tOrderFreqControlLevel;\n};\n\n///合约\nstruct CThostFtdcInstrumentField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约名称\n\tTThostFtdcInstrumentNameType\tInstrumentName;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve3;\n\t///产品类型\n\tTThostFtdcProductClassType\tProductClass;\n\t///交割年份\n\tTThostFtdcYearType\tDeliveryYear;\n\t///交割月\n\tTThostFtdcMonthType\tDeliveryMonth;\n\t///市价单最大下单量\n\tTThostFtdcVolumeType\tMaxMarketOrderVolume;\n\t///市价单最小下单量\n\tTThostFtdcVolumeType\tMinMarketOrderVolume;\n\t///限价单最大下单量\n\tTThostFtdcVolumeType\tMaxLimitOrderVolume;\n\t///限价单最小下单量\n\tTThostFtdcVolumeType\tMinLimitOrderVolume;\n\t///合约数量乘数\n\tTThostFtdcVolumeMultipleType\tVolumeMultiple;\n\t///最小变动价位\n\tTThostFtdcPriceType\tPriceTick;\n\t///创建日\n\tTThostFtdcDateType\tCreateDate;\n\t///上市日\n\tTThostFtdcDateType\tOpenDate;\n\t///到期日\n\tTThostFtdcDateType\tExpireDate;\n\t///开始交割日\n\tTThostFtdcDateType\tStartDelivDate;\n\t///结束交割日\n\tTThostFtdcDateType\tEndDelivDate;\n\t///合约生命周期状态\n\tTThostFtdcInstLifePhaseType\tInstLifePhase;\n\t///当前是否交易\n\tTThostFtdcBoolType\tIsTrading;\n\t///持仓类型\n\tTThostFtdcPositionTypeType\tPositionType;\n\t///持仓日期类型\n\tTThostFtdcPositionDateTypeType\tPositionDateType;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatio;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatio;\n\t///是否使用大额单边保证金算法\n\tTThostFtdcMaxMarginSideAlgorithmType\tMaxMarginSideAlgorithm;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve4;\n\t///执行价\n\tTThostFtdcPriceType\tStrikePrice;\n\t///期权类型\n\tTThostFtdcOptionsTypeType\tOptionsType;\n\t///合约基础商品乘数\n\tTThostFtdcUnderlyingMultipleType\tUnderlyingMultiple;\n\t///组合类型\n\tTThostFtdcCombinationTypeType\tCombinationType;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///基础商品代码\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\n};\n\n///经纪公司\nstruct CThostFtdcBrokerField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///经纪公司简称\n\tTThostFtdcBrokerAbbrType\tBrokerAbbr;\n\t///经纪公司名称\n\tTThostFtdcBrokerNameType\tBrokerName;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n};\n\n///交易所交易员\nstruct CThostFtdcTraderField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装数量\n\tTThostFtdcInstallCountType\tInstallCount;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///撤单时选择席位算法\n\tTThostFtdcOrderCancelAlgType\tOrderCancelAlg;\n\t///交易报盘安装数量\n\tTThostFtdcInstallCountType\tTradeInstallCount;\n\t///行情报盘安装数量\n\tTThostFtdcInstallCountType\tMDInstallCount;\n};\n\n///投资者\nstruct CThostFtdcInvestorField\n{\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者分组代码\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\n\t///投资者名称\n\tTThostFtdcPartyNameType\tInvestorName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdentifiedCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n\t///联系电话\n\tTThostFtdcTelephoneType\tTelephone;\n\t///通讯地址\n\tTThostFtdcAddressType\tAddress;\n\t///开户日期\n\tTThostFtdcDateType\tOpenDate;\n\t///手机\n\tTThostFtdcMobileType\tMobile;\n\t///手续费率模板代码\n\tTThostFtdcInvestorIDType\tCommModelID;\n\t///保证金率模板代码\n\tTThostFtdcInvestorIDType\tMarginModelID;\n\t///是否频率控制\n\tTThostFtdcEnumBoolType\tIsOrderFreq;\n\t///是否开仓限制\n\tTThostFtdcEnumBoolType\tIsOpenVolLimit;\n};\n\n///交易编码\nstruct CThostFtdcTradingCodeField\n{\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n\t///交易编码类型\n\tTThostFtdcClientIDTypeType\tClientIDType;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///业务类型\n\tTThostFtdcBizTypeType\tBizType;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///会员编码和经纪公司编码对照表\nstruct CThostFtdcPartBrokerField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n};\n\n///管理用户\nstruct CThostFtdcSuperUserField\n{\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户名称\n\tTThostFtdcUserNameType\tUserName;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n};\n\n///管理用户功能权限\nstruct CThostFtdcSuperUserFunctionField\n{\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///功能代码\n\tTThostFtdcFunctionCodeType\tFunctionCode;\n};\n\n///投资者组\nstruct CThostFtdcInvestorGroupField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者分组代码\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\n\t///投资者分组名称\n\tTThostFtdcInvestorGroupNameType\tInvestorGroupName;\n};\n\n///资金账户\nstruct CThostFtdcTradingAccountField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///上次质押金额\n\tTThostFtdcMoneyType\tPreMortgage;\n\t///上次信用额度\n\tTThostFtdcMoneyType\tPreCredit;\n\t///上次存款额\n\tTThostFtdcMoneyType\tPreDeposit;\n\t///上次结算准备金\n\tTThostFtdcMoneyType\tPreBalance;\n\t///上次占用的保证金\n\tTThostFtdcMoneyType\tPreMargin;\n\t///利息基数\n\tTThostFtdcMoneyType\tInterestBase;\n\t///利息收入\n\tTThostFtdcMoneyType\tInterest;\n\t///入金金额\n\tTThostFtdcMoneyType\tDeposit;\n\t///出金金额\n\tTThostFtdcMoneyType\tWithdraw;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///当前保证金总额\n\tTThostFtdcMoneyType\tCurrMargin;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfit;\n\t///期货结算准备金\n\tTThostFtdcMoneyType\tBalance;\n\t///可用资金\n\tTThostFtdcMoneyType\tAvailable;\n\t///可取资金\n\tTThostFtdcMoneyType\tWithdrawQuota;\n\t///基本准备金\n\tTThostFtdcMoneyType\tReserve;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///信用额度\n\tTThostFtdcMoneyType\tCredit;\n\t///质押金额\n\tTThostFtdcMoneyType\tMortgage;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchangeMargin;\n\t///投资者交割保证金\n\tTThostFtdcMoneyType\tDeliveryMargin;\n\t///交易所交割保证金\n\tTThostFtdcMoneyType\tExchangeDeliveryMargin;\n\t///保底期货结算准备金\n\tTThostFtdcMoneyType\tReserveBalance;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///上次货币质入金额\n\tTThostFtdcMoneyType\tPreFundMortgageIn;\n\t///上次货币质出金额\n\tTThostFtdcMoneyType\tPreFundMortgageOut;\n\t///货币质入金额\n\tTThostFtdcMoneyType\tFundMortgageIn;\n\t///货币质出金额\n\tTThostFtdcMoneyType\tFundMortgageOut;\n\t///货币质押余额\n\tTThostFtdcMoneyType\tFundMortgageAvailable;\n\t///可质押货币金额\n\tTThostFtdcMoneyType\tMortgageableFund;\n\t///特殊产品占用保证金\n\tTThostFtdcMoneyType\tSpecProductMargin;\n\t///特殊产品冻结保证金\n\tTThostFtdcMoneyType\tSpecProductFrozenMargin;\n\t///特殊产品手续费\n\tTThostFtdcMoneyType\tSpecProductCommission;\n\t///特殊产品冻结手续费\n\tTThostFtdcMoneyType\tSpecProductFrozenCommission;\n\t///特殊产品持仓盈亏\n\tTThostFtdcMoneyType\tSpecProductPositionProfit;\n\t///特殊产品平仓盈亏\n\tTThostFtdcMoneyType\tSpecProductCloseProfit;\n\t///根据持仓盈亏算法计算的特殊产品持仓盈亏\n\tTThostFtdcMoneyType\tSpecProductPositionProfitByAlg;\n\t///特殊产品交易所保证金\n\tTThostFtdcMoneyType\tSpecProductExchangeMargin;\n\t///业务类型\n\tTThostFtdcBizTypeType\tBizType;\n\t///延时换汇冻结金额\n\tTThostFtdcMoneyType\tFrozenSwap;\n\t///剩余换汇额度\n\tTThostFtdcMoneyType\tRemainSwap;\n\t///期权市值\n\tTThostFtdcMoneyType\tOptionValue;\n};\n\n///投资者持仓\nstruct CThostFtdcInvestorPositionField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///持仓多空方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///持仓日期\n\tTThostFtdcPositionDateType\tPositionDate;\n\t///上日持仓\n\tTThostFtdcVolumeType\tYdPosition;\n\t///今日持仓\n\tTThostFtdcVolumeType\tPosition;\n\t///多头冻结\n\tTThostFtdcVolumeType\tLongFrozen;\n\t///空头冻结\n\tTThostFtdcVolumeType\tShortFrozen;\n\t///开仓冻结金额\n\tTThostFtdcMoneyType\tLongFrozenAmount;\n\t///开仓冻结金额\n\tTThostFtdcMoneyType\tShortFrozenAmount;\n\t///开仓量\n\tTThostFtdcVolumeType\tOpenVolume;\n\t///平仓量\n\tTThostFtdcVolumeType\tCloseVolume;\n\t///开仓金额\n\tTThostFtdcMoneyType\tOpenAmount;\n\t///平仓金额\n\tTThostFtdcMoneyType\tCloseAmount;\n\t///持仓成本\n\tTThostFtdcMoneyType\tPositionCost;\n\t///上次占用的保证金\n\tTThostFtdcMoneyType\tPreMargin;\n\t///占用的保证金\n\tTThostFtdcMoneyType\tUseMargin;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfit;\n\t///上次结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///本次结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///开仓成本\n\tTThostFtdcMoneyType\tOpenCost;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchangeMargin;\n\t///组合成交形成的持仓\n\tTThostFtdcVolumeType\tCombPosition;\n\t///组合多头冻结\n\tTThostFtdcVolumeType\tCombLongFrozen;\n\t///组合空头冻结\n\tTThostFtdcVolumeType\tCombShortFrozen;\n\t///逐日盯市平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByDate;\n\t///逐笔对冲平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\n\t///今日持仓\n\tTThostFtdcVolumeType\tTodayPosition;\n\t///保证金率\n\tTThostFtdcRatioType\tMarginRateByMoney;\n\t///保证金率(按手数)\n\tTThostFtdcRatioType\tMarginRateByVolume;\n\t///执行冻结\n\tTThostFtdcVolumeType\tStrikeFrozen;\n\t///执行冻结金额\n\tTThostFtdcMoneyType\tStrikeFrozenAmount;\n\t///放弃执行冻结\n\tTThostFtdcVolumeType\tAbandonFrozen;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行冻结的昨仓\n\tTThostFtdcVolumeType\tYdStrikeFrozen;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///持仓成本差值\n\tTThostFtdcMoneyType\tPositionCostOffset;\n\t///tas持仓手数\n\tTThostFtdcVolumeType\tTasPosition;\n\t///tas持仓成本\n\tTThostFtdcMoneyType\tTasPositionCost;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///期权市值\n\tTThostFtdcMoneyType\tOptionValue;\n};\n\n///合约保证金率\nstruct CThostFtdcInstrumentMarginRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///是否相对交易所收取\n\tTThostFtdcBoolType\tIsRelative;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///合约手续费率\nstruct CThostFtdcInstrumentCommissionRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///开仓手续费率\n\tTThostFtdcRatioType\tOpenRatioByMoney;\n\t///开仓手续费\n\tTThostFtdcRatioType\tOpenRatioByVolume;\n\t///平仓手续费率\n\tTThostFtdcRatioType\tCloseRatioByMoney;\n\t///平仓手续费\n\tTThostFtdcRatioType\tCloseRatioByVolume;\n\t///平今手续费率\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\n\t///平今手续费\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///业务类型\n\tTThostFtdcBizTypeType\tBizType;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///深度行情\nstruct CThostFtdcDepthMarketDataField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///最新价\n\tTThostFtdcPriceType\tLastPrice;\n\t///上次结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///昨收盘\n\tTThostFtdcPriceType\tPreClosePrice;\n\t///昨持仓量\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\n\t///今开盘\n\tTThostFtdcPriceType\tOpenPrice;\n\t///最高价\n\tTThostFtdcPriceType\tHighestPrice;\n\t///最低价\n\tTThostFtdcPriceType\tLowestPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///成交金额\n\tTThostFtdcMoneyType\tTurnover;\n\t///持仓量\n\tTThostFtdcLargeVolumeType\tOpenInterest;\n\t///今收盘\n\tTThostFtdcPriceType\tClosePrice;\n\t///本次结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///涨停板价\n\tTThostFtdcPriceType\tUpperLimitPrice;\n\t///跌停板价\n\tTThostFtdcPriceType\tLowerLimitPrice;\n\t///昨虚实度\n\tTThostFtdcRatioType\tPreDelta;\n\t///今虚实度\n\tTThostFtdcRatioType\tCurrDelta;\n\t///最后修改时间\n\tTThostFtdcTimeType\tUpdateTime;\n\t///最后修改毫秒\n\tTThostFtdcMillisecType\tUpdateMillisec;\n\t///申买价一\n\tTThostFtdcPriceType\tBidPrice1;\n\t///申买量一\n\tTThostFtdcVolumeType\tBidVolume1;\n\t///申卖价一\n\tTThostFtdcPriceType\tAskPrice1;\n\t///申卖量一\n\tTThostFtdcVolumeType\tAskVolume1;\n\t///申买价二\n\tTThostFtdcPriceType\tBidPrice2;\n\t///申买量二\n\tTThostFtdcVolumeType\tBidVolume2;\n\t///申卖价二\n\tTThostFtdcPriceType\tAskPrice2;\n\t///申卖量二\n\tTThostFtdcVolumeType\tAskVolume2;\n\t///申买价三\n\tTThostFtdcPriceType\tBidPrice3;\n\t///申买量三\n\tTThostFtdcVolumeType\tBidVolume3;\n\t///申卖价三\n\tTThostFtdcPriceType\tAskPrice3;\n\t///申卖量三\n\tTThostFtdcVolumeType\tAskVolume3;\n\t///申买价四\n\tTThostFtdcPriceType\tBidPrice4;\n\t///申买量四\n\tTThostFtdcVolumeType\tBidVolume4;\n\t///申卖价四\n\tTThostFtdcPriceType\tAskPrice4;\n\t///申卖量四\n\tTThostFtdcVolumeType\tAskVolume4;\n\t///申买价五\n\tTThostFtdcPriceType\tBidPrice5;\n\t///申买量五\n\tTThostFtdcVolumeType\tBidVolume5;\n\t///申卖价五\n\tTThostFtdcPriceType\tAskPrice5;\n\t///申卖量五\n\tTThostFtdcVolumeType\tAskVolume5;\n\t///当日均价\n\tTThostFtdcPriceType\tAveragePrice;\n\t///业务日期\n\tTThostFtdcDateType\tActionDay;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///上带价\n\tTThostFtdcPriceType\tBandingUpperPrice;\n\t///下带价\n\tTThostFtdcPriceType\tBandingLowerPrice;\n};\n\n///投资者合约交易权限\nstruct CThostFtdcInstrumentTradingRightField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易权限\n\tTThostFtdcTradingRightType\tTradingRight;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///经纪公司用户\nstruct CThostFtdcBrokerUserField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户名称\n\tTThostFtdcUserNameType\tUserName;\n\t///用户类型\n\tTThostFtdcUserTypeType\tUserType;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n\t///是否使用令牌\n\tTThostFtdcBoolType\tIsUsingOTP;\n\t///是否强制终端认证\n\tTThostFtdcBoolType\tIsAuthForce;\n};\n\n///经纪公司用户口令\nstruct CThostFtdcBrokerUserPasswordField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///上次修改时间\n\tTThostFtdcDateTimeType\tLastUpdateTime;\n\t///上次登陆时间\n\tTThostFtdcDateTimeType\tLastLoginTime;\n\t///密码过期时间\n\tTThostFtdcDateType\tExpireDate;\n\t///弱密码过期时间\n\tTThostFtdcDateType\tWeakExpireDate;\n};\n\n///经纪公司用户功能权限\nstruct CThostFtdcBrokerUserFunctionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///经纪公司功能代码\n\tTThostFtdcBrokerFunctionCodeType\tBrokerFunctionCode;\n};\n\n///交易所交易员报盘机\nstruct CThostFtdcTraderOfferField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///交易所交易员连接状态\n\tTThostFtdcTraderConnectStatusType\tTraderConnectStatus;\n\t///发出连接请求的日期\n\tTThostFtdcDateType\tConnectRequestDate;\n\t///发出连接请求的时间\n\tTThostFtdcTimeType\tConnectRequestTime;\n\t///上次报告日期\n\tTThostFtdcDateType\tLastReportDate;\n\t///上次报告时间\n\tTThostFtdcTimeType\tLastReportTime;\n\t///完成连接日期\n\tTThostFtdcDateType\tConnectDate;\n\t///完成连接时间\n\tTThostFtdcTimeType\tConnectTime;\n\t///启动日期\n\tTThostFtdcDateType\tStartDate;\n\t///启动时间\n\tTThostFtdcTimeType\tStartTime;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///本席位最大成交编号\n\tTThostFtdcTradeIDType\tMaxTradeID;\n\t///本席位最大报单备拷\n\tTThostFtdcReturnCodeType\tMaxOrderMessageReference;\n\t///撤单时选择席位算法\n\tTThostFtdcOrderCancelAlgType\tOrderCancelAlg;\n};\n\n///投资者结算结果\nstruct CThostFtdcSettlementInfoField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///消息正文\n\tTThostFtdcContentType\tContent;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///合约保证金率调整\nstruct CThostFtdcInstrumentMarginRateAdjustField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///是否相对交易所收取\n\tTThostFtdcBoolType\tIsRelative;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易所保证金率\nstruct CThostFtdcExchangeMarginRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易所保证金率调整\nstruct CThostFtdcExchangeMarginRateAdjustField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///跟随交易所投资者多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///跟随交易所投资者多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///跟随交易所投资者空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///跟随交易所投资者空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///交易所多头保证金率\n\tTThostFtdcRatioType\tExchLongMarginRatioByMoney;\n\t///交易所多头保证金费\n\tTThostFtdcMoneyType\tExchLongMarginRatioByVolume;\n\t///交易所空头保证金率\n\tTThostFtdcRatioType\tExchShortMarginRatioByMoney;\n\t///交易所空头保证金费\n\tTThostFtdcMoneyType\tExchShortMarginRatioByVolume;\n\t///不跟随交易所投资者多头保证金率\n\tTThostFtdcRatioType\tNoLongMarginRatioByMoney;\n\t///不跟随交易所投资者多头保证金费\n\tTThostFtdcMoneyType\tNoLongMarginRatioByVolume;\n\t///不跟随交易所投资者空头保证金率\n\tTThostFtdcRatioType\tNoShortMarginRatioByMoney;\n\t///不跟随交易所投资者空头保证金费\n\tTThostFtdcMoneyType\tNoShortMarginRatioByVolume;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///汇率\nstruct CThostFtdcExchangeRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///源币种\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\n\t///源币种单位数量\n\tTThostFtdcCurrencyUnitType\tFromCurrencyUnit;\n\t///目标币种\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\n\t///汇率\n\tTThostFtdcExchangeRateType\tExchangeRate;\n};\n\n///结算引用\nstruct CThostFtdcSettlementRefField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n};\n\n///当前时间\nstruct CThostFtdcCurrentTimeField\n{\n\t///当前交易日\n\tTThostFtdcDateType\tCurrDate;\n\t///当前时间\n\tTThostFtdcTimeType\tCurrTime;\n\t///当前时间（毫秒）\n\tTThostFtdcMillisecType\tCurrMillisec;\n\t///自然日期\n\tTThostFtdcDateType\tActionDay;\n};\n\n///通讯阶段\nstruct CThostFtdcCommPhaseField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///通讯时段编号\n\tTThostFtdcCommPhaseNoType\tCommPhaseNo;\n\t///系统编号\n\tTThostFtdcSystemIDType\tSystemID;\n};\n\n///登录信息\nstruct CThostFtdcLoginInfoField\n{\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///登录日期\n\tTThostFtdcDateType\tLoginDate;\n\t///登录时间\n\tTThostFtdcTimeType\tLoginTime;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///接口端产品信息\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\n\t///协议信息\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\n\t///系统名称\n\tTThostFtdcSystemNameType\tSystemName;\n\t///密码,已弃用\n\tTThostFtdcPasswordType\tPasswordDeprecated;\n\t///最大报单引用\n\tTThostFtdcOrderRefType\tMaxOrderRef;\n\t///上期所时间\n\tTThostFtdcTimeType\tSHFETime;\n\t///大商所时间\n\tTThostFtdcTimeType\tDCETime;\n\t///郑商所时间\n\tTThostFtdcTimeType\tCZCETime;\n\t///中金所时间\n\tTThostFtdcTimeType\tFFEXTime;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///动态密码\n\tTThostFtdcPasswordType\tOneTimePassword;\n\t///能源中心时间\n\tTThostFtdcTimeType\tINETime;\n\t///查询时是否需要流控\n\tTThostFtdcBoolType\tIsQryControl;\n\t///登录备注\n\tTThostFtdcLoginRemarkType\tLoginRemark;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///登录信息\nstruct CThostFtdcLogoutAllField\n{\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///系统名称\n\tTThostFtdcSystemNameType\tSystemName;\n};\n\n///前置状态\nstruct CThostFtdcFrontStatusField\n{\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///上次报告日期\n\tTThostFtdcDateType\tLastReportDate;\n\t///上次报告时间\n\tTThostFtdcTimeType\tLastReportTime;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n};\n\n///用户口令变更\nstruct CThostFtdcUserPasswordUpdateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///原来的口令\n\tTThostFtdcPasswordType\tOldPassword;\n\t///新的口令\n\tTThostFtdcPasswordType\tNewPassword;\n};\n\n///输入报单\nstruct CThostFtdcInputOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///报单价格条件\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///组合开平标志\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\n\t///组合投机套保标志\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///GTD日期\n\tTThostFtdcDateType\tGTDDate;\n\t///成交量类型\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\n\t///最小成交量\n\tTThostFtdcVolumeType\tMinVolume;\n\t///触发条件\n\tTThostFtdcContingentConditionType\tContingentCondition;\n\t///止损价\n\tTThostFtdcPriceType\tStopPrice;\n\t///强平原因\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\n\t///自动挂起标志\n\tTThostFtdcBoolType\tIsAutoSuspend;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///用户强平标志\n\tTThostFtdcBoolType\tUserForceClose;\n\t///互换单标志\n\tTThostFtdcBoolType\tIsSwapOrder;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///报单\nstruct CThostFtdcOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///报单价格条件\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///组合开平标志\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\n\t///组合投机套保标志\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///GTD日期\n\tTThostFtdcDateType\tGTDDate;\n\t///成交量类型\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\n\t///最小成交量\n\tTThostFtdcVolumeType\tMinVolume;\n\t///触发条件\n\tTThostFtdcContingentConditionType\tContingentCondition;\n\t///止损价\n\tTThostFtdcPriceType\tStopPrice;\n\t///强平原因\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\n\t///自动挂起标志\n\tTThostFtdcBoolType\tIsAutoSuspend;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///报单提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///报单来源\n\tTThostFtdcOrderSourceType\tOrderSource;\n\t///报单状态\n\tTThostFtdcOrderStatusType\tOrderStatus;\n\t///报单类型\n\tTThostFtdcOrderTypeType\tOrderType;\n\t///今成交数量\n\tTThostFtdcVolumeType\tVolumeTraded;\n\t///剩余数量\n\tTThostFtdcVolumeType\tVolumeTotal;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///委托时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///激活时间\n\tTThostFtdcTimeType\tActiveTime;\n\t///挂起时间\n\tTThostFtdcTimeType\tSuspendTime;\n\t///最后修改时间\n\tTThostFtdcTimeType\tUpdateTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///最后修改交易所交易员代码\n\tTThostFtdcTraderIDType\tActiveTraderID;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///用户强平标志\n\tTThostFtdcBoolType\tUserForceClose;\n\t///操作用户代码\n\tTThostFtdcUserIDType\tActiveUserID;\n\t///经纪公司报单编号\n\tTThostFtdcSequenceNoType\tBrokerOrderSeq;\n\t///相关报单\n\tTThostFtdcOrderSysIDType\tRelativeOrderSysID;\n\t///郑商所成交数量\n\tTThostFtdcVolumeType\tZCETotalTradedVolume;\n\t///互换单标志\n\tTThostFtdcBoolType\tIsSwapOrder;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve3;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///交易所报单\nstruct CThostFtdcExchangeOrderField\n{\n\t///报单价格条件\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///组合开平标志\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\n\t///组合投机套保标志\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///GTD日期\n\tTThostFtdcDateType\tGTDDate;\n\t///成交量类型\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\n\t///最小成交量\n\tTThostFtdcVolumeType\tMinVolume;\n\t///触发条件\n\tTThostFtdcContingentConditionType\tContingentCondition;\n\t///止损价\n\tTThostFtdcPriceType\tStopPrice;\n\t///强平原因\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\n\t///自动挂起标志\n\tTThostFtdcBoolType\tIsAutoSuspend;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///报单提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///报单来源\n\tTThostFtdcOrderSourceType\tOrderSource;\n\t///报单状态\n\tTThostFtdcOrderStatusType\tOrderStatus;\n\t///报单类型\n\tTThostFtdcOrderTypeType\tOrderType;\n\t///今成交数量\n\tTThostFtdcVolumeType\tVolumeTraded;\n\t///剩余数量\n\tTThostFtdcVolumeType\tVolumeTotal;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///委托时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///激活时间\n\tTThostFtdcTimeType\tActiveTime;\n\t///挂起时间\n\tTThostFtdcTimeType\tSuspendTime;\n\t///最后修改时间\n\tTThostFtdcTimeType\tUpdateTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///最后修改交易所交易员代码\n\tTThostFtdcTraderIDType\tActiveTraderID;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///交易所报单插入失败\nstruct CThostFtdcExchangeOrderInsertErrorField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///输入报单操作\nstruct CThostFtdcInputOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报单操作引用\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量变化\n\tTThostFtdcVolumeType\tVolumeChange;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///报单操作\nstruct CThostFtdcOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报单操作引用\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量变化\n\tTThostFtdcVolumeType\tVolumeChange;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///交易所报单操作\nstruct CThostFtdcExchangeOrderActionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量变化\n\tTThostFtdcVolumeType\tVolumeChange;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///交易所报单操作失败\nstruct CThostFtdcExchangeOrderActionErrorField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///交易所成交\nstruct CThostFtdcExchangeTradeField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///成交编号\n\tTThostFtdcTradeIDType\tTradeID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///交易角色\n\tTThostFtdcTradingRoleType\tTradingRole;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///成交时期\n\tTThostFtdcDateType\tTradeDate;\n\t///成交时间\n\tTThostFtdcTimeType\tTradeTime;\n\t///成交类型\n\tTThostFtdcTradeTypeType\tTradeType;\n\t///成交价来源\n\tTThostFtdcPriceSourceType\tPriceSource;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///成交来源\n\tTThostFtdcTradeSourceType\tTradeSource;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///成交\nstruct CThostFtdcTradeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///成交编号\n\tTThostFtdcTradeIDType\tTradeID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///交易角色\n\tTThostFtdcTradingRoleType\tTradingRole;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///成交时期\n\tTThostFtdcDateType\tTradeDate;\n\t///成交时间\n\tTThostFtdcTimeType\tTradeTime;\n\t///成交类型\n\tTThostFtdcTradeTypeType\tTradeType;\n\t///成交价来源\n\tTThostFtdcPriceSourceType\tPriceSource;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///经纪公司报单编号\n\tTThostFtdcSequenceNoType\tBrokerOrderSeq;\n\t///成交来源\n\tTThostFtdcTradeSourceType\tTradeSource;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///用户会话\nstruct CThostFtdcUserSessionField\n{\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///登录日期\n\tTThostFtdcDateType\tLoginDate;\n\t///登录时间\n\tTThostFtdcTimeType\tLoginTime;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///接口端产品信息\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\n\t///协议信息\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///登录备注\n\tTThostFtdcLoginRemarkType\tLoginRemark;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询最大报单数量\nstruct CThostFtdcQryMaxOrderVolumeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///最大允许报单数量\n\tTThostFtdcVolumeType\tMaxVolume;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///投资者结算结果确认信息\nstruct CThostFtdcSettlementInfoConfirmField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///确认日期\n\tTThostFtdcDateType\tConfirmDate;\n\t///确认时间\n\tTThostFtdcTimeType\tConfirmTime;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///出入金同步\nstruct CThostFtdcSyncDepositField\n{\n\t///出入金流水号\n\tTThostFtdcDepositSeqNoType\tDepositSeqNo;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///入金金额\n\tTThostFtdcMoneyType\tDeposit;\n\t///是否强制进行\n\tTThostFtdcBoolType\tIsForce;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///是否是个股期权内转\n\tTThostFtdcBoolType\tIsFromSopt;\n\t///资金密码\n\tTThostFtdcPasswordType\tTradingPassword;\n\t///是否二级代理商的内转\n\tTThostFtdcBoolType\tIsSecAgentTranfer;\n};\n\n///货币质押同步\nstruct CThostFtdcSyncFundMortgageField\n{\n\t///货币质押流水号\n\tTThostFtdcDepositSeqNoType\tMortgageSeqNo;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///源币种\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\n\t///质押金额\n\tTThostFtdcMoneyType\tMortgageAmount;\n\t///目标币种\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\n};\n\n///经纪公司同步\nstruct CThostFtdcBrokerSyncField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///正在同步中的投资者\nstruct CThostFtdcSyncingInvestorField\n{\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者分组代码\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\n\t///投资者名称\n\tTThostFtdcPartyNameType\tInvestorName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdentifiedCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n\t///联系电话\n\tTThostFtdcTelephoneType\tTelephone;\n\t///通讯地址\n\tTThostFtdcAddressType\tAddress;\n\t///开户日期\n\tTThostFtdcDateType\tOpenDate;\n\t///手机\n\tTThostFtdcMobileType\tMobile;\n\t///手续费率模板代码\n\tTThostFtdcInvestorIDType\tCommModelID;\n\t///保证金率模板代码\n\tTThostFtdcInvestorIDType\tMarginModelID;\n\t///是否频率控制\n\tTThostFtdcEnumBoolType\tIsOrderFreq;\n\t///是否开仓限制\n\tTThostFtdcEnumBoolType\tIsOpenVolLimit;\n};\n\n///正在同步中的交易代码\nstruct CThostFtdcSyncingTradingCodeField\n{\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n\t///交易编码类型\n\tTThostFtdcClientIDTypeType\tClientIDType;\n};\n\n///正在同步中的投资者分组\nstruct CThostFtdcSyncingInvestorGroupField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者分组代码\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\n\t///投资者分组名称\n\tTThostFtdcInvestorGroupNameType\tInvestorGroupName;\n};\n\n///正在同步中的交易账号\nstruct CThostFtdcSyncingTradingAccountField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///上次质押金额\n\tTThostFtdcMoneyType\tPreMortgage;\n\t///上次信用额度\n\tTThostFtdcMoneyType\tPreCredit;\n\t///上次存款额\n\tTThostFtdcMoneyType\tPreDeposit;\n\t///上次结算准备金\n\tTThostFtdcMoneyType\tPreBalance;\n\t///上次占用的保证金\n\tTThostFtdcMoneyType\tPreMargin;\n\t///利息基数\n\tTThostFtdcMoneyType\tInterestBase;\n\t///利息收入\n\tTThostFtdcMoneyType\tInterest;\n\t///入金金额\n\tTThostFtdcMoneyType\tDeposit;\n\t///出金金额\n\tTThostFtdcMoneyType\tWithdraw;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///当前保证金总额\n\tTThostFtdcMoneyType\tCurrMargin;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfit;\n\t///期货结算准备金\n\tTThostFtdcMoneyType\tBalance;\n\t///可用资金\n\tTThostFtdcMoneyType\tAvailable;\n\t///可取资金\n\tTThostFtdcMoneyType\tWithdrawQuota;\n\t///基本准备金\n\tTThostFtdcMoneyType\tReserve;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///信用额度\n\tTThostFtdcMoneyType\tCredit;\n\t///质押金额\n\tTThostFtdcMoneyType\tMortgage;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchangeMargin;\n\t///投资者交割保证金\n\tTThostFtdcMoneyType\tDeliveryMargin;\n\t///交易所交割保证金\n\tTThostFtdcMoneyType\tExchangeDeliveryMargin;\n\t///保底期货结算准备金\n\tTThostFtdcMoneyType\tReserveBalance;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///上次货币质入金额\n\tTThostFtdcMoneyType\tPreFundMortgageIn;\n\t///上次货币质出金额\n\tTThostFtdcMoneyType\tPreFundMortgageOut;\n\t///货币质入金额\n\tTThostFtdcMoneyType\tFundMortgageIn;\n\t///货币质出金额\n\tTThostFtdcMoneyType\tFundMortgageOut;\n\t///货币质押余额\n\tTThostFtdcMoneyType\tFundMortgageAvailable;\n\t///可质押货币金额\n\tTThostFtdcMoneyType\tMortgageableFund;\n\t///特殊产品占用保证金\n\tTThostFtdcMoneyType\tSpecProductMargin;\n\t///特殊产品冻结保证金\n\tTThostFtdcMoneyType\tSpecProductFrozenMargin;\n\t///特殊产品手续费\n\tTThostFtdcMoneyType\tSpecProductCommission;\n\t///特殊产品冻结手续费\n\tTThostFtdcMoneyType\tSpecProductFrozenCommission;\n\t///特殊产品持仓盈亏\n\tTThostFtdcMoneyType\tSpecProductPositionProfit;\n\t///特殊产品平仓盈亏\n\tTThostFtdcMoneyType\tSpecProductCloseProfit;\n\t///根据持仓盈亏算法计算的特殊产品持仓盈亏\n\tTThostFtdcMoneyType\tSpecProductPositionProfitByAlg;\n\t///特殊产品交易所保证金\n\tTThostFtdcMoneyType\tSpecProductExchangeMargin;\n\t///延时换汇冻结金额\n\tTThostFtdcMoneyType\tFrozenSwap;\n\t///剩余换汇额度\n\tTThostFtdcMoneyType\tRemainSwap;\n\t///期权市值\n\tTThostFtdcMoneyType\tOptionValue;\n};\n\n///正在同步中的投资者持仓\nstruct CThostFtdcSyncingInvestorPositionField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///持仓多空方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///持仓日期\n\tTThostFtdcPositionDateType\tPositionDate;\n\t///上日持仓\n\tTThostFtdcVolumeType\tYdPosition;\n\t///今日持仓\n\tTThostFtdcVolumeType\tPosition;\n\t///多头冻结\n\tTThostFtdcVolumeType\tLongFrozen;\n\t///空头冻结\n\tTThostFtdcVolumeType\tShortFrozen;\n\t///开仓冻结金额\n\tTThostFtdcMoneyType\tLongFrozenAmount;\n\t///开仓冻结金额\n\tTThostFtdcMoneyType\tShortFrozenAmount;\n\t///开仓量\n\tTThostFtdcVolumeType\tOpenVolume;\n\t///平仓量\n\tTThostFtdcVolumeType\tCloseVolume;\n\t///开仓金额\n\tTThostFtdcMoneyType\tOpenAmount;\n\t///平仓金额\n\tTThostFtdcMoneyType\tCloseAmount;\n\t///持仓成本\n\tTThostFtdcMoneyType\tPositionCost;\n\t///上次占用的保证金\n\tTThostFtdcMoneyType\tPreMargin;\n\t///占用的保证金\n\tTThostFtdcMoneyType\tUseMargin;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfit;\n\t///上次结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///本次结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///开仓成本\n\tTThostFtdcMoneyType\tOpenCost;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchangeMargin;\n\t///组合成交形成的持仓\n\tTThostFtdcVolumeType\tCombPosition;\n\t///组合多头冻结\n\tTThostFtdcVolumeType\tCombLongFrozen;\n\t///组合空头冻结\n\tTThostFtdcVolumeType\tCombShortFrozen;\n\t///逐日盯市平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByDate;\n\t///逐笔对冲平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\n\t///今日持仓\n\tTThostFtdcVolumeType\tTodayPosition;\n\t///保证金率\n\tTThostFtdcRatioType\tMarginRateByMoney;\n\t///保证金率(按手数)\n\tTThostFtdcRatioType\tMarginRateByVolume;\n\t///执行冻结\n\tTThostFtdcVolumeType\tStrikeFrozen;\n\t///执行冻结金额\n\tTThostFtdcMoneyType\tStrikeFrozenAmount;\n\t///放弃执行冻结\n\tTThostFtdcVolumeType\tAbandonFrozen;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行冻结的昨仓\n\tTThostFtdcVolumeType\tYdStrikeFrozen;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///持仓成本差值\n\tTThostFtdcMoneyType\tPositionCostOffset;\n\t///tas持仓手数\n\tTThostFtdcVolumeType\tTasPosition;\n\t///tas持仓成本\n\tTThostFtdcMoneyType\tTasPositionCost;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///正在同步中的合约保证金率\nstruct CThostFtdcSyncingInstrumentMarginRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///是否相对交易所收取\n\tTThostFtdcBoolType\tIsRelative;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///正在同步中的合约手续费率\nstruct CThostFtdcSyncingInstrumentCommissionRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///开仓手续费率\n\tTThostFtdcRatioType\tOpenRatioByMoney;\n\t///开仓手续费\n\tTThostFtdcRatioType\tOpenRatioByVolume;\n\t///平仓手续费率\n\tTThostFtdcRatioType\tCloseRatioByMoney;\n\t///平仓手续费\n\tTThostFtdcRatioType\tCloseRatioByVolume;\n\t///平今手续费率\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\n\t///平今手续费\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///正在同步中的合约交易权限\nstruct CThostFtdcSyncingInstrumentTradingRightField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易权限\n\tTThostFtdcTradingRightType\tTradingRight;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询报单\nstruct CThostFtdcQryOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///开始时间\n\tTThostFtdcTimeType\tInsertTimeStart;\n\t///结束时间\n\tTThostFtdcTimeType\tInsertTimeEnd;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询成交\nstruct CThostFtdcQryTradeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///成交编号\n\tTThostFtdcTradeIDType\tTradeID;\n\t///开始时间\n\tTThostFtdcTimeType\tTradeTimeStart;\n\t///结束时间\n\tTThostFtdcTimeType\tTradeTimeEnd;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询投资者持仓\nstruct CThostFtdcQryInvestorPositionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询资金账户\nstruct CThostFtdcQryTradingAccountField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///业务类型\n\tTThostFtdcBizTypeType\tBizType;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n};\n\n///查询投资者\nstruct CThostFtdcQryInvestorField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///查询交易编码\nstruct CThostFtdcQryTradingCodeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///交易编码类型\n\tTThostFtdcClientIDTypeType\tClientIDType;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///查询投资者组\nstruct CThostFtdcQryInvestorGroupField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///查询合约保证金率\nstruct CThostFtdcQryInstrumentMarginRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询手续费率\nstruct CThostFtdcQryInstrumentCommissionRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询合约交易权限\nstruct CThostFtdcQryInstrumentTradingRightField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询经纪公司\nstruct CThostFtdcQryBrokerField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///查询交易员\nstruct CThostFtdcQryTraderField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n};\n\n///查询管理用户功能权限\nstruct CThostFtdcQrySuperUserFunctionField\n{\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///查询用户会话\nstruct CThostFtdcQryUserSessionField\n{\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///查询经纪公司会员代码\nstruct CThostFtdcQryPartBrokerField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n};\n\n///查询前置状态\nstruct CThostFtdcQryFrontStatusField\n{\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n};\n\n///查询交易所报单\nstruct CThostFtdcQryExchangeOrderField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///查询报单操作\nstruct CThostFtdcQryOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///查询交易所报单操作\nstruct CThostFtdcQryExchangeOrderActionField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n};\n\n///查询管理用户\nstruct CThostFtdcQrySuperUserField\n{\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///查询交易所\nstruct CThostFtdcQryExchangeField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///查询产品\nstruct CThostFtdcQryProductField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///产品类型\n\tTThostFtdcProductClassType\tProductClass;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n};\n\n///查询合约\nstruct CThostFtdcQryInstrumentField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve3;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n};\n\n///查询行情\nstruct CThostFtdcQryDepthMarketDataField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///产品类型\n\tTThostFtdcProductClassType\tProductClass;\n};\n\n///查询经纪公司用户\nstruct CThostFtdcQryBrokerUserField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///查询经纪公司用户权限\nstruct CThostFtdcQryBrokerUserFunctionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///查询交易员报盘机\nstruct CThostFtdcQryTraderOfferField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n};\n\n///查询出入金流水\nstruct CThostFtdcQrySyncDepositField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///出入金流水号\n\tTThostFtdcDepositSeqNoType\tDepositSeqNo;\n};\n\n///查询投资者结算结果\nstruct CThostFtdcQrySettlementInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///查询交易所保证金率\nstruct CThostFtdcQryExchangeMarginRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询交易所调整保证金率\nstruct CThostFtdcQryExchangeMarginRateAdjustField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询汇率\nstruct CThostFtdcQryExchangeRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///源币种\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\n\t///目标币种\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\n};\n\n///查询货币质押流水\nstruct CThostFtdcQrySyncFundMortgageField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///货币质押流水号\n\tTThostFtdcDepositSeqNoType\tMortgageSeqNo;\n};\n\n///查询报单\nstruct CThostFtdcQryHisOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///开始时间\n\tTThostFtdcTimeType\tInsertTimeStart;\n\t///结束时间\n\tTThostFtdcTimeType\tInsertTimeEnd;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///当前期权合约最小保证金\nstruct CThostFtdcOptionInstrMiniMarginField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///单位（手）期权合约最小保证金\n\tTThostFtdcMoneyType\tMinMargin;\n\t///取值方式\n\tTThostFtdcValueMethodType\tValueMethod;\n\t///是否跟随交易所收取\n\tTThostFtdcBoolType\tIsRelative;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///当前期权合约保证金调整系数\nstruct CThostFtdcOptionInstrMarginAdjustField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机空头保证金调整系数\n\tTThostFtdcRatioType\tSShortMarginRatioByMoney;\n\t///投机空头保证金调整系数\n\tTThostFtdcMoneyType\tSShortMarginRatioByVolume;\n\t///保值空头保证金调整系数\n\tTThostFtdcRatioType\tHShortMarginRatioByMoney;\n\t///保值空头保证金调整系数\n\tTThostFtdcMoneyType\tHShortMarginRatioByVolume;\n\t///套利空头保证金调整系数\n\tTThostFtdcRatioType\tAShortMarginRatioByMoney;\n\t///套利空头保证金调整系数\n\tTThostFtdcMoneyType\tAShortMarginRatioByVolume;\n\t///是否跟随交易所收取\n\tTThostFtdcBoolType\tIsRelative;\n\t///做市商空头保证金调整系数\n\tTThostFtdcRatioType\tMShortMarginRatioByMoney;\n\t///做市商空头保证金调整系数\n\tTThostFtdcMoneyType\tMShortMarginRatioByVolume;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///当前期权合约手续费的详细内容\nstruct CThostFtdcOptionInstrCommRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///开仓手续费率\n\tTThostFtdcRatioType\tOpenRatioByMoney;\n\t///开仓手续费\n\tTThostFtdcRatioType\tOpenRatioByVolume;\n\t///平仓手续费率\n\tTThostFtdcRatioType\tCloseRatioByMoney;\n\t///平仓手续费\n\tTThostFtdcRatioType\tCloseRatioByVolume;\n\t///平今手续费率\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\n\t///平今手续费\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\n\t///执行手续费率\n\tTThostFtdcRatioType\tStrikeRatioByMoney;\n\t///执行手续费\n\tTThostFtdcRatioType\tStrikeRatioByVolume;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///期权交易成本\nstruct CThostFtdcOptionInstrTradeCostField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///期权合约保证金不变部分\n\tTThostFtdcMoneyType\tFixedMargin;\n\t///期权合约最小保证金\n\tTThostFtdcMoneyType\tMiniMargin;\n\t///期权合约权利金\n\tTThostFtdcMoneyType\tRoyalty;\n\t///交易所期权合约保证金不变部分\n\tTThostFtdcMoneyType\tExchFixedMargin;\n\t///交易所期权合约最小保证金\n\tTThostFtdcMoneyType\tExchMiniMargin;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///期权交易成本查询\nstruct CThostFtdcQryOptionInstrTradeCostField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///期权合约报价\n\tTThostFtdcPriceType\tInputPrice;\n\t///标的价格,填0则用昨结算价\n\tTThostFtdcPriceType\tUnderlyingPrice;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///期权手续费率查询\nstruct CThostFtdcQryOptionInstrCommRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///股指现货指数\nstruct CThostFtdcIndexPriceField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///指数现货收盘价\n\tTThostFtdcPriceType\tClosePrice;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///输入的执行宣告\nstruct CThostFtdcInputExecOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///执行宣告引用\n\tTThostFtdcOrderRefType\tExecOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///执行类型\n\tTThostFtdcActionTypeType\tActionType;\n\t///保留头寸申请的持仓方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\n\t///期权行权后生成的头寸是否自动平仓\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///输入执行宣告操作\nstruct CThostFtdcInputExecOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///执行宣告操作引用\n\tTThostFtdcOrderActionRefType\tExecOrderActionRef;\n\t///执行宣告引用\n\tTThostFtdcOrderRefType\tExecOrderRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行宣告操作编号\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///执行宣告\nstruct CThostFtdcExecOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///执行宣告引用\n\tTThostFtdcOrderRefType\tExecOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///执行类型\n\tTThostFtdcActionTypeType\tActionType;\n\t///保留头寸申请的持仓方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\n\t///期权行权后生成的头寸是否自动平仓\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\n\t///本地执行宣告编号\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///执行宣告提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///执行宣告编号\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///执行结果\n\tTThostFtdcExecResultType\tExecResult;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///操作用户代码\n\tTThostFtdcUserIDType\tActiveUserID;\n\t///经纪公司报单编号\n\tTThostFtdcSequenceNoType\tBrokerExecOrderSeq;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve3;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///执行宣告操作\nstruct CThostFtdcExecOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///执行宣告操作引用\n\tTThostFtdcOrderActionRefType\tExecOrderActionRef;\n\t///执行宣告引用\n\tTThostFtdcOrderRefType\tExecOrderRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行宣告操作编号\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地执行宣告编号\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///执行类型\n\tTThostFtdcActionTypeType\tActionType;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///执行宣告查询\nstruct CThostFtdcQryExecOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行宣告编号\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\n\t///开始时间\n\tTThostFtdcTimeType\tInsertTimeStart;\n\t///结束时间\n\tTThostFtdcTimeType\tInsertTimeEnd;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易所执行宣告信息\nstruct CThostFtdcExchangeExecOrderField\n{\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///执行类型\n\tTThostFtdcActionTypeType\tActionType;\n\t///保留头寸申请的持仓方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\n\t///期权行权后生成的头寸是否自动平仓\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\n\t///本地执行宣告编号\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///执行宣告提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///执行宣告编号\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///执行结果\n\tTThostFtdcExecResultType\tExecResult;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///交易所执行宣告查询\nstruct CThostFtdcQryExchangeExecOrderField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///执行宣告操作查询\nstruct CThostFtdcQryExecOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///交易所执行宣告操作\nstruct CThostFtdcExchangeExecOrderActionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行宣告操作编号\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地执行宣告编号\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///执行类型\n\tTThostFtdcActionTypeType\tActionType;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///交易所执行宣告操作查询\nstruct CThostFtdcQryExchangeExecOrderActionField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n};\n\n///错误执行宣告\nstruct CThostFtdcErrExecOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///执行宣告引用\n\tTThostFtdcOrderRefType\tExecOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///执行类型\n\tTThostFtdcActionTypeType\tActionType;\n\t///保留头寸申请的持仓方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\n\t///期权行权后生成的头寸是否自动平仓\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询错误执行宣告\nstruct CThostFtdcQryErrExecOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///错误执行宣告操作\nstruct CThostFtdcErrExecOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///执行宣告操作引用\n\tTThostFtdcOrderActionRefType\tExecOrderActionRef;\n\t///执行宣告引用\n\tTThostFtdcOrderRefType\tExecOrderRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行宣告操作编号\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询错误执行宣告操作\nstruct CThostFtdcQryErrExecOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///投资者期权合约交易权限\nstruct CThostFtdcOptionInstrTradingRightField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///交易权限\n\tTThostFtdcTradingRightType\tTradingRight;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询期权合约交易权限\nstruct CThostFtdcQryOptionInstrTradingRightField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///输入的询价\nstruct CThostFtdcInputForQuoteField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///询价引用\n\tTThostFtdcOrderRefType\tForQuoteRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///询价\nstruct CThostFtdcForQuoteField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///询价引用\n\tTThostFtdcOrderRefType\tForQuoteRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///本地询价编号\n\tTThostFtdcOrderLocalIDType\tForQuoteLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///询价状态\n\tTThostFtdcForQuoteStatusType\tForQuoteStatus;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///操作用户代码\n\tTThostFtdcUserIDType\tActiveUserID;\n\t///经纪公司询价编号\n\tTThostFtdcSequenceNoType\tBrokerForQutoSeq;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve3;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///询价查询\nstruct CThostFtdcQryForQuoteField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///开始时间\n\tTThostFtdcTimeType\tInsertTimeStart;\n\t///结束时间\n\tTThostFtdcTimeType\tInsertTimeEnd;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易所询价信息\nstruct CThostFtdcExchangeForQuoteField\n{\n\t///本地询价编号\n\tTThostFtdcOrderLocalIDType\tForQuoteLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///询价状态\n\tTThostFtdcForQuoteStatusType\tForQuoteStatus;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///交易所询价查询\nstruct CThostFtdcQryExchangeForQuoteField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///输入的报价\nstruct CThostFtdcInputQuoteField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报价引用\n\tTThostFtdcOrderRefType\tQuoteRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///卖价格\n\tTThostFtdcPriceType\tAskPrice;\n\t///买价格\n\tTThostFtdcPriceType\tBidPrice;\n\t///卖数量\n\tTThostFtdcVolumeType\tAskVolume;\n\t///买数量\n\tTThostFtdcVolumeType\tBidVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///卖开平标志\n\tTThostFtdcOffsetFlagType\tAskOffsetFlag;\n\t///买开平标志\n\tTThostFtdcOffsetFlagType\tBidOffsetFlag;\n\t///卖投机套保标志\n\tTThostFtdcHedgeFlagType\tAskHedgeFlag;\n\t///买投机套保标志\n\tTThostFtdcHedgeFlagType\tBidHedgeFlag;\n\t///衍生卖报单引用\n\tTThostFtdcOrderRefType\tAskOrderRef;\n\t///衍生买报单引用\n\tTThostFtdcOrderRefType\tBidOrderRef;\n\t///应价编号\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///被顶单编号\n\tTThostFtdcOrderSysIDType\tReplaceSysID;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///输入报价操作\nstruct CThostFtdcInputQuoteActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报价操作引用\n\tTThostFtdcOrderActionRefType\tQuoteActionRef;\n\t///报价引用\n\tTThostFtdcOrderRefType\tQuoteRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报价操作编号\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///报价\nstruct CThostFtdcQuoteField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报价引用\n\tTThostFtdcOrderRefType\tQuoteRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///卖价格\n\tTThostFtdcPriceType\tAskPrice;\n\t///买价格\n\tTThostFtdcPriceType\tBidPrice;\n\t///卖数量\n\tTThostFtdcVolumeType\tAskVolume;\n\t///买数量\n\tTThostFtdcVolumeType\tBidVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///卖开平标志\n\tTThostFtdcOffsetFlagType\tAskOffsetFlag;\n\t///买开平标志\n\tTThostFtdcOffsetFlagType\tBidOffsetFlag;\n\t///卖投机套保标志\n\tTThostFtdcHedgeFlagType\tAskHedgeFlag;\n\t///买投机套保标志\n\tTThostFtdcHedgeFlagType\tBidHedgeFlag;\n\t///本地报价编号\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///报价提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///报价提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///报价编号\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///报价状态\n\tTThostFtdcOrderStatusType\tQuoteStatus;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///卖方报单编号\n\tTThostFtdcOrderSysIDType\tAskOrderSysID;\n\t///买方报单编号\n\tTThostFtdcOrderSysIDType\tBidOrderSysID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///操作用户代码\n\tTThostFtdcUserIDType\tActiveUserID;\n\t///经纪公司报价编号\n\tTThostFtdcSequenceNoType\tBrokerQuoteSeq;\n\t///衍生卖报单引用\n\tTThostFtdcOrderRefType\tAskOrderRef;\n\t///衍生买报单引用\n\tTThostFtdcOrderRefType\tBidOrderRef;\n\t///应价编号\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve3;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///被顶单编号\n\tTThostFtdcOrderSysIDType\tReplaceSysID;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///报价操作\nstruct CThostFtdcQuoteActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报价操作引用\n\tTThostFtdcOrderActionRefType\tQuoteActionRef;\n\t///报价引用\n\tTThostFtdcOrderRefType\tQuoteRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报价操作编号\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报价编号\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///报价查询\nstruct CThostFtdcQryQuoteField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报价编号\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\n\t///开始时间\n\tTThostFtdcTimeType\tInsertTimeStart;\n\t///结束时间\n\tTThostFtdcTimeType\tInsertTimeEnd;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易所报价信息\nstruct CThostFtdcExchangeQuoteField\n{\n\t///卖价格\n\tTThostFtdcPriceType\tAskPrice;\n\t///买价格\n\tTThostFtdcPriceType\tBidPrice;\n\t///卖数量\n\tTThostFtdcVolumeType\tAskVolume;\n\t///买数量\n\tTThostFtdcVolumeType\tBidVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///卖开平标志\n\tTThostFtdcOffsetFlagType\tAskOffsetFlag;\n\t///买开平标志\n\tTThostFtdcOffsetFlagType\tBidOffsetFlag;\n\t///卖投机套保标志\n\tTThostFtdcHedgeFlagType\tAskHedgeFlag;\n\t///买投机套保标志\n\tTThostFtdcHedgeFlagType\tBidHedgeFlag;\n\t///本地报价编号\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///报价提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///报价提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///报价编号\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///报价状态\n\tTThostFtdcOrderStatusType\tQuoteStatus;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///卖方报单编号\n\tTThostFtdcOrderSysIDType\tAskOrderSysID;\n\t///买方报单编号\n\tTThostFtdcOrderSysIDType\tBidOrderSysID;\n\t///应价编号\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n};\n\n///交易所报价查询\nstruct CThostFtdcQryExchangeQuoteField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///报价操作查询\nstruct CThostFtdcQryQuoteActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///交易所报价操作\nstruct CThostFtdcExchangeQuoteActionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报价操作编号\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报价编号\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///交易所报价操作查询\nstruct CThostFtdcQryExchangeQuoteActionField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n};\n\n///期权合约delta值\nstruct CThostFtdcOptionInstrDeltaField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///Delta值\n\tTThostFtdcRatioType\tDelta;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///发给做市商的询价请求\nstruct CThostFtdcForQuoteRspField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///询价编号\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\n\t///询价时间\n\tTThostFtdcTimeType\tForQuoteTime;\n\t///业务日期\n\tTThostFtdcDateType\tActionDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///当前期权合约执行偏移值的详细内容\nstruct CThostFtdcStrikeOffsetField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///执行偏移值\n\tTThostFtdcMoneyType\tOffset;\n\t///执行偏移类型\n\tTThostFtdcStrikeOffsetTypeType\tOffsetType;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///期权执行偏移值查询\nstruct CThostFtdcQryStrikeOffsetField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///输入批量报单操作\nstruct CThostFtdcInputBatchOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报单操作引用\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///批量报单操作\nstruct CThostFtdcBatchOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报单操作引用\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///交易所批量报单操作\nstruct CThostFtdcExchangeBatchOrderActionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询批量报单操作\nstruct CThostFtdcQryBatchOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///组合合约安全系数\nstruct CThostFtdcCombInstrumentGuardField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///\n\tTThostFtdcRatioType\tGuarantRatio;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///组合合约安全系数查询\nstruct CThostFtdcQryCombInstrumentGuardField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///输入的申请组合\nstruct CThostFtdcInputCombActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///组合引用\n\tTThostFtdcOrderRefType\tCombActionRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///组合指令方向\n\tTThostFtdcCombDirectionType\tCombDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///申请组合\nstruct CThostFtdcCombActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///组合引用\n\tTThostFtdcOrderRefType\tCombActionRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///组合指令方向\n\tTThostFtdcCombDirectionType\tCombDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///本地申请组合编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///组合状态\n\tTThostFtdcOrderActionStatusType\tActionStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve3;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///组合编号\n\tTThostFtdcTradeIDType\tComTradeID;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///申请组合查询\nstruct CThostFtdcQryCombActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易所申请组合信息\nstruct CThostFtdcExchangeCombActionField\n{\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///组合指令方向\n\tTThostFtdcCombDirectionType\tCombDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///本地申请组合编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///组合状态\n\tTThostFtdcOrderActionStatusType\tActionStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///组合编号\n\tTThostFtdcTradeIDType\tComTradeID;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///交易所申请组合查询\nstruct CThostFtdcQryExchangeCombActionField\n{\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///产品报价汇率\nstruct CThostFtdcProductExchRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报价币种类型\n\tTThostFtdcCurrencyIDType\tQuoteCurrencyID;\n\t///汇率\n\tTThostFtdcExchangeRateType\tExchangeRate;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n};\n\n///产品报价汇率查询\nstruct CThostFtdcQryProductExchRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n};\n\n///查询询价价差参数\nstruct CThostFtdcQryForQuoteParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///询价价差参数\nstruct CThostFtdcForQuoteParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///最新价\n\tTThostFtdcPriceType\tLastPrice;\n\t///价差\n\tTThostFtdcPriceType\tPriceInterval;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///当前做市商期权合约手续费的详细内容\nstruct CThostFtdcMMOptionInstrCommRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///开仓手续费率\n\tTThostFtdcRatioType\tOpenRatioByMoney;\n\t///开仓手续费\n\tTThostFtdcRatioType\tOpenRatioByVolume;\n\t///平仓手续费率\n\tTThostFtdcRatioType\tCloseRatioByMoney;\n\t///平仓手续费\n\tTThostFtdcRatioType\tCloseRatioByVolume;\n\t///平今手续费率\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\n\t///平今手续费\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\n\t///执行手续费率\n\tTThostFtdcRatioType\tStrikeRatioByMoney;\n\t///执行手续费\n\tTThostFtdcRatioType\tStrikeRatioByVolume;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///做市商期权手续费率查询\nstruct CThostFtdcQryMMOptionInstrCommRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///做市商合约手续费率\nstruct CThostFtdcMMInstrumentCommissionRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///开仓手续费率\n\tTThostFtdcRatioType\tOpenRatioByMoney;\n\t///开仓手续费\n\tTThostFtdcRatioType\tOpenRatioByVolume;\n\t///平仓手续费率\n\tTThostFtdcRatioType\tCloseRatioByMoney;\n\t///平仓手续费\n\tTThostFtdcRatioType\tCloseRatioByVolume;\n\t///平今手续费率\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\n\t///平今手续费\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询做市商合约手续费率\nstruct CThostFtdcQryMMInstrumentCommissionRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///当前报单手续费的详细内容\nstruct CThostFtdcInstrumentOrderCommRateField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///报单手续费\n\tTThostFtdcRatioType\tOrderCommByVolume;\n\t///撤单手续费\n\tTThostFtdcRatioType\tOrderActionCommByVolume;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///报单手续费\n\tTThostFtdcRatioType\tOrderCommByTrade;\n\t///撤单手续费\n\tTThostFtdcRatioType\tOrderActionCommByTrade;\n};\n\n///报单手续费率查询\nstruct CThostFtdcQryInstrumentOrderCommRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易参数\nstruct CThostFtdcTradeParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///参数代码\n\tTThostFtdcTradeParamIDType\tTradeParamID;\n\t///参数代码值\n\tTThostFtdcSettlementParamValueType\tTradeParamValue;\n\t///备注\n\tTThostFtdcMemoType\tMemo;\n};\n\n///合约保证金率调整\nstruct CThostFtdcInstrumentMarginRateULField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///期货持仓限制参数\nstruct CThostFtdcFutureLimitPosiParamField\n{\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///当日投机开仓数量限制\n\tTThostFtdcVolumeType\tSpecOpenVolume;\n\t///当日套利开仓数量限制\n\tTThostFtdcVolumeType\tArbiOpenVolume;\n\t///当日投机+套利开仓数量限制\n\tTThostFtdcVolumeType\tOpenVolume;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n};\n\n///禁止登录IP\nstruct CThostFtdcLoginForbiddenIPField\n{\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///IP列表\nstruct CThostFtdcIPListField\n{\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///是否白名单\n\tTThostFtdcBoolType\tIsWhite;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///输入的期权自对冲\nstruct CThostFtdcInputOptionSelfCloseField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///期权自对冲引用\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///期权行权的头寸是否自对冲\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///输入期权自对冲操作\nstruct CThostFtdcInputOptionSelfCloseActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///期权自对冲操作引用\n\tTThostFtdcOrderActionRefType\tOptionSelfCloseActionRef;\n\t///期权自对冲引用\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///期权自对冲操作编号\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///期权自对冲\nstruct CThostFtdcOptionSelfCloseField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///期权自对冲引用\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///期权行权的头寸是否自对冲\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\n\t///本地期权自对冲编号\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期权自对冲提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///期权自对冲编号\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///自对冲结果\n\tTThostFtdcExecResultType\tExecResult;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///操作用户代码\n\tTThostFtdcUserIDType\tActiveUserID;\n\t///经纪公司报单编号\n\tTThostFtdcSequenceNoType\tBrokerOptionSelfCloseSeq;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve3;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///期权自对冲操作\nstruct CThostFtdcOptionSelfCloseActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///期权自对冲操作引用\n\tTThostFtdcOrderActionRefType\tOptionSelfCloseActionRef;\n\t///期权自对冲引用\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///期权自对冲操作编号\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地期权自对冲编号\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///期权自对冲查询\nstruct CThostFtdcQryOptionSelfCloseField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///期权自对冲编号\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\n\t///开始时间\n\tTThostFtdcTimeType\tInsertTimeStart;\n\t///结束时间\n\tTThostFtdcTimeType\tInsertTimeEnd;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///交易所期权自对冲信息\nstruct CThostFtdcExchangeOptionSelfCloseField\n{\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///期权行权的头寸是否自对冲\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\n\t///本地期权自对冲编号\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期权自对冲提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///期权自对冲编号\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///自对冲结果\n\tTThostFtdcExecResultType\tExecResult;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///期权自对冲操作查询\nstruct CThostFtdcQryOptionSelfCloseActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///交易所期权自对冲操作\nstruct CThostFtdcExchangeOptionSelfCloseActionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///期权自对冲操作编号\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地期权自对冲编号\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///期权行权的头寸是否自对冲\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///延时换汇同步\nstruct CThostFtdcSyncDelaySwapField\n{\n\t///换汇流水号\n\tTThostFtdcDepositSeqNoType\tDelaySwapSeqNo;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///源币种\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\n\t///源金额\n\tTThostFtdcMoneyType\tFromAmount;\n\t///源换汇冻结金额(可用冻结)\n\tTThostFtdcMoneyType\tFromFrozenSwap;\n\t///源剩余换汇额度(可提冻结)\n\tTThostFtdcMoneyType\tFromRemainSwap;\n\t///目标币种\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\n\t///目标金额\n\tTThostFtdcMoneyType\tToAmount;\n\t///是否手工换汇\n\tTThostFtdcBoolType\tIsManualSwap;\n\t///是否将所有外币的剩余换汇额度设置为0\n\tTThostFtdcBoolType\tIsAllRemainSetZero;\n};\n\n///查询延时换汇同步\nstruct CThostFtdcQrySyncDelaySwapField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///延时换汇流水号\n\tTThostFtdcDepositSeqNoType\tDelaySwapSeqNo;\n};\n\n///投资单元\nstruct CThostFtdcInvestUnitField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///投资者单元名称\n\tTThostFtdcPartyNameType\tInvestorUnitName;\n\t///投资者分组代码\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\n\t///手续费率模板代码\n\tTThostFtdcInvestorIDType\tCommModelID;\n\t///保证金率模板代码\n\tTThostFtdcInvestorIDType\tMarginModelID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///查询投资单元\nstruct CThostFtdcQryInvestUnitField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///二级代理商资金校验模式\nstruct CThostFtdcSecAgentCheckModeField\n{\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///币种\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///境外中介机构资金帐号\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\n\t///是否需要校验自己的资金账户\n\tTThostFtdcBoolType\tCheckSelfAccount;\n};\n\n///二级代理商信息\nstruct CThostFtdcSecAgentTradeInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///境外中介机构资金帐号\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///二级代理商姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///市场行情\nstruct CThostFtdcMarketDataField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///最新价\n\tTThostFtdcPriceType\tLastPrice;\n\t///上次结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///昨收盘\n\tTThostFtdcPriceType\tPreClosePrice;\n\t///昨持仓量\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\n\t///今开盘\n\tTThostFtdcPriceType\tOpenPrice;\n\t///最高价\n\tTThostFtdcPriceType\tHighestPrice;\n\t///最低价\n\tTThostFtdcPriceType\tLowestPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///成交金额\n\tTThostFtdcMoneyType\tTurnover;\n\t///持仓量\n\tTThostFtdcLargeVolumeType\tOpenInterest;\n\t///今收盘\n\tTThostFtdcPriceType\tClosePrice;\n\t///本次结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///涨停板价\n\tTThostFtdcPriceType\tUpperLimitPrice;\n\t///跌停板价\n\tTThostFtdcPriceType\tLowerLimitPrice;\n\t///昨虚实度\n\tTThostFtdcRatioType\tPreDelta;\n\t///今虚实度\n\tTThostFtdcRatioType\tCurrDelta;\n\t///最后修改时间\n\tTThostFtdcTimeType\tUpdateTime;\n\t///最后修改毫秒\n\tTThostFtdcMillisecType\tUpdateMillisec;\n\t///业务日期\n\tTThostFtdcDateType\tActionDay;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///行情基础属性\nstruct CThostFtdcMarketDataBaseField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///上次结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///昨收盘\n\tTThostFtdcPriceType\tPreClosePrice;\n\t///昨持仓量\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\n\t///昨虚实度\n\tTThostFtdcRatioType\tPreDelta;\n};\n\n///行情静态属性\nstruct CThostFtdcMarketDataStaticField\n{\n\t///今开盘\n\tTThostFtdcPriceType\tOpenPrice;\n\t///最高价\n\tTThostFtdcPriceType\tHighestPrice;\n\t///最低价\n\tTThostFtdcPriceType\tLowestPrice;\n\t///今收盘\n\tTThostFtdcPriceType\tClosePrice;\n\t///涨停板价\n\tTThostFtdcPriceType\tUpperLimitPrice;\n\t///跌停板价\n\tTThostFtdcPriceType\tLowerLimitPrice;\n\t///本次结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///今虚实度\n\tTThostFtdcRatioType\tCurrDelta;\n};\n\n///行情最新成交属性\nstruct CThostFtdcMarketDataLastMatchField\n{\n\t///最新价\n\tTThostFtdcPriceType\tLastPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///成交金额\n\tTThostFtdcMoneyType\tTurnover;\n\t///持仓量\n\tTThostFtdcLargeVolumeType\tOpenInterest;\n};\n\n///行情最优价属性\nstruct CThostFtdcMarketDataBestPriceField\n{\n\t///申买价一\n\tTThostFtdcPriceType\tBidPrice1;\n\t///申买量一\n\tTThostFtdcVolumeType\tBidVolume1;\n\t///申卖价一\n\tTThostFtdcPriceType\tAskPrice1;\n\t///申卖量一\n\tTThostFtdcVolumeType\tAskVolume1;\n};\n\n///行情申买二、三属性\nstruct CThostFtdcMarketDataBid23Field\n{\n\t///申买价二\n\tTThostFtdcPriceType\tBidPrice2;\n\t///申买量二\n\tTThostFtdcVolumeType\tBidVolume2;\n\t///申买价三\n\tTThostFtdcPriceType\tBidPrice3;\n\t///申买量三\n\tTThostFtdcVolumeType\tBidVolume3;\n};\n\n///行情申卖二、三属性\nstruct CThostFtdcMarketDataAsk23Field\n{\n\t///申卖价二\n\tTThostFtdcPriceType\tAskPrice2;\n\t///申卖量二\n\tTThostFtdcVolumeType\tAskVolume2;\n\t///申卖价三\n\tTThostFtdcPriceType\tAskPrice3;\n\t///申卖量三\n\tTThostFtdcVolumeType\tAskVolume3;\n};\n\n///行情申买四、五属性\nstruct CThostFtdcMarketDataBid45Field\n{\n\t///申买价四\n\tTThostFtdcPriceType\tBidPrice4;\n\t///申买量四\n\tTThostFtdcVolumeType\tBidVolume4;\n\t///申买价五\n\tTThostFtdcPriceType\tBidPrice5;\n\t///申买量五\n\tTThostFtdcVolumeType\tBidVolume5;\n};\n\n///行情申卖四、五属性\nstruct CThostFtdcMarketDataAsk45Field\n{\n\t///申卖价四\n\tTThostFtdcPriceType\tAskPrice4;\n\t///申卖量四\n\tTThostFtdcVolumeType\tAskVolume4;\n\t///申卖价五\n\tTThostFtdcPriceType\tAskPrice5;\n\t///申卖量五\n\tTThostFtdcVolumeType\tAskVolume5;\n};\n\n///行情更新时间属性\nstruct CThostFtdcMarketDataUpdateTimeField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///最后修改时间\n\tTThostFtdcTimeType\tUpdateTime;\n\t///最后修改毫秒\n\tTThostFtdcMillisecType\tUpdateMillisec;\n\t///业务日期\n\tTThostFtdcDateType\tActionDay;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///行情上下带价\nstruct CThostFtdcMarketDataBandingPriceField\n{\n\t///上带价\n\tTThostFtdcPriceType\tBandingUpperPrice;\n\t///下带价\n\tTThostFtdcPriceType\tBandingLowerPrice;\n};\n\n///行情交易所代码属性\nstruct CThostFtdcMarketDataExchangeField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///指定的合约\nstruct CThostFtdcSpecificInstrumentField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///合约状态\nstruct CThostFtdcInstrumentStatusField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///结算组代码\n\tTThostFtdcSettlementGroupIDType\tSettlementGroupID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve2;\n\t///合约交易状态\n\tTThostFtdcInstrumentStatusType\tInstrumentStatus;\n\t///交易阶段编号\n\tTThostFtdcTradingSegmentSNType\tTradingSegmentSN;\n\t///进入本状态时间\n\tTThostFtdcTimeType\tEnterTime;\n\t///进入本状态原因\n\tTThostFtdcInstStatusEnterReasonType\tEnterReason;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询合约状态\nstruct CThostFtdcQryInstrumentStatusField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve1;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n};\n\n///投资者账户\nstruct CThostFtdcInvestorAccountField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///浮动盈亏算法\nstruct CThostFtdcPositionProfitAlgorithmField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///盈亏算法\n\tTThostFtdcAlgorithmType\tAlgorithm;\n\t///备注\n\tTThostFtdcMemoType\tMemo;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///会员资金折扣\nstruct CThostFtdcDiscountField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///资金折扣比例\n\tTThostFtdcRatioType\tDiscount;\n};\n\n///查询转帐银行\nstruct CThostFtdcQryTransferBankField\n{\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分中心代码\n\tTThostFtdcBankBrchIDType\tBankBrchID;\n};\n\n///转帐银行\nstruct CThostFtdcTransferBankField\n{\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分中心代码\n\tTThostFtdcBankBrchIDType\tBankBrchID;\n\t///银行名称\n\tTThostFtdcBankNameType\tBankName;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n};\n\n///查询投资者持仓明细\nstruct CThostFtdcQryInvestorPositionDetailField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///投资者持仓明细\nstruct CThostFtdcInvestorPositionDetailField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///买卖\n\tTThostFtdcDirectionType\tDirection;\n\t///开仓日期\n\tTThostFtdcDateType\tOpenDate;\n\t///成交编号\n\tTThostFtdcTradeIDType\tTradeID;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///开仓价\n\tTThostFtdcPriceType\tOpenPrice;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///成交类型\n\tTThostFtdcTradeTypeType\tTradeType;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve2;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///逐日盯市平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByDate;\n\t///逐笔对冲平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\n\t///逐日盯市持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfitByDate;\n\t///逐笔对冲持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfitByTrade;\n\t///投资者保证金\n\tTThostFtdcMoneyType\tMargin;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///保证金率\n\tTThostFtdcRatioType\tMarginRateByMoney;\n\t///保证金率(按手数)\n\tTThostFtdcRatioType\tMarginRateByVolume;\n\t///昨结算价\n\tTThostFtdcPriceType\tLastSettlementPrice;\n\t///结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///平仓量\n\tTThostFtdcVolumeType\tCloseVolume;\n\t///平仓金额\n\tTThostFtdcMoneyType\tCloseAmount;\n\t///先开先平剩余数量\n\tTThostFtdcVolumeType\tTimeFirstVolume;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///特殊持仓标志\n\tTThostFtdcSpecPosiTypeType\tSpecPosiType;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n};\n\n///资金账户口令域\nstruct CThostFtdcTradingAccountPasswordField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///交易所行情报盘机\nstruct CThostFtdcMDTraderOfferField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///交易所交易员连接状态\n\tTThostFtdcTraderConnectStatusType\tTraderConnectStatus;\n\t///发出连接请求的日期\n\tTThostFtdcDateType\tConnectRequestDate;\n\t///发出连接请求的时间\n\tTThostFtdcTimeType\tConnectRequestTime;\n\t///上次报告日期\n\tTThostFtdcDateType\tLastReportDate;\n\t///上次报告时间\n\tTThostFtdcTimeType\tLastReportTime;\n\t///完成连接日期\n\tTThostFtdcDateType\tConnectDate;\n\t///完成连接时间\n\tTThostFtdcTimeType\tConnectTime;\n\t///启动日期\n\tTThostFtdcDateType\tStartDate;\n\t///启动时间\n\tTThostFtdcTimeType\tStartTime;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///本席位最大成交编号\n\tTThostFtdcTradeIDType\tMaxTradeID;\n\t///本席位最大报单备拷\n\tTThostFtdcReturnCodeType\tMaxOrderMessageReference;\n\t///撤单时选择席位算法\n\tTThostFtdcOrderCancelAlgType\tOrderCancelAlg;\n};\n\n///查询行情报盘机\nstruct CThostFtdcQryMDTraderOfferField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n};\n\n///查询客户通知\nstruct CThostFtdcQryNoticeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///客户通知\nstruct CThostFtdcNoticeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///消息正文\n\tTThostFtdcContentType\tContent;\n\t///经纪公司通知内容序列号\n\tTThostFtdcSequenceLabelType\tSequenceLabel;\n};\n\n///用户权限\nstruct CThostFtdcUserRightField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///客户权限类型\n\tTThostFtdcUserRightTypeType\tUserRightType;\n\t///是否禁止\n\tTThostFtdcBoolType\tIsForbidden;\n};\n\n///查询结算信息确认域\nstruct CThostFtdcQrySettlementInfoConfirmField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///装载结算信息\nstruct CThostFtdcLoadSettlementInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///经纪公司可提资金算法表\nstruct CThostFtdcBrokerWithdrawAlgorithmField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///可提资金算法\n\tTThostFtdcAlgorithmType\tWithdrawAlgorithm;\n\t///资金使用率\n\tTThostFtdcRatioType\tUsingRatio;\n\t///可提是否包含平仓盈利\n\tTThostFtdcIncludeCloseProfitType\tIncludeCloseProfit;\n\t///本日无仓且无成交客户是否受可提比例限制\n\tTThostFtdcAllWithoutTradeType\tAllWithoutTrade;\n\t///可用是否包含平仓盈利\n\tTThostFtdcIncludeCloseProfitType\tAvailIncludeCloseProfit;\n\t///是否启用用户事件\n\tTThostFtdcBoolType\tIsBrokerUserEvent;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///货币质押比率\n\tTThostFtdcRatioType\tFundMortgageRatio;\n\t///权益算法\n\tTThostFtdcBalanceAlgorithmType\tBalanceAlgorithm;\n};\n\n///资金账户口令变更域\nstruct CThostFtdcTradingAccountPasswordUpdateV1Field\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///原来的口令\n\tTThostFtdcPasswordType\tOldPassword;\n\t///新的口令\n\tTThostFtdcPasswordType\tNewPassword;\n};\n\n///资金账户口令变更域\nstruct CThostFtdcTradingAccountPasswordUpdateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///原来的口令\n\tTThostFtdcPasswordType\tOldPassword;\n\t///新的口令\n\tTThostFtdcPasswordType\tNewPassword;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///查询组合合约分腿\nstruct CThostFtdcQryCombinationLegField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve2;\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n\t///单腿合约代码\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\n};\n\n///查询组合合约分腿\nstruct CThostFtdcQrySyncStatusField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n};\n\n///组合交易合约的单腿\nstruct CThostFtdcCombinationLegField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve2;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///单腿乘数\n\tTThostFtdcLegMultipleType\tLegMultiple;\n\t///派生层数\n\tTThostFtdcImplyLevelType\tImplyLevel;\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n\t///单腿合约代码\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\n};\n\n///数据同步状态\nstruct CThostFtdcSyncStatusField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///数据同步状态\n\tTThostFtdcDataSyncStatusType\tDataSyncStatus;\n};\n\n///查询联系人\nstruct CThostFtdcQryLinkManField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///联系人\nstruct CThostFtdcLinkManField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///联系人类型\n\tTThostFtdcPersonTypeType\tPersonType;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdentifiedCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///名称\n\tTThostFtdcPartyNameType\tPersonName;\n\t///联系电话\n\tTThostFtdcTelephoneType\tTelephone;\n\t///通讯地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮政编码\n\tTThostFtdcZipCodeType\tZipCode;\n\t///优先级\n\tTThostFtdcPriorityType\tPriority;\n\t///开户邮政编码\n\tTThostFtdcUOAZipCodeType\tUOAZipCode;\n\t///全称\n\tTThostFtdcInvestorFullNameType\tPersonFullName;\n};\n\n///查询经纪公司用户事件\nstruct CThostFtdcQryBrokerUserEventField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户事件类型\n\tTThostFtdcUserEventTypeType\tUserEventType;\n};\n\n///查询经纪公司用户事件\nstruct CThostFtdcBrokerUserEventField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户事件类型\n\tTThostFtdcUserEventTypeType\tUserEventType;\n\t///用户事件序号\n\tTThostFtdcSequenceNoType\tEventSequenceNo;\n\t///事件发生日期\n\tTThostFtdcDateType\tEventDate;\n\t///事件发生时间\n\tTThostFtdcTimeType\tEventTime;\n\t///用户事件信息\n\tTThostFtdcUserEventInfoType\tUserEventInfo;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n};\n\n///查询签约银行请求\nstruct CThostFtdcQryContractBankField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分中心代码\n\tTThostFtdcBankBrchIDType\tBankBrchID;\n};\n\n///查询签约银行响应\nstruct CThostFtdcContractBankField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分中心代码\n\tTThostFtdcBankBrchIDType\tBankBrchID;\n\t///银行名称\n\tTThostFtdcBankNameType\tBankName;\n};\n\n///投资者组合持仓明细\nstruct CThostFtdcInvestorPositionCombineDetailField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///开仓日期\n\tTThostFtdcDateType\tOpenDate;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///组合编号\n\tTThostFtdcTradeIDType\tComTradeID;\n\t///撮合编号\n\tTThostFtdcTradeIDType\tTradeID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///买卖\n\tTThostFtdcDirectionType\tDirection;\n\t///持仓量\n\tTThostFtdcVolumeType\tTotalAmt;\n\t///投资者保证金\n\tTThostFtdcMoneyType\tMargin;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///保证金率\n\tTThostFtdcRatioType\tMarginRateByMoney;\n\t///保证金率(按手数)\n\tTThostFtdcRatioType\tMarginRateByVolume;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///单腿乘数\n\tTThostFtdcLegMultipleType\tLegMultiple;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve2;\n\t///成交组号\n\tTThostFtdcTradeGroupIDType\tTradeGroupID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///组合持仓合约编码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n};\n\n///预埋单\nstruct CThostFtdcParkedOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///报单价格条件\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///组合开平标志\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\n\t///组合投机套保标志\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///GTD日期\n\tTThostFtdcDateType\tGTDDate;\n\t///成交量类型\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\n\t///最小成交量\n\tTThostFtdcVolumeType\tMinVolume;\n\t///触发条件\n\tTThostFtdcContingentConditionType\tContingentCondition;\n\t///止损价\n\tTThostFtdcPriceType\tStopPrice;\n\t///强平原因\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\n\t///自动挂起标志\n\tTThostFtdcBoolType\tIsAutoSuspend;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///用户强平标志\n\tTThostFtdcBoolType\tUserForceClose;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///预埋报单编号\n\tTThostFtdcParkedOrderIDType\tParkedOrderID;\n\t///用户类型\n\tTThostFtdcUserTypeType\tUserType;\n\t///预埋单状态\n\tTThostFtdcParkedOrderStatusType\tStatus;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///互换单标志\n\tTThostFtdcBoolType\tIsSwapOrder;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///输入预埋单操作\nstruct CThostFtdcParkedOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报单操作引用\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量变化\n\tTThostFtdcVolumeType\tVolumeChange;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///预埋撤单单编号\n\tTThostFtdcParkedOrderActionIDType\tParkedOrderActionID;\n\t///用户类型\n\tTThostFtdcUserTypeType\tUserType;\n\t///预埋撤单状态\n\tTThostFtdcParkedOrderStatusType\tStatus;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询预埋单\nstruct CThostFtdcQryParkedOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询预埋撤单\nstruct CThostFtdcQryParkedOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///删除预埋单\nstruct CThostFtdcRemoveParkedOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///预埋报单编号\n\tTThostFtdcParkedOrderIDType\tParkedOrderID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///删除预埋撤单\nstruct CThostFtdcRemoveParkedOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///预埋撤单编号\n\tTThostFtdcParkedOrderActionIDType\tParkedOrderActionID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///经纪公司可提资金算法表\nstruct CThostFtdcInvestorWithdrawAlgorithmField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///可提资金比例\n\tTThostFtdcRatioType\tUsingRatio;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///货币质押比率\n\tTThostFtdcRatioType\tFundMortgageRatio;\n};\n\n///查询组合持仓明细\nstruct CThostFtdcQryInvestorPositionCombineDetailField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///组合持仓合约编码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n};\n\n///成交均价\nstruct CThostFtdcMarketDataAveragePriceField\n{\n\t///当日均价\n\tTThostFtdcPriceType\tAveragePrice;\n};\n\n///校验投资者密码\nstruct CThostFtdcVerifyInvestorPasswordField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n};\n\n///用户IP\nstruct CThostFtdcUserIPField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///IP地址掩码\n\tTThostFtdcIPAddressType\tIPMask;\n};\n\n///用户事件通知信息\nstruct CThostFtdcTradingNoticeInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///发送时间\n\tTThostFtdcTimeType\tSendTime;\n\t///消息正文\n\tTThostFtdcContentType\tFieldContent;\n\t///序列系列号\n\tTThostFtdcSequenceSeriesType\tSequenceSeries;\n\t///序列号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///用户事件通知\nstruct CThostFtdcTradingNoticeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///序列系列号\n\tTThostFtdcSequenceSeriesType\tSequenceSeries;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///发送时间\n\tTThostFtdcTimeType\tSendTime;\n\t///序列号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///消息正文\n\tTThostFtdcContentType\tFieldContent;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///查询交易事件通知\nstruct CThostFtdcQryTradingNoticeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///查询错误报单\nstruct CThostFtdcQryErrOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///错误报单\nstruct CThostFtdcErrOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///报单价格条件\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///组合开平标志\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\n\t///组合投机套保标志\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///GTD日期\n\tTThostFtdcDateType\tGTDDate;\n\t///成交量类型\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\n\t///最小成交量\n\tTThostFtdcVolumeType\tMinVolume;\n\t///触发条件\n\tTThostFtdcContingentConditionType\tContingentCondition;\n\t///止损价\n\tTThostFtdcPriceType\tStopPrice;\n\t///强平原因\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\n\t///自动挂起标志\n\tTThostFtdcBoolType\tIsAutoSuspend;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///用户强平标志\n\tTThostFtdcBoolType\tUserForceClose;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///互换单标志\n\tTThostFtdcBoolType\tIsSwapOrder;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///交易编码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///查询错误报单操作\nstruct CThostFtdcErrorConditionalOrderField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///报单价格条件\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///组合开平标志\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\n\t///组合投机套保标志\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\n\t///有效期类型\n\tTThostFtdcTimeConditionType\tTimeCondition;\n\t///GTD日期\n\tTThostFtdcDateType\tGTDDate;\n\t///成交量类型\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\n\t///最小成交量\n\tTThostFtdcVolumeType\tMinVolume;\n\t///触发条件\n\tTThostFtdcContingentConditionType\tContingentCondition;\n\t///止损价\n\tTThostFtdcPriceType\tStopPrice;\n\t///强平原因\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\n\t///自动挂起标志\n\tTThostFtdcBoolType\tIsAutoSuspend;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///保留的无效字段\n\tTThostFtdcOldExchangeInstIDType\treserve2;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///报单提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///报单提示序号\n\tTThostFtdcSequenceNoType\tNotifySequence;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///报单来源\n\tTThostFtdcOrderSourceType\tOrderSource;\n\t///报单状态\n\tTThostFtdcOrderStatusType\tOrderStatus;\n\t///报单类型\n\tTThostFtdcOrderTypeType\tOrderType;\n\t///今成交数量\n\tTThostFtdcVolumeType\tVolumeTraded;\n\t///剩余数量\n\tTThostFtdcVolumeType\tVolumeTotal;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///委托时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///激活时间\n\tTThostFtdcTimeType\tActiveTime;\n\t///挂起时间\n\tTThostFtdcTimeType\tSuspendTime;\n\t///最后修改时间\n\tTThostFtdcTimeType\tUpdateTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///最后修改交易所交易员代码\n\tTThostFtdcTraderIDType\tActiveTraderID;\n\t///结算会员编号\n\tTThostFtdcParticipantIDType\tClearingPartID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///用户强平标志\n\tTThostFtdcBoolType\tUserForceClose;\n\t///操作用户代码\n\tTThostFtdcUserIDType\tActiveUserID;\n\t///经纪公司报单编号\n\tTThostFtdcSequenceNoType\tBrokerOrderSeq;\n\t///相关报单\n\tTThostFtdcOrderSysIDType\tRelativeOrderSysID;\n\t///郑商所成交数量\n\tTThostFtdcVolumeType\tZCETotalTradedVolume;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///互换单标志\n\tTThostFtdcBoolType\tIsSwapOrder;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///资金账号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve3;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询错误报单操作\nstruct CThostFtdcQryErrOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///错误报单操作\nstruct CThostFtdcErrOrderActionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///报单操作引用\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\n\t///报单引用\n\tTThostFtdcOrderRefType\tOrderRef;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///报单编号\n\tTThostFtdcOrderSysIDType\tOrderSysID;\n\t///操作标志\n\tTThostFtdcActionFlagType\tActionFlag;\n\t///价格\n\tTThostFtdcPriceType\tLimitPrice;\n\t///数量变化\n\tTThostFtdcVolumeType\tVolumeChange;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///本地报单编号\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///业务单元\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///营业部编号\n\tTThostFtdcBranchIDType\tBranchID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve2;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///报单回显字段\n\tTThostFtdcOrderMemoType\tOrderMemo;\n\t///session上请求计数 api自动维护\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\n};\n\n///查询交易所状态\nstruct CThostFtdcQryExchangeSequenceField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///交易所状态\nstruct CThostFtdcExchangeSequenceField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///合约交易状态\n\tTThostFtdcInstrumentStatusType\tMarketStatus;\n};\n\n///根据价格查询最大报单数量\nstruct CThostFtdcQryMaxOrderVolumeWithPriceField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///开平标志\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///最大允许报单数量\n\tTThostFtdcVolumeType\tMaxVolume;\n\t///报单价格\n\tTThostFtdcPriceType\tPrice;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询经纪公司交易参数\nstruct CThostFtdcQryBrokerTradingParamsField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n};\n\n///经纪公司交易参数\nstruct CThostFtdcBrokerTradingParamsField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保证金价格类型\n\tTThostFtdcMarginPriceTypeType\tMarginPriceType;\n\t///盈亏算法\n\tTThostFtdcAlgorithmType\tAlgorithm;\n\t///可用是否包含平仓盈利\n\tTThostFtdcIncludeCloseProfitType\tAvailIncludeCloseProfit;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///期权权利金价格类型\n\tTThostFtdcOptionRoyaltyPriceTypeType\tOptionRoyaltyPriceType;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n};\n\n///查询经纪公司交易算法\nstruct CThostFtdcQryBrokerTradingAlgosField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///经纪公司交易算法\nstruct CThostFtdcBrokerTradingAlgosField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///持仓处理算法编号\n\tTThostFtdcHandlePositionAlgoIDType\tHandlePositionAlgoID;\n\t///寻找保证金率算法编号\n\tTThostFtdcFindMarginRateAlgoIDType\tFindMarginRateAlgoID;\n\t///资金处理算法编号\n\tTThostFtdcHandleTradingAccountAlgoIDType\tHandleTradingAccountAlgoID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询经纪公司资金\nstruct CThostFtdcQueryBrokerDepositField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n};\n\n///经纪公司资金\nstruct CThostFtdcBrokerDepositField\n{\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///上次结算准备金\n\tTThostFtdcMoneyType\tPreBalance;\n\t///当前保证金总额\n\tTThostFtdcMoneyType\tCurrMargin;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///期货结算准备金\n\tTThostFtdcMoneyType\tBalance;\n\t///入金金额\n\tTThostFtdcMoneyType\tDeposit;\n\t///出金金额\n\tTThostFtdcMoneyType\tWithdraw;\n\t///可提资金\n\tTThostFtdcMoneyType\tAvailable;\n\t///基本准备金\n\tTThostFtdcMoneyType\tReserve;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n};\n\n///查询保证金监管系统经纪公司密钥\nstruct CThostFtdcQryCFMMCBrokerKeyField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///保证金监管系统经纪公司密钥\nstruct CThostFtdcCFMMCBrokerKeyField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///经纪公司统一编码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///密钥生成日期\n\tTThostFtdcDateType\tCreateDate;\n\t///密钥生成时间\n\tTThostFtdcTimeType\tCreateTime;\n\t///密钥编号\n\tTThostFtdcSequenceNoType\tKeyID;\n\t///动态密钥\n\tTThostFtdcCFMMCKeyType\tCurrentKey;\n\t///动态密钥类型\n\tTThostFtdcCFMMCKeyKindType\tKeyKind;\n};\n\n///保证金监管系统经纪公司资金账户密钥\nstruct CThostFtdcCFMMCTradingAccountKeyField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///经纪公司统一编码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///密钥编号\n\tTThostFtdcSequenceNoType\tKeyID;\n\t///动态密钥\n\tTThostFtdcCFMMCKeyType\tCurrentKey;\n};\n\n///请求查询保证金监管系统经纪公司资金账户密钥\nstruct CThostFtdcQryCFMMCTradingAccountKeyField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///用户动态令牌参数\nstruct CThostFtdcBrokerUserOTPParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///动态令牌提供商\n\tTThostFtdcOTPVendorsIDType\tOTPVendorsID;\n\t///动态令牌序列号\n\tTThostFtdcSerialNumberType\tSerialNumber;\n\t///令牌密钥\n\tTThostFtdcAuthKeyType\tAuthKey;\n\t///漂移值\n\tTThostFtdcLastDriftType\tLastDrift;\n\t///成功值\n\tTThostFtdcLastSuccessType\tLastSuccess;\n\t///动态令牌类型\n\tTThostFtdcOTPTypeType\tOTPType;\n};\n\n///手工同步用户动态令牌\nstruct CThostFtdcManualSyncBrokerUserOTPField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///动态令牌类型\n\tTThostFtdcOTPTypeType\tOTPType;\n\t///第一个动态密码\n\tTThostFtdcPasswordType\tFirstOTP;\n\t///第二个动态密码\n\tTThostFtdcPasswordType\tSecondOTP;\n};\n\n///投资者手续费率模板\nstruct CThostFtdcCommRateModelField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///手续费率模板代码\n\tTThostFtdcInvestorIDType\tCommModelID;\n\t///模板名称\n\tTThostFtdcCommModelNameType\tCommModelName;\n};\n\n///请求查询投资者手续费率模板\nstruct CThostFtdcQryCommRateModelField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///手续费率模板代码\n\tTThostFtdcInvestorIDType\tCommModelID;\n};\n\n///投资者保证金率模板\nstruct CThostFtdcMarginModelField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保证金率模板代码\n\tTThostFtdcInvestorIDType\tMarginModelID;\n\t///模板名称\n\tTThostFtdcCommModelNameType\tMarginModelName;\n};\n\n///请求查询投资者保证金率模板\nstruct CThostFtdcQryMarginModelField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///保证金率模板代码\n\tTThostFtdcInvestorIDType\tMarginModelID;\n};\n\n///仓单折抵信息\nstruct CThostFtdcEWarrantOffsetField\n{\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询仓单折抵信息\nstruct CThostFtdcQryEWarrantOffsetField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///查询投资者品种/跨品种保证金\nstruct CThostFtdcQryInvestorProductGroupMarginField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///品种/跨品种标示\n\tTThostFtdcInstrumentIDType\tProductGroupID;\n};\n\n///投资者品种/跨品种保证金\nstruct CThostFtdcInvestorProductGroupMarginField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n\t///多头冻结的保证金\n\tTThostFtdcMoneyType\tLongFrozenMargin;\n\t///空头冻结的保证金\n\tTThostFtdcMoneyType\tShortFrozenMargin;\n\t///占用的保证金\n\tTThostFtdcMoneyType\tUseMargin;\n\t///多头保证金\n\tTThostFtdcMoneyType\tLongUseMargin;\n\t///空头保证金\n\tTThostFtdcMoneyType\tShortUseMargin;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///交易所多头保证金\n\tTThostFtdcMoneyType\tLongExchMargin;\n\t///交易所空头保证金\n\tTThostFtdcMoneyType\tShortExchMargin;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfit;\n\t///折抵总金额\n\tTThostFtdcMoneyType\tOffsetAmount;\n\t///多头折抵总金额\n\tTThostFtdcMoneyType\tLongOffsetAmount;\n\t///空头折抵总金额\n\tTThostFtdcMoneyType\tShortOffsetAmount;\n\t///交易所折抵总金额\n\tTThostFtdcMoneyType\tExchOffsetAmount;\n\t///交易所多头折抵总金额\n\tTThostFtdcMoneyType\tLongExchOffsetAmount;\n\t///交易所空头折抵总金额\n\tTThostFtdcMoneyType\tShortExchOffsetAmount;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///品种/跨品种标示\n\tTThostFtdcInstrumentIDType\tProductGroupID;\n};\n\n///查询监控中心用户令牌\nstruct CThostFtdcQueryCFMMCTradingAccountTokenField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n};\n\n///监控中心用户令牌\nstruct CThostFtdcCFMMCTradingAccountTokenField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///经纪公司统一编码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///密钥编号\n\tTThostFtdcSequenceNoType\tKeyID;\n\t///动态令牌\n\tTThostFtdcCFMMCTokenType\tToken;\n};\n\n///查询产品组\nstruct CThostFtdcQryProductGroupField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n};\n\n///投资者品种/跨品种保证金产品组\nstruct CThostFtdcProductGroupField\n{\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve2;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///产品组代码\n\tTThostFtdcInstrumentIDType\tProductGroupID;\n};\n\n///交易所公告\nstruct CThostFtdcBulletinField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///公告编号\n\tTThostFtdcBulletinIDType\tBulletinID;\n\t///序列号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///公告类型\n\tTThostFtdcNewsTypeType\tNewsType;\n\t///紧急程度\n\tTThostFtdcNewsUrgencyType\tNewsUrgency;\n\t///发送时间\n\tTThostFtdcTimeType\tSendTime;\n\t///消息摘要\n\tTThostFtdcAbstractType\tAbstract;\n\t///消息来源\n\tTThostFtdcComeFromType\tComeFrom;\n\t///消息正文\n\tTThostFtdcContentType\tContent;\n\t///WEB地址\n\tTThostFtdcURLLinkType\tURLLink;\n\t///市场代码\n\tTThostFtdcMarketIDType\tMarketID;\n};\n\n///查询交易所公告\nstruct CThostFtdcQryBulletinField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///公告编号\n\tTThostFtdcBulletinIDType\tBulletinID;\n\t///序列号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///公告类型\n\tTThostFtdcNewsTypeType\tNewsType;\n\t///紧急程度\n\tTThostFtdcNewsUrgencyType\tNewsUrgency;\n};\n\n///MulticastInstrument\nstruct CThostFtdcMulticastInstrumentField\n{\n\t///主题号\n\tTThostFtdcInstallIDType\tTopicID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约编号\n\tTThostFtdcInstallIDType\tInstrumentNo;\n\t///基准价\n\tTThostFtdcPriceType\tCodePrice;\n\t///合约数量乘数\n\tTThostFtdcVolumeMultipleType\tVolumeMultiple;\n\t///最小变动价位\n\tTThostFtdcPriceType\tPriceTick;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///QryMulticastInstrument\nstruct CThostFtdcQryMulticastInstrumentField\n{\n\t///主题号\n\tTThostFtdcInstallIDType\tTopicID;\n\t///保留的无效字段\n\tTThostFtdcOldInstrumentIDType\treserve1;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///App客户端权限分配\nstruct CThostFtdcAppIDAuthAssignField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n};\n\n///转帐开户请求\nstruct CThostFtdcReqOpenAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///汇钞标志\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///转帐销户请求\nstruct CThostFtdcReqCancelAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///汇钞标志\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///变更银行账户请求\nstruct CThostFtdcReqChangeAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///新银行帐号\n\tTThostFtdcBankAccountType\tNewBankAccount;\n\t///新银行密码\n\tTThostFtdcPasswordType\tNewBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///转账请求\nstruct CThostFtdcReqTransferField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///期货可取金额\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\n\t///费用支付标志\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\n\t///应收客户费用\n\tTThostFtdcCustFeeType\tCustFee;\n\t///应收期货公司费用\n\tTThostFtdcFutureFeeType\tBrokerFee;\n\t///发送方给接收方的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///转账交易状态\n\tTThostFtdcTransferStatusType\tTransferStatus;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///银行发起银行资金转期货响应\nstruct CThostFtdcRspTransferField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///期货可取金额\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\n\t///费用支付标志\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\n\t///应收客户费用\n\tTThostFtdcCustFeeType\tCustFee;\n\t///应收期货公司费用\n\tTThostFtdcFutureFeeType\tBrokerFee;\n\t///发送方给接收方的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///转账交易状态\n\tTThostFtdcTransferStatusType\tTransferStatus;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///冲正请求\nstruct CThostFtdcReqRepealField\n{\n\t///冲正时间间隔\n\tTThostFtdcRepealTimeIntervalType\tRepealTimeInterval;\n\t///已经冲正次数\n\tTThostFtdcRepealedTimesType\tRepealedTimes;\n\t///银行冲正标志\n\tTThostFtdcBankRepealFlagType\tBankRepealFlag;\n\t///期商冲正标志\n\tTThostFtdcBrokerRepealFlagType\tBrokerRepealFlag;\n\t///被冲正平台流水号\n\tTThostFtdcPlateSerialType\tPlateRepealSerial;\n\t///被冲正银行流水号\n\tTThostFtdcBankSerialType\tBankRepealSerial;\n\t///被冲正期货流水号\n\tTThostFtdcFutureSerialType\tFutureRepealSerial;\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///期货可取金额\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\n\t///费用支付标志\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\n\t///应收客户费用\n\tTThostFtdcCustFeeType\tCustFee;\n\t///应收期货公司费用\n\tTThostFtdcFutureFeeType\tBrokerFee;\n\t///发送方给接收方的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///转账交易状态\n\tTThostFtdcTransferStatusType\tTransferStatus;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///冲正响应\nstruct CThostFtdcRspRepealField\n{\n\t///冲正时间间隔\n\tTThostFtdcRepealTimeIntervalType\tRepealTimeInterval;\n\t///已经冲正次数\n\tTThostFtdcRepealedTimesType\tRepealedTimes;\n\t///银行冲正标志\n\tTThostFtdcBankRepealFlagType\tBankRepealFlag;\n\t///期商冲正标志\n\tTThostFtdcBrokerRepealFlagType\tBrokerRepealFlag;\n\t///被冲正平台流水号\n\tTThostFtdcPlateSerialType\tPlateRepealSerial;\n\t///被冲正银行流水号\n\tTThostFtdcBankSerialType\tBankRepealSerial;\n\t///被冲正期货流水号\n\tTThostFtdcFutureSerialType\tFutureRepealSerial;\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///期货可取金额\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\n\t///费用支付标志\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\n\t///应收客户费用\n\tTThostFtdcCustFeeType\tCustFee;\n\t///应收期货公司费用\n\tTThostFtdcFutureFeeType\tBrokerFee;\n\t///发送方给接收方的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///转账交易状态\n\tTThostFtdcTransferStatusType\tTransferStatus;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///查询账户信息请求\nstruct CThostFtdcReqQueryAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///查询账户信息响应\nstruct CThostFtdcRspQueryAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///银行可用金额\n\tTThostFtdcTradeAmountType\tBankUseAmount;\n\t///银行可取金额\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///期商签到签退\nstruct CThostFtdcFutureSignIOField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n};\n\n///期商签到响应\nstruct CThostFtdcRspFutureSignInField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///PIN密钥\n\tTThostFtdcPasswordKeyType\tPinKey;\n\t///MAC密钥\n\tTThostFtdcPasswordKeyType\tMacKey;\n};\n\n///期商签退请求\nstruct CThostFtdcReqFutureSignOutField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n};\n\n///期商签退响应\nstruct CThostFtdcRspFutureSignOutField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///查询指定流水号的交易结果请求\nstruct CThostFtdcReqQueryTradeResultBySerialField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///流水号\n\tTThostFtdcSerialType\tReference;\n\t///本流水号发布者的机构类型\n\tTThostFtdcInstitutionTypeType\tRefrenceIssureType;\n\t///本流水号发布者机构编码\n\tTThostFtdcOrganCodeType\tRefrenceIssure;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///查询指定流水号的交易结果响应\nstruct CThostFtdcRspQueryTradeResultBySerialField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///流水号\n\tTThostFtdcSerialType\tReference;\n\t///本流水号发布者的机构类型\n\tTThostFtdcInstitutionTypeType\tRefrenceIssureType;\n\t///本流水号发布者机构编码\n\tTThostFtdcOrganCodeType\tRefrenceIssure;\n\t///原始返回代码\n\tTThostFtdcReturnCodeType\tOriginReturnCode;\n\t///原始返回码描述\n\tTThostFtdcDescrInfoForReturnCodeType\tOriginDescrInfoForReturnCode;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n};\n\n///日终文件就绪请求\nstruct CThostFtdcReqDayEndFileReadyField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///文件业务功能\n\tTThostFtdcFileBusinessCodeType\tFileBusinessCode;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n};\n\n///返回结果\nstruct CThostFtdcReturnResultField\n{\n\t///返回代码\n\tTThostFtdcReturnCodeType\tReturnCode;\n\t///返回码描述\n\tTThostFtdcDescrInfoForReturnCodeType\tDescrInfoForReturnCode;\n};\n\n///验证期货资金密码\nstruct CThostFtdcVerifyFuturePasswordField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///验证客户信息\nstruct CThostFtdcVerifyCustInfoField\n{\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///验证期货资金密码和客户信息\nstruct CThostFtdcVerifyFuturePasswordAndCustInfoField\n{\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///验证期货资金密码和客户信息\nstruct CThostFtdcDepositResultInformField\n{\n\t///出入金流水号，该流水号为银期报盘返回的流水号\n\tTThostFtdcDepositSeqNoType\tDepositSeqNo;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///入金金额\n\tTThostFtdcMoneyType\tDeposit;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///返回代码\n\tTThostFtdcReturnCodeType\tReturnCode;\n\t///返回码描述\n\tTThostFtdcDescrInfoForReturnCodeType\tDescrInfoForReturnCode;\n};\n\n///交易核心向银期报盘发出密钥同步请求\nstruct CThostFtdcReqSyncKeyField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///交易核心给银期报盘的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n};\n\n///交易核心向银期报盘发出密钥同步响应\nstruct CThostFtdcRspSyncKeyField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///交易核心给银期报盘的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///查询账户信息通知\nstruct CThostFtdcNotifyQueryAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///银行可用金额\n\tTThostFtdcTradeAmountType\tBankUseAmount;\n\t///银行可取金额\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///银期转账交易流水表\nstruct CThostFtdcTransferSerialField\n{\n\t///平台流水号\n\tTThostFtdcPlateSerialType\tPlateSerial;\n\t///交易发起方日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易日期\n\tTThostFtdcDateType\tTradingDay;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///交易代码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///银行编码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构编码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///期货公司编码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///期货公司帐号类型\n\tTThostFtdcFutureAccTypeType\tFutureAccType;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///交易金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///应收客户费用\n\tTThostFtdcCustFeeType\tCustFee;\n\t///应收期货公司费用\n\tTThostFtdcFutureFeeType\tBrokerFee;\n\t///有效标志\n\tTThostFtdcAvailabilityFlagType\tAvailabilityFlag;\n\t///操作员\n\tTThostFtdcOperatorCodeType\tOperatorCode;\n\t///新银行帐号\n\tTThostFtdcBankAccountType\tBankNewAccount;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///请求查询转帐流水\nstruct CThostFtdcQryTransferSerialField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///银行编码\n\tTThostFtdcBankIDType\tBankID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///期商签到通知\nstruct CThostFtdcNotifyFutureSignInField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///PIN密钥\n\tTThostFtdcPasswordKeyType\tPinKey;\n\t///MAC密钥\n\tTThostFtdcPasswordKeyType\tMacKey;\n};\n\n///期商签退通知\nstruct CThostFtdcNotifyFutureSignOutField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///交易核心向银期报盘发出密钥同步处理结果的通知\nstruct CThostFtdcNotifySyncKeyField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///交易核心给银期报盘的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///请求查询银期签约关系\nstruct CThostFtdcQryAccountregisterField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///银行编码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构编码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///客户开销户信息表\nstruct CThostFtdcAccountregisterField\n{\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDay;\n\t///银行编码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构编码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///期货公司编码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期货公司分支机构编码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///开销户类别\n\tTThostFtdcOpenOrDestroyType\tOpenOrDestroy;\n\t///签约日期\n\tTThostFtdcTradeDateType\tRegDate;\n\t///解约日期\n\tTThostFtdcTradeDateType\tOutDate;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///银期开户信息\nstruct CThostFtdcOpenAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///汇钞标志\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///银期销户信息\nstruct CThostFtdcCancelAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///汇钞标志\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///银期变更银行账号信息\nstruct CThostFtdcChangeAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///新银行帐号\n\tTThostFtdcBankAccountType\tNewBankAccount;\n\t///新银行密码\n\tTThostFtdcPasswordType\tNewBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n};\n\n///二级代理操作员银期权限\nstruct CThostFtdcSecAgentACIDMapField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///资金账户\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///境外中介机构资金帐号\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\n};\n\n///二级代理操作员银期权限查询\nstruct CThostFtdcQrySecAgentACIDMapField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///资金账户\n\tTThostFtdcAccountIDType\tAccountID;\n\t///币种\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///灾备中心交易权限\nstruct CThostFtdcUserRightsAssignField\n{\n\t///应用单元代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n};\n\n///经济公司是否有在本标示的交易权限\nstruct CThostFtdcBrokerUserRightAssignField\n{\n\t///应用单元代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///能否交易\n\tTThostFtdcBoolType\tTradeable;\n};\n\n///灾备交易转换报文\nstruct CThostFtdcDRTransferField\n{\n\t///原交易中心代码\n\tTThostFtdcDRIdentityIDType\tOrigDRIdentityID;\n\t///目标交易中心代码\n\tTThostFtdcDRIdentityIDType\tDestDRIdentityID;\n\t///原应用单元代码\n\tTThostFtdcBrokerIDType\tOrigBrokerID;\n\t///目标易用单元代码\n\tTThostFtdcBrokerIDType\tDestBrokerID;\n};\n\n///Fens用户信息\nstruct CThostFtdcFensUserInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///登录模式\n\tTThostFtdcLoginModeType\tLoginMode;\n};\n\n///当前银期所属交易中心\nstruct CThostFtdcCurrTransferIdentityField\n{\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tIdentityID;\n};\n\n///禁止登录用户\nstruct CThostFtdcLoginForbiddenUserField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询禁止登录用户\nstruct CThostFtdcQryLoginForbiddenUserField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///资金账户基本准备金\nstruct CThostFtdcTradingAccountReserveField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///基本准备金\n\tTThostFtdcMoneyType\tReserve;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///查询禁止登录IP\nstruct CThostFtdcQryLoginForbiddenIPField\n{\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询IP列表\nstruct CThostFtdcQryIPListField\n{\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询用户下单权限分配表\nstruct CThostFtdcQryUserRightsAssignField\n{\n\t///应用单元代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///银期预约开户确认请求\nstruct CThostFtdcReserveOpenAccountConfirmField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcLongIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///预约开户银行流水号\n\tTThostFtdcBankSerialType\tBankReserveOpenSeq;\n\t///预约开户日期\n\tTThostFtdcTradeDateType\tBookDate;\n\t///预约开户验证密码\n\tTThostFtdcPasswordType\tBookPsw;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///银期预约开户\nstruct CThostFtdcReserveOpenAccountField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcLongIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///性别\n\tTThostFtdcGenderType\tGender;\n\t///国家代码\n\tTThostFtdcCountryCodeType\tCountryCode;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///地址\n\tTThostFtdcAddressType\tAddress;\n\t///邮编\n\tTThostFtdcZipCodeType\tZipCode;\n\t///电话号码\n\tTThostFtdcTelephoneType\tTelephone;\n\t///手机\n\tTThostFtdcMobilePhoneType\tMobilePhone;\n\t///传真\n\tTThostFtdcFaxType\tFax;\n\t///电子邮件\n\tTThostFtdcEMailType\tEMail;\n\t///资金账户状态\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///预约开户状态\n\tTThostFtdcReserveOpenAccStasType\tReserveOpenAccStas;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n};\n\n///银行账户属性\nstruct CThostFtdcAccountPropertyField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///银行统一标识类型\n\tTThostFtdcBankIDType\tBankID;\n\t///银行账户\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行账户的开户人名称\n\tTThostFtdcInvestorFullNameType\tOpenName;\n\t///银行账户的开户行\n\tTThostFtdcOpenBankType\tOpenBank;\n\t///是否活跃\n\tTThostFtdcBoolType\tIsActive;\n\t///账户来源\n\tTThostFtdcAccountSourceTypeType\tAccountSourceType;\n\t///开户日期\n\tTThostFtdcDateType\tOpenDate;\n\t///注销日期\n\tTThostFtdcDateType\tCancelDate;\n\t///录入员代码\n\tTThostFtdcOperatorIDType\tOperatorID;\n\t///录入日期\n\tTThostFtdcDateType\tOperateDate;\n\t///录入时间\n\tTThostFtdcTimeType\tOperateTime;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n};\n\n///查询当前交易中心\nstruct CThostFtdcQryCurrDRIdentityField\n{\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n};\n\n///当前交易中心\nstruct CThostFtdcCurrDRIdentityField\n{\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n};\n\n///查询二级代理商资金校验模式\nstruct CThostFtdcQrySecAgentCheckModeField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///查询二级代理商信息\nstruct CThostFtdcQrySecAgentTradeInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///境外中介机构资金帐号\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\n};\n\n///用户发出获取安全安全登陆方法请求\nstruct CThostFtdcReqUserAuthMethodField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///用户发出获取安全安全登陆方法回复\nstruct CThostFtdcRspUserAuthMethodField\n{\n\t///当前可以用的认证模式\n\tTThostFtdcCurrentAuthMethodType\tUsableAuthMethod;\n};\n\n///用户发出获取安全安全登陆方法请求\nstruct CThostFtdcReqGenUserCaptchaField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///生成的图片验证码信息\nstruct CThostFtdcRspGenUserCaptchaField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///图片信息长度\n\tTThostFtdcCaptchaInfoLenType\tCaptchaInfoLen;\n\t///图片信息\n\tTThostFtdcCaptchaInfoType\tCaptchaInfo;\n};\n\n///用户发出获取安全安全登陆方法请求\nstruct CThostFtdcReqGenUserTextField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///短信验证码生成的回复\nstruct CThostFtdcRspGenUserTextField\n{\n\t///短信验证码序号\n\tTThostFtdcUserTextSeqType\tUserTextSeq;\n};\n\n///用户发出带图形验证码的登录请求请求\nstruct CThostFtdcReqUserLoginWithCaptchaField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///接口端产品信息\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\n\t///协议信息\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///登录备注\n\tTThostFtdcLoginRemarkType\tLoginRemark;\n\t///图形验证码的文字内容\n\tTThostFtdcPasswordType\tCaptcha;\n\t///终端IP端口\n\tTThostFtdcIPPortType\tClientIPPort;\n\t///终端IP地址\n\tTThostFtdcIPAddressType\tClientIPAddress;\n};\n\n///用户发出带短信验证码的登录请求请求\nstruct CThostFtdcReqUserLoginWithTextField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///接口端产品信息\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\n\t///协议信息\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///登录备注\n\tTThostFtdcLoginRemarkType\tLoginRemark;\n\t///短信验证码文字内容\n\tTThostFtdcPasswordType\tText;\n\t///终端IP端口\n\tTThostFtdcIPPortType\tClientIPPort;\n\t///终端IP地址\n\tTThostFtdcIPAddressType\tClientIPAddress;\n};\n\n///用户发出带动态验证码的登录请求请求\nstruct CThostFtdcReqUserLoginWithOTPField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///接口端产品信息\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\n\t///协议信息\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///登录备注\n\tTThostFtdcLoginRemarkType\tLoginRemark;\n\t///OTP密码\n\tTThostFtdcPasswordType\tOTPPassword;\n\t///终端IP端口\n\tTThostFtdcIPPortType\tClientIPPort;\n\t///终端IP地址\n\tTThostFtdcIPAddressType\tClientIPAddress;\n};\n\n///api握手请求\nstruct CThostFtdcReqApiHandshakeField\n{\n\t///api与front通信密钥版本号\n\tTThostFtdcCryptoKeyVersionType\tCryptoKeyVersion;\n};\n\n///front发给api的握手回复\nstruct CThostFtdcRspApiHandshakeField\n{\n\t///握手回复数据长度\n\tTThostFtdcHandshakeDataLenType\tFrontHandshakeDataLen;\n\t///握手回复数据\n\tTThostFtdcHandshakeDataType\tFrontHandshakeData;\n\t///API认证是否开启\n\tTThostFtdcBoolType\tIsApiAuthEnabled;\n};\n\n///api给front的验证key的请求\nstruct CThostFtdcReqVerifyApiKeyField\n{\n\t///握手回复数据长度\n\tTThostFtdcHandshakeDataLenType\tApiHandshakeDataLen;\n\t///握手回复数据\n\tTThostFtdcHandshakeDataType\tApiHandshakeData;\n};\n\n///操作员组织架构关系\nstruct CThostFtdcDepartmentUserField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///投资者范围\n\tTThostFtdcDepartmentRangeType\tInvestorRange;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///查询频率，每秒查询比数\nstruct CThostFtdcQueryFreqField\n{\n\t///查询频率\n\tTThostFtdcQueryFreqType\tQueryFreq;\n\t///FTD频率\n\tTThostFtdcQueryFreqType\tFTDPkgFreq;\n};\n\n///禁止认证IP\nstruct CThostFtdcAuthForbiddenIPField\n{\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询禁止认证IP\nstruct CThostFtdcQryAuthForbiddenIPField\n{\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///换汇可提冻结\nstruct CThostFtdcSyncDelaySwapFrozenField\n{\n\t///换汇流水号\n\tTThostFtdcDepositSeqNoType\tDelaySwapSeqNo;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///源币种\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\n\t///源剩余换汇额度(可提冻结)\n\tTThostFtdcMoneyType\tFromRemainSwap;\n\t///是否手工换汇\n\tTThostFtdcBoolType\tIsManualSwap;\n};\n\n///用户系统信息\nstruct CThostFtdcUserSystemInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///用户端系统内部信息长度\n\tTThostFtdcSystemInfoLenType\tClientSystemInfoLen;\n\t///用户端系统内部信息\n\tTThostFtdcClientSystemInfoType\tClientSystemInfo;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///终端IP端口\n\tTThostFtdcIPPortType\tClientIPPort;\n\t///登录成功时间\n\tTThostFtdcTimeType\tClientLoginTime;\n\t///App代码\n\tTThostFtdcAppIDType\tClientAppID;\n\t///用户公网IP\n\tTThostFtdcIPAddressType\tClientPublicIP;\n\t///客户登录备注2\n\tTThostFtdcClientLoginRemarkType\tClientLoginRemark;\n};\n\n///终端用户绑定信息\nstruct CThostFtdcAuthUserIDField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///校验类型\n\tTThostFtdcAuthTypeType\tAuthType;\n};\n\n///用户IP绑定信息\nstruct CThostFtdcAuthIPField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n\t///用户代码\n\tTThostFtdcIPAddressType\tIPAddress;\n};\n\n///查询分类合约\nstruct CThostFtdcQryClassifiedInstrumentField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///合约交易状态\n\tTThostFtdcTradingTypeType\tTradingType;\n\t///合约分类类型\n\tTThostFtdcClassTypeType\tClassType;\n};\n\n///查询组合优惠比例\nstruct CThostFtdcQryCombPromotionParamField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///组合优惠比例\nstruct CThostFtdcCombPromotionParamField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投机套保标志\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\n\t///期权组合保证金比例\n\tTThostFtdcDiscountRatioType\tXparameter;\n};\n\n///国密用户登录请求\nstruct CThostFtdcReqUserLoginSMField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///密码\n\tTThostFtdcPasswordType\tPassword;\n\t///用户端产品信息\n\tTThostFtdcProductInfoType\tUserProductInfo;\n\t///接口端产品信息\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\n\t///协议信息\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///动态密码\n\tTThostFtdcPasswordType\tOneTimePassword;\n\t///保留的无效字段\n\tTThostFtdcOldIPAddressType\treserve1;\n\t///登录备注\n\tTThostFtdcLoginRemarkType\tLoginRemark;\n\t///终端IP端口\n\tTThostFtdcIPPortType\tClientIPPort;\n\t///终端IP地址\n\tTThostFtdcIPAddressType\tClientIPAddress;\n\t///经纪公司名称\n\tTThostFtdcBrokerNameType\tBrokerName;\n\t///认证码\n\tTThostFtdcAuthCodeType\tAuthCode;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n\t///PIN码\n\tTThostFtdcPasswordType\tPIN;\n};\n\n///投资者风险结算持仓查询\nstruct CThostFtdcQryRiskSettleInvstPositionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///风险结算产品查询\nstruct CThostFtdcQryRiskSettleProductStatusField\n{\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n};\n\n///投资者风险结算持仓\nstruct CThostFtdcRiskSettleInvstPositionField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///持仓多空方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///持仓日期\n\tTThostFtdcPositionDateType\tPositionDate;\n\t///上日持仓\n\tTThostFtdcVolumeType\tYdPosition;\n\t///今日持仓\n\tTThostFtdcVolumeType\tPosition;\n\t///多头冻结\n\tTThostFtdcVolumeType\tLongFrozen;\n\t///空头冻结\n\tTThostFtdcVolumeType\tShortFrozen;\n\t///开仓冻结金额\n\tTThostFtdcMoneyType\tLongFrozenAmount;\n\t///开仓冻结金额\n\tTThostFtdcMoneyType\tShortFrozenAmount;\n\t///开仓量\n\tTThostFtdcVolumeType\tOpenVolume;\n\t///平仓量\n\tTThostFtdcVolumeType\tCloseVolume;\n\t///开仓金额\n\tTThostFtdcMoneyType\tOpenAmount;\n\t///平仓金额\n\tTThostFtdcMoneyType\tCloseAmount;\n\t///持仓成本\n\tTThostFtdcMoneyType\tPositionCost;\n\t///上次占用的保证金\n\tTThostFtdcMoneyType\tPreMargin;\n\t///占用的保证金\n\tTThostFtdcMoneyType\tUseMargin;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfit;\n\t///上次结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///本次结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///开仓成本\n\tTThostFtdcMoneyType\tOpenCost;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchangeMargin;\n\t///组合成交形成的持仓\n\tTThostFtdcVolumeType\tCombPosition;\n\t///组合多头冻结\n\tTThostFtdcVolumeType\tCombLongFrozen;\n\t///组合空头冻结\n\tTThostFtdcVolumeType\tCombShortFrozen;\n\t///逐日盯市平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByDate;\n\t///逐笔对冲平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\n\t///今日持仓\n\tTThostFtdcVolumeType\tTodayPosition;\n\t///保证金率\n\tTThostFtdcRatioType\tMarginRateByMoney;\n\t///保证金率(按手数)\n\tTThostFtdcRatioType\tMarginRateByVolume;\n\t///执行冻结\n\tTThostFtdcVolumeType\tStrikeFrozen;\n\t///执行冻结金额\n\tTThostFtdcMoneyType\tStrikeFrozenAmount;\n\t///放弃执行冻结\n\tTThostFtdcVolumeType\tAbandonFrozen;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///执行冻结的昨仓\n\tTThostFtdcVolumeType\tYdStrikeFrozen;\n\t///投资单元代码\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\n\t///持仓成本差值\n\tTThostFtdcMoneyType\tPositionCostOffset;\n\t///tas持仓手数\n\tTThostFtdcVolumeType\tTasPosition;\n\t///tas持仓成本\n\tTThostFtdcMoneyType\tTasPositionCost;\n};\n\n///风险品种\nstruct CThostFtdcRiskSettleProductStatusField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品编号\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///产品结算状态\n\tTThostFtdcProductStatusType\tProductStatus;\n};\n\n///风险结算追平信息\nstruct CThostFtdcSyncDeltaInfoField\n{\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n\t///追平状态\n\tTThostFtdcSyncDeltaStatusType\tSyncDeltaStatus;\n\t///追平描述\n\tTThostFtdcSyncDescriptionType\tSyncDescription;\n\t///是否只有资金追平\n\tTThostFtdcBoolType\tIsOnlyTrdDelta;\n};\n\n///风险结算追平产品信息\nstruct CThostFtdcSyncDeltaProductStatusField\n{\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///是否允许交易\n\tTThostFtdcProductStatusType\tProductStatus;\n};\n\n///风险结算追平持仓明细\nstruct CThostFtdcSyncDeltaInvstPosDtlField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///买卖\n\tTThostFtdcDirectionType\tDirection;\n\t///开仓日期\n\tTThostFtdcDateType\tOpenDate;\n\t///成交编号\n\tTThostFtdcTradeIDType\tTradeID;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///开仓价\n\tTThostFtdcPriceType\tOpenPrice;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///成交类型\n\tTThostFtdcTradeTypeType\tTradeType;\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///逐日盯市平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByDate;\n\t///逐笔对冲平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\n\t///逐日盯市持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfitByDate;\n\t///逐笔对冲持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfitByTrade;\n\t///投资者保证金\n\tTThostFtdcMoneyType\tMargin;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///保证金率\n\tTThostFtdcRatioType\tMarginRateByMoney;\n\t///保证金率(按手数)\n\tTThostFtdcRatioType\tMarginRateByVolume;\n\t///昨结算价\n\tTThostFtdcPriceType\tLastSettlementPrice;\n\t///结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///平仓量\n\tTThostFtdcVolumeType\tCloseVolume;\n\t///平仓金额\n\tTThostFtdcMoneyType\tCloseAmount;\n\t///先开先平剩余数量\n\tTThostFtdcVolumeType\tTimeFirstVolume;\n\t///特殊持仓标志\n\tTThostFtdcSpecPosiTypeType\tSpecPosiType;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平组合持仓明细\nstruct CThostFtdcSyncDeltaInvstPosCombDtlField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///开仓日期\n\tTThostFtdcDateType\tOpenDate;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///组合编号\n\tTThostFtdcTradeIDType\tComTradeID;\n\t///撮合编号\n\tTThostFtdcTradeIDType\tTradeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///买卖\n\tTThostFtdcDirectionType\tDirection;\n\t///持仓量\n\tTThostFtdcVolumeType\tTotalAmt;\n\t///投资者保证金\n\tTThostFtdcMoneyType\tMargin;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///保证金率\n\tTThostFtdcRatioType\tMarginRateByMoney;\n\t///保证金率(按手数)\n\tTThostFtdcRatioType\tMarginRateByVolume;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///单腿乘数\n\tTThostFtdcLegMultipleType\tLegMultiple;\n\t///成交组号\n\tTThostFtdcTradeGroupIDType\tTradeGroupID;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平资金\nstruct CThostFtdcSyncDeltaTradingAccountField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///上次质押金额\n\tTThostFtdcMoneyType\tPreMortgage;\n\t///上次信用额度\n\tTThostFtdcMoneyType\tPreCredit;\n\t///上次存款额\n\tTThostFtdcMoneyType\tPreDeposit;\n\t///上次结算准备金\n\tTThostFtdcMoneyType\tPreBalance;\n\t///上次占用的保证金\n\tTThostFtdcMoneyType\tPreMargin;\n\t///利息基数\n\tTThostFtdcMoneyType\tInterestBase;\n\t///利息收入\n\tTThostFtdcMoneyType\tInterest;\n\t///入金金额\n\tTThostFtdcMoneyType\tDeposit;\n\t///出金金额\n\tTThostFtdcMoneyType\tWithdraw;\n\t///冻结的保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///当前保证金总额\n\tTThostFtdcMoneyType\tCurrMargin;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///平仓盈亏\n\tTThostFtdcMoneyType\tCloseProfit;\n\t///持仓盈亏\n\tTThostFtdcMoneyType\tPositionProfit;\n\t///期货结算准备金\n\tTThostFtdcMoneyType\tBalance;\n\t///可用资金\n\tTThostFtdcMoneyType\tAvailable;\n\t///可取资金\n\tTThostFtdcMoneyType\tWithdrawQuota;\n\t///基本准备金\n\tTThostFtdcMoneyType\tReserve;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///信用额度\n\tTThostFtdcMoneyType\tCredit;\n\t///质押金额\n\tTThostFtdcMoneyType\tMortgage;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchangeMargin;\n\t///投资者交割保证金\n\tTThostFtdcMoneyType\tDeliveryMargin;\n\t///交易所交割保证金\n\tTThostFtdcMoneyType\tExchangeDeliveryMargin;\n\t///保底期货结算准备金\n\tTThostFtdcMoneyType\tReserveBalance;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///上次货币质入金额\n\tTThostFtdcMoneyType\tPreFundMortgageIn;\n\t///上次货币质出金额\n\tTThostFtdcMoneyType\tPreFundMortgageOut;\n\t///货币质入金额\n\tTThostFtdcMoneyType\tFundMortgageIn;\n\t///货币质出金额\n\tTThostFtdcMoneyType\tFundMortgageOut;\n\t///货币质押余额\n\tTThostFtdcMoneyType\tFundMortgageAvailable;\n\t///可质押货币金额\n\tTThostFtdcMoneyType\tMortgageableFund;\n\t///特殊产品占用保证金\n\tTThostFtdcMoneyType\tSpecProductMargin;\n\t///特殊产品冻结保证金\n\tTThostFtdcMoneyType\tSpecProductFrozenMargin;\n\t///特殊产品手续费\n\tTThostFtdcMoneyType\tSpecProductCommission;\n\t///特殊产品冻结手续费\n\tTThostFtdcMoneyType\tSpecProductFrozenCommission;\n\t///特殊产品持仓盈亏\n\tTThostFtdcMoneyType\tSpecProductPositionProfit;\n\t///特殊产品平仓盈亏\n\tTThostFtdcMoneyType\tSpecProductCloseProfit;\n\t///根据持仓盈亏算法计算的特殊产品持仓盈亏\n\tTThostFtdcMoneyType\tSpecProductPositionProfitByAlg;\n\t///特殊产品交易所保证金\n\tTThostFtdcMoneyType\tSpecProductExchangeMargin;\n\t///延时换汇冻结金额\n\tTThostFtdcMoneyType\tFrozenSwap;\n\t///剩余换汇额度\n\tTThostFtdcMoneyType\tRemainSwap;\n\t///期权市值\n\tTThostFtdcMoneyType\tOptionValue;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///投资者风险结算总保证金\nstruct CThostFtdcSyncDeltaInitInvstMarginField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///追平前总风险保证金\n\tTThostFtdcMoneyType\tLastRiskTotalInvstMargin;\n\t///追平前交易所总风险保证金\n\tTThostFtdcMoneyType\tLastRiskTotalExchMargin;\n\t///本次追平品种总保证金\n\tTThostFtdcMoneyType\tThisSyncInvstMargin;\n\t///本次追平品种交易所总保证金\n\tTThostFtdcMoneyType\tThisSyncExchMargin;\n\t///本次未追平品种总保证金\n\tTThostFtdcMoneyType\tRemainRiskInvstMargin;\n\t///本次未追平品种交易所总保证金\n\tTThostFtdcMoneyType\tRemainRiskExchMargin;\n\t///追平前总特殊产品风险保证金\n\tTThostFtdcMoneyType\tLastRiskSpecTotalInvstMargin;\n\t///追平前总特殊产品交易所风险保证金\n\tTThostFtdcMoneyType\tLastRiskSpecTotalExchMargin;\n\t///本次追平品种特殊产品总保证金\n\tTThostFtdcMoneyType\tThisSyncSpecInvstMargin;\n\t///本次追平品种特殊产品交易所总保证金\n\tTThostFtdcMoneyType\tThisSyncSpecExchMargin;\n\t///本次未追平品种特殊产品总保证金\n\tTThostFtdcMoneyType\tRemainRiskSpecInvstMargin;\n\t///本次未追平品种特殊产品交易所总保证金\n\tTThostFtdcMoneyType\tRemainRiskSpecExchMargin;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平组合优先级\nstruct CThostFtdcSyncDeltaDceCombInstrumentField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///成交组号\n\tTThostFtdcTradeGroupIDType\tTradeGroupID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tCombHedgeFlag;\n\t///组合类型\n\tTThostFtdcDceCombinationTypeType\tCombinationType;\n\t///买卖\n\tTThostFtdcDirectionType\tDirection;\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///期权组合保证金比例\n\tTThostFtdcDiscountRatioType\tXparameter;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平投资者期货保证金率\nstruct CThostFtdcSyncDeltaInvstMarginRateField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///是否相对交易所收取\n\tTThostFtdcBoolType\tIsRelative;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平交易所期货保证金率\nstruct CThostFtdcSyncDeltaExchMarginRateField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平中金现货期权交易所保证金率\nstruct CThostFtdcSyncDeltaOptExchMarginField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投机空头保证金调整系数\n\tTThostFtdcRatioType\tSShortMarginRatioByMoney;\n\t///投机空头保证金调整系数\n\tTThostFtdcMoneyType\tSShortMarginRatioByVolume;\n\t///保值空头保证金调整系数\n\tTThostFtdcRatioType\tHShortMarginRatioByMoney;\n\t///保值空头保证金调整系数\n\tTThostFtdcMoneyType\tHShortMarginRatioByVolume;\n\t///套利空头保证金调整系数\n\tTThostFtdcRatioType\tAShortMarginRatioByMoney;\n\t///套利空头保证金调整系数\n\tTThostFtdcMoneyType\tAShortMarginRatioByVolume;\n\t///做市商空头保证金调整系数\n\tTThostFtdcRatioType\tMShortMarginRatioByMoney;\n\t///做市商空头保证金调整系数\n\tTThostFtdcMoneyType\tMShortMarginRatioByVolume;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平中金现货期权投资者保证金率\nstruct CThostFtdcSyncDeltaOptInvstMarginField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机空头保证金调整系数\n\tTThostFtdcRatioType\tSShortMarginRatioByMoney;\n\t///投机空头保证金调整系数\n\tTThostFtdcMoneyType\tSShortMarginRatioByVolume;\n\t///保值空头保证金调整系数\n\tTThostFtdcRatioType\tHShortMarginRatioByMoney;\n\t///保值空头保证金调整系数\n\tTThostFtdcMoneyType\tHShortMarginRatioByVolume;\n\t///套利空头保证金调整系数\n\tTThostFtdcRatioType\tAShortMarginRatioByMoney;\n\t///套利空头保证金调整系数\n\tTThostFtdcMoneyType\tAShortMarginRatioByVolume;\n\t///是否跟随交易所收取\n\tTThostFtdcBoolType\tIsRelative;\n\t///做市商空头保证金调整系数\n\tTThostFtdcRatioType\tMShortMarginRatioByMoney;\n\t///做市商空头保证金调整系数\n\tTThostFtdcMoneyType\tMShortMarginRatioByVolume;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平期权标的调整保证金率\nstruct CThostFtdcSyncDeltaInvstMarginRateULField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///多头保证金率\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\n\t///多头保证金费\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\n\t///空头保证金率\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\n\t///空头保证金费\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平期权手续费率\nstruct CThostFtdcSyncDeltaOptInvstCommRateField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///开仓手续费率\n\tTThostFtdcRatioType\tOpenRatioByMoney;\n\t///开仓手续费\n\tTThostFtdcRatioType\tOpenRatioByVolume;\n\t///平仓手续费率\n\tTThostFtdcRatioType\tCloseRatioByMoney;\n\t///平仓手续费\n\tTThostFtdcRatioType\tCloseRatioByVolume;\n\t///平今手续费率\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\n\t///平今手续费\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\n\t///执行手续费率\n\tTThostFtdcRatioType\tStrikeRatioByMoney;\n\t///执行手续费\n\tTThostFtdcRatioType\tStrikeRatioByVolume;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平期货手续费率\nstruct CThostFtdcSyncDeltaInvstCommRateField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///开仓手续费率\n\tTThostFtdcRatioType\tOpenRatioByMoney;\n\t///开仓手续费\n\tTThostFtdcRatioType\tOpenRatioByVolume;\n\t///平仓手续费率\n\tTThostFtdcRatioType\tCloseRatioByMoney;\n\t///平仓手续费\n\tTThostFtdcRatioType\tCloseRatioByVolume;\n\t///平今手续费率\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\n\t///平今手续费\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平交叉汇率\nstruct CThostFtdcSyncDeltaProductExchRateField\n{\n\t///产品代码\n\tTThostFtdcInstrumentIDType\tProductID;\n\t///报价币种类型\n\tTThostFtdcCurrencyIDType\tQuoteCurrencyID;\n\t///汇率\n\tTThostFtdcExchangeRateType\tExchangeRate;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平行情\nstruct CThostFtdcSyncDeltaDepthMarketDataField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约在交易所的代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///最新价\n\tTThostFtdcPriceType\tLastPrice;\n\t///上次结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///昨收盘\n\tTThostFtdcPriceType\tPreClosePrice;\n\t///昨持仓量\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\n\t///今开盘\n\tTThostFtdcPriceType\tOpenPrice;\n\t///最高价\n\tTThostFtdcPriceType\tHighestPrice;\n\t///最低价\n\tTThostFtdcPriceType\tLowestPrice;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///成交金额\n\tTThostFtdcMoneyType\tTurnover;\n\t///持仓量\n\tTThostFtdcLargeVolumeType\tOpenInterest;\n\t///今收盘\n\tTThostFtdcPriceType\tClosePrice;\n\t///本次结算价\n\tTThostFtdcPriceType\tSettlementPrice;\n\t///涨停板价\n\tTThostFtdcPriceType\tUpperLimitPrice;\n\t///跌停板价\n\tTThostFtdcPriceType\tLowerLimitPrice;\n\t///昨虚实度\n\tTThostFtdcRatioType\tPreDelta;\n\t///今虚实度\n\tTThostFtdcRatioType\tCurrDelta;\n\t///最后修改时间\n\tTThostFtdcTimeType\tUpdateTime;\n\t///最后修改毫秒\n\tTThostFtdcMillisecType\tUpdateMillisec;\n\t///申买价一\n\tTThostFtdcPriceType\tBidPrice1;\n\t///申买量一\n\tTThostFtdcVolumeType\tBidVolume1;\n\t///申卖价一\n\tTThostFtdcPriceType\tAskPrice1;\n\t///申卖量一\n\tTThostFtdcVolumeType\tAskVolume1;\n\t///申买价二\n\tTThostFtdcPriceType\tBidPrice2;\n\t///申买量二\n\tTThostFtdcVolumeType\tBidVolume2;\n\t///申卖价二\n\tTThostFtdcPriceType\tAskPrice2;\n\t///申卖量二\n\tTThostFtdcVolumeType\tAskVolume2;\n\t///申买价三\n\tTThostFtdcPriceType\tBidPrice3;\n\t///申买量三\n\tTThostFtdcVolumeType\tBidVolume3;\n\t///申卖价三\n\tTThostFtdcPriceType\tAskPrice3;\n\t///申卖量三\n\tTThostFtdcVolumeType\tAskVolume3;\n\t///申买价四\n\tTThostFtdcPriceType\tBidPrice4;\n\t///申买量四\n\tTThostFtdcVolumeType\tBidVolume4;\n\t///申卖价四\n\tTThostFtdcPriceType\tAskPrice4;\n\t///申卖量四\n\tTThostFtdcVolumeType\tAskVolume4;\n\t///申买价五\n\tTThostFtdcPriceType\tBidPrice5;\n\t///申买量五\n\tTThostFtdcVolumeType\tBidVolume5;\n\t///申卖价五\n\tTThostFtdcPriceType\tAskPrice5;\n\t///申卖量五\n\tTThostFtdcVolumeType\tAskVolume5;\n\t///当日均价\n\tTThostFtdcPriceType\tAveragePrice;\n\t///业务日期\n\tTThostFtdcDateType\tActionDay;\n\t///上带价\n\tTThostFtdcPriceType\tBandingUpperPrice;\n\t///下带价\n\tTThostFtdcPriceType\tBandingLowerPrice;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平现货指数\nstruct CThostFtdcSyncDeltaIndexPriceField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///指数现货收盘价\n\tTThostFtdcPriceType\tClosePrice;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平仓单折抵\nstruct CThostFtdcSyncDeltaEWarrantOffsetField\n{\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradingDay;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///数量\n\tTThostFtdcVolumeType\tVolume;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///SPBM期货合约保证金参数\nstruct CThostFtdcSPBMFutureParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///期货合约因子\n\tTThostFtdcVolumeMultipleType\tCvf;\n\t///阶段标识\n\tTThostFtdcTimeRangeType\tTimeRange;\n\t///品种保证金标准\n\tTThostFtdcRatioType\tMarginRate;\n\t///期货合约内部对锁仓费率折扣比例\n\tTThostFtdcRatioType\tLockRateX;\n\t///提高保证金标准\n\tTThostFtdcRatioType\tAddOnRate;\n\t///昨结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///期货合约内部对锁仓附加费率折扣比例\n\tTThostFtdcRatioType\tAddOnLockRateX2;\n};\n\n///SPBM期权合约保证金参数\nstruct CThostFtdcSPBMOptionParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///期权合约因子\n\tTThostFtdcVolumeMultipleType\tCvf;\n\t///期权冲抵价格\n\tTThostFtdcPriceType\tDownPrice;\n\t///Delta值\n\tTThostFtdcDeltaType\tDelta;\n\t///卖方期权风险转换最低值\n\tTThostFtdcDeltaType\tSlimiDelta;\n\t///昨结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n};\n\n///SPBM品种内对锁仓折扣参数\nstruct CThostFtdcSPBMIntraParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///品种内合约间对锁仓费率折扣比例\n\tTThostFtdcRatioType\tIntraRateY;\n\t///品种内合约间对锁仓附加费率折扣比例\n\tTThostFtdcRatioType\tAddOnIntraRateY2;\n};\n\n///SPBM跨品种抵扣参数\nstruct CThostFtdcSPBMInterParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///优先级\n\tTThostFtdcSpreadIdType\tSpreadId;\n\t///品种间对锁仓费率折扣比例\n\tTThostFtdcRatioType\tInterRateZ;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n};\n\n///同步SPBM参数结束\nstruct CThostFtdcSyncSPBMParameterEndField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n};\n\n///SPBM期货合约保证金参数查询\nstruct CThostFtdcQrySPBMFutureParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n};\n\n///SPBM期权合约保证金参数查询\nstruct CThostFtdcQrySPBMOptionParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n};\n\n///SPBM品种内对锁仓折扣参数查询\nstruct CThostFtdcQrySPBMIntraParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n};\n\n///SPBM跨品种抵扣参数查询\nstruct CThostFtdcQrySPBMInterParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n};\n\n///组合保证金套餐\nstruct CThostFtdcSPBMPortfDefinitionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///组合保证金套餐代码\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///是否启用SPBM\n\tTThostFtdcBoolType\tIsSPBM;\n};\n\n///投资者套餐选择\nstruct CThostFtdcSPBMInvestorPortfDefField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///组合保证金套餐代码\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\n};\n\n///投资者新型组合保证金系数\nstruct CThostFtdcInvestorPortfMarginRatioField\n{\n\t///投资者范围\n\tTThostFtdcInvestorRangeType\tInvestorRange;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///会员对投资者收取的保证金和交易所对投资者收取的保证金的比例\n\tTThostFtdcRatioType\tMarginRatio;\n\t///产品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n};\n\n///组合保证金套餐查询\nstruct CThostFtdcQrySPBMPortfDefinitionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///组合保证金套餐代码\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n};\n\n///投资者套餐选择查询\nstruct CThostFtdcQrySPBMInvestorPortfDefField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///投资者新型组合保证金系数查询\nstruct CThostFtdcQryInvestorPortfMarginRatioField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n};\n\n///投资者产品SPBM明细\nstruct CThostFtdcInvestorProdSPBMDetailField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///合约内对锁保证金\n\tTThostFtdcMoneyType\tIntraInstrMargin;\n\t///买归集保证金\n\tTThostFtdcMoneyType\tBCollectingMargin;\n\t///卖归集保证金\n\tTThostFtdcMoneyType\tSCollectingMargin;\n\t///品种内合约间对锁保证金\n\tTThostFtdcMoneyType\tIntraProdMargin;\n\t///净保证金\n\tTThostFtdcMoneyType\tNetMargin;\n\t///产品间对锁保证金\n\tTThostFtdcMoneyType\tInterProdMargin;\n\t///裸保证金\n\tTThostFtdcMoneyType\tSingleMargin;\n\t///附加保证金\n\tTThostFtdcMoneyType\tAddOnMargin;\n\t///交割月保证金\n\tTThostFtdcMoneyType\tDeliveryMargin;\n\t///看涨期权最低风险\n\tTThostFtdcMoneyType\tCallOptionMinRisk;\n\t///看跌期权最低风险\n\tTThostFtdcMoneyType\tPutOptionMinRisk;\n\t///卖方期权最低风险\n\tTThostFtdcMoneyType\tOptionMinRisk;\n\t///买方期权冲抵价值\n\tTThostFtdcMoneyType\tOptionValueOffset;\n\t///卖方期权权利金\n\tTThostFtdcMoneyType\tOptionRoyalty;\n\t///价值冲抵\n\tTThostFtdcMoneyType\tRealOptionValueOffset;\n\t///保证金\n\tTThostFtdcMoneyType\tMargin;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n};\n\n///投资者产品SPBM明细查询\nstruct CThostFtdcQryInvestorProdSPBMDetailField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n};\n\n///组保交易参数设置\nstruct CThostFtdcPortfTradeParamSettingField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///新型组保算法\n\tTThostFtdcPortfolioType\tPortfolio;\n\t///撤单是否验资\n\tTThostFtdcBoolType\tIsActionVerify;\n\t///平仓是否验资\n\tTThostFtdcBoolType\tIsCloseVerify;\n};\n\n///投资者交易权限设置\nstruct CThostFtdcInvestorTradingRightField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///交易权限\n\tTThostFtdcInvstTradingRightType\tInvstTradingRight;\n};\n\n///质押配比参数\nstruct CThostFtdcMortgageParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///质押配比系数\n\tTThostFtdcRatioType\tMortgageBalance;\n\t///开仓是否验证质押配比\n\tTThostFtdcBoolType\tCheckMortgageRatio;\n};\n\n///可提控制参数\nstruct CThostFtdcWithDrawParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///参数代码\n\tTThostFtdcWithDrawParamIDType\tWithDrawParamID;\n\t///参数代码值\n\tTThostFtdcWithDrawParamValueType\tWithDrawParamValue;\n};\n\n///Thost终端用户功能权限\nstruct CThostFtdcThostUserFunctionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///Thost终端功能代码\n\tTThostFtdcThostFunctionCodeType\tThostFunctionCode;\n};\n\n///Thost终端用户功能权限查询\nstruct CThostFtdcQryThostUserFunctionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///SPBM附加跨品种抵扣参数\nstruct CThostFtdcSPBMAddOnInterParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///优先级\n\tTThostFtdcSpreadIdType\tSpreadId;\n\t///品种间对锁仓附加费率折扣比例\n\tTThostFtdcRatioType\tAddOnInterRateZ2;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n};\n\n///SPBM附加跨品种抵扣参数查询\nstruct CThostFtdcQrySPBMAddOnInterParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n};\n\n///投资者商品组SPMM记录查询\nstruct CThostFtdcQryInvestorCommoditySPMMMarginField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///商品组代码\n\tTThostFtdcSPMMProductIDType\tCommodityID;\n};\n\n///投资者商品群SPMM记录查询\nstruct CThostFtdcQryInvestorCommodityGroupSPMMMarginField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///商品群代码\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\n};\n\n///SPMM合约参数查询\nstruct CThostFtdcQrySPMMInstParamField\n{\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///SPMM产品参数查询\nstruct CThostFtdcQrySPMMProductParamField\n{\n\t///产品代码\n\tTThostFtdcSPMMProductIDType\tProductID;\n};\n\n///投资者商品组SPMM记录\nstruct CThostFtdcInvestorCommoditySPMMMarginField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///商品组代码\n\tTThostFtdcSPMMProductIDType\tCommodityID;\n\t///优惠仓位应收保证金\n\tTThostFtdcMoneyType\tMarginBeforeDiscount;\n\t///不优惠仓位应收保证金\n\tTThostFtdcMoneyType\tMarginNoDiscount;\n\t///多头实仓风险\n\tTThostFtdcMoneyType\tLongPosRisk;\n\t///多头开仓冻结风险\n\tTThostFtdcMoneyType\tLongOpenFrozenRisk;\n\t///多头被平冻结风险\n\tTThostFtdcMoneyType\tLongCloseFrozenRisk;\n\t///空头实仓风险\n\tTThostFtdcMoneyType\tShortPosRisk;\n\t///空头开仓冻结风险\n\tTThostFtdcMoneyType\tShortOpenFrozenRisk;\n\t///空头被平冻结风险\n\tTThostFtdcMoneyType\tShortCloseFrozenRisk;\n\t///SPMM品种内跨期优惠系数\n\tTThostFtdcSPMMDiscountRatioType\tIntraCommodityRate;\n\t///SPMM期权优惠系数\n\tTThostFtdcSPMMDiscountRatioType\tOptionDiscountRate;\n\t///实仓对冲优惠金额\n\tTThostFtdcMoneyType\tPosDiscount;\n\t///开仓报单对冲优惠金额\n\tTThostFtdcMoneyType\tOpenFrozenDiscount;\n\t///品种风险净头\n\tTThostFtdcMoneyType\tNetRisk;\n\t///平仓冻结保证金\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///行权冻结资金\n\tTThostFtdcMoneyType\tStrikeFrozenMargin;\n};\n\n///投资者商品群SPMM记录\nstruct CThostFtdcInvestorCommodityGroupSPMMMarginField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///商品群代码\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\n\t///优惠仓位应收保证金\n\tTThostFtdcMoneyType\tMarginBeforeDiscount;\n\t///不优惠仓位应收保证金\n\tTThostFtdcMoneyType\tMarginNoDiscount;\n\t///多头风险\n\tTThostFtdcMoneyType\tLongRisk;\n\t///空头风险\n\tTThostFtdcMoneyType\tShortRisk;\n\t///商品群平仓冻结保证金\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\n\t///SPMM跨品种优惠系数\n\tTThostFtdcSPMMDiscountRatioType\tInterCommodityRate;\n\t///商品群最小保证金比例\n\tTThostFtdcSPMMDiscountRatioType\tMiniMarginRatio;\n\t///投资者保证金和交易所保证金的比例\n\tTThostFtdcRatioType\tAdjustRatio;\n\t///SPMM品种内优惠汇总\n\tTThostFtdcMoneyType\tIntraCommodityDiscount;\n\t///SPMM跨品种优惠\n\tTThostFtdcMoneyType\tInterCommodityDiscount;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///投资者保证金\n\tTThostFtdcMoneyType\tInvestorMargin;\n\t///冻结的手续费\n\tTThostFtdcMoneyType\tFrozenCommission;\n\t///手续费\n\tTThostFtdcMoneyType\tCommission;\n\t///冻结的资金\n\tTThostFtdcMoneyType\tFrozenCash;\n\t///资金差额\n\tTThostFtdcMoneyType\tCashIn;\n\t///行权冻结资金\n\tTThostFtdcMoneyType\tStrikeFrozenMargin;\n};\n\n///SPMM合约参数\nstruct CThostFtdcSPMMInstParamField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///SPMM合约保证金算法\n\tTThostFtdcInstMarginCalIDType\tInstMarginCalID;\n\t///商品组代码\n\tTThostFtdcSPMMProductIDType\tCommodityID;\n\t///商品群代码\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\n};\n\n///SPMM产品参数\nstruct CThostFtdcSPMMProductParamField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcSPMMProductIDType\tProductID;\n\t///商品组代码\n\tTThostFtdcSPMMProductIDType\tCommodityID;\n\t///商品群代码\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\n};\n\n///席位与交易中心对应关系维护查询\nstruct CThostFtdcQryTraderAssignField\n{\n\t///交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n};\n\n///席位与交易中心对应关系\nstruct CThostFtdcTraderAssignField\n{\n\t///应用单元代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n};\n\n///投资者申报费阶梯收取设置\nstruct CThostFtdcInvestorInfoCntSettingField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///商品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///是否收取申报费\n\tTThostFtdcBoolType\tIsCalInfoComm;\n\t///是否限制信息量\n\tTThostFtdcBoolType\tIsLimitInfoMax;\n\t///信息量限制笔数\n\tTThostFtdcVolumeType\tInfoMaxLimit;\n};\n\n///RCAMS产品组合信息\nstruct CThostFtdcRCAMSCombProductInfoField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///商品组代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n};\n\n///RCAMS同合约风险对冲参数\nstruct CThostFtdcRCAMSInstrParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///同合约风险对冲比率\n\tTThostFtdcHedgeRateType\tHedgeRate;\n};\n\n///RCAMS品种内风险对冲参数\nstruct CThostFtdcRCAMSIntraParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///品种内对冲比率\n\tTThostFtdcHedgeRateType\tHedgeRate;\n};\n\n///RCAMS跨品种风险折抵参数\nstruct CThostFtdcRCAMSInterParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n\t///优先级\n\tTThostFtdcRCAMSPriorityType\tPriority;\n\t///折抵率\n\tTThostFtdcHedgeRateType\tCreditRate;\n\t///产品组合代码1\n\tTThostFtdcProductIDType\tCombProduct1;\n\t///产品组合代码2\n\tTThostFtdcProductIDType\tCombProduct2;\n};\n\n///RCAMS空头期权风险调整参数\nstruct CThostFtdcRCAMSShortOptAdjustParamField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///投套标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///空头期权风险调整标准\n\tTThostFtdcAdjustValueType\tAdjustValue;\n};\n\n///RCAMS策略组合持仓\nstruct CThostFtdcRCAMSInvestorCombPositionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投套标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///持仓多空方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///交易所组合合约代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///持仓量\n\tTThostFtdcVolumeType\tTotalAmt;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///投资者保证金\n\tTThostFtdcMoneyType\tMargin;\n};\n\n///投资者品种RCAMS保证金\nstruct CThostFtdcInvestorProdRCAMSMarginField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///投套标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n\t///品种组合前风险\n\tTThostFtdcMoneyType\tRiskBeforeDiscount;\n\t///同合约对冲风险\n\tTThostFtdcMoneyType\tIntraInstrRisk;\n\t///品种买持仓风险\n\tTThostFtdcMoneyType\tBPosRisk;\n\t///品种卖持仓风险\n\tTThostFtdcMoneyType\tSPosRisk;\n\t///品种内对冲风险\n\tTThostFtdcMoneyType\tIntraProdRisk;\n\t///品种净持仓风险\n\tTThostFtdcMoneyType\tNetRisk;\n\t///品种间对冲风险\n\tTThostFtdcMoneyType\tInterProdRisk;\n\t///空头期权风险调整\n\tTThostFtdcMoneyType\tShortOptRiskAdj;\n\t///空头期权权利金\n\tTThostFtdcMoneyType\tOptionRoyalty;\n\t///大边组合平仓冻结保证金\n\tTThostFtdcMoneyType\tMMSACloseFrozenMargin;\n\t///策略组合平仓/行权冻结保证金\n\tTThostFtdcMoneyType\tCloseCombFrozenMargin;\n\t///平仓/行权冻结保证金\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\n\t///大边组合开仓冻结保证金\n\tTThostFtdcMoneyType\tMMSAOpenFrozenMargin;\n\t///交割月期货开仓冻结保证金\n\tTThostFtdcMoneyType\tDeliveryOpenFrozenMargin;\n\t///开仓冻结保证金\n\tTThostFtdcMoneyType\tOpenFrozenMargin;\n\t///投资者冻结保证金\n\tTThostFtdcMoneyType\tUseFrozenMargin;\n\t///大边组合交易所持仓保证金\n\tTThostFtdcMoneyType\tMMSAExchMargin;\n\t///交割月期货交易所持仓保证金\n\tTThostFtdcMoneyType\tDeliveryExchMargin;\n\t///策略组合交易所保证金\n\tTThostFtdcMoneyType\tCombExchMargin;\n\t///交易所持仓保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///投资者持仓保证金\n\tTThostFtdcMoneyType\tUseMargin;\n};\n\n///RCAMS产品组合信息查询\nstruct CThostFtdcQryRCAMSCombProductInfoField\n{\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///商品组代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n};\n\n///RCAMS同合约风险对冲参数查询\nstruct CThostFtdcQryRCAMSInstrParameterField\n{\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n};\n\n///RCAMS品种内风险对冲参数查询\nstruct CThostFtdcQryRCAMSIntraParameterField\n{\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n};\n\n///RCAMS跨品种风险折抵参数查询\nstruct CThostFtdcQryRCAMSInterParameterField\n{\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n\t///产品组合代码1\n\tTThostFtdcProductIDType\tCombProduct1;\n\t///产品组合代码2\n\tTThostFtdcProductIDType\tCombProduct2;\n};\n\n///RCAMS空头期权风险调整参数查询\nstruct CThostFtdcQryRCAMSShortOptAdjustParamField\n{\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n};\n\n///RCAMS策略组合持仓查询\nstruct CThostFtdcQryRCAMSInvestorCombPositionField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n};\n\n///投资者品种RCAMS保证金查询\nstruct CThostFtdcQryInvestorProdRCAMSMarginField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n};\n\n///RULE合约保证金参数\nstruct CThostFtdcRULEInstrParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约类型\n\tTThostFtdcInstrumentClassType\tInstrumentClass;\n\t///标准合约\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\n\t///投机买折算系数\n\tTThostFtdcRatioType\tBSpecRatio;\n\t///投机卖折算系数\n\tTThostFtdcRatioType\tSSpecRatio;\n\t///套保买折算系数\n\tTThostFtdcRatioType\tBHedgeRatio;\n\t///套保卖折算系数\n\tTThostFtdcRatioType\tSHedgeRatio;\n\t///买附加风险保证金\n\tTThostFtdcMoneyType\tBAddOnMargin;\n\t///卖附加风险保证金\n\tTThostFtdcMoneyType\tSAddOnMargin;\n\t///商品群号\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\n};\n\n///RULE品种内对锁仓折扣参数\nstruct CThostFtdcRULEIntraParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///标准合约\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\n\t///标准合约保证金\n\tTThostFtdcMoneyType\tStdInstrMargin;\n\t///一般月份合约组合保证金系数\n\tTThostFtdcRatioType\tUsualIntraRate;\n\t///临近交割合约组合保证金系数\n\tTThostFtdcRatioType\tDeliveryIntraRate;\n};\n\n///RULE跨品种抵扣参数\nstruct CThostFtdcRULEInterParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///优先级\n\tTThostFtdcSpreadIdType\tSpreadId;\n\t///品种间对锁仓费率折扣比例\n\tTThostFtdcRatioType\tInterRate;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n\t///腿1比例系数\n\tTThostFtdcCommonIntType\tLeg1PropFactor;\n\t///腿2比例系数\n\tTThostFtdcCommonIntType\tLeg2PropFactor;\n\t///商品群号\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\n\t///商品群名称\n\tTThostFtdcInstrumentNameType\tCommodityGroupName;\n};\n\n///RULE合约保证金参数查询\nstruct CThostFtdcQryRULEInstrParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n};\n\n///RULE品种内对锁仓折扣参数查询\nstruct CThostFtdcQryRULEIntraParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n};\n\n///RULE跨品种抵扣参数查询\nstruct CThostFtdcQryRULEInterParameterField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n\t///商品群号\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\n};\n\n///投资者产品RULE保证金\nstruct CThostFtdcInvestorProdRULEMarginField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///合约类型\n\tTThostFtdcInstrumentClassType\tInstrumentClass;\n\t///商品群号\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\n\t///买标准持仓\n\tTThostFtdcStdPositionType\tBStdPosition;\n\t///卖标准持仓\n\tTThostFtdcStdPositionType\tSStdPosition;\n\t///买标准开仓冻结\n\tTThostFtdcStdPositionType\tBStdOpenFrozen;\n\t///卖标准开仓冻结\n\tTThostFtdcStdPositionType\tSStdOpenFrozen;\n\t///买标准平仓冻结\n\tTThostFtdcStdPositionType\tBStdCloseFrozen;\n\t///卖标准平仓冻结\n\tTThostFtdcStdPositionType\tSStdCloseFrozen;\n\t///品种内对冲标准持仓\n\tTThostFtdcStdPositionType\tIntraProdStdPosition;\n\t///品种内单腿标准持仓\n\tTThostFtdcStdPositionType\tNetStdPosition;\n\t///品种间对冲标准持仓\n\tTThostFtdcStdPositionType\tInterProdStdPosition;\n\t///单腿标准持仓\n\tTThostFtdcStdPositionType\tSingleStdPosition;\n\t///品种内对锁保证金\n\tTThostFtdcMoneyType\tIntraProdMargin;\n\t///品种间对锁保证金\n\tTThostFtdcMoneyType\tInterProdMargin;\n\t///跨品种单腿保证金\n\tTThostFtdcMoneyType\tSingleMargin;\n\t///非组合合约保证金\n\tTThostFtdcMoneyType\tNonCombMargin;\n\t///附加保证金\n\tTThostFtdcMoneyType\tAddOnMargin;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///附加冻结保证金\n\tTThostFtdcMoneyType\tAddOnFrozenMargin;\n\t///开仓冻结保证金\n\tTThostFtdcMoneyType\tOpenFrozenMargin;\n\t///平仓冻结保证金\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\n\t///品种保证金\n\tTThostFtdcMoneyType\tMargin;\n\t///冻结保证金\n\tTThostFtdcMoneyType\tFrozenMargin;\n};\n\n///投资者产品RULE保证金查询\nstruct CThostFtdcQryInvestorProdRULEMarginField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///商品群号\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\n};\n\n///风险结算追平SPBM组合保证金套餐\nstruct CThostFtdcSyncDeltaSPBMPortfDefinitionField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///组合保证金套餐代码\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///是否启用SPBM\n\tTThostFtdcBoolType\tIsSPBM;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平投资者SPBM套餐选择\nstruct CThostFtdcSyncDeltaSPBMInvstPortfDefField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///组合保证金套餐代码\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPBM期货合约保证金参数\nstruct CThostFtdcSyncDeltaSPBMFutureParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///期货合约因子\n\tTThostFtdcVolumeMultipleType\tCvf;\n\t///阶段标识\n\tTThostFtdcTimeRangeType\tTimeRange;\n\t///品种保证金标准\n\tTThostFtdcRatioType\tMarginRate;\n\t///期货合约内部对锁仓费率折扣比例\n\tTThostFtdcRatioType\tLockRateX;\n\t///提高保证金标准\n\tTThostFtdcRatioType\tAddOnRate;\n\t///昨结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///期货合约内部对锁仓附加费率折扣比例\n\tTThostFtdcRatioType\tAddOnLockRateX2;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPBM期权合约保证金参数\nstruct CThostFtdcSyncDeltaSPBMOptionParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///期权合约因子\n\tTThostFtdcVolumeMultipleType\tCvf;\n\t///期权冲抵价格\n\tTThostFtdcPriceType\tDownPrice;\n\t///Delta值\n\tTThostFtdcDeltaType\tDelta;\n\t///卖方期权风险转换最低值\n\tTThostFtdcDeltaType\tSlimiDelta;\n\t///昨结算价\n\tTThostFtdcPriceType\tPreSettlementPrice;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPBM品种内对锁仓折扣参数\nstruct CThostFtdcSyncDeltaSPBMIntraParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///品种内合约间对锁仓费率折扣比例\n\tTThostFtdcRatioType\tIntraRateY;\n\t///品种内合约间对锁仓附加费率折扣比例\n\tTThostFtdcRatioType\tAddOnIntraRateY2;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPBM跨品种抵扣参数\nstruct CThostFtdcSyncDeltaSPBMInterParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///优先级\n\tTThostFtdcSpreadIdType\tSpreadId;\n\t///品种间对锁仓费率折扣比例\n\tTThostFtdcRatioType\tInterRateZ;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPBM附加跨品种抵扣参数\nstruct CThostFtdcSyncDeltaSPBMAddOnInterParamField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///优先级\n\tTThostFtdcSpreadIdType\tSpreadId;\n\t///品种间对锁仓附加费率折扣比例\n\tTThostFtdcRatioType\tAddOnInterRateZ2;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPMM合约参数\nstruct CThostFtdcSyncDeltaSPMMInstParamField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///SPMM合约保证金算法\n\tTThostFtdcInstMarginCalIDType\tInstMarginCalID;\n\t///商品组代码\n\tTThostFtdcSPMMProductIDType\tCommodityID;\n\t///商品群代码\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPMM产品相关参数\nstruct CThostFtdcSyncDeltaSPMMProductParamField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcSPMMProductIDType\tProductID;\n\t///商品组代码\n\tTThostFtdcSPMMProductIDType\tCommodityID;\n\t///商品群代码\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平投资者SPMM模板选择\nstruct CThostFtdcSyncDeltaInvestorSPMMModelField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///SPMM模板ID\n\tTThostFtdcSPMMModelIDType\tSPMMModelID;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平SPMM模板参数设置\nstruct CThostFtdcSyncDeltaSPMMModelParamField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///SPMM模板ID\n\tTThostFtdcSPMMModelIDType\tSPMMModelID;\n\t///商品群代码\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\n\t///SPMM品种内跨期优惠系数\n\tTThostFtdcSPMMDiscountRatioType\tIntraCommodityRate;\n\t///SPMM品种间优惠系数\n\tTThostFtdcSPMMDiscountRatioType\tInterCommodityRate;\n\t///SPMM期权优惠系数\n\tTThostFtdcSPMMDiscountRatioType\tOptionDiscountRate;\n\t///商品群最小保证金比例\n\tTThostFtdcSPMMDiscountRatioType\tMiniMarginRatio;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RCAMS产品组合信息\nstruct CThostFtdcSyncDeltaRCAMSCombProdInfoField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///商品组代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RCAMS同合约风险对冲参数\nstruct CThostFtdcSyncDeltaRCAMSInstrParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///同合约风险对冲比率\n\tTThostFtdcHedgeRateType\tHedgeRate;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RCAMS品种内风险对冲参数\nstruct CThostFtdcSyncDeltaRCAMSIntraParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///品种内对冲比率\n\tTThostFtdcHedgeRateType\tHedgeRate;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RCAMS跨品种风险折抵参数\nstruct CThostFtdcSyncDeltaRCAMSInterParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///商品群代码\n\tTThostFtdcProductIDType\tProductGroupID;\n\t///优先级\n\tTThostFtdcRCAMSPriorityType\tPriority;\n\t///折抵率\n\tTThostFtdcHedgeRateType\tCreditRate;\n\t///产品组合代码1\n\tTThostFtdcProductIDType\tCombProduct1;\n\t///产品组合代码2\n\tTThostFtdcProductIDType\tCombProduct2;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RCAMS空头期权风险调整参数\nstruct CThostFtdcSyncDeltaRCAMSSOptAdjParamField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///产品组合代码\n\tTThostFtdcProductIDType\tCombProductID;\n\t///投套标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///空头期权风险调整标准\n\tTThostFtdcAdjustValueType\tAdjustValue;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RCAMS策略组合规则明细\nstruct CThostFtdcSyncDeltaRCAMSCombRuleDtlField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///策略产品\n\tTThostFtdcProductIDType\tProdGroup;\n\t///策略id\n\tTThostFtdcRuleIdType\tRuleId;\n\t///优先级\n\tTThostFtdcRCAMSPriorityType\tPriority;\n\t///投套标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///组合保证金标准\n\tTThostFtdcMoneyType\tCombMargin;\n\t///交易所组合合约代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///单腿合约代码\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///单腿乘数\n\tTThostFtdcLegMultipleType\tLegMultiple;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RCAMS策略组合持仓\nstruct CThostFtdcSyncDeltaRCAMSInvstCombPosField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///投套标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///持仓多空方向\n\tTThostFtdcPosiDirectionType\tPosiDirection;\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///交易所组合合约代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///持仓量\n\tTThostFtdcVolumeType\tTotalAmt;\n\t///交易所保证金\n\tTThostFtdcMoneyType\tExchMargin;\n\t///投资者保证金\n\tTThostFtdcMoneyType\tMargin;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RULE合约保证金参数\nstruct CThostFtdcSyncDeltaRULEInstrParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///合约类型\n\tTThostFtdcInstrumentClassType\tInstrumentClass;\n\t///标准合约\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\n\t///投机买折算系数\n\tTThostFtdcRatioType\tBSpecRatio;\n\t///投机卖折算系数\n\tTThostFtdcRatioType\tSSpecRatio;\n\t///套保买折算系数\n\tTThostFtdcRatioType\tBHedgeRatio;\n\t///套保卖折算系数\n\tTThostFtdcRatioType\tSHedgeRatio;\n\t///买附加风险保证金\n\tTThostFtdcMoneyType\tBAddOnMargin;\n\t///卖附加风险保证金\n\tTThostFtdcMoneyType\tSAddOnMargin;\n\t///商品群号\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RULE品种内对锁仓折扣参数\nstruct CThostFtdcSyncDeltaRULEIntraParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///品种代码\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\n\t///标准合约\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\n\t///标准合约保证金\n\tTThostFtdcMoneyType\tStdInstrMargin;\n\t///一般月份合约组合保证金系数\n\tTThostFtdcRatioType\tUsualIntraRate;\n\t///临近交割合约组合保证金系数\n\tTThostFtdcRatioType\tDeliveryIntraRate;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///风险结算追平RULE跨品种抵扣参数\nstruct CThostFtdcSyncDeltaRULEInterParameterField\n{\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///优先级\n\tTThostFtdcSpreadIdType\tSpreadId;\n\t///品种间对锁仓费率折扣比例\n\tTThostFtdcRatioType\tInterRate;\n\t///第一腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\n\t///第二腿构成品种\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\n\t///腿1比例系数\n\tTThostFtdcCommonIntType\tLeg1PropFactor;\n\t///腿2比例系数\n\tTThostFtdcCommonIntType\tLeg2PropFactor;\n\t///商品群号\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\n\t///商品群名称\n\tTThostFtdcInstrumentNameType\tCommodityGroupName;\n\t///操作标志\n\tTThostFtdcActionDirectionType\tActionDirection;\n\t///追平序号\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\n};\n\n///服务地址参数\nstruct CThostFtdcIpAddrParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///服务地址\n\tTThostFtdcIpAddrType\tAddress;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///交易中心名称\n\tTThostFtdcDRIdentityNameType\tDRIdentityName;\n\t///交易地址OR行情地址\n\tTThostFtdcAddrSrvModeType\tAddrSrvMode;\n\t///地址版本\n\tTThostFtdcAddrVerType\tAddrVer;\n\t///服务地址编号\n\tTThostFtdcCommonIntType\tAddrNo;\n\t///服务地址名称\n\tTThostFtdcAddrNameType\tAddrName;\n\t///是否是国密地址\n\tTThostFtdcBoolType\tIsSM;\n\t///是否是内网地址\n\tTThostFtdcBoolType\tIsLocalAddr;\n\t///地址补充信息\n\tTThostFtdcAddrRemarkType\tRemark;\n\t///站点\n\tTThostFtdcSiteType\tSite;\n\t///网络运营商\n\tTThostFtdcNetOperatorType\tNetOperator;\n};\n\n///服务地址参数查询\nstruct CThostFtdcQryIpAddrParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///服务地址参数\nstruct CThostFtdcTGIpAddrParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///服务地址\n\tTThostFtdcIpAddrType\tAddress;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///交易中心名称\n\tTThostFtdcDRIdentityNameType\tDRIdentityName;\n\t///交易地址OR行情地址\n\tTThostFtdcAddrSrvModeType\tAddrSrvMode;\n\t///地址版本\n\tTThostFtdcAddrVerType\tAddrVer;\n\t///服务地址编号\n\tTThostFtdcCommonIntType\tAddrNo;\n\t///服务地址名称\n\tTThostFtdcAddrNameType\tAddrName;\n\t///是否是国密地址\n\tTThostFtdcBoolType\tIsSM;\n\t///是否是内网地址\n\tTThostFtdcBoolType\tIsLocalAddr;\n\t///地址补充信息\n\tTThostFtdcAddrRemarkType\tRemark;\n\t///站点\n\tTThostFtdcSiteType\tSite;\n\t///网络运营商\n\tTThostFtdcNetOperatorType\tNetOperator;\n};\n\n///服务地址参数查询\nstruct CThostFtdcQryTGIpAddrParamField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n};\n\n///TGate会话查询状态\nstruct CThostFtdcTGSessionQryStatusField\n{\n\t///最近30s的查询频率\n\tTThostFtdcCommonIntType\tLastQryFreq;\n\t///查询状态\n\tTThostFtdcTGSessionQryStatusType\tQryStatus;\n};\n\n///内网地址配置\nstruct CThostFtdcLocalAddrConfigField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///对端地址\n\tTThostFtdcIpAddrType\tPeerAddr;\n\t///子网掩码\n\tTThostFtdcIpAddrType\tNetMask;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///内网服务地址\n\tTThostFtdcIpAddrType\tLocalAddress;\n};\n\n///内网地址配置查询\nstruct CThostFtdcQryLocalAddrConfigField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///次席查询银行资金帐户信息请求\nstruct CThostFtdcReqQueryBankAccountBySecField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///次中心发起转账期货公司流水号\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\n};\n\n///次席查询银行资金帐户信息回报\nstruct CThostFtdcRspQueryBankAccountBySecField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///银行可用金额\n\tTThostFtdcTradeAmountType\tBankUseAmount;\n\t///银行可取金额\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///次中心发起转账期货公司流水号\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\n};\n\n///次中心发起的转帐交易\nstruct CThostFtdcReqTransferBySecField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///期货可取金额\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\n\t///费用支付标志\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\n\t///应收客户费用\n\tTThostFtdcCustFeeType\tCustFee;\n\t///应收期货公司费用\n\tTThostFtdcFutureFeeType\tBrokerFee;\n\t///发送方给接收方的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///转账交易状态\n\tTThostFtdcTransferStatusType\tTransferStatus;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///次中心发起转账期货公司流水号\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\n};\n\n///次中心发起的转帐交易回报\nstruct CThostFtdcRspTransferBySecField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///转帐金额\n\tTThostFtdcTradeAmountType\tTradeAmount;\n\t///期货可取金额\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\n\t///费用支付标志\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\n\t///应收客户费用\n\tTThostFtdcCustFeeType\tCustFee;\n\t///应收期货公司费用\n\tTThostFtdcFutureFeeType\tBrokerFee;\n\t///发送方给接收方的消息\n\tTThostFtdcAddInfoType\tMessage;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///转账交易状态\n\tTThostFtdcTransferStatusType\tTransferStatus;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///次中心发起转账期货公司流水号\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\n};\n\n///查询银行资金帐户信息通知 要发往次席\nstruct CThostFtdcNotifyQueryFutureAccountBySecField\n{\n\t///业务功能码\n\tTThostFtdcTradeCodeType\tTradeCode;\n\t///银行代码\n\tTThostFtdcBankIDType\tBankID;\n\t///银行分支机构代码\n\tTThostFtdcBankBrchIDType\tBankBranchID;\n\t///期商代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///期商分支机构代码\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\n\t///交易日期\n\tTThostFtdcTradeDateType\tTradeDate;\n\t///交易时间\n\tTThostFtdcTradeTimeType\tTradeTime;\n\t///银行流水号\n\tTThostFtdcBankSerialType\tBankSerial;\n\t///交易系统日期 \n\tTThostFtdcTradeDateType\tTradingDay;\n\t///银期平台消息流水号\n\tTThostFtdcSerialType\tPlateSerial;\n\t///最后分片标志\n\tTThostFtdcLastFragmentType\tLastFragment;\n\t///会话号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///客户姓名\n\tTThostFtdcIndividualNameType\tCustomerName;\n\t///证件类型\n\tTThostFtdcIdCardTypeType\tIdCardType;\n\t///证件号码\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\n\t///客户类型\n\tTThostFtdcCustTypeType\tCustType;\n\t///银行帐号\n\tTThostFtdcBankAccountType\tBankAccount;\n\t///银行密码\n\tTThostFtdcPasswordType\tBankPassWord;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///期货密码\n\tTThostFtdcPasswordType\tPassword;\n\t///期货公司流水号\n\tTThostFtdcFutureSerialType\tFutureSerial;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///用户标识\n\tTThostFtdcUserIDType\tUserID;\n\t///验证客户证件号码标志\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///摘要\n\tTThostFtdcDigestType\tDigest;\n\t///银行帐号类型\n\tTThostFtdcBankAccTypeType\tBankAccType;\n\t///渠道标志\n\tTThostFtdcDeviceIDType\tDeviceID;\n\t///期货单位帐号类型\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\n\t///期货公司银行编码\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\n\t///期货单位帐号\n\tTThostFtdcBankAccountType\tBankSecuAcc;\n\t///银行密码标志\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\n\t///期货资金密码核对标志\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\n\t///交易柜员\n\tTThostFtdcOperNoType\tOperNo;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///交易ID\n\tTThostFtdcTIDType\tTID;\n\t///银行可用金额\n\tTThostFtdcTradeAmountType\tBankUseAmount;\n\t///银行可取金额\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\n\t///错误代码\n\tTThostFtdcErrorIDType\tErrorID;\n\t///错误信息\n\tTThostFtdcErrorMsgType\tErrorMsg;\n\t///长客户姓名\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///次中心发起转账期货公司流水号\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\n};\n\n///退出紧急状态参数\nstruct CThostFtdcExitEmergencyField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///新组保保证金系数投资者模板对应关系\nstruct CThostFtdcInvestorPortfMarginModelField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///保证金系数模板\n\tTThostFtdcInvestorIDType\tMarginModelID;\n};\n\n///投资者新组保设置\nstruct CThostFtdcInvestorPortfSettingField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者编号\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///投机套保标志\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\n\t///是否开启新组保\n\tTThostFtdcBoolType\tUsePortf;\n};\n\n///投资者新组保设置查询\nstruct CThostFtdcQryInvestorPortfSettingField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者编号\n\tTThostFtdcInvestorIDType\tInvestorID;\n};\n\n///来自次席的用户口令变更\nstruct CThostFtdcUserPasswordUpdateFromSecField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///原来的口令\n\tTThostFtdcPasswordType\tOldPassword;\n\t///新的口令\n\tTThostFtdcPasswordType\tNewPassword;\n\t///次席的交易中心代码\n\tTThostFtdcDRIdentityIDType\tFromSec;\n};\n\n///来自次席的结算结果确认\nstruct CThostFtdcSettlementInfoConfirmFromSecField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///确认日期\n\tTThostFtdcDateType\tConfirmDate;\n\t///确认时间\n\tTThostFtdcTimeType\tConfirmTime;\n\t///次席的交易中心代码\n\tTThostFtdcDRIdentityIDType\tFromSec;\n};\n\n///来自次席的资金账户口令变更\nstruct CThostFtdcTradingAccountPasswordUpdateFromSecField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者帐号\n\tTThostFtdcAccountIDType\tAccountID;\n\t///原来的口令\n\tTThostFtdcPasswordType\tOldPassword;\n\t///新的口令\n\tTThostFtdcPasswordType\tNewPassword;\n\t///币种代码\n\tTThostFtdcCurrencyIDType\tCurrencyID;\n\t///次席的交易中心代码\n\tTThostFtdcDRIdentityIDType\tFromSec;\n};\n\n///风控禁止的合约交易权限\nstruct CThostFtdcRiskForbiddenRightField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者编号\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约/产品代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n};\n\n///投资者申报费阶梯收取记录\nstruct CThostFtdcInvestorInfoCommRecField\n{\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///商品代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///报单总笔数\n\tTThostFtdcVolumeType\tOrderCount;\n\t///撤单总笔数\n\tTThostFtdcVolumeType\tOrderActionCount;\n\t///询价总次数\n\tTThostFtdcVolumeType\tForQuoteCnt;\n\t///申报费\n\tTThostFtdcMoneyType\tInfoComm;\n\t///是否期权系列\n\tTThostFtdcBoolType\tIsOptSeries;\n\t///品种代码\n\tTThostFtdcProductIDType\tProductID;\n\t///信息量总量\n\tTThostFtdcVolumeType\tInfoCnt;\n};\n\n///投资者申报费阶梯收取记录查询\nstruct CThostFtdcQryInvestorInfoCommRecField\n{\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///商品代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///组合腿信息\nstruct CThostFtdcCombLegField\n{\n\t///组合合约代码\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\n\t///单腿编号\n\tTThostFtdcLegIDType\tLegID;\n\t///单腿合约代码\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\n\t///买卖方向\n\tTThostFtdcDirectionType\tDirection;\n\t///单腿乘数\n\tTThostFtdcLegMultipleType\tLegMultiple;\n\t///派生层数\n\tTThostFtdcImplyLevelType\tImplyLevel;\n};\n\n///组合腿信息查询\nstruct CThostFtdcQryCombLegField\n{\n\t///单腿合约代码\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\n};\n\n///输入的对冲设置\nstruct CThostFtdcInputOffsetSettingField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///标的期货合约代码\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///对冲类型\n\tTThostFtdcOffsetTypeType\tOffsetType;\n\t///申请对冲的合约数量\n\tTThostFtdcVolumeType\tVolume;\n\t///是否对冲\n\tTThostFtdcBoolType\tIsOffset;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n};\n\n///对冲设置\nstruct CThostFtdcOffsetSettingField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///标的期货合约代码\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///对冲类型\n\tTThostFtdcOffsetTypeType\tOffsetType;\n\t///申请对冲的合约数量\n\tTThostFtdcVolumeType\tVolume;\n\t///是否对冲\n\tTThostFtdcBoolType\tIsOffset;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///交易所合约代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///交易所期权系列号\n\tTThostFtdcExchangeInstIDType\tExchangeSerialNo;\n\t///交易所产品代码\n\tTThostFtdcProductIDType\tExchangeProductID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///对冲提交状态\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\n\t///交易日\n\tTThostFtdcDateType\tTradingDay;\n\t///结算编号\n\tTThostFtdcSettlementIDType\tSettlementID;\n\t///报单日期\n\tTThostFtdcDateType\tInsertDate;\n\t///插入时间\n\tTThostFtdcTimeType\tInsertTime;\n\t///撤销时间\n\tTThostFtdcTimeType\tCancelTime;\n\t///对冲设置结果\n\tTThostFtdcExecResultType\tExecResult;\n\t///序号\n\tTThostFtdcSequenceNoType\tSequenceNo;\n\t///前置编号\n\tTThostFtdcFrontIDType\tFrontID;\n\t///会话编号\n\tTThostFtdcSessionIDType\tSessionID;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///操作用户代码\n\tTThostFtdcUserIDType\tActiveUserID;\n\t///经纪公司报单编号\n\tTThostFtdcSequenceNoType\tBrokerOffsetSettingSeq;\n\t///申请来源\n\tTThostFtdcApplySrcType\tApplySrc;\n};\n\n///撤销对冲设置\nstruct CThostFtdcCancelOffsetSettingField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///合约代码\n\tTThostFtdcInstrumentIDType\tInstrumentID;\n\t///标的期货合约代码\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///对冲类型\n\tTThostFtdcOffsetTypeType\tOffsetType;\n\t///申请对冲的合约数量\n\tTThostFtdcVolumeType\tVolume;\n\t///是否对冲\n\tTThostFtdcBoolType\tIsOffset;\n\t///请求编号\n\tTThostFtdcRequestIDType\tRequestID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///交易所代码\n\tTThostFtdcExchangeIDType\tExchangeID;\n\t///IP地址\n\tTThostFtdcIPAddressType\tIPAddress;\n\t///Mac地址\n\tTThostFtdcMacAddressType\tMacAddress;\n\t///交易所合约代码\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\n\t///交易所期权系列号\n\tTThostFtdcExchangeInstIDType\tExchangeSerialNo;\n\t///交易所产品代码\n\tTThostFtdcProductIDType\tExchangeProductID;\n\t///交易所交易员代码\n\tTThostFtdcTraderIDType\tTraderID;\n\t///安装编号\n\tTThostFtdcInstallIDType\tInstallID;\n\t///会员代码\n\tTThostFtdcParticipantIDType\tParticipantID;\n\t///客户代码\n\tTThostFtdcClientIDType\tClientID;\n\t///报单操作状态\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\n\t///状态信息\n\tTThostFtdcErrorMsgType\tStatusMsg;\n\t///操作本地编号\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\n\t///操作日期\n\tTThostFtdcDateType\tActionDate;\n\t///操作时间\n\tTThostFtdcTimeType\tActionTime;\n};\n\n///查询对冲设置\nstruct CThostFtdcQryOffsetSettingField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///产品代码\n\tTThostFtdcProductIDType\tProductID;\n\t///对冲类型\n\tTThostFtdcOffsetTypeType\tOffsetType;\n};\n\n///服务地址和AppID的关系\nstruct CThostFtdcAddrAppIDRelationField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///服务地址\n\tTThostFtdcIpAddrType\tAddress;\n\t///交易中心代码\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\n\t///App代码\n\tTThostFtdcAppIDType\tAppID;\n};\n\n///服务地址和AppID的关系查询\nstruct CThostFtdcQryAddrAppIDRelationField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///微信小程序等用户系统信息\nstruct CThostFtdcWechatUserSystemInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///微信小程序等用户端系统内部信息长度\n\tTThostFtdcSystemInfoLenType\tWechatCltSysInfoLen;\n\t///微信小程序等用户端系统内部信息\n\tTThostFtdcClientSystemInfoType\tWechatCltSysInfo;\n\t///终端IP端口\n\tTThostFtdcIPPortType\tClientIPPort;\n\t///登录成功时间\n\tTThostFtdcTimeType\tClientLoginTime;\n\t///App代码\n\tTThostFtdcAppIDType\tClientAppID;\n\t///用户公网IP\n\tTThostFtdcIPAddressType\tClientPublicIP;\n\t///客户登录备注2\n\tTThostFtdcClientLoginRemarkType\tClientLoginRemark;\n};\n\n///投资者预留信息\nstruct CThostFtdcInvestorReserveInfoField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///用户代码\n\tTThostFtdcUserIDType\tUserID;\n\t///预留信息\n\tTThostFtdcReserveInfoType\tReserveInfo;\n};\n\n///查询组织架构投资者对应关系\nstruct CThostFtdcQryInvestorDepartmentFlatField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n///组织架构投资者对应关系\nstruct CThostFtdcInvestorDepartmentFlatField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n\t///投资者代码\n\tTThostFtdcInvestorIDType\tInvestorID;\n\t///组织架构代码\n\tTThostFtdcInvestorIDType\tDepartmentID;\n};\n\n///查询操作员组织架构关系\nstruct CThostFtdcQryDepartmentUserField\n{\n\t///经纪公司代码\n\tTThostFtdcBrokerIDType\tBrokerID;\n};\n\n\n///前置信息\nstruct CThostFtdcFrontInfoField\n{\n\t///前置地址\n\tTThostFtdcAddressType  FrontAddr;\n\t///查询流控\n\tTThostFtdcQueryFreqType QryFreq;\n\t///FTD流控\n\tTThostFtdcQueryFreqType FTDPkgFreq;\n};\n\n#endif\n"
  },
  {
    "path": "native/ctp_bridge/api/linux/error.dtd",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!ELEMENT errors (error*)>\r\n<!ELEMENT error EMPTY>\r\n<!ATTLIST error\r\n\tid\tCDATA #REQUIRED\r\n\tvalue CDATA #REQUIRED\r\n\tprompt CDATA #REQUIRED\r\n>\r\n\r\n"
  },
  {
    "path": "native/ctp_bridge/api/linux/error.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf8\"?>\r\n<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by wangzhaodong (ORiON) -->\r\n<!DOCTYPE errors SYSTEM \"error.dtd\">\r\n<errors>\r\n\t<error id=\"NONE\" value=\"0\" prompt=\"CTP:正确\" />\r\n\t<error id=\"INVALID_DATA_SYNC_STATUS\" value=\"1\" prompt=\"CTP:不在已同步状态\" />\r\n\t<error id=\"INCONSISTENT_INFORMATION\" value=\"2\" prompt=\"CTP:会话信息不一致\" />\r\n\t<error id=\"INVALID_LOGIN\" value=\"3\" prompt=\"CTP:不合法的登录\" />\r\n\t<error id=\"USER_NOT_ACTIVE\" value=\"4\" prompt=\"CTP:用户不活跃\" />\r\n\t<error id=\"DUPLICATE_LOGIN\" value=\"5\" prompt=\"CTP:重复的登录\" />\r\n\t<error id=\"NOT_LOGIN_YET\" value=\"6\" prompt=\"CTP:还没有登录\" />\r\n\t<error id=\"NOT_INITED\" value=\"7\" prompt=\"CTP:还没有初始化\" />\r\n\t<error id=\"FRONT_NOT_ACTIVE\" value=\"8\" prompt=\"CTP:前置不活跃\" />\r\n\t<error id=\"NO_PRIVILEGE\" value=\"9\" prompt=\"CTP:无此权限\" />\r\n\t<error id=\"CHANGE_OTHER_PASSWORD\" value=\"10\" prompt=\"CTP:修改别人的口令\" />\r\n\t<error id=\"USER_NOT_FOUND\" value=\"11\" prompt=\"CTP:找不到该用户\" />\r\n\t<error id=\"BROKER_NOT_FOUND\" value=\"12\" prompt=\"CTP:找不到该经纪公司\" />\r\n\t<error id=\"INVESTOR_NOT_FOUND\" value=\"13\" prompt=\"CTP:找不到投资者\" />\r\n\t<error id=\"OLD_PASSWORD_MISMATCH\" value=\"14\" prompt=\"CTP:原口令不匹配\" />\r\n\t<error id=\"BAD_FIELD\" value=\"15\" prompt=\"CTP:报单字段有误\" />\r\n\t<error id=\"INSTRUMENT_NOT_FOUND\" value=\"16\" prompt=\"CTP:找不到合约\" />\r\n\t<error id=\"INSTRUMENT_NOT_TRADING\" value=\"17\" prompt=\"CTP:合约不能交易\" />\r\n\t<error id=\"NOT_EXCHANGE_PARTICIPANT\" value=\"18\" prompt=\"CTP:经纪公司不是交易所的会员\" />\r\n\t<error id=\"INVESTOR_NOT_ACTIVE\" value=\"19\" prompt=\"CTP:投资者不活跃\" />\r\n\t<error id=\"NOT_EXCHANGE_CLIENT\" value=\"20\" prompt=\"CTP:投资者未在交易所开户\" />\r\n\t<error id=\"NO_VALID_TRADER_AVAILABLE\" value=\"21\" prompt=\"CTP:该交易席位未连接到交易所\" />\r\n\t<error id=\"DUPLICATE_ORDER_REF\" value=\"22\" prompt=\"CTP:报单错误：不允许重复报单\" />\r\n\t<error id=\"BAD_ORDER_ACTION_FIELD\" value=\"23\" prompt=\"CTP:错误的报单操作字段\" />\r\n\t<error id=\"DUPLICATE_ORDER_ACTION_REF\" value=\"24\" prompt=\"CTP:撤单已报送，不允许重复撤单\" />\r\n\t<error id=\"ORDER_NOT_FOUND\" value=\"25\" prompt=\"CTP:撤单找不到相应报单\" />\r\n\t<error id=\"INSUITABLE_ORDER_STATUS\" value=\"26\" prompt=\"CTP:报单已全成交或已撤销，不能再撤\" />\r\n\t<error id=\"UNSUPPORTED_FUNCTION\" value=\"27\" prompt=\"CTP:不支持的功能\" />\r\n\t<error id=\"NO_TRADING_RIGHT\" value=\"28\" prompt=\"CTP:没有报单交易权限\" />\r\n\t<error id=\"CLOSE_ONLY\" value=\"29\" prompt=\"CTP:只能平仓\" />\r\n\t<error id=\"OVER_CLOSE_POSITION\" value=\"30\" prompt=\"CTP:平仓量超过持仓量\" />\r\n\t<error id=\"INSUFFICIENT_MONEY\" value=\"31\" prompt=\"CTP:资金不足\" />\r\n\t<error id=\"DUPLICATE_PK\" value=\"32\" prompt=\"CTP:主键重复\" />\r\n\t<error id=\"CANNOT_FIND_PK\" value=\"33\" prompt=\"CTP:找不到主键\" />\r\n\t<error id=\"CAN_NOT_INACTIVE_BROKER\" value=\"34\" prompt=\"CTP:设置经纪公司不活跃状态失败\" />\r\n\t<error id=\"BROKER_SYNCHRONIZING\" value=\"35\" prompt=\"CTP:经纪公司正在同步\" />\r\n\t<error id=\"BROKER_SYNCHRONIZED\" value=\"36\" prompt=\"CTP:经纪公司已同步\" />\r\n\t<error id=\"SHORT_SELL\" value=\"37\" prompt=\"CTP:现货交易不能卖空\" />\r\n\t<error id=\"INVALID_SETTLEMENT_REF\" value=\"38\" prompt=\"CTP:不合法的结算引用\" />\r\n\t<error id=\"CFFEX_NETWORK_ERROR\" value=\"39\" prompt=\"CTP:交易所网络连接失败\" />\r\n\t<error id=\"CFFEX_OVER_REQUEST\" value=\"40\" prompt=\"CTP:交易所未处理请求超过许可数\" />\r\n\t<error id=\"CFFEX_OVER_REQUEST_PER_SECOND\" value=\"41\" prompt=\"CTP:交易所每秒发送请求数超过许可数\" />\r\n\t<error id=\"SETTLEMENT_INFO_NOT_CONFIRMED\" value=\"42\" prompt=\"CTP:结算结果未确认\" />\r\n\t<error id=\"DEPOSIT_NOT_FOUND\" value=\"43\" prompt=\"CTP:没有对应的入金记录\" />\r\n\t<error id=\"EXCHANG_TRADING\" value=\"44\" prompt=\"CTP:交易所已经进入连续交易状态\" />\r\n\t<error id=\"PARKEDORDER_NOT_FOUND\" value=\"45\" prompt=\"CTP:找不到预埋（撤单）单\" />\r\n\t<error id=\"PARKEDORDER_HASSENDED\" value=\"46\" prompt=\"CTP:预埋（撤单）单已经发送\" />\r\n\t<error id=\"PARKEDORDER_HASDELETE\" value=\"47\" prompt=\"CTP:预埋（撤单）单已经删除\" />\r\n\t<error id=\"INVALID_INVESTORIDORPASSWORD\" value=\"48\" prompt=\"CTP:无效的投资者或者密码\" />\r\n\t<error id=\"INVALID_LOGIN_IPADDRESS\" value=\"49\" prompt=\"CTP:不合法的登录IP地址\" />\r\n\t<error id=\"OVER_CLOSETODAY_POSITION\" value=\"50\" prompt=\"CTP:平今仓位不足\" />\r\n\t<error id=\"OVER_CLOSEYESTERDAY_POSITION\" value=\"51\" prompt=\"CTP:平昨仓位不足\" />\r\n\t<error id=\"BROKER_NOT_ENOUGH_CONDORDER\" value=\"52\" prompt=\"CTP:经纪公司没有足够可用的条件单数量\" />\r\n\t<error id=\"INVESTOR_NOT_ENOUGH_CONDORDER\" value=\"53\" prompt=\"CTP:投资者没有足够可用的条件单数量\" />\r\n\t<error id=\"BROKER_NOT_SUPPORT_CONDORDER\" value=\"54\" prompt=\"CTP:经纪公司不支持条件单\" />\r\n\t<error id=\"RESEND_ORDER_BROKERINVESTOR_NOTMATCH\" value=\"55\" prompt=\"CTP:重发未知单经纪公司/投资者不匹配\" />\r\n\t<error id=\"SYC_OTP_FAILED\" value=\"56\" prompt=\"CTP:同步动态令牌失败\" />\r\n\t<error id=\"OTP_MISMATCH\" value=\"57\" prompt=\"CTP:动态令牌校验错误\" />\r\n\t<error id=\"OTPPARAM_NOT_FOUND\" value=\"58\" prompt=\"CTP:找不到动态令牌配置信息\" />\r\n\t<error id=\"UNSUPPORTED_OTPTYPE\" value=\"59\" prompt=\"CTP:不支持的动态令牌类型\" />\r\n\t<error id=\"SINGLEUSERSESSION_EXCEED_LIMIT\" value=\"60\" prompt=\"CTP:用户在线会话超出上限\" />\r\n\t<error id=\"EXCHANGE_UNSUPPORTED_ARBITRAGE\" value=\"61\" prompt=\"CTP:该交易所不支持套利/做市商类型报单\" />\r\n\t<error id=\"NO_CONDITIONAL_ORDER_RIGHT\" value=\"62\" prompt=\"CTP:没有条件单交易权限\" />\r\n\t<error id=\"AUTH_FAILED\" value=\"63\" prompt=\"CTP:客户端认证失败\" />\r\n\t<error id=\"NOT_AUTHENT\" value=\"64\" prompt=\"CTP:客户端未认证\" />\r\n\t<error id=\"SWAPORDER_UNSUPPORTED\" value=\"65\" prompt=\"CTP:该合约不支持互换类型报单\" />\r\n\t<error id=\"OPTIONS_ONLY_SUPPORT_SPEC\" value=\"66\" prompt=\"CTP:该期权合约只支持投机类型报单\" />\r\n\t<error id=\"DUPLICATE_EXECORDER_REF\" value=\"67\" prompt=\"CTP:执行宣告错误，不允许重复执行\" />\r\n\t<error id=\"RESEND_EXECORDER_BROKERINVESTOR_NOTMATCH\" value=\"68\" prompt=\"CTP:重发未知执行宣告经纪公司/投资者不匹配\" />\r\n\t<error id=\"EXECORDER_NOTOPTIONS\" value=\"69\" prompt=\"CTP:只有期货期权合约可执行\" />\r\n\t<error id=\"OPTIONS_NOT_SUPPORT_EXEC\" value=\"70\" prompt=\"CTP:该期权合约不支持执行\" />\r\n\t<error id=\"BAD_EXECORDER_ACTION_FIELD\" value=\"71\" prompt=\"CTP:执行宣告字段有误\" />\r\n\t<error id=\"DUPLICATE_EXECORDER_ACTION_REF\" value=\"72\" prompt=\"CTP:执行宣告撤单已报送，不允许重复撤单\" />\r\n\t<error id=\"EXECORDER_NOT_FOUND\" value=\"73\" prompt=\"CTP:执行宣告撤单找不到相应执行宣告\" />\r\n\t<error id=\"OVER_EXECUTE_POSITION\" value=\"74\" prompt=\"CTP:执行仓位不足\" />\r\n\t<error id=\"LOGIN_FORBIDDEN\" value=\"75\" prompt=\"CTP:连续登录失败次数超限，登录被禁止\" />\r\n\t<error id=\"INVALID_TRANSFER_AGENT\" value=\"76\" prompt=\"CTP:非法银期代理关系\" />\r\n\t<error id=\"NO_FOUND_FUNCTION\" value=\"77\" prompt=\"CTP:无此功能\" />\r\n\t<error id=\"SEND_EXCHANGEORDER_FAILED\" value=\"78\" prompt=\"CTP:发送报单失败\" />\r\n\t<error id=\"SEND_EXCHANGEORDERACTION_FAILED\" value=\"79\" prompt=\"CTP:发送报单操作失败\" />\r\n\t<error id=\"PRICETYPE_NOTSUPPORT_BYEXCHANGE\" value=\"80\" prompt=\"CTP:交易所不支持的价格类型\" />\r\n\t<error id=\"BAD_EXECUTE_TYPE\" value=\"81\" prompt=\"CTP:错误的执行类型\" />\r\n\t<error id=\"BAD_OPTION_INSTR\" value=\"82\" prompt=\"CTP:无效的组合合约\" />\r\n\t<error id=\"INSTR_NOTSUPPORT_FORQUOTE\" value=\"83\" prompt=\"CTP:该合约不支持询价\" />\r\n\t<error id=\"RESEND_QUOTE_BROKERINVESTOR_NOTMATCH\" value=\"84\" prompt=\"CTP:重发未知报价经纪公司/投资者不匹配\" />\r\n\t<error id=\"INSTR_NOTSUPPORT_QUOTE\" value=\"85\" prompt=\"CTP:该合约不支持报价\" />\r\n\t<error id=\"QUOTE_NOT_FOUND\" value=\"86\" prompt=\"CTP:报价撤单找不到相应报价\" />\r\n\t<error id=\"OPTIONS_NOT_SUPPORT_ABANDON\" value=\"87\" prompt=\"CTP:该期权合约不支持放弃执行\" />\r\n\t<error id=\"COMBOPTIONS_SUPPORT_IOC_ONLY\" value=\"88\" prompt=\"CTP:该组合期权合约只支持IOC\" />\r\n\t<error id=\"OPEN_FILE_FAILED\" value=\"89\" prompt=\"CTP:打开文件失败\" />\r\n\t<error id=\"NEED_RETRY\" value=\"90\" prompt=\"CTP：查询未就绪，请稍后重试\" />\r\n\t<error id=\"EXCHANGE_RTNERROR\" value=\"91\" prompt=\"CTP：交易所返回的错误\" />\r\n\t<error id=\"QUOTE_DERIVEDORDER_ACTIONERROR\" value=\"92\" prompt=\"CTP:报价衍生单要等待交易所返回才能撤单\" />\r\n\t<error id=\"INSTRUMENTMAP_NOT_FOUND\" value=\"93\" prompt=\"CTP:找不到组合合约映射\" />\r\n\t<error id=\"CANCELLATION_OF_OTC_DERIVED_ORDER_NOT_ALLOWED\" value=\"94\" prompt=\"CTP:不允许撤销OTC衍生报单\" />\r\n\t<error id=\"BAD_PRICE_VALUE\" value=\"95\" prompt=\"CTP：不支持的价格\" />\r\n\t<!--SPBM-->\r\n\t<error id=\"SPBMFUTPARAM_NOT_FOUND\" value=\"96\" prompt=\"CTP:找不到SPBM期货合约参数\" />\r\n\t<error id=\"SPBMOPTPARAM_NOT_FOUND\" value=\"97\" prompt=\"CTP:找不到SPBM期权合约参数\" />\r\n\t<error id=\"SPBMINTRAPARAM_NOT_FOUND\" value=\"98\" prompt=\"CTP:找不到SPBM品种内对锁仓折扣参数\" />\r\n\t<!--RULE-->\r\n\t<error id=\"RULEINSTRPARAM_NOT_FOUND\" value=\"99\" prompt=\"CTP:找不到RULE合约参数\" />\r\n\t<error id=\"RULEINTRAPARAM_NOT_FOUND\" value=\"100\" prompt=\"CTP:找不到RULE品种内对锁仓折扣参数\" />\r\n\t<!--灾备系统错误代码 -->\r\n\t<error id=\"NO_TRADING_RIGHT_IN_SEPC_DR\" value=\"101\" prompt=\"CTP:用户在本系统没有报单权限\" />\r\n\t<error id=\"NO_DR_NO\" value=\"102\" prompt=\"CTP:系统缺少灾备标示号\" />\r\n\t<error id=\"BATCHACTION_NOSUPPORT\" value=\"103\" prompt=\"CTP:该交易所不支持批量撤单\" />\r\n\t<error id=\"POSI_LIMIT\" value=\"106\" prompt=\"CTP:投资者限仓\" />\r\n\t<error id=\"OUT_OF_TIMEINTERVAL\" value=\"113\" prompt=\"CTP:当前时间禁止询价\" />\r\n\t<error id=\"OUT_OF_PRICEINTERVAL\" value=\"114\" prompt=\"CTP:当前价差禁止询价\" />\r\n\t<error id=\"ORDER_FREQ_LIMIT\" value=\"116\" prompt=\"CTP:下单频率限制\" />\r\n\t<error id=\"WEAK_PASSWORD\" value=\"131\" prompt=\"CTP：您当前密码为弱密码，请修改成强密码后重新登录\" />\r\n\t<error id=\"SIMPLE_PASSWORD\" value=\"132\" prompt=\"CTP：您输入的密码过于简单\" />\r\n\t<error id=\"EXEC_FORBIDDEN_TIME\" value=\"139\" prompt=\"CTP:当前时间禁止行权\" />\r\n\t<error id=\"FIRST_LOGIN\" value=\"140\" prompt=\"CTP:首次登录必须修改密码，请修改密码后重新登录\" />\r\n\t<error id=\"PWD_OUT_OF_DATE\" value=\"141\" prompt=\"CTP:您当前密码已过期，请修改后登录\" />\r\n\t<error id=\"PWD_MUST_DIFF\" value=\"142\" prompt=\"CTP:修改密码失败。新密码不允许与旧密码相同\" />\r\n\t<error id=\"IP_FORBIDDEN\" value=\"143\" prompt=\"CTP:您登录失败次数过多，IP被禁止登入CTP\" />\r\n\t<error id=\"IP_BLACK\" value=\"144\" prompt=\"CTP:您当前IP在黑名单中，被禁止登录和认证\" />\r\n\t<error id=\"NO_AUTH_RIGHT_IN_SEPC_DR\" value=\"145\" prompt=\"CTP:终端在本系统没有认证权限\" />\r\n\t<error id=\"INVESTOR_ID_IS_MISSING\" value=\"146\" prompt=\"CTP:缺少InvestorID字段，请填入InvestorID\" />\r\n\t<error id=\"EXCHANGE_ID_IS_MISSING\" value=\"147\" prompt=\"CTP:缺少ExchangeID字段，请填入ExchangeID\" />\r\n\t<error id=\"EXCHANGE_ID_IS_INVALID\" value=\"148\" prompt=\"CTP:无效的ExchangeID字段，请填入正确的ExchangeID\" />\r\n\t<error id=\"ACCOUNT_ID_IS_MISSING\" value=\"149\" prompt=\"CTP:缺少AccountID字段，请填入AccountID\" />\r\n\t<error id=\"EXCHANGE_ID_IS_WRONG\" value=\"150\" prompt=\"CTP:交易所代码错误\" />\r\n\t<error id=\"DEL_COMB_ACTION_NO_REC\" value=\"151\" prompt=\"CTP:删除拆分组合指令：没有找到该记录\" />\r\n\t<error id=\"DEL_COMB_ACTION_TOO_FAST\" value=\"152\" prompt=\"CTP:删除拆分组合指令：原指令需要等待30s 才能删除\" />\r\n\t<error id=\"COMB_ACTION_SHORT_MONEY\" value=\"153\" prompt=\"CTP:拆分组合钱不足\" />\r\n\t<error id=\"QK_BUSY\" value=\"154\" prompt=\"CTP:查询核心忙 请稍后重试\" />\r\n\t<error id=\"CFMMC_NO_CONNECTION\" value=\"155\" prompt=\"CTP:未连接监控中心\" />\r\n\t<error id=\"CLOSE_OPTION_NO_MONEY\" value=\"156\" prompt=\"CTP:平期权多头后资金为负（收益小于平仓手续费），只可由风控人员强平\" />\r\n\t<error id=\"CANCEL_UNKNOWN_ORDER_UNSUPPORTED\" value=\"157\" prompt=\"CTP:该交易所不支持撤销未知单\" />\r\n\t<error id=\"OVER_INFO_CNT_LIMIT\" value=\"158\" prompt=\"CTP:超过信息量限制\" />\r\n\t<error id=\"OVER_INVST_PARKED_ORDER_LIMIT\" value=\"159\" prompt=\"CTP:超过个人预埋单最大量限制\" />\r\n\t<error id=\"OVER_BROKER_PARKED_ORDER_LIMIT\" value=\"160\" prompt=\"CTP:超过经纪公司预埋单最大量限制\" />\r\n\t<error id=\"PARKED_ORDER_WRONG_TYPE\" value=\"161\" prompt=\"CTP:预埋单:不支持的触发类型\" />\r\n\t<error id=\"NOT_TRADING_PERIOD\" value=\"162\" prompt=\"CTP:产品不在可以交易的阶段\" />\r\n\t<error id=\"PRICE_OVER_LIMIT\" value=\"163\" prompt=\"CTP:报单价格不在涨跌停板价范围内\" />\r\n\t<error id=\"VOLUME_NOT_VALID\" value=\"164\" prompt=\"CTP:下单数量不符合交易所规范\" />\r\n\t<error id=\"PRICE_WRONG_TICK\" value=\"165\" prompt=\"CTP:报单价格非最小变动价位整数倍\" />\r\n\t<!--转帐系统错误代码 -->\r\n\t<error id=\"SEND_INSTITUTION_CODE_ERROR\" value=\"1000\" prompt=\"CTP:银期转账：发送机构代码错误\" />\r\n\t<error id=\"NO_GET_PLATFORM_SN\" value=\"1001\" prompt=\"CTP:银期转账：取平台流水号错误\" />\r\n\t<error id=\"ILLEGAL_TRANSFER_BANK\" value=\"1002\" prompt=\"CTP:银期转账：不合法的转账银行\" />\r\n\t<error id=\"ALREADY_OPEN_ACCOUNT\" value=\"1003\" prompt=\"CTP:银期转账：已经开户\" />\r\n\t<error id=\"NOT_OPEN_ACCOUNT\" value=\"1004\" prompt=\"CTP:银期转账：未开户\" />\r\n\t<error id=\"PROCESSING\" value=\"1005\" prompt=\"CTP:银期转账：处理中\" />\r\n\t<error id=\"OVERTIME\" value=\"1006\" prompt=\"CTP:银期转账：交易超时\" />\r\n\t<error id=\"RECORD_NOT_FOUND\" value=\"1007\" prompt=\"CTP:银期转账：找不到记录\" />\r\n\t<error id=\"NO_FOUND_REVERSAL_ORIGINAL_TRANSACTION\" value=\"1008\" prompt=\"CTP:银期转账：找不到被冲正的原始交易\" />\r\n\t<error id=\"CONNECT_HOST_FAILED\" value=\"1009\" prompt=\"CTP:银期转账：连接主机失败\" />\r\n\t<error id=\"SEND_FAILED\" value=\"1010\" prompt=\"CTP:银期转账：发送失败\" />\r\n\t<error id=\"LATE_RESPONSE\" value=\"1011\" prompt=\"CTP:银期转账：迟到应答\" />\r\n\t<error id=\"REVERSAL_BANKID_NOT_MATCH\" value=\"1012\" prompt=\"CTP:银期转账：冲正交易银行代码错误\" />\r\n\t<error id=\"REVERSAL_BANKACCOUNT_NOT_MATCH\" value=\"1013\" prompt=\"CTP:银期转账：冲正交易银行账户错误\" />\r\n\t<error id=\"REVERSAL_BROKERID_NOT_MATCH\" value=\"1014\" prompt=\"CTP:银期转账：冲正交易经纪公司代码错误\" />\r\n\t<error id=\"REVERSAL_ACCOUNTID_NOT_MATCH\" value=\"1015\" prompt=\"CTP:银期转账：冲正交易资金账户错误\" />\r\n\t<error id=\"REVERSAL_AMOUNT_NOT_MATCH\" value=\"1016\" prompt=\"CTP:银期转账：冲正交易交易金额错误\" />\r\n\t<error id=\"DB_OPERATION_FAILED\" value=\"1017\" prompt=\"CTP:银期转账：数据库操作错误\" />\r\n\t<error id=\"SEND_ASP_FAILURE\" value=\"1018\" prompt=\"CTP:银期转账：发送到交易系统失败\" />\r\n\t<error id=\"NOT_SIGNIN\" value=\"1019\" prompt=\"CTP:银期转账：没有签到\" />\r\n\t<error id=\"ALREADY_SIGNIN\" value=\"1020\" prompt=\"CTP:银期转账：已经签到\" />\r\n\t<error id=\"AMOUNT_OR_TIMES_OVER\" value=\"1021\" prompt=\"CTP:银期转账：金额或次数超限\" />\r\n\t<error id=\"NOT_IN_TRANSFER_TIME\" value=\"1022\" prompt=\"CTP:银期转账：这一时间段不能转账\" />\r\n\t<error id=\"BANK_SERVER_ERROR\" value=\"1023\" prompt=\"银行主机错\" />\r\n\t<error id=\"BANK_SERIAL_IS_REPEALED\" value=\"1024\" prompt=\"CTP:银期转账：银行已经冲正\" />\r\n\t<error id=\"BANK_SERIAL_NOT_EXIST\" value=\"1025\" prompt=\"CTP:银期转账：银行流水不存在\" />\r\n\t<error id=\"NOT_ORGAN_MAP\" value=\"1026\" prompt=\"CTP:银期转账：机构没有签约\" />\r\n\t<error id=\"EXIST_TRANSFER\" value=\"1027\" prompt=\"CTP:银期转账：存在转账，不能销户\" />\r\n\t<error id=\"BANK_FORBID_REVERSAL\" value=\"1028\" prompt=\"CTP:银期转账：银行不支持冲正\" />\r\n\t<error id=\"DUP_BANK_SERIAL\" value=\"1029\" prompt=\"CTP:银期转账：重复的银行流水\" />\r\n\t<error id=\"FBT_SYSTEM_BUSY\" value=\"1030\" prompt=\"CTP:银期转账：转账系统忙，稍后再试\" />\r\n\t<error id=\"MACKEY_SYNCING\" value=\"1031\" prompt=\"CTP:银期转账：MAC密钥正在同步\" />\r\n\t<error id=\"ACCOUNTID_ALREADY_REGISTER\" value=\"1032\" prompt=\"CTP:银期转账：资金账户已经登记\" />\r\n\t<error id=\"BANKACCOUNT_ALREADY_REGISTER\" value=\"1033\" prompt=\"CTP:银期转账：银行账户已经登记\" />\r\n\t<error id=\"DUP_BANK_SERIAL_REDO_OK\" value=\"1034\" prompt=\"CTP:银期转账：重复的银行流水,重发成功\" />\r\n\t<error id=\"CURRENCYID_NOT_SUPPORTED\" value=\"1035\" prompt=\"CTP:银期转账：该币种代码不支持\" />\r\n\t<error id=\"INVALID_MAC\" value=\"1036\" prompt=\"CTP:银期转账：MAC值验证失败\" />\r\n\t<error id=\"NOT_SUPPORT_SECAGENT_BY_BANK\" value=\"1037\" prompt=\"CTP:银期转账：不支持银行端发起的二级代理商转账和查询\" />\r\n\t<error id=\"PINKEY_SYNCING\" value=\"1038\" prompt=\"CTP:银期转账：PIN密钥正在同步\" />\r\n\t<error id=\"SECAGENT_QUERY_BY_CCB\" value=\"1039\" prompt=\"CTP:银期转账：建行发起的二级代理商查询\" />\r\n\t<error id=\"BANKACCOUNT_NOT_EMPTY\" value=\"1040\" prompt=\"CTP:银期转账：银行账户不能为空\" />\r\n\t<error id=\"INVALID_RESERVE_OPEN_ACCOUNT\" value=\"1041\" prompt=\"CTP:银期转账：资金账户存在，预约开户失败\" />\r\n\t<error id=\"OPEN_ACCOUNT_NOT_DEFAULT_ACCOUNT\" value=\"1042\" prompt=\"CTP:银期转账：开户请求的银行卡号和预留的账号不同\" />\r\n\t<error id=\"BANK_SYSTEM_INTERNAL_ERROR\" value=\"1043\" prompt=\"银行系统内部错误\" />\r\n\t<error id=\"OFFER_LOCALTIME_OFFSET_IS_TOO_LARGE\" value=\"1044\" prompt=\"银期转账：银期报盘机器时间偏移太大\" />\r\n\t<error id=\"FUTURESERIAL_HAS_BEEN_PROCESSED\" value=\"1045\" prompt=\"银期转账：该期货流水号已经处理过\" />\r\n\t<error id=\"SEC_TRANSFER_NOT_AVAILABLE\" value=\"1046\" prompt=\"银期转账：次席转账组件当前不可用\" />\r\n\t<!-- add for transfer begin -->\r\n\t<error id=\"NO_VALID_BANKOFFER_AVAILABLE\" value=\"2000\" prompt=\"CTP:该报盘未连接到银行\" />\r\n\t<error id=\"PASSWORD_MISMATCH\" value=\"2001\" prompt=\"CTP:资金密码错误\" />\r\n\t<error id=\"DUPLATION_BANK_SERIAL\" value=\"2004\" prompt=\"CTP:银行流水号重复\" />\r\n\t<error id=\"DUPLATION_OFFER_SERIAL\" value=\"2005\" prompt=\"CTP:报盘流水号重复\" />\r\n\t<error id=\"SERIAL_NOT_EXSIT\" value=\"2006\" prompt=\"CTP:被冲正流水不存在(冲正交易)\" />\r\n\t<error id=\"SERIAL_IS_REPEALED\" value=\"2007\" prompt=\"CTP:原流水已冲正(冲正交易)\" />\r\n\t<error id=\"SERIAL_MISMATCH\" value=\"2008\" prompt=\"CTP:与原流水信息不符(冲正交易)\" />\r\n\t<error id=\"IdentifiedCardNo_MISMATCH\" value=\"2009\" prompt=\"CTP:证件号码或类型错误\" />\r\n\t<error id=\"ACCOUNT_NOT_FUND\" value=\"2011\" prompt=\"CTP:资金账户不存在\" />\r\n\t<error id=\"ACCOUNT_NOT_ACTIVE\" value=\"2012\" prompt=\"CTP:资金账户已经销户\" />\r\n\t<error id=\"NOT_ALLOW_REPEAL_BYMANUAL\" value=\"2013\" prompt=\"CTP:该交易不能执行手工冲正\" />\r\n\t<error id=\"AMOUNT_OUTOFTHEWAY\" value=\"2014\" prompt=\"CTP:转帐金额错误\" />\r\n\t<error id=\"EXCHANGERATE_NOT_FOUND\" value=\"2015\" prompt=\"CTP:找不到汇率\" />\r\n\t<error id=\"RESERVE_OPEN_ACCOUNT_NOT_FUND\" value=\"2016\" prompt=\"CTP:找不到预约开户请求\" />\r\n\t<error id=\"DUPLICATE_RESERVE_OPEN_ACCOUNT_NOT_FUND\" value=\"2017\" prompt=\"CTP:重复的预约开户请求\" />\r\n\t<error id=\"BANK_INTERNAL_ERR\" value=\"2018\" prompt=\"CTP:银行内部错误,需要找银行确认成功还是失败\" />\r\n\t<error id=\"WAITING_OFFER_RSP\" value=\"999999\" prompt=\"CTP:等待银期报盘处理结果\" />\r\n\t<error id=\"TRANSFER_NOT_DEFAULT_ACCOUNT\" value=\"2019\" prompt=\"CTP:转账卡号非预留银行账户\" />\r\n\r\n\t<!-- add for transfer end -->\r\n\t<!--add\r\n\t建行新一代银期-->\r\n\t<error id=\"PW_PASSWORD\" value=\"2050\" prompt=\"建行银期：密码与认证(业务错误)\" />\r\n\t<error id=\"AL_AMOUNT_LIMITATION\" value=\"2051\" prompt=\"建行银期：数量与限额(业务错误)\" />\r\n\t<error id=\"AC_AUTHORITY_CONTROL\" value=\"2052\" prompt=\"建行银期：权限控制(业务错误)\" />\r\n\t<error id=\"DC_DATA_CONTEXT\" value=\"2053\" prompt=\"建行银期：信息滥缺(业务错误)或者数据内容相关(技术错误)\" />\r\n\t<error id=\"CE_CONTENT_ERROR\" value=\"2054\" prompt=\"建行银期：内容非法(业务错误)\" />\r\n\t<error id=\"DO_DUPLICATE_OPERATION\" value=\"2055\" prompt=\"建行银期：重复交易(业务错误)\" />\r\n\t<error id=\"TM_TIME\" value=\"2056\" prompt=\"建行银期： 时间与期限(业务错误)\" />\r\n\t<error id=\"RC_RISK_CONTROL\" value=\"2057\" prompt=\"建行银期：风险控制(业务错误)\" />\r\n\t<error id=\"BL_BUSINESS_LOGIC\" value=\"2058\" prompt=\"建行银期：业务逻辑(业务错误)\" />\r\n\t<error id=\"NA_NA\" value=\"2059\" prompt=\"建行银期： 不确定交易结果(技术错误)\" />\r\n\t<error id=\"HW_HARDWARE\" value=\"2060\" prompt=\"建行银期： 硬件错误(技术错误)\" />\r\n\t<error id=\"IO_IO\" value=\"2062\" prompt=\"建行银期： 读写相关(技术错误)\" />\r\n\t<error id=\"DB_DATABASE\" value=\"2063\" prompt=\"建行银期： 数据库相关(技术错误)\" />\r\n\t<error id=\"NC_NETWORK_COMMUNICATION\" value=\"2064\" prompt=\"建行银期：网络通讯(技术错误)\" />\r\n\t<error id=\"SS_SECURITY_SERVICE\" value=\"2065\" prompt=\"建行银期：安全服务(技术错误)\" />\r\n\t<error id=\"CM_COMPONENTS\" value=\"2066\" prompt=\"建行银期： 组件模块(技术错误)\" />\r\n\t<error id=\"FC_FLOW_CONTROL\" value=\"2067\" prompt=\"建行银期：流量控制(技术错误)\" />\r\n\t<error id=\"TL_TECHNICAL_LOGIC\" value=\"2069\" prompt=\"建行银期：技术逻辑(技术错误)\" />\r\n\t<error id=\"AT_ABSOLUTE_TECHNIQUE\" value=\"2070\" prompt=\"建行银期：纯技术性错误(技术错误)\" />\r\n\r\n\t<!--end\r\n\t建行新一代银期-->\r\n\t<!--换汇系统错误代码\r\n\tbgn-->\r\n\t<error id=\"FBE_NO_GET_PLATFORM_SN\" value=\"3001\" prompt=\"CTP:银期换汇：取平台流水号错误\" />\r\n\t<error id=\"FBE_ILLEGAL_TRANSFER_BANK\" value=\"3002\" prompt=\"CTP:银期换汇：不合法的转账银行\" />\r\n\t<error id=\"FBE_PROCESSING\" value=\"3005\" prompt=\"CTP:银期换汇：处理中\" />\r\n\t<error id=\"FBE_OVERTIME\" value=\"3006\" prompt=\"CTP:银期换汇：交易超时\" />\r\n\t<error id=\"FBE_RECORD_NOT_FOUND\" value=\"3007\" prompt=\"CTP:银期换汇：找不到记录\" />\r\n\t<error id=\"FBE_CONNECT_HOST_FAILED\" value=\"3009\" prompt=\"CTP:银期换汇：连接主机失败\" />\r\n\t<error id=\"FBE_SEND_FAILED\" value=\"3010\" prompt=\"CTP:银期换汇：发送失败\" />\r\n\t<error id=\"FBE_LATE_RESPONSE\" value=\"3011\" prompt=\"CTP:银期换汇：迟到应答\" />\r\n\t<error id=\"FBE_DB_OPERATION_FAILED\" value=\"3017\" prompt=\"CTP:银期换汇：数据库操作错误\" />\r\n\t<error id=\"FBE_NOT_SIGNIN\" value=\"3019\" prompt=\"CTP:银期换汇：没有签到\" />\r\n\t<error id=\"FBE_ALREADY_SIGNIN\" value=\"3020\" prompt=\"CTP:银期换汇：已经签到\" />\r\n\t<error id=\"FBE_AMOUNT_OR_TIMES_OVER\" value=\"3021\" prompt=\"CTP:银期换汇：金额或次数超限\" />\r\n\t<error id=\"FBE_NOT_IN_TRANSFER_TIME\" value=\"3022\" prompt=\"CTP:银期换汇：这一时间段不能换汇\" />\r\n\t<error id=\"FBE_BANK_SERVER_ERROR\" value=\"3023\" prompt=\"CTP:银期换汇：银行主机错\" />\r\n\t<error id=\"FBE_NOT_ORGAN_MAP\" value=\"3026\" prompt=\"CTP:银期换汇：机构没有签约\" />\r\n\t<error id=\"FBE_SYSTEM_BUSY\" value=\"3030\" prompt=\"CTP:银期换汇：换汇系统忙，稍后再试\" />\r\n\t<error id=\"FBE_CURRENCYID_NOT_SUPPORTED\" value=\"3035\" prompt=\"CTP:银期换汇：该币种代码不支持\" />\r\n\t<error id=\"FBE_WRONG_BANK_ACCOUNT\" value=\"3036\" prompt=\"CTP:银期换汇：银行帐号不正确\" />\r\n\t<error id=\"FBE_BANK_ACCOUNT_NO_FUNDS\" value=\"3037\" prompt=\"CTP:银期换汇：银行帐户余额不足\" />\r\n\t<error id=\"FBE_DUP_CERT_NO\" value=\"3038\" prompt=\"CTP:银期换汇：凭证号重复\" />\r\n\t<!--换汇系统错误代码\r\n\tend-->\r\n\r\n\t<!--登录鉴权错误代码\r\n\tbegin-->\r\n\t<error id=\"API_UNSUPPORTED_VERSION\" value=\"3039\" prompt=\"CTP: 不支持该API版本\" />\r\n\t<error id=\"API_INVALID_KEY\" value=\"3040\" prompt=\"CTP: 无效的API KEY\" />\r\n\t<!--登录鉴权错误代码\r\n\tend-->\r\n\r\n\t<error id=\"OPTION_SELF_CLOSE_NOT_OPTION\" value=\"3041\" prompt=\"CTP:期权对冲,履约对冲:非期权合约\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_DUPLICATE_REF\" value=\"3042\" prompt=\"CTP:期权对冲,履约对冲:请求引用不合法\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_BAD_FIELD\" value=\"3043\" prompt=\"CTP:期权对冲,履约对冲:非法字段 \" />\r\n\t<error id=\"OPTION_SELF_CLOSE_REC_NOT_FOUND\" value=\"3044\" prompt=\"CTP:期权对冲,履约对冲:撤销未找到记录\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_STATUS_ERR\" value=\"3045\" prompt=\"CTP:期权对冲,履约对冲:对冲状态不对，不能撤销\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_DOUBLE_SET_ERR\" value=\"3046\" prompt=\"CTP:期权对冲,履约对冲:不能重复设置，只能先撤销再设置\" />\r\n\t<error id=\"QUOTE_WRONG_HEDGE_TYPE\" value=\"3047\" prompt=\"CTP:报价不支持该投机套保类型\" />\r\n\t<error id=\"API_FRONT_SHAKE_HAND_ERR\" value=\"4040\" prompt=\"CTP:API Front shake hand err\" />\r\n\t<error id=\"DUPLICATE_SUBMIT\" value=\"4041\" prompt=\"CTP:DUPLICATE_SUBMIT\" />\r\n\t<error id=\"AUTHIP_CHECK_ERR\" value=\"4042\" prompt=\"CTP:IP授权验证失败\" />\r\n\t<error id=\"AUTHUSER_CHECK_ERR\" value=\"4043\" prompt=\"CTP:用户与客户端授权验证失败\" />\r\n\t<error id=\"QUOTE_WRONG_REPALACE_SYSID\" value=\"4050\" prompt=\"CTP:报价指定的顶单编号不合法（中金所）\" />\r\n\t<error id=\"AUTH_IP_FORBIDDEN\" value=\"4060\" prompt=\"CTP:您认证失败次数过多，IP进入认证禁止列表\" />\r\n\t<error id=\"MORTGAGE_NOT_BALANCE\" value=\"4061\" prompt=\"CTP:未满足质押配比要求\" />\r\n\r\n\t<error id=\"SMAPI_SSL_CONNECT_ERR\" value=\"4100\" prompt=\"CTP:SSL Connect Error.\" />\r\n\t<error id=\"SMAPI_WRONG_USERIDORNAME\" value=\"4101\" prompt=\"CTP:Wrong User ID or Name.\" />\r\n\t<error id=\"SMAPI_CERT_VERIFY_FAILED\" value=\"4102\" prompt=\"CTP:Cert Verify Failed.\" />\r\n\t<error id=\"SMAPI_CERT_PROCESS_TIMEOUT\" value=\"4103\" prompt=\"CTP:SM Process Timeout.\" />\r\n\t<error id=\"SMAPI_LOGIN_ERROR\" value=\"4104\" prompt=\"CTP:Login Error.\" />\r\n\t<error id=\"SMAPI_SSL_CONNECT_TIMEOUT\" value=\"4105\" prompt=\"CTP:SSL Connect Timeout.\" />\r\n\t<error id=\"SMAPI_CERT_CONNECT_ERROR\" value=\"4106\" prompt=\"CTP:Cert Connect Error.\" />\r\n\t<error id=\"SMAPI_CERT_NOT_EXIST\" value=\"4107\" prompt=\"CTP:Cert Is Not Existed.\" />\r\n\t<error id=\"SMAPI_CERT_EXPIRED\" value=\"4108\" prompt=\"CTP:Cert Is Expired.\" />\r\n\t<error id=\"SMAPI_PIN_INCORRECT\" value=\"4109\" prompt=\"CTP:PIN Is Not Corrected.\" />\r\n\t<error id=\"SMAPI_PIN_LOCKED\" value=\"4110\" prompt=\"CTP:PIN Is Locked.\" />\r\n\t<error id=\"SMAPI_LOAD_ERROR\" value=\"4111\" prompt=\"CTP:SMApi Load Error.\" />\r\n\r\n\r\n\t<error id=\"RCAMS_COMBPRODUCTINFO_NOT_FOUND\" value=\"5000\" prompt=\"CTP:找不到RCAMS产品组合信息\" />\r\n\t<error id=\"RCAMS_SHORTOPTADJUSTPARAM_NOT_FOUND\" value=\"5001\" prompt=\"CTP:找不到RCAMS空头期权风险调整参数\" />\r\n\r\n\r\n\t<error id=\"TK_BUSY\" value=\"5002\" prompt=\"CTP:系统忙\" />\r\n\r\n\t<error id=\"NOT_SUPPORT_SECAGENT_BY_SECTRANSFER\" value=\"5050\"\r\n\t\tprompt=\"CTP:银期转账：非银期中心不支持二级代理商转账和查询\" />\r\n\t<error id=\"DUP_SEQ\" value=\"5051\" prompt=\"CTP:序号字段重复\" />\r\n\r\n\t<error id=\"OVER_SUB_INST_LIMIT\" value=\"6000\" prompt=\"CTP:sub too many insts\" />\r\n\r\n\t<error id=\"OFFSET_INSTR_PROD\" value=\"6001\" prompt=\"CTP:对冲的合约/产品设置不合法\" />\r\n\t<error id=\"OFFSET_VOLUME\" value=\"6002\" prompt=\"CTP:对冲的数量设置不合法\" />\r\n\t<error id=\"OFFSET_SETTING_DOUBLE_SET\" value=\"6004\" prompt=\"CTP:对冲设置不能重复提交，需要先撤销再设置\" />\r\n\t<error id=\"OFFSET_SETTING_REC_NOT_FOUND\" value=\"6005\" prompt=\"CTP:撤销对冲设置未找到记录\" />\r\n\t<error id=\"OFFSET_SETTING_STATUS_ERR\" value=\"6006\" prompt=\"CTP:对冲状态不对，不能撤销\" />\r\n</errors>"
  },
  {
    "path": "native/ctp_bridge/api/win/DataCollect.h",
    "content": "#ifndef DATA_COLLECT_H\r\n#define DATA_COLLECT_H\r\n\r\n#define DLL_EXPORT __declspec(dllexport)\r\n\r\n#if defined(IS_WINCOLLECT_LIB) && defined(WIN32)\r\n#ifdef LIB_DATA_COLLECT_API_EXPORT\r\n#define DATA_COLLECT_API_EXPORT __declspec(dllexport)\r\n#else\r\n#define DATA_COLLECT_API_EXPORT __declspec(dllimport)\r\n#endif\r\n#else\r\n#define DATA_COLLECT_API_EXPORT\r\n#endif\r\n\r\n/// 获取AES加密和RSA加密的终端信息 pSystemInfo的空间需要调用者自己分配\r\n/// 至少270个字节\r\n///  windows返回值定义\r\n/* 返回的int值 不为0 表示采集信息有误 具体哪个采集项有问题需要做如下判断\r\n从低位开始分别标示 终端信息 ->系统盘分区信息\r\n返回值 & （0x01 << 0） 不为0 表示终端类型未采集到\r\n返回值 & （0x01 << 1） 不为0 表示 信息采集时间获取异常\r\n返回值 & （0x01 << 2） 不为0 表示ip 获取失败\r\n（采集多个相同类型信息的场景有一个采集到 即表示采集成功） 返回值 & （0x01 << 3）\r\n不为0 表示mac 获取失败 返回值 & （0x01 << 4） 不为0 表示 设备名 获取失败 返回值\r\n& （0x01 << 5） 不为0 表示 操作系统版本 获取失败 返回值 & （0x01 << 6） 不为0\r\n表示 硬盘序列号 获取失败 返回值 & （0x01 << 7） 不为0 表示 CPU序列号 获取失败\r\n返回值 & （0x01 << 8） 不为0 表示 BIOS 获取失败\r\n返回值 & （0x01 << 9） 不为0 表示 系统盘分区信息 获取失败\r\n*/\r\n\r\n/// linux返回值定义\r\n/* 返回的int值 不为0 表示采集信息有误 具体哪个采集项有问题需要做如下判断\r\n从低位开始分别标示 终端信息 -> BIOS信息\r\n返回值 & （0x01 << 0） 不为0 表示终端类型未采集到\r\n返回值 & （0x01 << 1） 不为0 表示 信息采集时间获取异常\r\n返回值 & （0x01 << 2） 不为0 表示ip 获取失败\r\n（采集多个相同类型信息的场景有一个采集到 即表示采集成功） 返回值 & （0x01 << 3）\r\n不为0 表示mac 获取失败 返回值 & （0x01 << 4） 不为0 表示 设备名 获取失败 返回值\r\n& （0x01 << 5） 不为0 表示 操作系统版本 获取失败 返回值 & （0x01 << 6） 不为0\r\n表示 硬盘序列号 获取失败 返回值 & （0x01 << 7） 不为0 表示 CPU序列号 获取失败\r\n返回值 & （0x01 << 8） 不为0 表示 BIOS 获取失败\r\n*/\r\n\r\nDATA_COLLECT_API_EXPORT int CTP_GetSystemInfo(char *pSystemInfo, int &nLen);\r\n\r\n// 版本号格式\r\n// Sfit + 生产还是测试秘钥(pro/tst) + 秘钥版本 + 编译时间 + 版本(内部)\r\n\r\nDATA_COLLECT_API_EXPORT const char *CTP_GetDataCollectApiVersion(void);\r\n\r\n#endif\r\n"
  },
  {
    "path": "native/ctp_bridge/api/win/ThostFtdcMdApi.h",
    "content": "/////////////////////////////////////////////////////////////////////////\r\n///@system 新一代交易所系统\r\n///@company 上海期货信息技术有限公司\r\n///@file ThostFtdcMdApi.h\r\n///@brief 定义了客户端接口\r\n///@history \r\n///20060106\t赵鸿昊\t\t创建该文件\r\n/////////////////////////////////////////////////////////////////////////\r\n\r\n#if !defined(THOST_FTDCMDAPI_H)\r\n#define THOST_FTDCMDAPI_H\r\n\r\n#if _MSC_VER > 1000\r\n#pragma once\r\n#endif // _MSC_VER > 1000\r\n\r\n#include \"ThostFtdcUserApiStruct.h\"\r\n\r\n#if defined(ISLIB) && defined(WIN32)\r\n#ifdef LIB_MD_API_EXPORT\r\n#define MD_API_EXPORT __declspec(dllexport)\r\n#else\r\n#define MD_API_EXPORT __declspec(dllimport)\r\n#endif\r\n#else\r\n#define MD_API_EXPORT \r\n#endif\r\n\r\nclass CThostFtdcMdSpi\r\n{\r\npublic:\r\n\t///当客户端与交易后台建立起通信连接时（还未登录前），该方法被调用。\r\n\tvirtual void OnFrontConnected(){};\r\n\t\r\n\t///当客户端与交易后台通信连接断开时，该方法被调用。当发生这个情况后，API会自动重新连接，客户端可不做处理。\r\n\t///@param nReason 错误原因\r\n\t///        0x1001 网络读失败\r\n\t///        0x1002 网络写失败\r\n\t///        0x2001 接收心跳超时\r\n\t///        0x2002 发送心跳失败\r\n\t///        0x2003 收到错误报文\r\n\tvirtual void OnFrontDisconnected(int nReason){};\r\n\t\t\r\n\t///心跳超时警告。当长时间未收到报文时，该方法被调用。\r\n\t///@param nTimeLapse 距离上次接收报文的时间\r\n\tvirtual void OnHeartBeatWarning(int nTimeLapse){};\r\n\t\r\n\r\n\t///登录请求响应\r\n\tvirtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///登出请求响应\r\n\tvirtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询组播合约响应\r\n\tvirtual void OnRspQryMulticastInstrument(CThostFtdcMulticastInstrumentField *pMulticastInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///错误应答\r\n\tvirtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///订阅行情应答\r\n\tvirtual void OnRspSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///取消订阅行情应答\r\n\tvirtual void OnRspUnSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///订阅询价应答\r\n\tvirtual void OnRspSubForQuoteRsp(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///取消订阅询价应答\r\n\tvirtual void OnRspUnSubForQuoteRsp(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///深度行情通知\r\n\tvirtual void OnRtnDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData) {};\r\n\r\n\t///询价通知\r\n\tvirtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) {};\r\n};\r\n\r\nclass MD_API_EXPORT CThostFtdcMdApi\r\n{\r\npublic:\r\n\t///创建MdApi\r\n\t///@param pszFlowPath 存贮订阅信息文件的目录，默认为当前目录\r\n\t///@param bIsProductionMode true:使用生产版本的API  false:使用测评版本API\r\n\t///@return 创建出的UserApi\r\n\t///modify for udp marketdata\r\n\tstatic CThostFtdcMdApi *CreateFtdcMdApi(const char *pszFlowPath = \"\", const bool bIsUsingUdp=false, const bool bIsMulticast=false, bool bIsProductionMode=true);\r\n\t\r\n\t///获取API的版本信息\r\n\t///@retrun 获取到的版本号\r\n\tstatic const char *GetApiVersion();\r\n\t\r\n\t///删除接口对象本身\r\n\t///@remark 不再使用本接口对象时,调用该函数删除接口对象\r\n\tvirtual void Release() = 0;\r\n\t\r\n\t///初始化\r\n\t///@remark 初始化运行环境,只有调用后,接口才开始工作\r\n\tvirtual void Init() = 0;\r\n\t\r\n\t///等待接口线程结束运行\r\n\t///@return 线程退出代码\r\n\tvirtual int Join() = 0;\r\n\t\r\n\t///获取当前交易日\r\n\t///@retrun 获取到的交易日\r\n\t///@remark 只有登录成功后,才能得到正确的交易日\r\n\tvirtual const char *GetTradingDay() = 0;\r\n\t\r\n\t///注册前置机网络地址\r\n\t///@param pszFrontAddress：前置机网络地址。\r\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:17001”。 \r\n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。\r\n\tvirtual void RegisterFront(char *pszFrontAddress) = 0;\r\n\t\r\n\t///注册名字服务器网络地址\r\n\t///@param pszNsAddress：名字服务器网络地址。\r\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:12001”。 \r\n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。\r\n\t///@remark RegisterNameServer优先于RegisterFront\r\n\tvirtual void RegisterNameServer(char *pszNsAddress) = 0;\r\n\t\r\n\t///注册名字服务器用户信息\r\n\t///@param pFensUserInfo：用户信息。\r\n\tvirtual void RegisterFensUserInfo(CThostFtdcFensUserInfoField * pFensUserInfo) = 0;\r\n\t\r\n\t///注册回调接口\r\n\t///@param pSpi 派生自回调接口类的实例\r\n\tvirtual void RegisterSpi(CThostFtdcMdSpi *pSpi) = 0;\r\n\t\r\n\t///订阅行情。\r\n\t///@param ppInstrumentID 合约ID  \r\n\t///@param nCount 要订阅/退订行情的合约个数\r\n\t///@remark \r\n\tvirtual int SubscribeMarketData(char *ppInstrumentID[], int nCount) = 0;\r\n\r\n\t///退订行情。\r\n\t///@param ppInstrumentID 合约ID  \r\n\t///@param nCount 要订阅/退订行情的合约个数\r\n\t///@remark \r\n\tvirtual int UnSubscribeMarketData(char *ppInstrumentID[], int nCount) = 0;\r\n\t\r\n\t///订阅询价。\r\n\t///@param ppInstrumentID 合约ID  \r\n\t///@param nCount 要订阅/退订行情的合约个数\r\n\t///@remark \r\n\tvirtual int SubscribeForQuoteRsp(char *ppInstrumentID[], int nCount) = 0;\r\n\r\n\t///退订询价。\r\n\t///@param ppInstrumentID 合约ID  \r\n\t///@param nCount 要订阅/退订行情的合约个数\r\n\t///@remark \r\n\tvirtual int UnSubscribeForQuoteRsp(char *ppInstrumentID[], int nCount) = 0;\r\n\r\n\t///用户登录请求\r\n\tvirtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID) = 0;\r\n\t\r\n\r\n\t///登出请求\r\n\tvirtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0;\r\n\r\n\t///请求查询组播合约\r\n\tvirtual int ReqQryMulticastInstrument(CThostFtdcQryMulticastInstrumentField *pQryMulticastInstrument, int nRequestID) = 0;\r\nprotected:\r\n\t~CThostFtdcMdApi(){};\r\n};\r\n\r\n#endif\r\n"
  },
  {
    "path": "native/ctp_bridge/api/win/ThostFtdcTraderApi.h",
    "content": "/////////////////////////////////////////////////////////////////////////\r\n///@system 新一代交易所系统\r\n///@company 上海期货信息技术有限公司\r\n///@file ThostFtdcTraderApi.h\r\n///@brief 定义了客户端接口\r\n///@history \r\n///20060106\t赵鸿昊\t\t创建该文件\r\n/////////////////////////////////////////////////////////////////////////\r\n\r\n#if !defined(THOST_FTDCTRADERAPI_H)\r\n#define THOST_FTDCTRADERAPI_H\r\n\r\n#if _MSC_VER > 1000\r\n#pragma once\r\n#endif // _MSC_VER > 1000\r\n\r\n#include \"ThostFtdcUserApiStruct.h\"\r\n\r\n#if defined(ISLIB) && defined(WIN32)\r\n#ifdef LIB_TRADER_API_EXPORT\r\n#define TRADER_API_EXPORT __declspec(dllexport)\r\n#else\r\n#define TRADER_API_EXPORT __declspec(dllimport)\r\n#endif\r\n#else\r\n#define TRADER_API_EXPORT \r\n#endif\r\n\r\nclass CThostFtdcTraderSpi\r\n{\r\npublic:\r\n\t///当客户端与交易后台建立起通信连接时（还未登录前），该方法被调用。\r\n\tvirtual void OnFrontConnected(){};\r\n\t\r\n\t///当客户端与交易后台通信连接断开时，该方法被调用。当发生这个情况后，API会自动重新连接，客户端可不做处理。\r\n\t///@param nReason 错误原因\r\n\t///        0x1001 网络读失败\r\n\t///        0x1002 网络写失败\r\n\t///        0x2001 接收心跳超时\r\n\t///        0x2002 发送心跳失败\r\n\t///        0x2003 收到错误报文\r\n\tvirtual void OnFrontDisconnected(int nReason){};\r\n\t\t\r\n\t///心跳超时警告。当长时间未收到报文时，该方法被调用。\r\n\t///@param nTimeLapse 距离上次接收报文的时间\r\n\tvirtual void OnHeartBeatWarning(int nTimeLapse){};\r\n\t\r\n\t///客户端认证响应\r\n\tvirtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\t\r\n\r\n\t///登录请求响应\r\n\tvirtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///登出请求响应\r\n\tvirtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///用户口令更新请求响应\r\n\tvirtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///资金账户口令更新请求响应\r\n\tvirtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///查询用户当前支持的认证模式的回复\r\n\tvirtual void OnRspUserAuthMethod(CThostFtdcRspUserAuthMethodField *pRspUserAuthMethod, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///获取图形验证码请求的回复\r\n\tvirtual void OnRspGenUserCaptcha(CThostFtdcRspGenUserCaptchaField *pRspGenUserCaptcha, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///获取短信验证码请求的回复\r\n\tvirtual void OnRspGenUserText(CThostFtdcRspGenUserTextField *pRspGenUserText, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///报单录入请求响应\r\n\tvirtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///预埋单录入请求响应\r\n\tvirtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///预埋撤单录入请求响应\r\n\tvirtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///报单操作请求响应\r\n\tvirtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///查询最大报单数量响应\r\n\tvirtual void OnRspQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者结算结果确认响应\r\n\tvirtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///删除预埋单响应\r\n\tvirtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///删除预埋撤单响应\r\n\tvirtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///执行宣告录入请求响应\r\n\tvirtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///执行宣告操作请求响应\r\n\tvirtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///询价录入请求响应\r\n\tvirtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///报价录入请求响应\r\n\tvirtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///报价操作请求响应\r\n\tvirtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///批量报单操作请求响应\r\n\tvirtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///期权自对冲录入请求响应\r\n\tvirtual void OnRspOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///期权自对冲操作请求响应\r\n\tvirtual void OnRspOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///申请组合录入请求响应\r\n\tvirtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询报单响应\r\n\tvirtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询成交响应\r\n\tvirtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询投资者持仓响应\r\n\tvirtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询资金账户响应\r\n\tvirtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询投资者响应\r\n\tvirtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询交易编码响应\r\n\tvirtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询合约保证金率响应\r\n\tvirtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询合约手续费率响应\r\n\tvirtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询用户会话响应\r\n\tvirtual void OnRspQryUserSession(CThostFtdcUserSessionField *pUserSession, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询交易所响应\r\n\tvirtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询产品响应\r\n\tvirtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询合约响应\r\n\tvirtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询行情响应\r\n\tvirtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询交易员报盘机响应\r\n\tvirtual void OnRspQryTraderOffer(CThostFtdcTraderOfferField *pTraderOffer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询投资者结算结果响应\r\n\tvirtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询转帐银行响应\r\n\tvirtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询投资者持仓明细响应\r\n\tvirtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询客户通知响应\r\n\tvirtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询结算信息确认响应\r\n\tvirtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询投资者持仓明细响应\r\n\tvirtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///查询保证金监管系统经纪公司资金账户密钥响应\r\n\tvirtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询仓单折抵信息响应\r\n\tvirtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询投资者品种/跨品种保证金响应\r\n\tvirtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询交易所保证金率响应\r\n\tvirtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询交易所调整保证金率响应\r\n\tvirtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询汇率响应\r\n\tvirtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询二级代理操作员银期权限响应\r\n\tvirtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询产品报价汇率\r\n\tvirtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询产品组\r\n\tvirtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询做市商合约手续费率响应\r\n\tvirtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询做市商期权合约手续费响应\r\n\tvirtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询报单手续费响应\r\n\tvirtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询资金账户响应\r\n\tvirtual void OnRspQrySecAgentTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询二级代理商资金校验模式响应\r\n\tvirtual void OnRspQrySecAgentCheckMode(CThostFtdcSecAgentCheckModeField *pSecAgentCheckMode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询二级代理商信息响应\r\n\tvirtual void OnRspQrySecAgentTradeInfo(CThostFtdcSecAgentTradeInfoField *pSecAgentTradeInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询期权交易成本响应\r\n\tvirtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询期权合约手续费响应\r\n\tvirtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询执行宣告响应\r\n\tvirtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询询价响应\r\n\tvirtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询报价响应\r\n\tvirtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询期权自对冲响应\r\n\tvirtual void OnRspQryOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询投资单元响应\r\n\tvirtual void OnRspQryInvestUnit(CThostFtdcInvestUnitField *pInvestUnit, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询组合合约安全系数响应\r\n\tvirtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询申请组合响应\r\n\tvirtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询转帐流水响应\r\n\tvirtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询银期签约关系响应\r\n\tvirtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///错误应答\r\n\tvirtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///报单通知\r\n\tvirtual void OnRtnOrder(CThostFtdcOrderField *pOrder) {};\r\n\r\n\t///成交通知\r\n\tvirtual void OnRtnTrade(CThostFtdcTradeField *pTrade) {};\r\n\r\n\t///报单录入错误回报\r\n\tvirtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///报单操作错误回报\r\n\tvirtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///合约交易状态通知\r\n\tvirtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) {};\r\n\r\n\t///交易所公告通知\r\n\tvirtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin) {};\r\n\r\n\t///交易通知\r\n\tvirtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) {};\r\n\r\n\t///提示条件单校验错误\r\n\tvirtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) {};\r\n\r\n\t///执行宣告通知\r\n\tvirtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder) {};\r\n\r\n\t///执行宣告录入错误回报\r\n\tvirtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///执行宣告操作错误回报\r\n\tvirtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///询价录入错误回报\r\n\tvirtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///报价通知\r\n\tvirtual void OnRtnQuote(CThostFtdcQuoteField *pQuote) {};\r\n\r\n\t///报价录入错误回报\r\n\tvirtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///报价操作错误回报\r\n\tvirtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///询价通知\r\n\tvirtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) {};\r\n\r\n\t///保证金监控中心用户令牌\r\n\tvirtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken) {};\r\n\r\n\t///批量报单操作错误回报\r\n\tvirtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///期权自对冲通知\r\n\tvirtual void OnRtnOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose) {};\r\n\r\n\t///期权自对冲录入错误回报\r\n\tvirtual void OnErrRtnOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///期权自对冲操作错误回报\r\n\tvirtual void OnErrRtnOptionSelfCloseAction(CThostFtdcOptionSelfCloseActionField *pOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///申请组合通知\r\n\tvirtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction) {};\r\n\r\n\t///申请组合录入错误回报\r\n\tvirtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///请求查询签约银行响应\r\n\tvirtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询预埋单响应\r\n\tvirtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询预埋撤单响应\r\n\tvirtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询交易通知响应\r\n\tvirtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询经纪公司交易参数响应\r\n\tvirtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询经纪公司交易算法响应\r\n\tvirtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求查询监控中心用户令牌\r\n\tvirtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///银行发起银行资金转期货通知\r\n\tvirtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) {};\r\n\r\n\t///银行发起期货资金转银行通知\r\n\tvirtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) {};\r\n\r\n\t///银行发起冲正银行转期货通知\r\n\tvirtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) {};\r\n\r\n\t///银行发起冲正期货转银行通知\r\n\tvirtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) {};\r\n\r\n\t///期货发起银行资金转期货通知\r\n\tvirtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) {};\r\n\r\n\t///期货发起期货资金转银行通知\r\n\tvirtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) {};\r\n\r\n\t///系统运行时期货端手工发起冲正银行转期货请求，银行处理完毕后报盘发回的通知\r\n\tvirtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {};\r\n\r\n\t///系统运行时期货端手工发起冲正期货转银行请求，银行处理完毕后报盘发回的通知\r\n\tvirtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {};\r\n\r\n\t///期货发起查询银行余额通知\r\n\tvirtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) {};\r\n\r\n\t///期货发起银行资金转期货错误回报\r\n\tvirtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///期货发起期货资金转银行错误回报\r\n\tvirtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///系统运行时期货端手工发起冲正银行转期货错误回报\r\n\tvirtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///系统运行时期货端手工发起冲正期货转银行错误回报\r\n\tvirtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///期货发起查询银行余额错误回报\r\n\tvirtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///期货发起冲正银行转期货请求，银行处理完毕后报盘发回的通知\r\n\tvirtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) {};\r\n\r\n\t///期货发起冲正期货转银行请求，银行处理完毕后报盘发回的通知\r\n\tvirtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) {};\r\n\r\n\t///期货发起银行资金转期货应答\r\n\tvirtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///期货发起期货资金转银行应答\r\n\tvirtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///期货发起查询银行余额应答\r\n\tvirtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///银行发起银期开户通知\r\n\tvirtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) {};\r\n\r\n\t///银行发起银期销户通知\r\n\tvirtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) {};\r\n\r\n\t///银行发起变更银行账号通知\r\n\tvirtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) {};\r\n\r\n\t///请求查询分类合约响应\r\n\tvirtual void OnRspQryClassifiedInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///请求组合优惠比例响应\r\n\tvirtual void OnRspQryCombPromotionParam(CThostFtdcCombPromotionParamField *pCombPromotionParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者风险结算持仓查询响应\r\n\tvirtual void OnRspQryRiskSettleInvstPosition(CThostFtdcRiskSettleInvstPositionField *pRiskSettleInvstPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///风险结算产品查询响应\r\n\tvirtual void OnRspQryRiskSettleProductStatus(CThostFtdcRiskSettleProductStatusField *pRiskSettleProductStatus, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPBM期货合约参数查询响应\r\n\tvirtual void OnRspQrySPBMFutureParameter(CThostFtdcSPBMFutureParameterField *pSPBMFutureParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPBM期权合约参数查询响应\r\n\tvirtual void OnRspQrySPBMOptionParameter(CThostFtdcSPBMOptionParameterField *pSPBMOptionParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPBM品种内对锁仓折扣参数查询响应\r\n\tvirtual void OnRspQrySPBMIntraParameter(CThostFtdcSPBMIntraParameterField *pSPBMIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPBM跨品种抵扣参数查询响应\r\n\tvirtual void OnRspQrySPBMInterParameter(CThostFtdcSPBMInterParameterField *pSPBMInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPBM组合保证金套餐查询响应\r\n\tvirtual void OnRspQrySPBMPortfDefinition(CThostFtdcSPBMPortfDefinitionField *pSPBMPortfDefinition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者SPBM套餐选择查询响应\r\n\tvirtual void OnRspQrySPBMInvestorPortfDef(CThostFtdcSPBMInvestorPortfDefField *pSPBMInvestorPortfDef, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者新型组合保证金系数查询响应\r\n\tvirtual void OnRspQryInvestorPortfMarginRatio(CThostFtdcInvestorPortfMarginRatioField *pInvestorPortfMarginRatio, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者产品SPBM明细查询响应\r\n\tvirtual void OnRspQryInvestorProdSPBMDetail(CThostFtdcInvestorProdSPBMDetailField *pInvestorProdSPBMDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者商品组SPMM记录查询响应\r\n\tvirtual void OnRspQryInvestorCommoditySPMMMargin(CThostFtdcInvestorCommoditySPMMMarginField *pInvestorCommoditySPMMMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者商品群SPMM记录查询响应\r\n\tvirtual void OnRspQryInvestorCommodityGroupSPMMMargin(CThostFtdcInvestorCommodityGroupSPMMMarginField *pInvestorCommodityGroupSPMMMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPMM合约参数查询响应\r\n\tvirtual void OnRspQrySPMMInstParam(CThostFtdcSPMMInstParamField *pSPMMInstParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPMM产品参数查询响应\r\n\tvirtual void OnRspQrySPMMProductParam(CThostFtdcSPMMProductParamField *pSPMMProductParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///SPBM附加跨品种抵扣参数查询响应\r\n\tvirtual void OnRspQrySPBMAddOnInterParameter(CThostFtdcSPBMAddOnInterParameterField *pSPBMAddOnInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RCAMS产品组合信息查询响应\r\n\tvirtual void OnRspQryRCAMSCombProductInfo(CThostFtdcRCAMSCombProductInfoField *pRCAMSCombProductInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RCAMS同合约风险对冲参数查询响应\r\n\tvirtual void OnRspQryRCAMSInstrParameter(CThostFtdcRCAMSInstrParameterField *pRCAMSInstrParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RCAMS品种内风险对冲参数查询响应\r\n\tvirtual void OnRspQryRCAMSIntraParameter(CThostFtdcRCAMSIntraParameterField *pRCAMSIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RCAMS跨品种风险折抵参数查询响应\r\n\tvirtual void OnRspQryRCAMSInterParameter(CThostFtdcRCAMSInterParameterField *pRCAMSInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RCAMS空头期权风险调整参数查询响应\r\n\tvirtual void OnRspQryRCAMSShortOptAdjustParam(CThostFtdcRCAMSShortOptAdjustParamField *pRCAMSShortOptAdjustParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RCAMS策略组合持仓查询响应\r\n\tvirtual void OnRspQryRCAMSInvestorCombPosition(CThostFtdcRCAMSInvestorCombPositionField *pRCAMSInvestorCombPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者品种RCAMS保证金查询响应\r\n\tvirtual void OnRspQryInvestorProdRCAMSMargin(CThostFtdcInvestorProdRCAMSMarginField *pInvestorProdRCAMSMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RULE合约保证金参数查询响应\r\n\tvirtual void OnRspQryRULEInstrParameter(CThostFtdcRULEInstrParameterField *pRULEInstrParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RULE品种内对锁仓折扣参数查询响应\r\n\tvirtual void OnRspQryRULEIntraParameter(CThostFtdcRULEIntraParameterField *pRULEIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///RULE跨品种抵扣参数查询响应\r\n\tvirtual void OnRspQryRULEInterParameter(CThostFtdcRULEInterParameterField *pRULEInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者产品RULE保证金查询响应\r\n\tvirtual void OnRspQryInvestorProdRULEMargin(CThostFtdcInvestorProdRULEMarginField *pInvestorProdRULEMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者新型组合保证金开关查询响应\r\n\tvirtual void OnRspQryInvestorPortfSetting(CThostFtdcInvestorPortfSettingField *pInvestorPortfSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///投资者申报费阶梯收取记录查询响应\r\n\tvirtual void OnRspQryInvestorInfoCommRec(CThostFtdcInvestorInfoCommRecField *pInvestorInfoCommRec, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///组合腿信息查询响应\r\n\tvirtual void OnRspQryCombLeg(CThostFtdcCombLegField *pCombLeg, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///对冲设置请求响应\r\n\tvirtual void OnRspOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///对冲设置撤销请求响应\r\n\tvirtual void OnRspCancelOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n\r\n\t///对冲设置通知\r\n\tvirtual void OnRtnOffsetSetting(CThostFtdcOffsetSettingField *pOffsetSetting) {};\r\n\r\n\t///对冲设置错误回报\r\n\tvirtual void OnErrRtnOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///对冲设置撤销错误回报\r\n\tvirtual void OnErrRtnCancelOffsetSetting(CThostFtdcCancelOffsetSettingField *pCancelOffsetSetting, CThostFtdcRspInfoField *pRspInfo) {};\r\n\r\n\t///投资者对冲设置查询响应\r\n\tvirtual void OnRspQryOffsetSetting(CThostFtdcOffsetSettingField *pOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};\r\n};\r\n\r\nclass TRADER_API_EXPORT CThostFtdcTraderApi\r\n{\r\npublic:\r\n\t///创建TraderApi\r\n\t///@param pszFlowPath 存贮订阅信息文件的目录，默认为当前目录\r\n\t///@param bIsProductionMode true:使用生产版本的API  false:使用测评版本的API\r\n\t///@return 创建出的UserApi\r\n\tstatic CThostFtdcTraderApi *CreateFtdcTraderApi(const char *pszFlowPath = \"\", bool bIsProductionMode = true);\r\n\t\r\n\t///获取API的版本信息\r\n\t///@retrun 获取到的版本号\r\n\tstatic const char *GetApiVersion();\r\n\t\r\n\t///删除接口对象本身\r\n\t///@remark 不再使用本接口对象时,调用该函数删除接口对象\r\n\tvirtual void Release() = 0;\r\n\t\r\n\t///初始化\r\n\t///@remark 初始化运行环境,只有调用后,接口才开始工作\r\n\tvirtual void Init() = 0;\r\n\t\r\n\t///等待接口线程结束运行\r\n\t///@return 线程退出代码\r\n\tvirtual int Join() = 0;\r\n\t\r\n\t///获取当前交易日\r\n\t///@retrun 获取到的交易日\r\n\t///@remark 只有登录成功后,才能得到正确的交易日\r\n\tvirtual const char *GetTradingDay() = 0;\r\n\t\r\n\t///获取已连接的前置的信息\r\n\t/// @param pFrontInfo：输入输出参数，用于存储获取到的前置信息，不能为空\r\n\t/// @remark 连接成功后，可获取正确的前置地址信息\r\n\t/// @remark 登录成功后，可获取正确的前置流控信息\r\n\tvirtual void GetFrontInfo(CThostFtdcFrontInfoField* pFrontInfo) =0;\r\n\t\r\n\t///注册前置机网络地址\r\n\t///@param pszFrontAddress：前置机网络地址。\r\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:17001”。 \r\n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。\r\n\tvirtual void RegisterFront(char *pszFrontAddress) = 0;\r\n\t\r\n\t///注册名字服务器网络地址\r\n\t///@param pszNsAddress：名字服务器网络地址。\r\n\t///@remark 网络地址的格式为：“protocol://ipaddress:port”，如：”tcp://127.0.0.1:12001”。 \r\n\t///@remark “tcp”代表传输协议，“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。\r\n\t///@remark RegisterNameServer优先于RegisterFront\r\n\tvirtual void RegisterNameServer(char *pszNsAddress) = 0;\r\n\t\r\n\t///注册名字服务器用户信息\r\n\t///@param pFensUserInfo：用户信息。\r\n\tvirtual void RegisterFensUserInfo(CThostFtdcFensUserInfoField * pFensUserInfo) = 0;\r\n\t\r\n\t///注册回调接口\r\n\t///@param pSpi 派生自回调接口类的实例\r\n\tvirtual void RegisterSpi(CThostFtdcTraderSpi *pSpi) = 0;\r\n\t\r\n\t///订阅私有流。\r\n\t///@param nResumeType 私有流重传方式  \r\n\t///        THOST_TERT_RESTART:从本交易日开始重传\r\n\t///        THOST_TERT_RESUME:从上次收到的续传\r\n\t///        THOST_TERT_QUICK:只传送登录后私有流的内容\r\n\t///@remark 该方法要在Init方法前调用。若不调用则不会收到私有流的数据。\r\n\tvirtual void SubscribePrivateTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;\r\n\t\r\n\t///订阅公共流。\r\n\t///@param nResumeType 公共流重传方式  \r\n\t///        THOST_TERT_RESTART:从本交易日开始重传\r\n\t///        THOST_TERT_RESUME:从上次收到的续传\r\n\t///        THOST_TERT_QUICK:只传送登录后公共流的内容\r\n\t///        THOST_TERT_NONE:取消订阅公共流\r\n\t///@remark 该方法要在Init方法前调用。若不调用则不会收到公共流的数据。\r\n\tvirtual void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;\r\n\r\n\t///客户端认证请求\r\n\tvirtual int ReqAuthenticate(CThostFtdcReqAuthenticateField *pReqAuthenticateField, int nRequestID) = 0;\r\n\r\n\t///注册用户终端信息，用于中继服务器多连接模式\r\n\t///需要在终端认证成功后，用户登录前调用该接口\r\n\tvirtual int RegisterUserSystemInfo(CThostFtdcUserSystemInfoField *pUserSystemInfo) = 0;\r\n\r\n\t///上报用户终端信息，用于中继服务器操作员登录模式\r\n\t///操作员登录后，可以多次调用该接口上报客户信息\r\n\tvirtual int SubmitUserSystemInfo(CThostFtdcUserSystemInfoField *pUserSystemInfo) = 0;\r\n\t///注册用户终端信息，用于中继服务器多连接模式.用于微信小程序等应用上报信息.\r\n\tvirtual int RegisterWechatUserSystemInfo(CThostFtdcWechatUserSystemInfoField *pUserSystemInfo) = 0;\r\n\t///上报用户终端信息，用于中继服务器操作员登录模式.用于微信小程序等应用上报信息.\r\n\tvirtual int SubmitWechatUserSystemInfo(CThostFtdcWechatUserSystemInfoField *pUserSystemInfo) = 0;\r\n\r\n\t///用户登录请求\r\n\tvirtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID) = 0;\r\n\r\n\t///登出请求\r\n\tvirtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0;\r\n\r\n\t///用户口令更新请求\r\n\tvirtual int ReqUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, int nRequestID) = 0;\r\n\r\n\t///资金账户口令更新请求\r\n\tvirtual int ReqTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, int nRequestID) = 0;\r\n\r\n\t///查询用户当前支持的认证模式\r\n\tvirtual int ReqUserAuthMethod(CThostFtdcReqUserAuthMethodField *pReqUserAuthMethod, int nRequestID) = 0;\r\n\r\n\t///用户发出获取图形验证码请求\r\n\tvirtual int ReqGenUserCaptcha(CThostFtdcReqGenUserCaptchaField *pReqGenUserCaptcha, int nRequestID) = 0;\r\n\r\n\t///用户发出获取短信验证码请求\r\n\tvirtual int ReqGenUserText(CThostFtdcReqGenUserTextField *pReqGenUserText, int nRequestID) = 0;\r\n\r\n\t///用户发出带有图片验证码的登陆请求\r\n\tvirtual int ReqUserLoginWithCaptcha(CThostFtdcReqUserLoginWithCaptchaField *pReqUserLoginWithCaptcha, int nRequestID) = 0;\r\n\r\n\t///用户发出带有短信验证码的登陆请求\r\n\tvirtual int ReqUserLoginWithText(CThostFtdcReqUserLoginWithTextField *pReqUserLoginWithText, int nRequestID) = 0;\r\n\r\n\t///用户发出带有动态口令的登陆请求\r\n\tvirtual int ReqUserLoginWithOTP(CThostFtdcReqUserLoginWithOTPField *pReqUserLoginWithOTP, int nRequestID) = 0;\r\n\r\n\t///报单录入请求\r\n\tvirtual int ReqOrderInsert(CThostFtdcInputOrderField *pInputOrder, int nRequestID) = 0;\r\n\r\n\t///预埋单录入请求\r\n\tvirtual int ReqParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, int nRequestID) = 0;\r\n\r\n\t///预埋撤单录入请求\r\n\tvirtual int ReqParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, int nRequestID) = 0;\r\n\r\n\t///报单操作请求\r\n\tvirtual int ReqOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, int nRequestID) = 0;\r\n\r\n\t///查询最大报单数量请求\r\n\tvirtual int ReqQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, int nRequestID) = 0;\r\n\r\n\t///投资者结算结果确认\r\n\tvirtual int ReqSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, int nRequestID) = 0;\r\n\r\n\t///请求删除预埋单\r\n\tvirtual int ReqRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, int nRequestID) = 0;\r\n\r\n\t///请求删除预埋撤单\r\n\tvirtual int ReqRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, int nRequestID) = 0;\r\n\r\n\t///执行宣告录入请求\r\n\tvirtual int ReqExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, int nRequestID) = 0;\r\n\r\n\t///执行宣告操作请求\r\n\tvirtual int ReqExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, int nRequestID) = 0;\r\n\r\n\t///询价录入请求\r\n\tvirtual int ReqForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, int nRequestID) = 0;\r\n\r\n\t///报价录入请求\r\n\tvirtual int ReqQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, int nRequestID) = 0;\r\n\r\n\t///报价操作请求\r\n\tvirtual int ReqQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, int nRequestID) = 0;\r\n\r\n\t///批量报单操作请求\r\n\tvirtual int ReqBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, int nRequestID) = 0;\r\n\r\n\t///期权自对冲录入请求\r\n\tvirtual int ReqOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, int nRequestID) = 0;\r\n\r\n\t///期权自对冲操作请求\r\n\tvirtual int ReqOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, int nRequestID) = 0;\r\n\r\n\t///申请组合录入请求\r\n\tvirtual int ReqCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, int nRequestID) = 0;\r\n\r\n\t///请求查询报单\r\n\tvirtual int ReqQryOrder(CThostFtdcQryOrderField *pQryOrder, int nRequestID) = 0;\r\n\r\n\t///请求查询成交\r\n\tvirtual int ReqQryTrade(CThostFtdcQryTradeField *pQryTrade, int nRequestID) = 0;\r\n\r\n\t///请求查询投资者持仓\r\n\tvirtual int ReqQryInvestorPosition(CThostFtdcQryInvestorPositionField *pQryInvestorPosition, int nRequestID) = 0;\r\n\r\n\t///请求查询资金账户\r\n\tvirtual int ReqQryTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0;\r\n\r\n\t///请求查询投资者\r\n\tvirtual int ReqQryInvestor(CThostFtdcQryInvestorField *pQryInvestor, int nRequestID) = 0;\r\n\r\n\t///请求查询交易编码\r\n\tvirtual int ReqQryTradingCode(CThostFtdcQryTradingCodeField *pQryTradingCode, int nRequestID) = 0;\r\n\r\n\t///请求查询合约保证金率\r\n\tvirtual int ReqQryInstrumentMarginRate(CThostFtdcQryInstrumentMarginRateField *pQryInstrumentMarginRate, int nRequestID) = 0;\r\n\r\n\t///请求查询合约手续费率\r\n\tvirtual int ReqQryInstrumentCommissionRate(CThostFtdcQryInstrumentCommissionRateField *pQryInstrumentCommissionRate, int nRequestID) = 0;\r\n\r\n\t///请求查询用户会话\r\n\tvirtual int ReqQryUserSession(CThostFtdcQryUserSessionField *pQryUserSession, int nRequestID) = 0;\r\n\r\n\t///请求查询交易所\r\n\tvirtual int ReqQryExchange(CThostFtdcQryExchangeField *pQryExchange, int nRequestID) = 0;\r\n\r\n\t///请求查询产品\r\n\tvirtual int ReqQryProduct(CThostFtdcQryProductField *pQryProduct, int nRequestID) = 0;\r\n\r\n\t///请求查询合约\r\n\tvirtual int ReqQryInstrument(CThostFtdcQryInstrumentField *pQryInstrument, int nRequestID) = 0;\r\n\r\n\t///请求查询行情\r\n\tvirtual int ReqQryDepthMarketData(CThostFtdcQryDepthMarketDataField *pQryDepthMarketData, int nRequestID) = 0;\r\n\r\n\t///请求查询交易员报盘机\r\n\tvirtual int ReqQryTraderOffer(CThostFtdcQryTraderOfferField *pQryTraderOffer, int nRequestID) = 0;\r\n\r\n\t///请求查询投资者结算结果\r\n\tvirtual int ReqQrySettlementInfo(CThostFtdcQrySettlementInfoField *pQrySettlementInfo, int nRequestID) = 0;\r\n\r\n\t///请求查询转帐银行\r\n\tvirtual int ReqQryTransferBank(CThostFtdcQryTransferBankField *pQryTransferBank, int nRequestID) = 0;\r\n\r\n\t///请求查询投资者持仓明细\r\n\tvirtual int ReqQryInvestorPositionDetail(CThostFtdcQryInvestorPositionDetailField *pQryInvestorPositionDetail, int nRequestID) = 0;\r\n\r\n\t///请求查询客户通知\r\n\tvirtual int ReqQryNotice(CThostFtdcQryNoticeField *pQryNotice, int nRequestID) = 0;\r\n\r\n\t///请求查询结算信息确认\r\n\tvirtual int ReqQrySettlementInfoConfirm(CThostFtdcQrySettlementInfoConfirmField *pQrySettlementInfoConfirm, int nRequestID) = 0;\r\n\r\n\t///请求查询投资者持仓明细\r\n\tvirtual int ReqQryInvestorPositionCombineDetail(CThostFtdcQryInvestorPositionCombineDetailField *pQryInvestorPositionCombineDetail, int nRequestID) = 0;\r\n\r\n\t///请求查询保证金监管系统经纪公司资金账户密钥\r\n\tvirtual int ReqQryCFMMCTradingAccountKey(CThostFtdcQryCFMMCTradingAccountKeyField *pQryCFMMCTradingAccountKey, int nRequestID) = 0;\r\n\r\n\t///请求查询仓单折抵信息\r\n\tvirtual int ReqQryEWarrantOffset(CThostFtdcQryEWarrantOffsetField *pQryEWarrantOffset, int nRequestID) = 0;\r\n\r\n\t///请求查询投资者品种/跨品种保证金\r\n\tvirtual int ReqQryInvestorProductGroupMargin(CThostFtdcQryInvestorProductGroupMarginField *pQryInvestorProductGroupMargin, int nRequestID) = 0;\r\n\r\n\t///请求查询交易所保证金率\r\n\tvirtual int ReqQryExchangeMarginRate(CThostFtdcQryExchangeMarginRateField *pQryExchangeMarginRate, int nRequestID) = 0;\r\n\r\n\t///请求查询交易所调整保证金率\r\n\tvirtual int ReqQryExchangeMarginRateAdjust(CThostFtdcQryExchangeMarginRateAdjustField *pQryExchangeMarginRateAdjust, int nRequestID) = 0;\r\n\r\n\t///请求查询汇率\r\n\tvirtual int ReqQryExchangeRate(CThostFtdcQryExchangeRateField *pQryExchangeRate, int nRequestID) = 0;\r\n\r\n\t///请求查询二级代理操作员银期权限\r\n\tvirtual int ReqQrySecAgentACIDMap(CThostFtdcQrySecAgentACIDMapField *pQrySecAgentACIDMap, int nRequestID) = 0;\r\n\r\n\t///请求查询产品报价汇率\r\n\tvirtual int ReqQryProductExchRate(CThostFtdcQryProductExchRateField *pQryProductExchRate, int nRequestID) = 0;\r\n\r\n\t///请求查询产品组\r\n\tvirtual int ReqQryProductGroup(CThostFtdcQryProductGroupField *pQryProductGroup, int nRequestID) = 0;\r\n\r\n\t///请求查询做市商合约手续费率\r\n\tvirtual int ReqQryMMInstrumentCommissionRate(CThostFtdcQryMMInstrumentCommissionRateField *pQryMMInstrumentCommissionRate, int nRequestID) = 0;\r\n\r\n\t///请求查询做市商期权合约手续费\r\n\tvirtual int ReqQryMMOptionInstrCommRate(CThostFtdcQryMMOptionInstrCommRateField *pQryMMOptionInstrCommRate, int nRequestID) = 0;\r\n\r\n\t///请求查询报单手续费\r\n\tvirtual int ReqQryInstrumentOrderCommRate(CThostFtdcQryInstrumentOrderCommRateField *pQryInstrumentOrderCommRate, int nRequestID) = 0;\r\n\r\n\t///请求查询资金账户\r\n\tvirtual int ReqQrySecAgentTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0;\r\n\r\n\t///请求查询二级代理商资金校验模式\r\n\tvirtual int ReqQrySecAgentCheckMode(CThostFtdcQrySecAgentCheckModeField *pQrySecAgentCheckMode, int nRequestID) = 0;\r\n\r\n\t///请求查询二级代理商信息\r\n\tvirtual int ReqQrySecAgentTradeInfo(CThostFtdcQrySecAgentTradeInfoField *pQrySecAgentTradeInfo, int nRequestID) = 0;\r\n\r\n\t///请求查询期权交易成本\r\n\tvirtual int ReqQryOptionInstrTradeCost(CThostFtdcQryOptionInstrTradeCostField *pQryOptionInstrTradeCost, int nRequestID) = 0;\r\n\r\n\t///请求查询期权合约手续费\r\n\tvirtual int ReqQryOptionInstrCommRate(CThostFtdcQryOptionInstrCommRateField *pQryOptionInstrCommRate, int nRequestID) = 0;\r\n\r\n\t///请求查询执行宣告\r\n\tvirtual int ReqQryExecOrder(CThostFtdcQryExecOrderField *pQryExecOrder, int nRequestID) = 0;\r\n\r\n\t///请求查询询价\r\n\tvirtual int ReqQryForQuote(CThostFtdcQryForQuoteField *pQryForQuote, int nRequestID) = 0;\r\n\r\n\t///请求查询报价\r\n\tvirtual int ReqQryQuote(CThostFtdcQryQuoteField *pQryQuote, int nRequestID) = 0;\r\n\r\n\t///请求查询期权自对冲\r\n\tvirtual int ReqQryOptionSelfClose(CThostFtdcQryOptionSelfCloseField *pQryOptionSelfClose, int nRequestID) = 0;\r\n\r\n\t///请求查询投资单元\r\n\tvirtual int ReqQryInvestUnit(CThostFtdcQryInvestUnitField *pQryInvestUnit, int nRequestID) = 0;\r\n\r\n\t///请求查询组合合约安全系数\r\n\tvirtual int ReqQryCombInstrumentGuard(CThostFtdcQryCombInstrumentGuardField *pQryCombInstrumentGuard, int nRequestID) = 0;\r\n\r\n\t///请求查询申请组合\r\n\tvirtual int ReqQryCombAction(CThostFtdcQryCombActionField *pQryCombAction, int nRequestID) = 0;\r\n\r\n\t///请求查询转帐流水\r\n\tvirtual int ReqQryTransferSerial(CThostFtdcQryTransferSerialField *pQryTransferSerial, int nRequestID) = 0;\r\n\r\n\t///请求查询银期签约关系\r\n\tvirtual int ReqQryAccountregister(CThostFtdcQryAccountregisterField *pQryAccountregister, int nRequestID) = 0;\r\n\r\n\t///请求查询签约银行\r\n\tvirtual int ReqQryContractBank(CThostFtdcQryContractBankField *pQryContractBank, int nRequestID) = 0;\r\n\r\n\t///请求查询预埋单\r\n\tvirtual int ReqQryParkedOrder(CThostFtdcQryParkedOrderField *pQryParkedOrder, int nRequestID) = 0;\r\n\r\n\t///请求查询预埋撤单\r\n\tvirtual int ReqQryParkedOrderAction(CThostFtdcQryParkedOrderActionField *pQryParkedOrderAction, int nRequestID) = 0;\r\n\r\n\t///请求查询交易通知\r\n\tvirtual int ReqQryTradingNotice(CThostFtdcQryTradingNoticeField *pQryTradingNotice, int nRequestID) = 0;\r\n\r\n\t///请求查询经纪公司交易参数\r\n\tvirtual int ReqQryBrokerTradingParams(CThostFtdcQryBrokerTradingParamsField *pQryBrokerTradingParams, int nRequestID) = 0;\r\n\r\n\t///请求查询经纪公司交易算法\r\n\tvirtual int ReqQryBrokerTradingAlgos(CThostFtdcQryBrokerTradingAlgosField *pQryBrokerTradingAlgos, int nRequestID) = 0;\r\n\r\n\t///请求查询监控中心用户令牌\r\n\tvirtual int ReqQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, int nRequestID) = 0;\r\n\r\n\t///期货发起银行资金转期货请求\r\n\tvirtual int ReqFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;\r\n\r\n\t///期货发起期货资金转银行请求\r\n\tvirtual int ReqFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;\r\n\r\n\t///期货发起查询银行余额请求\r\n\tvirtual int ReqQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, int nRequestID) = 0;\r\n\r\n\t///请求查询分类合约\r\n\tvirtual int ReqQryClassifiedInstrument(CThostFtdcQryClassifiedInstrumentField *pQryClassifiedInstrument, int nRequestID) = 0;\r\n\r\n\t///请求组合优惠比例\r\n\tvirtual int ReqQryCombPromotionParam(CThostFtdcQryCombPromotionParamField *pQryCombPromotionParam, int nRequestID) = 0;\r\n\r\n\t///投资者风险结算持仓查询\r\n\tvirtual int ReqQryRiskSettleInvstPosition(CThostFtdcQryRiskSettleInvstPositionField *pQryRiskSettleInvstPosition, int nRequestID) = 0;\r\n\r\n\t///风险结算产品查询\r\n\tvirtual int ReqQryRiskSettleProductStatus(CThostFtdcQryRiskSettleProductStatusField *pQryRiskSettleProductStatus, int nRequestID) = 0;\r\n\r\n\t///SPBM期货合约参数查询\r\n\tvirtual int ReqQrySPBMFutureParameter(CThostFtdcQrySPBMFutureParameterField *pQrySPBMFutureParameter, int nRequestID) = 0;\r\n\r\n\t///SPBM期权合约参数查询\r\n\tvirtual int ReqQrySPBMOptionParameter(CThostFtdcQrySPBMOptionParameterField *pQrySPBMOptionParameter, int nRequestID) = 0;\r\n\r\n\t///SPBM品种内对锁仓折扣参数查询\r\n\tvirtual int ReqQrySPBMIntraParameter(CThostFtdcQrySPBMIntraParameterField *pQrySPBMIntraParameter, int nRequestID) = 0;\r\n\r\n\t///SPBM跨品种抵扣参数查询\r\n\tvirtual int ReqQrySPBMInterParameter(CThostFtdcQrySPBMInterParameterField *pQrySPBMInterParameter, int nRequestID) = 0;\r\n\r\n\t///SPBM组合保证金套餐查询\r\n\tvirtual int ReqQrySPBMPortfDefinition(CThostFtdcQrySPBMPortfDefinitionField *pQrySPBMPortfDefinition, int nRequestID) = 0;\r\n\r\n\t///投资者SPBM套餐选择查询\r\n\tvirtual int ReqQrySPBMInvestorPortfDef(CThostFtdcQrySPBMInvestorPortfDefField *pQrySPBMInvestorPortfDef, int nRequestID) = 0;\r\n\r\n\t///投资者新型组合保证金系数查询\r\n\tvirtual int ReqQryInvestorPortfMarginRatio(CThostFtdcQryInvestorPortfMarginRatioField *pQryInvestorPortfMarginRatio, int nRequestID) = 0;\r\n\r\n\t///投资者产品SPBM明细查询\r\n\tvirtual int ReqQryInvestorProdSPBMDetail(CThostFtdcQryInvestorProdSPBMDetailField *pQryInvestorProdSPBMDetail, int nRequestID) = 0;\r\n\r\n\t///投资者商品组SPMM记录查询\r\n\tvirtual int ReqQryInvestorCommoditySPMMMargin(CThostFtdcQryInvestorCommoditySPMMMarginField *pQryInvestorCommoditySPMMMargin, int nRequestID) = 0;\r\n\r\n\t///投资者商品群SPMM记录查询\r\n\tvirtual int ReqQryInvestorCommodityGroupSPMMMargin(CThostFtdcQryInvestorCommodityGroupSPMMMarginField *pQryInvestorCommodityGroupSPMMMargin, int nRequestID) = 0;\r\n\r\n\t///SPMM合约参数查询\r\n\tvirtual int ReqQrySPMMInstParam(CThostFtdcQrySPMMInstParamField *pQrySPMMInstParam, int nRequestID) = 0;\r\n\r\n\t///SPMM产品参数查询\r\n\tvirtual int ReqQrySPMMProductParam(CThostFtdcQrySPMMProductParamField *pQrySPMMProductParam, int nRequestID) = 0;\r\n\r\n\t///SPBM附加跨品种抵扣参数查询\r\n\tvirtual int ReqQrySPBMAddOnInterParameter(CThostFtdcQrySPBMAddOnInterParameterField *pQrySPBMAddOnInterParameter, int nRequestID) = 0;\r\n\r\n\t///RCAMS产品组合信息查询\r\n\tvirtual int ReqQryRCAMSCombProductInfo(CThostFtdcQryRCAMSCombProductInfoField *pQryRCAMSCombProductInfo, int nRequestID) = 0;\r\n\r\n\t///RCAMS同合约风险对冲参数查询\r\n\tvirtual int ReqQryRCAMSInstrParameter(CThostFtdcQryRCAMSInstrParameterField *pQryRCAMSInstrParameter, int nRequestID) = 0;\r\n\r\n\t///RCAMS品种内风险对冲参数查询\r\n\tvirtual int ReqQryRCAMSIntraParameter(CThostFtdcQryRCAMSIntraParameterField *pQryRCAMSIntraParameter, int nRequestID) = 0;\r\n\r\n\t///RCAMS跨品种风险折抵参数查询\r\n\tvirtual int ReqQryRCAMSInterParameter(CThostFtdcQryRCAMSInterParameterField *pQryRCAMSInterParameter, int nRequestID) = 0;\r\n\r\n\t///RCAMS空头期权风险调整参数查询\r\n\tvirtual int ReqQryRCAMSShortOptAdjustParam(CThostFtdcQryRCAMSShortOptAdjustParamField *pQryRCAMSShortOptAdjustParam, int nRequestID) = 0;\r\n\r\n\t///RCAMS策略组合持仓查询\r\n\tvirtual int ReqQryRCAMSInvestorCombPosition(CThostFtdcQryRCAMSInvestorCombPositionField *pQryRCAMSInvestorCombPosition, int nRequestID) = 0;\r\n\r\n\t///投资者品种RCAMS保证金查询\r\n\tvirtual int ReqQryInvestorProdRCAMSMargin(CThostFtdcQryInvestorProdRCAMSMarginField *pQryInvestorProdRCAMSMargin, int nRequestID) = 0;\r\n\r\n\t///RULE合约保证金参数查询\r\n\tvirtual int ReqQryRULEInstrParameter(CThostFtdcQryRULEInstrParameterField *pQryRULEInstrParameter, int nRequestID) = 0;\r\n\r\n\t///RULE品种内对锁仓折扣参数查询\r\n\tvirtual int ReqQryRULEIntraParameter(CThostFtdcQryRULEIntraParameterField *pQryRULEIntraParameter, int nRequestID) = 0;\r\n\r\n\t///RULE跨品种抵扣参数查询\r\n\tvirtual int ReqQryRULEInterParameter(CThostFtdcQryRULEInterParameterField *pQryRULEInterParameter, int nRequestID) = 0;\r\n\r\n\t///投资者产品RULE保证金查询\r\n\tvirtual int ReqQryInvestorProdRULEMargin(CThostFtdcQryInvestorProdRULEMarginField *pQryInvestorProdRULEMargin, int nRequestID) = 0;\r\n\r\n\t///投资者新型组合保证金开关查询\r\n\tvirtual int ReqQryInvestorPortfSetting(CThostFtdcQryInvestorPortfSettingField *pQryInvestorPortfSetting, int nRequestID) = 0;\r\n\r\n\t///投资者申报费阶梯收取记录查询\r\n\tvirtual int ReqQryInvestorInfoCommRec(CThostFtdcQryInvestorInfoCommRecField *pQryInvestorInfoCommRec, int nRequestID) = 0;\r\n\r\n\t///组合腿信息查询\r\n\tvirtual int ReqQryCombLeg(CThostFtdcQryCombLegField *pQryCombLeg, int nRequestID) = 0;\r\n\r\n\t///对冲设置请求\r\n\tvirtual int ReqOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, int nRequestID) = 0;\r\n\r\n\t///对冲设置撤销请求\r\n\tvirtual int ReqCancelOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, int nRequestID) = 0;\r\n\r\n\t///投资者对冲设置查询\r\n\tvirtual int ReqQryOffsetSetting(CThostFtdcQryOffsetSettingField *pQryOffsetSetting, int nRequestID) = 0;\r\nprotected:\r\n\t~CThostFtdcTraderApi(){};\r\n};\r\n\r\n#endif\r\n"
  },
  {
    "path": "native/ctp_bridge/api/win/ThostFtdcUserApiDataType.h",
    "content": "/////////////////////////////////////////////////////////////////////////\r\n///@system 新一代交易所系统\r\n///@company 上海期货信息技术有限公司\r\n///@file ThostFtdcUserApiDataType.h\r\n///@brief 定义了客户端接口使用的业务数据类型\r\n///@history \r\n///20060106\t赵鸿昊\t\t创建该文件\r\n/////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef THOST_FTDCDATATYPE_H\r\n#define THOST_FTDCDATATYPE_H\r\n\r\nenum THOST_TE_RESUME_TYPE\r\n{\r\n\tTHOST_TERT_RESTART = 0,\r\n\tTHOST_TERT_RESUME,\r\n\tTHOST_TERT_QUICK,\r\n\tTHOST_TERT_NONE\r\n};\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTraderIDType是一个交易所交易员代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTraderIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorIDType是一个投资者代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvestorIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerIDType是一个经纪公司代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBrokerIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerAbbrType是一个经纪公司简称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBrokerAbbrType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerNameType是一个经纪公司名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBrokerNameType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOldExchangeInstIDType是一个合约在交易所的代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOldExchangeInstIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeInstIDType是一个合约在交易所的代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcExchangeInstIDType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderRefType是一个报单引用类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrderRefType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcParticipantIDType是一个会员代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcParticipantIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserIDType是一个用户代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUserIDType[16];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPasswordType是一个密码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPasswordType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientIDType是一个交易编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClientIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentIDType是一个合约代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInstrumentIDType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOldInstrumentIDType是一个合约代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOldInstrumentIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentCodeType是一个合约标识码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInstrumentCodeType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMarketIDType是一个市场代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcMarketIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductNameType是一个产品名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProductNameType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeIDType是一个交易所代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcExchangeIDType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeNameType是一个交易所名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcExchangeNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeAbbrType是一个交易所简称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcExchangeAbbrType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeFlagType是一个交易所标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcExchangeFlagType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMacAddressType是一个Mac地址类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcMacAddressType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSystemIDType是一个系统编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSystemIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientLoginRemarkType是一个客户登录备注2类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClientLoginRemarkType[151];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangePropertyType是一个交易所属性类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_EXP_Normal '0'\r\n///根据成交生成报单\r\n#define THOST_FTDC_EXP_GenOrderByTrade '1'\r\n\r\ntypedef char TThostFtdcExchangePropertyType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDateType是一个日期类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDateType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTimeType是一个时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTimeType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLongTimeType是一个长时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLongTimeType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentNameType是一个合约名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInstrumentNameType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettlementGroupIDType是一个结算组代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSettlementGroupIDType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderSysIDType是一个报单编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrderSysIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeIDType是一个成交编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTradeIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommandTypeType是一个DB命令类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCommandTypeType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOldIPAddressType是一个IP地址类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOldIPAddressType[16];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIPAddressType是一个IP地址类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIPAddressType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIPPortType是一个IP端口类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcIPPortType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductInfoType是一个产品信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProductInfoType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProtocolInfoType是一个协议信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProtocolInfoType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBusinessUnitType是一个业务单元类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBusinessUnitType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDepositSeqNoType是一个出入金流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDepositSeqNoType[15];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIdentifiedCardNoType是一个证件号码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIdentifiedCardNoType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIdCardTypeType是一个证件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///组织机构代码\r\n#define THOST_FTDC_ICT_EID '0'\r\n///中国公民身份证\r\n#define THOST_FTDC_ICT_IDCard '1'\r\n///军官证\r\n#define THOST_FTDC_ICT_OfficerIDCard '2'\r\n///警官证\r\n#define THOST_FTDC_ICT_PoliceIDCard '3'\r\n///士兵证\r\n#define THOST_FTDC_ICT_SoldierIDCard '4'\r\n///户口簿\r\n#define THOST_FTDC_ICT_HouseholdRegister  '5'\r\n///护照\r\n#define THOST_FTDC_ICT_Passport '6'\r\n///台胞证\r\n#define THOST_FTDC_ICT_TaiwanCompatriotIDCard  '7'\r\n///回乡证\r\n#define THOST_FTDC_ICT_HomeComingCard '8'\r\n///营业执照号\r\n#define THOST_FTDC_ICT_LicenseNo '9'\r\n///税务登记号/当地纳税ID\r\n#define THOST_FTDC_ICT_TaxNo 'A'\r\n///港澳居民来往内地通行证\r\n#define THOST_FTDC_ICT_HMMainlandTravelPermit  'B'\r\n///台湾居民来往大陆通行证\r\n#define THOST_FTDC_ICT_TwMainlandTravelPermit 'C'\r\n///驾照\r\n#define THOST_FTDC_ICT_DrivingLicense 'D'\r\n///当地社保ID\r\n#define THOST_FTDC_ICT_SocialID 'F'\r\n///当地身份证\r\n#define THOST_FTDC_ICT_LocalID 'G'\r\n///商业登记证\r\n#define THOST_FTDC_ICT_BusinessRegistration  'H'\r\n///港澳永久性居民身份证\r\n#define THOST_FTDC_ICT_HKMCIDCard 'I'\r\n///人行开户许可证\r\n#define THOST_FTDC_ICT_AccountsPermits 'J'\r\n///外国人永久居留证\r\n#define THOST_FTDC_ICT_FrgPrmtRdCard 'K'\r\n///资管产品备案函\r\n#define THOST_FTDC_ICT_CptMngPrdLetter 'L'\r\n///港澳台居民居住证\r\n#define THOST_FTDC_ICT_HKMCTwResidencePermit 'M'\r\n///统一社会信用代码\r\n#define THOST_FTDC_ICT_UniformSocialCreditCode 'N'\r\n///机构成立证明文件\r\n#define THOST_FTDC_ICT_CorporationCertNo 'O'\r\n///其他证件\r\n#define THOST_FTDC_ICT_OtherCard 'x'\r\n\r\ntypedef char TThostFtdcIdCardTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderLocalIDType是一个本地报单编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrderLocalIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserNameType是一个用户名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUserNameType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPartyNameType是一个参与人名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPartyNameType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcErrorMsgType是一个错误信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcErrorMsgType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFieldNameType是一个字段名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFieldNameType[2049];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFieldContentType是一个字段内容类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFieldContentType[2049];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSystemNameType是一个系统名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSystemNameType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcContentType是一个消息正文类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcContentType[501];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorRangeType是一个投资者范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有\r\n#define THOST_FTDC_IR_All '1'\r\n///投资者组\r\n#define THOST_FTDC_IR_Group '2'\r\n///单一投资者\r\n#define THOST_FTDC_IR_Single '3'\r\n\r\ntypedef char TThostFtdcInvestorRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDepartmentRangeType是一个投资者范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有\r\n#define THOST_FTDC_DR_All '1'\r\n///组织架构\r\n#define THOST_FTDC_DR_Group '2'\r\n///单一投资者\r\n#define THOST_FTDC_DR_Single '3'\r\n\r\ntypedef char TThostFtdcDepartmentRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDataSyncStatusType是一个数据同步状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未同步\r\n#define THOST_FTDC_DS_Asynchronous '1'\r\n///同步中\r\n#define THOST_FTDC_DS_Synchronizing '2'\r\n///已同步\r\n#define THOST_FTDC_DS_Synchronized '3'\r\n\r\ntypedef char TThostFtdcDataSyncStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerDataSyncStatusType是一个经纪公司数据同步状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已同步\r\n#define THOST_FTDC_BDS_Synchronized '1'\r\n///同步中\r\n#define THOST_FTDC_BDS_Synchronizing '2'\r\n\r\ntypedef char TThostFtdcBrokerDataSyncStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeConnectStatusType是一个交易所连接状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///没有任何连接\r\n#define THOST_FTDC_ECS_NoConnection '1'\r\n///已经发出合约查询请求\r\n#define THOST_FTDC_ECS_QryInstrumentSent '2'\r\n///已经获取信息\r\n#define THOST_FTDC_ECS_GotInformation '9'\r\n\r\ntypedef char TThostFtdcExchangeConnectStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTraderConnectStatusType是一个交易所交易员连接状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///没有任何连接\r\n#define THOST_FTDC_TCS_NotConnected '1'\r\n///已经连接\r\n#define THOST_FTDC_TCS_Connected '2'\r\n///已经发出合约查询请求\r\n#define THOST_FTDC_TCS_QryInstrumentSent '3'\r\n///订阅私有流\r\n#define THOST_FTDC_TCS_SubPrivateFlow '4'\r\n\r\ntypedef char TThostFtdcTraderConnectStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFunctionCodeType是一个功能代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///数据异步化\r\n#define THOST_FTDC_FC_DataAsync '1'\r\n///强制用户登出\r\n#define THOST_FTDC_FC_ForceUserLogout '2'\r\n///变更管理用户口令\r\n#define THOST_FTDC_FC_UserPasswordUpdate '3'\r\n///变更经纪公司口令\r\n#define THOST_FTDC_FC_BrokerPasswordUpdate '4'\r\n///变更投资者口令\r\n#define THOST_FTDC_FC_InvestorPasswordUpdate '5'\r\n///报单插入\r\n#define THOST_FTDC_FC_OrderInsert '6'\r\n///报单操作\r\n#define THOST_FTDC_FC_OrderAction '7'\r\n///同步系统数据\r\n#define THOST_FTDC_FC_SyncSystemData '8'\r\n///同步经纪公司数据\r\n#define THOST_FTDC_FC_SyncBrokerData '9'\r\n///批量同步经纪公司数据\r\n#define THOST_FTDC_FC_BachSyncBrokerData 'A'\r\n///超级查询\r\n#define THOST_FTDC_FC_SuperQuery 'B'\r\n///预埋报单插入\r\n#define THOST_FTDC_FC_ParkedOrderInsert 'C'\r\n///预埋报单操作\r\n#define THOST_FTDC_FC_ParkedOrderAction 'D'\r\n///同步动态令牌\r\n#define THOST_FTDC_FC_SyncOTP 'E'\r\n///删除未知单\r\n#define THOST_FTDC_FC_DeleteOrder 'F'\r\n///退出紧急状态\r\n#define THOST_FTDC_FC_ExitEmergency 'G'\r\n\r\ntypedef char TThostFtdcFunctionCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerFunctionCodeType是一个经纪公司功能代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///强制用户登出\r\n#define THOST_FTDC_BFC_ForceUserLogout '1'\r\n///变更用户口令\r\n#define THOST_FTDC_BFC_UserPasswordUpdate '2'\r\n///同步经纪公司数据\r\n#define THOST_FTDC_BFC_SyncBrokerData '3'\r\n///批量同步经纪公司数据\r\n#define THOST_FTDC_BFC_BachSyncBrokerData '4'\r\n///报单插入\r\n#define THOST_FTDC_BFC_OrderInsert '5'\r\n///报单操作\r\n#define THOST_FTDC_BFC_OrderAction '6'\r\n///全部查询\r\n#define THOST_FTDC_BFC_AllQuery '7'\r\n///系统功能：登入/登出/修改密码等\r\n#define THOST_FTDC_BFC_log 'a'\r\n///基本查询：查询基础数据，如合约，交易所等常量\r\n#define THOST_FTDC_BFC_BaseQry 'b'\r\n///交易查询：如查成交，委托\r\n#define THOST_FTDC_BFC_TradeQry 'c'\r\n///交易功能：报单，撤单\r\n#define THOST_FTDC_BFC_Trade 'd'\r\n///银期转账\r\n#define THOST_FTDC_BFC_Virement 'e'\r\n///风险监控\r\n#define THOST_FTDC_BFC_Risk 'f'\r\n///查询/管理：查询会话，踢人等\r\n#define THOST_FTDC_BFC_Session 'g'\r\n///风控通知控制\r\n#define THOST_FTDC_BFC_RiskNoticeCtl 'h'\r\n///风控通知发送\r\n#define THOST_FTDC_BFC_RiskNotice 'i'\r\n///察看经纪公司资金权限\r\n#define THOST_FTDC_BFC_BrokerDeposit 'j'\r\n///资金查询\r\n#define THOST_FTDC_BFC_QueryFund 'k'\r\n///报单查询\r\n#define THOST_FTDC_BFC_QueryOrder 'l'\r\n///成交查询\r\n#define THOST_FTDC_BFC_QueryTrade 'm'\r\n///持仓查询\r\n#define THOST_FTDC_BFC_QueryPosition 'n'\r\n///行情查询\r\n#define THOST_FTDC_BFC_QueryMarketData 'o'\r\n///用户事件查询\r\n#define THOST_FTDC_BFC_QueryUserEvent 'p'\r\n///风险通知查询\r\n#define THOST_FTDC_BFC_QueryRiskNotify 'q'\r\n///出入金查询\r\n#define THOST_FTDC_BFC_QueryFundChange 'r'\r\n///投资者信息查询\r\n#define THOST_FTDC_BFC_QueryInvestor 's'\r\n///交易编码查询\r\n#define THOST_FTDC_BFC_QueryTradingCode 't'\r\n///强平\r\n#define THOST_FTDC_BFC_ForceClose 'u'\r\n///压力测试\r\n#define THOST_FTDC_BFC_PressTest 'v'\r\n///权益反算\r\n#define THOST_FTDC_BFC_RemainCalc 'w'\r\n///净持仓保证金指标\r\n#define THOST_FTDC_BFC_NetPositionInd 'x'\r\n///风险预算\r\n#define THOST_FTDC_BFC_RiskPredict 'y'\r\n///数据导出\r\n#define THOST_FTDC_BFC_DataExport 'z'\r\n///风控指标设置\r\n#define THOST_FTDC_BFC_RiskTargetSetup 'A'\r\n///行情预警\r\n#define THOST_FTDC_BFC_MarketDataWarn 'B'\r\n///业务通知查询\r\n#define THOST_FTDC_BFC_QryBizNotice 'C'\r\n///业务通知模板设置\r\n#define THOST_FTDC_BFC_CfgBizNotice 'D'\r\n///同步动态令牌\r\n#define THOST_FTDC_BFC_SyncOTP 'E'\r\n///发送业务通知\r\n#define THOST_FTDC_BFC_SendBizNotice 'F'\r\n///风险级别标准设置\r\n#define THOST_FTDC_BFC_CfgRiskLevelStd 'G'\r\n///交易终端应急功能\r\n#define THOST_FTDC_BFC_TbCommand 'H'\r\n///删除未知单\r\n#define THOST_FTDC_BFC_DeleteOrder 'J'\r\n///预埋报单插入\r\n#define THOST_FTDC_BFC_ParkedOrderInsert 'K'\r\n///预埋报单操作\r\n#define THOST_FTDC_BFC_ParkedOrderAction 'L'\r\n///资金不够仍允许行权\r\n#define THOST_FTDC_BFC_ExecOrderNoCheck 'M'\r\n///指定\r\n#define THOST_FTDC_BFC_Designate 'N'\r\n///证券处置\r\n#define THOST_FTDC_BFC_StockDisposal 'O'\r\n///席位资金预警\r\n#define THOST_FTDC_BFC_BrokerDepositWarn 'Q'\r\n///备兑不足预警\r\n#define THOST_FTDC_BFC_CoverWarn 'S'\r\n///行权试算\r\n#define THOST_FTDC_BFC_PreExecOrder 'T'\r\n///行权交收风险\r\n#define THOST_FTDC_BFC_ExecOrderRisk 'P'\r\n///持仓限额预警\r\n#define THOST_FTDC_BFC_PosiLimitWarn 'U'\r\n///持仓限额查询\r\n#define THOST_FTDC_BFC_QryPosiLimit 'V'\r\n///银期签到签退\r\n#define THOST_FTDC_BFC_FBSign 'W'\r\n///银期签约解约\r\n#define THOST_FTDC_BFC_FBAccount 'X'\r\n\r\ntypedef char TThostFtdcBrokerFunctionCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderActionStatusType是一个报单操作状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已经提交\r\n#define THOST_FTDC_OAS_Submitted 'a'\r\n///已经接受\r\n#define THOST_FTDC_OAS_Accepted 'b'\r\n///已经被拒绝\r\n#define THOST_FTDC_OAS_Rejected 'c'\r\n\r\ntypedef char TThostFtdcOrderActionStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderStatusType是一个报单状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///全部成交\r\n#define THOST_FTDC_OST_AllTraded '0'\r\n///部分成交还在队列中\r\n#define THOST_FTDC_OST_PartTradedQueueing '1'\r\n///部分成交不在队列中\r\n#define THOST_FTDC_OST_PartTradedNotQueueing '2'\r\n///未成交还在队列中\r\n#define THOST_FTDC_OST_NoTradeQueueing '3'\r\n///未成交不在队列中\r\n#define THOST_FTDC_OST_NoTradeNotQueueing '4'\r\n///撤单\r\n#define THOST_FTDC_OST_Canceled '5'\r\n///未知\r\n#define THOST_FTDC_OST_Unknown 'a'\r\n///尚未触发\r\n#define THOST_FTDC_OST_NotTouched 'b'\r\n///已触发\r\n#define THOST_FTDC_OST_Touched 'c'\r\n\r\ntypedef char TThostFtdcOrderStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderSubmitStatusType是一个报单提交状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已经提交\r\n#define THOST_FTDC_OSS_InsertSubmitted '0'\r\n///撤单已经提交\r\n#define THOST_FTDC_OSS_CancelSubmitted '1'\r\n///修改已经提交\r\n#define THOST_FTDC_OSS_ModifySubmitted '2'\r\n///已经接受\r\n#define THOST_FTDC_OSS_Accepted '3'\r\n///报单已经被拒绝\r\n#define THOST_FTDC_OSS_InsertRejected '4'\r\n///撤单已经被拒绝\r\n#define THOST_FTDC_OSS_CancelRejected '5'\r\n///改单已经被拒绝\r\n#define THOST_FTDC_OSS_ModifyRejected '6'\r\n\r\ntypedef char TThostFtdcOrderSubmitStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPositionDateType是一个持仓日期类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///今日持仓\r\n#define THOST_FTDC_PSD_Today '1'\r\n///历史持仓\r\n#define THOST_FTDC_PSD_History '2'\r\n\r\ntypedef char TThostFtdcPositionDateType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPositionDateTypeType是一个持仓日期类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///使用历史持仓\r\n#define THOST_FTDC_PDT_UseHistory '1'\r\n///不使用历史持仓\r\n#define THOST_FTDC_PDT_NoUseHistory '2'\r\n\r\ntypedef char TThostFtdcPositionDateTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradingRoleType是一个交易角色类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///代理\r\n#define THOST_FTDC_ER_Broker '1'\r\n///自营\r\n#define THOST_FTDC_ER_Host '2'\r\n///做市商\r\n#define THOST_FTDC_ER_Maker '3'\r\n\r\ntypedef char TThostFtdcTradingRoleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductClassType是一个产品类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货\r\n#define THOST_FTDC_PC_Futures '1'\r\n///期货期权\r\n#define THOST_FTDC_PC_Options '2'\r\n///组合\r\n#define THOST_FTDC_PC_Combination '3'\r\n///即期\r\n#define THOST_FTDC_PC_Spot '4'\r\n///期转现\r\n#define THOST_FTDC_PC_EFP '5'\r\n///现货期权\r\n#define THOST_FTDC_PC_SpotOption '6'\r\n///TAS合约\r\n#define THOST_FTDC_PC_TAS '7'\r\n///金属指数\r\n#define THOST_FTDC_PC_MI 'I'\r\n\r\ntypedef char TThostFtdcProductClassType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAPIProductClassType是一个产品类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货单一合约\r\n#define THOST_FTDC_APC_FutureSingle '1'\r\n///期权单一合约\r\n#define THOST_FTDC_APC_OptionSingle '2'\r\n///可交易期货(含期货组合和期货单一合约)\r\n#define THOST_FTDC_APC_Futures '3'\r\n///可交易期权(含期权组合和期权单一合约)\r\n#define THOST_FTDC_APC_Options '4'\r\n///可下单套利组合\r\n#define THOST_FTDC_APC_TradingComb '5'\r\n///可申请的组合（可以申请的组合合约 包含可以交易的合约）\r\n#define THOST_FTDC_APC_UnTradingComb '6'\r\n///所有可以交易合约\r\n#define THOST_FTDC_APC_AllTrading '7'\r\n///所有合约（包含不能交易合约 慎用）\r\n#define THOST_FTDC_APC_All '8'\r\n\r\ntypedef char TThostFtdcAPIProductClassType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstLifePhaseType是一个合约生命周期状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未上市\r\n#define THOST_FTDC_IP_NotStart '0'\r\n///上市\r\n#define THOST_FTDC_IP_Started '1'\r\n///停牌\r\n#define THOST_FTDC_IP_Pause '2'\r\n///到期\r\n#define THOST_FTDC_IP_Expired '3'\r\n\r\ntypedef char TThostFtdcInstLifePhaseType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDirectionType是一个买卖方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///买\r\n#define THOST_FTDC_D_Buy '0'\r\n///卖\r\n#define THOST_FTDC_D_Sell '1'\r\n\r\ntypedef char TThostFtdcDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPositionTypeType是一个持仓类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///净持仓\r\n#define THOST_FTDC_PT_Net '1'\r\n///综合持仓\r\n#define THOST_FTDC_PT_Gross '2'\r\n\r\ntypedef char TThostFtdcPositionTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPosiDirectionType是一个持仓多空方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///净\r\n#define THOST_FTDC_PD_Net '1'\r\n///多头\r\n#define THOST_FTDC_PD_Long '2'\r\n///空头\r\n#define THOST_FTDC_PD_Short '3'\r\n\r\ntypedef char TThostFtdcPosiDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSysSettlementStatusType是一个系统结算状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不活跃\r\n#define THOST_FTDC_SS_NonActive '1'\r\n///启动\r\n#define THOST_FTDC_SS_Startup '2'\r\n///操作\r\n#define THOST_FTDC_SS_Operating '3'\r\n///结算\r\n#define THOST_FTDC_SS_Settlement '4'\r\n///结算完成\r\n#define THOST_FTDC_SS_SettlementFinished '5'\r\n\r\ntypedef char TThostFtdcSysSettlementStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRatioAttrType是一个费率属性类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易费率\r\n#define THOST_FTDC_RA_Trade '0'\r\n///结算费率\r\n#define THOST_FTDC_RA_Settlement '1'\r\n\r\ntypedef char TThostFtdcRatioAttrType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHedgeFlagType是一个投机套保标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///投机\r\n#define THOST_FTDC_HF_Speculation '1'\r\n///套利\r\n#define THOST_FTDC_HF_Arbitrage '2'\r\n///套保\r\n#define THOST_FTDC_HF_Hedge '3'\r\n///做市商\r\n#define THOST_FTDC_HF_MarketMaker '5'\r\n///第一腿投机第二腿套保\r\n#define THOST_FTDC_HF_SpecHedge '6'\r\n///第一腿套保第二腿投机\r\n#define THOST_FTDC_HF_HedgeSpec '7'\r\n\r\ntypedef char TThostFtdcHedgeFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBillHedgeFlagType是一个投机套保标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///投机\r\n#define THOST_FTDC_BHF_Speculation '1'\r\n///套利\r\n#define THOST_FTDC_BHF_Arbitrage '2'\r\n///套保\r\n#define THOST_FTDC_BHF_Hedge '3'\r\n\r\ntypedef char TThostFtdcBillHedgeFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientIDTypeType是一个交易编码类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///投机\r\n#define THOST_FTDC_CIDT_Speculation '1'\r\n///套利\r\n#define THOST_FTDC_CIDT_Arbitrage '2'\r\n///套保\r\n#define THOST_FTDC_CIDT_Hedge '3'\r\n///做市商\r\n#define THOST_FTDC_CIDT_MarketMaker '5'\r\n\r\ntypedef char TThostFtdcClientIDTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderPriceTypeType是一个报单价格条件类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///任意价\r\n#define THOST_FTDC_OPT_AnyPrice '1'\r\n///限价\r\n#define THOST_FTDC_OPT_LimitPrice '2'\r\n///最优价\r\n#define THOST_FTDC_OPT_BestPrice '3'\r\n///最新价\r\n#define THOST_FTDC_OPT_LastPrice '4'\r\n///最新价浮动上浮1个ticks\r\n#define THOST_FTDC_OPT_LastPricePlusOneTicks '5'\r\n///最新价浮动上浮2个ticks\r\n#define THOST_FTDC_OPT_LastPricePlusTwoTicks '6'\r\n///最新价浮动上浮3个ticks\r\n#define THOST_FTDC_OPT_LastPricePlusThreeTicks '7'\r\n///卖一价\r\n#define THOST_FTDC_OPT_AskPrice1 '8'\r\n///卖一价浮动上浮1个ticks\r\n#define THOST_FTDC_OPT_AskPrice1PlusOneTicks '9'\r\n///卖一价浮动上浮2个ticks\r\n#define THOST_FTDC_OPT_AskPrice1PlusTwoTicks 'A'\r\n///卖一价浮动上浮3个ticks\r\n#define THOST_FTDC_OPT_AskPrice1PlusThreeTicks 'B'\r\n///买一价\r\n#define THOST_FTDC_OPT_BidPrice1 'C'\r\n///买一价浮动上浮1个ticks\r\n#define THOST_FTDC_OPT_BidPrice1PlusOneTicks 'D'\r\n///买一价浮动上浮2个ticks\r\n#define THOST_FTDC_OPT_BidPrice1PlusTwoTicks 'E'\r\n///买一价浮动上浮3个ticks\r\n#define THOST_FTDC_OPT_BidPrice1PlusThreeTicks 'F'\r\n///五档价\r\n#define THOST_FTDC_OPT_FiveLevelPrice 'G'\r\n\r\ntypedef char TThostFtdcOrderPriceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOffsetFlagType是一个开平标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///开仓\r\n#define THOST_FTDC_OF_Open '0'\r\n///平仓\r\n#define THOST_FTDC_OF_Close '1'\r\n///强平\r\n#define THOST_FTDC_OF_ForceClose '2'\r\n///平今\r\n#define THOST_FTDC_OF_CloseToday '3'\r\n///平昨\r\n#define THOST_FTDC_OF_CloseYesterday '4'\r\n///强减\r\n#define THOST_FTDC_OF_ForceOff '5'\r\n///本地强平\r\n#define THOST_FTDC_OF_LocalForceClose '6'\r\n\r\ntypedef char TThostFtdcOffsetFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcForceCloseReasonType是一个强平原因类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///非强平\r\n#define THOST_FTDC_FCC_NotForceClose '0'\r\n///资金不足\r\n#define THOST_FTDC_FCC_LackDeposit '1'\r\n///客户超仓\r\n#define THOST_FTDC_FCC_ClientOverPositionLimit '2'\r\n///会员超仓\r\n#define THOST_FTDC_FCC_MemberOverPositionLimit '3'\r\n///持仓非整数倍\r\n#define THOST_FTDC_FCC_NotMultiple '4'\r\n///违规\r\n#define THOST_FTDC_FCC_Violation '5'\r\n///其它\r\n#define THOST_FTDC_FCC_Other '6'\r\n///自然人临近交割\r\n#define THOST_FTDC_FCC_PersonDeliv '7'\r\n///本地强平资金不足忽略敞口\r\n#define THOST_FTDC_FCC_Notverifycapital '8'\r\n///本地强平资金不足\r\n#define THOST_FTDC_FCC_LocalLackDeposit '9'\r\n///本地强平违规持仓忽略敞口\r\n#define THOST_FTDC_FCC_LocalViolationNocheck 'a'\r\n///本地强平违规持仓\r\n#define THOST_FTDC_FCC_LocalViolation 'b'\r\n\r\ntypedef char TThostFtdcForceCloseReasonType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderTypeType是一个报单类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_ORDT_Normal '0'\r\n///报价衍生\r\n#define THOST_FTDC_ORDT_DeriveFromQuote '1'\r\n///组合衍生\r\n#define THOST_FTDC_ORDT_DeriveFromCombination '2'\r\n///组合报单\r\n#define THOST_FTDC_ORDT_Combination '3'\r\n///条件单\r\n#define THOST_FTDC_ORDT_ConditionalOrder '4'\r\n///互换单\r\n#define THOST_FTDC_ORDT_Swap '5'\r\n///大宗交易成交衍生\r\n#define THOST_FTDC_ORDT_DeriveFromBlockTrade '6'\r\n///期转现成交衍生\r\n#define THOST_FTDC_ORDT_DeriveFromEFPTrade '7'\r\n\r\ntypedef char TThostFtdcOrderTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTimeConditionType是一个有效期类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///立即完成，否则撤销\r\n#define THOST_FTDC_TC_IOC '1'\r\n///本节有效\r\n#define THOST_FTDC_TC_GFS '2'\r\n///当日有效\r\n#define THOST_FTDC_TC_GFD '3'\r\n///指定日期前有效\r\n#define THOST_FTDC_TC_GTD '4'\r\n///撤销前有效\r\n#define THOST_FTDC_TC_GTC '5'\r\n///集合竞价有效\r\n#define THOST_FTDC_TC_GFA '6'\r\n\r\ntypedef char TThostFtdcTimeConditionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVolumeConditionType是一个成交量类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///任何数量\r\n#define THOST_FTDC_VC_AV '1'\r\n///最小数量\r\n#define THOST_FTDC_VC_MV '2'\r\n///全部数量\r\n#define THOST_FTDC_VC_CV '3'\r\n\r\ntypedef char TThostFtdcVolumeConditionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcContingentConditionType是一个触发条件类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///立即\r\n#define THOST_FTDC_CC_Immediately '1'\r\n///止损\r\n#define THOST_FTDC_CC_Touch '2'\r\n///止赢\r\n#define THOST_FTDC_CC_TouchProfit '3'\r\n///预埋单\r\n#define THOST_FTDC_CC_ParkedOrder '4'\r\n///最新价大于条件价\r\n#define THOST_FTDC_CC_LastPriceGreaterThanStopPrice '5'\r\n///最新价大于等于条件价\r\n#define THOST_FTDC_CC_LastPriceGreaterEqualStopPrice '6'\r\n///最新价小于条件价\r\n#define THOST_FTDC_CC_LastPriceLesserThanStopPrice '7'\r\n///最新价小于等于条件价\r\n#define THOST_FTDC_CC_LastPriceLesserEqualStopPrice '8'\r\n///卖一价大于条件价\r\n#define THOST_FTDC_CC_AskPriceGreaterThanStopPrice '9'\r\n///卖一价大于等于条件价\r\n#define THOST_FTDC_CC_AskPriceGreaterEqualStopPrice 'A'\r\n///卖一价小于条件价\r\n#define THOST_FTDC_CC_AskPriceLesserThanStopPrice 'B'\r\n///卖一价小于等于条件价\r\n#define THOST_FTDC_CC_AskPriceLesserEqualStopPrice 'C'\r\n///买一价大于条件价\r\n#define THOST_FTDC_CC_BidPriceGreaterThanStopPrice 'D'\r\n///买一价大于等于条件价\r\n#define THOST_FTDC_CC_BidPriceGreaterEqualStopPrice 'E'\r\n///买一价小于条件价\r\n#define THOST_FTDC_CC_BidPriceLesserThanStopPrice 'F'\r\n///买一价小于等于条件价\r\n#define THOST_FTDC_CC_BidPriceLesserEqualStopPrice 'H'\r\n\r\ntypedef char TThostFtdcContingentConditionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcActionFlagType是一个操作标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///删除\r\n#define THOST_FTDC_AF_Delete '0'\r\n///修改\r\n#define THOST_FTDC_AF_Modify '3'\r\n\r\ntypedef char TThostFtdcActionFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradingRightType是一个交易权限类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///可以交易\r\n#define THOST_FTDC_TR_Allow '0'\r\n///只能平仓\r\n#define THOST_FTDC_TR_CloseOnly '1'\r\n///不能交易\r\n#define THOST_FTDC_TR_Forbidden '2'\r\n\r\ntypedef char TThostFtdcTradingRightType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderSourceType是一个报单来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///来自参与者\r\n#define THOST_FTDC_OSRC_Participant '0'\r\n///来自管理员\r\n#define THOST_FTDC_OSRC_Administrator '1'\r\n\r\ntypedef char TThostFtdcOrderSourceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeTypeType是一个成交类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///组合持仓拆分为单一持仓,初始化不应包含该类型的持仓\r\n#define THOST_FTDC_TRDT_SplitCombination '#'\r\n///普通成交\r\n#define THOST_FTDC_TRDT_Common '0'\r\n///期权执行\r\n#define THOST_FTDC_TRDT_OptionsExecution '1'\r\n///OTC成交\r\n#define THOST_FTDC_TRDT_OTC '2'\r\n///期转现衍生成交\r\n#define THOST_FTDC_TRDT_EFPDerived '3'\r\n///组合衍生成交\r\n#define THOST_FTDC_TRDT_CombinationDerived '4'\r\n///大宗交易成交\r\n#define THOST_FTDC_TRDT_BlockTrade '5'\r\n\r\ntypedef char TThostFtdcTradeTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSpecPosiTypeType是一个特殊持仓明细标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///普通持仓明细\r\n#define THOST_FTDC_SPOST_Common '#'\r\n///TAS合约成交产生的标的合约持仓明细\r\n#define THOST_FTDC_SPOST_Tas '0'\r\n\r\ntypedef char TThostFtdcSpecPosiTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPriceSourceType是一个成交价来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///前成交价\r\n#define THOST_FTDC_PSRC_LastPrice '0'\r\n///买委托价\r\n#define THOST_FTDC_PSRC_Buy '1'\r\n///卖委托价\r\n#define THOST_FTDC_PSRC_Sell '2'\r\n///场外成交价\r\n#define THOST_FTDC_PSRC_OTC '3'\r\n\r\ntypedef char TThostFtdcPriceSourceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentStatusType是一个合约交易状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///开盘前\r\n#define THOST_FTDC_IS_BeforeTrading '0'\r\n///非交易\r\n#define THOST_FTDC_IS_NoTrading '1'\r\n///连续交易\r\n#define THOST_FTDC_IS_Continous '2'\r\n///集合竞价报单\r\n#define THOST_FTDC_IS_AuctionOrdering '3'\r\n///集合竞价价格平衡\r\n#define THOST_FTDC_IS_AuctionBalance '4'\r\n///集合竞价撮合\r\n#define THOST_FTDC_IS_AuctionMatch '5'\r\n///收盘\r\n#define THOST_FTDC_IS_Closed '6'\r\n///交易业务处理\r\n#define THOST_FTDC_IS_TransactionProcessing '7'\r\n\r\ntypedef char TThostFtdcInstrumentStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstStatusEnterReasonType是一个品种进入交易状态原因类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自动切换\r\n#define THOST_FTDC_IER_Automatic '1'\r\n///手动切换\r\n#define THOST_FTDC_IER_Manual '2'\r\n///熔断\r\n#define THOST_FTDC_IER_Fuse '3'\r\n\r\ntypedef char TThostFtdcInstStatusEnterReasonType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderActionRefType是一个报单操作引用类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcOrderActionRefType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstallCountType是一个安装数量类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcInstallCountType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstallIDType是一个安装编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcInstallIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcErrorIDType是一个错误代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcErrorIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettlementIDType是一个结算编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSettlementIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVolumeType是一个数量类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcVolumeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFrontIDType是一个前置编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcFrontIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSessionIDType是一个会话编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSessionIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSequenceNoType是一个序号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSequenceNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommandNoType是一个DB命令序号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCommandNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMillisecType是一个时间（毫秒）类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcMillisecType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSecType是一个时间（秒）类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSecType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVolumeMultipleType是一个合约数量乘数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcVolumeMultipleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradingSegmentSNType是一个交易阶段编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcTradingSegmentSNType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRequestIDType是一个请求编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcRequestIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcYearType是一个年份类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcYearType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMonthType是一个月份类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcMonthType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBoolType是一个布尔型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcBoolType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPriceType是一个价格类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcPriceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombOffsetFlagType是一个组合开平标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCombOffsetFlagType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombHedgeFlagType是一个组合投机套保标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCombHedgeFlagType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRatioType是一个比率类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcRatioType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMoneyType是一个资金类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcMoneyType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLargeVolumeType是一个大额数量类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcLargeVolumeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSequenceSeriesType是一个序列系列号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef short TThostFtdcSequenceSeriesType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommPhaseNoType是一个通讯时段编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef short TThostFtdcCommPhaseNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSequenceLabelType是一个序列编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSequenceLabelType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUnderlyingMultipleType是一个基础商品乘数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcUnderlyingMultipleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPriorityType是一个优先级类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcPriorityType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcContractCodeType是一个合同编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcContractCodeType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCityType是一个市类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCityType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIsStockType是一个是否股民类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIsStockType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcChannelType是一个渠道类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcChannelType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAddressType是一个通讯地址类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAddressType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcZipCodeType是一个邮政编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcZipCodeType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTelephoneType是一个联系电话类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTelephoneType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFaxType是一个传真类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFaxType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMobileType是一个手机类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcMobileType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEMailType是一个电子邮件类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcEMailType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMemoType是一个备注类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcMemoType[161];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCompanyCodeType是一个企业代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCompanyCodeType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWebsiteType是一个网站地址类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcWebsiteType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTaxNoType是一个税务登记号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTaxNoType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBatchStatusType是一个处理状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未上传\r\n#define THOST_FTDC_BS_NoUpload '1'\r\n///已上传\r\n#define THOST_FTDC_BS_Uploaded '2'\r\n///审核失败\r\n#define THOST_FTDC_BS_Failed '3'\r\n\r\ntypedef char TThostFtdcBatchStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPropertyIDType是一个属性代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPropertyIDType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPropertyNameType是一个属性名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPropertyNameType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLicenseNoType是一个营业执照号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLicenseNoType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAgentIDType是一个经纪人代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAgentIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAgentNameType是一个经纪人名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAgentNameType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAgentGroupIDType是一个经纪人组代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAgentGroupIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAgentGroupNameType是一个经纪人组名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAgentGroupNameType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReturnStyleType是一个按品种返还方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///按所有品种\r\n#define THOST_FTDC_RS_All '1'\r\n///按品种\r\n#define THOST_FTDC_RS_ByProduct '2'\r\n\r\ntypedef char TThostFtdcReturnStyleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReturnPatternType是一个返还模式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///按成交手数\r\n#define THOST_FTDC_RP_ByVolume '1'\r\n///按留存手续费\r\n#define THOST_FTDC_RP_ByFeeOnHand '2'\r\n\r\ntypedef char TThostFtdcReturnPatternType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReturnLevelType是一个返还级别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///级别1\r\n#define THOST_FTDC_RL_Level1 '1'\r\n///级别2\r\n#define THOST_FTDC_RL_Level2 '2'\r\n///级别3\r\n#define THOST_FTDC_RL_Level3 '3'\r\n///级别4\r\n#define THOST_FTDC_RL_Level4 '4'\r\n///级别5\r\n#define THOST_FTDC_RL_Level5 '5'\r\n///级别6\r\n#define THOST_FTDC_RL_Level6 '6'\r\n///级别7\r\n#define THOST_FTDC_RL_Level7 '7'\r\n///级别8\r\n#define THOST_FTDC_RL_Level8 '8'\r\n///级别9\r\n#define THOST_FTDC_RL_Level9 '9'\r\n\r\ntypedef char TThostFtdcReturnLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReturnStandardType是一个返还标准类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///分阶段返还\r\n#define THOST_FTDC_RSD_ByPeriod '1'\r\n///按某一标准\r\n#define THOST_FTDC_RSD_ByStandard '2'\r\n\r\ntypedef char TThostFtdcReturnStandardType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMortgageTypeType是一个质押类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///质出\r\n#define THOST_FTDC_MT_Out '0'\r\n///质入\r\n#define THOST_FTDC_MT_In '1'\r\n\r\ntypedef char TThostFtdcMortgageTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorSettlementParamIDType是一个投资者结算参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///质押比例\r\n#define THOST_FTDC_ISPI_MortgageRatio '4'\r\n///保证金算法\r\n#define THOST_FTDC_ISPI_MarginWay '5'\r\n///结算单结存是否包含质押\r\n#define THOST_FTDC_ISPI_BillDeposit '9'\r\n\r\ntypedef char TThostFtdcInvestorSettlementParamIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeSettlementParamIDType是一个交易所结算参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///质押比例\r\n#define THOST_FTDC_ESPI_MortgageRatio '1'\r\n///分项资金导入项\r\n#define THOST_FTDC_ESPI_OtherFundItem '2'\r\n///分项资金入交易所出入金\r\n#define THOST_FTDC_ESPI_OtherFundImport '3'\r\n///中金所开户最低可用金额\r\n#define THOST_FTDC_ESPI_CFFEXMinPrepa '6'\r\n///郑商所结算方式\r\n#define THOST_FTDC_ESPI_CZCESettlementType '7'\r\n///交易所交割手续费收取方式\r\n#define THOST_FTDC_ESPI_ExchDelivFeeMode '9'\r\n///投资者交割手续费收取方式\r\n#define THOST_FTDC_ESPI_DelivFeeMode '0'\r\n///郑商所组合持仓保证金收取方式\r\n#define THOST_FTDC_ESPI_CZCEComMarginType 'A'\r\n///大商所套利保证金是否优惠\r\n#define THOST_FTDC_ESPI_DceComMarginType 'B'\r\n///虚值期权保证金优惠比率\r\n#define THOST_FTDC_ESPI_OptOutDisCountRate 'a'\r\n///最低保障系数\r\n#define THOST_FTDC_ESPI_OptMiniGuarantee 'b'\r\n\r\ntypedef char TThostFtdcExchangeSettlementParamIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSystemParamIDType是一个系统参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///投资者代码最小长度\r\n#define THOST_FTDC_SPI_InvestorIDMinLength '1'\r\n///投资者帐号代码最小长度\r\n#define THOST_FTDC_SPI_AccountIDMinLength '2'\r\n///投资者开户默认登录权限\r\n#define THOST_FTDC_SPI_UserRightLogon '3'\r\n///投资者交易结算单成交汇总方式\r\n#define THOST_FTDC_SPI_SettlementBillTrade '4'\r\n///统一开户更新交易编码方式\r\n#define THOST_FTDC_SPI_TradingCode '5'\r\n///结算是否判断存在未复核的出入金和分项资金\r\n#define THOST_FTDC_SPI_CheckFund '6'\r\n///是否启用手续费模板数据权限\r\n#define THOST_FTDC_SPI_CommModelRight '7'\r\n///是否启用保证金率模板数据权限\r\n#define THOST_FTDC_SPI_MarginModelRight '9'\r\n///是否规范用户才能激活\r\n#define THOST_FTDC_SPI_IsStandardActive '8'\r\n///上传的交易所结算文件路径\r\n#define THOST_FTDC_SPI_UploadSettlementFile 'U'\r\n///上报保证金监控中心文件路径\r\n#define THOST_FTDC_SPI_DownloadCSRCFile 'D'\r\n///生成的结算单文件路径\r\n#define THOST_FTDC_SPI_SettlementBillFile 'S'\r\n///证监会文件标识\r\n#define THOST_FTDC_SPI_CSRCOthersFile 'C'\r\n///投资者照片路径\r\n#define THOST_FTDC_SPI_InvestorPhoto 'P'\r\n///全结经纪公司上传文件路径\r\n#define THOST_FTDC_SPI_CSRCData 'R'\r\n///开户密码录入方式\r\n#define THOST_FTDC_SPI_InvestorPwdModel 'I'\r\n///投资者中金所结算文件下载路径\r\n#define THOST_FTDC_SPI_CFFEXInvestorSettleFile 'F'\r\n///投资者代码编码方式\r\n#define THOST_FTDC_SPI_InvestorIDType 'a'\r\n///休眠户最高权益\r\n#define THOST_FTDC_SPI_FreezeMaxReMain 'r'\r\n///手续费相关操作实时上场开关\r\n#define THOST_FTDC_SPI_IsSync 'A'\r\n///解除开仓权限限制\r\n#define THOST_FTDC_SPI_RelieveOpenLimit 'O'\r\n///是否规范用户才能休眠\r\n#define THOST_FTDC_SPI_IsStandardFreeze 'X'\r\n///郑商所是否开放所有品种套保交易\r\n#define THOST_FTDC_SPI_CZCENormalProductHedge 'B'\r\n\r\ntypedef char TThostFtdcSystemParamIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeParamIDType是一个交易系统参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///系统加密算法\r\n#define THOST_FTDC_TPID_EncryptionStandard 'E'\r\n///系统风险算法\r\n#define THOST_FTDC_TPID_RiskMode 'R'\r\n///系统风险算法是否全局 0-否 1-是\r\n#define THOST_FTDC_TPID_RiskModeGlobal 'G'\r\n///密码加密算法\r\n#define THOST_FTDC_TPID_modeEncode 'P'\r\n///价格小数位数参数\r\n#define THOST_FTDC_TPID_tickMode 'T'\r\n///用户最大会话数\r\n#define THOST_FTDC_TPID_SingleUserSessionMaxNum 'S'\r\n///最大连续登录失败数\r\n#define THOST_FTDC_TPID_LoginFailMaxNum 'L'\r\n///是否强制认证\r\n#define THOST_FTDC_TPID_IsAuthForce 'A'\r\n///是否冻结证券持仓\r\n#define THOST_FTDC_TPID_IsPosiFreeze 'F'\r\n///是否限仓\r\n#define THOST_FTDC_TPID_IsPosiLimit 'M'\r\n///郑商所询价时间间隔\r\n#define THOST_FTDC_TPID_ForQuoteTimeInterval 'Q'\r\n///是否期货限仓\r\n#define THOST_FTDC_TPID_IsFuturePosiLimit 'B'\r\n///是否期货下单频率限制\r\n#define THOST_FTDC_TPID_IsFutureOrderFreq 'C'\r\n///行权冻结是否计算盈利\r\n#define THOST_FTDC_TPID_IsExecOrderProfit 'H'\r\n///银期开户是否验证开户银行卡号是否是预留银行账户\r\n#define THOST_FTDC_TPID_IsCheckBankAcc 'I'\r\n///弱密码最后修改日期\r\n#define THOST_FTDC_TPID_PasswordDeadLine 'J'\r\n///强密码校验\r\n#define THOST_FTDC_TPID_IsStrongPassword 'K'\r\n///自有资金质押比\r\n#define THOST_FTDC_TPID_BalanceMorgage 'a'\r\n///最小密码长度\r\n#define THOST_FTDC_TPID_MinPwdLen 'O'\r\n///IP当日最大登陆失败次数\r\n#define THOST_FTDC_TPID_LoginFailMaxNumForIP 'U'\r\n///密码有效期\r\n#define THOST_FTDC_TPID_PasswordPeriod 'V'\r\n///历史密码重复限制次数\r\n#define THOST_FTDC_TPID_PwdHistoryCmp 'X'\r\n///转账是否验证预留银行账户\r\n#define THOST_FTDC_TPID_TranferChkProperty 'i'\r\n///非交易时间异常报单校验参数\r\n#define THOST_FTDC_TPID_TradeChkPhase 'j'\r\n///其他异常报单校验参数（价格和手数）\r\n#define THOST_FTDC_TPID_TradeChkPriceVol 'k'\r\n///卖出垂直价差组合新算法\r\n#define THOST_FTDC_TPID_NewBESMarginAlgo 'l'\r\n\r\ntypedef char TThostFtdcTradeParamIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettlementParamValueType是一个参数代码值类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSettlementParamValueType[256];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCounterIDType是一个计数器代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCounterIDType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorGroupNameType是一个投资者分组名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvestorGroupNameType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrandCodeType是一个牌号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBrandCodeType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWarehouseType是一个仓库类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcWarehouseType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductDateType是一个产期类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProductDateType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcGradeType是一个等级类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcGradeType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClassifyType是一个类别类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClassifyType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPositionType是一个货位类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPositionType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcYieldlyType是一个产地类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcYieldlyType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWeightType是一个公定重量类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcWeightType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSubEntryFundNoType是一个分项资金流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSubEntryFundNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileIDType是一个文件标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///资金数据\r\n#define THOST_FTDC_FI_SettlementFund 'F'\r\n///成交数据\r\n#define THOST_FTDC_FI_Trade 'T'\r\n///投资者持仓数据\r\n#define THOST_FTDC_FI_InvestorPosition 'P'\r\n///投资者分项资金数据\r\n#define THOST_FTDC_FI_SubEntryFund 'O'\r\n///组合持仓数据\r\n#define THOST_FTDC_FI_CZCECombinationPos 'C'\r\n///上报保证金监控中心数据\r\n#define THOST_FTDC_FI_CSRCData 'R'\r\n///郑商所平仓了结数据\r\n#define THOST_FTDC_FI_CZCEClose 'L'\r\n///郑商所非平仓了结数据\r\n#define THOST_FTDC_FI_CZCENoClose 'N'\r\n///持仓明细数据\r\n#define THOST_FTDC_FI_PositionDtl 'D'\r\n///期权执行文件\r\n#define THOST_FTDC_FI_OptionStrike 'S'\r\n///结算价比对文件\r\n#define THOST_FTDC_FI_SettlementPriceComparison 'M'\r\n///上期所非持仓变动明细\r\n#define THOST_FTDC_FI_NonTradePosChange 'B'\r\n\r\ntypedef char TThostFtdcFileIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileNameType是一个文件名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFileNameType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileTypeType是一个文件上传类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///结算\r\n#define THOST_FTDC_FUT_Settlement '0'\r\n///核对\r\n#define THOST_FTDC_FUT_Check '1'\r\n\r\ntypedef char TThostFtdcFileTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileFormatType是一个文件格式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///文本文件(.txt)\r\n#define THOST_FTDC_FFT_Txt '0'\r\n///压缩文件(.zip)\r\n#define THOST_FTDC_FFT_Zip '1'\r\n///DBF文件(.dbf)\r\n#define THOST_FTDC_FFT_DBF '2'\r\n\r\ntypedef char TThostFtdcFileFormatType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileUploadStatusType是一个文件状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///上传成功\r\n#define THOST_FTDC_FUS_SucceedUpload '1'\r\n///上传失败\r\n#define THOST_FTDC_FUS_FailedUpload '2'\r\n///导入成功\r\n#define THOST_FTDC_FUS_SucceedLoad '3'\r\n///导入部分成功\r\n#define THOST_FTDC_FUS_PartSucceedLoad '4'\r\n///导入失败\r\n#define THOST_FTDC_FUS_FailedLoad '5'\r\n\r\ntypedef char TThostFtdcFileUploadStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTransferDirectionType是一个移仓方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///移出\r\n#define THOST_FTDC_TD_Out '0'\r\n///移入\r\n#define THOST_FTDC_TD_In '1'\r\n\r\ntypedef char TThostFtdcTransferDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUploadModeType是一个上传文件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUploadModeType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAccountIDType是一个投资者帐号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAccountIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankFlagType是一个银行统一标识类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankFlagType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankAccountType是一个银行账户类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankAccountType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOpenNameType是一个银行账户的开户人名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOpenNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOpenBankType是一个银行账户的开户行类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOpenBankType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankNameType是一个银行名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankNameType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPublishPathType是一个发布路径类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPublishPathType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOperatorIDType是一个操作员代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOperatorIDType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMonthCountType是一个月份数量类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcMonthCountType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAdvanceMonthArrayType是一个月份提前数组类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAdvanceMonthArrayType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDateExprType是一个日期表达式类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDateExprType[1025];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentIDExprType是一个合约代码表达式类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInstrumentIDExprType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentNameExprType是一个合约名称表达式类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInstrumentNameExprType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSpecialCreateRuleType是一个特殊的创建规则类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///没有特殊创建规则\r\n#define THOST_FTDC_SC_NoSpecialRule '0'\r\n///不包含春节\r\n#define THOST_FTDC_SC_NoSpringFestival '1'\r\n\r\ntypedef char TThostFtdcSpecialCreateRuleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBasisPriceTypeType是一个挂牌基准价类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///上一合约结算价\r\n#define THOST_FTDC_IPT_LastSettlement '1'\r\n///上一合约收盘价\r\n#define THOST_FTDC_IPT_LaseClose '2'\r\n\r\ntypedef char TThostFtdcBasisPriceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductLifePhaseType是一个产品生命周期状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///活跃\r\n#define THOST_FTDC_PLP_Active '1'\r\n///不活跃\r\n#define THOST_FTDC_PLP_NonActive '2'\r\n///注销\r\n#define THOST_FTDC_PLP_Canceled '3'\r\n\r\ntypedef char TThostFtdcProductLifePhaseType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDeliveryModeType是一个交割方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///现金交割\r\n#define THOST_FTDC_DM_CashDeliv '1'\r\n///实物交割\r\n#define THOST_FTDC_DM_CommodityDeliv '2'\r\n\r\ntypedef char TThostFtdcDeliveryModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLogLevelType是一个日志级别类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLogLevelType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProcessNameType是一个存储过程名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProcessNameType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOperationMemoType是一个操作摘要类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOperationMemoType[1025];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundIOTypeType是一个出入金类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///出入金\r\n#define THOST_FTDC_FIOT_FundIO '1'\r\n///银期转帐\r\n#define THOST_FTDC_FIOT_Transfer '2'\r\n///银期换汇\r\n#define THOST_FTDC_FIOT_SwapCurrency '3'\r\n\r\ntypedef char TThostFtdcFundIOTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundTypeType是一个资金类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行存款\r\n#define THOST_FTDC_FT_Deposite '1'\r\n///分项资金\r\n#define THOST_FTDC_FT_ItemFund '2'\r\n///公司调整\r\n#define THOST_FTDC_FT_Company '3'\r\n///资金内转\r\n#define THOST_FTDC_FT_InnerTransfer '4'\r\n\r\ntypedef char TThostFtdcFundTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundDirectionType是一个出入金方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///入金\r\n#define THOST_FTDC_FD_In '1'\r\n///出金\r\n#define THOST_FTDC_FD_Out '2'\r\n\r\ntypedef char TThostFtdcFundDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundStatusType是一个资金状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已录入\r\n#define THOST_FTDC_FS_Record '1'\r\n///已复核\r\n#define THOST_FTDC_FS_Check '2'\r\n///已冲销\r\n#define THOST_FTDC_FS_Charge '3'\r\n\r\ntypedef char TThostFtdcFundStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBillNoType是一个票据号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBillNoType[15];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBillNameType是一个票据名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBillNameType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPublishStatusType是一个发布状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未发布\r\n#define THOST_FTDC_PS_None '1'\r\n///正在发布\r\n#define THOST_FTDC_PS_Publishing '2'\r\n///已发布\r\n#define THOST_FTDC_PS_Published '3'\r\n\r\ntypedef char TThostFtdcPublishStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEnumValueIDType是一个枚举值代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcEnumValueIDType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEnumValueTypeType是一个枚举值类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcEnumValueTypeType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEnumValueLabelType是一个枚举值名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcEnumValueLabelType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEnumValueResultType是一个枚举值结果类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcEnumValueResultType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSystemStatusType是一个系统状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不活跃\r\n#define THOST_FTDC_ES_NonActive '1'\r\n///启动\r\n#define THOST_FTDC_ES_Startup '2'\r\n///交易开始初始化\r\n#define THOST_FTDC_ES_Initialize '3'\r\n///交易完成初始化\r\n#define THOST_FTDC_ES_Initialized '4'\r\n///收市开始\r\n#define THOST_FTDC_ES_Close '5'\r\n///收市完成\r\n#define THOST_FTDC_ES_Closed '6'\r\n///结算\r\n#define THOST_FTDC_ES_Settlement '7'\r\n\r\ntypedef char TThostFtdcSystemStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettlementStatusType是一个结算状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///初始\r\n#define THOST_FTDC_STS_Initialize '0'\r\n///结算中\r\n#define THOST_FTDC_STS_Settlementing '1'\r\n///已结算\r\n#define THOST_FTDC_STS_Settlemented '2'\r\n///结算完成\r\n#define THOST_FTDC_STS_Finished '3'\r\n\r\ntypedef char TThostFtdcSettlementStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRangeIntTypeType是一个限定值类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRangeIntTypeType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRangeIntFromType是一个限定值下限类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRangeIntFromType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRangeIntToType是一个限定值上限类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRangeIntToType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFunctionIDType是一个功能代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFunctionIDType[25];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFunctionValueCodeType是一个功能编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFunctionValueCodeType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFunctionNameType是一个功能名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFunctionNameType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRoleIDType是一个角色编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRoleIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRoleNameType是一个角色名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRoleNameType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDescriptionType是一个描述类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDescriptionType[401];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombineIDType是一个组合编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCombineIDType[25];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombineTypeType是一个组合类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCombineTypeType[25];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorTypeType是一个投资者类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自然人\r\n#define THOST_FTDC_CT_Person '0'\r\n///法人\r\n#define THOST_FTDC_CT_Company '1'\r\n///投资基金\r\n#define THOST_FTDC_CT_Fund '2'\r\n///特殊法人\r\n#define THOST_FTDC_CT_SpecialOrgan '3'\r\n///资管户\r\n#define THOST_FTDC_CT_Asset '4'\r\n\r\ntypedef char TThostFtdcInvestorTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerTypeType是一个经纪公司类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易会员\r\n#define THOST_FTDC_BT_Trade '0'\r\n///交易结算会员\r\n#define THOST_FTDC_BT_TradeSettle '1'\r\n\r\ntypedef char TThostFtdcBrokerTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRiskLevelType是一个风险等级类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///低风险客户\r\n#define THOST_FTDC_FAS_Low '1'\r\n///普通客户\r\n#define THOST_FTDC_FAS_Normal '2'\r\n///关注客户\r\n#define THOST_FTDC_FAS_Focus '3'\r\n///风险客户\r\n#define THOST_FTDC_FAS_Risk '4'\r\n\r\ntypedef char TThostFtdcRiskLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFeeAcceptStyleType是一个手续费收取方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///按交易收取\r\n#define THOST_FTDC_FAS_ByTrade '1'\r\n///按交割收取\r\n#define THOST_FTDC_FAS_ByDeliv '2'\r\n///不收\r\n#define THOST_FTDC_FAS_None '3'\r\n///按指定手续费收取\r\n#define THOST_FTDC_FAS_FixFee '4'\r\n\r\ntypedef char TThostFtdcFeeAcceptStyleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPasswordTypeType是一个密码类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易密码\r\n#define THOST_FTDC_PWDT_Trade '1'\r\n///资金密码\r\n#define THOST_FTDC_PWDT_Account '2'\r\n\r\ntypedef char TThostFtdcPasswordTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAlgorithmType是一个盈亏算法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///浮盈浮亏都计算\r\n#define THOST_FTDC_AG_All '1'\r\n///浮盈不计，浮亏计\r\n#define THOST_FTDC_AG_OnlyLost '2'\r\n///浮盈计，浮亏不计\r\n#define THOST_FTDC_AG_OnlyGain '3'\r\n///浮盈浮亏都不计算\r\n#define THOST_FTDC_AG_None '4'\r\n\r\ntypedef char TThostFtdcAlgorithmType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIncludeCloseProfitType是一个是否包含平仓盈利类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///包含平仓盈利\r\n#define THOST_FTDC_ICP_Include '0'\r\n///不包含平仓盈利\r\n#define THOST_FTDC_ICP_NotInclude '2'\r\n\r\ntypedef char TThostFtdcIncludeCloseProfitType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAllWithoutTradeType是一个是否受可提比例限制类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///无仓无成交不受可提比例限制\r\n#define THOST_FTDC_AWT_Enable '0'\r\n///受可提比例限制\r\n#define THOST_FTDC_AWT_Disable '2'\r\n///无仓不受可提比例限制\r\n#define THOST_FTDC_AWT_NoHoldEnable '3'\r\n\r\ntypedef char TThostFtdcAllWithoutTradeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommentType是一个盈亏算法说明类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCommentType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVersionType是一个版本号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcVersionType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeCodeType是一个交易代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTradeCodeType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeDateType是一个交易日期类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTradeDateType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeTimeType是一个交易时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTradeTimeType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeSerialType是一个发起方流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTradeSerialType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeSerialNoType是一个发起方流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcTradeSerialNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureIDType是一个期货公司代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankIDType是一个银行代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankIDType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankBrchIDType是一个银行分中心代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankBrchIDType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankBranchIDType是一个分中心代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankBranchIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOperNoType是一个交易柜员类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOperNoType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDeviceIDType是一个渠道标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDeviceIDType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRecordNumType是一个记录数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRecordNumType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureAccountType是一个期货资金账号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureAccountType[22];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFuturePwdFlagType是一个资金密码核对标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不核对\r\n#define THOST_FTDC_FPWD_UnCheck '0'\r\n///核对\r\n#define THOST_FTDC_FPWD_Check '1'\r\n\r\ntypedef char TThostFtdcFuturePwdFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTransferTypeType是一个银期转账类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行转期货\r\n#define THOST_FTDC_TT_BankToFuture '0'\r\n///期货转银行\r\n#define THOST_FTDC_TT_FutureToBank '1'\r\n\r\ntypedef char TThostFtdcTransferTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureAccPwdType是一个期货资金密码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureAccPwdType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrencyCodeType是一个币种类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCurrencyCodeType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRetCodeType是一个响应代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRetCodeType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRetInfoType是一个响应信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRetInfoType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeAmtType是一个银行总余额类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTradeAmtType[20];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUseAmtType是一个银行可用余额类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUseAmtType[20];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFetchAmtType是一个银行可取余额类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFetchAmtType[20];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTransferValidFlagType是一个转账有效标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///无效或失败\r\n#define THOST_FTDC_TVF_Invalid '0'\r\n///有效\r\n#define THOST_FTDC_TVF_Valid '1'\r\n///冲正\r\n#define THOST_FTDC_TVF_Reverse '2'\r\n\r\ntypedef char TThostFtdcTransferValidFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCertCodeType是一个证件号码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCertCodeType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReasonType是一个事由类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///错单\r\n#define THOST_FTDC_RN_CD '0'\r\n///资金在途\r\n#define THOST_FTDC_RN_ZT '1'\r\n///其它\r\n#define THOST_FTDC_RN_QT '2'\r\n\r\ntypedef char TThostFtdcReasonType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundProjectIDType是一个资金项目编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFundProjectIDType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSexType是一个性别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未知\r\n#define THOST_FTDC_SEX_None '0'\r\n///男\r\n#define THOST_FTDC_SEX_Man '1'\r\n///女\r\n#define THOST_FTDC_SEX_Woman '2'\r\n\r\ntypedef char TThostFtdcSexType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProfessionType是一个职业类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProfessionType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcNationalType是一个国籍类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcNationalType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProvinceType是一个省类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProvinceType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRegionType是一个区类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRegionType[16];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCountryType是一个国家类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCountryType[16];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLicenseNOType是一个营业执照类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLicenseNOType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCompanyTypeType是一个企业性质类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCompanyTypeType[16];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBusinessScopeType是一个经营范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBusinessScopeType[1001];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCapitalCurrencyType是一个注册资本币种类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCapitalCurrencyType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserTypeType是一个用户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///投资者\r\n#define THOST_FTDC_UT_Investor '0'\r\n///操作员\r\n#define THOST_FTDC_UT_Operator '1'\r\n///管理员\r\n#define THOST_FTDC_UT_SuperUser '2'\r\n\r\ntypedef char TThostFtdcUserTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBranchIDType是一个营业部编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBranchIDType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRateTypeType是一个费率类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///保证金率\r\n#define THOST_FTDC_RATETYPE_MarginRate '2'\r\n\r\ntypedef char TThostFtdcRateTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcNoteTypeType是一个通知类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易结算单\r\n#define THOST_FTDC_NOTETYPE_TradeSettleBill '1'\r\n///交易结算月报\r\n#define THOST_FTDC_NOTETYPE_TradeSettleMonth '2'\r\n///追加保证金通知书\r\n#define THOST_FTDC_NOTETYPE_CallMarginNotes '3'\r\n///强行平仓通知书\r\n#define THOST_FTDC_NOTETYPE_ForceCloseNotes '4'\r\n///成交通知书\r\n#define THOST_FTDC_NOTETYPE_TradeNotes '5'\r\n///交割通知书\r\n#define THOST_FTDC_NOTETYPE_DelivNotes '6'\r\n\r\ntypedef char TThostFtdcNoteTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettlementStyleType是一个结算单方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///逐日盯市\r\n#define THOST_FTDC_SBS_Day '1'\r\n///逐笔对冲\r\n#define THOST_FTDC_SBS_Volume '2'\r\n\r\ntypedef char TThostFtdcSettlementStyleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerDNSType是一个域名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBrokerDNSType[256];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSentenceType是一个语句类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSentenceType[501];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettlementBillTypeType是一个结算单类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///日报\r\n#define THOST_FTDC_ST_Day '0'\r\n///月报\r\n#define THOST_FTDC_ST_Month '1'\r\n\r\ntypedef char TThostFtdcSettlementBillTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserRightTypeType是一个客户权限类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///登录\r\n#define THOST_FTDC_URT_Logon '1'\r\n///银期转帐\r\n#define THOST_FTDC_URT_Transfer '2'\r\n///邮寄结算单\r\n#define THOST_FTDC_URT_EMail '3'\r\n///传真结算单\r\n#define THOST_FTDC_URT_Fax '4'\r\n///条件单\r\n#define THOST_FTDC_URT_ConditionOrder '5'\r\n\r\ntypedef char TThostFtdcUserRightTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMarginPriceTypeType是一个保证金价格类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///昨结算价\r\n#define THOST_FTDC_MPT_PreSettlementPrice '1'\r\n///最新价\r\n#define THOST_FTDC_MPT_SettlementPrice '2'\r\n///成交均价\r\n#define THOST_FTDC_MPT_AveragePrice '3'\r\n///开仓价\r\n#define THOST_FTDC_MPT_OpenPrice '4'\r\n\r\ntypedef char TThostFtdcMarginPriceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBillGenStatusType是一个结算单生成状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未生成\r\n#define THOST_FTDC_BGS_None '0'\r\n///生成中\r\n#define THOST_FTDC_BGS_NoGenerated '1'\r\n///已生成\r\n#define THOST_FTDC_BGS_Generated '2'\r\n\r\ntypedef char TThostFtdcBillGenStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAlgoTypeType是一个算法类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///持仓处理算法\r\n#define THOST_FTDC_AT_HandlePositionAlgo '1'\r\n///寻找保证金率算法\r\n#define THOST_FTDC_AT_FindMarginRateAlgo '2'\r\n\r\ntypedef char TThostFtdcAlgoTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHandlePositionAlgoIDType是一个持仓处理算法编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///基本\r\n#define THOST_FTDC_HPA_Base '1'\r\n///大连商品交易所\r\n#define THOST_FTDC_HPA_DCE '2'\r\n///郑州商品交易所\r\n#define THOST_FTDC_HPA_CZCE '3'\r\n\r\ntypedef char TThostFtdcHandlePositionAlgoIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFindMarginRateAlgoIDType是一个寻找保证金率算法编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///基本\r\n#define THOST_FTDC_FMRA_Base '1'\r\n///大连商品交易所\r\n#define THOST_FTDC_FMRA_DCE '2'\r\n///郑州商品交易所\r\n#define THOST_FTDC_FMRA_CZCE '3'\r\n\r\ntypedef char TThostFtdcFindMarginRateAlgoIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHandleTradingAccountAlgoIDType是一个资金处理算法编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///基本\r\n#define THOST_FTDC_HTAA_Base '1'\r\n///大连商品交易所\r\n#define THOST_FTDC_HTAA_DCE '2'\r\n///郑州商品交易所\r\n#define THOST_FTDC_HTAA_CZCE '3'\r\n\r\ntypedef char TThostFtdcHandleTradingAccountAlgoIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPersonTypeType是一个联系人类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///指定下单人\r\n#define THOST_FTDC_PST_Order '1'\r\n///开户授权人\r\n#define THOST_FTDC_PST_Open '2'\r\n///资金调拨人\r\n#define THOST_FTDC_PST_Fund '3'\r\n///结算单确认人\r\n#define THOST_FTDC_PST_Settlement '4'\r\n///法人\r\n#define THOST_FTDC_PST_Company '5'\r\n///法人代表\r\n#define THOST_FTDC_PST_Corporation '6'\r\n///投资者联系人\r\n#define THOST_FTDC_PST_LinkMan '7'\r\n///分户管理资产负责人\r\n#define THOST_FTDC_PST_Ledger '8'\r\n///托（保）管人\r\n#define THOST_FTDC_PST_Trustee '9'\r\n///托（保）管机构法人代表\r\n#define THOST_FTDC_PST_TrusteeCorporation 'A'\r\n///托（保）管机构开户授权人\r\n#define THOST_FTDC_PST_TrusteeOpen 'B'\r\n///托（保）管机构联系人\r\n#define THOST_FTDC_PST_TrusteeContact 'C'\r\n///境外自然人参考证件\r\n#define THOST_FTDC_PST_ForeignerRefer 'D'\r\n///法人代表参考证件\r\n#define THOST_FTDC_PST_CorporationRefer 'E'\r\n\r\ntypedef char TThostFtdcPersonTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcQueryInvestorRangeType是一个查询范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有\r\n#define THOST_FTDC_QIR_All '1'\r\n///查询分类\r\n#define THOST_FTDC_QIR_Group '2'\r\n///单一投资者\r\n#define THOST_FTDC_QIR_Single '3'\r\n\r\ntypedef char TThostFtdcQueryInvestorRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorRiskStatusType是一个投资者风险状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_IRS_Normal '1'\r\n///警告\r\n#define THOST_FTDC_IRS_Warn '2'\r\n///追保\r\n#define THOST_FTDC_IRS_Call '3'\r\n///强平\r\n#define THOST_FTDC_IRS_Force '4'\r\n///异常\r\n#define THOST_FTDC_IRS_Exception '5'\r\n\r\ntypedef char TThostFtdcInvestorRiskStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLegIDType是一个单腿编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcLegIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLegMultipleType是一个单腿乘数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcLegMultipleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcImplyLevelType是一个派生层数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcImplyLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClearAccountType是一个结算账户类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClearAccountType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrganNOType是一个结算账户类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrganNOType[6];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClearbarchIDType是一个结算账户联行号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClearbarchIDType[6];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserEventTypeType是一个用户事件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///登录\r\n#define THOST_FTDC_UET_Login '1'\r\n///登出\r\n#define THOST_FTDC_UET_Logout '2'\r\n///CTP校验通过\r\n#define THOST_FTDC_UET_Trading '3'\r\n///CTP校验失败\r\n#define THOST_FTDC_UET_TradingError '4'\r\n///修改密码\r\n#define THOST_FTDC_UET_UpdatePassword '5'\r\n///客户端认证\r\n#define THOST_FTDC_UET_Authenticate '6'\r\n///终端信息上报\r\n#define THOST_FTDC_UET_SubmitSysInfo '7'\r\n///转账\r\n#define THOST_FTDC_UET_Transfer '8'\r\n///其他\r\n#define THOST_FTDC_UET_Other '9'\r\n///修改资金密码\r\n#define THOST_FTDC_UET_UpdateTradingAccountPassword 'a'\r\n\r\ntypedef char TThostFtdcUserEventTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserEventInfoType是一个用户事件信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUserEventInfoType[1025];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCloseStyleType是一个平仓方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///先开先平\r\n#define THOST_FTDC_ICS_Close '0'\r\n///先平今再平昨\r\n#define THOST_FTDC_ICS_CloseToday '1'\r\n\r\ntypedef char TThostFtdcCloseStyleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStatModeType是一个统计方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///----\r\n#define THOST_FTDC_SM_Non '0'\r\n///按合约统计\r\n#define THOST_FTDC_SM_Instrument '1'\r\n///按产品统计\r\n#define THOST_FTDC_SM_Product '2'\r\n///按投资者统计\r\n#define THOST_FTDC_SM_Investor '3'\r\n\r\ntypedef char TThostFtdcStatModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcParkedOrderStatusType是一个预埋单状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未发送\r\n#define THOST_FTDC_PAOS_NotSend '1'\r\n///已发送\r\n#define THOST_FTDC_PAOS_Send '2'\r\n///已删除\r\n#define THOST_FTDC_PAOS_Deleted '3'\r\n\r\ntypedef char TThostFtdcParkedOrderStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcParkedOrderIDType是一个预埋报单编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcParkedOrderIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcParkedOrderActionIDType是一个预埋撤单编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcParkedOrderActionIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVirDealStatusType是一个处理状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正在处理\r\n#define THOST_FTDC_VDS_Dealing '1'\r\n///处理成功\r\n#define THOST_FTDC_VDS_DeaclSucceed '2'\r\n\r\ntypedef char TThostFtdcVirDealStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrgSystemIDType是一个原有系统代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///综合交易平台\r\n#define THOST_FTDC_ORGS_Standard '0'\r\n///易盛系统\r\n#define THOST_FTDC_ORGS_ESunny '1'\r\n///金仕达V6系统\r\n#define THOST_FTDC_ORGS_KingStarV6 '2'\r\n\r\ntypedef char TThostFtdcOrgSystemIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVirTradeStatusType是一个交易状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常处理中\r\n#define THOST_FTDC_VTS_NaturalDeal '0'\r\n///成功结束\r\n#define THOST_FTDC_VTS_SucceedEnd '1'\r\n///失败结束\r\n#define THOST_FTDC_VTS_FailedEND '2'\r\n///异常中\r\n#define THOST_FTDC_VTS_Exception '3'\r\n///已人工异常处理\r\n#define THOST_FTDC_VTS_ManualDeal '4'\r\n///通讯异常 ，请人工处理\r\n#define THOST_FTDC_VTS_MesException '5'\r\n///系统出错，请人工处理\r\n#define THOST_FTDC_VTS_SysException '6'\r\n\r\ntypedef char TThostFtdcVirTradeStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVirBankAccTypeType是一个银行帐户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///存折\r\n#define THOST_FTDC_VBAT_BankBook '1'\r\n///储蓄卡\r\n#define THOST_FTDC_VBAT_BankCard '2'\r\n///信用卡\r\n#define THOST_FTDC_VBAT_CreditCard '3'\r\n\r\ntypedef char TThostFtdcVirBankAccTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVirementStatusType是一个银行帐户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_VMS_Natural '0'\r\n///销户\r\n#define THOST_FTDC_VMS_Canceled '9'\r\n\r\ntypedef char TThostFtdcVirementStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVirementAvailAbilityType是一个有效标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未确认\r\n#define THOST_FTDC_VAA_NoAvailAbility '0'\r\n///有效\r\n#define THOST_FTDC_VAA_AvailAbility '1'\r\n///冲正\r\n#define THOST_FTDC_VAA_Repeal '2'\r\n\r\ntypedef char TThostFtdcVirementAvailAbilityType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcVirementTradeCodeType是一个交易代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行发起银行资金转期货\r\n#define THOST_FTDC_VTC_BankBankToFuture '102001'\r\n///银行发起期货资金转银行\r\n#define THOST_FTDC_VTC_BankFutureToBank '102002'\r\n///期货发起银行资金转期货\r\n#define THOST_FTDC_VTC_FutureBankToFuture '202001'\r\n///期货发起期货资金转银行\r\n#define THOST_FTDC_VTC_FutureFutureToBank '202002'\r\n\r\ntypedef char TThostFtdcVirementTradeCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPhotoTypeNameType是一个影像类型名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPhotoTypeNameType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPhotoTypeIDType是一个影像类型代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPhotoTypeIDType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPhotoNameType是一个影像名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPhotoNameType[161];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTopicIDType是一个主题代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcTopicIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReportTypeIDType是一个交易报告类型标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcReportTypeIDType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCharacterIDType是一个交易特征代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCharacterIDType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLParamIDType是一个参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLParamIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLInvestorTypeType是一个投资者类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLInvestorTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLIdCardTypeType是一个证件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLIdCardTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLTradeDirectType是一个资金进出方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLTradeDirectType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLTradeModelType是一个资金进出方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLTradeModelType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLOpParamValueType是一个业务参数代码值类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcAMLOpParamValueType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLCustomerCardTypeType是一个客户身份证件/证明文件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLCustomerCardTypeType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLInstitutionNameType是一个金融机构网点名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLInstitutionNameType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLDistrictIDType是一个金融机构网点所在地区行政区划代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLDistrictIDType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLRelationShipType是一个金融机构网点与大额交易的关系类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLRelationShipType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLInstitutionTypeType是一个金融机构网点代码类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLInstitutionTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLInstitutionIDType是一个金融机构网点代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLInstitutionIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLAccountTypeType是一个账户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLAccountTypeType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLTradingTypeType是一个交易方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLTradingTypeType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLTransactClassType是一个涉外收支交易分类与代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLTransactClassType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLCapitalIOType是一个资金收付标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLCapitalIOType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLSiteType是一个交易地点类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLSiteType[10];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLCapitalPurposeType是一个资金用途类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLCapitalPurposeType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLReportTypeType是一个报文类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLReportTypeType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLSerialNoType是一个编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLSerialNoType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLStatusType是一个状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLStatusType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLGenStatusType是一个Aml生成方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///程序生成\r\n#define THOST_FTDC_GEN_Program '0'\r\n///人工生成\r\n#define THOST_FTDC_GEN_HandWork '1'\r\n\r\ntypedef char TThostFtdcAMLGenStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLSeqCodeType是一个业务标识号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLSeqCodeType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLFileNameType是一个AML文件名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLFileNameType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLMoneyType是一个反洗钱资金类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcAMLMoneyType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLFileAmountType是一个反洗钱资金类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcAMLFileAmountType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCFMMCKeyType是一个密钥类型(保证金监管)类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCFMMCKeyType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCFMMCTokenType是一个令牌类型(保证金监管)类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCFMMCTokenType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCFMMCKeyKindType是一个动态密钥类别(保证金监管)类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///主动请求更新\r\n#define THOST_FTDC_CFMMCKK_REQUEST 'R'\r\n///CFMMC自动更新\r\n#define THOST_FTDC_CFMMCKK_AUTO 'A'\r\n///CFMMC手动更新\r\n#define THOST_FTDC_CFMMCKK_MANUAL 'M'\r\n\r\ntypedef char TThostFtdcCFMMCKeyKindType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLReportNameType是一个报文名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAMLReportNameType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIndividualNameType是一个个人姓名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIndividualNameType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrencyIDType是一个币种代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCurrencyIDType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCustNumberType是一个客户编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCustNumberType[36];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrganCodeType是一个机构编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrganCodeType[36];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrganNameType是一个机构名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrganNameType[71];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSuperOrganCodeType是一个上级机构编码,即期货公司总部、银行总行类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSuperOrganCodeType[12];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSubBranchIDType是一个分支机构类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSubBranchIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSubBranchNameType是一个分支机构名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSubBranchNameType[71];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBranchNetCodeType是一个机构网点号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBranchNetCodeType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBranchNetNameType是一个机构网点名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBranchNetNameType[71];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrganFlagType是一个机构标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrganFlagType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankCodingForFutureType是一个银行对期货公司的编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankCodingForFutureType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankReturnCodeType是一个银行对返回码的定义类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankReturnCodeType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPlateReturnCodeType是一个银期转帐平台对返回码的定义类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPlateReturnCodeType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankSubBranchIDType是一个银行分支机构编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankSubBranchIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureBranchIDType是一个期货分支机构编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureBranchIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReturnCodeType是一个返回代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcReturnCodeType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOperatorCodeType是一个操作员类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOperatorCodeType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClearDepIDType是一个机构结算帐户机构号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClearDepIDType[6];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClearBrchIDType是一个机构结算帐户联行号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClearBrchIDType[6];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClearNameType是一个机构结算帐户名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClearNameType[71];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankAccountNameType是一个银行帐户名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankAccountNameType[71];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvDepIDType是一个机构投资人账号机构号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvDepIDType[6];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvBrchIDType是一个机构投资人联行号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvBrchIDType[6];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMessageFormatVersionType是一个信息格式版本类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcMessageFormatVersionType[36];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDigestType是一个摘要类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDigestType[36];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAuthenticDataType是一个认证数据类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAuthenticDataType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPasswordKeyType是一个密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPasswordKeyType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureAccountNameType是一个期货帐户名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureAccountNameType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMobilePhoneType是一个手机类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcMobilePhoneType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureMainKeyType是一个期货公司主密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureMainKeyType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureWorkKeyType是一个期货公司工作密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureWorkKeyType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureTransKeyType是一个期货公司传输密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFutureTransKeyType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankMainKeyType是一个银行主密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankMainKeyType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankWorkKeyType是一个银行工作密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankWorkKeyType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankTransKeyType是一个银行传输密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankTransKeyType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankServerDescriptionType是一个银行服务器描述信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankServerDescriptionType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAddInfoType是一个附加信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAddInfoType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDescrInfoForReturnCodeType是一个返回码描述类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDescrInfoForReturnCodeType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCountryCodeType是一个国家代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCountryCodeType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSerialType是一个流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSerialType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPlateSerialType是一个平台流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcPlateSerialType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankSerialType是一个银行流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankSerialType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCorrectSerialType是一个被冲正交易流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCorrectSerialType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureSerialType是一个期货公司流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcFutureSerialType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcApplicationIDType是一个应用标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcApplicationIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankProxyIDType是一个银行代理标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcBankProxyIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBTCoreIDType是一个银期转帐核心系统标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcFBTCoreIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcServerPortType是一个服务端口号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcServerPortType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRepealedTimesType是一个已经冲正次数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcRepealedTimesType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRepealTimeIntervalType是一个冲正时间间隔类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcRepealTimeIntervalType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTotalTimesType是一个每日累计转帐次数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcTotalTimesType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBTRequestIDType是一个请求ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcFBTRequestIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTIDType是一个交易ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcTIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeAmountType是一个交易金额（元）类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcTradeAmountType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCustFeeType是一个应收客户费用（元）类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcCustFeeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureFeeType是一个应收期货公司费用（元）类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcFutureFeeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSingleMaxAmtType是一个单笔最高限额类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcSingleMaxAmtType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSingleMinAmtType是一个单笔最低限额类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcSingleMinAmtType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTotalAmtType是一个每日累计转帐额度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcTotalAmtType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCertificationTypeType是一个证件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///身份证\r\n#define THOST_FTDC_CFT_IDCard '0'\r\n///护照\r\n#define THOST_FTDC_CFT_Passport '1'\r\n///军官证\r\n#define THOST_FTDC_CFT_OfficerIDCard '2'\r\n///士兵证\r\n#define THOST_FTDC_CFT_SoldierIDCard '3'\r\n///回乡证\r\n#define THOST_FTDC_CFT_HomeComingCard '4'\r\n///户口簿\r\n#define THOST_FTDC_CFT_HouseholdRegister  '5'\r\n///营业执照号\r\n#define THOST_FTDC_CFT_LicenseNo '6'\r\n///组织机构代码证\r\n#define THOST_FTDC_CFT_InstitutionCodeCard '7'\r\n///临时营业执照号\r\n#define THOST_FTDC_CFT_TempLicenseNo '8'\r\n///民办非企业登记证书\r\n#define THOST_FTDC_CFT_NoEnterpriseLicenseNo '9'\r\n///其他证件\r\n#define THOST_FTDC_CFT_OtherCard 'x'\r\n///主管部门批文\r\n#define THOST_FTDC_CFT_SuperDepAgree 'a'\r\n\r\ntypedef char TThostFtdcCertificationTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileBusinessCodeType是一个文件业务功能类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///其他\r\n#define THOST_FTDC_FBC_Others '0'\r\n///转账交易明细对账\r\n#define THOST_FTDC_FBC_TransferDetails '1'\r\n///客户账户状态对账\r\n#define THOST_FTDC_FBC_CustAccStatus '2'\r\n///账户类交易明细对账\r\n#define THOST_FTDC_FBC_AccountTradeDetails '3'\r\n///期货账户信息变更明细对账\r\n#define THOST_FTDC_FBC_FutureAccountChangeInfoDetails '4'\r\n///客户资金台账余额明细对账\r\n#define THOST_FTDC_FBC_CustMoneyDetail '5'\r\n///客户销户结息明细对账\r\n#define THOST_FTDC_FBC_CustCancelAccountInfo '6'\r\n///客户资金余额对账结果\r\n#define THOST_FTDC_FBC_CustMoneyResult '7'\r\n///其它对账异常结果文件\r\n#define THOST_FTDC_FBC_OthersExceptionResult '8'\r\n///客户结息净额明细\r\n#define THOST_FTDC_FBC_CustInterestNetMoneyDetails '9'\r\n///客户资金交收明细\r\n#define THOST_FTDC_FBC_CustMoneySendAndReceiveDetails 'a'\r\n///法人存管银行资金交收汇总\r\n#define THOST_FTDC_FBC_CorporationMoneyTotal 'b'\r\n///主体间资金交收汇总\r\n#define THOST_FTDC_FBC_MainbodyMoneyTotal 'c'\r\n///总分平衡监管数据\r\n#define THOST_FTDC_FBC_MainPartMonitorData 'd'\r\n///存管银行备付金余额\r\n#define THOST_FTDC_FBC_PreparationMoney 'e'\r\n///协办存管银行资金监管数据\r\n#define THOST_FTDC_FBC_BankMoneyMonitorData 'f'\r\n\r\ntypedef char TThostFtdcFileBusinessCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCashExchangeCodeType是一个汇钞标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///汇\r\n#define THOST_FTDC_CEC_Exchange '1'\r\n///钞\r\n#define THOST_FTDC_CEC_Cash '2'\r\n\r\ntypedef char TThostFtdcCashExchangeCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcYesNoIndicatorType是一个是或否标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///是\r\n#define THOST_FTDC_YNI_Yes '0'\r\n///否\r\n#define THOST_FTDC_YNI_No '1'\r\n\r\ntypedef char TThostFtdcYesNoIndicatorType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBanlanceTypeType是一个余额类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///当前余额\r\n#define THOST_FTDC_BLT_CurrentMoney '0'\r\n///可用余额\r\n#define THOST_FTDC_BLT_UsableMoney '1'\r\n///可取余额\r\n#define THOST_FTDC_BLT_FetchableMoney '2'\r\n///冻结余额\r\n#define THOST_FTDC_BLT_FreezeMoney '3'\r\n\r\ntypedef char TThostFtdcBanlanceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcGenderType是一个性别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未知状态\r\n#define THOST_FTDC_GD_Unknown '0'\r\n///男\r\n#define THOST_FTDC_GD_Male '1'\r\n///女\r\n#define THOST_FTDC_GD_Female '2'\r\n\r\ntypedef char TThostFtdcGenderType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFeePayFlagType是一个费用支付标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///由受益方支付费用\r\n#define THOST_FTDC_FPF_BEN '0'\r\n///由发送方支付费用\r\n#define THOST_FTDC_FPF_OUR '1'\r\n///由发送方支付发起的费用，受益方支付接受的费用\r\n#define THOST_FTDC_FPF_SHA '2'\r\n\r\ntypedef char TThostFtdcFeePayFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPassWordKeyTypeType是一个密钥类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交换密钥\r\n#define THOST_FTDC_PWKT_ExchangeKey '0'\r\n///密码密钥\r\n#define THOST_FTDC_PWKT_PassWordKey '1'\r\n///MAC密钥\r\n#define THOST_FTDC_PWKT_MACKey '2'\r\n///报文密钥\r\n#define THOST_FTDC_PWKT_MessageKey '3'\r\n\r\ntypedef char TThostFtdcPassWordKeyTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBTPassWordTypeType是一个密码类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///查询\r\n#define THOST_FTDC_PWT_Query '0'\r\n///取款\r\n#define THOST_FTDC_PWT_Fetch '1'\r\n///转帐\r\n#define THOST_FTDC_PWT_Transfer '2'\r\n///交易\r\n#define THOST_FTDC_PWT_Trade '3'\r\n\r\ntypedef char TThostFtdcFBTPassWordTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBTEncryModeType是一个加密方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不加密\r\n#define THOST_FTDC_EM_NoEncry '0'\r\n///DES\r\n#define THOST_FTDC_EM_DES '1'\r\n///3DES\r\n#define THOST_FTDC_EM_3DES '2'\r\n\r\ntypedef char TThostFtdcFBTEncryModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankRepealFlagType是一个银行冲正标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行无需自动冲正\r\n#define THOST_FTDC_BRF_BankNotNeedRepeal '0'\r\n///银行待自动冲正\r\n#define THOST_FTDC_BRF_BankWaitingRepeal '1'\r\n///银行已自动冲正\r\n#define THOST_FTDC_BRF_BankBeenRepealed '2'\r\n\r\ntypedef char TThostFtdcBankRepealFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerRepealFlagType是一个期商冲正标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期商无需自动冲正\r\n#define THOST_FTDC_BRORF_BrokerNotNeedRepeal '0'\r\n///期商待自动冲正\r\n#define THOST_FTDC_BRORF_BrokerWaitingRepeal '1'\r\n///期商已自动冲正\r\n#define THOST_FTDC_BRORF_BrokerBeenRepealed '2'\r\n\r\ntypedef char TThostFtdcBrokerRepealFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstitutionTypeType是一个机构类别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行\r\n#define THOST_FTDC_TS_Bank '0'\r\n///期商\r\n#define THOST_FTDC_TS_Future '1'\r\n///券商\r\n#define THOST_FTDC_TS_Store '2'\r\n\r\ntypedef char TThostFtdcInstitutionTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLastFragmentType是一个最后分片标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///是最后分片\r\n#define THOST_FTDC_LF_Yes '0'\r\n///不是最后分片\r\n#define THOST_FTDC_LF_No '1'\r\n\r\ntypedef char TThostFtdcLastFragmentType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankAccStatusType是一个银行账户状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_BAS_Normal '0'\r\n///冻结\r\n#define THOST_FTDC_BAS_Freeze '1'\r\n///挂失\r\n#define THOST_FTDC_BAS_ReportLoss '2'\r\n\r\ntypedef char TThostFtdcBankAccStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMoneyAccountStatusType是一个资金账户状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_MAS_Normal '0'\r\n///销户\r\n#define THOST_FTDC_MAS_Cancel '1'\r\n\r\ntypedef char TThostFtdcMoneyAccountStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcManageStatusType是一个存管状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///指定存管\r\n#define THOST_FTDC_MSS_Point '0'\r\n///预指定\r\n#define THOST_FTDC_MSS_PrePoint '1'\r\n///撤销指定\r\n#define THOST_FTDC_MSS_CancelPoint '2'\r\n\r\ntypedef char TThostFtdcManageStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSystemTypeType是一个应用系统类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银期转帐\r\n#define THOST_FTDC_SYT_FutureBankTransfer '0'\r\n///银证转帐\r\n#define THOST_FTDC_SYT_StockBankTransfer '1'\r\n///第三方存管\r\n#define THOST_FTDC_SYT_TheThirdPartStore '2'\r\n\r\ntypedef char TThostFtdcSystemTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTxnEndFlagType是一个银期转帐划转结果标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常处理中\r\n#define THOST_FTDC_TEF_NormalProcessing '0'\r\n///成功结束\r\n#define THOST_FTDC_TEF_Success '1'\r\n///失败结束\r\n#define THOST_FTDC_TEF_Failed '2'\r\n///异常中\r\n#define THOST_FTDC_TEF_Abnormal '3'\r\n///已人工异常处理\r\n#define THOST_FTDC_TEF_ManualProcessedForException '4'\r\n///通讯异常 ，请人工处理\r\n#define THOST_FTDC_TEF_CommuFailedNeedManualProcess '5'\r\n///系统出错，请人工处理\r\n#define THOST_FTDC_TEF_SysErrorNeedManualProcess '6'\r\n\r\ntypedef char TThostFtdcTxnEndFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProcessStatusType是一个银期转帐服务处理状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未处理\r\n#define THOST_FTDC_PSS_NotProcess '0'\r\n///开始处理\r\n#define THOST_FTDC_PSS_StartProcess '1'\r\n///处理完成\r\n#define THOST_FTDC_PSS_Finished '2'\r\n\r\ntypedef char TThostFtdcProcessStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCustTypeType是一个客户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自然人\r\n#define THOST_FTDC_CUSTT_Person '0'\r\n///机构户\r\n#define THOST_FTDC_CUSTT_Institution '1'\r\n\r\ntypedef char TThostFtdcCustTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBTTransferDirectionType是一个银期转帐方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///入金，银行转期货\r\n#define THOST_FTDC_FBTTD_FromBankToFuture '1'\r\n///出金，期货转银行\r\n#define THOST_FTDC_FBTTD_FromFutureToBank '2'\r\n\r\ntypedef char TThostFtdcFBTTransferDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOpenOrDestroyType是一个开销户类别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///开户\r\n#define THOST_FTDC_OOD_Open '1'\r\n///销户\r\n#define THOST_FTDC_OOD_Destroy '0'\r\n\r\ntypedef char TThostFtdcOpenOrDestroyType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAvailabilityFlagType是一个有效标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未确认\r\n#define THOST_FTDC_AVAF_Invalid '0'\r\n///有效\r\n#define THOST_FTDC_AVAF_Valid '1'\r\n///冲正\r\n#define THOST_FTDC_AVAF_Repeal '2'\r\n\r\ntypedef char TThostFtdcAvailabilityFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrganTypeType是一个机构类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行代理\r\n#define THOST_FTDC_OT_Bank '1'\r\n///交易前置\r\n#define THOST_FTDC_OT_Future '2'\r\n///银期转帐平台管理\r\n#define THOST_FTDC_OT_PlateForm '9'\r\n\r\ntypedef char TThostFtdcOrganTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrganLevelType是一个机构级别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行总行或期商总部\r\n#define THOST_FTDC_OL_HeadQuarters '1'\r\n///银行分中心或期货公司营业部\r\n#define THOST_FTDC_OL_Branch '2'\r\n\r\ntypedef char TThostFtdcOrganLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProtocalIDType是一个协议类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期商协议\r\n#define THOST_FTDC_PID_FutureProtocal '0'\r\n///工行协议\r\n#define THOST_FTDC_PID_ICBCProtocal '1'\r\n///农行协议\r\n#define THOST_FTDC_PID_ABCProtocal '2'\r\n///中国银行协议\r\n#define THOST_FTDC_PID_CBCProtocal '3'\r\n///建行协议\r\n#define THOST_FTDC_PID_CCBProtocal '4'\r\n///交行协议\r\n#define THOST_FTDC_PID_BOCOMProtocal '5'\r\n///银期转帐平台协议\r\n#define THOST_FTDC_PID_FBTPlateFormProtocal 'X'\r\n\r\ntypedef char TThostFtdcProtocalIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcConnectModeType是一个套接字连接方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///短连接\r\n#define THOST_FTDC_CM_ShortConnect '0'\r\n///长连接\r\n#define THOST_FTDC_CM_LongConnect '1'\r\n\r\ntypedef char TThostFtdcConnectModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSyncModeType是一个套接字通信方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///异步\r\n#define THOST_FTDC_SRM_ASync '0'\r\n///同步\r\n#define THOST_FTDC_SRM_Sync '1'\r\n\r\ntypedef char TThostFtdcSyncModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankAccTypeType是一个银行帐号类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行存折\r\n#define THOST_FTDC_BAT_BankBook '1'\r\n///储蓄卡\r\n#define THOST_FTDC_BAT_SavingCard '2'\r\n///信用卡\r\n#define THOST_FTDC_BAT_CreditCard '3'\r\n\r\ntypedef char TThostFtdcBankAccTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureAccTypeType是一个期货公司帐号类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行存折\r\n#define THOST_FTDC_FAT_BankBook '1'\r\n///储蓄卡\r\n#define THOST_FTDC_FAT_SavingCard '2'\r\n///信用卡\r\n#define THOST_FTDC_FAT_CreditCard '3'\r\n\r\ntypedef char TThostFtdcFutureAccTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrganStatusType是一个接入机构状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///启用\r\n#define THOST_FTDC_OS_Ready '0'\r\n///签到\r\n#define THOST_FTDC_OS_CheckIn '1'\r\n///签退\r\n#define THOST_FTDC_OS_CheckOut '2'\r\n///对帐文件到达\r\n#define THOST_FTDC_OS_CheckFileArrived '3'\r\n///对帐\r\n#define THOST_FTDC_OS_CheckDetail '4'\r\n///日终清理\r\n#define THOST_FTDC_OS_DayEndClean '5'\r\n///注销\r\n#define THOST_FTDC_OS_Invalid '9'\r\n\r\ntypedef char TThostFtdcOrganStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCCBFeeModeType是一个建行收费模式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///按金额扣收\r\n#define THOST_FTDC_CCBFM_ByAmount '1'\r\n///按月扣收\r\n#define THOST_FTDC_CCBFM_ByMonth '2'\r\n\r\ntypedef char TThostFtdcCCBFeeModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommApiTypeType是一个通讯API类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///客户端\r\n#define THOST_FTDC_CAPIT_Client '1'\r\n///服务端\r\n#define THOST_FTDC_CAPIT_Server '2'\r\n///交易系统的UserApi\r\n#define THOST_FTDC_CAPIT_UserApi '3'\r\n\r\ntypedef char TThostFtdcCommApiTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcServiceIDType是一个服务编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcServiceIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcServiceLineNoType是一个服务线路编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcServiceLineNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcServiceNameType是一个服务名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcServiceNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLinkStatusType是一个连接状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已经连接\r\n#define THOST_FTDC_LS_Connected '1'\r\n///没有连接\r\n#define THOST_FTDC_LS_Disconnected '2'\r\n\r\ntypedef char TThostFtdcLinkStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommApiPointerType是一个通讯API指针类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCommApiPointerType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPwdFlagType是一个密码核对标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不核对\r\n#define THOST_FTDC_BPWDF_NoCheck '0'\r\n///明文核对\r\n#define THOST_FTDC_BPWDF_BlankCheck '1'\r\n///密文核对\r\n#define THOST_FTDC_BPWDF_EncryptCheck '2'\r\n\r\ntypedef char TThostFtdcPwdFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSecuAccTypeType是一个期货帐号类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///资金帐号\r\n#define THOST_FTDC_SAT_AccountID '1'\r\n///资金卡号\r\n#define THOST_FTDC_SAT_CardID '2'\r\n///上海股东帐号\r\n#define THOST_FTDC_SAT_SHStockholderID '3'\r\n///深圳股东帐号\r\n#define THOST_FTDC_SAT_SZStockholderID '4'\r\n\r\ntypedef char TThostFtdcSecuAccTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTransferStatusType是一个转账交易状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_TRFS_Normal '0'\r\n///被冲正\r\n#define THOST_FTDC_TRFS_Repealed '1'\r\n\r\ntypedef char TThostFtdcTransferStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSponsorTypeType是一个发起方类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期商\r\n#define THOST_FTDC_SPTYPE_Broker '0'\r\n///银行\r\n#define THOST_FTDC_SPTYPE_Bank '1'\r\n\r\ntypedef char TThostFtdcSponsorTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReqRspTypeType是一个请求响应类别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///请求\r\n#define THOST_FTDC_REQRSP_Request '0'\r\n///响应\r\n#define THOST_FTDC_REQRSP_Response '1'\r\n\r\ntypedef char TThostFtdcReqRspTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBTUserEventTypeType是一个银期转帐用户事件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///签到\r\n#define THOST_FTDC_FBTUET_SignIn '0'\r\n///银行转期货\r\n#define THOST_FTDC_FBTUET_FromBankToFuture '1'\r\n///期货转银行\r\n#define THOST_FTDC_FBTUET_FromFutureToBank '2'\r\n///开户\r\n#define THOST_FTDC_FBTUET_OpenAccount '3'\r\n///销户\r\n#define THOST_FTDC_FBTUET_CancelAccount '4'\r\n///变更银行账户\r\n#define THOST_FTDC_FBTUET_ChangeAccount '5'\r\n///冲正银行转期货\r\n#define THOST_FTDC_FBTUET_RepealFromBankToFuture '6'\r\n///冲正期货转银行\r\n#define THOST_FTDC_FBTUET_RepealFromFutureToBank '7'\r\n///查询银行账户\r\n#define THOST_FTDC_FBTUET_QueryBankAccount '8'\r\n///查询期货账户\r\n#define THOST_FTDC_FBTUET_QueryFutureAccount '9'\r\n///签退\r\n#define THOST_FTDC_FBTUET_SignOut 'A'\r\n///密钥同步\r\n#define THOST_FTDC_FBTUET_SyncKey 'B'\r\n///预约开户\r\n#define THOST_FTDC_FBTUET_ReserveOpenAccount 'C'\r\n///撤销预约开户\r\n#define THOST_FTDC_FBTUET_CancelReserveOpenAccount 'D'\r\n///预约开户确认\r\n#define THOST_FTDC_FBTUET_ReserveOpenAccountConfirm 'E'\r\n///其他\r\n#define THOST_FTDC_FBTUET_Other 'Z'\r\n\r\ntypedef char TThostFtdcFBTUserEventTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankIDByBankType是一个银行自己的编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankIDByBankType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankOperNoType是一个银行操作员号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankOperNoType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankCustNoType是一个银行客户号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankCustNoType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDBOPSeqNoType是一个递增的序列号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcDBOPSeqNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTableNameType是一个FBT表名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTableNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPKNameType是一个FBT表操作主键名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPKNameType[201];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPKValueType是一个FBT表操作主键值类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPKValueType[501];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDBOperationType是一个记录操作类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///插入\r\n#define THOST_FTDC_DBOP_Insert '0'\r\n///更新\r\n#define THOST_FTDC_DBOP_Update '1'\r\n///删除\r\n#define THOST_FTDC_DBOP_Delete '2'\r\n\r\ntypedef char TThostFtdcDBOperationType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSyncFlagType是一个同步标记类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已同步\r\n#define THOST_FTDC_SYNF_Yes '0'\r\n///未同步\r\n#define THOST_FTDC_SYNF_No '1'\r\n\r\ntypedef char TThostFtdcSyncFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTargetIDType是一个同步目标编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTargetIDType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSyncTypeType是一个同步类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///一次同步\r\n#define THOST_FTDC_SYNT_OneOffSync '0'\r\n///定时同步\r\n#define THOST_FTDC_SYNT_TimerSync '1'\r\n///定时完全同步\r\n#define THOST_FTDC_SYNT_TimerFullSync '2'\r\n\r\ntypedef char TThostFtdcSyncTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBETimeType是一个各种换汇时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBETimeType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEBankNoType是一个换汇银行行号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEBankNoType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBECertNoType是一个换汇凭证号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBECertNoType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExDirectionType是一个换汇方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///结汇\r\n#define THOST_FTDC_FBEDIR_Settlement '0'\r\n///售汇\r\n#define THOST_FTDC_FBEDIR_Sale '1'\r\n\r\ntypedef char TThostFtdcExDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEBankAccountType是一个换汇银行账户类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEBankAccountType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEBankAccountNameType是一个换汇银行账户名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEBankAccountNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEAmtType是一个各种换汇金额类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcFBEAmtType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEBusinessTypeType是一个换汇业务类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEBusinessTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEPostScriptType是一个换汇附言类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEPostScriptType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBERemarkType是一个换汇备注类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBERemarkType[71];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExRateType是一个换汇汇率类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcExRateType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEResultFlagType是一个换汇成功标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///成功\r\n#define THOST_FTDC_FBERES_Success '0'\r\n///账户余额不足\r\n#define THOST_FTDC_FBERES_InsufficientBalance '1'\r\n///交易结果未知\r\n#define THOST_FTDC_FBERES_UnknownTrading '8'\r\n///失败\r\n#define THOST_FTDC_FBERES_Fail 'x'\r\n\r\ntypedef char TThostFtdcFBEResultFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBERtnMsgType是一个换汇返回信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBERtnMsgType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEExtendMsgType是一个换汇扩展信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEExtendMsgType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEBusinessSerialType是一个换汇记账流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEBusinessSerialType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBESystemSerialType是一个换汇流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBESystemSerialType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBETotalExCntType是一个换汇交易总笔数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcFBETotalExCntType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEExchStatusType是一个换汇交易状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_FBEES_Normal '0'\r\n///交易重发\r\n#define THOST_FTDC_FBEES_ReExchange '1'\r\n\r\ntypedef char TThostFtdcFBEExchStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEFileFlagType是一个换汇文件标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///数据包\r\n#define THOST_FTDC_FBEFG_DataPackage '0'\r\n///文件\r\n#define THOST_FTDC_FBEFG_File '1'\r\n\r\ntypedef char TThostFtdcFBEFileFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEAlreadyTradeType是一个换汇已交易标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未交易\r\n#define THOST_FTDC_FBEAT_NotTrade '0'\r\n///已交易\r\n#define THOST_FTDC_FBEAT_Trade '1'\r\n\r\ntypedef char TThostFtdcFBEAlreadyTradeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEOpenBankType是一个换汇账户开户行类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEOpenBankType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEUserEventTypeType是一个银期换汇用户事件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///签到\r\n#define THOST_FTDC_FBEUET_SignIn '0'\r\n///换汇\r\n#define THOST_FTDC_FBEUET_Exchange '1'\r\n///换汇重发\r\n#define THOST_FTDC_FBEUET_ReExchange '2'\r\n///银行账户查询\r\n#define THOST_FTDC_FBEUET_QueryBankAccount '3'\r\n///换汇明细查询\r\n#define THOST_FTDC_FBEUET_QueryExchDetial '4'\r\n///换汇汇总查询\r\n#define THOST_FTDC_FBEUET_QueryExchSummary '5'\r\n///换汇汇率查询\r\n#define THOST_FTDC_FBEUET_QueryExchRate '6'\r\n///对账文件通知\r\n#define THOST_FTDC_FBEUET_CheckBankAccount '7'\r\n///签退\r\n#define THOST_FTDC_FBEUET_SignOut '8'\r\n///其他\r\n#define THOST_FTDC_FBEUET_Other 'Z'\r\n\r\ntypedef char TThostFtdcFBEUserEventTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEFileNameType是一个换汇相关文件名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEFileNameType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEBatchSerialType是一个换汇批次号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFBEBatchSerialType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBEReqFlagType是一个换汇发送标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未处理\r\n#define THOST_FTDC_FBERF_UnProcessed '0'\r\n///等待发送\r\n#define THOST_FTDC_FBERF_WaitSend '1'\r\n///发送成功\r\n#define THOST_FTDC_FBERF_SendSuccess '2'\r\n///发送失败\r\n#define THOST_FTDC_FBERF_SendFailed '3'\r\n///等待重发\r\n#define THOST_FTDC_FBERF_WaitReSend '4'\r\n\r\ntypedef char TThostFtdcFBEReqFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcNotifyClassType是一个风险通知类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_NC_NOERROR '0'\r\n///警示\r\n#define THOST_FTDC_NC_Warn '1'\r\n///追保\r\n#define THOST_FTDC_NC_Call '2'\r\n///强平\r\n#define THOST_FTDC_NC_Force '3'\r\n///穿仓\r\n#define THOST_FTDC_NC_CHUANCANG '4'\r\n///异常\r\n#define THOST_FTDC_NC_Exception '5'\r\n\r\ntypedef char TThostFtdcNotifyClassType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRiskNofityInfoType是一个客户风险通知消息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRiskNofityInfoType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcForceCloseSceneIdType是一个强平场景编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcForceCloseSceneIdType[24];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcForceCloseTypeType是一个强平单类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///手工强平\r\n#define THOST_FTDC_FCT_Manual '0'\r\n///单一投资者辅助强平\r\n#define THOST_FTDC_FCT_Single '1'\r\n///批量投资者辅助强平\r\n#define THOST_FTDC_FCT_Group '2'\r\n\r\ntypedef char TThostFtdcForceCloseTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentIDsType是一个多个产品代码,用+分隔,如cu+zn类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInstrumentIDsType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRiskNotifyMethodType是一个风险通知途径类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///系统通知\r\n#define THOST_FTDC_RNM_System '0'\r\n///短信通知\r\n#define THOST_FTDC_RNM_SMS '1'\r\n///邮件通知\r\n#define THOST_FTDC_RNM_EMail '2'\r\n///人工通知\r\n#define THOST_FTDC_RNM_Manual '3'\r\n\r\ntypedef char TThostFtdcRiskNotifyMethodType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRiskNotifyStatusType是一个风险通知状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未生成\r\n#define THOST_FTDC_RNS_NotGen '0'\r\n///已生成未发送\r\n#define THOST_FTDC_RNS_Generated '1'\r\n///发送失败\r\n#define THOST_FTDC_RNS_SendError '2'\r\n///已发送未接收\r\n#define THOST_FTDC_RNS_SendOk '3'\r\n///已接收未确认\r\n#define THOST_FTDC_RNS_Received '4'\r\n///已确认\r\n#define THOST_FTDC_RNS_Confirmed '5'\r\n\r\ntypedef char TThostFtdcRiskNotifyStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRiskUserEventType是一个风控用户操作事件类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///导出数据\r\n#define THOST_FTDC_RUE_ExportData '0'\r\n\r\ntypedef char TThostFtdcRiskUserEventType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcParamIDType是一个参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcParamIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcParamNameType是一个参数名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcParamNameType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcParamValueType是一个参数值类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcParamValueType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcConditionalOrderSortTypeType是一个条件单索引条件类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///使用最新价升序\r\n#define THOST_FTDC_COST_LastPriceAsc '0'\r\n///使用最新价降序\r\n#define THOST_FTDC_COST_LastPriceDesc '1'\r\n///使用卖价升序\r\n#define THOST_FTDC_COST_AskPriceAsc '2'\r\n///使用卖价降序\r\n#define THOST_FTDC_COST_AskPriceDesc '3'\r\n///使用买价升序\r\n#define THOST_FTDC_COST_BidPriceAsc '4'\r\n///使用买价降序\r\n#define THOST_FTDC_COST_BidPriceDesc '5'\r\n\r\ntypedef char TThostFtdcConditionalOrderSortTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSendTypeType是一个报送状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未发送\r\n#define THOST_FTDC_UOAST_NoSend '0'\r\n///已发送\r\n#define THOST_FTDC_UOAST_Sended '1'\r\n///已生成\r\n#define THOST_FTDC_UOAST_Generated '2'\r\n///报送失败\r\n#define THOST_FTDC_UOAST_SendFail '3'\r\n///接收成功\r\n#define THOST_FTDC_UOAST_Success '4'\r\n///接收失败\r\n#define THOST_FTDC_UOAST_Fail '5'\r\n///取消报送\r\n#define THOST_FTDC_UOAST_Cancel '6'\r\n\r\ntypedef char TThostFtdcSendTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientIDStatusType是一个交易编码状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未申请\r\n#define THOST_FTDC_UOACS_NoApply '1'\r\n///已提交申请\r\n#define THOST_FTDC_UOACS_Submited '2'\r\n///已发送申请\r\n#define THOST_FTDC_UOACS_Sended '3'\r\n///完成\r\n#define THOST_FTDC_UOACS_Success '4'\r\n///拒绝\r\n#define THOST_FTDC_UOACS_Refuse '5'\r\n///已撤销编码\r\n#define THOST_FTDC_UOACS_Cancel '6'\r\n\r\ntypedef char TThostFtdcClientIDStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIndustryIDType是一个行业编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIndustryIDType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcQuestionIDType是一个特有信息编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcQuestionIDType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcQuestionContentType是一个特有信息说明类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcQuestionContentType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOptionIDType是一个选项编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOptionIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOptionContentType是一个选项说明类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOptionContentType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcQuestionTypeType是一个特有信息类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///单选\r\n#define THOST_FTDC_QT_Radio '1'\r\n///多选\r\n#define THOST_FTDC_QT_Option '2'\r\n///填空\r\n#define THOST_FTDC_QT_Blank '3'\r\n\r\ntypedef char TThostFtdcQuestionTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProcessIDType是一个业务流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProcessIDType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSeqNoType是一个流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSeqNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOAProcessStatusType是一个流程状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOAProcessStatusType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProcessTypeType是一个流程功能类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProcessTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBusinessTypeType是一个业务类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///请求\r\n#define THOST_FTDC_BT_Request '1'\r\n///应答\r\n#define THOST_FTDC_BT_Response '2'\r\n///通知\r\n#define THOST_FTDC_BT_Notice '3'\r\n\r\ntypedef char TThostFtdcBusinessTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCfmmcReturnCodeType是一个监控中心返回码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///成功\r\n#define THOST_FTDC_CRC_Success '0'\r\n///该客户已经有流程在处理中\r\n#define THOST_FTDC_CRC_Working '1'\r\n///监控中客户资料检查失败\r\n#define THOST_FTDC_CRC_InfoFail '2'\r\n///监控中实名制检查失败\r\n#define THOST_FTDC_CRC_IDCardFail '3'\r\n///其他错误\r\n#define THOST_FTDC_CRC_OtherFail '4'\r\n\r\ntypedef char TThostFtdcCfmmcReturnCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExReturnCodeType是一个交易所返回码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcExReturnCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientTypeType是一个客户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有\r\n#define THOST_FTDC_CfMMCCT_All '0'\r\n///个人\r\n#define THOST_FTDC_CfMMCCT_Person '1'\r\n///单位\r\n#define THOST_FTDC_CfMMCCT_Company '2'\r\n///其他\r\n#define THOST_FTDC_CfMMCCT_Other '3'\r\n///特殊法人\r\n#define THOST_FTDC_CfMMCCT_SpecialOrgan '4'\r\n///资管户\r\n#define THOST_FTDC_CfMMCCT_Asset '5'\r\n\r\ntypedef char TThostFtdcClientTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeIDTypeType是一个交易所编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///上海期货交易所\r\n#define THOST_FTDC_EIDT_SHFE 'S'\r\n///郑州商品交易所\r\n#define THOST_FTDC_EIDT_CZCE 'Z'\r\n///大连商品交易所\r\n#define THOST_FTDC_EIDT_DCE 'D'\r\n///中国金融期货交易所\r\n#define THOST_FTDC_EIDT_CFFEX 'J'\r\n///上海国际能源交易中心股份有限公司\r\n#define THOST_FTDC_EIDT_INE 'N'\r\n\r\ntypedef char TThostFtdcExchangeIDTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExClientIDTypeType是一个交易编码类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///套保\r\n#define THOST_FTDC_ECIDT_Hedge '1'\r\n///套利\r\n#define THOST_FTDC_ECIDT_Arbitrage '2'\r\n///投机\r\n#define THOST_FTDC_ECIDT_Speculation '3'\r\n\r\ntypedef char TThostFtdcExClientIDTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientClassifyType是一个客户分类码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClientClassifyType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOAOrganTypeType是一个单位性质类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOAOrganTypeType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOACountryCodeType是一个国家代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOACountryCodeType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAreaCodeType是一个区号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAreaCodeType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFuturesIDType是一个监控中心为客户分配的代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFuturesIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCffmcDateType是一个日期类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCffmcDateType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCffmcTimeType是一个时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCffmcTimeType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcNocIDType是一个组织机构代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcNocIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUpdateFlagType是一个更新状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未更新\r\n#define THOST_FTDC_UF_NoUpdate '0'\r\n///更新全部信息成功\r\n#define THOST_FTDC_UF_Success '1'\r\n///更新全部信息失败\r\n#define THOST_FTDC_UF_Fail '2'\r\n///更新交易编码成功\r\n#define THOST_FTDC_UF_TCSuccess '3'\r\n///更新交易编码失败\r\n#define THOST_FTDC_UF_TCFail '4'\r\n///已丢弃\r\n#define THOST_FTDC_UF_Cancel '5'\r\n\r\ntypedef char TThostFtdcUpdateFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcApplyOperateIDType是一个申请动作类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///开户\r\n#define THOST_FTDC_AOID_OpenInvestor '1'\r\n///修改身份信息\r\n#define THOST_FTDC_AOID_ModifyIDCard '2'\r\n///修改一般信息\r\n#define THOST_FTDC_AOID_ModifyNoIDCard '3'\r\n///申请交易编码\r\n#define THOST_FTDC_AOID_ApplyTradingCode '4'\r\n///撤销交易编码\r\n#define THOST_FTDC_AOID_CancelTradingCode '5'\r\n///销户\r\n#define THOST_FTDC_AOID_CancelInvestor '6'\r\n///账户休眠\r\n#define THOST_FTDC_AOID_FreezeAccount '8'\r\n///激活休眠账户\r\n#define THOST_FTDC_AOID_ActiveFreezeAccount '9'\r\n\r\ntypedef char TThostFtdcApplyOperateIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcApplyStatusIDType是一个申请状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未补全\r\n#define THOST_FTDC_ASID_NoComplete '1'\r\n///已提交\r\n#define THOST_FTDC_ASID_Submited '2'\r\n///已审核\r\n#define THOST_FTDC_ASID_Checked '3'\r\n///已拒绝\r\n#define THOST_FTDC_ASID_Refused '4'\r\n///已删除\r\n#define THOST_FTDC_ASID_Deleted '5'\r\n\r\ntypedef char TThostFtdcApplyStatusIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSendMethodType是一个发送方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///文件发送\r\n#define THOST_FTDC_UOASM_ByAPI '1'\r\n///电子发送\r\n#define THOST_FTDC_UOASM_ByFile '2'\r\n\r\ntypedef char TThostFtdcSendMethodType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEventTypeType是一个业务操作类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcEventTypeType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEventModeType是一个操作方法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///增加\r\n#define THOST_FTDC_EvM_ADD '1'\r\n///修改\r\n#define THOST_FTDC_EvM_UPDATE '2'\r\n///删除\r\n#define THOST_FTDC_EvM_DELETE '3'\r\n///复核\r\n#define THOST_FTDC_EvM_CHECK '4'\r\n///复制\r\n#define THOST_FTDC_EvM_COPY '5'\r\n///注销\r\n#define THOST_FTDC_EvM_CANCEL '6'\r\n///冲销\r\n#define THOST_FTDC_EvM_Reverse '7'\r\n\r\ntypedef char TThostFtdcEventModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOAAutoSendType是一个统一开户申请自动发送类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自动发送并接收\r\n#define THOST_FTDC_UOAA_ASR '1'\r\n///自动发送，不自动接收\r\n#define THOST_FTDC_UOAA_ASNR '2'\r\n///不自动发送，自动接收\r\n#define THOST_FTDC_UOAA_NSAR '3'\r\n///不自动发送，也不自动接收\r\n#define THOST_FTDC_UOAA_NSR '4'\r\n\r\ntypedef char TThostFtdcUOAAutoSendType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcQueryDepthType是一个查询深度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcQueryDepthType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDataCenterIDType是一个数据中心代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcDataCenterIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFlowIDType是一个流程ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///投资者对应投资者组设置\r\n#define THOST_FTDC_EvM_InvestorGroupFlow '1'\r\n///投资者手续费率设置\r\n#define THOST_FTDC_EvM_InvestorRate '2'\r\n///投资者手续费率模板关系设置\r\n#define THOST_FTDC_EvM_InvestorCommRateModel '3'\r\n\r\ntypedef char TThostFtdcFlowIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCheckLevelType是一个复核级别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///零级复核\r\n#define THOST_FTDC_CL_Zero '0'\r\n///一级复核\r\n#define THOST_FTDC_CL_One '1'\r\n///二级复核\r\n#define THOST_FTDC_CL_Two '2'\r\n\r\ntypedef char TThostFtdcCheckLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCheckNoType是一个操作次数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCheckNoType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCheckStatusType是一个复核级别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未复核\r\n#define THOST_FTDC_CHS_Init '0'\r\n///复核中\r\n#define THOST_FTDC_CHS_Checking '1'\r\n///已复核\r\n#define THOST_FTDC_CHS_Checked '2'\r\n///拒绝\r\n#define THOST_FTDC_CHS_Refuse '3'\r\n///作废\r\n#define THOST_FTDC_CHS_Cancel '4'\r\n\r\ntypedef char TThostFtdcCheckStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUsedStatusType是一个生效状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未生效\r\n#define THOST_FTDC_CHU_Unused '0'\r\n///已生效\r\n#define THOST_FTDC_CHU_Used '1'\r\n///生效失败\r\n#define THOST_FTDC_CHU_Fail '2'\r\n\r\ntypedef char TThostFtdcUsedStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRateTemplateNameType是一个模型名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRateTemplateNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPropertyStringType是一个用于查询的投资属性字段类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPropertyStringType[2049];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankAcountOriginType是一个账户来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///手工录入\r\n#define THOST_FTDC_BAO_ByAccProperty '0'\r\n///银期转账\r\n#define THOST_FTDC_BAO_ByFBTransfer '1'\r\n\r\ntypedef char TThostFtdcBankAcountOriginType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMonthBillTradeSumType是一个结算单月报成交汇总方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///同日同合约\r\n#define THOST_FTDC_MBTS_ByInstrument '0'\r\n///同日同合约同价格\r\n#define THOST_FTDC_MBTS_ByDayInsPrc '1'\r\n///同合约\r\n#define THOST_FTDC_MBTS_ByDayIns '2'\r\n\r\ntypedef char TThostFtdcMonthBillTradeSumType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFBTTradeCodeEnumType是一个银期交易代码枚举类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行发起银行转期货\r\n#define THOST_FTDC_FTC_BankLaunchBankToBroker '102001'\r\n///期货发起银行转期货\r\n#define THOST_FTDC_FTC_BrokerLaunchBankToBroker '202001'\r\n///银行发起期货转银行\r\n#define THOST_FTDC_FTC_BankLaunchBrokerToBank '102002'\r\n///期货发起期货转银行\r\n#define THOST_FTDC_FTC_BrokerLaunchBrokerToBank '202002'\r\n\r\ntypedef char TThostFtdcFBTTradeCodeEnumType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRateTemplateIDType是一个模型代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRateTemplateIDType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRiskRateType是一个风险度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRiskRateType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTimestampType是一个时间戳类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcTimestampType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorIDRuleNameType是一个号段规则名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvestorIDRuleNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorIDRuleExprType是一个号段规则表达式类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvestorIDRuleExprType[513];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLastDriftType是一个上次OTP漂移值类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcLastDriftType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLastSuccessType是一个上次OTP成功值类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcLastSuccessType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAuthKeyType是一个令牌密钥类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAuthKeyType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSerialNumberType是一个序列号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSerialNumberType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOTPTypeType是一个动态令牌类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///无动态令牌\r\n#define THOST_FTDC_OTP_NONE '0'\r\n///时间令牌\r\n#define THOST_FTDC_OTP_TOTP '1'\r\n\r\ntypedef char TThostFtdcOTPTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOTPVendorsIDType是一个动态令牌提供商类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOTPVendorsIDType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOTPVendorsNameType是一个动态令牌提供商名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOTPVendorsNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOTPStatusType是一个动态令牌状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未使用\r\n#define THOST_FTDC_OTPS_Unused '0'\r\n///已使用\r\n#define THOST_FTDC_OTPS_Used '1'\r\n///注销\r\n#define THOST_FTDC_OTPS_Disuse '2'\r\n\r\ntypedef char TThostFtdcOTPStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBrokerUserTypeType是一个经济公司用户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///投资者\r\n#define THOST_FTDC_BUT_Investor '1'\r\n///操作员\r\n#define THOST_FTDC_BUT_BrokerUser '2'\r\n\r\ntypedef char TThostFtdcBrokerUserTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFutureTypeType是一个期货类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///商品期货\r\n#define THOST_FTDC_FUTT_Commodity '1'\r\n///金融期货\r\n#define THOST_FTDC_FUTT_Financial '2'\r\n\r\ntypedef char TThostFtdcFutureTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundEventTypeType是一个资金管理操作类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///转账限额\r\n#define THOST_FTDC_FET_Restriction '0'\r\n///当日转账限额\r\n#define THOST_FTDC_FET_TodayRestriction '1'\r\n///期商流水\r\n#define THOST_FTDC_FET_Transfer '2'\r\n///资金冻结\r\n#define THOST_FTDC_FET_Credit '3'\r\n///投资者可提资金比例\r\n#define THOST_FTDC_FET_InvestorWithdrawAlm '4'\r\n///单个银行帐户转账限额\r\n#define THOST_FTDC_FET_BankRestriction '5'\r\n///银期签约账户\r\n#define THOST_FTDC_FET_Accountregister '6'\r\n///交易所出入金\r\n#define THOST_FTDC_FET_ExchangeFundIO '7'\r\n///投资者出入金\r\n#define THOST_FTDC_FET_InvestorFundIO '8'\r\n\r\ntypedef char TThostFtdcFundEventTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAccountSourceTypeType是一个资金账户来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银期同步\r\n#define THOST_FTDC_AST_FBTransfer '0'\r\n///手工录入\r\n#define THOST_FTDC_AST_ManualEntry '1'\r\n\r\ntypedef char TThostFtdcAccountSourceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCodeSourceTypeType是一个交易编码来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///统一开户(已规范)\r\n#define THOST_FTDC_CST_UnifyAccount '0'\r\n///手工录入(未规范)\r\n#define THOST_FTDC_CST_ManualEntry '1'\r\n\r\ntypedef char TThostFtdcCodeSourceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserRangeType是一个操作员范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有\r\n#define THOST_FTDC_UR_All '0'\r\n///单一操作员\r\n#define THOST_FTDC_UR_Single '1'\r\n\r\ntypedef char TThostFtdcUserRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTimeSpanType是一个时间跨度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcTimeSpanType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcImportSequenceIDType是一个动态令牌导入批次编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcImportSequenceIDType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcByGroupType是一个交易统计表按客户统计方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///按投资者统计\r\n#define THOST_FTDC_BG_Investor '2'\r\n///按类统计\r\n#define THOST_FTDC_BG_Group '1'\r\n\r\ntypedef char TThostFtdcByGroupType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeSumStatModeType是一个交易统计表按范围统计方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///按合约统计\r\n#define THOST_FTDC_TSSM_Instrument '1'\r\n///按产品统计\r\n#define THOST_FTDC_TSSM_Product '2'\r\n///按交易所统计\r\n#define THOST_FTDC_TSSM_Exchange '3'\r\n\r\ntypedef char TThostFtdcTradeSumStatModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcComTypeType是一个组合成交类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcComTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserProductIDType是一个产品标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUserProductIDType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserProductNameType是一个产品名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUserProductNameType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserProductMemoType是一个产品说明类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUserProductMemoType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCCancelFlagType是一个新增或变更标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCCancelFlagType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCDateType是一个日期类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCDateType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCInvestorNameType是一个客户名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCInvestorNameType[201];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCOpenInvestorNameType是一个客户名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCOpenInvestorNameType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCInvestorIDType是一个客户代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCInvestorIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCIdentifiedCardNoType是一个证件号码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCIdentifiedCardNoType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCClientIDType是一个交易编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCClientIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCBankFlagType是一个银行标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCBankFlagType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCBankAccountType是一个银行账户类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCBankAccountType[23];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCOpenNameType是一个开户人类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCOpenNameType[401];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCMemoType是一个说明类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCMemoType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCTimeType是一个时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCTimeType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCTradeIDType是一个成交流水号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCTradeIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCExchangeInstIDType是一个合约代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCExchangeInstIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCMortgageNameType是一个质押品名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCMortgageNameType[7];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCReasonType是一个事由类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCReasonType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIsSettlementType是一个是否为非结算会员类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIsSettlementType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCMoneyType是一个资金类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcCSRCMoneyType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCPriceType是一个价格类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcCSRCPriceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCOptionsTypeType是一个期权类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCOptionsTypeType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCStrikePriceType是一个执行价类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcCSRCStrikePriceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCTargetProductIDType是一个标的品种类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCTargetProductIDType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCTargetInstrIDType是一个标的合约类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCTargetInstrIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommModelNameType是一个手续费率模板名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCommModelNameType[161];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommModelMemoType是一个手续费率模板备注类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCommModelMemoType[1025];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExprSetModeType是一个日期表达式设置类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///相对已有规则设置\r\n#define THOST_FTDC_ESM_Relative '1'\r\n///典型设置\r\n#define THOST_FTDC_ESM_Typical '2'\r\n\r\ntypedef char TThostFtdcExprSetModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRateInvestorRangeType是一个投资者范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///公司标准\r\n#define THOST_FTDC_RIR_All '1'\r\n///模板\r\n#define THOST_FTDC_RIR_Model '2'\r\n///单一投资者\r\n#define THOST_FTDC_RIR_Single '3'\r\n\r\ntypedef char TThostFtdcRateInvestorRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAgentBrokerIDType是一个代理经纪公司代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAgentBrokerIDType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDRIdentityIDType是一个交易中心代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcDRIdentityIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDRIdentityNameType是一个交易中心名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDRIdentityNameType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDBLinkIDType是一个DBLink标识号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDBLinkIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSyncDataStatusType是一个主次用系统数据同步状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未同步\r\n#define THOST_FTDC_SDS_Initialize '0'\r\n///同步中\r\n#define THOST_FTDC_SDS_Settlementing '1'\r\n///已同步\r\n#define THOST_FTDC_SDS_Settlemented '2'\r\n\r\ntypedef char TThostFtdcSyncDataStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeSourceType是一个成交来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///来自交易所普通回报\r\n#define THOST_FTDC_TSRC_NORMAL '0'\r\n///来自查询\r\n#define THOST_FTDC_TSRC_QUERY '1'\r\n\r\ntypedef char TThostFtdcTradeSourceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFlexStatModeType是一个产品合约统计方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///产品统计\r\n#define THOST_FTDC_FSM_Product '1'\r\n///交易所统计\r\n#define THOST_FTDC_FSM_Exchange '2'\r\n///统计所有\r\n#define THOST_FTDC_FSM_All '3'\r\n\r\ntypedef char TThostFtdcFlexStatModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcByInvestorRangeType是一个投资者范围统计方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///属性统计\r\n#define THOST_FTDC_BIR_Property '1'\r\n///统计所有\r\n#define THOST_FTDC_BIR_All '2'\r\n\r\ntypedef char TThostFtdcByInvestorRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSRiskRateType是一个风险度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSRiskRateType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSequenceNo12Type是一个序号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSequenceNo12Type;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPropertyInvestorRangeType是一个投资者范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有\r\n#define THOST_FTDC_PIR_All '1'\r\n///投资者属性\r\n#define THOST_FTDC_PIR_Property '2'\r\n///单一投资者\r\n#define THOST_FTDC_PIR_Single '3'\r\n\r\ntypedef char TThostFtdcPropertyInvestorRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileStatusType是一个文件状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未生成\r\n#define THOST_FTDC_FIS_NoCreate '0'\r\n///已生成\r\n#define THOST_FTDC_FIS_Created '1'\r\n///生成失败\r\n#define THOST_FTDC_FIS_Failed '2'\r\n\r\ntypedef char TThostFtdcFileStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFileGenStyleType是一个文件生成方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///下发\r\n#define THOST_FTDC_FGS_FileTransmit '0'\r\n///生成\r\n#define THOST_FTDC_FGS_FileGen '1'\r\n\r\ntypedef char TThostFtdcFileGenStyleType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSysOperModeType是一个系统日志操作方法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///增加\r\n#define THOST_FTDC_SoM_Add '1'\r\n///修改\r\n#define THOST_FTDC_SoM_Update '2'\r\n///删除\r\n#define THOST_FTDC_SoM_Delete '3'\r\n///复制\r\n#define THOST_FTDC_SoM_Copy '4'\r\n///激活\r\n#define THOST_FTDC_SoM_AcTive '5'\r\n///注销\r\n#define THOST_FTDC_SoM_CanCel '6'\r\n///重置\r\n#define THOST_FTDC_SoM_ReSet '7'\r\n\r\ntypedef char TThostFtdcSysOperModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSysOperTypeType是一个系统日志操作类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///修改操作员密码\r\n#define THOST_FTDC_SoT_UpdatePassword '0'\r\n///操作员组织架构关系\r\n#define THOST_FTDC_SoT_UserDepartment '1'\r\n///角色管理\r\n#define THOST_FTDC_SoT_RoleManager '2'\r\n///角色功能设置\r\n#define THOST_FTDC_SoT_RoleFunction '3'\r\n///基础参数设置\r\n#define THOST_FTDC_SoT_BaseParam '4'\r\n///设置操作员\r\n#define THOST_FTDC_SoT_SetUserID '5'\r\n///用户角色设置\r\n#define THOST_FTDC_SoT_SetUserRole '6'\r\n///用户IP限制\r\n#define THOST_FTDC_SoT_UserIpRestriction '7'\r\n///组织架构管理\r\n#define THOST_FTDC_SoT_DepartmentManager '8'\r\n///组织架构向查询分类复制\r\n#define THOST_FTDC_SoT_DepartmentCopy '9'\r\n///交易编码管理\r\n#define THOST_FTDC_SoT_Tradingcode 'A'\r\n///投资者状态维护\r\n#define THOST_FTDC_SoT_InvestorStatus 'B'\r\n///投资者权限管理\r\n#define THOST_FTDC_SoT_InvestorAuthority 'C'\r\n///属性设置\r\n#define THOST_FTDC_SoT_PropertySet 'D'\r\n///重置投资者密码\r\n#define THOST_FTDC_SoT_ReSetInvestorPasswd 'E'\r\n///投资者个性信息维护\r\n#define THOST_FTDC_SoT_InvestorPersonalityInfo 'F'\r\n\r\ntypedef char TThostFtdcSysOperTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCDataQueyTypeType是一个上报数据查询类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///查询当前交易日报送的数据\r\n#define THOST_FTDC_CSRCQ_Current '0'\r\n///查询历史报送的代理经纪公司的数据\r\n#define THOST_FTDC_CSRCQ_History '1'\r\n\r\ntypedef char TThostFtdcCSRCDataQueyTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFreezeStatusType是一个休眠状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///活跃\r\n#define THOST_FTDC_FRS_Normal '1'\r\n///休眠\r\n#define THOST_FTDC_FRS_Freeze '0'\r\n\r\ntypedef char TThostFtdcFreezeStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStandardStatusType是一个规范状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已规范\r\n#define THOST_FTDC_STST_Standard '0'\r\n///未规范\r\n#define THOST_FTDC_STST_NonStandard '1'\r\n\r\ntypedef char TThostFtdcStandardStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCFreezeStatusType是一个休眠状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCFreezeStatusType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRightParamTypeType是一个配置类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///休眠户\r\n#define THOST_FTDC_RPT_Freeze '1'\r\n///激活休眠户\r\n#define THOST_FTDC_RPT_FreezeActive '2'\r\n///开仓权限限制\r\n#define THOST_FTDC_RPT_OpenLimit '3'\r\n///解除开仓权限限制\r\n#define THOST_FTDC_RPT_RelieveOpenLimit '4'\r\n\r\ntypedef char TThostFtdcRightParamTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRightTemplateIDType是一个模板代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRightTemplateIDType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRightTemplateNameType是一个模板名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRightTemplateNameType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDataStatusType是一个反洗钱审核表数据状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_AMLDS_Normal '0'\r\n///已删除\r\n#define THOST_FTDC_AMLDS_Deleted '1'\r\n\r\ntypedef char TThostFtdcDataStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAMLCheckStatusType是一个审核状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未复核\r\n#define THOST_FTDC_AMLCHS_Init '0'\r\n///复核中\r\n#define THOST_FTDC_AMLCHS_Checking '1'\r\n///已复核\r\n#define THOST_FTDC_AMLCHS_Checked '2'\r\n///拒绝上报\r\n#define THOST_FTDC_AMLCHS_RefuseReport '3'\r\n\r\ntypedef char TThostFtdcAMLCheckStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAmlDateTypeType是一个日期类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///检查日期\r\n#define THOST_FTDC_AMLDT_DrawDay '0'\r\n///发生日期\r\n#define THOST_FTDC_AMLDT_TouchDay '1'\r\n\r\ntypedef char TThostFtdcAmlDateTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAmlCheckLevelType是一个审核级别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///零级审核\r\n#define THOST_FTDC_AMLCL_CheckLevel0 '0'\r\n///一级审核\r\n#define THOST_FTDC_AMLCL_CheckLevel1 '1'\r\n///二级审核\r\n#define THOST_FTDC_AMLCL_CheckLevel2 '2'\r\n///三级审核\r\n#define THOST_FTDC_AMLCL_CheckLevel3 '3'\r\n\r\ntypedef char TThostFtdcAmlCheckLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAmlCheckFlowType是一个反洗钱数据抽取审核流程类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAmlCheckFlowType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDataTypeType是一个数据类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDataTypeType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExportFileTypeType是一个导出文件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///CSV\r\n#define THOST_FTDC_EFT_CSV '0'\r\n///Excel\r\n#define THOST_FTDC_EFT_EXCEL '1'\r\n///DBF\r\n#define THOST_FTDC_EFT_DBF '2'\r\n\r\ntypedef char TThostFtdcExportFileTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettleManagerTypeType是一个结算配置类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///结算前准备\r\n#define THOST_FTDC_SMT_Before '1'\r\n///结算\r\n#define THOST_FTDC_SMT_Settlement '2'\r\n///结算后核对\r\n#define THOST_FTDC_SMT_After '3'\r\n///结算后处理\r\n#define THOST_FTDC_SMT_Settlemented '4'\r\n\r\ntypedef char TThostFtdcSettleManagerTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettleManagerIDType是一个结算配置代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSettleManagerIDType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettleManagerNameType是一个结算配置名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSettleManagerNameType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettleManagerLevelType是一个结算配置等级类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///必要\r\n#define THOST_FTDC_SML_Must '1'\r\n///警告\r\n#define THOST_FTDC_SML_Alarm '2'\r\n///提示\r\n#define THOST_FTDC_SML_Prompt '3'\r\n///不检查\r\n#define THOST_FTDC_SML_Ignore '4'\r\n\r\ntypedef char TThostFtdcSettleManagerLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettleManagerGroupType是一个模块分组类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易所核对\r\n#define THOST_FTDC_SMG_Exhcange '1'\r\n///内部核对\r\n#define THOST_FTDC_SMG_ASP '2'\r\n///上报数据核对\r\n#define THOST_FTDC_SMG_CSRC '3'\r\n\r\ntypedef char TThostFtdcSettleManagerGroupType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCheckResultMemoType是一个核对结果说明类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCheckResultMemoType[1025];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFunctionUrlType是一个功能链接类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcFunctionUrlType[1025];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAuthInfoType是一个客户端认证信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAuthInfoType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAuthCodeType是一个客户端认证码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAuthCodeType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLimitUseTypeType是一个保值额度使用类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///可重复使用\r\n#define THOST_FTDC_LUT_Repeatable '1'\r\n///不可重复使用\r\n#define THOST_FTDC_LUT_Unrepeatable '2'\r\n\r\ntypedef char TThostFtdcLimitUseTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDataResourceType是一个数据来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///本系统\r\n#define THOST_FTDC_DAR_Settle '1'\r\n///交易所\r\n#define THOST_FTDC_DAR_Exchange '2'\r\n///报送数据\r\n#define THOST_FTDC_DAR_CSRC '3'\r\n\r\ntypedef char TThostFtdcDataResourceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMarginTypeType是一个保证金类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易所保证金率\r\n#define THOST_FTDC_MGT_ExchMarginRate '0'\r\n///投资者保证金率\r\n#define THOST_FTDC_MGT_InstrMarginRate '1'\r\n///投资者交易保证金率\r\n#define THOST_FTDC_MGT_InstrMarginRateTrade '2'\r\n\r\ntypedef char TThostFtdcMarginTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcActiveTypeType是一个生效类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///仅当日生效\r\n#define THOST_FTDC_ACT_Intraday '1'\r\n///长期生效\r\n#define THOST_FTDC_ACT_Long '2'\r\n\r\ntypedef char TThostFtdcActiveTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMarginRateTypeType是一个冲突保证金率类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易所保证金率\r\n#define THOST_FTDC_MRT_Exchange '1'\r\n///投资者保证金率\r\n#define THOST_FTDC_MRT_Investor '2'\r\n///投资者交易保证金率\r\n#define THOST_FTDC_MRT_InvestorTrade '3'\r\n\r\ntypedef char TThostFtdcMarginRateTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBackUpStatusType是一个备份数据状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未生成备份数据\r\n#define THOST_FTDC_BUS_UnBak '0'\r\n///备份数据生成中\r\n#define THOST_FTDC_BUS_BakUp '1'\r\n///已生成备份数据\r\n#define THOST_FTDC_BUS_BakUped '2'\r\n///备份数据失败\r\n#define THOST_FTDC_BUS_BakFail '3'\r\n\r\ntypedef char TThostFtdcBackUpStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInitSettlementType是一个结算初始化状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///结算初始化未开始\r\n#define THOST_FTDC_SIS_UnInitialize '0'\r\n///结算初始化中\r\n#define THOST_FTDC_SIS_Initialize '1'\r\n///结算初始化完成\r\n#define THOST_FTDC_SIS_Initialized '2'\r\n\r\ntypedef char TThostFtdcInitSettlementType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReportStatusType是一个报表数据生成状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未生成报表数据\r\n#define THOST_FTDC_SRS_NoCreate '0'\r\n///报表数据生成中\r\n#define THOST_FTDC_SRS_Create '1'\r\n///已生成报表数据\r\n#define THOST_FTDC_SRS_Created '2'\r\n///生成报表数据失败\r\n#define THOST_FTDC_SRS_CreateFail '3'\r\n\r\ntypedef char TThostFtdcReportStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSaveStatusType是一个数据归档状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///归档未完成\r\n#define THOST_FTDC_SSS_UnSaveData '0'\r\n///归档完成\r\n#define THOST_FTDC_SSS_SaveDatad '1'\r\n\r\ntypedef char TThostFtdcSaveStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSettArchiveStatusType是一个结算确认数据归档状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未归档数据\r\n#define THOST_FTDC_SAS_UnArchived '0'\r\n///数据归档中\r\n#define THOST_FTDC_SAS_Archiving '1'\r\n///已归档数据\r\n#define THOST_FTDC_SAS_Archived '2'\r\n///归档数据失败\r\n#define THOST_FTDC_SAS_ArchiveFail '3'\r\n\r\ntypedef char TThostFtdcSettArchiveStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCTPTypeType是一个CTP交易系统类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未知类型\r\n#define THOST_FTDC_CTPT_Unkown '0'\r\n///主中心\r\n#define THOST_FTDC_CTPT_MainCenter '1'\r\n///备中心\r\n#define THOST_FTDC_CTPT_BackUp '2'\r\n\r\ntypedef char TThostFtdcCTPTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcToolIDType是一个工具代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcToolIDType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcToolNameType是一个工具名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcToolNameType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCloseDealTypeType是一个平仓处理类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_CDT_Normal '0'\r\n///投机平仓优先\r\n#define THOST_FTDC_CDT_SpecFirst '1'\r\n\r\ntypedef char TThostFtdcCloseDealTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMortgageFundUseRangeType是一个货币质押资金可用范围类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不能使用\r\n#define THOST_FTDC_MFUR_None '0'\r\n///用于保证金\r\n#define THOST_FTDC_MFUR_Margin '1'\r\n///用于手续费、盈亏、保证金\r\n#define THOST_FTDC_MFUR_All '2'\r\n///人民币方案3\r\n#define THOST_FTDC_MFUR_CNY3 '3'\r\n\r\ntypedef char TThostFtdcMortgageFundUseRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrencyUnitType是一个币种单位数量类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcCurrencyUnitType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExchangeRateType是一个汇率类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcExchangeRateType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSpecProductTypeType是一个特殊产品类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///郑商所套保产品\r\n#define THOST_FTDC_SPT_CzceHedge '1'\r\n///货币质押产品\r\n#define THOST_FTDC_SPT_IneForeignCurrency '2'\r\n///大连短线开平仓产品\r\n#define THOST_FTDC_SPT_DceOpenClose '3'\r\n\r\ntypedef char TThostFtdcSpecProductTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundMortgageTypeType是一个货币质押类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///质押\r\n#define THOST_FTDC_FMT_Mortgage '1'\r\n///解质\r\n#define THOST_FTDC_FMT_Redemption '2'\r\n\r\ntypedef char TThostFtdcFundMortgageTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAccountSettlementParamIDType是一个投资者账户结算参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///基础保证金\r\n#define THOST_FTDC_ASPI_BaseMargin '1'\r\n///最低权益标准\r\n#define THOST_FTDC_ASPI_LowestInterest '2'\r\n\r\ntypedef char TThostFtdcAccountSettlementParamIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrencyNameType是一个币种名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCurrencyNameType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrencySignType是一个币种符号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCurrencySignType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundMortDirectionType是一个货币质押方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///货币质入\r\n#define THOST_FTDC_FMD_In '1'\r\n///货币质出\r\n#define THOST_FTDC_FMD_Out '2'\r\n\r\ntypedef char TThostFtdcFundMortDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBusinessClassType是一个换汇类别类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///盈利\r\n#define THOST_FTDC_BT_Profit '0'\r\n///亏损\r\n#define THOST_FTDC_BT_Loss '1'\r\n///其他\r\n#define THOST_FTDC_BT_Other 'Z'\r\n\r\ntypedef char TThostFtdcBusinessClassType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSwapSourceTypeType是一个换汇数据来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///手工\r\n#define THOST_FTDC_SST_Manual '0'\r\n///自动生成\r\n#define THOST_FTDC_SST_Automatic '1'\r\n\r\ntypedef char TThostFtdcSwapSourceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrExDirectionType是一个换汇类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///结汇\r\n#define THOST_FTDC_CED_Settlement '0'\r\n///售汇\r\n#define THOST_FTDC_CED_Sale '1'\r\n\r\ntypedef char TThostFtdcCurrExDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrencySwapStatusType是一个申请状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已录入\r\n#define THOST_FTDC_CSS_Entry '1'\r\n///已审核\r\n#define THOST_FTDC_CSS_Approve '2'\r\n///已拒绝\r\n#define THOST_FTDC_CSS_Refuse '3'\r\n///已撤销\r\n#define THOST_FTDC_CSS_Revoke '4'\r\n///已发送\r\n#define THOST_FTDC_CSS_Send '5'\r\n///换汇成功\r\n#define THOST_FTDC_CSS_Success '6'\r\n///换汇失败\r\n#define THOST_FTDC_CSS_Failure '7'\r\n\r\ntypedef char TThostFtdcCurrencySwapStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrExchCertNoType是一个凭证号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCurrExchCertNoType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBatchSerialNoType是一个批次号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBatchSerialNoType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReqFlagType是一个换汇发送标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///未发送\r\n#define THOST_FTDC_REQF_NoSend '0'\r\n///发送成功\r\n#define THOST_FTDC_REQF_SendSuccess '1'\r\n///发送失败\r\n#define THOST_FTDC_REQF_SendFailed '2'\r\n///等待重发\r\n#define THOST_FTDC_REQF_WaitReSend '3'\r\n\r\ntypedef char TThostFtdcReqFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcResFlagType是一个换汇返回成功标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///成功\r\n#define THOST_FTDC_RESF_Success '0'\r\n///账户余额不足\r\n#define THOST_FTDC_RESF_InsuffiCient '1'\r\n///交易结果未知\r\n#define THOST_FTDC_RESF_UnKnown '8'\r\n\r\ntypedef char TThostFtdcResFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPageControlType是一个换汇页面控制类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPageControlType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRecordCountType是一个记录数类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcRecordCountType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrencySwapMemoType是一个换汇需确认信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCurrencySwapMemoType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExStatusType是一个修改状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///修改前\r\n#define THOST_FTDC_EXS_Before '0'\r\n///修改后\r\n#define THOST_FTDC_EXS_After '1'\r\n\r\ntypedef char TThostFtdcExStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientRegionType是一个开户客户地域类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///国内客户\r\n#define THOST_FTDC_CR_Domestic '1'\r\n///港澳台客户\r\n#define THOST_FTDC_CR_GMT '2'\r\n///国外客户\r\n#define THOST_FTDC_CR_Foreign '3'\r\n\r\ntypedef char TThostFtdcClientRegionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWorkPlaceType是一个工作单位类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcWorkPlaceType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBusinessPeriodType是一个经营期限类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBusinessPeriodType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWebSiteType是一个网址类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcWebSiteType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOAIdCardTypeType是一个统一开户证件类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOAIdCardTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientModeType是一个开户模式类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClientModeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestorFullNameType是一个投资者全称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvestorFullNameType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOABrokerIDType是一个境外中介机构ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOABrokerIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOAZipCodeType是一个邮政编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOAZipCodeType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOAEMailType是一个电子邮箱类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOAEMailType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOldCityType是一个城市类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOldCityType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCorporateIdentifiedCardNoType是一个法人代表证件号码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCorporateIdentifiedCardNoType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHasBoardType是一个是否有董事会类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///没有\r\n#define THOST_FTDC_HB_No '0'\r\n///有\r\n#define THOST_FTDC_HB_Yes '1'\r\n\r\ntypedef char TThostFtdcHasBoardType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStartModeType是一个启动模式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///正常\r\n#define THOST_FTDC_SM_Normal '1'\r\n///应急\r\n#define THOST_FTDC_SM_Emerge '2'\r\n///恢复\r\n#define THOST_FTDC_SM_Restore '3'\r\n\r\ntypedef char TThostFtdcStartModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTemplateTypeType是一个模型类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///全量\r\n#define THOST_FTDC_TPT_Full '1'\r\n///增量\r\n#define THOST_FTDC_TPT_Increment '2'\r\n///备份\r\n#define THOST_FTDC_TPT_BackUp '3'\r\n\r\ntypedef char TThostFtdcTemplateTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLoginModeType是一个登录模式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易\r\n#define THOST_FTDC_LM_Trade '0'\r\n///转账\r\n#define THOST_FTDC_LM_Transfer '1'\r\n\r\ntypedef char TThostFtdcLoginModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPromptTypeType是一个日历提示类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///合约上下市\r\n#define THOST_FTDC_CPT_Instrument '1'\r\n///保证金分段生效\r\n#define THOST_FTDC_CPT_Margin '2'\r\n\r\ntypedef char TThostFtdcPromptTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLedgerManageIDType是一个分户管理资产编码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLedgerManageIDType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestVarietyType是一个投资品种类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvestVarietyType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBankAccountTypeType是一个账户类别类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBankAccountTypeType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLedgerManageBankType是一个开户银行类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLedgerManageBankType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCffexDepartmentNameType是一个开户营业部类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCffexDepartmentNameType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCffexDepartmentCodeType是一个营业部代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCffexDepartmentCodeType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHasTrusteeType是一个是否有托管人类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///有\r\n#define THOST_FTDC_HT_Yes '1'\r\n///没有\r\n#define THOST_FTDC_HT_No '0'\r\n\r\ntypedef char TThostFtdcHasTrusteeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCMemo1Type是一个说明类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCMemo1Type[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAssetmgrCFullNameType是一个代理资产管理业务的期货公司全称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAssetmgrCFullNameType[101];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAssetmgrApprovalNOType是一个资产管理业务批文号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAssetmgrApprovalNOType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAssetmgrMgrNameType是一个资产管理业务负责人姓名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAssetmgrMgrNameType[401];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAmTypeType是一个机构类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///银行\r\n#define THOST_FTDC_AMT_Bank '1'\r\n///证券公司\r\n#define THOST_FTDC_AMT_Securities '2'\r\n///基金公司\r\n#define THOST_FTDC_AMT_Fund '3'\r\n///保险公司\r\n#define THOST_FTDC_AMT_Insurance '4'\r\n///信托公司\r\n#define THOST_FTDC_AMT_Trust '5'\r\n///其他\r\n#define THOST_FTDC_AMT_Other '9'\r\n\r\ntypedef char TThostFtdcAmTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCAmTypeType是一个机构类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCAmTypeType[5];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCFundIOTypeType是一个出入金类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///出入金\r\n#define THOST_FTDC_CFIOT_FundIO '0'\r\n///银期换汇\r\n#define THOST_FTDC_CFIOT_SwapCurrency '1'\r\n\r\ntypedef char TThostFtdcCSRCFundIOTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCusAccountTypeType是一个结算账户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货结算账户\r\n#define THOST_FTDC_CAT_Futures '1'\r\n///纯期货资管业务下的资管结算账户\r\n#define THOST_FTDC_CAT_AssetmgrFuture '2'\r\n///综合类资管业务下的期货资管托管账户\r\n#define THOST_FTDC_CAT_AssetmgrTrustee '3'\r\n///综合类资管业务下的资金中转账户\r\n#define THOST_FTDC_CAT_AssetmgrTransfer '4'\r\n\r\ntypedef char TThostFtdcCusAccountTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCNationalType是一个国籍类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCNationalType[4];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCSRCSecAgentIDType是一个二级代理ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCSRCSecAgentIDType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLanguageTypeType是一个通知语言类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///中文\r\n#define THOST_FTDC_LT_Chinese '1'\r\n///英文\r\n#define THOST_FTDC_LT_English '2'\r\n\r\ntypedef char TThostFtdcLanguageTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAmAccountType是一个投资账户类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAmAccountType[23];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAssetmgrClientTypeType是一个资产管理客户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///个人资管客户\r\n#define THOST_FTDC_AMCT_Person '1'\r\n///单位资管客户\r\n#define THOST_FTDC_AMCT_Organ '2'\r\n///特殊单位资管客户\r\n#define THOST_FTDC_AMCT_SpecialOrgan '4'\r\n\r\ntypedef char TThostFtdcAssetmgrClientTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAssetmgrTypeType是一个投资类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货类\r\n#define THOST_FTDC_ASST_Futures '3'\r\n///综合类\r\n#define THOST_FTDC_ASST_SpecialOrgan '4'\r\n\r\ntypedef char TThostFtdcAssetmgrTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOMType是一个计量单位类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcUOMType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSHFEInstLifePhaseType是一个上期所合约生命周期状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSHFEInstLifePhaseType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSHFEProductClassType是一个产品类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSHFEProductClassType[11];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPriceDecimalType是一个价格小数位类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcPriceDecimalType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInTheMoneyFlagType是一个平值期权标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInTheMoneyFlagType[2];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCheckInstrTypeType是一个合约比较类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///合约交易所不存在\r\n#define THOST_FTDC_CIT_HasExch '0'\r\n///合约本系统不存在\r\n#define THOST_FTDC_CIT_HasATP '1'\r\n///合约比较不一致\r\n#define THOST_FTDC_CIT_HasDiff '2'\r\n\r\ntypedef char TThostFtdcCheckInstrTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDeliveryTypeType是一个交割类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///手工交割\r\n#define THOST_FTDC_DT_HandDeliv '1'\r\n///到期交割\r\n#define THOST_FTDC_DT_PersonDeliv '2'\r\n\r\ntypedef char TThostFtdcDeliveryTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBigMoneyType是一个资金类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcBigMoneyType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMaxMarginSideAlgorithmType是一个大额单边保证金算法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不使用大额单边保证金算法\r\n#define THOST_FTDC_MMSA_NO '0'\r\n///使用大额单边保证金算法\r\n#define THOST_FTDC_MMSA_YES '1'\r\n\r\ntypedef char TThostFtdcMaxMarginSideAlgorithmType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDAClientTypeType是一个资产管理客户类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自然人\r\n#define THOST_FTDC_CACT_Person '0'\r\n///法人\r\n#define THOST_FTDC_CACT_Company '1'\r\n///其他\r\n#define THOST_FTDC_CACT_Other '2'\r\n\r\ntypedef char TThostFtdcDAClientTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombinInstrIDType是一个套利合约代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCombinInstrIDType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombinSettlePriceType是一个各腿结算价类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCombinSettlePriceType[61];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDCEPriorityType是一个优先级类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcDCEPriorityType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradeGroupIDType是一个成交组号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcTradeGroupIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIsCheckPrepaType是一个是否校验开户可用资金类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcIsCheckPrepaType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUOAAssetmgrTypeType是一个投资类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货类\r\n#define THOST_FTDC_UOAAT_Futures '1'\r\n///综合类\r\n#define THOST_FTDC_UOAAT_SpecialOrgan '2'\r\n\r\ntypedef char TThostFtdcUOAAssetmgrTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDirectionEnType是一个买卖方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///Buy\r\n#define THOST_FTDC_DEN_Buy '0'\r\n///Sell\r\n#define THOST_FTDC_DEN_Sell '1'\r\n\r\ntypedef char TThostFtdcDirectionEnType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOffsetFlagEnType是一个开平标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///Position Opening\r\n#define THOST_FTDC_OFEN_Open '0'\r\n///Position Close\r\n#define THOST_FTDC_OFEN_Close '1'\r\n///Forced Liquidation\r\n#define THOST_FTDC_OFEN_ForceClose '2'\r\n///Close Today\r\n#define THOST_FTDC_OFEN_CloseToday '3'\r\n///Close Prev.\r\n#define THOST_FTDC_OFEN_CloseYesterday '4'\r\n///Forced Reduction\r\n#define THOST_FTDC_OFEN_ForceOff '5'\r\n///Local Forced Liquidation\r\n#define THOST_FTDC_OFEN_LocalForceClose '6'\r\n\r\ntypedef char TThostFtdcOffsetFlagEnType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHedgeFlagEnType是一个投机套保标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///Speculation\r\n#define THOST_FTDC_HFEN_Speculation '1'\r\n///Arbitrage\r\n#define THOST_FTDC_HFEN_Arbitrage '2'\r\n///Hedge\r\n#define THOST_FTDC_HFEN_Hedge '3'\r\n\r\ntypedef char TThostFtdcHedgeFlagEnType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundIOTypeEnType是一个出入金类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///Deposit/Withdrawal\r\n#define THOST_FTDC_FIOTEN_FundIO '1'\r\n///Bank-Futures Transfer\r\n#define THOST_FTDC_FIOTEN_Transfer '2'\r\n///Bank-Futures FX Exchange\r\n#define THOST_FTDC_FIOTEN_SwapCurrency '3'\r\n\r\ntypedef char TThostFtdcFundIOTypeEnType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundTypeEnType是一个资金类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///Bank Deposit\r\n#define THOST_FTDC_FTEN_Deposite '1'\r\n///Payment/Fee\r\n#define THOST_FTDC_FTEN_ItemFund '2'\r\n///Brokerage Adj\r\n#define THOST_FTDC_FTEN_Company '3'\r\n///Internal Transfer\r\n#define THOST_FTDC_FTEN_InnerTransfer '4'\r\n\r\ntypedef char TThostFtdcFundTypeEnType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundDirectionEnType是一个出入金方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///Deposit\r\n#define THOST_FTDC_FDEN_In '1'\r\n///Withdrawal\r\n#define THOST_FTDC_FDEN_Out '2'\r\n\r\ntypedef char TThostFtdcFundDirectionEnType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcFundMortDirectionEnType是一个货币质押方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///Pledge\r\n#define THOST_FTDC_FMDEN_In '1'\r\n///Redemption\r\n#define THOST_FTDC_FMDEN_Out '2'\r\n\r\ntypedef char TThostFtdcFundMortDirectionEnType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSwapBusinessTypeType是一个换汇业务种类类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSwapBusinessTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOptionsTypeType是一个期权类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///看涨\r\n#define THOST_FTDC_CP_CallOptions '1'\r\n///看跌\r\n#define THOST_FTDC_CP_PutOptions '2'\r\n\r\ntypedef char TThostFtdcOptionsTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStrikeModeType是一个执行方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///欧式\r\n#define THOST_FTDC_STM_Continental '0'\r\n///美式\r\n#define THOST_FTDC_STM_American '1'\r\n///百慕大\r\n#define THOST_FTDC_STM_Bermuda '2'\r\n\r\ntypedef char TThostFtdcStrikeModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStrikeTypeType是一个执行类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自身对冲\r\n#define THOST_FTDC_STT_Hedge '0'\r\n///匹配执行\r\n#define THOST_FTDC_STT_Match '1'\r\n\r\ntypedef char TThostFtdcStrikeTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcApplyTypeType是一个中金所期权放弃执行申请类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不执行数量\r\n#define THOST_FTDC_APPT_NotStrikeNum '4'\r\n\r\ntypedef char TThostFtdcApplyTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcGiveUpDataSourceType是一个放弃执行申请数据来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///系统生成\r\n#define THOST_FTDC_GUDS_Gen '0'\r\n///手工添加\r\n#define THOST_FTDC_GUDS_Hand '1'\r\n\r\ntypedef char TThostFtdcGiveUpDataSourceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExecOrderSysIDType是一个执行宣告系统编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcExecOrderSysIDType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExecResultType是一个执行结果类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///没有执行\r\n#define THOST_FTDC_OER_NoExec 'n'\r\n///已经取消\r\n#define THOST_FTDC_OER_Canceled 'c'\r\n///执行成功\r\n#define THOST_FTDC_OER_OK '0'\r\n///期权持仓不够\r\n#define THOST_FTDC_OER_NoPosition '1'\r\n///资金不够\r\n#define THOST_FTDC_OER_NoDeposit '2'\r\n///会员不存在\r\n#define THOST_FTDC_OER_NoParticipant '3'\r\n///客户不存在\r\n#define THOST_FTDC_OER_NoClient '4'\r\n///合约不存在\r\n#define THOST_FTDC_OER_NoInstrument '6'\r\n///没有执行权限\r\n#define THOST_FTDC_OER_NoRight '7'\r\n///不合理的数量\r\n#define THOST_FTDC_OER_InvalidVolume '8'\r\n///没有足够的历史成交\r\n#define THOST_FTDC_OER_NoEnoughHistoryTrade '9'\r\n///未知\r\n#define THOST_FTDC_OER_Unknown 'a'\r\n\r\ntypedef char TThostFtdcExecResultType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStrikeSequenceType是一个执行序号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcStrikeSequenceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStrikeTimeType是一个执行时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcStrikeTimeType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombinationTypeType是一个组合类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货组合\r\n#define THOST_FTDC_COMBT_Future '0'\r\n///垂直价差BUL\r\n#define THOST_FTDC_COMBT_BUL '1'\r\n///垂直价差BER\r\n#define THOST_FTDC_COMBT_BER '2'\r\n///跨式组合\r\n#define THOST_FTDC_COMBT_STD '3'\r\n///宽跨式组合\r\n#define THOST_FTDC_COMBT_STG '4'\r\n///备兑组合\r\n#define THOST_FTDC_COMBT_PRT '5'\r\n///时间价差组合\r\n#define THOST_FTDC_COMBT_CAS '6'\r\n///期权对锁组合\r\n#define THOST_FTDC_COMBT_OPL '7'\r\n///买备兑组合\r\n#define THOST_FTDC_COMBT_BFO '8'\r\n///买入期权垂直价差组合\r\n#define THOST_FTDC_COMBT_BLS '9'\r\n///卖出期权垂直价差组合\r\n#define THOST_FTDC_COMBT_BES 'a'\r\n\r\ntypedef char TThostFtdcCombinationTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDceCombinationTypeType是一个组合类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货对锁组合\r\n#define THOST_FTDC_DCECOMBT_SPL '0'\r\n///期权对锁组合\r\n#define THOST_FTDC_DCECOMBT_OPL '1'\r\n///期货跨期组合\r\n#define THOST_FTDC_DCECOMBT_SP '2'\r\n///期货跨品种组合\r\n#define THOST_FTDC_DCECOMBT_SPC '3'\r\n///买入期权垂直价差组合\r\n#define THOST_FTDC_DCECOMBT_BLS '4'\r\n///卖出期权垂直价差组合\r\n#define THOST_FTDC_DCECOMBT_BES '5'\r\n///期权日历价差组合\r\n#define THOST_FTDC_DCECOMBT_CAS '6'\r\n///期权跨式组合\r\n#define THOST_FTDC_DCECOMBT_STD '7'\r\n///期权宽跨式组合\r\n#define THOST_FTDC_DCECOMBT_STG '8'\r\n///买入期货期权组合\r\n#define THOST_FTDC_DCECOMBT_BFO '9'\r\n///卖出期货期权组合\r\n#define THOST_FTDC_DCECOMBT_SFO 'a'\r\n\r\ntypedef char TThostFtdcDceCombinationTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOptionRoyaltyPriceTypeType是一个期权权利金价格类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///昨结算价\r\n#define THOST_FTDC_ORPT_PreSettlementPrice '1'\r\n///开仓价\r\n#define THOST_FTDC_ORPT_OpenPrice '4'\r\n///最新价与昨结算价较大值\r\n#define THOST_FTDC_ORPT_MaxPreSettlementPrice '5'\r\n\r\ntypedef char TThostFtdcOptionRoyaltyPriceTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBalanceAlgorithmType是一个权益算法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不计算期权市值盈亏\r\n#define THOST_FTDC_BLAG_Default '1'\r\n///计算期权市值亏损\r\n#define THOST_FTDC_BLAG_IncludeOptValLost '2'\r\n\r\ntypedef char TThostFtdcBalanceAlgorithmType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcActionTypeType是一个执行类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///执行\r\n#define THOST_FTDC_ACTP_Exec '1'\r\n///放弃\r\n#define THOST_FTDC_ACTP_Abandon '2'\r\n\r\ntypedef char TThostFtdcActionTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcForQuoteStatusType是一个询价状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///已经提交\r\n#define THOST_FTDC_FQST_Submitted 'a'\r\n///已经接受\r\n#define THOST_FTDC_FQST_Accepted 'b'\r\n///已经被拒绝\r\n#define THOST_FTDC_FQST_Rejected 'c'\r\n\r\ntypedef char TThostFtdcForQuoteStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcValueMethodType是一个取值方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///按绝对值\r\n#define THOST_FTDC_VM_Absolute '0'\r\n///按比率\r\n#define THOST_FTDC_VM_Ratio '1'\r\n\r\ntypedef char TThostFtdcValueMethodType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExecOrderPositionFlagType是一个期权行权后是否保留期货头寸的标记类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///保留\r\n#define THOST_FTDC_EOPF_Reserve '0'\r\n///不保留\r\n#define THOST_FTDC_EOPF_UnReserve '1'\r\n\r\ntypedef char TThostFtdcExecOrderPositionFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcExecOrderCloseFlagType是一个期权行权后生成的头寸是否自动平仓类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自动平仓\r\n#define THOST_FTDC_EOCF_AutoClose '0'\r\n///免于自动平仓\r\n#define THOST_FTDC_EOCF_NotToClose '1'\r\n\r\ntypedef char TThostFtdcExecOrderCloseFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductTypeType是一个产品类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货\r\n#define THOST_FTDC_PTE_Futures '1'\r\n///期权\r\n#define THOST_FTDC_PTE_Options '2'\r\n\r\ntypedef char TThostFtdcProductTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCZCEUploadFileNameType是一个郑商所结算文件名类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///^\\d{8}_zz_\\d{4}\r\n#define THOST_FTDC_CUFN_CUFN_O 'O'\r\n///^\\d{8}成交表\r\n#define THOST_FTDC_CUFN_CUFN_T 'T'\r\n///^\\d{8}单腿持仓表new\r\n#define THOST_FTDC_CUFN_CUFN_P 'P'\r\n///^\\d{8}非平仓了结表\r\n#define THOST_FTDC_CUFN_CUFN_N 'N'\r\n///^\\d{8}平仓表\r\n#define THOST_FTDC_CUFN_CUFN_L 'L'\r\n///^\\d{8}资金表\r\n#define THOST_FTDC_CUFN_CUFN_F 'F'\r\n///^\\d{8}组合持仓表\r\n#define THOST_FTDC_CUFN_CUFN_C 'C'\r\n///^\\d{8}保证金参数表\r\n#define THOST_FTDC_CUFN_CUFN_M 'M'\r\n\r\ntypedef char TThostFtdcCZCEUploadFileNameType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDCEUploadFileNameType是一个大商所结算文件名类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///^\\d{8}_dl_\\d{3}\r\n#define THOST_FTDC_DUFN_DUFN_O 'O'\r\n///^\\d{8}_成交表\r\n#define THOST_FTDC_DUFN_DUFN_T 'T'\r\n///^\\d{8}_持仓表\r\n#define THOST_FTDC_DUFN_DUFN_P 'P'\r\n///^\\d{8}_资金结算表\r\n#define THOST_FTDC_DUFN_DUFN_F 'F'\r\n///^\\d{8}_优惠组合持仓明细表\r\n#define THOST_FTDC_DUFN_DUFN_C 'C'\r\n///^\\d{8}_持仓明细表\r\n#define THOST_FTDC_DUFN_DUFN_D 'D'\r\n///^\\d{8}_保证金参数表\r\n#define THOST_FTDC_DUFN_DUFN_M 'M'\r\n///^\\d{8}_期权执行表\r\n#define THOST_FTDC_DUFN_DUFN_S 'S'\r\n\r\ntypedef char TThostFtdcDCEUploadFileNameType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSHFEUploadFileNameType是一个上期所结算文件名类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///^\\d{4}_\\d{8}_\\d{8}_DailyFundChg\r\n#define THOST_FTDC_SUFN_SUFN_O 'O'\r\n///^\\d{4}_\\d{8}_\\d{8}_Trade\r\n#define THOST_FTDC_SUFN_SUFN_T 'T'\r\n///^\\d{4}_\\d{8}_\\d{8}_SettlementDetail\r\n#define THOST_FTDC_SUFN_SUFN_P 'P'\r\n///^\\d{4}_\\d{8}_\\d{8}_Capital\r\n#define THOST_FTDC_SUFN_SUFN_F 'F'\r\n\r\ntypedef char TThostFtdcSHFEUploadFileNameType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCFFEXUploadFileNameType是一个中金所结算文件名类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_Trade\r\n#define THOST_FTDC_CFUFN_SUFN_T 'T'\r\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_SettlementDetail\r\n#define THOST_FTDC_CFUFN_SUFN_P 'P'\r\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_Capital\r\n#define THOST_FTDC_CFUFN_SUFN_F 'F'\r\n///^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_OptionExec\r\n#define THOST_FTDC_CFUFN_SUFN_S 'S'\r\n\r\ntypedef char TThostFtdcCFFEXUploadFileNameType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCombDirectionType是一个组合指令方向类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///申请组合\r\n#define THOST_FTDC_CMDR_Comb '0'\r\n///申请拆分\r\n#define THOST_FTDC_CMDR_UnComb '1'\r\n///操作员删组合单\r\n#define THOST_FTDC_CMDR_DelComb '2'\r\n\r\ntypedef char TThostFtdcCombDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStrikeOffsetTypeType是一个行权偏移类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///实值额\r\n#define THOST_FTDC_STOV_RealValue '1'\r\n///盈利额\r\n#define THOST_FTDC_STOV_ProfitValue '2'\r\n///实值比例\r\n#define THOST_FTDC_STOV_RealRatio '3'\r\n///盈利比例\r\n#define THOST_FTDC_STOV_ProfitRatio '4'\r\n\r\ntypedef char TThostFtdcStrikeOffsetTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReserveOpenAccStasType是一个预约开户状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///等待处理中\r\n#define THOST_FTDC_ROAST_Processing '0'\r\n///已撤销\r\n#define THOST_FTDC_ROAST_Cancelled '1'\r\n///已开户\r\n#define THOST_FTDC_ROAST_Opened '2'\r\n///无效请求\r\n#define THOST_FTDC_ROAST_Invalid '3'\r\n\r\ntypedef char TThostFtdcReserveOpenAccStasType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLoginRemarkType是一个登录备注类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLoginRemarkType[36];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvestUnitIDType是一个投资单元代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcInvestUnitIDType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBulletinIDType是一个公告编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcBulletinIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcNewsTypeType是一个公告类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcNewsTypeType[3];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcNewsUrgencyType是一个紧急程度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcNewsUrgencyType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAbstractType是一个消息摘要类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAbstractType[81];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcComeFromType是一个消息来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcComeFromType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcURLLinkType是一个WEB地址类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcURLLinkType[201];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLongIndividualNameType是一个长个人姓名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLongIndividualNameType[161];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcLongFBEBankAccountNameType是一个长换汇银行账户名类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcLongFBEBankAccountNameType[161];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDateTimeType是一个日期时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcDateTimeType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWeakPasswordSourceType是一个弱密码来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///弱密码库\r\n#define THOST_FTDC_WPSR_Lib '1'\r\n///手工录入\r\n#define THOST_FTDC_WPSR_Manual '2'\r\n\r\ntypedef char TThostFtdcWeakPasswordSourceType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRandomStringType是一个随机串类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRandomStringType[17];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderMemoType是一个报单回显字段类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOrderMemoType[13];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOptSelfCloseFlagType是一个期权行权的头寸是否自对冲类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///自对冲期权仓位\r\n#define THOST_FTDC_OSCF_CloseSelfOptionPosition '1'\r\n///保留期权仓位\r\n#define THOST_FTDC_OSCF_ReserveOptionPosition '2'\r\n///自对冲卖方履约后的期货仓位\r\n#define THOST_FTDC_OSCF_SellCloseSelfFuturePosition '3'\r\n///保留卖方履约后的期货仓位\r\n#define THOST_FTDC_OSCF_ReserveFuturePosition '4'\r\n\r\ntypedef char TThostFtdcOptSelfCloseFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBizTypeType是一个业务类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期货\r\n#define THOST_FTDC_BZTP_Future '1'\r\n///证券\r\n#define THOST_FTDC_BZTP_Stock '2'\r\n\r\ntypedef char TThostFtdcBizTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAppTypeType是一个用户App类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///直连的投资者\r\n#define THOST_FTDC_APP_TYPE_Investor '1'\r\n///为每个投资者都创建连接的中继\r\n#define THOST_FTDC_APP_TYPE_InvestorRelay '2'\r\n///所有投资者共享一个操作员连接的中继\r\n#define THOST_FTDC_APP_TYPE_OperatorRelay '3'\r\n///未知\r\n#define THOST_FTDC_APP_TYPE_UnKnown '4'\r\n\r\ntypedef char TThostFtdcAppTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAppIDType是一个App代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAppIDType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSystemInfoLenType是一个系统信息长度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSystemInfoLenType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAdditionalInfoLenType是一个补充信息长度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcAdditionalInfoLenType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClientSystemInfoType是一个交易终端系统信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcClientSystemInfoType[273];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAdditionalInfoType是一个系统外部信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAdditionalInfoType[261];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBase64ClientSystemInfoType是一个base64交易终端系统信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBase64ClientSystemInfoType[365];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcBase64AdditionalInfoType是一个base64系统外部信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcBase64AdditionalInfoType[349];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCurrentAuthMethodType是一个当前可用的认证模式，0代表无需认证模式 A从低位开始最后一位代表图片验证码，倒数第二位代表动态口令，倒数第三位代表短信验证码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCurrentAuthMethodType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCaptchaInfoLenType是一个图片验证信息长度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCaptchaInfoLenType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCaptchaInfoType是一个图片验证信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCaptchaInfoType[2561];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcUserTextSeqType是一个用户短信验证码的编号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcUserTextSeqType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHandshakeDataType是一个握手数据内容类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcHandshakeDataType[301];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHandshakeDataLenType是一个握手数据内容长度类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcHandshakeDataLenType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCryptoKeyVersionType是一个api与front通信密钥版本号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCryptoKeyVersionType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRsaKeyVersionType是一个公钥版本号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcRsaKeyVersionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSoftwareProviderIDType是一个交易软件商ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSoftwareProviderIDType[22];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCollectTimeType是一个信息采集时间类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcCollectTimeType[21];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcQueryFreqType是一个查询频率类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcQueryFreqType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcResponseValueType是一个应答类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///检查成功\r\n#define THOST_FTDC_RV_Right '0'\r\n///检查失败\r\n#define THOST_FTDC_RV_Refuse '1'\r\n\r\ntypedef char TThostFtdcResponseValueType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOTCTradeTypeType是一个OTC成交类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///大宗交易\r\n#define THOST_FTDC_OTC_TRDT_Block '0'\r\n///期转现\r\n#define THOST_FTDC_OTC_TRDT_EFP '1'\r\n\r\ntypedef char TThostFtdcOTCTradeTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcMatchTypeType是一个期现风险匹配方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///基点价值\r\n#define THOST_FTDC_OTC_MT_DV01 '1'\r\n///面值\r\n#define THOST_FTDC_OTC_MT_ParValue '2'\r\n\r\ntypedef char TThostFtdcMatchTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOTCTraderIDType是一个OTC交易员代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcOTCTraderIDType[31];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRiskValueType是一个期货风险值类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcRiskValueType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIDBNameType是一个握手数据内容类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIDBNameType[100];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDiscountRatioType是一个折扣率类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcDiscountRatioType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAuthTypeType是一个用户终端认证方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///白名单校验\r\n#define THOST_FTDC_AU_WHITE '0'\r\n///黑名单校验\r\n#define THOST_FTDC_AU_BLACK '1'\r\n\r\ntypedef char TThostFtdcAuthTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcClassTypeType是一个合约分类方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有合约\r\n#define THOST_FTDC_INS_ALL '0'\r\n///期货、即期、期转现、Tas、金属指数合约\r\n#define THOST_FTDC_INS_FUTURE '1'\r\n///期货、现货期权合约\r\n#define THOST_FTDC_INS_OPTION '2'\r\n///组合合约\r\n#define THOST_FTDC_INS_COMB '3'\r\n\r\ntypedef char TThostFtdcClassTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTradingTypeType是一个合约交易状态分类方式类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///所有状态\r\n#define THOST_FTDC_TD_ALL '0'\r\n///交易\r\n#define THOST_FTDC_TD_TRADE '1'\r\n///非交易\r\n#define THOST_FTDC_TD_UNTRADE '2'\r\n\r\ntypedef char TThostFtdcTradingTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductStatusType是一个产品状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///可交易\r\n#define THOST_FTDC_PS_tradeable '1'\r\n///不可交易\r\n#define THOST_FTDC_PS_untradeable '2'\r\n\r\ntypedef char TThostFtdcProductStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSyncDeltaStatusType是一个追平状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易可读\r\n#define THOST_FTDC_SDS_Readable '1'\r\n///交易在读\r\n#define THOST_FTDC_SDS_Reading '2'\r\n///交易读取完成\r\n#define THOST_FTDC_SDS_Readend '3'\r\n///追平失败 交易本地状态结算不存在\r\n#define THOST_FTDC_SDS_OptErr 'e'\r\n\r\ntypedef char TThostFtdcSyncDeltaStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcActionDirectionType是一个操作标志类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///增加\r\n#define THOST_FTDC_ACD_Add '1'\r\n///删除\r\n#define THOST_FTDC_ACD_Del '2'\r\n///更新\r\n#define THOST_FTDC_ACD_Upd '3'\r\n\r\ntypedef char TThostFtdcActionDirectionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderCancelAlgType是一个撤单时选择席位算法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///轮询席位撤单\r\n#define THOST_FTDC_OAC_Balance '1'\r\n///优先原报单席位撤单\r\n#define THOST_FTDC_OAC_OrigFirst '2'\r\n\r\ntypedef char TThostFtdcOrderCancelAlgType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSyncDescriptionType是一个追平描述类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSyncDescriptionType[257];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommonIntType是一个通用int类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCommonIntType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSysVersionType是一个系统版本类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSysVersionType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOpenLimitControlLevelType是一个开仓量限制粒度类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不控制\r\n#define THOST_FTDC_PLCL_None '0'\r\n///产品级别\r\n#define THOST_FTDC_PLCL_Product '1'\r\n///合约级别\r\n#define THOST_FTDC_PLCL_Inst '2'\r\n\r\ntypedef char TThostFtdcOpenLimitControlLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOrderFreqControlLevelType是一个报单频率控制粒度类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不控制\r\n#define THOST_FTDC_OFCL_None '0'\r\n///产品级别\r\n#define THOST_FTDC_OFCL_Product '1'\r\n///合约级别\r\n#define THOST_FTDC_OFCL_Inst '2'\r\n\r\ntypedef char TThostFtdcOrderFreqControlLevelType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcEnumBoolType是一个枚举bool类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///false\r\n#define THOST_FTDC_EBL_False '0'\r\n///true\r\n#define THOST_FTDC_EBL_True '1'\r\n\r\ntypedef char TThostFtdcEnumBoolType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTimeRangeType是一个期货合约阶段标识类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///一般月份\r\n#define THOST_FTDC_ETR_USUAL '1'\r\n///交割月前一个月上半月\r\n#define THOST_FTDC_ETR_FNSP '2'\r\n///交割月前一个月下半月\r\n#define THOST_FTDC_ETR_BNSP '3'\r\n///交割月份\r\n#define THOST_FTDC_ETR_SPOT '4'\r\n\r\ntypedef char TThostFtdcTimeRangeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcDeltaType是一个Delta类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcDeltaType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSpreadIdType是一个抵扣组优先级类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcSpreadIdType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPortfolioType是一个新型组保算法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///不使用新型组保算法\r\n#define THOST_FTDC_EPF_None '0'\r\n///SPBM算法\r\n#define THOST_FTDC_EPF_SPBM '1'\r\n///RULE算法\r\n#define THOST_FTDC_EPF_RULE '2'\r\n///SPMM算法\r\n#define THOST_FTDC_EPF_SPMM '3'\r\n///RCAMS算法\r\n#define THOST_FTDC_EPF_RCAMS '4'\r\n\r\ntypedef char TThostFtdcPortfolioType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPortfolioDefIDType是一个SPBM组合套餐ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcPortfolioDefIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWithDrawParamIDType是一个可提参数代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///权利金收支是否可提 1 代表可提 0 不可提\r\n#define THOST_FTDC_WDPID_CashIn 'C'\r\n\r\ntypedef char TThostFtdcWithDrawParamIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcWithDrawParamValueType是一个可提控制参数内容类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcWithDrawParamValueType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInvstTradingRightType是一个投资者交易权限类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///只能平仓\r\n#define THOST_FTDC_ITR_CloseOnly '1'\r\n///不能交易\r\n#define THOST_FTDC_ITR_Forbidden '2'\r\n\r\ntypedef char TThostFtdcInvstTradingRightType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcThostFunctionCodeType是一个Thost终端功能代码类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcThostFunctionCodeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSPMMDiscountRatioType是一个SPMM折扣率类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcSPMMDiscountRatioType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSPMMModelDescType是一个SPMM模板描述类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSPMMModelDescType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSPMMModelIDType是一个SPMM模板ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSPMMModelIDType[33];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSPMMProductIDType是一个SPMM商品群商品组ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSPMMProductIDType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstMarginCalIDType是一个SPMM合约保证金算法类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///标准算法收取双边\r\n#define THOST_FTDC_IMID_BothSide '1'\r\n///单向大边\r\n#define THOST_FTDC_IMID_MMSA '2'\r\n///新组保SPMM\r\n#define THOST_FTDC_IMID_SPMM '3'\r\n\r\ntypedef char TThostFtdcInstMarginCalIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProductIDType是一个产品ID类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcProductIDType[41];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcHedgeRateType是一个HedgeRate类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcHedgeRateType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRCAMSPriorityType是一个优先级类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcRCAMSPriorityType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAdjustValueType是一个空头期权风险调整标准类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcAdjustValueType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRCAMSCombinationTypeType是一个RCAMS组合类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///牛市看涨价差组合\r\n#define THOST_FTDC_ERComb_BUC '0'\r\n///熊市看涨价差组合\r\n#define THOST_FTDC_ERComb_BEC '1'\r\n///熊市看跌价差组合\r\n#define THOST_FTDC_ERComb_BEP '2'\r\n///牛市看跌价差组合\r\n#define THOST_FTDC_ERComb_BUP '3'\r\n///日历价差组合\r\n#define THOST_FTDC_ERComb_CAS '4'\r\n\r\ntypedef char TThostFtdcRCAMSCombinationTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcRuleIdType是一个策略id类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcRuleIdType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPortfTypeType是一个新组保算法启用类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///使用初版交易所算法\r\n#define THOST_FTDC_EET_None '0'\r\n///SPBM算法V1.1.0_附加保证金调整\r\n#define THOST_FTDC_EET_SPBM_AddOnHedge '1'\r\n\r\ntypedef char TThostFtdcPortfTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcInstrumentClassType是一个合约类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///一般月份合约\r\n#define THOST_FTDC_EIC_Usual '1'\r\n///临近交割合约\r\n#define THOST_FTDC_EIC_Delivery '2'\r\n///非组合合约\r\n#define THOST_FTDC_EIC_NonComb '3'\r\n\r\ntypedef char TThostFtdcInstrumentClassType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcCommodityGroupIDType是一个商品群号类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef int TThostFtdcCommodityGroupIDType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcStdPositionType是一个标准持仓类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef double TThostFtdcStdPositionType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcProdChangeFlagType是一个品种记录改变状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///持仓量和冻结量均无变化\r\n#define THOST_FTDC_PCF_None '0'\r\n///持仓量无变化，冻结量有变化\r\n#define THOST_FTDC_PCF_OnlyFrozen '1'\r\n///持仓量有变化\r\n#define THOST_FTDC_PCF_PositionChange '2'\r\n\r\ntypedef char TThostFtdcProdChangeFlagType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcPwdRcdSrcType是一个历史密码来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///来源于Sync初始化数据\r\n#define THOST_FTDC_PRS_Init '0'\r\n///来源于实时上场数据\r\n#define THOST_FTDC_PRS_Sync '1'\r\n///来源于用户修改\r\n#define THOST_FTDC_PRS_UserUpd '2'\r\n///来源于超户修改，很可能来自主席同步数据\r\n#define THOST_FTDC_PRS_SuperUserUpd '3'\r\n///来源于次席同步的修改\r\n#define THOST_FTDC_PRS_SecUpd '4'\r\n\r\ntypedef char TThostFtdcPwdRcdSrcType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAddrSrvModeType是一个地址服务类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易地址\r\n#define THOST_FTDC_ASM_Trade '0'\r\n///行情地址\r\n#define THOST_FTDC_ASM_MarketData '1'\r\n///其他\r\n#define THOST_FTDC_ASM_Other '2'\r\n\r\ntypedef char TThostFtdcAddrSrvModeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAddrVerType是一个地址版本类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///IPV4\r\n#define THOST_FTDC_ADV_V4 '0'\r\n///IPV6\r\n#define THOST_FTDC_ADV_V6 '1'\r\n\r\ntypedef char TThostFtdcAddrVerType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAddrRemarkType是一个地址备注类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAddrRemarkType[161];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcAddrNameType是一个地址名称类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcAddrNameType[65];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcIpAddrType是一个服务地址IP类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcIpAddrType[129];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcTGSessionQryStatusType是一个TGATE会话查询状态类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///查询状态空闲\r\n#define THOST_FTDC_TGQS_QryIdle '1'\r\n///查询状态频繁\r\n#define THOST_FTDC_TGQS_QryBusy '2'\r\n\r\ntypedef char TThostFtdcTGSessionQryStatusType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcOffsetTypeType是一个对冲类型类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///期权对冲\r\n#define THOST_FTDC_OT_OPT_OFFSET '0'\r\n///期货对冲\r\n#define THOST_FTDC_OT_FUT_OFFSET '1'\r\n///行权后期货对冲\r\n#define THOST_FTDC_OT_EXEC_OFFSET '2'\r\n///履约后期货对冲\r\n#define THOST_FTDC_OT_PERFORM_OFFSET '3'\r\n\r\ntypedef char TThostFtdcOffsetTypeType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcSiteType是一个站点类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcSiteType[51];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcNetOperatorType是一个网络运营商类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcNetOperatorType[9];\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcApplySrcType是一个申请来源类型\r\n/////////////////////////////////////////////////////////////////////////\r\n///交易\r\n#define THOST_FTDC_AS_Trade '0'\r\n///会服\r\n#define THOST_FTDC_AS_Member '1'\r\n\r\ntypedef char TThostFtdcApplySrcType;\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n///TFtdcReserveInfoType是一个预留信息类型\r\n/////////////////////////////////////////////////////////////////////////\r\ntypedef char TThostFtdcReserveInfoType[65];\r\n\r\n#endif\r\n"
  },
  {
    "path": "native/ctp_bridge/api/win/ThostFtdcUserApiStruct.h",
    "content": "/////////////////////////////////////////////////////////////////////////\r\n///@system 新一代交易所系统\r\n///@company 上海期货信息技术有限公司\r\n///@file ThostFtdcUserApiStruct.h\r\n///@brief 定义了客户端接口使用的业务数据结构\r\n///@history \r\n///20060106\t赵鸿昊\t\t创建该文件\r\n/////////////////////////////////////////////////////////////////////////\r\n\r\n#if !defined(THOST_FTDCSTRUCT_H)\r\n#define THOST_FTDCSTRUCT_H\r\n\r\n#if _MSC_VER > 1000\r\n#pragma once\r\n#endif // _MSC_VER > 1000\r\n\r\n\r\n#include \"ThostFtdcUserApiDataType.h\"\r\n\r\n///信息分发\r\nstruct CThostFtdcDisseminationField\r\n{\r\n\t///序列系列号\r\n\tTThostFtdcSequenceSeriesType\tSequenceSeries;\r\n\t///序列号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n};\r\n\r\n///用户登录请求\r\nstruct CThostFtdcReqUserLoginField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///接口端产品信息\r\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\r\n\t///协议信息\r\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///动态密码\r\n\tTThostFtdcPasswordType\tOneTimePassword;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///登录备注\r\n\tTThostFtdcLoginRemarkType\tLoginRemark;\r\n\t///终端IP端口\r\n\tTThostFtdcIPPortType\tClientIPPort;\r\n\t///终端IP地址\r\n\tTThostFtdcIPAddressType\tClientIPAddress;\r\n};\r\n\r\n///用户登录应答\r\nstruct CThostFtdcRspUserLoginField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///登录成功时间\r\n\tTThostFtdcTimeType\tLoginTime;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易系统名称\r\n\tTThostFtdcSystemNameType\tSystemName;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///最大报单引用\r\n\tTThostFtdcOrderRefType\tMaxOrderRef;\r\n\t///上期所时间\r\n\tTThostFtdcTimeType\tSHFETime;\r\n\t///大商所时间\r\n\tTThostFtdcTimeType\tDCETime;\r\n\t///郑商所时间\r\n\tTThostFtdcTimeType\tCZCETime;\r\n\t///中金所时间\r\n\tTThostFtdcTimeType\tFFEXTime;\r\n\t///能源中心时间\r\n\tTThostFtdcTimeType\tINETime;\r\n\t///后台版本信息\r\n\tTThostFtdcSysVersionType\tSysVersion;\r\n\t///广期所时间\r\n\tTThostFtdcTimeType\tGFEXTime;\r\n\t///当前登录中心号\r\n\tTThostFtdcDRIdentityIDType\tLoginDRIdentityID;\r\n\t///用户所属中心号\r\n\tTThostFtdcDRIdentityIDType\tUserDRIdentityID;\r\n\t///上次登陆时间\r\n\tTThostFtdcDateTimeType\tLastLoginTime;\r\n\t///预留信息\r\n\tTThostFtdcReserveInfoType\tReserveInfo;\r\n};\r\n\r\n///用户登出请求\r\nstruct CThostFtdcUserLogoutField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///强制交易员退出\r\nstruct CThostFtdcForceUserLogoutField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///客户端认证请求\r\nstruct CThostFtdcReqAuthenticateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///认证码\r\n\tTThostFtdcAuthCodeType\tAuthCode;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n};\r\n\r\n///客户端认证响应\r\nstruct CThostFtdcRspAuthenticateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n\t///App类型\r\n\tTThostFtdcAppTypeType\tAppType;\r\n};\r\n\r\n///客户端认证信息\r\nstruct CThostFtdcAuthenticationInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///认证信息\r\n\tTThostFtdcAuthInfoType\tAuthInfo;\r\n\t///是否为认证结果\r\n\tTThostFtdcBoolType\tIsResult;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n\t///App类型\r\n\tTThostFtdcAppTypeType\tAppType;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///终端IP地址\r\n\tTThostFtdcIPAddressType\tClientIPAddress;\r\n};\r\n\r\n///用户登录应答2\r\nstruct CThostFtdcRspUserLogin2Field\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///登录成功时间\r\n\tTThostFtdcTimeType\tLoginTime;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易系统名称\r\n\tTThostFtdcSystemNameType\tSystemName;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///最大报单引用\r\n\tTThostFtdcOrderRefType\tMaxOrderRef;\r\n\t///上期所时间\r\n\tTThostFtdcTimeType\tSHFETime;\r\n\t///大商所时间\r\n\tTThostFtdcTimeType\tDCETime;\r\n\t///郑商所时间\r\n\tTThostFtdcTimeType\tCZCETime;\r\n\t///中金所时间\r\n\tTThostFtdcTimeType\tFFEXTime;\r\n\t///能源中心时间\r\n\tTThostFtdcTimeType\tINETime;\r\n\t///随机串\r\n\tTThostFtdcRandomStringType\tRandomString;\r\n};\r\n\r\n///银期转帐报文头\r\nstruct CThostFtdcTransferHeaderField\r\n{\r\n\t///版本号，常量，1.0\r\n\tTThostFtdcVersionType\tVersion;\r\n\t///交易代码，必填\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///交易日期，必填，格式：yyyymmdd\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间，必填，格式：hhmmss\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///发起方流水号，N/A\r\n\tTThostFtdcTradeSerialType\tTradeSerial;\r\n\t///期货公司代码，必填\r\n\tTThostFtdcFutureIDType\tFutureID;\r\n\t///银行代码，根据查询银行得到，必填\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分中心代码，根据查询银行得到，必填\r\n\tTThostFtdcBankBrchIDType\tBankBrchID;\r\n\t///操作员，N/A\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///交易设备类型，N/A\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///记录数，N/A\r\n\tTThostFtdcRecordNumType\tRecordNum;\r\n\t///会话编号，N/A\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///请求编号，N/A\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n};\r\n\r\n///银行资金转期货请求，TradeCode=202001\r\nstruct CThostFtdcTransferBankToFutureReqField\r\n{\r\n\t///期货资金账户\r\n\tTThostFtdcAccountIDType\tFutureAccount;\r\n\t///密码标志\r\n\tTThostFtdcFuturePwdFlagType\tFuturePwdFlag;\r\n\t///密码\r\n\tTThostFtdcFutureAccPwdType\tFutureAccPwd;\r\n\t///转账金额\r\n\tTThostFtdcMoneyType\tTradeAmt;\r\n\t///客户手续费\r\n\tTThostFtdcMoneyType\tCustFee;\r\n\t///币种：RMB-人民币 USD-美圆 HKD-港元\r\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\r\n};\r\n\r\n///银行资金转期货请求响应\r\nstruct CThostFtdcTransferBankToFutureRspField\r\n{\r\n\t///响应代码\r\n\tTThostFtdcRetCodeType\tRetCode;\r\n\t///响应信息\r\n\tTThostFtdcRetInfoType\tRetInfo;\r\n\t///资金账户\r\n\tTThostFtdcAccountIDType\tFutureAccount;\r\n\t///转帐金额\r\n\tTThostFtdcMoneyType\tTradeAmt;\r\n\t///应收客户手续费\r\n\tTThostFtdcMoneyType\tCustFee;\r\n\t///币种\r\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\r\n};\r\n\r\n///期货资金转银行请求，TradeCode=202002\r\nstruct CThostFtdcTransferFutureToBankReqField\r\n{\r\n\t///期货资金账户\r\n\tTThostFtdcAccountIDType\tFutureAccount;\r\n\t///密码标志\r\n\tTThostFtdcFuturePwdFlagType\tFuturePwdFlag;\r\n\t///密码\r\n\tTThostFtdcFutureAccPwdType\tFutureAccPwd;\r\n\t///转账金额\r\n\tTThostFtdcMoneyType\tTradeAmt;\r\n\t///客户手续费\r\n\tTThostFtdcMoneyType\tCustFee;\r\n\t///币种：RMB-人民币 USD-美圆 HKD-港元\r\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\r\n};\r\n\r\n///期货资金转银行请求响应\r\nstruct CThostFtdcTransferFutureToBankRspField\r\n{\r\n\t///响应代码\r\n\tTThostFtdcRetCodeType\tRetCode;\r\n\t///响应信息\r\n\tTThostFtdcRetInfoType\tRetInfo;\r\n\t///资金账户\r\n\tTThostFtdcAccountIDType\tFutureAccount;\r\n\t///转帐金额\r\n\tTThostFtdcMoneyType\tTradeAmt;\r\n\t///应收客户手续费\r\n\tTThostFtdcMoneyType\tCustFee;\r\n\t///币种\r\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\r\n};\r\n\r\n///查询银行资金请求，TradeCode=204002\r\nstruct CThostFtdcTransferQryBankReqField\r\n{\r\n\t///期货资金账户\r\n\tTThostFtdcAccountIDType\tFutureAccount;\r\n\t///密码标志\r\n\tTThostFtdcFuturePwdFlagType\tFuturePwdFlag;\r\n\t///密码\r\n\tTThostFtdcFutureAccPwdType\tFutureAccPwd;\r\n\t///币种：RMB-人民币 USD-美圆 HKD-港元\r\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\r\n};\r\n\r\n///查询银行资金请求响应\r\nstruct CThostFtdcTransferQryBankRspField\r\n{\r\n\t///响应代码\r\n\tTThostFtdcRetCodeType\tRetCode;\r\n\t///响应信息\r\n\tTThostFtdcRetInfoType\tRetInfo;\r\n\t///资金账户\r\n\tTThostFtdcAccountIDType\tFutureAccount;\r\n\t///银行余额\r\n\tTThostFtdcMoneyType\tTradeAmt;\r\n\t///银行可用余额\r\n\tTThostFtdcMoneyType\tUseAmt;\r\n\t///银行可取余额\r\n\tTThostFtdcMoneyType\tFetchAmt;\r\n\t///币种\r\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\r\n};\r\n\r\n///查询银行交易明细请求，TradeCode=204999\r\nstruct CThostFtdcTransferQryDetailReqField\r\n{\r\n\t///期货资金账户\r\n\tTThostFtdcAccountIDType\tFutureAccount;\r\n};\r\n\r\n///查询银行交易明细请求响应\r\nstruct CThostFtdcTransferQryDetailRspField\r\n{\r\n\t///交易日期\r\n\tTThostFtdcDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///交易代码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///期货流水号\r\n\tTThostFtdcTradeSerialNoType\tFutureSerial;\r\n\t///期货公司代码\r\n\tTThostFtdcFutureIDType\tFutureID;\r\n\t///资金帐号\r\n\tTThostFtdcFutureAccountType\tFutureAccount;\r\n\t///银行流水号\r\n\tTThostFtdcTradeSerialNoType\tBankSerial;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分中心代码\r\n\tTThostFtdcBankBrchIDType\tBankBrchID;\r\n\t///银行账号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///证件号码\r\n\tTThostFtdcCertCodeType\tCertCode;\r\n\t///货币代码\r\n\tTThostFtdcCurrencyCodeType\tCurrencyCode;\r\n\t///发生金额\r\n\tTThostFtdcMoneyType\tTxAmount;\r\n\t///有效标志\r\n\tTThostFtdcTransferValidFlagType\tFlag;\r\n};\r\n\r\n///响应信息\r\nstruct CThostFtdcRspInfoField\r\n{\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///交易所\r\nstruct CThostFtdcExchangeField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所名称\r\n\tTThostFtdcExchangeNameType\tExchangeName;\r\n\t///交易所属性\r\n\tTThostFtdcExchangePropertyType\tExchangeProperty;\r\n};\r\n\r\n///产品\r\nstruct CThostFtdcProductField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///产品名称\r\n\tTThostFtdcProductNameType\tProductName;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品类型\r\n\tTThostFtdcProductClassType\tProductClass;\r\n\t///合约数量乘数\r\n\tTThostFtdcVolumeMultipleType\tVolumeMultiple;\r\n\t///最小变动价位\r\n\tTThostFtdcPriceType\tPriceTick;\r\n\t///市价单最大下单量\r\n\tTThostFtdcVolumeType\tMaxMarketOrderVolume;\r\n\t///市价单最小下单量\r\n\tTThostFtdcVolumeType\tMinMarketOrderVolume;\r\n\t///限价单最大下单量\r\n\tTThostFtdcVolumeType\tMaxLimitOrderVolume;\r\n\t///限价单最小下单量\r\n\tTThostFtdcVolumeType\tMinLimitOrderVolume;\r\n\t///持仓类型\r\n\tTThostFtdcPositionTypeType\tPositionType;\r\n\t///持仓日期类型\r\n\tTThostFtdcPositionDateTypeType\tPositionDateType;\r\n\t///平仓处理类型\r\n\tTThostFtdcCloseDealTypeType\tCloseDealType;\r\n\t///交易币种类型\r\n\tTThostFtdcCurrencyIDType\tTradeCurrencyID;\r\n\t///质押资金可用范围\r\n\tTThostFtdcMortgageFundUseRangeType\tMortgageFundUseRange;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve2;\r\n\t///合约基础商品乘数\r\n\tTThostFtdcUnderlyingMultipleType\tUnderlyingMultiple;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///交易所产品代码\r\n\tTThostFtdcInstrumentIDType\tExchangeProductID;\r\n\t///开仓量限制粒度\r\n\tTThostFtdcOpenLimitControlLevelType\tOpenLimitControlLevel;\r\n\t///报单频率控制粒度\r\n\tTThostFtdcOrderFreqControlLevelType\tOrderFreqControlLevel;\r\n};\r\n\r\n///合约\r\nstruct CThostFtdcInstrumentField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约名称\r\n\tTThostFtdcInstrumentNameType\tInstrumentName;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve3;\r\n\t///产品类型\r\n\tTThostFtdcProductClassType\tProductClass;\r\n\t///交割年份\r\n\tTThostFtdcYearType\tDeliveryYear;\r\n\t///交割月\r\n\tTThostFtdcMonthType\tDeliveryMonth;\r\n\t///市价单最大下单量\r\n\tTThostFtdcVolumeType\tMaxMarketOrderVolume;\r\n\t///市价单最小下单量\r\n\tTThostFtdcVolumeType\tMinMarketOrderVolume;\r\n\t///限价单最大下单量\r\n\tTThostFtdcVolumeType\tMaxLimitOrderVolume;\r\n\t///限价单最小下单量\r\n\tTThostFtdcVolumeType\tMinLimitOrderVolume;\r\n\t///合约数量乘数\r\n\tTThostFtdcVolumeMultipleType\tVolumeMultiple;\r\n\t///最小变动价位\r\n\tTThostFtdcPriceType\tPriceTick;\r\n\t///创建日\r\n\tTThostFtdcDateType\tCreateDate;\r\n\t///上市日\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///到期日\r\n\tTThostFtdcDateType\tExpireDate;\r\n\t///开始交割日\r\n\tTThostFtdcDateType\tStartDelivDate;\r\n\t///结束交割日\r\n\tTThostFtdcDateType\tEndDelivDate;\r\n\t///合约生命周期状态\r\n\tTThostFtdcInstLifePhaseType\tInstLifePhase;\r\n\t///当前是否交易\r\n\tTThostFtdcBoolType\tIsTrading;\r\n\t///持仓类型\r\n\tTThostFtdcPositionTypeType\tPositionType;\r\n\t///持仓日期类型\r\n\tTThostFtdcPositionDateTypeType\tPositionDateType;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatio;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatio;\r\n\t///是否使用大额单边保证金算法\r\n\tTThostFtdcMaxMarginSideAlgorithmType\tMaxMarginSideAlgorithm;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve4;\r\n\t///执行价\r\n\tTThostFtdcPriceType\tStrikePrice;\r\n\t///期权类型\r\n\tTThostFtdcOptionsTypeType\tOptionsType;\r\n\t///合约基础商品乘数\r\n\tTThostFtdcUnderlyingMultipleType\tUnderlyingMultiple;\r\n\t///组合类型\r\n\tTThostFtdcCombinationTypeType\tCombinationType;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///基础商品代码\r\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\r\n};\r\n\r\n///经纪公司\r\nstruct CThostFtdcBrokerField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///经纪公司简称\r\n\tTThostFtdcBrokerAbbrType\tBrokerAbbr;\r\n\t///经纪公司名称\r\n\tTThostFtdcBrokerNameType\tBrokerName;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n};\r\n\r\n///交易所交易员\r\nstruct CThostFtdcTraderField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装数量\r\n\tTThostFtdcInstallCountType\tInstallCount;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///撤单时选择席位算法\r\n\tTThostFtdcOrderCancelAlgType\tOrderCancelAlg;\r\n\t///交易报盘安装数量\r\n\tTThostFtdcInstallCountType\tTradeInstallCount;\r\n\t///行情报盘安装数量\r\n\tTThostFtdcInstallCountType\tMDInstallCount;\r\n};\r\n\r\n///投资者\r\nstruct CThostFtdcInvestorField\r\n{\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者分组代码\r\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\r\n\t///投资者名称\r\n\tTThostFtdcPartyNameType\tInvestorName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdentifiedCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n\t///联系电话\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///通讯地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///开户日期\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///手机\r\n\tTThostFtdcMobileType\tMobile;\r\n\t///手续费率模板代码\r\n\tTThostFtdcInvestorIDType\tCommModelID;\r\n\t///保证金率模板代码\r\n\tTThostFtdcInvestorIDType\tMarginModelID;\r\n\t///是否频率控制\r\n\tTThostFtdcEnumBoolType\tIsOrderFreq;\r\n\t///是否开仓限制\r\n\tTThostFtdcEnumBoolType\tIsOpenVolLimit;\r\n};\r\n\r\n///交易编码\r\nstruct CThostFtdcTradingCodeField\r\n{\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n\t///交易编码类型\r\n\tTThostFtdcClientIDTypeType\tClientIDType;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///业务类型\r\n\tTThostFtdcBizTypeType\tBizType;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///会员编码和经纪公司编码对照表\r\nstruct CThostFtdcPartBrokerField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n};\r\n\r\n///管理用户\r\nstruct CThostFtdcSuperUserField\r\n{\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户名称\r\n\tTThostFtdcUserNameType\tUserName;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n};\r\n\r\n///管理用户功能权限\r\nstruct CThostFtdcSuperUserFunctionField\r\n{\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///功能代码\r\n\tTThostFtdcFunctionCodeType\tFunctionCode;\r\n};\r\n\r\n///投资者组\r\nstruct CThostFtdcInvestorGroupField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者分组代码\r\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\r\n\t///投资者分组名称\r\n\tTThostFtdcInvestorGroupNameType\tInvestorGroupName;\r\n};\r\n\r\n///资金账户\r\nstruct CThostFtdcTradingAccountField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///上次质押金额\r\n\tTThostFtdcMoneyType\tPreMortgage;\r\n\t///上次信用额度\r\n\tTThostFtdcMoneyType\tPreCredit;\r\n\t///上次存款额\r\n\tTThostFtdcMoneyType\tPreDeposit;\r\n\t///上次结算准备金\r\n\tTThostFtdcMoneyType\tPreBalance;\r\n\t///上次占用的保证金\r\n\tTThostFtdcMoneyType\tPreMargin;\r\n\t///利息基数\r\n\tTThostFtdcMoneyType\tInterestBase;\r\n\t///利息收入\r\n\tTThostFtdcMoneyType\tInterest;\r\n\t///入金金额\r\n\tTThostFtdcMoneyType\tDeposit;\r\n\t///出金金额\r\n\tTThostFtdcMoneyType\tWithdraw;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///当前保证金总额\r\n\tTThostFtdcMoneyType\tCurrMargin;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfit;\r\n\t///期货结算准备金\r\n\tTThostFtdcMoneyType\tBalance;\r\n\t///可用资金\r\n\tTThostFtdcMoneyType\tAvailable;\r\n\t///可取资金\r\n\tTThostFtdcMoneyType\tWithdrawQuota;\r\n\t///基本准备金\r\n\tTThostFtdcMoneyType\tReserve;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///信用额度\r\n\tTThostFtdcMoneyType\tCredit;\r\n\t///质押金额\r\n\tTThostFtdcMoneyType\tMortgage;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchangeMargin;\r\n\t///投资者交割保证金\r\n\tTThostFtdcMoneyType\tDeliveryMargin;\r\n\t///交易所交割保证金\r\n\tTThostFtdcMoneyType\tExchangeDeliveryMargin;\r\n\t///保底期货结算准备金\r\n\tTThostFtdcMoneyType\tReserveBalance;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///上次货币质入金额\r\n\tTThostFtdcMoneyType\tPreFundMortgageIn;\r\n\t///上次货币质出金额\r\n\tTThostFtdcMoneyType\tPreFundMortgageOut;\r\n\t///货币质入金额\r\n\tTThostFtdcMoneyType\tFundMortgageIn;\r\n\t///货币质出金额\r\n\tTThostFtdcMoneyType\tFundMortgageOut;\r\n\t///货币质押余额\r\n\tTThostFtdcMoneyType\tFundMortgageAvailable;\r\n\t///可质押货币金额\r\n\tTThostFtdcMoneyType\tMortgageableFund;\r\n\t///特殊产品占用保证金\r\n\tTThostFtdcMoneyType\tSpecProductMargin;\r\n\t///特殊产品冻结保证金\r\n\tTThostFtdcMoneyType\tSpecProductFrozenMargin;\r\n\t///特殊产品手续费\r\n\tTThostFtdcMoneyType\tSpecProductCommission;\r\n\t///特殊产品冻结手续费\r\n\tTThostFtdcMoneyType\tSpecProductFrozenCommission;\r\n\t///特殊产品持仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductPositionProfit;\r\n\t///特殊产品平仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductCloseProfit;\r\n\t///根据持仓盈亏算法计算的特殊产品持仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductPositionProfitByAlg;\r\n\t///特殊产品交易所保证金\r\n\tTThostFtdcMoneyType\tSpecProductExchangeMargin;\r\n\t///业务类型\r\n\tTThostFtdcBizTypeType\tBizType;\r\n\t///延时换汇冻结金额\r\n\tTThostFtdcMoneyType\tFrozenSwap;\r\n\t///剩余换汇额度\r\n\tTThostFtdcMoneyType\tRemainSwap;\r\n\t///期权市值\r\n\tTThostFtdcMoneyType\tOptionValue;\r\n};\r\n\r\n///投资者持仓\r\nstruct CThostFtdcInvestorPositionField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///持仓多空方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///持仓日期\r\n\tTThostFtdcPositionDateType\tPositionDate;\r\n\t///上日持仓\r\n\tTThostFtdcVolumeType\tYdPosition;\r\n\t///今日持仓\r\n\tTThostFtdcVolumeType\tPosition;\r\n\t///多头冻结\r\n\tTThostFtdcVolumeType\tLongFrozen;\r\n\t///空头冻结\r\n\tTThostFtdcVolumeType\tShortFrozen;\r\n\t///开仓冻结金额\r\n\tTThostFtdcMoneyType\tLongFrozenAmount;\r\n\t///开仓冻结金额\r\n\tTThostFtdcMoneyType\tShortFrozenAmount;\r\n\t///开仓量\r\n\tTThostFtdcVolumeType\tOpenVolume;\r\n\t///平仓量\r\n\tTThostFtdcVolumeType\tCloseVolume;\r\n\t///开仓金额\r\n\tTThostFtdcMoneyType\tOpenAmount;\r\n\t///平仓金额\r\n\tTThostFtdcMoneyType\tCloseAmount;\r\n\t///持仓成本\r\n\tTThostFtdcMoneyType\tPositionCost;\r\n\t///上次占用的保证金\r\n\tTThostFtdcMoneyType\tPreMargin;\r\n\t///占用的保证金\r\n\tTThostFtdcMoneyType\tUseMargin;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfit;\r\n\t///上次结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///本次结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///开仓成本\r\n\tTThostFtdcMoneyType\tOpenCost;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchangeMargin;\r\n\t///组合成交形成的持仓\r\n\tTThostFtdcVolumeType\tCombPosition;\r\n\t///组合多头冻结\r\n\tTThostFtdcVolumeType\tCombLongFrozen;\r\n\t///组合空头冻结\r\n\tTThostFtdcVolumeType\tCombShortFrozen;\r\n\t///逐日盯市平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByDate;\r\n\t///逐笔对冲平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\r\n\t///今日持仓\r\n\tTThostFtdcVolumeType\tTodayPosition;\r\n\t///保证金率\r\n\tTThostFtdcRatioType\tMarginRateByMoney;\r\n\t///保证金率(按手数)\r\n\tTThostFtdcRatioType\tMarginRateByVolume;\r\n\t///执行冻结\r\n\tTThostFtdcVolumeType\tStrikeFrozen;\r\n\t///执行冻结金额\r\n\tTThostFtdcMoneyType\tStrikeFrozenAmount;\r\n\t///放弃执行冻结\r\n\tTThostFtdcVolumeType\tAbandonFrozen;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行冻结的昨仓\r\n\tTThostFtdcVolumeType\tYdStrikeFrozen;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///持仓成本差值\r\n\tTThostFtdcMoneyType\tPositionCostOffset;\r\n\t///tas持仓手数\r\n\tTThostFtdcVolumeType\tTasPosition;\r\n\t///tas持仓成本\r\n\tTThostFtdcMoneyType\tTasPositionCost;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///期权市值\r\n\tTThostFtdcMoneyType\tOptionValue;\r\n};\r\n\r\n///合约保证金率\r\nstruct CThostFtdcInstrumentMarginRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///是否相对交易所收取\r\n\tTThostFtdcBoolType\tIsRelative;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///合约手续费率\r\nstruct CThostFtdcInstrumentCommissionRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///开仓手续费率\r\n\tTThostFtdcRatioType\tOpenRatioByMoney;\r\n\t///开仓手续费\r\n\tTThostFtdcRatioType\tOpenRatioByVolume;\r\n\t///平仓手续费率\r\n\tTThostFtdcRatioType\tCloseRatioByMoney;\r\n\t///平仓手续费\r\n\tTThostFtdcRatioType\tCloseRatioByVolume;\r\n\t///平今手续费率\r\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\r\n\t///平今手续费\r\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///业务类型\r\n\tTThostFtdcBizTypeType\tBizType;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///深度行情\r\nstruct CThostFtdcDepthMarketDataField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///最新价\r\n\tTThostFtdcPriceType\tLastPrice;\r\n\t///上次结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///昨收盘\r\n\tTThostFtdcPriceType\tPreClosePrice;\r\n\t///昨持仓量\r\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\r\n\t///今开盘\r\n\tTThostFtdcPriceType\tOpenPrice;\r\n\t///最高价\r\n\tTThostFtdcPriceType\tHighestPrice;\r\n\t///最低价\r\n\tTThostFtdcPriceType\tLowestPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///成交金额\r\n\tTThostFtdcMoneyType\tTurnover;\r\n\t///持仓量\r\n\tTThostFtdcLargeVolumeType\tOpenInterest;\r\n\t///今收盘\r\n\tTThostFtdcPriceType\tClosePrice;\r\n\t///本次结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///涨停板价\r\n\tTThostFtdcPriceType\tUpperLimitPrice;\r\n\t///跌停板价\r\n\tTThostFtdcPriceType\tLowerLimitPrice;\r\n\t///昨虚实度\r\n\tTThostFtdcRatioType\tPreDelta;\r\n\t///今虚实度\r\n\tTThostFtdcRatioType\tCurrDelta;\r\n\t///最后修改时间\r\n\tTThostFtdcTimeType\tUpdateTime;\r\n\t///最后修改毫秒\r\n\tTThostFtdcMillisecType\tUpdateMillisec;\r\n\t///申买价一\r\n\tTThostFtdcPriceType\tBidPrice1;\r\n\t///申买量一\r\n\tTThostFtdcVolumeType\tBidVolume1;\r\n\t///申卖价一\r\n\tTThostFtdcPriceType\tAskPrice1;\r\n\t///申卖量一\r\n\tTThostFtdcVolumeType\tAskVolume1;\r\n\t///申买价二\r\n\tTThostFtdcPriceType\tBidPrice2;\r\n\t///申买量二\r\n\tTThostFtdcVolumeType\tBidVolume2;\r\n\t///申卖价二\r\n\tTThostFtdcPriceType\tAskPrice2;\r\n\t///申卖量二\r\n\tTThostFtdcVolumeType\tAskVolume2;\r\n\t///申买价三\r\n\tTThostFtdcPriceType\tBidPrice3;\r\n\t///申买量三\r\n\tTThostFtdcVolumeType\tBidVolume3;\r\n\t///申卖价三\r\n\tTThostFtdcPriceType\tAskPrice3;\r\n\t///申卖量三\r\n\tTThostFtdcVolumeType\tAskVolume3;\r\n\t///申买价四\r\n\tTThostFtdcPriceType\tBidPrice4;\r\n\t///申买量四\r\n\tTThostFtdcVolumeType\tBidVolume4;\r\n\t///申卖价四\r\n\tTThostFtdcPriceType\tAskPrice4;\r\n\t///申卖量四\r\n\tTThostFtdcVolumeType\tAskVolume4;\r\n\t///申买价五\r\n\tTThostFtdcPriceType\tBidPrice5;\r\n\t///申买量五\r\n\tTThostFtdcVolumeType\tBidVolume5;\r\n\t///申卖价五\r\n\tTThostFtdcPriceType\tAskPrice5;\r\n\t///申卖量五\r\n\tTThostFtdcVolumeType\tAskVolume5;\r\n\t///当日均价\r\n\tTThostFtdcPriceType\tAveragePrice;\r\n\t///业务日期\r\n\tTThostFtdcDateType\tActionDay;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///上带价\r\n\tTThostFtdcPriceType\tBandingUpperPrice;\r\n\t///下带价\r\n\tTThostFtdcPriceType\tBandingLowerPrice;\r\n};\r\n\r\n///投资者合约交易权限\r\nstruct CThostFtdcInstrumentTradingRightField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易权限\r\n\tTThostFtdcTradingRightType\tTradingRight;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///经纪公司用户\r\nstruct CThostFtdcBrokerUserField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户名称\r\n\tTThostFtdcUserNameType\tUserName;\r\n\t///用户类型\r\n\tTThostFtdcUserTypeType\tUserType;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n\t///是否使用令牌\r\n\tTThostFtdcBoolType\tIsUsingOTP;\r\n\t///是否强制终端认证\r\n\tTThostFtdcBoolType\tIsAuthForce;\r\n};\r\n\r\n///经纪公司用户口令\r\nstruct CThostFtdcBrokerUserPasswordField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///上次修改时间\r\n\tTThostFtdcDateTimeType\tLastUpdateTime;\r\n\t///上次登陆时间\r\n\tTThostFtdcDateTimeType\tLastLoginTime;\r\n\t///密码过期时间\r\n\tTThostFtdcDateType\tExpireDate;\r\n\t///弱密码过期时间\r\n\tTThostFtdcDateType\tWeakExpireDate;\r\n};\r\n\r\n///经纪公司用户功能权限\r\nstruct CThostFtdcBrokerUserFunctionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///经纪公司功能代码\r\n\tTThostFtdcBrokerFunctionCodeType\tBrokerFunctionCode;\r\n};\r\n\r\n///交易所交易员报盘机\r\nstruct CThostFtdcTraderOfferField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///交易所交易员连接状态\r\n\tTThostFtdcTraderConnectStatusType\tTraderConnectStatus;\r\n\t///发出连接请求的日期\r\n\tTThostFtdcDateType\tConnectRequestDate;\r\n\t///发出连接请求的时间\r\n\tTThostFtdcTimeType\tConnectRequestTime;\r\n\t///上次报告日期\r\n\tTThostFtdcDateType\tLastReportDate;\r\n\t///上次报告时间\r\n\tTThostFtdcTimeType\tLastReportTime;\r\n\t///完成连接日期\r\n\tTThostFtdcDateType\tConnectDate;\r\n\t///完成连接时间\r\n\tTThostFtdcTimeType\tConnectTime;\r\n\t///启动日期\r\n\tTThostFtdcDateType\tStartDate;\r\n\t///启动时间\r\n\tTThostFtdcTimeType\tStartTime;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///本席位最大成交编号\r\n\tTThostFtdcTradeIDType\tMaxTradeID;\r\n\t///本席位最大报单备拷\r\n\tTThostFtdcReturnCodeType\tMaxOrderMessageReference;\r\n\t///撤单时选择席位算法\r\n\tTThostFtdcOrderCancelAlgType\tOrderCancelAlg;\r\n};\r\n\r\n///投资者结算结果\r\nstruct CThostFtdcSettlementInfoField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///消息正文\r\n\tTThostFtdcContentType\tContent;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///合约保证金率调整\r\nstruct CThostFtdcInstrumentMarginRateAdjustField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///是否相对交易所收取\r\n\tTThostFtdcBoolType\tIsRelative;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易所保证金率\r\nstruct CThostFtdcExchangeMarginRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易所保证金率调整\r\nstruct CThostFtdcExchangeMarginRateAdjustField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///跟随交易所投资者多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///跟随交易所投资者多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///跟随交易所投资者空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///跟随交易所投资者空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///交易所多头保证金率\r\n\tTThostFtdcRatioType\tExchLongMarginRatioByMoney;\r\n\t///交易所多头保证金费\r\n\tTThostFtdcMoneyType\tExchLongMarginRatioByVolume;\r\n\t///交易所空头保证金率\r\n\tTThostFtdcRatioType\tExchShortMarginRatioByMoney;\r\n\t///交易所空头保证金费\r\n\tTThostFtdcMoneyType\tExchShortMarginRatioByVolume;\r\n\t///不跟随交易所投资者多头保证金率\r\n\tTThostFtdcRatioType\tNoLongMarginRatioByMoney;\r\n\t///不跟随交易所投资者多头保证金费\r\n\tTThostFtdcMoneyType\tNoLongMarginRatioByVolume;\r\n\t///不跟随交易所投资者空头保证金率\r\n\tTThostFtdcRatioType\tNoShortMarginRatioByMoney;\r\n\t///不跟随交易所投资者空头保证金费\r\n\tTThostFtdcMoneyType\tNoShortMarginRatioByVolume;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///汇率\r\nstruct CThostFtdcExchangeRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///源币种\r\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\r\n\t///源币种单位数量\r\n\tTThostFtdcCurrencyUnitType\tFromCurrencyUnit;\r\n\t///目标币种\r\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\r\n\t///汇率\r\n\tTThostFtdcExchangeRateType\tExchangeRate;\r\n};\r\n\r\n///结算引用\r\nstruct CThostFtdcSettlementRefField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n};\r\n\r\n///当前时间\r\nstruct CThostFtdcCurrentTimeField\r\n{\r\n\t///当前交易日\r\n\tTThostFtdcDateType\tCurrDate;\r\n\t///当前时间\r\n\tTThostFtdcTimeType\tCurrTime;\r\n\t///当前时间（毫秒）\r\n\tTThostFtdcMillisecType\tCurrMillisec;\r\n\t///自然日期\r\n\tTThostFtdcDateType\tActionDay;\r\n};\r\n\r\n///通讯阶段\r\nstruct CThostFtdcCommPhaseField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///通讯时段编号\r\n\tTThostFtdcCommPhaseNoType\tCommPhaseNo;\r\n\t///系统编号\r\n\tTThostFtdcSystemIDType\tSystemID;\r\n};\r\n\r\n///登录信息\r\nstruct CThostFtdcLoginInfoField\r\n{\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///登录日期\r\n\tTThostFtdcDateType\tLoginDate;\r\n\t///登录时间\r\n\tTThostFtdcTimeType\tLoginTime;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///接口端产品信息\r\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\r\n\t///协议信息\r\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\r\n\t///系统名称\r\n\tTThostFtdcSystemNameType\tSystemName;\r\n\t///密码,已弃用\r\n\tTThostFtdcPasswordType\tPasswordDeprecated;\r\n\t///最大报单引用\r\n\tTThostFtdcOrderRefType\tMaxOrderRef;\r\n\t///上期所时间\r\n\tTThostFtdcTimeType\tSHFETime;\r\n\t///大商所时间\r\n\tTThostFtdcTimeType\tDCETime;\r\n\t///郑商所时间\r\n\tTThostFtdcTimeType\tCZCETime;\r\n\t///中金所时间\r\n\tTThostFtdcTimeType\tFFEXTime;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///动态密码\r\n\tTThostFtdcPasswordType\tOneTimePassword;\r\n\t///能源中心时间\r\n\tTThostFtdcTimeType\tINETime;\r\n\t///查询时是否需要流控\r\n\tTThostFtdcBoolType\tIsQryControl;\r\n\t///登录备注\r\n\tTThostFtdcLoginRemarkType\tLoginRemark;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///登录信息\r\nstruct CThostFtdcLogoutAllField\r\n{\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///系统名称\r\n\tTThostFtdcSystemNameType\tSystemName;\r\n};\r\n\r\n///前置状态\r\nstruct CThostFtdcFrontStatusField\r\n{\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///上次报告日期\r\n\tTThostFtdcDateType\tLastReportDate;\r\n\t///上次报告时间\r\n\tTThostFtdcTimeType\tLastReportTime;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n};\r\n\r\n///用户口令变更\r\nstruct CThostFtdcUserPasswordUpdateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///原来的口令\r\n\tTThostFtdcPasswordType\tOldPassword;\r\n\t///新的口令\r\n\tTThostFtdcPasswordType\tNewPassword;\r\n};\r\n\r\n///输入报单\r\nstruct CThostFtdcInputOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///报单价格条件\r\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///组合开平标志\r\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\r\n\t///组合投机套保标志\r\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///GTD日期\r\n\tTThostFtdcDateType\tGTDDate;\r\n\t///成交量类型\r\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\r\n\t///最小成交量\r\n\tTThostFtdcVolumeType\tMinVolume;\r\n\t///触发条件\r\n\tTThostFtdcContingentConditionType\tContingentCondition;\r\n\t///止损价\r\n\tTThostFtdcPriceType\tStopPrice;\r\n\t///强平原因\r\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\r\n\t///自动挂起标志\r\n\tTThostFtdcBoolType\tIsAutoSuspend;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///用户强平标志\r\n\tTThostFtdcBoolType\tUserForceClose;\r\n\t///互换单标志\r\n\tTThostFtdcBoolType\tIsSwapOrder;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///报单\r\nstruct CThostFtdcOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///报单价格条件\r\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///组合开平标志\r\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\r\n\t///组合投机套保标志\r\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///GTD日期\r\n\tTThostFtdcDateType\tGTDDate;\r\n\t///成交量类型\r\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\r\n\t///最小成交量\r\n\tTThostFtdcVolumeType\tMinVolume;\r\n\t///触发条件\r\n\tTThostFtdcContingentConditionType\tContingentCondition;\r\n\t///止损价\r\n\tTThostFtdcPriceType\tStopPrice;\r\n\t///强平原因\r\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\r\n\t///自动挂起标志\r\n\tTThostFtdcBoolType\tIsAutoSuspend;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///报单提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///报单来源\r\n\tTThostFtdcOrderSourceType\tOrderSource;\r\n\t///报单状态\r\n\tTThostFtdcOrderStatusType\tOrderStatus;\r\n\t///报单类型\r\n\tTThostFtdcOrderTypeType\tOrderType;\r\n\t///今成交数量\r\n\tTThostFtdcVolumeType\tVolumeTraded;\r\n\t///剩余数量\r\n\tTThostFtdcVolumeType\tVolumeTotal;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///委托时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///激活时间\r\n\tTThostFtdcTimeType\tActiveTime;\r\n\t///挂起时间\r\n\tTThostFtdcTimeType\tSuspendTime;\r\n\t///最后修改时间\r\n\tTThostFtdcTimeType\tUpdateTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///最后修改交易所交易员代码\r\n\tTThostFtdcTraderIDType\tActiveTraderID;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///用户强平标志\r\n\tTThostFtdcBoolType\tUserForceClose;\r\n\t///操作用户代码\r\n\tTThostFtdcUserIDType\tActiveUserID;\r\n\t///经纪公司报单编号\r\n\tTThostFtdcSequenceNoType\tBrokerOrderSeq;\r\n\t///相关报单\r\n\tTThostFtdcOrderSysIDType\tRelativeOrderSysID;\r\n\t///郑商所成交数量\r\n\tTThostFtdcVolumeType\tZCETotalTradedVolume;\r\n\t///互换单标志\r\n\tTThostFtdcBoolType\tIsSwapOrder;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve3;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///交易所报单\r\nstruct CThostFtdcExchangeOrderField\r\n{\r\n\t///报单价格条件\r\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///组合开平标志\r\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\r\n\t///组合投机套保标志\r\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///GTD日期\r\n\tTThostFtdcDateType\tGTDDate;\r\n\t///成交量类型\r\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\r\n\t///最小成交量\r\n\tTThostFtdcVolumeType\tMinVolume;\r\n\t///触发条件\r\n\tTThostFtdcContingentConditionType\tContingentCondition;\r\n\t///止损价\r\n\tTThostFtdcPriceType\tStopPrice;\r\n\t///强平原因\r\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\r\n\t///自动挂起标志\r\n\tTThostFtdcBoolType\tIsAutoSuspend;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///报单提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///报单来源\r\n\tTThostFtdcOrderSourceType\tOrderSource;\r\n\t///报单状态\r\n\tTThostFtdcOrderStatusType\tOrderStatus;\r\n\t///报单类型\r\n\tTThostFtdcOrderTypeType\tOrderType;\r\n\t///今成交数量\r\n\tTThostFtdcVolumeType\tVolumeTraded;\r\n\t///剩余数量\r\n\tTThostFtdcVolumeType\tVolumeTotal;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///委托时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///激活时间\r\n\tTThostFtdcTimeType\tActiveTime;\r\n\t///挂起时间\r\n\tTThostFtdcTimeType\tSuspendTime;\r\n\t///最后修改时间\r\n\tTThostFtdcTimeType\tUpdateTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///最后修改交易所交易员代码\r\n\tTThostFtdcTraderIDType\tActiveTraderID;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///交易所报单插入失败\r\nstruct CThostFtdcExchangeOrderInsertErrorField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///输入报单操作\r\nstruct CThostFtdcInputOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报单操作引用\r\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量变化\r\n\tTThostFtdcVolumeType\tVolumeChange;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///报单操作\r\nstruct CThostFtdcOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报单操作引用\r\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量变化\r\n\tTThostFtdcVolumeType\tVolumeChange;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///交易所报单操作\r\nstruct CThostFtdcExchangeOrderActionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量变化\r\n\tTThostFtdcVolumeType\tVolumeChange;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///交易所报单操作失败\r\nstruct CThostFtdcExchangeOrderActionErrorField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///交易所成交\r\nstruct CThostFtdcExchangeTradeField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///成交编号\r\n\tTThostFtdcTradeIDType\tTradeID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///交易角色\r\n\tTThostFtdcTradingRoleType\tTradingRole;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///成交时期\r\n\tTThostFtdcDateType\tTradeDate;\r\n\t///成交时间\r\n\tTThostFtdcTimeType\tTradeTime;\r\n\t///成交类型\r\n\tTThostFtdcTradeTypeType\tTradeType;\r\n\t///成交价来源\r\n\tTThostFtdcPriceSourceType\tPriceSource;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///成交来源\r\n\tTThostFtdcTradeSourceType\tTradeSource;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///成交\r\nstruct CThostFtdcTradeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///成交编号\r\n\tTThostFtdcTradeIDType\tTradeID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///交易角色\r\n\tTThostFtdcTradingRoleType\tTradingRole;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///成交时期\r\n\tTThostFtdcDateType\tTradeDate;\r\n\t///成交时间\r\n\tTThostFtdcTimeType\tTradeTime;\r\n\t///成交类型\r\n\tTThostFtdcTradeTypeType\tTradeType;\r\n\t///成交价来源\r\n\tTThostFtdcPriceSourceType\tPriceSource;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///经纪公司报单编号\r\n\tTThostFtdcSequenceNoType\tBrokerOrderSeq;\r\n\t///成交来源\r\n\tTThostFtdcTradeSourceType\tTradeSource;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///用户会话\r\nstruct CThostFtdcUserSessionField\r\n{\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///登录日期\r\n\tTThostFtdcDateType\tLoginDate;\r\n\t///登录时间\r\n\tTThostFtdcTimeType\tLoginTime;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///接口端产品信息\r\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\r\n\t///协议信息\r\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///登录备注\r\n\tTThostFtdcLoginRemarkType\tLoginRemark;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询最大报单数量\r\nstruct CThostFtdcQryMaxOrderVolumeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///最大允许报单数量\r\n\tTThostFtdcVolumeType\tMaxVolume;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///投资者结算结果确认信息\r\nstruct CThostFtdcSettlementInfoConfirmField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///确认日期\r\n\tTThostFtdcDateType\tConfirmDate;\r\n\t///确认时间\r\n\tTThostFtdcTimeType\tConfirmTime;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///出入金同步\r\nstruct CThostFtdcSyncDepositField\r\n{\r\n\t///出入金流水号\r\n\tTThostFtdcDepositSeqNoType\tDepositSeqNo;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///入金金额\r\n\tTThostFtdcMoneyType\tDeposit;\r\n\t///是否强制进行\r\n\tTThostFtdcBoolType\tIsForce;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///是否是个股期权内转\r\n\tTThostFtdcBoolType\tIsFromSopt;\r\n\t///资金密码\r\n\tTThostFtdcPasswordType\tTradingPassword;\r\n\t///是否二级代理商的内转\r\n\tTThostFtdcBoolType\tIsSecAgentTranfer;\r\n};\r\n\r\n///货币质押同步\r\nstruct CThostFtdcSyncFundMortgageField\r\n{\r\n\t///货币质押流水号\r\n\tTThostFtdcDepositSeqNoType\tMortgageSeqNo;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///源币种\r\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\r\n\t///质押金额\r\n\tTThostFtdcMoneyType\tMortgageAmount;\r\n\t///目标币种\r\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\r\n};\r\n\r\n///经纪公司同步\r\nstruct CThostFtdcBrokerSyncField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///正在同步中的投资者\r\nstruct CThostFtdcSyncingInvestorField\r\n{\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者分组代码\r\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\r\n\t///投资者名称\r\n\tTThostFtdcPartyNameType\tInvestorName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdentifiedCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n\t///联系电话\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///通讯地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///开户日期\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///手机\r\n\tTThostFtdcMobileType\tMobile;\r\n\t///手续费率模板代码\r\n\tTThostFtdcInvestorIDType\tCommModelID;\r\n\t///保证金率模板代码\r\n\tTThostFtdcInvestorIDType\tMarginModelID;\r\n\t///是否频率控制\r\n\tTThostFtdcEnumBoolType\tIsOrderFreq;\r\n\t///是否开仓限制\r\n\tTThostFtdcEnumBoolType\tIsOpenVolLimit;\r\n};\r\n\r\n///正在同步中的交易代码\r\nstruct CThostFtdcSyncingTradingCodeField\r\n{\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n\t///交易编码类型\r\n\tTThostFtdcClientIDTypeType\tClientIDType;\r\n};\r\n\r\n///正在同步中的投资者分组\r\nstruct CThostFtdcSyncingInvestorGroupField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者分组代码\r\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\r\n\t///投资者分组名称\r\n\tTThostFtdcInvestorGroupNameType\tInvestorGroupName;\r\n};\r\n\r\n///正在同步中的交易账号\r\nstruct CThostFtdcSyncingTradingAccountField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///上次质押金额\r\n\tTThostFtdcMoneyType\tPreMortgage;\r\n\t///上次信用额度\r\n\tTThostFtdcMoneyType\tPreCredit;\r\n\t///上次存款额\r\n\tTThostFtdcMoneyType\tPreDeposit;\r\n\t///上次结算准备金\r\n\tTThostFtdcMoneyType\tPreBalance;\r\n\t///上次占用的保证金\r\n\tTThostFtdcMoneyType\tPreMargin;\r\n\t///利息基数\r\n\tTThostFtdcMoneyType\tInterestBase;\r\n\t///利息收入\r\n\tTThostFtdcMoneyType\tInterest;\r\n\t///入金金额\r\n\tTThostFtdcMoneyType\tDeposit;\r\n\t///出金金额\r\n\tTThostFtdcMoneyType\tWithdraw;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///当前保证金总额\r\n\tTThostFtdcMoneyType\tCurrMargin;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfit;\r\n\t///期货结算准备金\r\n\tTThostFtdcMoneyType\tBalance;\r\n\t///可用资金\r\n\tTThostFtdcMoneyType\tAvailable;\r\n\t///可取资金\r\n\tTThostFtdcMoneyType\tWithdrawQuota;\r\n\t///基本准备金\r\n\tTThostFtdcMoneyType\tReserve;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///信用额度\r\n\tTThostFtdcMoneyType\tCredit;\r\n\t///质押金额\r\n\tTThostFtdcMoneyType\tMortgage;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchangeMargin;\r\n\t///投资者交割保证金\r\n\tTThostFtdcMoneyType\tDeliveryMargin;\r\n\t///交易所交割保证金\r\n\tTThostFtdcMoneyType\tExchangeDeliveryMargin;\r\n\t///保底期货结算准备金\r\n\tTThostFtdcMoneyType\tReserveBalance;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///上次货币质入金额\r\n\tTThostFtdcMoneyType\tPreFundMortgageIn;\r\n\t///上次货币质出金额\r\n\tTThostFtdcMoneyType\tPreFundMortgageOut;\r\n\t///货币质入金额\r\n\tTThostFtdcMoneyType\tFundMortgageIn;\r\n\t///货币质出金额\r\n\tTThostFtdcMoneyType\tFundMortgageOut;\r\n\t///货币质押余额\r\n\tTThostFtdcMoneyType\tFundMortgageAvailable;\r\n\t///可质押货币金额\r\n\tTThostFtdcMoneyType\tMortgageableFund;\r\n\t///特殊产品占用保证金\r\n\tTThostFtdcMoneyType\tSpecProductMargin;\r\n\t///特殊产品冻结保证金\r\n\tTThostFtdcMoneyType\tSpecProductFrozenMargin;\r\n\t///特殊产品手续费\r\n\tTThostFtdcMoneyType\tSpecProductCommission;\r\n\t///特殊产品冻结手续费\r\n\tTThostFtdcMoneyType\tSpecProductFrozenCommission;\r\n\t///特殊产品持仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductPositionProfit;\r\n\t///特殊产品平仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductCloseProfit;\r\n\t///根据持仓盈亏算法计算的特殊产品持仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductPositionProfitByAlg;\r\n\t///特殊产品交易所保证金\r\n\tTThostFtdcMoneyType\tSpecProductExchangeMargin;\r\n\t///延时换汇冻结金额\r\n\tTThostFtdcMoneyType\tFrozenSwap;\r\n\t///剩余换汇额度\r\n\tTThostFtdcMoneyType\tRemainSwap;\r\n\t///期权市值\r\n\tTThostFtdcMoneyType\tOptionValue;\r\n};\r\n\r\n///正在同步中的投资者持仓\r\nstruct CThostFtdcSyncingInvestorPositionField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///持仓多空方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///持仓日期\r\n\tTThostFtdcPositionDateType\tPositionDate;\r\n\t///上日持仓\r\n\tTThostFtdcVolumeType\tYdPosition;\r\n\t///今日持仓\r\n\tTThostFtdcVolumeType\tPosition;\r\n\t///多头冻结\r\n\tTThostFtdcVolumeType\tLongFrozen;\r\n\t///空头冻结\r\n\tTThostFtdcVolumeType\tShortFrozen;\r\n\t///开仓冻结金额\r\n\tTThostFtdcMoneyType\tLongFrozenAmount;\r\n\t///开仓冻结金额\r\n\tTThostFtdcMoneyType\tShortFrozenAmount;\r\n\t///开仓量\r\n\tTThostFtdcVolumeType\tOpenVolume;\r\n\t///平仓量\r\n\tTThostFtdcVolumeType\tCloseVolume;\r\n\t///开仓金额\r\n\tTThostFtdcMoneyType\tOpenAmount;\r\n\t///平仓金额\r\n\tTThostFtdcMoneyType\tCloseAmount;\r\n\t///持仓成本\r\n\tTThostFtdcMoneyType\tPositionCost;\r\n\t///上次占用的保证金\r\n\tTThostFtdcMoneyType\tPreMargin;\r\n\t///占用的保证金\r\n\tTThostFtdcMoneyType\tUseMargin;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfit;\r\n\t///上次结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///本次结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///开仓成本\r\n\tTThostFtdcMoneyType\tOpenCost;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchangeMargin;\r\n\t///组合成交形成的持仓\r\n\tTThostFtdcVolumeType\tCombPosition;\r\n\t///组合多头冻结\r\n\tTThostFtdcVolumeType\tCombLongFrozen;\r\n\t///组合空头冻结\r\n\tTThostFtdcVolumeType\tCombShortFrozen;\r\n\t///逐日盯市平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByDate;\r\n\t///逐笔对冲平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\r\n\t///今日持仓\r\n\tTThostFtdcVolumeType\tTodayPosition;\r\n\t///保证金率\r\n\tTThostFtdcRatioType\tMarginRateByMoney;\r\n\t///保证金率(按手数)\r\n\tTThostFtdcRatioType\tMarginRateByVolume;\r\n\t///执行冻结\r\n\tTThostFtdcVolumeType\tStrikeFrozen;\r\n\t///执行冻结金额\r\n\tTThostFtdcMoneyType\tStrikeFrozenAmount;\r\n\t///放弃执行冻结\r\n\tTThostFtdcVolumeType\tAbandonFrozen;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行冻结的昨仓\r\n\tTThostFtdcVolumeType\tYdStrikeFrozen;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///持仓成本差值\r\n\tTThostFtdcMoneyType\tPositionCostOffset;\r\n\t///tas持仓手数\r\n\tTThostFtdcVolumeType\tTasPosition;\r\n\t///tas持仓成本\r\n\tTThostFtdcMoneyType\tTasPositionCost;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///正在同步中的合约保证金率\r\nstruct CThostFtdcSyncingInstrumentMarginRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///是否相对交易所收取\r\n\tTThostFtdcBoolType\tIsRelative;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///正在同步中的合约手续费率\r\nstruct CThostFtdcSyncingInstrumentCommissionRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///开仓手续费率\r\n\tTThostFtdcRatioType\tOpenRatioByMoney;\r\n\t///开仓手续费\r\n\tTThostFtdcRatioType\tOpenRatioByVolume;\r\n\t///平仓手续费率\r\n\tTThostFtdcRatioType\tCloseRatioByMoney;\r\n\t///平仓手续费\r\n\tTThostFtdcRatioType\tCloseRatioByVolume;\r\n\t///平今手续费率\r\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\r\n\t///平今手续费\r\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///正在同步中的合约交易权限\r\nstruct CThostFtdcSyncingInstrumentTradingRightField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易权限\r\n\tTThostFtdcTradingRightType\tTradingRight;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询报单\r\nstruct CThostFtdcQryOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///开始时间\r\n\tTThostFtdcTimeType\tInsertTimeStart;\r\n\t///结束时间\r\n\tTThostFtdcTimeType\tInsertTimeEnd;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询成交\r\nstruct CThostFtdcQryTradeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///成交编号\r\n\tTThostFtdcTradeIDType\tTradeID;\r\n\t///开始时间\r\n\tTThostFtdcTimeType\tTradeTimeStart;\r\n\t///结束时间\r\n\tTThostFtdcTimeType\tTradeTimeEnd;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询投资者持仓\r\nstruct CThostFtdcQryInvestorPositionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询资金账户\r\nstruct CThostFtdcQryTradingAccountField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///业务类型\r\n\tTThostFtdcBizTypeType\tBizType;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n};\r\n\r\n///查询投资者\r\nstruct CThostFtdcQryInvestorField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///查询交易编码\r\nstruct CThostFtdcQryTradingCodeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///交易编码类型\r\n\tTThostFtdcClientIDTypeType\tClientIDType;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///查询投资者组\r\nstruct CThostFtdcQryInvestorGroupField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///查询合约保证金率\r\nstruct CThostFtdcQryInstrumentMarginRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询手续费率\r\nstruct CThostFtdcQryInstrumentCommissionRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询合约交易权限\r\nstruct CThostFtdcQryInstrumentTradingRightField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询经纪公司\r\nstruct CThostFtdcQryBrokerField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///查询交易员\r\nstruct CThostFtdcQryTraderField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n};\r\n\r\n///查询管理用户功能权限\r\nstruct CThostFtdcQrySuperUserFunctionField\r\n{\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///查询用户会话\r\nstruct CThostFtdcQryUserSessionField\r\n{\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///查询经纪公司会员代码\r\nstruct CThostFtdcQryPartBrokerField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n};\r\n\r\n///查询前置状态\r\nstruct CThostFtdcQryFrontStatusField\r\n{\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n};\r\n\r\n///查询交易所报单\r\nstruct CThostFtdcQryExchangeOrderField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///查询报单操作\r\nstruct CThostFtdcQryOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///查询交易所报单操作\r\nstruct CThostFtdcQryExchangeOrderActionField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n};\r\n\r\n///查询管理用户\r\nstruct CThostFtdcQrySuperUserField\r\n{\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///查询交易所\r\nstruct CThostFtdcQryExchangeField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///查询产品\r\nstruct CThostFtdcQryProductField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///产品类型\r\n\tTThostFtdcProductClassType\tProductClass;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n};\r\n\r\n///查询合约\r\nstruct CThostFtdcQryInstrumentField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve3;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n};\r\n\r\n///查询行情\r\nstruct CThostFtdcQryDepthMarketDataField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///产品类型\r\n\tTThostFtdcProductClassType\tProductClass;\r\n};\r\n\r\n///查询经纪公司用户\r\nstruct CThostFtdcQryBrokerUserField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///查询经纪公司用户权限\r\nstruct CThostFtdcQryBrokerUserFunctionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///查询交易员报盘机\r\nstruct CThostFtdcQryTraderOfferField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n};\r\n\r\n///查询出入金流水\r\nstruct CThostFtdcQrySyncDepositField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///出入金流水号\r\n\tTThostFtdcDepositSeqNoType\tDepositSeqNo;\r\n};\r\n\r\n///查询投资者结算结果\r\nstruct CThostFtdcQrySettlementInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///查询交易所保证金率\r\nstruct CThostFtdcQryExchangeMarginRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询交易所调整保证金率\r\nstruct CThostFtdcQryExchangeMarginRateAdjustField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询汇率\r\nstruct CThostFtdcQryExchangeRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///源币种\r\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\r\n\t///目标币种\r\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\r\n};\r\n\r\n///查询货币质押流水\r\nstruct CThostFtdcQrySyncFundMortgageField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///货币质押流水号\r\n\tTThostFtdcDepositSeqNoType\tMortgageSeqNo;\r\n};\r\n\r\n///查询报单\r\nstruct CThostFtdcQryHisOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///开始时间\r\n\tTThostFtdcTimeType\tInsertTimeStart;\r\n\t///结束时间\r\n\tTThostFtdcTimeType\tInsertTimeEnd;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///当前期权合约最小保证金\r\nstruct CThostFtdcOptionInstrMiniMarginField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///单位（手）期权合约最小保证金\r\n\tTThostFtdcMoneyType\tMinMargin;\r\n\t///取值方式\r\n\tTThostFtdcValueMethodType\tValueMethod;\r\n\t///是否跟随交易所收取\r\n\tTThostFtdcBoolType\tIsRelative;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///当前期权合约保证金调整系数\r\nstruct CThostFtdcOptionInstrMarginAdjustField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机空头保证金调整系数\r\n\tTThostFtdcRatioType\tSShortMarginRatioByMoney;\r\n\t///投机空头保证金调整系数\r\n\tTThostFtdcMoneyType\tSShortMarginRatioByVolume;\r\n\t///保值空头保证金调整系数\r\n\tTThostFtdcRatioType\tHShortMarginRatioByMoney;\r\n\t///保值空头保证金调整系数\r\n\tTThostFtdcMoneyType\tHShortMarginRatioByVolume;\r\n\t///套利空头保证金调整系数\r\n\tTThostFtdcRatioType\tAShortMarginRatioByMoney;\r\n\t///套利空头保证金调整系数\r\n\tTThostFtdcMoneyType\tAShortMarginRatioByVolume;\r\n\t///是否跟随交易所收取\r\n\tTThostFtdcBoolType\tIsRelative;\r\n\t///做市商空头保证金调整系数\r\n\tTThostFtdcRatioType\tMShortMarginRatioByMoney;\r\n\t///做市商空头保证金调整系数\r\n\tTThostFtdcMoneyType\tMShortMarginRatioByVolume;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///当前期权合约手续费的详细内容\r\nstruct CThostFtdcOptionInstrCommRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///开仓手续费率\r\n\tTThostFtdcRatioType\tOpenRatioByMoney;\r\n\t///开仓手续费\r\n\tTThostFtdcRatioType\tOpenRatioByVolume;\r\n\t///平仓手续费率\r\n\tTThostFtdcRatioType\tCloseRatioByMoney;\r\n\t///平仓手续费\r\n\tTThostFtdcRatioType\tCloseRatioByVolume;\r\n\t///平今手续费率\r\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\r\n\t///平今手续费\r\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\r\n\t///执行手续费率\r\n\tTThostFtdcRatioType\tStrikeRatioByMoney;\r\n\t///执行手续费\r\n\tTThostFtdcRatioType\tStrikeRatioByVolume;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///期权交易成本\r\nstruct CThostFtdcOptionInstrTradeCostField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///期权合约保证金不变部分\r\n\tTThostFtdcMoneyType\tFixedMargin;\r\n\t///期权合约最小保证金\r\n\tTThostFtdcMoneyType\tMiniMargin;\r\n\t///期权合约权利金\r\n\tTThostFtdcMoneyType\tRoyalty;\r\n\t///交易所期权合约保证金不变部分\r\n\tTThostFtdcMoneyType\tExchFixedMargin;\r\n\t///交易所期权合约最小保证金\r\n\tTThostFtdcMoneyType\tExchMiniMargin;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///期权交易成本查询\r\nstruct CThostFtdcQryOptionInstrTradeCostField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///期权合约报价\r\n\tTThostFtdcPriceType\tInputPrice;\r\n\t///标的价格,填0则用昨结算价\r\n\tTThostFtdcPriceType\tUnderlyingPrice;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///期权手续费率查询\r\nstruct CThostFtdcQryOptionInstrCommRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///股指现货指数\r\nstruct CThostFtdcIndexPriceField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///指数现货收盘价\r\n\tTThostFtdcPriceType\tClosePrice;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///输入的执行宣告\r\nstruct CThostFtdcInputExecOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///执行宣告引用\r\n\tTThostFtdcOrderRefType\tExecOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///执行类型\r\n\tTThostFtdcActionTypeType\tActionType;\r\n\t///保留头寸申请的持仓方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\r\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\r\n\t///期权行权后生成的头寸是否自动平仓\r\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///输入执行宣告操作\r\nstruct CThostFtdcInputExecOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///执行宣告操作引用\r\n\tTThostFtdcOrderActionRefType\tExecOrderActionRef;\r\n\t///执行宣告引用\r\n\tTThostFtdcOrderRefType\tExecOrderRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行宣告操作编号\r\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///执行宣告\r\nstruct CThostFtdcExecOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///执行宣告引用\r\n\tTThostFtdcOrderRefType\tExecOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///执行类型\r\n\tTThostFtdcActionTypeType\tActionType;\r\n\t///保留头寸申请的持仓方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\r\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\r\n\t///期权行权后生成的头寸是否自动平仓\r\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\r\n\t///本地执行宣告编号\r\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///执行宣告提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///执行宣告编号\r\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///执行结果\r\n\tTThostFtdcExecResultType\tExecResult;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///操作用户代码\r\n\tTThostFtdcUserIDType\tActiveUserID;\r\n\t///经纪公司报单编号\r\n\tTThostFtdcSequenceNoType\tBrokerExecOrderSeq;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve3;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///执行宣告操作\r\nstruct CThostFtdcExecOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///执行宣告操作引用\r\n\tTThostFtdcOrderActionRefType\tExecOrderActionRef;\r\n\t///执行宣告引用\r\n\tTThostFtdcOrderRefType\tExecOrderRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行宣告操作编号\r\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地执行宣告编号\r\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///执行类型\r\n\tTThostFtdcActionTypeType\tActionType;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///执行宣告查询\r\nstruct CThostFtdcQryExecOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行宣告编号\r\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\r\n\t///开始时间\r\n\tTThostFtdcTimeType\tInsertTimeStart;\r\n\t///结束时间\r\n\tTThostFtdcTimeType\tInsertTimeEnd;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易所执行宣告信息\r\nstruct CThostFtdcExchangeExecOrderField\r\n{\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///执行类型\r\n\tTThostFtdcActionTypeType\tActionType;\r\n\t///保留头寸申请的持仓方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\r\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\r\n\t///期权行权后生成的头寸是否自动平仓\r\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\r\n\t///本地执行宣告编号\r\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///执行宣告提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///执行宣告编号\r\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///执行结果\r\n\tTThostFtdcExecResultType\tExecResult;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///交易所执行宣告查询\r\nstruct CThostFtdcQryExchangeExecOrderField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///执行宣告操作查询\r\nstruct CThostFtdcQryExecOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///交易所执行宣告操作\r\nstruct CThostFtdcExchangeExecOrderActionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行宣告操作编号\r\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地执行宣告编号\r\n\tTThostFtdcOrderLocalIDType\tExecOrderLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///执行类型\r\n\tTThostFtdcActionTypeType\tActionType;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///交易所执行宣告操作查询\r\nstruct CThostFtdcQryExchangeExecOrderActionField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n};\r\n\r\n///错误执行宣告\r\nstruct CThostFtdcErrExecOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///执行宣告引用\r\n\tTThostFtdcOrderRefType\tExecOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///执行类型\r\n\tTThostFtdcActionTypeType\tActionType;\r\n\t///保留头寸申请的持仓方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///期权行权后是否保留期货头寸的标记,该字段已废弃\r\n\tTThostFtdcExecOrderPositionFlagType\tReservePositionFlag;\r\n\t///期权行权后生成的头寸是否自动平仓\r\n\tTThostFtdcExecOrderCloseFlagType\tCloseFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询错误执行宣告\r\nstruct CThostFtdcQryErrExecOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///错误执行宣告操作\r\nstruct CThostFtdcErrExecOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///执行宣告操作引用\r\n\tTThostFtdcOrderActionRefType\tExecOrderActionRef;\r\n\t///执行宣告引用\r\n\tTThostFtdcOrderRefType\tExecOrderRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行宣告操作编号\r\n\tTThostFtdcExecOrderSysIDType\tExecOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询错误执行宣告操作\r\nstruct CThostFtdcQryErrExecOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///投资者期权合约交易权限\r\nstruct CThostFtdcOptionInstrTradingRightField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///交易权限\r\n\tTThostFtdcTradingRightType\tTradingRight;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询期权合约交易权限\r\nstruct CThostFtdcQryOptionInstrTradingRightField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///输入的询价\r\nstruct CThostFtdcInputForQuoteField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///询价引用\r\n\tTThostFtdcOrderRefType\tForQuoteRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///询价\r\nstruct CThostFtdcForQuoteField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///询价引用\r\n\tTThostFtdcOrderRefType\tForQuoteRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///本地询价编号\r\n\tTThostFtdcOrderLocalIDType\tForQuoteLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///询价状态\r\n\tTThostFtdcForQuoteStatusType\tForQuoteStatus;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///操作用户代码\r\n\tTThostFtdcUserIDType\tActiveUserID;\r\n\t///经纪公司询价编号\r\n\tTThostFtdcSequenceNoType\tBrokerForQutoSeq;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve3;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///询价查询\r\nstruct CThostFtdcQryForQuoteField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///开始时间\r\n\tTThostFtdcTimeType\tInsertTimeStart;\r\n\t///结束时间\r\n\tTThostFtdcTimeType\tInsertTimeEnd;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易所询价信息\r\nstruct CThostFtdcExchangeForQuoteField\r\n{\r\n\t///本地询价编号\r\n\tTThostFtdcOrderLocalIDType\tForQuoteLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///询价状态\r\n\tTThostFtdcForQuoteStatusType\tForQuoteStatus;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///交易所询价查询\r\nstruct CThostFtdcQryExchangeForQuoteField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///输入的报价\r\nstruct CThostFtdcInputQuoteField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报价引用\r\n\tTThostFtdcOrderRefType\tQuoteRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///卖价格\r\n\tTThostFtdcPriceType\tAskPrice;\r\n\t///买价格\r\n\tTThostFtdcPriceType\tBidPrice;\r\n\t///卖数量\r\n\tTThostFtdcVolumeType\tAskVolume;\r\n\t///买数量\r\n\tTThostFtdcVolumeType\tBidVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///卖开平标志\r\n\tTThostFtdcOffsetFlagType\tAskOffsetFlag;\r\n\t///买开平标志\r\n\tTThostFtdcOffsetFlagType\tBidOffsetFlag;\r\n\t///卖投机套保标志\r\n\tTThostFtdcHedgeFlagType\tAskHedgeFlag;\r\n\t///买投机套保标志\r\n\tTThostFtdcHedgeFlagType\tBidHedgeFlag;\r\n\t///衍生卖报单引用\r\n\tTThostFtdcOrderRefType\tAskOrderRef;\r\n\t///衍生买报单引用\r\n\tTThostFtdcOrderRefType\tBidOrderRef;\r\n\t///应价编号\r\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///被顶单编号\r\n\tTThostFtdcOrderSysIDType\tReplaceSysID;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///输入报价操作\r\nstruct CThostFtdcInputQuoteActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报价操作引用\r\n\tTThostFtdcOrderActionRefType\tQuoteActionRef;\r\n\t///报价引用\r\n\tTThostFtdcOrderRefType\tQuoteRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报价操作编号\r\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///报价\r\nstruct CThostFtdcQuoteField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报价引用\r\n\tTThostFtdcOrderRefType\tQuoteRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///卖价格\r\n\tTThostFtdcPriceType\tAskPrice;\r\n\t///买价格\r\n\tTThostFtdcPriceType\tBidPrice;\r\n\t///卖数量\r\n\tTThostFtdcVolumeType\tAskVolume;\r\n\t///买数量\r\n\tTThostFtdcVolumeType\tBidVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///卖开平标志\r\n\tTThostFtdcOffsetFlagType\tAskOffsetFlag;\r\n\t///买开平标志\r\n\tTThostFtdcOffsetFlagType\tBidOffsetFlag;\r\n\t///卖投机套保标志\r\n\tTThostFtdcHedgeFlagType\tAskHedgeFlag;\r\n\t///买投机套保标志\r\n\tTThostFtdcHedgeFlagType\tBidHedgeFlag;\r\n\t///本地报价编号\r\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///报价提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///报价提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///报价编号\r\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///报价状态\r\n\tTThostFtdcOrderStatusType\tQuoteStatus;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///卖方报单编号\r\n\tTThostFtdcOrderSysIDType\tAskOrderSysID;\r\n\t///买方报单编号\r\n\tTThostFtdcOrderSysIDType\tBidOrderSysID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///操作用户代码\r\n\tTThostFtdcUserIDType\tActiveUserID;\r\n\t///经纪公司报价编号\r\n\tTThostFtdcSequenceNoType\tBrokerQuoteSeq;\r\n\t///衍生卖报单引用\r\n\tTThostFtdcOrderRefType\tAskOrderRef;\r\n\t///衍生买报单引用\r\n\tTThostFtdcOrderRefType\tBidOrderRef;\r\n\t///应价编号\r\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve3;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///被顶单编号\r\n\tTThostFtdcOrderSysIDType\tReplaceSysID;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///报价操作\r\nstruct CThostFtdcQuoteActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报价操作引用\r\n\tTThostFtdcOrderActionRefType\tQuoteActionRef;\r\n\t///报价引用\r\n\tTThostFtdcOrderRefType\tQuoteRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报价操作编号\r\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报价编号\r\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///报价查询\r\nstruct CThostFtdcQryQuoteField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报价编号\r\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\r\n\t///开始时间\r\n\tTThostFtdcTimeType\tInsertTimeStart;\r\n\t///结束时间\r\n\tTThostFtdcTimeType\tInsertTimeEnd;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易所报价信息\r\nstruct CThostFtdcExchangeQuoteField\r\n{\r\n\t///卖价格\r\n\tTThostFtdcPriceType\tAskPrice;\r\n\t///买价格\r\n\tTThostFtdcPriceType\tBidPrice;\r\n\t///卖数量\r\n\tTThostFtdcVolumeType\tAskVolume;\r\n\t///买数量\r\n\tTThostFtdcVolumeType\tBidVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///卖开平标志\r\n\tTThostFtdcOffsetFlagType\tAskOffsetFlag;\r\n\t///买开平标志\r\n\tTThostFtdcOffsetFlagType\tBidOffsetFlag;\r\n\t///卖投机套保标志\r\n\tTThostFtdcHedgeFlagType\tAskHedgeFlag;\r\n\t///买投机套保标志\r\n\tTThostFtdcHedgeFlagType\tBidHedgeFlag;\r\n\t///本地报价编号\r\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///报价提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///报价提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///报价编号\r\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///报价状态\r\n\tTThostFtdcOrderStatusType\tQuoteStatus;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///卖方报单编号\r\n\tTThostFtdcOrderSysIDType\tAskOrderSysID;\r\n\t///买方报单编号\r\n\tTThostFtdcOrderSysIDType\tBidOrderSysID;\r\n\t///应价编号\r\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n};\r\n\r\n///交易所报价查询\r\nstruct CThostFtdcQryExchangeQuoteField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///报价操作查询\r\nstruct CThostFtdcQryQuoteActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///交易所报价操作\r\nstruct CThostFtdcExchangeQuoteActionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报价操作编号\r\n\tTThostFtdcOrderSysIDType\tQuoteSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报价编号\r\n\tTThostFtdcOrderLocalIDType\tQuoteLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///交易所报价操作查询\r\nstruct CThostFtdcQryExchangeQuoteActionField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n};\r\n\r\n///期权合约delta值\r\nstruct CThostFtdcOptionInstrDeltaField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///Delta值\r\n\tTThostFtdcRatioType\tDelta;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///发给做市商的询价请求\r\nstruct CThostFtdcForQuoteRspField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///询价编号\r\n\tTThostFtdcOrderSysIDType\tForQuoteSysID;\r\n\t///询价时间\r\n\tTThostFtdcTimeType\tForQuoteTime;\r\n\t///业务日期\r\n\tTThostFtdcDateType\tActionDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///当前期权合约执行偏移值的详细内容\r\nstruct CThostFtdcStrikeOffsetField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///执行偏移值\r\n\tTThostFtdcMoneyType\tOffset;\r\n\t///执行偏移类型\r\n\tTThostFtdcStrikeOffsetTypeType\tOffsetType;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///期权执行偏移值查询\r\nstruct CThostFtdcQryStrikeOffsetField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///输入批量报单操作\r\nstruct CThostFtdcInputBatchOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报单操作引用\r\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///批量报单操作\r\nstruct CThostFtdcBatchOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报单操作引用\r\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///交易所批量报单操作\r\nstruct CThostFtdcExchangeBatchOrderActionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询批量报单操作\r\nstruct CThostFtdcQryBatchOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///组合合约安全系数\r\nstruct CThostFtdcCombInstrumentGuardField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///\r\n\tTThostFtdcRatioType\tGuarantRatio;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///组合合约安全系数查询\r\nstruct CThostFtdcQryCombInstrumentGuardField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///输入的申请组合\r\nstruct CThostFtdcInputCombActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///组合引用\r\n\tTThostFtdcOrderRefType\tCombActionRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///组合指令方向\r\n\tTThostFtdcCombDirectionType\tCombDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///申请组合\r\nstruct CThostFtdcCombActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///组合引用\r\n\tTThostFtdcOrderRefType\tCombActionRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///组合指令方向\r\n\tTThostFtdcCombDirectionType\tCombDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///本地申请组合编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///组合状态\r\n\tTThostFtdcOrderActionStatusType\tActionStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve3;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///组合编号\r\n\tTThostFtdcTradeIDType\tComTradeID;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///申请组合查询\r\nstruct CThostFtdcQryCombActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易所申请组合信息\r\nstruct CThostFtdcExchangeCombActionField\r\n{\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///组合指令方向\r\n\tTThostFtdcCombDirectionType\tCombDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///本地申请组合编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///组合状态\r\n\tTThostFtdcOrderActionStatusType\tActionStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///组合编号\r\n\tTThostFtdcTradeIDType\tComTradeID;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///交易所申请组合查询\r\nstruct CThostFtdcQryExchangeCombActionField\r\n{\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///产品报价汇率\r\nstruct CThostFtdcProductExchRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报价币种类型\r\n\tTThostFtdcCurrencyIDType\tQuoteCurrencyID;\r\n\t///汇率\r\n\tTThostFtdcExchangeRateType\tExchangeRate;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n};\r\n\r\n///产品报价汇率查询\r\nstruct CThostFtdcQryProductExchRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n};\r\n\r\n///查询询价价差参数\r\nstruct CThostFtdcQryForQuoteParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///询价价差参数\r\nstruct CThostFtdcForQuoteParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///最新价\r\n\tTThostFtdcPriceType\tLastPrice;\r\n\t///价差\r\n\tTThostFtdcPriceType\tPriceInterval;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///当前做市商期权合约手续费的详细内容\r\nstruct CThostFtdcMMOptionInstrCommRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///开仓手续费率\r\n\tTThostFtdcRatioType\tOpenRatioByMoney;\r\n\t///开仓手续费\r\n\tTThostFtdcRatioType\tOpenRatioByVolume;\r\n\t///平仓手续费率\r\n\tTThostFtdcRatioType\tCloseRatioByMoney;\r\n\t///平仓手续费\r\n\tTThostFtdcRatioType\tCloseRatioByVolume;\r\n\t///平今手续费率\r\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\r\n\t///平今手续费\r\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\r\n\t///执行手续费率\r\n\tTThostFtdcRatioType\tStrikeRatioByMoney;\r\n\t///执行手续费\r\n\tTThostFtdcRatioType\tStrikeRatioByVolume;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///做市商期权手续费率查询\r\nstruct CThostFtdcQryMMOptionInstrCommRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///做市商合约手续费率\r\nstruct CThostFtdcMMInstrumentCommissionRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///开仓手续费率\r\n\tTThostFtdcRatioType\tOpenRatioByMoney;\r\n\t///开仓手续费\r\n\tTThostFtdcRatioType\tOpenRatioByVolume;\r\n\t///平仓手续费率\r\n\tTThostFtdcRatioType\tCloseRatioByMoney;\r\n\t///平仓手续费\r\n\tTThostFtdcRatioType\tCloseRatioByVolume;\r\n\t///平今手续费率\r\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\r\n\t///平今手续费\r\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询做市商合约手续费率\r\nstruct CThostFtdcQryMMInstrumentCommissionRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///当前报单手续费的详细内容\r\nstruct CThostFtdcInstrumentOrderCommRateField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///报单手续费\r\n\tTThostFtdcRatioType\tOrderCommByVolume;\r\n\t///撤单手续费\r\n\tTThostFtdcRatioType\tOrderActionCommByVolume;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///报单手续费\r\n\tTThostFtdcRatioType\tOrderCommByTrade;\r\n\t///撤单手续费\r\n\tTThostFtdcRatioType\tOrderActionCommByTrade;\r\n};\r\n\r\n///报单手续费率查询\r\nstruct CThostFtdcQryInstrumentOrderCommRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易参数\r\nstruct CThostFtdcTradeParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///参数代码\r\n\tTThostFtdcTradeParamIDType\tTradeParamID;\r\n\t///参数代码值\r\n\tTThostFtdcSettlementParamValueType\tTradeParamValue;\r\n\t///备注\r\n\tTThostFtdcMemoType\tMemo;\r\n};\r\n\r\n///合约保证金率调整\r\nstruct CThostFtdcInstrumentMarginRateULField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///期货持仓限制参数\r\nstruct CThostFtdcFutureLimitPosiParamField\r\n{\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///当日投机开仓数量限制\r\n\tTThostFtdcVolumeType\tSpecOpenVolume;\r\n\t///当日套利开仓数量限制\r\n\tTThostFtdcVolumeType\tArbiOpenVolume;\r\n\t///当日投机+套利开仓数量限制\r\n\tTThostFtdcVolumeType\tOpenVolume;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n};\r\n\r\n///禁止登录IP\r\nstruct CThostFtdcLoginForbiddenIPField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///IP列表\r\nstruct CThostFtdcIPListField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///是否白名单\r\n\tTThostFtdcBoolType\tIsWhite;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///输入的期权自对冲\r\nstruct CThostFtdcInputOptionSelfCloseField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///期权自对冲引用\r\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///期权行权的头寸是否自对冲\r\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///输入期权自对冲操作\r\nstruct CThostFtdcInputOptionSelfCloseActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///期权自对冲操作引用\r\n\tTThostFtdcOrderActionRefType\tOptionSelfCloseActionRef;\r\n\t///期权自对冲引用\r\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///期权自对冲操作编号\r\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///期权自对冲\r\nstruct CThostFtdcOptionSelfCloseField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///期权自对冲引用\r\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///期权行权的头寸是否自对冲\r\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\r\n\t///本地期权自对冲编号\r\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期权自对冲提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///期权自对冲编号\r\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///自对冲结果\r\n\tTThostFtdcExecResultType\tExecResult;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///操作用户代码\r\n\tTThostFtdcUserIDType\tActiveUserID;\r\n\t///经纪公司报单编号\r\n\tTThostFtdcSequenceNoType\tBrokerOptionSelfCloseSeq;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve3;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///期权自对冲操作\r\nstruct CThostFtdcOptionSelfCloseActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///期权自对冲操作引用\r\n\tTThostFtdcOrderActionRefType\tOptionSelfCloseActionRef;\r\n\t///期权自对冲引用\r\n\tTThostFtdcOrderRefType\tOptionSelfCloseRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///期权自对冲操作编号\r\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地期权自对冲编号\r\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///期权自对冲查询\r\nstruct CThostFtdcQryOptionSelfCloseField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///期权自对冲编号\r\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\r\n\t///开始时间\r\n\tTThostFtdcTimeType\tInsertTimeStart;\r\n\t///结束时间\r\n\tTThostFtdcTimeType\tInsertTimeEnd;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///交易所期权自对冲信息\r\nstruct CThostFtdcExchangeOptionSelfCloseField\r\n{\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///期权行权的头寸是否自对冲\r\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\r\n\t///本地期权自对冲编号\r\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期权自对冲提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///期权自对冲编号\r\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///自对冲结果\r\n\tTThostFtdcExecResultType\tExecResult;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///期权自对冲操作查询\r\nstruct CThostFtdcQryOptionSelfCloseActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///交易所期权自对冲操作\r\nstruct CThostFtdcExchangeOptionSelfCloseActionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///期权自对冲操作编号\r\n\tTThostFtdcOrderSysIDType\tOptionSelfCloseSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地期权自对冲编号\r\n\tTThostFtdcOrderLocalIDType\tOptionSelfCloseLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///期权行权的头寸是否自对冲\r\n\tTThostFtdcOptSelfCloseFlagType\tOptSelfCloseFlag;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///延时换汇同步\r\nstruct CThostFtdcSyncDelaySwapField\r\n{\r\n\t///换汇流水号\r\n\tTThostFtdcDepositSeqNoType\tDelaySwapSeqNo;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///源币种\r\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\r\n\t///源金额\r\n\tTThostFtdcMoneyType\tFromAmount;\r\n\t///源换汇冻结金额(可用冻结)\r\n\tTThostFtdcMoneyType\tFromFrozenSwap;\r\n\t///源剩余换汇额度(可提冻结)\r\n\tTThostFtdcMoneyType\tFromRemainSwap;\r\n\t///目标币种\r\n\tTThostFtdcCurrencyIDType\tToCurrencyID;\r\n\t///目标金额\r\n\tTThostFtdcMoneyType\tToAmount;\r\n\t///是否手工换汇\r\n\tTThostFtdcBoolType\tIsManualSwap;\r\n\t///是否将所有外币的剩余换汇额度设置为0\r\n\tTThostFtdcBoolType\tIsAllRemainSetZero;\r\n};\r\n\r\n///查询延时换汇同步\r\nstruct CThostFtdcQrySyncDelaySwapField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///延时换汇流水号\r\n\tTThostFtdcDepositSeqNoType\tDelaySwapSeqNo;\r\n};\r\n\r\n///投资单元\r\nstruct CThostFtdcInvestUnitField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///投资者单元名称\r\n\tTThostFtdcPartyNameType\tInvestorUnitName;\r\n\t///投资者分组代码\r\n\tTThostFtdcInvestorIDType\tInvestorGroupID;\r\n\t///手续费率模板代码\r\n\tTThostFtdcInvestorIDType\tCommModelID;\r\n\t///保证金率模板代码\r\n\tTThostFtdcInvestorIDType\tMarginModelID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///查询投资单元\r\nstruct CThostFtdcQryInvestUnitField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///二级代理商资金校验模式\r\nstruct CThostFtdcSecAgentCheckModeField\r\n{\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///币种\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///境外中介机构资金帐号\r\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\r\n\t///是否需要校验自己的资金账户\r\n\tTThostFtdcBoolType\tCheckSelfAccount;\r\n};\r\n\r\n///二级代理商信息\r\nstruct CThostFtdcSecAgentTradeInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///境外中介机构资金帐号\r\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///二级代理商姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///市场行情\r\nstruct CThostFtdcMarketDataField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///最新价\r\n\tTThostFtdcPriceType\tLastPrice;\r\n\t///上次结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///昨收盘\r\n\tTThostFtdcPriceType\tPreClosePrice;\r\n\t///昨持仓量\r\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\r\n\t///今开盘\r\n\tTThostFtdcPriceType\tOpenPrice;\r\n\t///最高价\r\n\tTThostFtdcPriceType\tHighestPrice;\r\n\t///最低价\r\n\tTThostFtdcPriceType\tLowestPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///成交金额\r\n\tTThostFtdcMoneyType\tTurnover;\r\n\t///持仓量\r\n\tTThostFtdcLargeVolumeType\tOpenInterest;\r\n\t///今收盘\r\n\tTThostFtdcPriceType\tClosePrice;\r\n\t///本次结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///涨停板价\r\n\tTThostFtdcPriceType\tUpperLimitPrice;\r\n\t///跌停板价\r\n\tTThostFtdcPriceType\tLowerLimitPrice;\r\n\t///昨虚实度\r\n\tTThostFtdcRatioType\tPreDelta;\r\n\t///今虚实度\r\n\tTThostFtdcRatioType\tCurrDelta;\r\n\t///最后修改时间\r\n\tTThostFtdcTimeType\tUpdateTime;\r\n\t///最后修改毫秒\r\n\tTThostFtdcMillisecType\tUpdateMillisec;\r\n\t///业务日期\r\n\tTThostFtdcDateType\tActionDay;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///行情基础属性\r\nstruct CThostFtdcMarketDataBaseField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///上次结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///昨收盘\r\n\tTThostFtdcPriceType\tPreClosePrice;\r\n\t///昨持仓量\r\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\r\n\t///昨虚实度\r\n\tTThostFtdcRatioType\tPreDelta;\r\n};\r\n\r\n///行情静态属性\r\nstruct CThostFtdcMarketDataStaticField\r\n{\r\n\t///今开盘\r\n\tTThostFtdcPriceType\tOpenPrice;\r\n\t///最高价\r\n\tTThostFtdcPriceType\tHighestPrice;\r\n\t///最低价\r\n\tTThostFtdcPriceType\tLowestPrice;\r\n\t///今收盘\r\n\tTThostFtdcPriceType\tClosePrice;\r\n\t///涨停板价\r\n\tTThostFtdcPriceType\tUpperLimitPrice;\r\n\t///跌停板价\r\n\tTThostFtdcPriceType\tLowerLimitPrice;\r\n\t///本次结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///今虚实度\r\n\tTThostFtdcRatioType\tCurrDelta;\r\n};\r\n\r\n///行情最新成交属性\r\nstruct CThostFtdcMarketDataLastMatchField\r\n{\r\n\t///最新价\r\n\tTThostFtdcPriceType\tLastPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///成交金额\r\n\tTThostFtdcMoneyType\tTurnover;\r\n\t///持仓量\r\n\tTThostFtdcLargeVolumeType\tOpenInterest;\r\n};\r\n\r\n///行情最优价属性\r\nstruct CThostFtdcMarketDataBestPriceField\r\n{\r\n\t///申买价一\r\n\tTThostFtdcPriceType\tBidPrice1;\r\n\t///申买量一\r\n\tTThostFtdcVolumeType\tBidVolume1;\r\n\t///申卖价一\r\n\tTThostFtdcPriceType\tAskPrice1;\r\n\t///申卖量一\r\n\tTThostFtdcVolumeType\tAskVolume1;\r\n};\r\n\r\n///行情申买二、三属性\r\nstruct CThostFtdcMarketDataBid23Field\r\n{\r\n\t///申买价二\r\n\tTThostFtdcPriceType\tBidPrice2;\r\n\t///申买量二\r\n\tTThostFtdcVolumeType\tBidVolume2;\r\n\t///申买价三\r\n\tTThostFtdcPriceType\tBidPrice3;\r\n\t///申买量三\r\n\tTThostFtdcVolumeType\tBidVolume3;\r\n};\r\n\r\n///行情申卖二、三属性\r\nstruct CThostFtdcMarketDataAsk23Field\r\n{\r\n\t///申卖价二\r\n\tTThostFtdcPriceType\tAskPrice2;\r\n\t///申卖量二\r\n\tTThostFtdcVolumeType\tAskVolume2;\r\n\t///申卖价三\r\n\tTThostFtdcPriceType\tAskPrice3;\r\n\t///申卖量三\r\n\tTThostFtdcVolumeType\tAskVolume3;\r\n};\r\n\r\n///行情申买四、五属性\r\nstruct CThostFtdcMarketDataBid45Field\r\n{\r\n\t///申买价四\r\n\tTThostFtdcPriceType\tBidPrice4;\r\n\t///申买量四\r\n\tTThostFtdcVolumeType\tBidVolume4;\r\n\t///申买价五\r\n\tTThostFtdcPriceType\tBidPrice5;\r\n\t///申买量五\r\n\tTThostFtdcVolumeType\tBidVolume5;\r\n};\r\n\r\n///行情申卖四、五属性\r\nstruct CThostFtdcMarketDataAsk45Field\r\n{\r\n\t///申卖价四\r\n\tTThostFtdcPriceType\tAskPrice4;\r\n\t///申卖量四\r\n\tTThostFtdcVolumeType\tAskVolume4;\r\n\t///申卖价五\r\n\tTThostFtdcPriceType\tAskPrice5;\r\n\t///申卖量五\r\n\tTThostFtdcVolumeType\tAskVolume5;\r\n};\r\n\r\n///行情更新时间属性\r\nstruct CThostFtdcMarketDataUpdateTimeField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///最后修改时间\r\n\tTThostFtdcTimeType\tUpdateTime;\r\n\t///最后修改毫秒\r\n\tTThostFtdcMillisecType\tUpdateMillisec;\r\n\t///业务日期\r\n\tTThostFtdcDateType\tActionDay;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///行情上下带价\r\nstruct CThostFtdcMarketDataBandingPriceField\r\n{\r\n\t///上带价\r\n\tTThostFtdcPriceType\tBandingUpperPrice;\r\n\t///下带价\r\n\tTThostFtdcPriceType\tBandingLowerPrice;\r\n};\r\n\r\n///行情交易所代码属性\r\nstruct CThostFtdcMarketDataExchangeField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///指定的合约\r\nstruct CThostFtdcSpecificInstrumentField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///合约状态\r\nstruct CThostFtdcInstrumentStatusField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///结算组代码\r\n\tTThostFtdcSettlementGroupIDType\tSettlementGroupID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve2;\r\n\t///合约交易状态\r\n\tTThostFtdcInstrumentStatusType\tInstrumentStatus;\r\n\t///交易阶段编号\r\n\tTThostFtdcTradingSegmentSNType\tTradingSegmentSN;\r\n\t///进入本状态时间\r\n\tTThostFtdcTimeType\tEnterTime;\r\n\t///进入本状态原因\r\n\tTThostFtdcInstStatusEnterReasonType\tEnterReason;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询合约状态\r\nstruct CThostFtdcQryInstrumentStatusField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve1;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n};\r\n\r\n///投资者账户\r\nstruct CThostFtdcInvestorAccountField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///浮动盈亏算法\r\nstruct CThostFtdcPositionProfitAlgorithmField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///盈亏算法\r\n\tTThostFtdcAlgorithmType\tAlgorithm;\r\n\t///备注\r\n\tTThostFtdcMemoType\tMemo;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///会员资金折扣\r\nstruct CThostFtdcDiscountField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///资金折扣比例\r\n\tTThostFtdcRatioType\tDiscount;\r\n};\r\n\r\n///查询转帐银行\r\nstruct CThostFtdcQryTransferBankField\r\n{\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分中心代码\r\n\tTThostFtdcBankBrchIDType\tBankBrchID;\r\n};\r\n\r\n///转帐银行\r\nstruct CThostFtdcTransferBankField\r\n{\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分中心代码\r\n\tTThostFtdcBankBrchIDType\tBankBrchID;\r\n\t///银行名称\r\n\tTThostFtdcBankNameType\tBankName;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n};\r\n\r\n///查询投资者持仓明细\r\nstruct CThostFtdcQryInvestorPositionDetailField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///投资者持仓明细\r\nstruct CThostFtdcInvestorPositionDetailField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///买卖\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///开仓日期\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///成交编号\r\n\tTThostFtdcTradeIDType\tTradeID;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///开仓价\r\n\tTThostFtdcPriceType\tOpenPrice;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///成交类型\r\n\tTThostFtdcTradeTypeType\tTradeType;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve2;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///逐日盯市平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByDate;\r\n\t///逐笔对冲平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\r\n\t///逐日盯市持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfitByDate;\r\n\t///逐笔对冲持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfitByTrade;\r\n\t///投资者保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///保证金率\r\n\tTThostFtdcRatioType\tMarginRateByMoney;\r\n\t///保证金率(按手数)\r\n\tTThostFtdcRatioType\tMarginRateByVolume;\r\n\t///昨结算价\r\n\tTThostFtdcPriceType\tLastSettlementPrice;\r\n\t///结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///平仓量\r\n\tTThostFtdcVolumeType\tCloseVolume;\r\n\t///平仓金额\r\n\tTThostFtdcMoneyType\tCloseAmount;\r\n\t///先开先平剩余数量\r\n\tTThostFtdcVolumeType\tTimeFirstVolume;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///特殊持仓标志\r\n\tTThostFtdcSpecPosiTypeType\tSpecPosiType;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n};\r\n\r\n///资金账户口令域\r\nstruct CThostFtdcTradingAccountPasswordField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///交易所行情报盘机\r\nstruct CThostFtdcMDTraderOfferField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///交易所交易员连接状态\r\n\tTThostFtdcTraderConnectStatusType\tTraderConnectStatus;\r\n\t///发出连接请求的日期\r\n\tTThostFtdcDateType\tConnectRequestDate;\r\n\t///发出连接请求的时间\r\n\tTThostFtdcTimeType\tConnectRequestTime;\r\n\t///上次报告日期\r\n\tTThostFtdcDateType\tLastReportDate;\r\n\t///上次报告时间\r\n\tTThostFtdcTimeType\tLastReportTime;\r\n\t///完成连接日期\r\n\tTThostFtdcDateType\tConnectDate;\r\n\t///完成连接时间\r\n\tTThostFtdcTimeType\tConnectTime;\r\n\t///启动日期\r\n\tTThostFtdcDateType\tStartDate;\r\n\t///启动时间\r\n\tTThostFtdcTimeType\tStartTime;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///本席位最大成交编号\r\n\tTThostFtdcTradeIDType\tMaxTradeID;\r\n\t///本席位最大报单备拷\r\n\tTThostFtdcReturnCodeType\tMaxOrderMessageReference;\r\n\t///撤单时选择席位算法\r\n\tTThostFtdcOrderCancelAlgType\tOrderCancelAlg;\r\n};\r\n\r\n///查询行情报盘机\r\nstruct CThostFtdcQryMDTraderOfferField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n};\r\n\r\n///查询客户通知\r\nstruct CThostFtdcQryNoticeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///客户通知\r\nstruct CThostFtdcNoticeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///消息正文\r\n\tTThostFtdcContentType\tContent;\r\n\t///经纪公司通知内容序列号\r\n\tTThostFtdcSequenceLabelType\tSequenceLabel;\r\n};\r\n\r\n///用户权限\r\nstruct CThostFtdcUserRightField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///客户权限类型\r\n\tTThostFtdcUserRightTypeType\tUserRightType;\r\n\t///是否禁止\r\n\tTThostFtdcBoolType\tIsForbidden;\r\n};\r\n\r\n///查询结算信息确认域\r\nstruct CThostFtdcQrySettlementInfoConfirmField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///装载结算信息\r\nstruct CThostFtdcLoadSettlementInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///经纪公司可提资金算法表\r\nstruct CThostFtdcBrokerWithdrawAlgorithmField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///可提资金算法\r\n\tTThostFtdcAlgorithmType\tWithdrawAlgorithm;\r\n\t///资金使用率\r\n\tTThostFtdcRatioType\tUsingRatio;\r\n\t///可提是否包含平仓盈利\r\n\tTThostFtdcIncludeCloseProfitType\tIncludeCloseProfit;\r\n\t///本日无仓且无成交客户是否受可提比例限制\r\n\tTThostFtdcAllWithoutTradeType\tAllWithoutTrade;\r\n\t///可用是否包含平仓盈利\r\n\tTThostFtdcIncludeCloseProfitType\tAvailIncludeCloseProfit;\r\n\t///是否启用用户事件\r\n\tTThostFtdcBoolType\tIsBrokerUserEvent;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///货币质押比率\r\n\tTThostFtdcRatioType\tFundMortgageRatio;\r\n\t///权益算法\r\n\tTThostFtdcBalanceAlgorithmType\tBalanceAlgorithm;\r\n};\r\n\r\n///资金账户口令变更域\r\nstruct CThostFtdcTradingAccountPasswordUpdateV1Field\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///原来的口令\r\n\tTThostFtdcPasswordType\tOldPassword;\r\n\t///新的口令\r\n\tTThostFtdcPasswordType\tNewPassword;\r\n};\r\n\r\n///资金账户口令变更域\r\nstruct CThostFtdcTradingAccountPasswordUpdateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///原来的口令\r\n\tTThostFtdcPasswordType\tOldPassword;\r\n\t///新的口令\r\n\tTThostFtdcPasswordType\tNewPassword;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///查询组合合约分腿\r\nstruct CThostFtdcQryCombinationLegField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve2;\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n\t///单腿合约代码\r\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\r\n};\r\n\r\n///查询组合合约分腿\r\nstruct CThostFtdcQrySyncStatusField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n};\r\n\r\n///组合交易合约的单腿\r\nstruct CThostFtdcCombinationLegField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve2;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///单腿乘数\r\n\tTThostFtdcLegMultipleType\tLegMultiple;\r\n\t///派生层数\r\n\tTThostFtdcImplyLevelType\tImplyLevel;\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n\t///单腿合约代码\r\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\r\n};\r\n\r\n///数据同步状态\r\nstruct CThostFtdcSyncStatusField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///数据同步状态\r\n\tTThostFtdcDataSyncStatusType\tDataSyncStatus;\r\n};\r\n\r\n///查询联系人\r\nstruct CThostFtdcQryLinkManField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///联系人\r\nstruct CThostFtdcLinkManField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///联系人类型\r\n\tTThostFtdcPersonTypeType\tPersonType;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdentifiedCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///名称\r\n\tTThostFtdcPartyNameType\tPersonName;\r\n\t///联系电话\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///通讯地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮政编码\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///优先级\r\n\tTThostFtdcPriorityType\tPriority;\r\n\t///开户邮政编码\r\n\tTThostFtdcUOAZipCodeType\tUOAZipCode;\r\n\t///全称\r\n\tTThostFtdcInvestorFullNameType\tPersonFullName;\r\n};\r\n\r\n///查询经纪公司用户事件\r\nstruct CThostFtdcQryBrokerUserEventField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户事件类型\r\n\tTThostFtdcUserEventTypeType\tUserEventType;\r\n};\r\n\r\n///查询经纪公司用户事件\r\nstruct CThostFtdcBrokerUserEventField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户事件类型\r\n\tTThostFtdcUserEventTypeType\tUserEventType;\r\n\t///用户事件序号\r\n\tTThostFtdcSequenceNoType\tEventSequenceNo;\r\n\t///事件发生日期\r\n\tTThostFtdcDateType\tEventDate;\r\n\t///事件发生时间\r\n\tTThostFtdcTimeType\tEventTime;\r\n\t///用户事件信息\r\n\tTThostFtdcUserEventInfoType\tUserEventInfo;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n};\r\n\r\n///查询签约银行请求\r\nstruct CThostFtdcQryContractBankField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分中心代码\r\n\tTThostFtdcBankBrchIDType\tBankBrchID;\r\n};\r\n\r\n///查询签约银行响应\r\nstruct CThostFtdcContractBankField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分中心代码\r\n\tTThostFtdcBankBrchIDType\tBankBrchID;\r\n\t///银行名称\r\n\tTThostFtdcBankNameType\tBankName;\r\n};\r\n\r\n///投资者组合持仓明细\r\nstruct CThostFtdcInvestorPositionCombineDetailField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///开仓日期\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///组合编号\r\n\tTThostFtdcTradeIDType\tComTradeID;\r\n\t///撮合编号\r\n\tTThostFtdcTradeIDType\tTradeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///买卖\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///持仓量\r\n\tTThostFtdcVolumeType\tTotalAmt;\r\n\t///投资者保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///保证金率\r\n\tTThostFtdcRatioType\tMarginRateByMoney;\r\n\t///保证金率(按手数)\r\n\tTThostFtdcRatioType\tMarginRateByVolume;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///单腿乘数\r\n\tTThostFtdcLegMultipleType\tLegMultiple;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve2;\r\n\t///成交组号\r\n\tTThostFtdcTradeGroupIDType\tTradeGroupID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///组合持仓合约编码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n};\r\n\r\n///预埋单\r\nstruct CThostFtdcParkedOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///报单价格条件\r\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///组合开平标志\r\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\r\n\t///组合投机套保标志\r\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///GTD日期\r\n\tTThostFtdcDateType\tGTDDate;\r\n\t///成交量类型\r\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\r\n\t///最小成交量\r\n\tTThostFtdcVolumeType\tMinVolume;\r\n\t///触发条件\r\n\tTThostFtdcContingentConditionType\tContingentCondition;\r\n\t///止损价\r\n\tTThostFtdcPriceType\tStopPrice;\r\n\t///强平原因\r\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\r\n\t///自动挂起标志\r\n\tTThostFtdcBoolType\tIsAutoSuspend;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///用户强平标志\r\n\tTThostFtdcBoolType\tUserForceClose;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///预埋报单编号\r\n\tTThostFtdcParkedOrderIDType\tParkedOrderID;\r\n\t///用户类型\r\n\tTThostFtdcUserTypeType\tUserType;\r\n\t///预埋单状态\r\n\tTThostFtdcParkedOrderStatusType\tStatus;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///互换单标志\r\n\tTThostFtdcBoolType\tIsSwapOrder;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///输入预埋单操作\r\nstruct CThostFtdcParkedOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报单操作引用\r\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量变化\r\n\tTThostFtdcVolumeType\tVolumeChange;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///预埋撤单单编号\r\n\tTThostFtdcParkedOrderActionIDType\tParkedOrderActionID;\r\n\t///用户类型\r\n\tTThostFtdcUserTypeType\tUserType;\r\n\t///预埋撤单状态\r\n\tTThostFtdcParkedOrderStatusType\tStatus;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询预埋单\r\nstruct CThostFtdcQryParkedOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询预埋撤单\r\nstruct CThostFtdcQryParkedOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///删除预埋单\r\nstruct CThostFtdcRemoveParkedOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///预埋报单编号\r\n\tTThostFtdcParkedOrderIDType\tParkedOrderID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///删除预埋撤单\r\nstruct CThostFtdcRemoveParkedOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///预埋撤单编号\r\n\tTThostFtdcParkedOrderActionIDType\tParkedOrderActionID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///经纪公司可提资金算法表\r\nstruct CThostFtdcInvestorWithdrawAlgorithmField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///可提资金比例\r\n\tTThostFtdcRatioType\tUsingRatio;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///货币质押比率\r\n\tTThostFtdcRatioType\tFundMortgageRatio;\r\n};\r\n\r\n///查询组合持仓明细\r\nstruct CThostFtdcQryInvestorPositionCombineDetailField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///组合持仓合约编码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n};\r\n\r\n///成交均价\r\nstruct CThostFtdcMarketDataAveragePriceField\r\n{\r\n\t///当日均价\r\n\tTThostFtdcPriceType\tAveragePrice;\r\n};\r\n\r\n///校验投资者密码\r\nstruct CThostFtdcVerifyInvestorPasswordField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n};\r\n\r\n///用户IP\r\nstruct CThostFtdcUserIPField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///IP地址掩码\r\n\tTThostFtdcIPAddressType\tIPMask;\r\n};\r\n\r\n///用户事件通知信息\r\nstruct CThostFtdcTradingNoticeInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///发送时间\r\n\tTThostFtdcTimeType\tSendTime;\r\n\t///消息正文\r\n\tTThostFtdcContentType\tFieldContent;\r\n\t///序列系列号\r\n\tTThostFtdcSequenceSeriesType\tSequenceSeries;\r\n\t///序列号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///用户事件通知\r\nstruct CThostFtdcTradingNoticeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///序列系列号\r\n\tTThostFtdcSequenceSeriesType\tSequenceSeries;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///发送时间\r\n\tTThostFtdcTimeType\tSendTime;\r\n\t///序列号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///消息正文\r\n\tTThostFtdcContentType\tFieldContent;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///查询交易事件通知\r\nstruct CThostFtdcQryTradingNoticeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///查询错误报单\r\nstruct CThostFtdcQryErrOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///错误报单\r\nstruct CThostFtdcErrOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///报单价格条件\r\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///组合开平标志\r\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\r\n\t///组合投机套保标志\r\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///GTD日期\r\n\tTThostFtdcDateType\tGTDDate;\r\n\t///成交量类型\r\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\r\n\t///最小成交量\r\n\tTThostFtdcVolumeType\tMinVolume;\r\n\t///触发条件\r\n\tTThostFtdcContingentConditionType\tContingentCondition;\r\n\t///止损价\r\n\tTThostFtdcPriceType\tStopPrice;\r\n\t///强平原因\r\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\r\n\t///自动挂起标志\r\n\tTThostFtdcBoolType\tIsAutoSuspend;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///用户强平标志\r\n\tTThostFtdcBoolType\tUserForceClose;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///互换单标志\r\n\tTThostFtdcBoolType\tIsSwapOrder;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///交易编码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///查询错误报单操作\r\nstruct CThostFtdcErrorConditionalOrderField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///报单价格条件\r\n\tTThostFtdcOrderPriceTypeType\tOrderPriceType;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///组合开平标志\r\n\tTThostFtdcCombOffsetFlagType\tCombOffsetFlag;\r\n\t///组合投机套保标志\r\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolumeTotalOriginal;\r\n\t///有效期类型\r\n\tTThostFtdcTimeConditionType\tTimeCondition;\r\n\t///GTD日期\r\n\tTThostFtdcDateType\tGTDDate;\r\n\t///成交量类型\r\n\tTThostFtdcVolumeConditionType\tVolumeCondition;\r\n\t///最小成交量\r\n\tTThostFtdcVolumeType\tMinVolume;\r\n\t///触发条件\r\n\tTThostFtdcContingentConditionType\tContingentCondition;\r\n\t///止损价\r\n\tTThostFtdcPriceType\tStopPrice;\r\n\t///强平原因\r\n\tTThostFtdcForceCloseReasonType\tForceCloseReason;\r\n\t///自动挂起标志\r\n\tTThostFtdcBoolType\tIsAutoSuspend;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldExchangeInstIDType\treserve2;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///报单提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///报单提示序号\r\n\tTThostFtdcSequenceNoType\tNotifySequence;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///报单来源\r\n\tTThostFtdcOrderSourceType\tOrderSource;\r\n\t///报单状态\r\n\tTThostFtdcOrderStatusType\tOrderStatus;\r\n\t///报单类型\r\n\tTThostFtdcOrderTypeType\tOrderType;\r\n\t///今成交数量\r\n\tTThostFtdcVolumeType\tVolumeTraded;\r\n\t///剩余数量\r\n\tTThostFtdcVolumeType\tVolumeTotal;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///委托时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///激活时间\r\n\tTThostFtdcTimeType\tActiveTime;\r\n\t///挂起时间\r\n\tTThostFtdcTimeType\tSuspendTime;\r\n\t///最后修改时间\r\n\tTThostFtdcTimeType\tUpdateTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///最后修改交易所交易员代码\r\n\tTThostFtdcTraderIDType\tActiveTraderID;\r\n\t///结算会员编号\r\n\tTThostFtdcParticipantIDType\tClearingPartID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///用户强平标志\r\n\tTThostFtdcBoolType\tUserForceClose;\r\n\t///操作用户代码\r\n\tTThostFtdcUserIDType\tActiveUserID;\r\n\t///经纪公司报单编号\r\n\tTThostFtdcSequenceNoType\tBrokerOrderSeq;\r\n\t///相关报单\r\n\tTThostFtdcOrderSysIDType\tRelativeOrderSysID;\r\n\t///郑商所成交数量\r\n\tTThostFtdcVolumeType\tZCETotalTradedVolume;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///互换单标志\r\n\tTThostFtdcBoolType\tIsSwapOrder;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///资金账号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve3;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询错误报单操作\r\nstruct CThostFtdcQryErrOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///错误报单操作\r\nstruct CThostFtdcErrOrderActionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///报单操作引用\r\n\tTThostFtdcOrderActionRefType\tOrderActionRef;\r\n\t///报单引用\r\n\tTThostFtdcOrderRefType\tOrderRef;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///报单编号\r\n\tTThostFtdcOrderSysIDType\tOrderSysID;\r\n\t///操作标志\r\n\tTThostFtdcActionFlagType\tActionFlag;\r\n\t///价格\r\n\tTThostFtdcPriceType\tLimitPrice;\r\n\t///数量变化\r\n\tTThostFtdcVolumeType\tVolumeChange;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///本地报单编号\r\n\tTThostFtdcOrderLocalIDType\tOrderLocalID;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///业务单元\r\n\tTThostFtdcBusinessUnitType\tBusinessUnit;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///营业部编号\r\n\tTThostFtdcBranchIDType\tBranchID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve2;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///报单回显字段\r\n\tTThostFtdcOrderMemoType\tOrderMemo;\r\n\t///session上请求计数 api自动维护\r\n\tTThostFtdcSequenceNo12Type\tSessionReqSeq;\r\n};\r\n\r\n///查询交易所状态\r\nstruct CThostFtdcQryExchangeSequenceField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///交易所状态\r\nstruct CThostFtdcExchangeSequenceField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///合约交易状态\r\n\tTThostFtdcInstrumentStatusType\tMarketStatus;\r\n};\r\n\r\n///根据价格查询最大报单数量\r\nstruct CThostFtdcQryMaxOrderVolumeWithPriceField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///开平标志\r\n\tTThostFtdcOffsetFlagType\tOffsetFlag;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///最大允许报单数量\r\n\tTThostFtdcVolumeType\tMaxVolume;\r\n\t///报单价格\r\n\tTThostFtdcPriceType\tPrice;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询经纪公司交易参数\r\nstruct CThostFtdcQryBrokerTradingParamsField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n};\r\n\r\n///经纪公司交易参数\r\nstruct CThostFtdcBrokerTradingParamsField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保证金价格类型\r\n\tTThostFtdcMarginPriceTypeType\tMarginPriceType;\r\n\t///盈亏算法\r\n\tTThostFtdcAlgorithmType\tAlgorithm;\r\n\t///可用是否包含平仓盈利\r\n\tTThostFtdcIncludeCloseProfitType\tAvailIncludeCloseProfit;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///期权权利金价格类型\r\n\tTThostFtdcOptionRoyaltyPriceTypeType\tOptionRoyaltyPriceType;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n};\r\n\r\n///查询经纪公司交易算法\r\nstruct CThostFtdcQryBrokerTradingAlgosField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///经纪公司交易算法\r\nstruct CThostFtdcBrokerTradingAlgosField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///持仓处理算法编号\r\n\tTThostFtdcHandlePositionAlgoIDType\tHandlePositionAlgoID;\r\n\t///寻找保证金率算法编号\r\n\tTThostFtdcFindMarginRateAlgoIDType\tFindMarginRateAlgoID;\r\n\t///资金处理算法编号\r\n\tTThostFtdcHandleTradingAccountAlgoIDType\tHandleTradingAccountAlgoID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询经纪公司资金\r\nstruct CThostFtdcQueryBrokerDepositField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n};\r\n\r\n///经纪公司资金\r\nstruct CThostFtdcBrokerDepositField\r\n{\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///上次结算准备金\r\n\tTThostFtdcMoneyType\tPreBalance;\r\n\t///当前保证金总额\r\n\tTThostFtdcMoneyType\tCurrMargin;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///期货结算准备金\r\n\tTThostFtdcMoneyType\tBalance;\r\n\t///入金金额\r\n\tTThostFtdcMoneyType\tDeposit;\r\n\t///出金金额\r\n\tTThostFtdcMoneyType\tWithdraw;\r\n\t///可提资金\r\n\tTThostFtdcMoneyType\tAvailable;\r\n\t///基本准备金\r\n\tTThostFtdcMoneyType\tReserve;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n};\r\n\r\n///查询保证金监管系统经纪公司密钥\r\nstruct CThostFtdcQryCFMMCBrokerKeyField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///保证金监管系统经纪公司密钥\r\nstruct CThostFtdcCFMMCBrokerKeyField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///经纪公司统一编码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///密钥生成日期\r\n\tTThostFtdcDateType\tCreateDate;\r\n\t///密钥生成时间\r\n\tTThostFtdcTimeType\tCreateTime;\r\n\t///密钥编号\r\n\tTThostFtdcSequenceNoType\tKeyID;\r\n\t///动态密钥\r\n\tTThostFtdcCFMMCKeyType\tCurrentKey;\r\n\t///动态密钥类型\r\n\tTThostFtdcCFMMCKeyKindType\tKeyKind;\r\n};\r\n\r\n///保证金监管系统经纪公司资金账户密钥\r\nstruct CThostFtdcCFMMCTradingAccountKeyField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///经纪公司统一编码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///密钥编号\r\n\tTThostFtdcSequenceNoType\tKeyID;\r\n\t///动态密钥\r\n\tTThostFtdcCFMMCKeyType\tCurrentKey;\r\n};\r\n\r\n///请求查询保证金监管系统经纪公司资金账户密钥\r\nstruct CThostFtdcQryCFMMCTradingAccountKeyField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///用户动态令牌参数\r\nstruct CThostFtdcBrokerUserOTPParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///动态令牌提供商\r\n\tTThostFtdcOTPVendorsIDType\tOTPVendorsID;\r\n\t///动态令牌序列号\r\n\tTThostFtdcSerialNumberType\tSerialNumber;\r\n\t///令牌密钥\r\n\tTThostFtdcAuthKeyType\tAuthKey;\r\n\t///漂移值\r\n\tTThostFtdcLastDriftType\tLastDrift;\r\n\t///成功值\r\n\tTThostFtdcLastSuccessType\tLastSuccess;\r\n\t///动态令牌类型\r\n\tTThostFtdcOTPTypeType\tOTPType;\r\n};\r\n\r\n///手工同步用户动态令牌\r\nstruct CThostFtdcManualSyncBrokerUserOTPField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///动态令牌类型\r\n\tTThostFtdcOTPTypeType\tOTPType;\r\n\t///第一个动态密码\r\n\tTThostFtdcPasswordType\tFirstOTP;\r\n\t///第二个动态密码\r\n\tTThostFtdcPasswordType\tSecondOTP;\r\n};\r\n\r\n///投资者手续费率模板\r\nstruct CThostFtdcCommRateModelField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///手续费率模板代码\r\n\tTThostFtdcInvestorIDType\tCommModelID;\r\n\t///模板名称\r\n\tTThostFtdcCommModelNameType\tCommModelName;\r\n};\r\n\r\n///请求查询投资者手续费率模板\r\nstruct CThostFtdcQryCommRateModelField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///手续费率模板代码\r\n\tTThostFtdcInvestorIDType\tCommModelID;\r\n};\r\n\r\n///投资者保证金率模板\r\nstruct CThostFtdcMarginModelField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保证金率模板代码\r\n\tTThostFtdcInvestorIDType\tMarginModelID;\r\n\t///模板名称\r\n\tTThostFtdcCommModelNameType\tMarginModelName;\r\n};\r\n\r\n///请求查询投资者保证金率模板\r\nstruct CThostFtdcQryMarginModelField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///保证金率模板代码\r\n\tTThostFtdcInvestorIDType\tMarginModelID;\r\n};\r\n\r\n///仓单折抵信息\r\nstruct CThostFtdcEWarrantOffsetField\r\n{\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询仓单折抵信息\r\nstruct CThostFtdcQryEWarrantOffsetField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///查询投资者品种/跨品种保证金\r\nstruct CThostFtdcQryInvestorProductGroupMarginField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///品种/跨品种标示\r\n\tTThostFtdcInstrumentIDType\tProductGroupID;\r\n};\r\n\r\n///投资者品种/跨品种保证金\r\nstruct CThostFtdcInvestorProductGroupMarginField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n\t///多头冻结的保证金\r\n\tTThostFtdcMoneyType\tLongFrozenMargin;\r\n\t///空头冻结的保证金\r\n\tTThostFtdcMoneyType\tShortFrozenMargin;\r\n\t///占用的保证金\r\n\tTThostFtdcMoneyType\tUseMargin;\r\n\t///多头保证金\r\n\tTThostFtdcMoneyType\tLongUseMargin;\r\n\t///空头保证金\r\n\tTThostFtdcMoneyType\tShortUseMargin;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///交易所多头保证金\r\n\tTThostFtdcMoneyType\tLongExchMargin;\r\n\t///交易所空头保证金\r\n\tTThostFtdcMoneyType\tShortExchMargin;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfit;\r\n\t///折抵总金额\r\n\tTThostFtdcMoneyType\tOffsetAmount;\r\n\t///多头折抵总金额\r\n\tTThostFtdcMoneyType\tLongOffsetAmount;\r\n\t///空头折抵总金额\r\n\tTThostFtdcMoneyType\tShortOffsetAmount;\r\n\t///交易所折抵总金额\r\n\tTThostFtdcMoneyType\tExchOffsetAmount;\r\n\t///交易所多头折抵总金额\r\n\tTThostFtdcMoneyType\tLongExchOffsetAmount;\r\n\t///交易所空头折抵总金额\r\n\tTThostFtdcMoneyType\tShortExchOffsetAmount;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///品种/跨品种标示\r\n\tTThostFtdcInstrumentIDType\tProductGroupID;\r\n};\r\n\r\n///查询监控中心用户令牌\r\nstruct CThostFtdcQueryCFMMCTradingAccountTokenField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n};\r\n\r\n///监控中心用户令牌\r\nstruct CThostFtdcCFMMCTradingAccountTokenField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///经纪公司统一编码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///密钥编号\r\n\tTThostFtdcSequenceNoType\tKeyID;\r\n\t///动态令牌\r\n\tTThostFtdcCFMMCTokenType\tToken;\r\n};\r\n\r\n///查询产品组\r\nstruct CThostFtdcQryProductGroupField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n};\r\n\r\n///投资者品种/跨品种保证金产品组\r\nstruct CThostFtdcProductGroupField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve2;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///产品组代码\r\n\tTThostFtdcInstrumentIDType\tProductGroupID;\r\n};\r\n\r\n///交易所公告\r\nstruct CThostFtdcBulletinField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///公告编号\r\n\tTThostFtdcBulletinIDType\tBulletinID;\r\n\t///序列号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///公告类型\r\n\tTThostFtdcNewsTypeType\tNewsType;\r\n\t///紧急程度\r\n\tTThostFtdcNewsUrgencyType\tNewsUrgency;\r\n\t///发送时间\r\n\tTThostFtdcTimeType\tSendTime;\r\n\t///消息摘要\r\n\tTThostFtdcAbstractType\tAbstract;\r\n\t///消息来源\r\n\tTThostFtdcComeFromType\tComeFrom;\r\n\t///消息正文\r\n\tTThostFtdcContentType\tContent;\r\n\t///WEB地址\r\n\tTThostFtdcURLLinkType\tURLLink;\r\n\t///市场代码\r\n\tTThostFtdcMarketIDType\tMarketID;\r\n};\r\n\r\n///查询交易所公告\r\nstruct CThostFtdcQryBulletinField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///公告编号\r\n\tTThostFtdcBulletinIDType\tBulletinID;\r\n\t///序列号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///公告类型\r\n\tTThostFtdcNewsTypeType\tNewsType;\r\n\t///紧急程度\r\n\tTThostFtdcNewsUrgencyType\tNewsUrgency;\r\n};\r\n\r\n///MulticastInstrument\r\nstruct CThostFtdcMulticastInstrumentField\r\n{\r\n\t///主题号\r\n\tTThostFtdcInstallIDType\tTopicID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约编号\r\n\tTThostFtdcInstallIDType\tInstrumentNo;\r\n\t///基准价\r\n\tTThostFtdcPriceType\tCodePrice;\r\n\t///合约数量乘数\r\n\tTThostFtdcVolumeMultipleType\tVolumeMultiple;\r\n\t///最小变动价位\r\n\tTThostFtdcPriceType\tPriceTick;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///QryMulticastInstrument\r\nstruct CThostFtdcQryMulticastInstrumentField\r\n{\r\n\t///主题号\r\n\tTThostFtdcInstallIDType\tTopicID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldInstrumentIDType\treserve1;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///App客户端权限分配\r\nstruct CThostFtdcAppIDAuthAssignField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n};\r\n\r\n///转帐开户请求\r\nstruct CThostFtdcReqOpenAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///汇钞标志\r\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///转帐销户请求\r\nstruct CThostFtdcReqCancelAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///汇钞标志\r\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///变更银行账户请求\r\nstruct CThostFtdcReqChangeAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///新银行帐号\r\n\tTThostFtdcBankAccountType\tNewBankAccount;\r\n\t///新银行密码\r\n\tTThostFtdcPasswordType\tNewBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///转账请求\r\nstruct CThostFtdcReqTransferField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///期货可取金额\r\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\r\n\t///费用支付标志\r\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\r\n\t///应收客户费用\r\n\tTThostFtdcCustFeeType\tCustFee;\r\n\t///应收期货公司费用\r\n\tTThostFtdcFutureFeeType\tBrokerFee;\r\n\t///发送方给接收方的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///转账交易状态\r\n\tTThostFtdcTransferStatusType\tTransferStatus;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///银行发起银行资金转期货响应\r\nstruct CThostFtdcRspTransferField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///期货可取金额\r\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\r\n\t///费用支付标志\r\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\r\n\t///应收客户费用\r\n\tTThostFtdcCustFeeType\tCustFee;\r\n\t///应收期货公司费用\r\n\tTThostFtdcFutureFeeType\tBrokerFee;\r\n\t///发送方给接收方的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///转账交易状态\r\n\tTThostFtdcTransferStatusType\tTransferStatus;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///冲正请求\r\nstruct CThostFtdcReqRepealField\r\n{\r\n\t///冲正时间间隔\r\n\tTThostFtdcRepealTimeIntervalType\tRepealTimeInterval;\r\n\t///已经冲正次数\r\n\tTThostFtdcRepealedTimesType\tRepealedTimes;\r\n\t///银行冲正标志\r\n\tTThostFtdcBankRepealFlagType\tBankRepealFlag;\r\n\t///期商冲正标志\r\n\tTThostFtdcBrokerRepealFlagType\tBrokerRepealFlag;\r\n\t///被冲正平台流水号\r\n\tTThostFtdcPlateSerialType\tPlateRepealSerial;\r\n\t///被冲正银行流水号\r\n\tTThostFtdcBankSerialType\tBankRepealSerial;\r\n\t///被冲正期货流水号\r\n\tTThostFtdcFutureSerialType\tFutureRepealSerial;\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///期货可取金额\r\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\r\n\t///费用支付标志\r\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\r\n\t///应收客户费用\r\n\tTThostFtdcCustFeeType\tCustFee;\r\n\t///应收期货公司费用\r\n\tTThostFtdcFutureFeeType\tBrokerFee;\r\n\t///发送方给接收方的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///转账交易状态\r\n\tTThostFtdcTransferStatusType\tTransferStatus;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///冲正响应\r\nstruct CThostFtdcRspRepealField\r\n{\r\n\t///冲正时间间隔\r\n\tTThostFtdcRepealTimeIntervalType\tRepealTimeInterval;\r\n\t///已经冲正次数\r\n\tTThostFtdcRepealedTimesType\tRepealedTimes;\r\n\t///银行冲正标志\r\n\tTThostFtdcBankRepealFlagType\tBankRepealFlag;\r\n\t///期商冲正标志\r\n\tTThostFtdcBrokerRepealFlagType\tBrokerRepealFlag;\r\n\t///被冲正平台流水号\r\n\tTThostFtdcPlateSerialType\tPlateRepealSerial;\r\n\t///被冲正银行流水号\r\n\tTThostFtdcBankSerialType\tBankRepealSerial;\r\n\t///被冲正期货流水号\r\n\tTThostFtdcFutureSerialType\tFutureRepealSerial;\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///期货可取金额\r\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\r\n\t///费用支付标志\r\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\r\n\t///应收客户费用\r\n\tTThostFtdcCustFeeType\tCustFee;\r\n\t///应收期货公司费用\r\n\tTThostFtdcFutureFeeType\tBrokerFee;\r\n\t///发送方给接收方的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///转账交易状态\r\n\tTThostFtdcTransferStatusType\tTransferStatus;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///查询账户信息请求\r\nstruct CThostFtdcReqQueryAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///查询账户信息响应\r\nstruct CThostFtdcRspQueryAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///银行可用金额\r\n\tTThostFtdcTradeAmountType\tBankUseAmount;\r\n\t///银行可取金额\r\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///期商签到签退\r\nstruct CThostFtdcFutureSignIOField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n};\r\n\r\n///期商签到响应\r\nstruct CThostFtdcRspFutureSignInField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///PIN密钥\r\n\tTThostFtdcPasswordKeyType\tPinKey;\r\n\t///MAC密钥\r\n\tTThostFtdcPasswordKeyType\tMacKey;\r\n};\r\n\r\n///期商签退请求\r\nstruct CThostFtdcReqFutureSignOutField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n};\r\n\r\n///期商签退响应\r\nstruct CThostFtdcRspFutureSignOutField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///查询指定流水号的交易结果请求\r\nstruct CThostFtdcReqQueryTradeResultBySerialField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///流水号\r\n\tTThostFtdcSerialType\tReference;\r\n\t///本流水号发布者的机构类型\r\n\tTThostFtdcInstitutionTypeType\tRefrenceIssureType;\r\n\t///本流水号发布者机构编码\r\n\tTThostFtdcOrganCodeType\tRefrenceIssure;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///查询指定流水号的交易结果响应\r\nstruct CThostFtdcRspQueryTradeResultBySerialField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///流水号\r\n\tTThostFtdcSerialType\tReference;\r\n\t///本流水号发布者的机构类型\r\n\tTThostFtdcInstitutionTypeType\tRefrenceIssureType;\r\n\t///本流水号发布者机构编码\r\n\tTThostFtdcOrganCodeType\tRefrenceIssure;\r\n\t///原始返回代码\r\n\tTThostFtdcReturnCodeType\tOriginReturnCode;\r\n\t///原始返回码描述\r\n\tTThostFtdcDescrInfoForReturnCodeType\tOriginDescrInfoForReturnCode;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n};\r\n\r\n///日终文件就绪请求\r\nstruct CThostFtdcReqDayEndFileReadyField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///文件业务功能\r\n\tTThostFtdcFileBusinessCodeType\tFileBusinessCode;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n};\r\n\r\n///返回结果\r\nstruct CThostFtdcReturnResultField\r\n{\r\n\t///返回代码\r\n\tTThostFtdcReturnCodeType\tReturnCode;\r\n\t///返回码描述\r\n\tTThostFtdcDescrInfoForReturnCodeType\tDescrInfoForReturnCode;\r\n};\r\n\r\n///验证期货资金密码\r\nstruct CThostFtdcVerifyFuturePasswordField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///验证客户信息\r\nstruct CThostFtdcVerifyCustInfoField\r\n{\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///验证期货资金密码和客户信息\r\nstruct CThostFtdcVerifyFuturePasswordAndCustInfoField\r\n{\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///验证期货资金密码和客户信息\r\nstruct CThostFtdcDepositResultInformField\r\n{\r\n\t///出入金流水号，该流水号为银期报盘返回的流水号\r\n\tTThostFtdcDepositSeqNoType\tDepositSeqNo;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///入金金额\r\n\tTThostFtdcMoneyType\tDeposit;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///返回代码\r\n\tTThostFtdcReturnCodeType\tReturnCode;\r\n\t///返回码描述\r\n\tTThostFtdcDescrInfoForReturnCodeType\tDescrInfoForReturnCode;\r\n};\r\n\r\n///交易核心向银期报盘发出密钥同步请求\r\nstruct CThostFtdcReqSyncKeyField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易核心给银期报盘的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n};\r\n\r\n///交易核心向银期报盘发出密钥同步响应\r\nstruct CThostFtdcRspSyncKeyField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易核心给银期报盘的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///查询账户信息通知\r\nstruct CThostFtdcNotifyQueryAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///银行可用金额\r\n\tTThostFtdcTradeAmountType\tBankUseAmount;\r\n\t///银行可取金额\r\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///银期转账交易流水表\r\nstruct CThostFtdcTransferSerialField\r\n{\r\n\t///平台流水号\r\n\tTThostFtdcPlateSerialType\tPlateSerial;\r\n\t///交易发起方日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易日期\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///交易代码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///银行编码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构编码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///期货公司编码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///期货公司帐号类型\r\n\tTThostFtdcFutureAccTypeType\tFutureAccType;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///交易金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///应收客户费用\r\n\tTThostFtdcCustFeeType\tCustFee;\r\n\t///应收期货公司费用\r\n\tTThostFtdcFutureFeeType\tBrokerFee;\r\n\t///有效标志\r\n\tTThostFtdcAvailabilityFlagType\tAvailabilityFlag;\r\n\t///操作员\r\n\tTThostFtdcOperatorCodeType\tOperatorCode;\r\n\t///新银行帐号\r\n\tTThostFtdcBankAccountType\tBankNewAccount;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///请求查询转帐流水\r\nstruct CThostFtdcQryTransferSerialField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///银行编码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///期商签到通知\r\nstruct CThostFtdcNotifyFutureSignInField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///PIN密钥\r\n\tTThostFtdcPasswordKeyType\tPinKey;\r\n\t///MAC密钥\r\n\tTThostFtdcPasswordKeyType\tMacKey;\r\n};\r\n\r\n///期商签退通知\r\nstruct CThostFtdcNotifyFutureSignOutField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///交易核心向银期报盘发出密钥同步处理结果的通知\r\nstruct CThostFtdcNotifySyncKeyField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易核心给银期报盘的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///请求查询银期签约关系\r\nstruct CThostFtdcQryAccountregisterField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///银行编码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构编码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///客户开销户信息表\r\nstruct CThostFtdcAccountregisterField\r\n{\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDay;\r\n\t///银行编码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构编码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///期货公司编码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期货公司分支机构编码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///开销户类别\r\n\tTThostFtdcOpenOrDestroyType\tOpenOrDestroy;\r\n\t///签约日期\r\n\tTThostFtdcTradeDateType\tRegDate;\r\n\t///解约日期\r\n\tTThostFtdcTradeDateType\tOutDate;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///银期开户信息\r\nstruct CThostFtdcOpenAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///汇钞标志\r\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///银期销户信息\r\nstruct CThostFtdcCancelAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///汇钞标志\r\n\tTThostFtdcCashExchangeCodeType\tCashExchangeCode;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///银期变更银行账号信息\r\nstruct CThostFtdcChangeAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///新银行帐号\r\n\tTThostFtdcBankAccountType\tNewBankAccount;\r\n\t///新银行密码\r\n\tTThostFtdcPasswordType\tNewBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n};\r\n\r\n///二级代理操作员银期权限\r\nstruct CThostFtdcSecAgentACIDMapField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///资金账户\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///境外中介机构资金帐号\r\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\r\n};\r\n\r\n///二级代理操作员银期权限查询\r\nstruct CThostFtdcQrySecAgentACIDMapField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///资金账户\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///币种\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///灾备中心交易权限\r\nstruct CThostFtdcUserRightsAssignField\r\n{\r\n\t///应用单元代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n};\r\n\r\n///经济公司是否有在本标示的交易权限\r\nstruct CThostFtdcBrokerUserRightAssignField\r\n{\r\n\t///应用单元代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///能否交易\r\n\tTThostFtdcBoolType\tTradeable;\r\n};\r\n\r\n///灾备交易转换报文\r\nstruct CThostFtdcDRTransferField\r\n{\r\n\t///原交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tOrigDRIdentityID;\r\n\t///目标交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDestDRIdentityID;\r\n\t///原应用单元代码\r\n\tTThostFtdcBrokerIDType\tOrigBrokerID;\r\n\t///目标易用单元代码\r\n\tTThostFtdcBrokerIDType\tDestBrokerID;\r\n};\r\n\r\n///Fens用户信息\r\nstruct CThostFtdcFensUserInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///登录模式\r\n\tTThostFtdcLoginModeType\tLoginMode;\r\n};\r\n\r\n///当前银期所属交易中心\r\nstruct CThostFtdcCurrTransferIdentityField\r\n{\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tIdentityID;\r\n};\r\n\r\n///禁止登录用户\r\nstruct CThostFtdcLoginForbiddenUserField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询禁止登录用户\r\nstruct CThostFtdcQryLoginForbiddenUserField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///资金账户基本准备金\r\nstruct CThostFtdcTradingAccountReserveField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///基本准备金\r\n\tTThostFtdcMoneyType\tReserve;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///查询禁止登录IP\r\nstruct CThostFtdcQryLoginForbiddenIPField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询IP列表\r\nstruct CThostFtdcQryIPListField\r\n{\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询用户下单权限分配表\r\nstruct CThostFtdcQryUserRightsAssignField\r\n{\r\n\t///应用单元代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///银期预约开户确认请求\r\nstruct CThostFtdcReserveOpenAccountConfirmField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcLongIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///预约开户银行流水号\r\n\tTThostFtdcBankSerialType\tBankReserveOpenSeq;\r\n\t///预约开户日期\r\n\tTThostFtdcTradeDateType\tBookDate;\r\n\t///预约开户验证密码\r\n\tTThostFtdcPasswordType\tBookPsw;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///银期预约开户\r\nstruct CThostFtdcReserveOpenAccountField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcLongIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///性别\r\n\tTThostFtdcGenderType\tGender;\r\n\t///国家代码\r\n\tTThostFtdcCountryCodeType\tCountryCode;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///地址\r\n\tTThostFtdcAddressType\tAddress;\r\n\t///邮编\r\n\tTThostFtdcZipCodeType\tZipCode;\r\n\t///电话号码\r\n\tTThostFtdcTelephoneType\tTelephone;\r\n\t///手机\r\n\tTThostFtdcMobilePhoneType\tMobilePhone;\r\n\t///传真\r\n\tTThostFtdcFaxType\tFax;\r\n\t///电子邮件\r\n\tTThostFtdcEMailType\tEMail;\r\n\t///资金账户状态\r\n\tTThostFtdcMoneyAccountStatusType\tMoneyAccountStatus;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///预约开户状态\r\n\tTThostFtdcReserveOpenAccStasType\tReserveOpenAccStas;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n};\r\n\r\n///银行账户属性\r\nstruct CThostFtdcAccountPropertyField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///银行统一标识类型\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行账户\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行账户的开户人名称\r\n\tTThostFtdcInvestorFullNameType\tOpenName;\r\n\t///银行账户的开户行\r\n\tTThostFtdcOpenBankType\tOpenBank;\r\n\t///是否活跃\r\n\tTThostFtdcBoolType\tIsActive;\r\n\t///账户来源\r\n\tTThostFtdcAccountSourceTypeType\tAccountSourceType;\r\n\t///开户日期\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///注销日期\r\n\tTThostFtdcDateType\tCancelDate;\r\n\t///录入员代码\r\n\tTThostFtdcOperatorIDType\tOperatorID;\r\n\t///录入日期\r\n\tTThostFtdcDateType\tOperateDate;\r\n\t///录入时间\r\n\tTThostFtdcTimeType\tOperateTime;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n};\r\n\r\n///查询当前交易中心\r\nstruct CThostFtdcQryCurrDRIdentityField\r\n{\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n};\r\n\r\n///当前交易中心\r\nstruct CThostFtdcCurrDRIdentityField\r\n{\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n};\r\n\r\n///查询二级代理商资金校验模式\r\nstruct CThostFtdcQrySecAgentCheckModeField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///查询二级代理商信息\r\nstruct CThostFtdcQrySecAgentTradeInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///境外中介机构资金帐号\r\n\tTThostFtdcAccountIDType\tBrokerSecAgentID;\r\n};\r\n\r\n///用户发出获取安全安全登陆方法请求\r\nstruct CThostFtdcReqUserAuthMethodField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///用户发出获取安全安全登陆方法回复\r\nstruct CThostFtdcRspUserAuthMethodField\r\n{\r\n\t///当前可以用的认证模式\r\n\tTThostFtdcCurrentAuthMethodType\tUsableAuthMethod;\r\n};\r\n\r\n///用户发出获取安全安全登陆方法请求\r\nstruct CThostFtdcReqGenUserCaptchaField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///生成的图片验证码信息\r\nstruct CThostFtdcRspGenUserCaptchaField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///图片信息长度\r\n\tTThostFtdcCaptchaInfoLenType\tCaptchaInfoLen;\r\n\t///图片信息\r\n\tTThostFtdcCaptchaInfoType\tCaptchaInfo;\r\n};\r\n\r\n///用户发出获取安全安全登陆方法请求\r\nstruct CThostFtdcReqGenUserTextField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///短信验证码生成的回复\r\nstruct CThostFtdcRspGenUserTextField\r\n{\r\n\t///短信验证码序号\r\n\tTThostFtdcUserTextSeqType\tUserTextSeq;\r\n};\r\n\r\n///用户发出带图形验证码的登录请求请求\r\nstruct CThostFtdcReqUserLoginWithCaptchaField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///接口端产品信息\r\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\r\n\t///协议信息\r\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///登录备注\r\n\tTThostFtdcLoginRemarkType\tLoginRemark;\r\n\t///图形验证码的文字内容\r\n\tTThostFtdcPasswordType\tCaptcha;\r\n\t///终端IP端口\r\n\tTThostFtdcIPPortType\tClientIPPort;\r\n\t///终端IP地址\r\n\tTThostFtdcIPAddressType\tClientIPAddress;\r\n};\r\n\r\n///用户发出带短信验证码的登录请求请求\r\nstruct CThostFtdcReqUserLoginWithTextField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///接口端产品信息\r\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\r\n\t///协议信息\r\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///登录备注\r\n\tTThostFtdcLoginRemarkType\tLoginRemark;\r\n\t///短信验证码文字内容\r\n\tTThostFtdcPasswordType\tText;\r\n\t///终端IP端口\r\n\tTThostFtdcIPPortType\tClientIPPort;\r\n\t///终端IP地址\r\n\tTThostFtdcIPAddressType\tClientIPAddress;\r\n};\r\n\r\n///用户发出带动态验证码的登录请求请求\r\nstruct CThostFtdcReqUserLoginWithOTPField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///接口端产品信息\r\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\r\n\t///协议信息\r\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///登录备注\r\n\tTThostFtdcLoginRemarkType\tLoginRemark;\r\n\t///OTP密码\r\n\tTThostFtdcPasswordType\tOTPPassword;\r\n\t///终端IP端口\r\n\tTThostFtdcIPPortType\tClientIPPort;\r\n\t///终端IP地址\r\n\tTThostFtdcIPAddressType\tClientIPAddress;\r\n};\r\n\r\n///api握手请求\r\nstruct CThostFtdcReqApiHandshakeField\r\n{\r\n\t///api与front通信密钥版本号\r\n\tTThostFtdcCryptoKeyVersionType\tCryptoKeyVersion;\r\n};\r\n\r\n///front发给api的握手回复\r\nstruct CThostFtdcRspApiHandshakeField\r\n{\r\n\t///握手回复数据长度\r\n\tTThostFtdcHandshakeDataLenType\tFrontHandshakeDataLen;\r\n\t///握手回复数据\r\n\tTThostFtdcHandshakeDataType\tFrontHandshakeData;\r\n\t///API认证是否开启\r\n\tTThostFtdcBoolType\tIsApiAuthEnabled;\r\n};\r\n\r\n///api给front的验证key的请求\r\nstruct CThostFtdcReqVerifyApiKeyField\r\n{\r\n\t///握手回复数据长度\r\n\tTThostFtdcHandshakeDataLenType\tApiHandshakeDataLen;\r\n\t///握手回复数据\r\n\tTThostFtdcHandshakeDataType\tApiHandshakeData;\r\n};\r\n\r\n///操作员组织架构关系\r\nstruct CThostFtdcDepartmentUserField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///投资者范围\r\n\tTThostFtdcDepartmentRangeType\tInvestorRange;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///查询频率，每秒查询比数\r\nstruct CThostFtdcQueryFreqField\r\n{\r\n\t///查询频率\r\n\tTThostFtdcQueryFreqType\tQueryFreq;\r\n\t///FTD频率\r\n\tTThostFtdcQueryFreqType\tFTDPkgFreq;\r\n};\r\n\r\n///禁止认证IP\r\nstruct CThostFtdcAuthForbiddenIPField\r\n{\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询禁止认证IP\r\nstruct CThostFtdcQryAuthForbiddenIPField\r\n{\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///换汇可提冻结\r\nstruct CThostFtdcSyncDelaySwapFrozenField\r\n{\r\n\t///换汇流水号\r\n\tTThostFtdcDepositSeqNoType\tDelaySwapSeqNo;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///源币种\r\n\tTThostFtdcCurrencyIDType\tFromCurrencyID;\r\n\t///源剩余换汇额度(可提冻结)\r\n\tTThostFtdcMoneyType\tFromRemainSwap;\r\n\t///是否手工换汇\r\n\tTThostFtdcBoolType\tIsManualSwap;\r\n};\r\n\r\n///用户系统信息\r\nstruct CThostFtdcUserSystemInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///用户端系统内部信息长度\r\n\tTThostFtdcSystemInfoLenType\tClientSystemInfoLen;\r\n\t///用户端系统内部信息\r\n\tTThostFtdcClientSystemInfoType\tClientSystemInfo;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///终端IP端口\r\n\tTThostFtdcIPPortType\tClientIPPort;\r\n\t///登录成功时间\r\n\tTThostFtdcTimeType\tClientLoginTime;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tClientAppID;\r\n\t///用户公网IP\r\n\tTThostFtdcIPAddressType\tClientPublicIP;\r\n\t///客户登录备注2\r\n\tTThostFtdcClientLoginRemarkType\tClientLoginRemark;\r\n};\r\n\r\n///终端用户绑定信息\r\nstruct CThostFtdcAuthUserIDField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///校验类型\r\n\tTThostFtdcAuthTypeType\tAuthType;\r\n};\r\n\r\n///用户IP绑定信息\r\nstruct CThostFtdcAuthIPField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n\t///用户代码\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n};\r\n\r\n///查询分类合约\r\nstruct CThostFtdcQryClassifiedInstrumentField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///合约交易状态\r\n\tTThostFtdcTradingTypeType\tTradingType;\r\n\t///合约分类类型\r\n\tTThostFtdcClassTypeType\tClassType;\r\n};\r\n\r\n///查询组合优惠比例\r\nstruct CThostFtdcQryCombPromotionParamField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///组合优惠比例\r\nstruct CThostFtdcCombPromotionParamField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投机套保标志\r\n\tTThostFtdcCombHedgeFlagType\tCombHedgeFlag;\r\n\t///期权组合保证金比例\r\n\tTThostFtdcDiscountRatioType\tXparameter;\r\n};\r\n\r\n///国密用户登录请求\r\nstruct CThostFtdcReqUserLoginSMField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///用户端产品信息\r\n\tTThostFtdcProductInfoType\tUserProductInfo;\r\n\t///接口端产品信息\r\n\tTThostFtdcProductInfoType\tInterfaceProductInfo;\r\n\t///协议信息\r\n\tTThostFtdcProtocolInfoType\tProtocolInfo;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///动态密码\r\n\tTThostFtdcPasswordType\tOneTimePassword;\r\n\t///保留的无效字段\r\n\tTThostFtdcOldIPAddressType\treserve1;\r\n\t///登录备注\r\n\tTThostFtdcLoginRemarkType\tLoginRemark;\r\n\t///终端IP端口\r\n\tTThostFtdcIPPortType\tClientIPPort;\r\n\t///终端IP地址\r\n\tTThostFtdcIPAddressType\tClientIPAddress;\r\n\t///经纪公司名称\r\n\tTThostFtdcBrokerNameType\tBrokerName;\r\n\t///认证码\r\n\tTThostFtdcAuthCodeType\tAuthCode;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n\t///PIN码\r\n\tTThostFtdcPasswordType\tPIN;\r\n};\r\n\r\n///投资者风险结算持仓查询\r\nstruct CThostFtdcQryRiskSettleInvstPositionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///风险结算产品查询\r\nstruct CThostFtdcQryRiskSettleProductStatusField\r\n{\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n};\r\n\r\n///投资者风险结算持仓\r\nstruct CThostFtdcRiskSettleInvstPositionField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///持仓多空方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///持仓日期\r\n\tTThostFtdcPositionDateType\tPositionDate;\r\n\t///上日持仓\r\n\tTThostFtdcVolumeType\tYdPosition;\r\n\t///今日持仓\r\n\tTThostFtdcVolumeType\tPosition;\r\n\t///多头冻结\r\n\tTThostFtdcVolumeType\tLongFrozen;\r\n\t///空头冻结\r\n\tTThostFtdcVolumeType\tShortFrozen;\r\n\t///开仓冻结金额\r\n\tTThostFtdcMoneyType\tLongFrozenAmount;\r\n\t///开仓冻结金额\r\n\tTThostFtdcMoneyType\tShortFrozenAmount;\r\n\t///开仓量\r\n\tTThostFtdcVolumeType\tOpenVolume;\r\n\t///平仓量\r\n\tTThostFtdcVolumeType\tCloseVolume;\r\n\t///开仓金额\r\n\tTThostFtdcMoneyType\tOpenAmount;\r\n\t///平仓金额\r\n\tTThostFtdcMoneyType\tCloseAmount;\r\n\t///持仓成本\r\n\tTThostFtdcMoneyType\tPositionCost;\r\n\t///上次占用的保证金\r\n\tTThostFtdcMoneyType\tPreMargin;\r\n\t///占用的保证金\r\n\tTThostFtdcMoneyType\tUseMargin;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfit;\r\n\t///上次结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///本次结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///开仓成本\r\n\tTThostFtdcMoneyType\tOpenCost;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchangeMargin;\r\n\t///组合成交形成的持仓\r\n\tTThostFtdcVolumeType\tCombPosition;\r\n\t///组合多头冻结\r\n\tTThostFtdcVolumeType\tCombLongFrozen;\r\n\t///组合空头冻结\r\n\tTThostFtdcVolumeType\tCombShortFrozen;\r\n\t///逐日盯市平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByDate;\r\n\t///逐笔对冲平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\r\n\t///今日持仓\r\n\tTThostFtdcVolumeType\tTodayPosition;\r\n\t///保证金率\r\n\tTThostFtdcRatioType\tMarginRateByMoney;\r\n\t///保证金率(按手数)\r\n\tTThostFtdcRatioType\tMarginRateByVolume;\r\n\t///执行冻结\r\n\tTThostFtdcVolumeType\tStrikeFrozen;\r\n\t///执行冻结金额\r\n\tTThostFtdcMoneyType\tStrikeFrozenAmount;\r\n\t///放弃执行冻结\r\n\tTThostFtdcVolumeType\tAbandonFrozen;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///执行冻结的昨仓\r\n\tTThostFtdcVolumeType\tYdStrikeFrozen;\r\n\t///投资单元代码\r\n\tTThostFtdcInvestUnitIDType\tInvestUnitID;\r\n\t///持仓成本差值\r\n\tTThostFtdcMoneyType\tPositionCostOffset;\r\n\t///tas持仓手数\r\n\tTThostFtdcVolumeType\tTasPosition;\r\n\t///tas持仓成本\r\n\tTThostFtdcMoneyType\tTasPositionCost;\r\n};\r\n\r\n///风险品种\r\nstruct CThostFtdcRiskSettleProductStatusField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品编号\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///产品结算状态\r\n\tTThostFtdcProductStatusType\tProductStatus;\r\n};\r\n\r\n///风险结算追平信息\r\nstruct CThostFtdcSyncDeltaInfoField\r\n{\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n\t///追平状态\r\n\tTThostFtdcSyncDeltaStatusType\tSyncDeltaStatus;\r\n\t///追平描述\r\n\tTThostFtdcSyncDescriptionType\tSyncDescription;\r\n\t///是否只有资金追平\r\n\tTThostFtdcBoolType\tIsOnlyTrdDelta;\r\n};\r\n\r\n///风险结算追平产品信息\r\nstruct CThostFtdcSyncDeltaProductStatusField\r\n{\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///是否允许交易\r\n\tTThostFtdcProductStatusType\tProductStatus;\r\n};\r\n\r\n///风险结算追平持仓明细\r\nstruct CThostFtdcSyncDeltaInvstPosDtlField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///买卖\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///开仓日期\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///成交编号\r\n\tTThostFtdcTradeIDType\tTradeID;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///开仓价\r\n\tTThostFtdcPriceType\tOpenPrice;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///成交类型\r\n\tTThostFtdcTradeTypeType\tTradeType;\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///逐日盯市平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByDate;\r\n\t///逐笔对冲平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfitByTrade;\r\n\t///逐日盯市持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfitByDate;\r\n\t///逐笔对冲持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfitByTrade;\r\n\t///投资者保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///保证金率\r\n\tTThostFtdcRatioType\tMarginRateByMoney;\r\n\t///保证金率(按手数)\r\n\tTThostFtdcRatioType\tMarginRateByVolume;\r\n\t///昨结算价\r\n\tTThostFtdcPriceType\tLastSettlementPrice;\r\n\t///结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///平仓量\r\n\tTThostFtdcVolumeType\tCloseVolume;\r\n\t///平仓金额\r\n\tTThostFtdcMoneyType\tCloseAmount;\r\n\t///先开先平剩余数量\r\n\tTThostFtdcVolumeType\tTimeFirstVolume;\r\n\t///特殊持仓标志\r\n\tTThostFtdcSpecPosiTypeType\tSpecPosiType;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平组合持仓明细\r\nstruct CThostFtdcSyncDeltaInvstPosCombDtlField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///开仓日期\r\n\tTThostFtdcDateType\tOpenDate;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///组合编号\r\n\tTThostFtdcTradeIDType\tComTradeID;\r\n\t///撮合编号\r\n\tTThostFtdcTradeIDType\tTradeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///买卖\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///持仓量\r\n\tTThostFtdcVolumeType\tTotalAmt;\r\n\t///投资者保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///保证金率\r\n\tTThostFtdcRatioType\tMarginRateByMoney;\r\n\t///保证金率(按手数)\r\n\tTThostFtdcRatioType\tMarginRateByVolume;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///单腿乘数\r\n\tTThostFtdcLegMultipleType\tLegMultiple;\r\n\t///成交组号\r\n\tTThostFtdcTradeGroupIDType\tTradeGroupID;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平资金\r\nstruct CThostFtdcSyncDeltaTradingAccountField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///上次质押金额\r\n\tTThostFtdcMoneyType\tPreMortgage;\r\n\t///上次信用额度\r\n\tTThostFtdcMoneyType\tPreCredit;\r\n\t///上次存款额\r\n\tTThostFtdcMoneyType\tPreDeposit;\r\n\t///上次结算准备金\r\n\tTThostFtdcMoneyType\tPreBalance;\r\n\t///上次占用的保证金\r\n\tTThostFtdcMoneyType\tPreMargin;\r\n\t///利息基数\r\n\tTThostFtdcMoneyType\tInterestBase;\r\n\t///利息收入\r\n\tTThostFtdcMoneyType\tInterest;\r\n\t///入金金额\r\n\tTThostFtdcMoneyType\tDeposit;\r\n\t///出金金额\r\n\tTThostFtdcMoneyType\tWithdraw;\r\n\t///冻结的保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///当前保证金总额\r\n\tTThostFtdcMoneyType\tCurrMargin;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///平仓盈亏\r\n\tTThostFtdcMoneyType\tCloseProfit;\r\n\t///持仓盈亏\r\n\tTThostFtdcMoneyType\tPositionProfit;\r\n\t///期货结算准备金\r\n\tTThostFtdcMoneyType\tBalance;\r\n\t///可用资金\r\n\tTThostFtdcMoneyType\tAvailable;\r\n\t///可取资金\r\n\tTThostFtdcMoneyType\tWithdrawQuota;\r\n\t///基本准备金\r\n\tTThostFtdcMoneyType\tReserve;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///信用额度\r\n\tTThostFtdcMoneyType\tCredit;\r\n\t///质押金额\r\n\tTThostFtdcMoneyType\tMortgage;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchangeMargin;\r\n\t///投资者交割保证金\r\n\tTThostFtdcMoneyType\tDeliveryMargin;\r\n\t///交易所交割保证金\r\n\tTThostFtdcMoneyType\tExchangeDeliveryMargin;\r\n\t///保底期货结算准备金\r\n\tTThostFtdcMoneyType\tReserveBalance;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///上次货币质入金额\r\n\tTThostFtdcMoneyType\tPreFundMortgageIn;\r\n\t///上次货币质出金额\r\n\tTThostFtdcMoneyType\tPreFundMortgageOut;\r\n\t///货币质入金额\r\n\tTThostFtdcMoneyType\tFundMortgageIn;\r\n\t///货币质出金额\r\n\tTThostFtdcMoneyType\tFundMortgageOut;\r\n\t///货币质押余额\r\n\tTThostFtdcMoneyType\tFundMortgageAvailable;\r\n\t///可质押货币金额\r\n\tTThostFtdcMoneyType\tMortgageableFund;\r\n\t///特殊产品占用保证金\r\n\tTThostFtdcMoneyType\tSpecProductMargin;\r\n\t///特殊产品冻结保证金\r\n\tTThostFtdcMoneyType\tSpecProductFrozenMargin;\r\n\t///特殊产品手续费\r\n\tTThostFtdcMoneyType\tSpecProductCommission;\r\n\t///特殊产品冻结手续费\r\n\tTThostFtdcMoneyType\tSpecProductFrozenCommission;\r\n\t///特殊产品持仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductPositionProfit;\r\n\t///特殊产品平仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductCloseProfit;\r\n\t///根据持仓盈亏算法计算的特殊产品持仓盈亏\r\n\tTThostFtdcMoneyType\tSpecProductPositionProfitByAlg;\r\n\t///特殊产品交易所保证金\r\n\tTThostFtdcMoneyType\tSpecProductExchangeMargin;\r\n\t///延时换汇冻结金额\r\n\tTThostFtdcMoneyType\tFrozenSwap;\r\n\t///剩余换汇额度\r\n\tTThostFtdcMoneyType\tRemainSwap;\r\n\t///期权市值\r\n\tTThostFtdcMoneyType\tOptionValue;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///投资者风险结算总保证金\r\nstruct CThostFtdcSyncDeltaInitInvstMarginField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///追平前总风险保证金\r\n\tTThostFtdcMoneyType\tLastRiskTotalInvstMargin;\r\n\t///追平前交易所总风险保证金\r\n\tTThostFtdcMoneyType\tLastRiskTotalExchMargin;\r\n\t///本次追平品种总保证金\r\n\tTThostFtdcMoneyType\tThisSyncInvstMargin;\r\n\t///本次追平品种交易所总保证金\r\n\tTThostFtdcMoneyType\tThisSyncExchMargin;\r\n\t///本次未追平品种总保证金\r\n\tTThostFtdcMoneyType\tRemainRiskInvstMargin;\r\n\t///本次未追平品种交易所总保证金\r\n\tTThostFtdcMoneyType\tRemainRiskExchMargin;\r\n\t///追平前总特殊产品风险保证金\r\n\tTThostFtdcMoneyType\tLastRiskSpecTotalInvstMargin;\r\n\t///追平前总特殊产品交易所风险保证金\r\n\tTThostFtdcMoneyType\tLastRiskSpecTotalExchMargin;\r\n\t///本次追平品种特殊产品总保证金\r\n\tTThostFtdcMoneyType\tThisSyncSpecInvstMargin;\r\n\t///本次追平品种特殊产品交易所总保证金\r\n\tTThostFtdcMoneyType\tThisSyncSpecExchMargin;\r\n\t///本次未追平品种特殊产品总保证金\r\n\tTThostFtdcMoneyType\tRemainRiskSpecInvstMargin;\r\n\t///本次未追平品种特殊产品交易所总保证金\r\n\tTThostFtdcMoneyType\tRemainRiskSpecExchMargin;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平组合优先级\r\nstruct CThostFtdcSyncDeltaDceCombInstrumentField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///成交组号\r\n\tTThostFtdcTradeGroupIDType\tTradeGroupID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tCombHedgeFlag;\r\n\t///组合类型\r\n\tTThostFtdcDceCombinationTypeType\tCombinationType;\r\n\t///买卖\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///期权组合保证金比例\r\n\tTThostFtdcDiscountRatioType\tXparameter;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平投资者期货保证金率\r\nstruct CThostFtdcSyncDeltaInvstMarginRateField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///是否相对交易所收取\r\n\tTThostFtdcBoolType\tIsRelative;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平交易所期货保证金率\r\nstruct CThostFtdcSyncDeltaExchMarginRateField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平中金现货期权交易所保证金率\r\nstruct CThostFtdcSyncDeltaOptExchMarginField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投机空头保证金调整系数\r\n\tTThostFtdcRatioType\tSShortMarginRatioByMoney;\r\n\t///投机空头保证金调整系数\r\n\tTThostFtdcMoneyType\tSShortMarginRatioByVolume;\r\n\t///保值空头保证金调整系数\r\n\tTThostFtdcRatioType\tHShortMarginRatioByMoney;\r\n\t///保值空头保证金调整系数\r\n\tTThostFtdcMoneyType\tHShortMarginRatioByVolume;\r\n\t///套利空头保证金调整系数\r\n\tTThostFtdcRatioType\tAShortMarginRatioByMoney;\r\n\t///套利空头保证金调整系数\r\n\tTThostFtdcMoneyType\tAShortMarginRatioByVolume;\r\n\t///做市商空头保证金调整系数\r\n\tTThostFtdcRatioType\tMShortMarginRatioByMoney;\r\n\t///做市商空头保证金调整系数\r\n\tTThostFtdcMoneyType\tMShortMarginRatioByVolume;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平中金现货期权投资者保证金率\r\nstruct CThostFtdcSyncDeltaOptInvstMarginField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机空头保证金调整系数\r\n\tTThostFtdcRatioType\tSShortMarginRatioByMoney;\r\n\t///投机空头保证金调整系数\r\n\tTThostFtdcMoneyType\tSShortMarginRatioByVolume;\r\n\t///保值空头保证金调整系数\r\n\tTThostFtdcRatioType\tHShortMarginRatioByMoney;\r\n\t///保值空头保证金调整系数\r\n\tTThostFtdcMoneyType\tHShortMarginRatioByVolume;\r\n\t///套利空头保证金调整系数\r\n\tTThostFtdcRatioType\tAShortMarginRatioByMoney;\r\n\t///套利空头保证金调整系数\r\n\tTThostFtdcMoneyType\tAShortMarginRatioByVolume;\r\n\t///是否跟随交易所收取\r\n\tTThostFtdcBoolType\tIsRelative;\r\n\t///做市商空头保证金调整系数\r\n\tTThostFtdcRatioType\tMShortMarginRatioByMoney;\r\n\t///做市商空头保证金调整系数\r\n\tTThostFtdcMoneyType\tMShortMarginRatioByVolume;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平期权标的调整保证金率\r\nstruct CThostFtdcSyncDeltaInvstMarginRateULField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///多头保证金率\r\n\tTThostFtdcRatioType\tLongMarginRatioByMoney;\r\n\t///多头保证金费\r\n\tTThostFtdcMoneyType\tLongMarginRatioByVolume;\r\n\t///空头保证金率\r\n\tTThostFtdcRatioType\tShortMarginRatioByMoney;\r\n\t///空头保证金费\r\n\tTThostFtdcMoneyType\tShortMarginRatioByVolume;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平期权手续费率\r\nstruct CThostFtdcSyncDeltaOptInvstCommRateField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///开仓手续费率\r\n\tTThostFtdcRatioType\tOpenRatioByMoney;\r\n\t///开仓手续费\r\n\tTThostFtdcRatioType\tOpenRatioByVolume;\r\n\t///平仓手续费率\r\n\tTThostFtdcRatioType\tCloseRatioByMoney;\r\n\t///平仓手续费\r\n\tTThostFtdcRatioType\tCloseRatioByVolume;\r\n\t///平今手续费率\r\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\r\n\t///平今手续费\r\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\r\n\t///执行手续费率\r\n\tTThostFtdcRatioType\tStrikeRatioByMoney;\r\n\t///执行手续费\r\n\tTThostFtdcRatioType\tStrikeRatioByVolume;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平期货手续费率\r\nstruct CThostFtdcSyncDeltaInvstCommRateField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///开仓手续费率\r\n\tTThostFtdcRatioType\tOpenRatioByMoney;\r\n\t///开仓手续费\r\n\tTThostFtdcRatioType\tOpenRatioByVolume;\r\n\t///平仓手续费率\r\n\tTThostFtdcRatioType\tCloseRatioByMoney;\r\n\t///平仓手续费\r\n\tTThostFtdcRatioType\tCloseRatioByVolume;\r\n\t///平今手续费率\r\n\tTThostFtdcRatioType\tCloseTodayRatioByMoney;\r\n\t///平今手续费\r\n\tTThostFtdcRatioType\tCloseTodayRatioByVolume;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平交叉汇率\r\nstruct CThostFtdcSyncDeltaProductExchRateField\r\n{\r\n\t///产品代码\r\n\tTThostFtdcInstrumentIDType\tProductID;\r\n\t///报价币种类型\r\n\tTThostFtdcCurrencyIDType\tQuoteCurrencyID;\r\n\t///汇率\r\n\tTThostFtdcExchangeRateType\tExchangeRate;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平行情\r\nstruct CThostFtdcSyncDeltaDepthMarketDataField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约在交易所的代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///最新价\r\n\tTThostFtdcPriceType\tLastPrice;\r\n\t///上次结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///昨收盘\r\n\tTThostFtdcPriceType\tPreClosePrice;\r\n\t///昨持仓量\r\n\tTThostFtdcLargeVolumeType\tPreOpenInterest;\r\n\t///今开盘\r\n\tTThostFtdcPriceType\tOpenPrice;\r\n\t///最高价\r\n\tTThostFtdcPriceType\tHighestPrice;\r\n\t///最低价\r\n\tTThostFtdcPriceType\tLowestPrice;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///成交金额\r\n\tTThostFtdcMoneyType\tTurnover;\r\n\t///持仓量\r\n\tTThostFtdcLargeVolumeType\tOpenInterest;\r\n\t///今收盘\r\n\tTThostFtdcPriceType\tClosePrice;\r\n\t///本次结算价\r\n\tTThostFtdcPriceType\tSettlementPrice;\r\n\t///涨停板价\r\n\tTThostFtdcPriceType\tUpperLimitPrice;\r\n\t///跌停板价\r\n\tTThostFtdcPriceType\tLowerLimitPrice;\r\n\t///昨虚实度\r\n\tTThostFtdcRatioType\tPreDelta;\r\n\t///今虚实度\r\n\tTThostFtdcRatioType\tCurrDelta;\r\n\t///最后修改时间\r\n\tTThostFtdcTimeType\tUpdateTime;\r\n\t///最后修改毫秒\r\n\tTThostFtdcMillisecType\tUpdateMillisec;\r\n\t///申买价一\r\n\tTThostFtdcPriceType\tBidPrice1;\r\n\t///申买量一\r\n\tTThostFtdcVolumeType\tBidVolume1;\r\n\t///申卖价一\r\n\tTThostFtdcPriceType\tAskPrice1;\r\n\t///申卖量一\r\n\tTThostFtdcVolumeType\tAskVolume1;\r\n\t///申买价二\r\n\tTThostFtdcPriceType\tBidPrice2;\r\n\t///申买量二\r\n\tTThostFtdcVolumeType\tBidVolume2;\r\n\t///申卖价二\r\n\tTThostFtdcPriceType\tAskPrice2;\r\n\t///申卖量二\r\n\tTThostFtdcVolumeType\tAskVolume2;\r\n\t///申买价三\r\n\tTThostFtdcPriceType\tBidPrice3;\r\n\t///申买量三\r\n\tTThostFtdcVolumeType\tBidVolume3;\r\n\t///申卖价三\r\n\tTThostFtdcPriceType\tAskPrice3;\r\n\t///申卖量三\r\n\tTThostFtdcVolumeType\tAskVolume3;\r\n\t///申买价四\r\n\tTThostFtdcPriceType\tBidPrice4;\r\n\t///申买量四\r\n\tTThostFtdcVolumeType\tBidVolume4;\r\n\t///申卖价四\r\n\tTThostFtdcPriceType\tAskPrice4;\r\n\t///申卖量四\r\n\tTThostFtdcVolumeType\tAskVolume4;\r\n\t///申买价五\r\n\tTThostFtdcPriceType\tBidPrice5;\r\n\t///申买量五\r\n\tTThostFtdcVolumeType\tBidVolume5;\r\n\t///申卖价五\r\n\tTThostFtdcPriceType\tAskPrice5;\r\n\t///申卖量五\r\n\tTThostFtdcVolumeType\tAskVolume5;\r\n\t///当日均价\r\n\tTThostFtdcPriceType\tAveragePrice;\r\n\t///业务日期\r\n\tTThostFtdcDateType\tActionDay;\r\n\t///上带价\r\n\tTThostFtdcPriceType\tBandingUpperPrice;\r\n\t///下带价\r\n\tTThostFtdcPriceType\tBandingLowerPrice;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平现货指数\r\nstruct CThostFtdcSyncDeltaIndexPriceField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///指数现货收盘价\r\n\tTThostFtdcPriceType\tClosePrice;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平仓单折抵\r\nstruct CThostFtdcSyncDeltaEWarrantOffsetField\r\n{\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///SPBM期货合约保证金参数\r\nstruct CThostFtdcSPBMFutureParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///期货合约因子\r\n\tTThostFtdcVolumeMultipleType\tCvf;\r\n\t///阶段标识\r\n\tTThostFtdcTimeRangeType\tTimeRange;\r\n\t///品种保证金标准\r\n\tTThostFtdcRatioType\tMarginRate;\r\n\t///期货合约内部对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tLockRateX;\r\n\t///提高保证金标准\r\n\tTThostFtdcRatioType\tAddOnRate;\r\n\t///昨结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///期货合约内部对锁仓附加费率折扣比例\r\n\tTThostFtdcRatioType\tAddOnLockRateX2;\r\n};\r\n\r\n///SPBM期权合约保证金参数\r\nstruct CThostFtdcSPBMOptionParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///期权合约因子\r\n\tTThostFtdcVolumeMultipleType\tCvf;\r\n\t///期权冲抵价格\r\n\tTThostFtdcPriceType\tDownPrice;\r\n\t///Delta值\r\n\tTThostFtdcDeltaType\tDelta;\r\n\t///卖方期权风险转换最低值\r\n\tTThostFtdcDeltaType\tSlimiDelta;\r\n\t///昨结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n};\r\n\r\n///SPBM品种内对锁仓折扣参数\r\nstruct CThostFtdcSPBMIntraParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///品种内合约间对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tIntraRateY;\r\n\t///品种内合约间对锁仓附加费率折扣比例\r\n\tTThostFtdcRatioType\tAddOnIntraRateY2;\r\n};\r\n\r\n///SPBM跨品种抵扣参数\r\nstruct CThostFtdcSPBMInterParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///优先级\r\n\tTThostFtdcSpreadIdType\tSpreadId;\r\n\t///品种间对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tInterRateZ;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n};\r\n\r\n///同步SPBM参数结束\r\nstruct CThostFtdcSyncSPBMParameterEndField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n};\r\n\r\n///SPBM期货合约保证金参数查询\r\nstruct CThostFtdcQrySPBMFutureParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n};\r\n\r\n///SPBM期权合约保证金参数查询\r\nstruct CThostFtdcQrySPBMOptionParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n};\r\n\r\n///SPBM品种内对锁仓折扣参数查询\r\nstruct CThostFtdcQrySPBMIntraParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n};\r\n\r\n///SPBM跨品种抵扣参数查询\r\nstruct CThostFtdcQrySPBMInterParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n};\r\n\r\n///组合保证金套餐\r\nstruct CThostFtdcSPBMPortfDefinitionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///组合保证金套餐代码\r\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///是否启用SPBM\r\n\tTThostFtdcBoolType\tIsSPBM;\r\n};\r\n\r\n///投资者套餐选择\r\nstruct CThostFtdcSPBMInvestorPortfDefField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///组合保证金套餐代码\r\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\r\n};\r\n\r\n///投资者新型组合保证金系数\r\nstruct CThostFtdcInvestorPortfMarginRatioField\r\n{\r\n\t///投资者范围\r\n\tTThostFtdcInvestorRangeType\tInvestorRange;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///会员对投资者收取的保证金和交易所对投资者收取的保证金的比例\r\n\tTThostFtdcRatioType\tMarginRatio;\r\n\t///产品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n};\r\n\r\n///组合保证金套餐查询\r\nstruct CThostFtdcQrySPBMPortfDefinitionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///组合保证金套餐代码\r\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n};\r\n\r\n///投资者套餐选择查询\r\nstruct CThostFtdcQrySPBMInvestorPortfDefField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///投资者新型组合保证金系数查询\r\nstruct CThostFtdcQryInvestorPortfMarginRatioField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n};\r\n\r\n///投资者产品SPBM明细\r\nstruct CThostFtdcInvestorProdSPBMDetailField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///合约内对锁保证金\r\n\tTThostFtdcMoneyType\tIntraInstrMargin;\r\n\t///买归集保证金\r\n\tTThostFtdcMoneyType\tBCollectingMargin;\r\n\t///卖归集保证金\r\n\tTThostFtdcMoneyType\tSCollectingMargin;\r\n\t///品种内合约间对锁保证金\r\n\tTThostFtdcMoneyType\tIntraProdMargin;\r\n\t///净保证金\r\n\tTThostFtdcMoneyType\tNetMargin;\r\n\t///产品间对锁保证金\r\n\tTThostFtdcMoneyType\tInterProdMargin;\r\n\t///裸保证金\r\n\tTThostFtdcMoneyType\tSingleMargin;\r\n\t///附加保证金\r\n\tTThostFtdcMoneyType\tAddOnMargin;\r\n\t///交割月保证金\r\n\tTThostFtdcMoneyType\tDeliveryMargin;\r\n\t///看涨期权最低风险\r\n\tTThostFtdcMoneyType\tCallOptionMinRisk;\r\n\t///看跌期权最低风险\r\n\tTThostFtdcMoneyType\tPutOptionMinRisk;\r\n\t///卖方期权最低风险\r\n\tTThostFtdcMoneyType\tOptionMinRisk;\r\n\t///买方期权冲抵价值\r\n\tTThostFtdcMoneyType\tOptionValueOffset;\r\n\t///卖方期权权利金\r\n\tTThostFtdcMoneyType\tOptionRoyalty;\r\n\t///价值冲抵\r\n\tTThostFtdcMoneyType\tRealOptionValueOffset;\r\n\t///保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n};\r\n\r\n///投资者产品SPBM明细查询\r\nstruct CThostFtdcQryInvestorProdSPBMDetailField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n};\r\n\r\n///组保交易参数设置\r\nstruct CThostFtdcPortfTradeParamSettingField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///新型组保算法\r\n\tTThostFtdcPortfolioType\tPortfolio;\r\n\t///撤单是否验资\r\n\tTThostFtdcBoolType\tIsActionVerify;\r\n\t///平仓是否验资\r\n\tTThostFtdcBoolType\tIsCloseVerify;\r\n};\r\n\r\n///投资者交易权限设置\r\nstruct CThostFtdcInvestorTradingRightField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///交易权限\r\n\tTThostFtdcInvstTradingRightType\tInvstTradingRight;\r\n};\r\n\r\n///质押配比参数\r\nstruct CThostFtdcMortgageParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///质押配比系数\r\n\tTThostFtdcRatioType\tMortgageBalance;\r\n\t///开仓是否验证质押配比\r\n\tTThostFtdcBoolType\tCheckMortgageRatio;\r\n};\r\n\r\n///可提控制参数\r\nstruct CThostFtdcWithDrawParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///参数代码\r\n\tTThostFtdcWithDrawParamIDType\tWithDrawParamID;\r\n\t///参数代码值\r\n\tTThostFtdcWithDrawParamValueType\tWithDrawParamValue;\r\n};\r\n\r\n///Thost终端用户功能权限\r\nstruct CThostFtdcThostUserFunctionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///Thost终端功能代码\r\n\tTThostFtdcThostFunctionCodeType\tThostFunctionCode;\r\n};\r\n\r\n///Thost终端用户功能权限查询\r\nstruct CThostFtdcQryThostUserFunctionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///SPBM附加跨品种抵扣参数\r\nstruct CThostFtdcSPBMAddOnInterParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///优先级\r\n\tTThostFtdcSpreadIdType\tSpreadId;\r\n\t///品种间对锁仓附加费率折扣比例\r\n\tTThostFtdcRatioType\tAddOnInterRateZ2;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n};\r\n\r\n///SPBM附加跨品种抵扣参数查询\r\nstruct CThostFtdcQrySPBMAddOnInterParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n};\r\n\r\n///投资者商品组SPMM记录查询\r\nstruct CThostFtdcQryInvestorCommoditySPMMMarginField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///商品组代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityID;\r\n};\r\n\r\n///投资者商品群SPMM记录查询\r\nstruct CThostFtdcQryInvestorCommodityGroupSPMMMarginField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///商品群代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\r\n};\r\n\r\n///SPMM合约参数查询\r\nstruct CThostFtdcQrySPMMInstParamField\r\n{\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///SPMM产品参数查询\r\nstruct CThostFtdcQrySPMMProductParamField\r\n{\r\n\t///产品代码\r\n\tTThostFtdcSPMMProductIDType\tProductID;\r\n};\r\n\r\n///投资者商品组SPMM记录\r\nstruct CThostFtdcInvestorCommoditySPMMMarginField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///商品组代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityID;\r\n\t///优惠仓位应收保证金\r\n\tTThostFtdcMoneyType\tMarginBeforeDiscount;\r\n\t///不优惠仓位应收保证金\r\n\tTThostFtdcMoneyType\tMarginNoDiscount;\r\n\t///多头实仓风险\r\n\tTThostFtdcMoneyType\tLongPosRisk;\r\n\t///多头开仓冻结风险\r\n\tTThostFtdcMoneyType\tLongOpenFrozenRisk;\r\n\t///多头被平冻结风险\r\n\tTThostFtdcMoneyType\tLongCloseFrozenRisk;\r\n\t///空头实仓风险\r\n\tTThostFtdcMoneyType\tShortPosRisk;\r\n\t///空头开仓冻结风险\r\n\tTThostFtdcMoneyType\tShortOpenFrozenRisk;\r\n\t///空头被平冻结风险\r\n\tTThostFtdcMoneyType\tShortCloseFrozenRisk;\r\n\t///SPMM品种内跨期优惠系数\r\n\tTThostFtdcSPMMDiscountRatioType\tIntraCommodityRate;\r\n\t///SPMM期权优惠系数\r\n\tTThostFtdcSPMMDiscountRatioType\tOptionDiscountRate;\r\n\t///实仓对冲优惠金额\r\n\tTThostFtdcMoneyType\tPosDiscount;\r\n\t///开仓报单对冲优惠金额\r\n\tTThostFtdcMoneyType\tOpenFrozenDiscount;\r\n\t///品种风险净头\r\n\tTThostFtdcMoneyType\tNetRisk;\r\n\t///平仓冻结保证金\r\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///行权冻结资金\r\n\tTThostFtdcMoneyType\tStrikeFrozenMargin;\r\n};\r\n\r\n///投资者商品群SPMM记录\r\nstruct CThostFtdcInvestorCommodityGroupSPMMMarginField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///商品群代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\r\n\t///优惠仓位应收保证金\r\n\tTThostFtdcMoneyType\tMarginBeforeDiscount;\r\n\t///不优惠仓位应收保证金\r\n\tTThostFtdcMoneyType\tMarginNoDiscount;\r\n\t///多头风险\r\n\tTThostFtdcMoneyType\tLongRisk;\r\n\t///空头风险\r\n\tTThostFtdcMoneyType\tShortRisk;\r\n\t///商品群平仓冻结保证金\r\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\r\n\t///SPMM跨品种优惠系数\r\n\tTThostFtdcSPMMDiscountRatioType\tInterCommodityRate;\r\n\t///商品群最小保证金比例\r\n\tTThostFtdcSPMMDiscountRatioType\tMiniMarginRatio;\r\n\t///投资者保证金和交易所保证金的比例\r\n\tTThostFtdcRatioType\tAdjustRatio;\r\n\t///SPMM品种内优惠汇总\r\n\tTThostFtdcMoneyType\tIntraCommodityDiscount;\r\n\t///SPMM跨品种优惠\r\n\tTThostFtdcMoneyType\tInterCommodityDiscount;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///投资者保证金\r\n\tTThostFtdcMoneyType\tInvestorMargin;\r\n\t///冻结的手续费\r\n\tTThostFtdcMoneyType\tFrozenCommission;\r\n\t///手续费\r\n\tTThostFtdcMoneyType\tCommission;\r\n\t///冻结的资金\r\n\tTThostFtdcMoneyType\tFrozenCash;\r\n\t///资金差额\r\n\tTThostFtdcMoneyType\tCashIn;\r\n\t///行权冻结资金\r\n\tTThostFtdcMoneyType\tStrikeFrozenMargin;\r\n};\r\n\r\n///SPMM合约参数\r\nstruct CThostFtdcSPMMInstParamField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///SPMM合约保证金算法\r\n\tTThostFtdcInstMarginCalIDType\tInstMarginCalID;\r\n\t///商品组代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityID;\r\n\t///商品群代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\r\n};\r\n\r\n///SPMM产品参数\r\nstruct CThostFtdcSPMMProductParamField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcSPMMProductIDType\tProductID;\r\n\t///商品组代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityID;\r\n\t///商品群代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\r\n};\r\n\r\n///席位与交易中心对应关系维护查询\r\nstruct CThostFtdcQryTraderAssignField\r\n{\r\n\t///交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n};\r\n\r\n///席位与交易中心对应关系\r\nstruct CThostFtdcTraderAssignField\r\n{\r\n\t///应用单元代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n};\r\n\r\n///投资者申报费阶梯收取设置\r\nstruct CThostFtdcInvestorInfoCntSettingField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///商品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///是否收取申报费\r\n\tTThostFtdcBoolType\tIsCalInfoComm;\r\n\t///是否限制信息量\r\n\tTThostFtdcBoolType\tIsLimitInfoMax;\r\n\t///信息量限制笔数\r\n\tTThostFtdcVolumeType\tInfoMaxLimit;\r\n};\r\n\r\n///RCAMS产品组合信息\r\nstruct CThostFtdcRCAMSCombProductInfoField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///商品组代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n};\r\n\r\n///RCAMS同合约风险对冲参数\r\nstruct CThostFtdcRCAMSInstrParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///同合约风险对冲比率\r\n\tTThostFtdcHedgeRateType\tHedgeRate;\r\n};\r\n\r\n///RCAMS品种内风险对冲参数\r\nstruct CThostFtdcRCAMSIntraParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///品种内对冲比率\r\n\tTThostFtdcHedgeRateType\tHedgeRate;\r\n};\r\n\r\n///RCAMS跨品种风险折抵参数\r\nstruct CThostFtdcRCAMSInterParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n\t///优先级\r\n\tTThostFtdcRCAMSPriorityType\tPriority;\r\n\t///折抵率\r\n\tTThostFtdcHedgeRateType\tCreditRate;\r\n\t///产品组合代码1\r\n\tTThostFtdcProductIDType\tCombProduct1;\r\n\t///产品组合代码2\r\n\tTThostFtdcProductIDType\tCombProduct2;\r\n};\r\n\r\n///RCAMS空头期权风险调整参数\r\nstruct CThostFtdcRCAMSShortOptAdjustParamField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///投套标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///空头期权风险调整标准\r\n\tTThostFtdcAdjustValueType\tAdjustValue;\r\n};\r\n\r\n///RCAMS策略组合持仓\r\nstruct CThostFtdcRCAMSInvestorCombPositionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投套标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///持仓多空方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///交易所组合合约代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///持仓量\r\n\tTThostFtdcVolumeType\tTotalAmt;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///投资者保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n};\r\n\r\n///投资者品种RCAMS保证金\r\nstruct CThostFtdcInvestorProdRCAMSMarginField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///投套标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n\t///品种组合前风险\r\n\tTThostFtdcMoneyType\tRiskBeforeDiscount;\r\n\t///同合约对冲风险\r\n\tTThostFtdcMoneyType\tIntraInstrRisk;\r\n\t///品种买持仓风险\r\n\tTThostFtdcMoneyType\tBPosRisk;\r\n\t///品种卖持仓风险\r\n\tTThostFtdcMoneyType\tSPosRisk;\r\n\t///品种内对冲风险\r\n\tTThostFtdcMoneyType\tIntraProdRisk;\r\n\t///品种净持仓风险\r\n\tTThostFtdcMoneyType\tNetRisk;\r\n\t///品种间对冲风险\r\n\tTThostFtdcMoneyType\tInterProdRisk;\r\n\t///空头期权风险调整\r\n\tTThostFtdcMoneyType\tShortOptRiskAdj;\r\n\t///空头期权权利金\r\n\tTThostFtdcMoneyType\tOptionRoyalty;\r\n\t///大边组合平仓冻结保证金\r\n\tTThostFtdcMoneyType\tMMSACloseFrozenMargin;\r\n\t///策略组合平仓/行权冻结保证金\r\n\tTThostFtdcMoneyType\tCloseCombFrozenMargin;\r\n\t///平仓/行权冻结保证金\r\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\r\n\t///大边组合开仓冻结保证金\r\n\tTThostFtdcMoneyType\tMMSAOpenFrozenMargin;\r\n\t///交割月期货开仓冻结保证金\r\n\tTThostFtdcMoneyType\tDeliveryOpenFrozenMargin;\r\n\t///开仓冻结保证金\r\n\tTThostFtdcMoneyType\tOpenFrozenMargin;\r\n\t///投资者冻结保证金\r\n\tTThostFtdcMoneyType\tUseFrozenMargin;\r\n\t///大边组合交易所持仓保证金\r\n\tTThostFtdcMoneyType\tMMSAExchMargin;\r\n\t///交割月期货交易所持仓保证金\r\n\tTThostFtdcMoneyType\tDeliveryExchMargin;\r\n\t///策略组合交易所保证金\r\n\tTThostFtdcMoneyType\tCombExchMargin;\r\n\t///交易所持仓保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///投资者持仓保证金\r\n\tTThostFtdcMoneyType\tUseMargin;\r\n};\r\n\r\n///RCAMS产品组合信息查询\r\nstruct CThostFtdcQryRCAMSCombProductInfoField\r\n{\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///商品组代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n};\r\n\r\n///RCAMS同合约风险对冲参数查询\r\nstruct CThostFtdcQryRCAMSInstrParameterField\r\n{\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n};\r\n\r\n///RCAMS品种内风险对冲参数查询\r\nstruct CThostFtdcQryRCAMSIntraParameterField\r\n{\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n};\r\n\r\n///RCAMS跨品种风险折抵参数查询\r\nstruct CThostFtdcQryRCAMSInterParameterField\r\n{\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n\t///产品组合代码1\r\n\tTThostFtdcProductIDType\tCombProduct1;\r\n\t///产品组合代码2\r\n\tTThostFtdcProductIDType\tCombProduct2;\r\n};\r\n\r\n///RCAMS空头期权风险调整参数查询\r\nstruct CThostFtdcQryRCAMSShortOptAdjustParamField\r\n{\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n};\r\n\r\n///RCAMS策略组合持仓查询\r\nstruct CThostFtdcQryRCAMSInvestorCombPositionField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n};\r\n\r\n///投资者品种RCAMS保证金查询\r\nstruct CThostFtdcQryInvestorProdRCAMSMarginField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n};\r\n\r\n///RULE合约保证金参数\r\nstruct CThostFtdcRULEInstrParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约类型\r\n\tTThostFtdcInstrumentClassType\tInstrumentClass;\r\n\t///标准合约\r\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\r\n\t///投机买折算系数\r\n\tTThostFtdcRatioType\tBSpecRatio;\r\n\t///投机卖折算系数\r\n\tTThostFtdcRatioType\tSSpecRatio;\r\n\t///套保买折算系数\r\n\tTThostFtdcRatioType\tBHedgeRatio;\r\n\t///套保卖折算系数\r\n\tTThostFtdcRatioType\tSHedgeRatio;\r\n\t///买附加风险保证金\r\n\tTThostFtdcMoneyType\tBAddOnMargin;\r\n\t///卖附加风险保证金\r\n\tTThostFtdcMoneyType\tSAddOnMargin;\r\n\t///商品群号\r\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\r\n};\r\n\r\n///RULE品种内对锁仓折扣参数\r\nstruct CThostFtdcRULEIntraParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///标准合约\r\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\r\n\t///标准合约保证金\r\n\tTThostFtdcMoneyType\tStdInstrMargin;\r\n\t///一般月份合约组合保证金系数\r\n\tTThostFtdcRatioType\tUsualIntraRate;\r\n\t///临近交割合约组合保证金系数\r\n\tTThostFtdcRatioType\tDeliveryIntraRate;\r\n};\r\n\r\n///RULE跨品种抵扣参数\r\nstruct CThostFtdcRULEInterParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///优先级\r\n\tTThostFtdcSpreadIdType\tSpreadId;\r\n\t///品种间对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tInterRate;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n\t///腿1比例系数\r\n\tTThostFtdcCommonIntType\tLeg1PropFactor;\r\n\t///腿2比例系数\r\n\tTThostFtdcCommonIntType\tLeg2PropFactor;\r\n\t///商品群号\r\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\r\n\t///商品群名称\r\n\tTThostFtdcInstrumentNameType\tCommodityGroupName;\r\n};\r\n\r\n///RULE合约保证金参数查询\r\nstruct CThostFtdcQryRULEInstrParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n};\r\n\r\n///RULE品种内对锁仓折扣参数查询\r\nstruct CThostFtdcQryRULEIntraParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n};\r\n\r\n///RULE跨品种抵扣参数查询\r\nstruct CThostFtdcQryRULEInterParameterField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n\t///商品群号\r\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\r\n};\r\n\r\n///投资者产品RULE保证金\r\nstruct CThostFtdcInvestorProdRULEMarginField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///合约类型\r\n\tTThostFtdcInstrumentClassType\tInstrumentClass;\r\n\t///商品群号\r\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\r\n\t///买标准持仓\r\n\tTThostFtdcStdPositionType\tBStdPosition;\r\n\t///卖标准持仓\r\n\tTThostFtdcStdPositionType\tSStdPosition;\r\n\t///买标准开仓冻结\r\n\tTThostFtdcStdPositionType\tBStdOpenFrozen;\r\n\t///卖标准开仓冻结\r\n\tTThostFtdcStdPositionType\tSStdOpenFrozen;\r\n\t///买标准平仓冻结\r\n\tTThostFtdcStdPositionType\tBStdCloseFrozen;\r\n\t///卖标准平仓冻结\r\n\tTThostFtdcStdPositionType\tSStdCloseFrozen;\r\n\t///品种内对冲标准持仓\r\n\tTThostFtdcStdPositionType\tIntraProdStdPosition;\r\n\t///品种内单腿标准持仓\r\n\tTThostFtdcStdPositionType\tNetStdPosition;\r\n\t///品种间对冲标准持仓\r\n\tTThostFtdcStdPositionType\tInterProdStdPosition;\r\n\t///单腿标准持仓\r\n\tTThostFtdcStdPositionType\tSingleStdPosition;\r\n\t///品种内对锁保证金\r\n\tTThostFtdcMoneyType\tIntraProdMargin;\r\n\t///品种间对锁保证金\r\n\tTThostFtdcMoneyType\tInterProdMargin;\r\n\t///跨品种单腿保证金\r\n\tTThostFtdcMoneyType\tSingleMargin;\r\n\t///非组合合约保证金\r\n\tTThostFtdcMoneyType\tNonCombMargin;\r\n\t///附加保证金\r\n\tTThostFtdcMoneyType\tAddOnMargin;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///附加冻结保证金\r\n\tTThostFtdcMoneyType\tAddOnFrozenMargin;\r\n\t///开仓冻结保证金\r\n\tTThostFtdcMoneyType\tOpenFrozenMargin;\r\n\t///平仓冻结保证金\r\n\tTThostFtdcMoneyType\tCloseFrozenMargin;\r\n\t///品种保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n\t///冻结保证金\r\n\tTThostFtdcMoneyType\tFrozenMargin;\r\n};\r\n\r\n///投资者产品RULE保证金查询\r\nstruct CThostFtdcQryInvestorProdRULEMarginField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///商品群号\r\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\r\n};\r\n\r\n///风险结算追平SPBM组合保证金套餐\r\nstruct CThostFtdcSyncDeltaSPBMPortfDefinitionField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///组合保证金套餐代码\r\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///是否启用SPBM\r\n\tTThostFtdcBoolType\tIsSPBM;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平投资者SPBM套餐选择\r\nstruct CThostFtdcSyncDeltaSPBMInvstPortfDefField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///组合保证金套餐代码\r\n\tTThostFtdcPortfolioDefIDType\tPortfolioDefID;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPBM期货合约保证金参数\r\nstruct CThostFtdcSyncDeltaSPBMFutureParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///期货合约因子\r\n\tTThostFtdcVolumeMultipleType\tCvf;\r\n\t///阶段标识\r\n\tTThostFtdcTimeRangeType\tTimeRange;\r\n\t///品种保证金标准\r\n\tTThostFtdcRatioType\tMarginRate;\r\n\t///期货合约内部对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tLockRateX;\r\n\t///提高保证金标准\r\n\tTThostFtdcRatioType\tAddOnRate;\r\n\t///昨结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///期货合约内部对锁仓附加费率折扣比例\r\n\tTThostFtdcRatioType\tAddOnLockRateX2;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPBM期权合约保证金参数\r\nstruct CThostFtdcSyncDeltaSPBMOptionParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///期权合约因子\r\n\tTThostFtdcVolumeMultipleType\tCvf;\r\n\t///期权冲抵价格\r\n\tTThostFtdcPriceType\tDownPrice;\r\n\t///Delta值\r\n\tTThostFtdcDeltaType\tDelta;\r\n\t///卖方期权风险转换最低值\r\n\tTThostFtdcDeltaType\tSlimiDelta;\r\n\t///昨结算价\r\n\tTThostFtdcPriceType\tPreSettlementPrice;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPBM品种内对锁仓折扣参数\r\nstruct CThostFtdcSyncDeltaSPBMIntraParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///品种内合约间对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tIntraRateY;\r\n\t///品种内合约间对锁仓附加费率折扣比例\r\n\tTThostFtdcRatioType\tAddOnIntraRateY2;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPBM跨品种抵扣参数\r\nstruct CThostFtdcSyncDeltaSPBMInterParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///优先级\r\n\tTThostFtdcSpreadIdType\tSpreadId;\r\n\t///品种间对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tInterRateZ;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPBM附加跨品种抵扣参数\r\nstruct CThostFtdcSyncDeltaSPBMAddOnInterParamField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///优先级\r\n\tTThostFtdcSpreadIdType\tSpreadId;\r\n\t///品种间对锁仓附加费率折扣比例\r\n\tTThostFtdcRatioType\tAddOnInterRateZ2;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPMM合约参数\r\nstruct CThostFtdcSyncDeltaSPMMInstParamField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///SPMM合约保证金算法\r\n\tTThostFtdcInstMarginCalIDType\tInstMarginCalID;\r\n\t///商品组代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityID;\r\n\t///商品群代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPMM产品相关参数\r\nstruct CThostFtdcSyncDeltaSPMMProductParamField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcSPMMProductIDType\tProductID;\r\n\t///商品组代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityID;\r\n\t///商品群代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平投资者SPMM模板选择\r\nstruct CThostFtdcSyncDeltaInvestorSPMMModelField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///SPMM模板ID\r\n\tTThostFtdcSPMMModelIDType\tSPMMModelID;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平SPMM模板参数设置\r\nstruct CThostFtdcSyncDeltaSPMMModelParamField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///SPMM模板ID\r\n\tTThostFtdcSPMMModelIDType\tSPMMModelID;\r\n\t///商品群代码\r\n\tTThostFtdcSPMMProductIDType\tCommodityGroupID;\r\n\t///SPMM品种内跨期优惠系数\r\n\tTThostFtdcSPMMDiscountRatioType\tIntraCommodityRate;\r\n\t///SPMM品种间优惠系数\r\n\tTThostFtdcSPMMDiscountRatioType\tInterCommodityRate;\r\n\t///SPMM期权优惠系数\r\n\tTThostFtdcSPMMDiscountRatioType\tOptionDiscountRate;\r\n\t///商品群最小保证金比例\r\n\tTThostFtdcSPMMDiscountRatioType\tMiniMarginRatio;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RCAMS产品组合信息\r\nstruct CThostFtdcSyncDeltaRCAMSCombProdInfoField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///商品组代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RCAMS同合约风险对冲参数\r\nstruct CThostFtdcSyncDeltaRCAMSInstrParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///同合约风险对冲比率\r\n\tTThostFtdcHedgeRateType\tHedgeRate;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RCAMS品种内风险对冲参数\r\nstruct CThostFtdcSyncDeltaRCAMSIntraParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///品种内对冲比率\r\n\tTThostFtdcHedgeRateType\tHedgeRate;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RCAMS跨品种风险折抵参数\r\nstruct CThostFtdcSyncDeltaRCAMSInterParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///商品群代码\r\n\tTThostFtdcProductIDType\tProductGroupID;\r\n\t///优先级\r\n\tTThostFtdcRCAMSPriorityType\tPriority;\r\n\t///折抵率\r\n\tTThostFtdcHedgeRateType\tCreditRate;\r\n\t///产品组合代码1\r\n\tTThostFtdcProductIDType\tCombProduct1;\r\n\t///产品组合代码2\r\n\tTThostFtdcProductIDType\tCombProduct2;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RCAMS空头期权风险调整参数\r\nstruct CThostFtdcSyncDeltaRCAMSSOptAdjParamField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///产品组合代码\r\n\tTThostFtdcProductIDType\tCombProductID;\r\n\t///投套标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///空头期权风险调整标准\r\n\tTThostFtdcAdjustValueType\tAdjustValue;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RCAMS策略组合规则明细\r\nstruct CThostFtdcSyncDeltaRCAMSCombRuleDtlField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///策略产品\r\n\tTThostFtdcProductIDType\tProdGroup;\r\n\t///策略id\r\n\tTThostFtdcRuleIdType\tRuleId;\r\n\t///优先级\r\n\tTThostFtdcRCAMSPriorityType\tPriority;\r\n\t///投套标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///组合保证金标准\r\n\tTThostFtdcMoneyType\tCombMargin;\r\n\t///交易所组合合约代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///单腿合约代码\r\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///单腿乘数\r\n\tTThostFtdcLegMultipleType\tLegMultiple;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RCAMS策略组合持仓\r\nstruct CThostFtdcSyncDeltaRCAMSInvstCombPosField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///投套标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///持仓多空方向\r\n\tTThostFtdcPosiDirectionType\tPosiDirection;\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///交易所组合合约代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///持仓量\r\n\tTThostFtdcVolumeType\tTotalAmt;\r\n\t///交易所保证金\r\n\tTThostFtdcMoneyType\tExchMargin;\r\n\t///投资者保证金\r\n\tTThostFtdcMoneyType\tMargin;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RULE合约保证金参数\r\nstruct CThostFtdcSyncDeltaRULEInstrParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///合约类型\r\n\tTThostFtdcInstrumentClassType\tInstrumentClass;\r\n\t///标准合约\r\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\r\n\t///投机买折算系数\r\n\tTThostFtdcRatioType\tBSpecRatio;\r\n\t///投机卖折算系数\r\n\tTThostFtdcRatioType\tSSpecRatio;\r\n\t///套保买折算系数\r\n\tTThostFtdcRatioType\tBHedgeRatio;\r\n\t///套保卖折算系数\r\n\tTThostFtdcRatioType\tSHedgeRatio;\r\n\t///买附加风险保证金\r\n\tTThostFtdcMoneyType\tBAddOnMargin;\r\n\t///卖附加风险保证金\r\n\tTThostFtdcMoneyType\tSAddOnMargin;\r\n\t///商品群号\r\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RULE品种内对锁仓折扣参数\r\nstruct CThostFtdcSyncDeltaRULEIntraParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///品种代码\r\n\tTThostFtdcInstrumentIDType\tProdFamilyCode;\r\n\t///标准合约\r\n\tTThostFtdcInstrumentIDType\tStdInstrumentID;\r\n\t///标准合约保证金\r\n\tTThostFtdcMoneyType\tStdInstrMargin;\r\n\t///一般月份合约组合保证金系数\r\n\tTThostFtdcRatioType\tUsualIntraRate;\r\n\t///临近交割合约组合保证金系数\r\n\tTThostFtdcRatioType\tDeliveryIntraRate;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///风险结算追平RULE跨品种抵扣参数\r\nstruct CThostFtdcSyncDeltaRULEInterParameterField\r\n{\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///优先级\r\n\tTThostFtdcSpreadIdType\tSpreadId;\r\n\t///品种间对锁仓费率折扣比例\r\n\tTThostFtdcRatioType\tInterRate;\r\n\t///第一腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg1ProdFamilyCode;\r\n\t///第二腿构成品种\r\n\tTThostFtdcInstrumentIDType\tLeg2ProdFamilyCode;\r\n\t///腿1比例系数\r\n\tTThostFtdcCommonIntType\tLeg1PropFactor;\r\n\t///腿2比例系数\r\n\tTThostFtdcCommonIntType\tLeg2PropFactor;\r\n\t///商品群号\r\n\tTThostFtdcCommodityGroupIDType\tCommodityGroupID;\r\n\t///商品群名称\r\n\tTThostFtdcInstrumentNameType\tCommodityGroupName;\r\n\t///操作标志\r\n\tTThostFtdcActionDirectionType\tActionDirection;\r\n\t///追平序号\r\n\tTThostFtdcSequenceNoType\tSyncDeltaSequenceNo;\r\n};\r\n\r\n///服务地址参数\r\nstruct CThostFtdcIpAddrParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///服务地址\r\n\tTThostFtdcIpAddrType\tAddress;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///交易中心名称\r\n\tTThostFtdcDRIdentityNameType\tDRIdentityName;\r\n\t///交易地址OR行情地址\r\n\tTThostFtdcAddrSrvModeType\tAddrSrvMode;\r\n\t///地址版本\r\n\tTThostFtdcAddrVerType\tAddrVer;\r\n\t///服务地址编号\r\n\tTThostFtdcCommonIntType\tAddrNo;\r\n\t///服务地址名称\r\n\tTThostFtdcAddrNameType\tAddrName;\r\n\t///是否是国密地址\r\n\tTThostFtdcBoolType\tIsSM;\r\n\t///是否是内网地址\r\n\tTThostFtdcBoolType\tIsLocalAddr;\r\n\t///地址补充信息\r\n\tTThostFtdcAddrRemarkType\tRemark;\r\n\t///站点\r\n\tTThostFtdcSiteType\tSite;\r\n\t///网络运营商\r\n\tTThostFtdcNetOperatorType\tNetOperator;\r\n};\r\n\r\n///服务地址参数查询\r\nstruct CThostFtdcQryIpAddrParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///服务地址参数\r\nstruct CThostFtdcTGIpAddrParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///服务地址\r\n\tTThostFtdcIpAddrType\tAddress;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///交易中心名称\r\n\tTThostFtdcDRIdentityNameType\tDRIdentityName;\r\n\t///交易地址OR行情地址\r\n\tTThostFtdcAddrSrvModeType\tAddrSrvMode;\r\n\t///地址版本\r\n\tTThostFtdcAddrVerType\tAddrVer;\r\n\t///服务地址编号\r\n\tTThostFtdcCommonIntType\tAddrNo;\r\n\t///服务地址名称\r\n\tTThostFtdcAddrNameType\tAddrName;\r\n\t///是否是国密地址\r\n\tTThostFtdcBoolType\tIsSM;\r\n\t///是否是内网地址\r\n\tTThostFtdcBoolType\tIsLocalAddr;\r\n\t///地址补充信息\r\n\tTThostFtdcAddrRemarkType\tRemark;\r\n\t///站点\r\n\tTThostFtdcSiteType\tSite;\r\n\t///网络运营商\r\n\tTThostFtdcNetOperatorType\tNetOperator;\r\n};\r\n\r\n///服务地址参数查询\r\nstruct CThostFtdcQryTGIpAddrParamField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n};\r\n\r\n///TGate会话查询状态\r\nstruct CThostFtdcTGSessionQryStatusField\r\n{\r\n\t///最近30s的查询频率\r\n\tTThostFtdcCommonIntType\tLastQryFreq;\r\n\t///查询状态\r\n\tTThostFtdcTGSessionQryStatusType\tQryStatus;\r\n};\r\n\r\n///内网地址配置\r\nstruct CThostFtdcLocalAddrConfigField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///对端地址\r\n\tTThostFtdcIpAddrType\tPeerAddr;\r\n\t///子网掩码\r\n\tTThostFtdcIpAddrType\tNetMask;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///内网服务地址\r\n\tTThostFtdcIpAddrType\tLocalAddress;\r\n};\r\n\r\n///内网地址配置查询\r\nstruct CThostFtdcQryLocalAddrConfigField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///次席查询银行资金帐户信息请求\r\nstruct CThostFtdcReqQueryBankAccountBySecField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///次中心发起转账期货公司流水号\r\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\r\n};\r\n\r\n///次席查询银行资金帐户信息回报\r\nstruct CThostFtdcRspQueryBankAccountBySecField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///银行可用金额\r\n\tTThostFtdcTradeAmountType\tBankUseAmount;\r\n\t///银行可取金额\r\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///次中心发起转账期货公司流水号\r\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\r\n};\r\n\r\n///次中心发起的转帐交易\r\nstruct CThostFtdcReqTransferBySecField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///期货可取金额\r\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\r\n\t///费用支付标志\r\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\r\n\t///应收客户费用\r\n\tTThostFtdcCustFeeType\tCustFee;\r\n\t///应收期货公司费用\r\n\tTThostFtdcFutureFeeType\tBrokerFee;\r\n\t///发送方给接收方的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///转账交易状态\r\n\tTThostFtdcTransferStatusType\tTransferStatus;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///次中心发起转账期货公司流水号\r\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\r\n};\r\n\r\n///次中心发起的转帐交易回报\r\nstruct CThostFtdcRspTransferBySecField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///转帐金额\r\n\tTThostFtdcTradeAmountType\tTradeAmount;\r\n\t///期货可取金额\r\n\tTThostFtdcTradeAmountType\tFutureFetchAmount;\r\n\t///费用支付标志\r\n\tTThostFtdcFeePayFlagType\tFeePayFlag;\r\n\t///应收客户费用\r\n\tTThostFtdcCustFeeType\tCustFee;\r\n\t///应收期货公司费用\r\n\tTThostFtdcFutureFeeType\tBrokerFee;\r\n\t///发送方给接收方的消息\r\n\tTThostFtdcAddInfoType\tMessage;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///转账交易状态\r\n\tTThostFtdcTransferStatusType\tTransferStatus;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///次中心发起转账期货公司流水号\r\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\r\n};\r\n\r\n///查询银行资金帐户信息通知 要发往次席\r\nstruct CThostFtdcNotifyQueryFutureAccountBySecField\r\n{\r\n\t///业务功能码\r\n\tTThostFtdcTradeCodeType\tTradeCode;\r\n\t///银行代码\r\n\tTThostFtdcBankIDType\tBankID;\r\n\t///银行分支机构代码\r\n\tTThostFtdcBankBrchIDType\tBankBranchID;\r\n\t///期商代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///期商分支机构代码\r\n\tTThostFtdcFutureBranchIDType\tBrokerBranchID;\r\n\t///交易日期\r\n\tTThostFtdcTradeDateType\tTradeDate;\r\n\t///交易时间\r\n\tTThostFtdcTradeTimeType\tTradeTime;\r\n\t///银行流水号\r\n\tTThostFtdcBankSerialType\tBankSerial;\r\n\t///交易系统日期 \r\n\tTThostFtdcTradeDateType\tTradingDay;\r\n\t///银期平台消息流水号\r\n\tTThostFtdcSerialType\tPlateSerial;\r\n\t///最后分片标志\r\n\tTThostFtdcLastFragmentType\tLastFragment;\r\n\t///会话号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///客户姓名\r\n\tTThostFtdcIndividualNameType\tCustomerName;\r\n\t///证件类型\r\n\tTThostFtdcIdCardTypeType\tIdCardType;\r\n\t///证件号码\r\n\tTThostFtdcIdentifiedCardNoType\tIdentifiedCardNo;\r\n\t///客户类型\r\n\tTThostFtdcCustTypeType\tCustType;\r\n\t///银行帐号\r\n\tTThostFtdcBankAccountType\tBankAccount;\r\n\t///银行密码\r\n\tTThostFtdcPasswordType\tBankPassWord;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///期货密码\r\n\tTThostFtdcPasswordType\tPassword;\r\n\t///期货公司流水号\r\n\tTThostFtdcFutureSerialType\tFutureSerial;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///用户标识\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///验证客户证件号码标志\r\n\tTThostFtdcYesNoIndicatorType\tVerifyCertNoFlag;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///摘要\r\n\tTThostFtdcDigestType\tDigest;\r\n\t///银行帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankAccType;\r\n\t///渠道标志\r\n\tTThostFtdcDeviceIDType\tDeviceID;\r\n\t///期货单位帐号类型\r\n\tTThostFtdcBankAccTypeType\tBankSecuAccType;\r\n\t///期货公司银行编码\r\n\tTThostFtdcBankCodingForFutureType\tBrokerIDByBank;\r\n\t///期货单位帐号\r\n\tTThostFtdcBankAccountType\tBankSecuAcc;\r\n\t///银行密码标志\r\n\tTThostFtdcPwdFlagType\tBankPwdFlag;\r\n\t///期货资金密码核对标志\r\n\tTThostFtdcPwdFlagType\tSecuPwdFlag;\r\n\t///交易柜员\r\n\tTThostFtdcOperNoType\tOperNo;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///交易ID\r\n\tTThostFtdcTIDType\tTID;\r\n\t///银行可用金额\r\n\tTThostFtdcTradeAmountType\tBankUseAmount;\r\n\t///银行可取金额\r\n\tTThostFtdcTradeAmountType\tBankFetchAmount;\r\n\t///错误代码\r\n\tTThostFtdcErrorIDType\tErrorID;\r\n\t///错误信息\r\n\tTThostFtdcErrorMsgType\tErrorMsg;\r\n\t///长客户姓名\r\n\tTThostFtdcLongIndividualNameType\tLongCustomerName;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///次中心发起转账期货公司流水号\r\n\tTThostFtdcFutureSerialType\tSecFutureSerial;\r\n};\r\n\r\n///退出紧急状态参数\r\nstruct CThostFtdcExitEmergencyField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///新组保保证金系数投资者模板对应关系\r\nstruct CThostFtdcInvestorPortfMarginModelField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///保证金系数模板\r\n\tTThostFtdcInvestorIDType\tMarginModelID;\r\n};\r\n\r\n///投资者新组保设置\r\nstruct CThostFtdcInvestorPortfSettingField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者编号\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///投机套保标志\r\n\tTThostFtdcHedgeFlagType\tHedgeFlag;\r\n\t///是否开启新组保\r\n\tTThostFtdcBoolType\tUsePortf;\r\n};\r\n\r\n///投资者新组保设置查询\r\nstruct CThostFtdcQryInvestorPortfSettingField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者编号\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n};\r\n\r\n///来自次席的用户口令变更\r\nstruct CThostFtdcUserPasswordUpdateFromSecField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///原来的口令\r\n\tTThostFtdcPasswordType\tOldPassword;\r\n\t///新的口令\r\n\tTThostFtdcPasswordType\tNewPassword;\r\n\t///次席的交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tFromSec;\r\n};\r\n\r\n///来自次席的结算结果确认\r\nstruct CThostFtdcSettlementInfoConfirmFromSecField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///确认日期\r\n\tTThostFtdcDateType\tConfirmDate;\r\n\t///确认时间\r\n\tTThostFtdcTimeType\tConfirmTime;\r\n\t///次席的交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tFromSec;\r\n};\r\n\r\n///来自次席的资金账户口令变更\r\nstruct CThostFtdcTradingAccountPasswordUpdateFromSecField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者帐号\r\n\tTThostFtdcAccountIDType\tAccountID;\r\n\t///原来的口令\r\n\tTThostFtdcPasswordType\tOldPassword;\r\n\t///新的口令\r\n\tTThostFtdcPasswordType\tNewPassword;\r\n\t///币种代码\r\n\tTThostFtdcCurrencyIDType\tCurrencyID;\r\n\t///次席的交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tFromSec;\r\n};\r\n\r\n///风控禁止的合约交易权限\r\nstruct CThostFtdcRiskForbiddenRightField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者编号\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约/产品代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n};\r\n\r\n///投资者申报费阶梯收取记录\r\nstruct CThostFtdcInvestorInfoCommRecField\r\n{\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///商品代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///报单总笔数\r\n\tTThostFtdcVolumeType\tOrderCount;\r\n\t///撤单总笔数\r\n\tTThostFtdcVolumeType\tOrderActionCount;\r\n\t///询价总次数\r\n\tTThostFtdcVolumeType\tForQuoteCnt;\r\n\t///申报费\r\n\tTThostFtdcMoneyType\tInfoComm;\r\n\t///是否期权系列\r\n\tTThostFtdcBoolType\tIsOptSeries;\r\n\t///品种代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///信息量总量\r\n\tTThostFtdcVolumeType\tInfoCnt;\r\n};\r\n\r\n///投资者申报费阶梯收取记录查询\r\nstruct CThostFtdcQryInvestorInfoCommRecField\r\n{\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///商品代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///组合腿信息\r\nstruct CThostFtdcCombLegField\r\n{\r\n\t///组合合约代码\r\n\tTThostFtdcInstrumentIDType\tCombInstrumentID;\r\n\t///单腿编号\r\n\tTThostFtdcLegIDType\tLegID;\r\n\t///单腿合约代码\r\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\r\n\t///买卖方向\r\n\tTThostFtdcDirectionType\tDirection;\r\n\t///单腿乘数\r\n\tTThostFtdcLegMultipleType\tLegMultiple;\r\n\t///派生层数\r\n\tTThostFtdcImplyLevelType\tImplyLevel;\r\n};\r\n\r\n///组合腿信息查询\r\nstruct CThostFtdcQryCombLegField\r\n{\r\n\t///单腿合约代码\r\n\tTThostFtdcInstrumentIDType\tLegInstrumentID;\r\n};\r\n\r\n///输入的对冲设置\r\nstruct CThostFtdcInputOffsetSettingField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///标的期货合约代码\r\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///对冲类型\r\n\tTThostFtdcOffsetTypeType\tOffsetType;\r\n\t///申请对冲的合约数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///是否对冲\r\n\tTThostFtdcBoolType\tIsOffset;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n};\r\n\r\n///对冲设置\r\nstruct CThostFtdcOffsetSettingField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///标的期货合约代码\r\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///对冲类型\r\n\tTThostFtdcOffsetTypeType\tOffsetType;\r\n\t///申请对冲的合约数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///是否对冲\r\n\tTThostFtdcBoolType\tIsOffset;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///交易所合约代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///交易所期权系列号\r\n\tTThostFtdcExchangeInstIDType\tExchangeSerialNo;\r\n\t///交易所产品代码\r\n\tTThostFtdcProductIDType\tExchangeProductID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///对冲提交状态\r\n\tTThostFtdcOrderSubmitStatusType\tOrderSubmitStatus;\r\n\t///交易日\r\n\tTThostFtdcDateType\tTradingDay;\r\n\t///结算编号\r\n\tTThostFtdcSettlementIDType\tSettlementID;\r\n\t///报单日期\r\n\tTThostFtdcDateType\tInsertDate;\r\n\t///插入时间\r\n\tTThostFtdcTimeType\tInsertTime;\r\n\t///撤销时间\r\n\tTThostFtdcTimeType\tCancelTime;\r\n\t///对冲设置结果\r\n\tTThostFtdcExecResultType\tExecResult;\r\n\t///序号\r\n\tTThostFtdcSequenceNoType\tSequenceNo;\r\n\t///前置编号\r\n\tTThostFtdcFrontIDType\tFrontID;\r\n\t///会话编号\r\n\tTThostFtdcSessionIDType\tSessionID;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///操作用户代码\r\n\tTThostFtdcUserIDType\tActiveUserID;\r\n\t///经纪公司报单编号\r\n\tTThostFtdcSequenceNoType\tBrokerOffsetSettingSeq;\r\n\t///申请来源\r\n\tTThostFtdcApplySrcType\tApplySrc;\r\n};\r\n\r\n///撤销对冲设置\r\nstruct CThostFtdcCancelOffsetSettingField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///合约代码\r\n\tTThostFtdcInstrumentIDType\tInstrumentID;\r\n\t///标的期货合约代码\r\n\tTThostFtdcInstrumentIDType\tUnderlyingInstrID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///对冲类型\r\n\tTThostFtdcOffsetTypeType\tOffsetType;\r\n\t///申请对冲的合约数量\r\n\tTThostFtdcVolumeType\tVolume;\r\n\t///是否对冲\r\n\tTThostFtdcBoolType\tIsOffset;\r\n\t///请求编号\r\n\tTThostFtdcRequestIDType\tRequestID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///交易所代码\r\n\tTThostFtdcExchangeIDType\tExchangeID;\r\n\t///IP地址\r\n\tTThostFtdcIPAddressType\tIPAddress;\r\n\t///Mac地址\r\n\tTThostFtdcMacAddressType\tMacAddress;\r\n\t///交易所合约代码\r\n\tTThostFtdcExchangeInstIDType\tExchangeInstID;\r\n\t///交易所期权系列号\r\n\tTThostFtdcExchangeInstIDType\tExchangeSerialNo;\r\n\t///交易所产品代码\r\n\tTThostFtdcProductIDType\tExchangeProductID;\r\n\t///交易所交易员代码\r\n\tTThostFtdcTraderIDType\tTraderID;\r\n\t///安装编号\r\n\tTThostFtdcInstallIDType\tInstallID;\r\n\t///会员代码\r\n\tTThostFtdcParticipantIDType\tParticipantID;\r\n\t///客户代码\r\n\tTThostFtdcClientIDType\tClientID;\r\n\t///报单操作状态\r\n\tTThostFtdcOrderActionStatusType\tOrderActionStatus;\r\n\t///状态信息\r\n\tTThostFtdcErrorMsgType\tStatusMsg;\r\n\t///操作本地编号\r\n\tTThostFtdcOrderLocalIDType\tActionLocalID;\r\n\t///操作日期\r\n\tTThostFtdcDateType\tActionDate;\r\n\t///操作时间\r\n\tTThostFtdcTimeType\tActionTime;\r\n};\r\n\r\n///查询对冲设置\r\nstruct CThostFtdcQryOffsetSettingField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///产品代码\r\n\tTThostFtdcProductIDType\tProductID;\r\n\t///对冲类型\r\n\tTThostFtdcOffsetTypeType\tOffsetType;\r\n};\r\n\r\n///服务地址和AppID的关系\r\nstruct CThostFtdcAddrAppIDRelationField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///服务地址\r\n\tTThostFtdcIpAddrType\tAddress;\r\n\t///交易中心代码\r\n\tTThostFtdcDRIdentityIDType\tDRIdentityID;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tAppID;\r\n};\r\n\r\n///服务地址和AppID的关系查询\r\nstruct CThostFtdcQryAddrAppIDRelationField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///微信小程序等用户系统信息\r\nstruct CThostFtdcWechatUserSystemInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///微信小程序等用户端系统内部信息长度\r\n\tTThostFtdcSystemInfoLenType\tWechatCltSysInfoLen;\r\n\t///微信小程序等用户端系统内部信息\r\n\tTThostFtdcClientSystemInfoType\tWechatCltSysInfo;\r\n\t///终端IP端口\r\n\tTThostFtdcIPPortType\tClientIPPort;\r\n\t///登录成功时间\r\n\tTThostFtdcTimeType\tClientLoginTime;\r\n\t///App代码\r\n\tTThostFtdcAppIDType\tClientAppID;\r\n\t///用户公网IP\r\n\tTThostFtdcIPAddressType\tClientPublicIP;\r\n\t///客户登录备注2\r\n\tTThostFtdcClientLoginRemarkType\tClientLoginRemark;\r\n};\r\n\r\n///投资者预留信息\r\nstruct CThostFtdcInvestorReserveInfoField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///用户代码\r\n\tTThostFtdcUserIDType\tUserID;\r\n\t///预留信息\r\n\tTThostFtdcReserveInfoType\tReserveInfo;\r\n};\r\n\r\n///查询组织架构投资者对应关系\r\nstruct CThostFtdcQryInvestorDepartmentFlatField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n///组织架构投资者对应关系\r\nstruct CThostFtdcInvestorDepartmentFlatField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n\t///投资者代码\r\n\tTThostFtdcInvestorIDType\tInvestorID;\r\n\t///组织架构代码\r\n\tTThostFtdcInvestorIDType\tDepartmentID;\r\n};\r\n\r\n///查询操作员组织架构关系\r\nstruct CThostFtdcQryDepartmentUserField\r\n{\r\n\t///经纪公司代码\r\n\tTThostFtdcBrokerIDType\tBrokerID;\r\n};\r\n\r\n\r\n///前置信息\r\nstruct CThostFtdcFrontInfoField\r\n{\r\n\t///前置地址\r\n\tTThostFtdcAddressType  FrontAddr;\r\n\t///查询流控\r\n\tTThostFtdcQueryFreqType QryFreq;\r\n\t///FTD流控\r\n\tTThostFtdcQueryFreqType FTDPkgFreq;\r\n};\r\n\r\n#endif\r\n"
  },
  {
    "path": "native/ctp_bridge/api/win/error.dtd",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!ELEMENT errors (error*)>\r\n<!ELEMENT error EMPTY>\r\n<!ATTLIST error\r\n\tid\tCDATA #REQUIRED\r\n\tvalue CDATA #REQUIRED\r\n\tprompt CDATA #REQUIRED\r\n>\r\n\r\n"
  },
  {
    "path": "native/ctp_bridge/api/win/error.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf8\"?>\r\n<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by wangzhaodong (ORiON) -->\r\n<!DOCTYPE errors SYSTEM \"error.dtd\">\r\n<errors>\r\n\t<error id=\"NONE\" value=\"0\" prompt=\"CTP:正确\" />\r\n\t<error id=\"INVALID_DATA_SYNC_STATUS\" value=\"1\" prompt=\"CTP:不在已同步状态\" />\r\n\t<error id=\"INCONSISTENT_INFORMATION\" value=\"2\" prompt=\"CTP:会话信息不一致\" />\r\n\t<error id=\"INVALID_LOGIN\" value=\"3\" prompt=\"CTP:不合法的登录\" />\r\n\t<error id=\"USER_NOT_ACTIVE\" value=\"4\" prompt=\"CTP:用户不活跃\" />\r\n\t<error id=\"DUPLICATE_LOGIN\" value=\"5\" prompt=\"CTP:重复的登录\" />\r\n\t<error id=\"NOT_LOGIN_YET\" value=\"6\" prompt=\"CTP:还没有登录\" />\r\n\t<error id=\"NOT_INITED\" value=\"7\" prompt=\"CTP:还没有初始化\" />\r\n\t<error id=\"FRONT_NOT_ACTIVE\" value=\"8\" prompt=\"CTP:前置不活跃\" />\r\n\t<error id=\"NO_PRIVILEGE\" value=\"9\" prompt=\"CTP:无此权限\" />\r\n\t<error id=\"CHANGE_OTHER_PASSWORD\" value=\"10\" prompt=\"CTP:修改别人的口令\" />\r\n\t<error id=\"USER_NOT_FOUND\" value=\"11\" prompt=\"CTP:找不到该用户\" />\r\n\t<error id=\"BROKER_NOT_FOUND\" value=\"12\" prompt=\"CTP:找不到该经纪公司\" />\r\n\t<error id=\"INVESTOR_NOT_FOUND\" value=\"13\" prompt=\"CTP:找不到投资者\" />\r\n\t<error id=\"OLD_PASSWORD_MISMATCH\" value=\"14\" prompt=\"CTP:原口令不匹配\" />\r\n\t<error id=\"BAD_FIELD\" value=\"15\" prompt=\"CTP:报单字段有误\" />\r\n\t<error id=\"INSTRUMENT_NOT_FOUND\" value=\"16\" prompt=\"CTP:找不到合约\" />\r\n\t<error id=\"INSTRUMENT_NOT_TRADING\" value=\"17\" prompt=\"CTP:合约不能交易\" />\r\n\t<error id=\"NOT_EXCHANGE_PARTICIPANT\" value=\"18\" prompt=\"CTP:经纪公司不是交易所的会员\" />\r\n\t<error id=\"INVESTOR_NOT_ACTIVE\" value=\"19\" prompt=\"CTP:投资者不活跃\" />\r\n\t<error id=\"NOT_EXCHANGE_CLIENT\" value=\"20\" prompt=\"CTP:投资者未在交易所开户\" />\r\n\t<error id=\"NO_VALID_TRADER_AVAILABLE\" value=\"21\" prompt=\"CTP:该交易席位未连接到交易所\" />\r\n\t<error id=\"DUPLICATE_ORDER_REF\" value=\"22\" prompt=\"CTP:报单错误：不允许重复报单\" />\r\n\t<error id=\"BAD_ORDER_ACTION_FIELD\" value=\"23\" prompt=\"CTP:错误的报单操作字段\" />\r\n\t<error id=\"DUPLICATE_ORDER_ACTION_REF\" value=\"24\" prompt=\"CTP:撤单已报送，不允许重复撤单\" />\r\n\t<error id=\"ORDER_NOT_FOUND\" value=\"25\" prompt=\"CTP:撤单找不到相应报单\" />\r\n\t<error id=\"INSUITABLE_ORDER_STATUS\" value=\"26\" prompt=\"CTP:报单已全成交或已撤销，不能再撤\" />\r\n\t<error id=\"UNSUPPORTED_FUNCTION\" value=\"27\" prompt=\"CTP:不支持的功能\" />\r\n\t<error id=\"NO_TRADING_RIGHT\" value=\"28\" prompt=\"CTP:没有报单交易权限\" />\r\n\t<error id=\"CLOSE_ONLY\" value=\"29\" prompt=\"CTP:只能平仓\" />\r\n\t<error id=\"OVER_CLOSE_POSITION\" value=\"30\" prompt=\"CTP:平仓量超过持仓量\" />\r\n\t<error id=\"INSUFFICIENT_MONEY\" value=\"31\" prompt=\"CTP:资金不足\" />\r\n\t<error id=\"DUPLICATE_PK\" value=\"32\" prompt=\"CTP:主键重复\" />\r\n\t<error id=\"CANNOT_FIND_PK\" value=\"33\" prompt=\"CTP:找不到主键\" />\r\n\t<error id=\"CAN_NOT_INACTIVE_BROKER\" value=\"34\" prompt=\"CTP:设置经纪公司不活跃状态失败\" />\r\n\t<error id=\"BROKER_SYNCHRONIZING\" value=\"35\" prompt=\"CTP:经纪公司正在同步\" />\r\n\t<error id=\"BROKER_SYNCHRONIZED\" value=\"36\" prompt=\"CTP:经纪公司已同步\" />\r\n\t<error id=\"SHORT_SELL\" value=\"37\" prompt=\"CTP:现货交易不能卖空\" />\r\n\t<error id=\"INVALID_SETTLEMENT_REF\" value=\"38\" prompt=\"CTP:不合法的结算引用\" />\r\n\t<error id=\"CFFEX_NETWORK_ERROR\" value=\"39\" prompt=\"CTP:交易所网络连接失败\" />\r\n\t<error id=\"CFFEX_OVER_REQUEST\" value=\"40\" prompt=\"CTP:交易所未处理请求超过许可数\" />\r\n\t<error id=\"CFFEX_OVER_REQUEST_PER_SECOND\" value=\"41\" prompt=\"CTP:交易所每秒发送请求数超过许可数\" />\r\n\t<error id=\"SETTLEMENT_INFO_NOT_CONFIRMED\" value=\"42\" prompt=\"CTP:结算结果未确认\" />\r\n\t<error id=\"DEPOSIT_NOT_FOUND\" value=\"43\" prompt=\"CTP:没有对应的入金记录\" />\r\n\t<error id=\"EXCHANG_TRADING\" value=\"44\" prompt=\"CTP:交易所已经进入连续交易状态\" />\r\n\t<error id=\"PARKEDORDER_NOT_FOUND\" value=\"45\" prompt=\"CTP:找不到预埋（撤单）单\" />\r\n\t<error id=\"PARKEDORDER_HASSENDED\" value=\"46\" prompt=\"CTP:预埋（撤单）单已经发送\" />\r\n\t<error id=\"PARKEDORDER_HASDELETE\" value=\"47\" prompt=\"CTP:预埋（撤单）单已经删除\" />\r\n\t<error id=\"INVALID_INVESTORIDORPASSWORD\" value=\"48\" prompt=\"CTP:无效的投资者或者密码\" />\r\n\t<error id=\"INVALID_LOGIN_IPADDRESS\" value=\"49\" prompt=\"CTP:不合法的登录IP地址\" />\r\n\t<error id=\"OVER_CLOSETODAY_POSITION\" value=\"50\" prompt=\"CTP:平今仓位不足\" />\r\n\t<error id=\"OVER_CLOSEYESTERDAY_POSITION\" value=\"51\" prompt=\"CTP:平昨仓位不足\" />\r\n\t<error id=\"BROKER_NOT_ENOUGH_CONDORDER\" value=\"52\" prompt=\"CTP:经纪公司没有足够可用的条件单数量\" />\r\n\t<error id=\"INVESTOR_NOT_ENOUGH_CONDORDER\" value=\"53\" prompt=\"CTP:投资者没有足够可用的条件单数量\" />\r\n\t<error id=\"BROKER_NOT_SUPPORT_CONDORDER\" value=\"54\" prompt=\"CTP:经纪公司不支持条件单\" />\r\n\t<error id=\"RESEND_ORDER_BROKERINVESTOR_NOTMATCH\" value=\"55\" prompt=\"CTP:重发未知单经纪公司/投资者不匹配\" />\r\n\t<error id=\"SYC_OTP_FAILED\" value=\"56\" prompt=\"CTP:同步动态令牌失败\" />\r\n\t<error id=\"OTP_MISMATCH\" value=\"57\" prompt=\"CTP:动态令牌校验错误\" />\r\n\t<error id=\"OTPPARAM_NOT_FOUND\" value=\"58\" prompt=\"CTP:找不到动态令牌配置信息\" />\r\n\t<error id=\"UNSUPPORTED_OTPTYPE\" value=\"59\" prompt=\"CTP:不支持的动态令牌类型\" />\r\n\t<error id=\"SINGLEUSERSESSION_EXCEED_LIMIT\" value=\"60\" prompt=\"CTP:用户在线会话超出上限\" />\r\n\t<error id=\"EXCHANGE_UNSUPPORTED_ARBITRAGE\" value=\"61\" prompt=\"CTP:该交易所不支持套利/做市商类型报单\" />\r\n\t<error id=\"NO_CONDITIONAL_ORDER_RIGHT\" value=\"62\" prompt=\"CTP:没有条件单交易权限\" />\r\n\t<error id=\"AUTH_FAILED\" value=\"63\" prompt=\"CTP:客户端认证失败\" />\r\n\t<error id=\"NOT_AUTHENT\" value=\"64\" prompt=\"CTP:客户端未认证\" />\r\n\t<error id=\"SWAPORDER_UNSUPPORTED\" value=\"65\" prompt=\"CTP:该合约不支持互换类型报单\" />\r\n\t<error id=\"OPTIONS_ONLY_SUPPORT_SPEC\" value=\"66\" prompt=\"CTP:该期权合约只支持投机类型报单\" />\r\n\t<error id=\"DUPLICATE_EXECORDER_REF\" value=\"67\" prompt=\"CTP:执行宣告错误，不允许重复执行\" />\r\n\t<error id=\"RESEND_EXECORDER_BROKERINVESTOR_NOTMATCH\" value=\"68\" prompt=\"CTP:重发未知执行宣告经纪公司/投资者不匹配\" />\r\n\t<error id=\"EXECORDER_NOTOPTIONS\" value=\"69\" prompt=\"CTP:只有期货期权合约可执行\" />\r\n\t<error id=\"OPTIONS_NOT_SUPPORT_EXEC\" value=\"70\" prompt=\"CTP:该期权合约不支持执行\" />\r\n\t<error id=\"BAD_EXECORDER_ACTION_FIELD\" value=\"71\" prompt=\"CTP:执行宣告字段有误\" />\r\n\t<error id=\"DUPLICATE_EXECORDER_ACTION_REF\" value=\"72\" prompt=\"CTP:执行宣告撤单已报送，不允许重复撤单\" />\r\n\t<error id=\"EXECORDER_NOT_FOUND\" value=\"73\" prompt=\"CTP:执行宣告撤单找不到相应执行宣告\" />\r\n\t<error id=\"OVER_EXECUTE_POSITION\" value=\"74\" prompt=\"CTP:执行仓位不足\" />\r\n\t<error id=\"LOGIN_FORBIDDEN\" value=\"75\" prompt=\"CTP:连续登录失败次数超限，登录被禁止\" />\r\n\t<error id=\"INVALID_TRANSFER_AGENT\" value=\"76\" prompt=\"CTP:非法银期代理关系\" />\r\n\t<error id=\"NO_FOUND_FUNCTION\" value=\"77\" prompt=\"CTP:无此功能\" />\r\n\t<error id=\"SEND_EXCHANGEORDER_FAILED\" value=\"78\" prompt=\"CTP:发送报单失败\" />\r\n\t<error id=\"SEND_EXCHANGEORDERACTION_FAILED\" value=\"79\" prompt=\"CTP:发送报单操作失败\" />\r\n\t<error id=\"PRICETYPE_NOTSUPPORT_BYEXCHANGE\" value=\"80\" prompt=\"CTP:交易所不支持的价格类型\" />\r\n\t<error id=\"BAD_EXECUTE_TYPE\" value=\"81\" prompt=\"CTP:错误的执行类型\" />\r\n\t<error id=\"BAD_OPTION_INSTR\" value=\"82\" prompt=\"CTP:无效的组合合约\" />\r\n\t<error id=\"INSTR_NOTSUPPORT_FORQUOTE\" value=\"83\" prompt=\"CTP:该合约不支持询价\" />\r\n\t<error id=\"RESEND_QUOTE_BROKERINVESTOR_NOTMATCH\" value=\"84\" prompt=\"CTP:重发未知报价经纪公司/投资者不匹配\" />\r\n\t<error id=\"INSTR_NOTSUPPORT_QUOTE\" value=\"85\" prompt=\"CTP:该合约不支持报价\" />\r\n\t<error id=\"QUOTE_NOT_FOUND\" value=\"86\" prompt=\"CTP:报价撤单找不到相应报价\" />\r\n\t<error id=\"OPTIONS_NOT_SUPPORT_ABANDON\" value=\"87\" prompt=\"CTP:该期权合约不支持放弃执行\" />\r\n\t<error id=\"COMBOPTIONS_SUPPORT_IOC_ONLY\" value=\"88\" prompt=\"CTP:该组合期权合约只支持IOC\" />\r\n\t<error id=\"OPEN_FILE_FAILED\" value=\"89\" prompt=\"CTP:打开文件失败\" />\r\n\t<error id=\"NEED_RETRY\" value=\"90\" prompt=\"CTP：查询未就绪，请稍后重试\" />\r\n\t<error id=\"EXCHANGE_RTNERROR\" value=\"91\" prompt=\"CTP：交易所返回的错误\" />\r\n\t<error id=\"QUOTE_DERIVEDORDER_ACTIONERROR\" value=\"92\" prompt=\"CTP:报价衍生单要等待交易所返回才能撤单\" />\r\n\t<error id=\"INSTRUMENTMAP_NOT_FOUND\" value=\"93\" prompt=\"CTP:找不到组合合约映射\" />\r\n\t<error id=\"CANCELLATION_OF_OTC_DERIVED_ORDER_NOT_ALLOWED\" value=\"94\" prompt=\"CTP:不允许撤销OTC衍生报单\" />\r\n\t<error id=\"BAD_PRICE_VALUE\" value=\"95\" prompt=\"CTP：不支持的价格\" />\r\n\t<!--SPBM-->\r\n\t<error id=\"SPBMFUTPARAM_NOT_FOUND\" value=\"96\" prompt=\"CTP:找不到SPBM期货合约参数\" />\r\n\t<error id=\"SPBMOPTPARAM_NOT_FOUND\" value=\"97\" prompt=\"CTP:找不到SPBM期权合约参数\" />\r\n\t<error id=\"SPBMINTRAPARAM_NOT_FOUND\" value=\"98\" prompt=\"CTP:找不到SPBM品种内对锁仓折扣参数\" />\r\n\t<!--RULE-->\r\n\t<error id=\"RULEINSTRPARAM_NOT_FOUND\" value=\"99\" prompt=\"CTP:找不到RULE合约参数\" />\r\n\t<error id=\"RULEINTRAPARAM_NOT_FOUND\" value=\"100\" prompt=\"CTP:找不到RULE品种内对锁仓折扣参数\" />\r\n\t<!--灾备系统错误代码 -->\r\n\t<error id=\"NO_TRADING_RIGHT_IN_SEPC_DR\" value=\"101\" prompt=\"CTP:用户在本系统没有报单权限\" />\r\n\t<error id=\"NO_DR_NO\" value=\"102\" prompt=\"CTP:系统缺少灾备标示号\" />\r\n\t<error id=\"BATCHACTION_NOSUPPORT\" value=\"103\" prompt=\"CTP:该交易所不支持批量撤单\" />\r\n\t<error id=\"POSI_LIMIT\" value=\"106\" prompt=\"CTP:投资者限仓\" />\r\n\t<error id=\"OUT_OF_TIMEINTERVAL\" value=\"113\" prompt=\"CTP:当前时间禁止询价\" />\r\n\t<error id=\"OUT_OF_PRICEINTERVAL\" value=\"114\" prompt=\"CTP:当前价差禁止询价\" />\r\n\t<error id=\"ORDER_FREQ_LIMIT\" value=\"116\" prompt=\"CTP:下单频率限制\" />\r\n\t<error id=\"WEAK_PASSWORD\" value=\"131\" prompt=\"CTP：您当前密码为弱密码，请修改成强密码后重新登录\" />\r\n\t<error id=\"SIMPLE_PASSWORD\" value=\"132\" prompt=\"CTP：您输入的密码过于简单\" />\r\n\t<error id=\"EXEC_FORBIDDEN_TIME\" value=\"139\" prompt=\"CTP:当前时间禁止行权\" />\r\n\t<error id=\"FIRST_LOGIN\" value=\"140\" prompt=\"CTP:首次登录必须修改密码，请修改密码后重新登录\" />\r\n\t<error id=\"PWD_OUT_OF_DATE\" value=\"141\" prompt=\"CTP:您当前密码已过期，请修改后登录\" />\r\n\t<error id=\"PWD_MUST_DIFF\" value=\"142\" prompt=\"CTP:修改密码失败。新密码不允许与旧密码相同\" />\r\n\t<error id=\"IP_FORBIDDEN\" value=\"143\" prompt=\"CTP:您登录失败次数过多，IP被禁止登入CTP\" />\r\n\t<error id=\"IP_BLACK\" value=\"144\" prompt=\"CTP:您当前IP在黑名单中，被禁止登录和认证\" />\r\n\t<error id=\"NO_AUTH_RIGHT_IN_SEPC_DR\" value=\"145\" prompt=\"CTP:终端在本系统没有认证权限\" />\r\n\t<error id=\"INVESTOR_ID_IS_MISSING\" value=\"146\" prompt=\"CTP:缺少InvestorID字段，请填入InvestorID\" />\r\n\t<error id=\"EXCHANGE_ID_IS_MISSING\" value=\"147\" prompt=\"CTP:缺少ExchangeID字段，请填入ExchangeID\" />\r\n\t<error id=\"EXCHANGE_ID_IS_INVALID\" value=\"148\" prompt=\"CTP:无效的ExchangeID字段，请填入正确的ExchangeID\" />\r\n\t<error id=\"ACCOUNT_ID_IS_MISSING\" value=\"149\" prompt=\"CTP:缺少AccountID字段，请填入AccountID\" />\r\n\t<error id=\"EXCHANGE_ID_IS_WRONG\" value=\"150\" prompt=\"CTP:交易所代码错误\" />\r\n\t<error id=\"DEL_COMB_ACTION_NO_REC\" value=\"151\" prompt=\"CTP:删除拆分组合指令：没有找到该记录\" />\r\n\t<error id=\"DEL_COMB_ACTION_TOO_FAST\" value=\"152\" prompt=\"CTP:删除拆分组合指令：原指令需要等待30s 才能删除\" />\r\n\t<error id=\"COMB_ACTION_SHORT_MONEY\" value=\"153\" prompt=\"CTP:拆分组合钱不足\" />\r\n\t<error id=\"QK_BUSY\" value=\"154\" prompt=\"CTP:查询核心忙 请稍后重试\" />\r\n\t<error id=\"CFMMC_NO_CONNECTION\" value=\"155\" prompt=\"CTP:未连接监控中心\" />\r\n\t<error id=\"CLOSE_OPTION_NO_MONEY\" value=\"156\" prompt=\"CTP:平期权多头后资金为负（收益小于平仓手续费），只可由风控人员强平\" />\r\n\t<error id=\"CANCEL_UNKNOWN_ORDER_UNSUPPORTED\" value=\"157\" prompt=\"CTP:该交易所不支持撤销未知单\" />\r\n\t<error id=\"OVER_INFO_CNT_LIMIT\" value=\"158\" prompt=\"CTP:超过信息量限制\" />\r\n\t<error id=\"OVER_INVST_PARKED_ORDER_LIMIT\" value=\"159\" prompt=\"CTP:超过个人预埋单最大量限制\" />\r\n\t<error id=\"OVER_BROKER_PARKED_ORDER_LIMIT\" value=\"160\" prompt=\"CTP:超过经纪公司预埋单最大量限制\" />\r\n\t<error id=\"PARKED_ORDER_WRONG_TYPE\" value=\"161\" prompt=\"CTP:预埋单:不支持的触发类型\" />\r\n\t<error id=\"NOT_TRADING_PERIOD\" value=\"162\" prompt=\"CTP:产品不在可以交易的阶段\" />\r\n\t<error id=\"PRICE_OVER_LIMIT\" value=\"163\" prompt=\"CTP:报单价格不在涨跌停板价范围内\" />\r\n\t<error id=\"VOLUME_NOT_VALID\" value=\"164\" prompt=\"CTP:下单数量不符合交易所规范\" />\r\n\t<error id=\"PRICE_WRONG_TICK\" value=\"165\" prompt=\"CTP:报单价格非最小变动价位整数倍\" />\r\n\t<!--转帐系统错误代码 -->\r\n\t<error id=\"SEND_INSTITUTION_CODE_ERROR\" value=\"1000\" prompt=\"CTP:银期转账：发送机构代码错误\" />\r\n\t<error id=\"NO_GET_PLATFORM_SN\" value=\"1001\" prompt=\"CTP:银期转账：取平台流水号错误\" />\r\n\t<error id=\"ILLEGAL_TRANSFER_BANK\" value=\"1002\" prompt=\"CTP:银期转账：不合法的转账银行\" />\r\n\t<error id=\"ALREADY_OPEN_ACCOUNT\" value=\"1003\" prompt=\"CTP:银期转账：已经开户\" />\r\n\t<error id=\"NOT_OPEN_ACCOUNT\" value=\"1004\" prompt=\"CTP:银期转账：未开户\" />\r\n\t<error id=\"PROCESSING\" value=\"1005\" prompt=\"CTP:银期转账：处理中\" />\r\n\t<error id=\"OVERTIME\" value=\"1006\" prompt=\"CTP:银期转账：交易超时\" />\r\n\t<error id=\"RECORD_NOT_FOUND\" value=\"1007\" prompt=\"CTP:银期转账：找不到记录\" />\r\n\t<error id=\"NO_FOUND_REVERSAL_ORIGINAL_TRANSACTION\" value=\"1008\" prompt=\"CTP:银期转账：找不到被冲正的原始交易\" />\r\n\t<error id=\"CONNECT_HOST_FAILED\" value=\"1009\" prompt=\"CTP:银期转账：连接主机失败\" />\r\n\t<error id=\"SEND_FAILED\" value=\"1010\" prompt=\"CTP:银期转账：发送失败\" />\r\n\t<error id=\"LATE_RESPONSE\" value=\"1011\" prompt=\"CTP:银期转账：迟到应答\" />\r\n\t<error id=\"REVERSAL_BANKID_NOT_MATCH\" value=\"1012\" prompt=\"CTP:银期转账：冲正交易银行代码错误\" />\r\n\t<error id=\"REVERSAL_BANKACCOUNT_NOT_MATCH\" value=\"1013\" prompt=\"CTP:银期转账：冲正交易银行账户错误\" />\r\n\t<error id=\"REVERSAL_BROKERID_NOT_MATCH\" value=\"1014\" prompt=\"CTP:银期转账：冲正交易经纪公司代码错误\" />\r\n\t<error id=\"REVERSAL_ACCOUNTID_NOT_MATCH\" value=\"1015\" prompt=\"CTP:银期转账：冲正交易资金账户错误\" />\r\n\t<error id=\"REVERSAL_AMOUNT_NOT_MATCH\" value=\"1016\" prompt=\"CTP:银期转账：冲正交易交易金额错误\" />\r\n\t<error id=\"DB_OPERATION_FAILED\" value=\"1017\" prompt=\"CTP:银期转账：数据库操作错误\" />\r\n\t<error id=\"SEND_ASP_FAILURE\" value=\"1018\" prompt=\"CTP:银期转账：发送到交易系统失败\" />\r\n\t<error id=\"NOT_SIGNIN\" value=\"1019\" prompt=\"CTP:银期转账：没有签到\" />\r\n\t<error id=\"ALREADY_SIGNIN\" value=\"1020\" prompt=\"CTP:银期转账：已经签到\" />\r\n\t<error id=\"AMOUNT_OR_TIMES_OVER\" value=\"1021\" prompt=\"CTP:银期转账：金额或次数超限\" />\r\n\t<error id=\"NOT_IN_TRANSFER_TIME\" value=\"1022\" prompt=\"CTP:银期转账：这一时间段不能转账\" />\r\n\t<error id=\"BANK_SERVER_ERROR\" value=\"1023\" prompt=\"银行主机错\" />\r\n\t<error id=\"BANK_SERIAL_IS_REPEALED\" value=\"1024\" prompt=\"CTP:银期转账：银行已经冲正\" />\r\n\t<error id=\"BANK_SERIAL_NOT_EXIST\" value=\"1025\" prompt=\"CTP:银期转账：银行流水不存在\" />\r\n\t<error id=\"NOT_ORGAN_MAP\" value=\"1026\" prompt=\"CTP:银期转账：机构没有签约\" />\r\n\t<error id=\"EXIST_TRANSFER\" value=\"1027\" prompt=\"CTP:银期转账：存在转账，不能销户\" />\r\n\t<error id=\"BANK_FORBID_REVERSAL\" value=\"1028\" prompt=\"CTP:银期转账：银行不支持冲正\" />\r\n\t<error id=\"DUP_BANK_SERIAL\" value=\"1029\" prompt=\"CTP:银期转账：重复的银行流水\" />\r\n\t<error id=\"FBT_SYSTEM_BUSY\" value=\"1030\" prompt=\"CTP:银期转账：转账系统忙，稍后再试\" />\r\n\t<error id=\"MACKEY_SYNCING\" value=\"1031\" prompt=\"CTP:银期转账：MAC密钥正在同步\" />\r\n\t<error id=\"ACCOUNTID_ALREADY_REGISTER\" value=\"1032\" prompt=\"CTP:银期转账：资金账户已经登记\" />\r\n\t<error id=\"BANKACCOUNT_ALREADY_REGISTER\" value=\"1033\" prompt=\"CTP:银期转账：银行账户已经登记\" />\r\n\t<error id=\"DUP_BANK_SERIAL_REDO_OK\" value=\"1034\" prompt=\"CTP:银期转账：重复的银行流水,重发成功\" />\r\n\t<error id=\"CURRENCYID_NOT_SUPPORTED\" value=\"1035\" prompt=\"CTP:银期转账：该币种代码不支持\" />\r\n\t<error id=\"INVALID_MAC\" value=\"1036\" prompt=\"CTP:银期转账：MAC值验证失败\" />\r\n\t<error id=\"NOT_SUPPORT_SECAGENT_BY_BANK\" value=\"1037\" prompt=\"CTP:银期转账：不支持银行端发起的二级代理商转账和查询\" />\r\n\t<error id=\"PINKEY_SYNCING\" value=\"1038\" prompt=\"CTP:银期转账：PIN密钥正在同步\" />\r\n\t<error id=\"SECAGENT_QUERY_BY_CCB\" value=\"1039\" prompt=\"CTP:银期转账：建行发起的二级代理商查询\" />\r\n\t<error id=\"BANKACCOUNT_NOT_EMPTY\" value=\"1040\" prompt=\"CTP:银期转账：银行账户不能为空\" />\r\n\t<error id=\"INVALID_RESERVE_OPEN_ACCOUNT\" value=\"1041\" prompt=\"CTP:银期转账：资金账户存在，预约开户失败\" />\r\n\t<error id=\"OPEN_ACCOUNT_NOT_DEFAULT_ACCOUNT\" value=\"1042\" prompt=\"CTP:银期转账：开户请求的银行卡号和预留的账号不同\" />\r\n\t<error id=\"BANK_SYSTEM_INTERNAL_ERROR\" value=\"1043\" prompt=\"银行系统内部错误\" />\r\n\t<error id=\"OFFER_LOCALTIME_OFFSET_IS_TOO_LARGE\" value=\"1044\" prompt=\"银期转账：银期报盘机器时间偏移太大\" />\r\n\t<error id=\"FUTURESERIAL_HAS_BEEN_PROCESSED\" value=\"1045\" prompt=\"银期转账：该期货流水号已经处理过\" />\r\n\t<error id=\"SEC_TRANSFER_NOT_AVAILABLE\" value=\"1046\" prompt=\"银期转账：次席转账组件当前不可用\" />\r\n\t<!-- add for transfer begin -->\r\n\t<error id=\"NO_VALID_BANKOFFER_AVAILABLE\" value=\"2000\" prompt=\"CTP:该报盘未连接到银行\" />\r\n\t<error id=\"PASSWORD_MISMATCH\" value=\"2001\" prompt=\"CTP:资金密码错误\" />\r\n\t<error id=\"DUPLATION_BANK_SERIAL\" value=\"2004\" prompt=\"CTP:银行流水号重复\" />\r\n\t<error id=\"DUPLATION_OFFER_SERIAL\" value=\"2005\" prompt=\"CTP:报盘流水号重复\" />\r\n\t<error id=\"SERIAL_NOT_EXSIT\" value=\"2006\" prompt=\"CTP:被冲正流水不存在(冲正交易)\" />\r\n\t<error id=\"SERIAL_IS_REPEALED\" value=\"2007\" prompt=\"CTP:原流水已冲正(冲正交易)\" />\r\n\t<error id=\"SERIAL_MISMATCH\" value=\"2008\" prompt=\"CTP:与原流水信息不符(冲正交易)\" />\r\n\t<error id=\"IdentifiedCardNo_MISMATCH\" value=\"2009\" prompt=\"CTP:证件号码或类型错误\" />\r\n\t<error id=\"ACCOUNT_NOT_FUND\" value=\"2011\" prompt=\"CTP:资金账户不存在\" />\r\n\t<error id=\"ACCOUNT_NOT_ACTIVE\" value=\"2012\" prompt=\"CTP:资金账户已经销户\" />\r\n\t<error id=\"NOT_ALLOW_REPEAL_BYMANUAL\" value=\"2013\" prompt=\"CTP:该交易不能执行手工冲正\" />\r\n\t<error id=\"AMOUNT_OUTOFTHEWAY\" value=\"2014\" prompt=\"CTP:转帐金额错误\" />\r\n\t<error id=\"EXCHANGERATE_NOT_FOUND\" value=\"2015\" prompt=\"CTP:找不到汇率\" />\r\n\t<error id=\"RESERVE_OPEN_ACCOUNT_NOT_FUND\" value=\"2016\" prompt=\"CTP:找不到预约开户请求\" />\r\n\t<error id=\"DUPLICATE_RESERVE_OPEN_ACCOUNT_NOT_FUND\" value=\"2017\" prompt=\"CTP:重复的预约开户请求\" />\r\n\t<error id=\"BANK_INTERNAL_ERR\" value=\"2018\" prompt=\"CTP:银行内部错误,需要找银行确认成功还是失败\" />\r\n\t<error id=\"WAITING_OFFER_RSP\" value=\"999999\" prompt=\"CTP:等待银期报盘处理结果\" />\r\n\t<error id=\"TRANSFER_NOT_DEFAULT_ACCOUNT\" value=\"2019\" prompt=\"CTP:转账卡号非预留银行账户\" />\r\n\r\n\t<!-- add for transfer end -->\r\n\t<!--add\r\n\t建行新一代银期-->\r\n\t<error id=\"PW_PASSWORD\" value=\"2050\" prompt=\"建行银期：密码与认证(业务错误)\" />\r\n\t<error id=\"AL_AMOUNT_LIMITATION\" value=\"2051\" prompt=\"建行银期：数量与限额(业务错误)\" />\r\n\t<error id=\"AC_AUTHORITY_CONTROL\" value=\"2052\" prompt=\"建行银期：权限控制(业务错误)\" />\r\n\t<error id=\"DC_DATA_CONTEXT\" value=\"2053\" prompt=\"建行银期：信息滥缺(业务错误)或者数据内容相关(技术错误)\" />\r\n\t<error id=\"CE_CONTENT_ERROR\" value=\"2054\" prompt=\"建行银期：内容非法(业务错误)\" />\r\n\t<error id=\"DO_DUPLICATE_OPERATION\" value=\"2055\" prompt=\"建行银期：重复交易(业务错误)\" />\r\n\t<error id=\"TM_TIME\" value=\"2056\" prompt=\"建行银期： 时间与期限(业务错误)\" />\r\n\t<error id=\"RC_RISK_CONTROL\" value=\"2057\" prompt=\"建行银期：风险控制(业务错误)\" />\r\n\t<error id=\"BL_BUSINESS_LOGIC\" value=\"2058\" prompt=\"建行银期：业务逻辑(业务错误)\" />\r\n\t<error id=\"NA_NA\" value=\"2059\" prompt=\"建行银期： 不确定交易结果(技术错误)\" />\r\n\t<error id=\"HW_HARDWARE\" value=\"2060\" prompt=\"建行银期： 硬件错误(技术错误)\" />\r\n\t<error id=\"IO_IO\" value=\"2062\" prompt=\"建行银期： 读写相关(技术错误)\" />\r\n\t<error id=\"DB_DATABASE\" value=\"2063\" prompt=\"建行银期： 数据库相关(技术错误)\" />\r\n\t<error id=\"NC_NETWORK_COMMUNICATION\" value=\"2064\" prompt=\"建行银期：网络通讯(技术错误)\" />\r\n\t<error id=\"SS_SECURITY_SERVICE\" value=\"2065\" prompt=\"建行银期：安全服务(技术错误)\" />\r\n\t<error id=\"CM_COMPONENTS\" value=\"2066\" prompt=\"建行银期： 组件模块(技术错误)\" />\r\n\t<error id=\"FC_FLOW_CONTROL\" value=\"2067\" prompt=\"建行银期：流量控制(技术错误)\" />\r\n\t<error id=\"TL_TECHNICAL_LOGIC\" value=\"2069\" prompt=\"建行银期：技术逻辑(技术错误)\" />\r\n\t<error id=\"AT_ABSOLUTE_TECHNIQUE\" value=\"2070\" prompt=\"建行银期：纯技术性错误(技术错误)\" />\r\n\r\n\t<!--end\r\n\t建行新一代银期-->\r\n\t<!--换汇系统错误代码\r\n\tbgn-->\r\n\t<error id=\"FBE_NO_GET_PLATFORM_SN\" value=\"3001\" prompt=\"CTP:银期换汇：取平台流水号错误\" />\r\n\t<error id=\"FBE_ILLEGAL_TRANSFER_BANK\" value=\"3002\" prompt=\"CTP:银期换汇：不合法的转账银行\" />\r\n\t<error id=\"FBE_PROCESSING\" value=\"3005\" prompt=\"CTP:银期换汇：处理中\" />\r\n\t<error id=\"FBE_OVERTIME\" value=\"3006\" prompt=\"CTP:银期换汇：交易超时\" />\r\n\t<error id=\"FBE_RECORD_NOT_FOUND\" value=\"3007\" prompt=\"CTP:银期换汇：找不到记录\" />\r\n\t<error id=\"FBE_CONNECT_HOST_FAILED\" value=\"3009\" prompt=\"CTP:银期换汇：连接主机失败\" />\r\n\t<error id=\"FBE_SEND_FAILED\" value=\"3010\" prompt=\"CTP:银期换汇：发送失败\" />\r\n\t<error id=\"FBE_LATE_RESPONSE\" value=\"3011\" prompt=\"CTP:银期换汇：迟到应答\" />\r\n\t<error id=\"FBE_DB_OPERATION_FAILED\" value=\"3017\" prompt=\"CTP:银期换汇：数据库操作错误\" />\r\n\t<error id=\"FBE_NOT_SIGNIN\" value=\"3019\" prompt=\"CTP:银期换汇：没有签到\" />\r\n\t<error id=\"FBE_ALREADY_SIGNIN\" value=\"3020\" prompt=\"CTP:银期换汇：已经签到\" />\r\n\t<error id=\"FBE_AMOUNT_OR_TIMES_OVER\" value=\"3021\" prompt=\"CTP:银期换汇：金额或次数超限\" />\r\n\t<error id=\"FBE_NOT_IN_TRANSFER_TIME\" value=\"3022\" prompt=\"CTP:银期换汇：这一时间段不能换汇\" />\r\n\t<error id=\"FBE_BANK_SERVER_ERROR\" value=\"3023\" prompt=\"CTP:银期换汇：银行主机错\" />\r\n\t<error id=\"FBE_NOT_ORGAN_MAP\" value=\"3026\" prompt=\"CTP:银期换汇：机构没有签约\" />\r\n\t<error id=\"FBE_SYSTEM_BUSY\" value=\"3030\" prompt=\"CTP:银期换汇：换汇系统忙，稍后再试\" />\r\n\t<error id=\"FBE_CURRENCYID_NOT_SUPPORTED\" value=\"3035\" prompt=\"CTP:银期换汇：该币种代码不支持\" />\r\n\t<error id=\"FBE_WRONG_BANK_ACCOUNT\" value=\"3036\" prompt=\"CTP:银期换汇：银行帐号不正确\" />\r\n\t<error id=\"FBE_BANK_ACCOUNT_NO_FUNDS\" value=\"3037\" prompt=\"CTP:银期换汇：银行帐户余额不足\" />\r\n\t<error id=\"FBE_DUP_CERT_NO\" value=\"3038\" prompt=\"CTP:银期换汇：凭证号重复\" />\r\n\t<!--换汇系统错误代码\r\n\tend-->\r\n\r\n\t<!--登录鉴权错误代码\r\n\tbegin-->\r\n\t<error id=\"API_UNSUPPORTED_VERSION\" value=\"3039\" prompt=\"CTP: 不支持该API版本\" />\r\n\t<error id=\"API_INVALID_KEY\" value=\"3040\" prompt=\"CTP: 无效的API KEY\" />\r\n\t<!--登录鉴权错误代码\r\n\tend-->\r\n\r\n\t<error id=\"OPTION_SELF_CLOSE_NOT_OPTION\" value=\"3041\" prompt=\"CTP:期权对冲,履约对冲:非期权合约\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_DUPLICATE_REF\" value=\"3042\" prompt=\"CTP:期权对冲,履约对冲:请求引用不合法\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_BAD_FIELD\" value=\"3043\" prompt=\"CTP:期权对冲,履约对冲:非法字段 \" />\r\n\t<error id=\"OPTION_SELF_CLOSE_REC_NOT_FOUND\" value=\"3044\" prompt=\"CTP:期权对冲,履约对冲:撤销未找到记录\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_STATUS_ERR\" value=\"3045\" prompt=\"CTP:期权对冲,履约对冲:对冲状态不对，不能撤销\" />\r\n\t<error id=\"OPTION_SELF_CLOSE_DOUBLE_SET_ERR\" value=\"3046\" prompt=\"CTP:期权对冲,履约对冲:不能重复设置，只能先撤销再设置\" />\r\n\t<error id=\"QUOTE_WRONG_HEDGE_TYPE\" value=\"3047\" prompt=\"CTP:报价不支持该投机套保类型\" />\r\n\t<error id=\"API_FRONT_SHAKE_HAND_ERR\" value=\"4040\" prompt=\"CTP:API Front shake hand err\" />\r\n\t<error id=\"DUPLICATE_SUBMIT\" value=\"4041\" prompt=\"CTP:DUPLICATE_SUBMIT\" />\r\n\t<error id=\"AUTHIP_CHECK_ERR\" value=\"4042\" prompt=\"CTP:IP授权验证失败\" />\r\n\t<error id=\"AUTHUSER_CHECK_ERR\" value=\"4043\" prompt=\"CTP:用户与客户端授权验证失败\" />\r\n\t<error id=\"QUOTE_WRONG_REPALACE_SYSID\" value=\"4050\" prompt=\"CTP:报价指定的顶单编号不合法（中金所）\" />\r\n\t<error id=\"AUTH_IP_FORBIDDEN\" value=\"4060\" prompt=\"CTP:您认证失败次数过多，IP进入认证禁止列表\" />\r\n\t<error id=\"MORTGAGE_NOT_BALANCE\" value=\"4061\" prompt=\"CTP:未满足质押配比要求\" />\r\n\r\n\t<error id=\"SMAPI_SSL_CONNECT_ERR\" value=\"4100\" prompt=\"CTP:SSL Connect Error.\" />\r\n\t<error id=\"SMAPI_WRONG_USERIDORNAME\" value=\"4101\" prompt=\"CTP:Wrong User ID or Name.\" />\r\n\t<error id=\"SMAPI_CERT_VERIFY_FAILED\" value=\"4102\" prompt=\"CTP:Cert Verify Failed.\" />\r\n\t<error id=\"SMAPI_CERT_PROCESS_TIMEOUT\" value=\"4103\" prompt=\"CTP:SM Process Timeout.\" />\r\n\t<error id=\"SMAPI_LOGIN_ERROR\" value=\"4104\" prompt=\"CTP:Login Error.\" />\r\n\t<error id=\"SMAPI_SSL_CONNECT_TIMEOUT\" value=\"4105\" prompt=\"CTP:SSL Connect Timeout.\" />\r\n\t<error id=\"SMAPI_CERT_CONNECT_ERROR\" value=\"4106\" prompt=\"CTP:Cert Connect Error.\" />\r\n\t<error id=\"SMAPI_CERT_NOT_EXIST\" value=\"4107\" prompt=\"CTP:Cert Is Not Existed.\" />\r\n\t<error id=\"SMAPI_CERT_EXPIRED\" value=\"4108\" prompt=\"CTP:Cert Is Expired.\" />\r\n\t<error id=\"SMAPI_PIN_INCORRECT\" value=\"4109\" prompt=\"CTP:PIN Is Not Corrected.\" />\r\n\t<error id=\"SMAPI_PIN_LOCKED\" value=\"4110\" prompt=\"CTP:PIN Is Locked.\" />\r\n\t<error id=\"SMAPI_LOAD_ERROR\" value=\"4111\" prompt=\"CTP:SMApi Load Error.\" />\r\n\r\n\r\n\t<error id=\"RCAMS_COMBPRODUCTINFO_NOT_FOUND\" value=\"5000\" prompt=\"CTP:找不到RCAMS产品组合信息\" />\r\n\t<error id=\"RCAMS_SHORTOPTADJUSTPARAM_NOT_FOUND\" value=\"5001\" prompt=\"CTP:找不到RCAMS空头期权风险调整参数\" />\r\n\r\n\r\n\t<error id=\"TK_BUSY\" value=\"5002\" prompt=\"CTP:系统忙\" />\r\n\r\n\t<error id=\"NOT_SUPPORT_SECAGENT_BY_SECTRANSFER\" value=\"5050\"\r\n\t\tprompt=\"CTP:银期转账：非银期中心不支持二级代理商转账和查询\" />\r\n\t<error id=\"DUP_SEQ\" value=\"5051\" prompt=\"CTP:序号字段重复\" />\r\n\r\n\t<error id=\"OVER_SUB_INST_LIMIT\" value=\"6000\" prompt=\"CTP:sub too many insts\" />\r\n\r\n\t<error id=\"OFFSET_INSTR_PROD\" value=\"6001\" prompt=\"CTP:对冲的合约/产品设置不合法\" />\r\n\t<error id=\"OFFSET_VOLUME\" value=\"6002\" prompt=\"CTP:对冲的数量设置不合法\" />\r\n\t<error id=\"OFFSET_SETTING_DOUBLE_SET\" value=\"6004\" prompt=\"CTP:对冲设置不能重复提交，需要先撤销再设置\" />\r\n\t<error id=\"OFFSET_SETTING_REC_NOT_FOUND\" value=\"6005\" prompt=\"CTP:撤销对冲设置未找到记录\" />\r\n\t<error id=\"OFFSET_SETTING_STATUS_ERR\" value=\"6006\" prompt=\"CTP:对冲状态不对，不能撤销\" />\r\n</errors>"
  },
  {
    "path": "native/ctp_bridge/build_win.bat",
    "content": "@echo off\r\nsetlocal\r\n\r\nchcp 936 >nul\r\n\r\nset \"VCVARS=D:\\Program Files\\Microsoft Visual Studio\\18\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat\"\r\nif not exist \"%VCVARS%\" (\r\n    echo [ERROR] vcvars64.bat not found: %VCVARS%\r\n    exit /b 1\r\n)\r\n\r\ncall \"%VCVARS%\"\r\nif errorlevel 1 (\r\n    echo [ERROR] Failed to initialize Visual Studio build environment.\r\n    exit /b 1\r\n)\r\n\r\ncd /d \"%~dp0\"\r\ncls\r\n\r\ncmake --preset win\r\nif errorlevel 1 exit /b 1\r\n\r\ncmake --build --preset win\r\nif errorlevel 1 exit /b 1\r\n\r\necho [OK] Build finished.\r\nexit /b 0\r\n"
  },
  {
    "path": "native/ctp_bridge/scripts/build_native_bridge.ps1",
    "content": "param(\r\n    [string]$BuildDir = \"build\",\r\n    [string]$Config = \"Release\"\r\n)\r\n\r\nSet-StrictMode -Version Latest\r\n$ErrorActionPreference = \"Stop\"\r\n\r\nfunction Write-Step([string]$Message) {\r\n    Write-Host \"`n==> $Message\" -ForegroundColor Cyan\r\n}\r\n\r\n$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path\r\n$bridgeRoot = Split-Path -Parent $scriptDir\r\n\r\nWrite-Step \"Configure CMake\"\r\nSet-Location $bridgeRoot\r\n& cmake -S . -B $BuildDir\r\nif ($LASTEXITCODE -ne 0) {\r\n    throw \"cmake configure failed with exit code: $LASTEXITCODE\"\r\n}\r\n\r\nWrite-Step \"Build module\"\r\n& cmake --build $BuildDir --config $Config --parallel\r\nif ($LASTEXITCODE -ne 0) {\r\n    throw \"cmake build failed with exit code: $LASTEXITCODE\"\r\n}\r\n\r\nWrite-Step \"Done\"\r\nWrite-Host \"Build output: $bridgeRoot/$BuildDir\" -ForegroundColor Green\r\n"
  },
  {
    "path": "native/ctp_bridge/scripts/sync_thost_api.ps1",
    "content": "Set-StrictMode -Version Latest\r\n$ErrorActionPreference = \"Stop\"\r\n\r\nfunction Write-Step([string]$Message) {\r\n    Write-Host \"`n==> $Message\" -ForegroundColor Cyan\r\n}\r\n\r\n$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path\r\n$bridgeRoot = Split-Path -Parent $scriptDir\r\n$targetApiRoot = Join-Path $bridgeRoot \"api\"\r\n\r\n# 固定源路径：后续只需更新 backend-ctp/api，再执行本脚本即可\r\n$sourceApiRoot = \"D:\\github\\backend-ctp\\api\"\r\n\r\n$srcWin = Join-Path $sourceApiRoot \"win\"\r\n$srcLinux = Join-Path $sourceApiRoot \"linux\"\r\n\r\nif (-not (Test-Path $srcWin)) {\r\n    throw \"Source win dir not found: $srcWin\"\r\n}\r\nif (-not (Test-Path $srcLinux)) {\r\n    throw \"Source linux dir not found: $srcLinux\"\r\n}\r\n\r\nWrite-Step \"Sync Thost API files from fixed source\"\r\nNew-Item -ItemType Directory -Path $targetApiRoot -Force | Out-Null\r\nCopy-Item -Path $srcWin -Destination $targetApiRoot -Recurse -Force\r\nCopy-Item -Path $srcLinux -Destination $targetApiRoot -Recurse -Force\r\n\r\nWrite-Step \"Done\"\r\nWrite-Host \"Synced to: $targetApiRoot\" -ForegroundColor Green\r\n"
  },
  {
    "path": "native/ctp_bridge/src/py_module.cpp",
    "content": "#include <pybind11/pybind11.h>\r\n#include <pybind11/stl.h>\r\n#include <chrono>\r\n#include <condition_variable>\r\n#include <cstring>\r\n#include <filesystem>\r\n#include <mutex>\r\n#include <stdexcept>\r\n#include <string>\r\n#include <thread>\r\n#include <unordered_map>\r\n#include <utility>\r\n#include <vector>\r\n#include \"ThostFtdcMdApi.h\"\r\n#include \"ThostFtdcTraderApi.h\"\r\nnamespace py = pybind11;\r\nnamespace {\r\nvoid copy_cstr(char* dst, size_t dst_size, const std::string& value) {\r\n    if (dst == nullptr || dst_size == 0) {\r\n        return;\r\n    }\r\n    std::memset(dst, 0, dst_size);\r\n    if (!value.empty()) {\r\n        std::strncpy(dst, value.c_str(), dst_size - 1);\r\n    }\r\n}\r\nstd::string get_str(const py::dict& d, const char* key, const std::string& fallback = \"\") {\r\n    if (!d.contains(py::str(key))) {\r\n        return fallback;\r\n    }\r\n    return py::str(d[py::str(key)]).cast<std::string>();\r\n}\r\nint get_int(const py::dict& d, const char* key, int fallback = 0) {\r\n    if (!d.contains(py::str(key))) {\r\n        return fallback;\r\n    }\r\n    return py::int_(d[py::str(key)]).cast<int>();\r\n}\r\ndouble get_double(const py::dict& d, const char* key, double fallback = 0.0) {\r\n    if (!d.contains(py::str(key))) {\r\n        return fallback;\r\n    }\r\n    return py::float_(d[py::str(key)]).cast<double>();\r\n}\r\npy::str decode_text(const char* value) {\r\n    if (value == nullptr) {\r\n        return py::str(\"\");\r\n    }\r\n    const auto len = std::strlen(value);\r\n    if (len == 0) {\r\n        return py::str(\"\");\r\n    }\r\n    PyObject* obj = PyUnicode_Decode(value, static_cast<Py_ssize_t>(len), \"utf-8\", \"strict\");\r\n    if (!obj) {\r\n        PyErr_Clear();\r\n        obj = PyUnicode_Decode(value, static_cast<Py_ssize_t>(len), \"gb18030\", \"strict\");\r\n    }\r\n    if (!obj) {\r\n        PyErr_Clear();\r\n        obj = PyUnicode_Decode(value, static_cast<Py_ssize_t>(len), \"gbk\", \"strict\");\r\n    }\r\n    if (!obj) {\r\n        PyErr_Clear();\r\n        obj = PyUnicode_Decode(value, static_cast<Py_ssize_t>(len), \"utf-8\", \"replace\");\r\n    }\r\n    if (!obj) {\r\n        PyErr_Clear();\r\n        obj = PyUnicode_Decode(value, static_cast<Py_ssize_t>(len), \"gb18030\", \"replace\");\r\n    }\r\n    if (!obj) {\r\n        PyErr_Clear();\r\n        obj = PyUnicode_Decode(value, static_cast<Py_ssize_t>(len), \"gbk\", \"replace\");\r\n    }\r\n    if (!obj) {\r\n        PyErr_Clear();\r\n        obj = PyUnicode_DecodeLatin1(value, static_cast<Py_ssize_t>(len), nullptr);\r\n    }\r\n    if (!obj) {\r\n        PyErr_Clear();\r\n        return py::str(\"\");\r\n    }\r\n    return py::reinterpret_steal<py::str>(obj);\r\n}\r\n} // namespace\r\nclass CtpClient;\r\nclass TraderSpi final : public CThostFtdcTraderSpi {\r\n  public:\r\n    explicit TraderSpi(CtpClient* owner) : owner_(owner) {}\r\n    void OnFrontConnected() override;\r\n    void OnFrontDisconnected(int nReason) override;\r\n    void OnRspAuthenticate(CThostFtdcRspAuthenticateField* pRspAuthenticateField, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspUserLogin(CThostFtdcRspUserLoginField* pRspUserLogin, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspError(CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspQryTradingAccount(CThostFtdcTradingAccountField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspQryInstrument(CThostFtdcInstrumentField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspQryOrder(CThostFtdcOrderField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspQryTrade(CThostFtdcTradeField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField* pSettlementInfoConfirm, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspOrderInsert(CThostFtdcInputOrderField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspOrderAction(CThostFtdcInputOrderActionField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRtnOrder(CThostFtdcOrderField* pStruct) override;\r\n    void OnRtnTrade(CThostFtdcTradeField* pStruct) override;\r\n\r\n  private:\r\n    CtpClient* owner_;\r\n};\r\nclass MdSpi final : public CThostFtdcMdSpi {\r\n  public:\r\n    explicit MdSpi(CtpClient* owner) : owner_(owner) {}\r\n    void OnFrontConnected() override;\r\n    void OnFrontDisconnected(int nReason) override;\r\n    void OnRspUserLogin(CThostFtdcRspUserLoginField* pRspUserLogin, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspError(CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspSubMarketData(CThostFtdcSpecificInstrumentField* pSpecificInstrument, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRspUnSubMarketData(CThostFtdcSpecificInstrumentField* pSpecificInstrument, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) override;\r\n    void OnRtnDepthMarketData(CThostFtdcDepthMarketDataField* pData) override;\r\n\r\n  private:\r\n    CtpClient* owner_;\r\n};\r\nclass CtpClient {\r\n  public:\r\n    CtpClient() = default;\r\n    ~CtpClient() { stop(); }\r\n    void configure(const py::dict& cfg) {\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        trade_front_ = get_str(cfg, \"trade_front\", trade_front_);\r\n        market_front_ = get_str(cfg, \"market_front\", market_front_);\r\n        broker_id_ = get_str(cfg, \"broker_id\", broker_id_);\r\n        investor_id_ = get_str(cfg, \"investor_id\", investor_id_);\r\n        password_ = get_str(cfg, \"password\", password_);\r\n        appid_ = get_str(cfg, \"appid\", appid_);\r\n        authcode_ = get_str(cfg, \"authcode\", authcode_);\r\n        userinfo_ = get_str(cfg, \"userinfo\", userinfo_);\r\n        ip_ = get_str(cfg, \"ip\", ip_);\r\n        mac_ = get_str(cfg, \"mac\", mac_);\r\n        flow_path_ = get_str(cfg, \"flow_path\", flow_path_);\r\n        request_timeout_ms_ = get_int(cfg, \"request_timeout_ms\", request_timeout_ms_);\r\n    }\r\n    void start() {\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        if (started_) {\r\n            return;\r\n        }\r\n        if (trade_front_.empty() || market_front_.empty() || broker_id_.empty() || investor_id_.empty() || password_.empty() || appid_.empty() || authcode_.empty() || userinfo_.empty()) {\r\n            throw std::runtime_error(\"CTP_NATIVE config missing required fields: \"\r\n                                     \"trade_front/market_front/broker_id/investor_id/\"\r\n                                     \"password/appid/authcode/userinfo\");\r\n        }\r\n        std::filesystem::create_directories(flow_path_ + \"/trade\");\r\n        std::filesystem::create_directories(flow_path_ + \"/md\");\r\n        trader_api_ = CThostFtdcTraderApi::CreateFtdcTraderApi((flow_path_ + \"/trade\").c_str());\r\n        md_api_ = CThostFtdcMdApi::CreateFtdcMdApi((flow_path_ + \"/md\").c_str());\r\n        if (!trader_api_ || !md_api_) {\r\n            throw std::runtime_error(\"Create CTP API failed\");\r\n        }\r\n        trader_spi_ = new TraderSpi(this);\r\n        md_spi_ = new MdSpi(this);\r\n        trader_api_->RegisterSpi(trader_spi_);\r\n        trader_api_->SubscribePublicTopic(THOST_TERT_QUICK);\r\n        trader_api_->SubscribePrivateTopic(THOST_TERT_QUICK);\r\n        trader_api_->RegisterFront((char*)trade_front_.c_str());\r\n        md_api_->RegisterSpi(md_spi_);\r\n        md_api_->RegisterFront((char*)market_front_.c_str());\r\n        started_ = true;\r\n        trade_login_ = false;\r\n        market_login_ = false;\r\n        trader_api_->Init();\r\n        md_api_->Init();\r\n    }\r\n    void stop() {\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        if (!started_) {\r\n            return;\r\n        }\r\n        started_ = false;\r\n        trade_login_ = false;\r\n        market_login_ = false;\r\n        if (trader_api_) {\r\n            trader_api_->RegisterSpi(nullptr);\r\n            trader_api_->Release();\r\n            trader_api_ = nullptr;\r\n        }\r\n        if (md_api_) {\r\n            md_api_->RegisterSpi(nullptr);\r\n            md_api_->Release();\r\n            md_api_ = nullptr;\r\n        }\r\n        delete trader_spi_;\r\n        trader_spi_ = nullptr;\r\n        delete md_spi_;\r\n        md_spi_ = nullptr;\r\n        pending_.clear();\r\n        request_name_by_id_.clear();\r\n    }\r\n    void set_event_callback(py::object cb) {\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        event_callback_ = std::move(cb);\r\n    }\r\n    py::list request(const std::string& req_name, const py::object& payload) {\r\n        if (!started_) {\r\n            throw std::runtime_error(\"CtpClient is not started\");\r\n        }\r\n        py::dict d;\r\n        if (py::isinstance<py::dict>(payload)) {\r\n            d = payload.cast<py::dict>();\r\n        }\r\n        int request_id = get_int(d, \"RequestID\", 0);\r\n        bool is_market_req = (req_name == \"SubscribeMarketData\" || req_name == \"UnSubscribeMarketData\");\r\n        bool is_query_req = req_name.rfind(\"ReqQry\", 0) == 0;\r\n        bool is_order_insert = req_name == \"ReqOrderInsert\";\r\n        if (is_market_req && request_id == 0) {\r\n            request_id = 0; // 保持与现有通道语义一致\r\n        }\r\n        if (is_market_req) {\r\n            wait_login(/*trade=*/false, /*market=*/true);\r\n        } else {\r\n            wait_login(/*trade=*/true, /*market=*/false);\r\n        }\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            if (!is_order_insert) {\r\n                pending_[request_id] = Pending{};\r\n            }\r\n            if (request_id != 0) {\r\n                request_name_by_id_[request_id] = req_name;\r\n            }\r\n        }\r\n        if (is_query_req) {\r\n            enforce_query_throttle();\r\n        }\r\n        int rc = dispatch_request(req_name, request_id, payload);\r\n        if (rc < 0) {\r\n            py::dict row;\r\n            row[\"ErrorID\"] = rc;\r\n            row[\"ErrorMsg\"] = \"Req dispatch failed\";\r\n            row[\"RequestID\"] = request_id;\r\n            row[\"bIsLast\"] = true;\r\n            row[\"empty\"] = true;\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            pending_.erase(request_id);\r\n            request_name_by_id_.erase(request_id);\r\n            py::list rows;\r\n            rows.append(row);\r\n            return rows;\r\n        }\r\n        if (is_order_insert) {\r\n            py::list rows;\r\n            return rows;\r\n        }\r\n        bool timeout = false;\r\n        {\r\n            py::gil_scoped_release release;\r\n            std::unique_lock<std::mutex> lk(mu_);\r\n            const auto timeout_ms = std::chrono::milliseconds(request_timeout_ms_);\r\n            if (!cv_.wait_for(lk, timeout_ms, [&] {\r\n                    auto it = pending_.find(request_id);\r\n                    return it == pending_.end() || it->second.done;\r\n                })) {\r\n                timeout = true;\r\n            }\r\n        }\r\n        py::list out;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(request_id);\r\n        if (timeout || it == pending_.end()) {\r\n            py::dict row;\r\n            row[\"ErrorID\"] = -1001;\r\n            row[\"ErrorMsg\"] = \"request timeout\";\r\n            row[\"RequestID\"] = request_id;\r\n            row[\"bIsLast\"] = true;\r\n            row[\"empty\"] = true;\r\n            out.append(row);\r\n            pending_.erase(request_id);\r\n            request_name_by_id_.erase(request_id);\r\n            return out;\r\n        }\r\n        for (auto& r : it->second.rows) {\r\n            out.append(r);\r\n        }\r\n        pending_.erase(it);\r\n        request_name_by_id_.erase(request_id);\r\n        return out;\r\n    }\r\n    // ----- SPI helpers -----\r\n    void on_trade_front_connected() {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict evt;\r\n        evt[\"Reason\"] = 0;\r\n        emit_event(\"OnFrontConnected\", evt);\r\n        CThostFtdcReqAuthenticateField req{};\r\n        copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n        copy_cstr(req.UserID, sizeof(req.UserID), investor_id_);\r\n        copy_cstr(req.UserProductInfo, sizeof(req.UserProductInfo), userinfo_);\r\n        copy_cstr(req.AuthCode, sizeof(req.AuthCode), authcode_);\r\n        copy_cstr(req.AppID, sizeof(req.AppID), appid_);\r\n        trader_api_->ReqAuthenticate(&req, 1);\r\n    }\r\n    void on_trade_front_disconnected(int nReason) {\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            trade_login_ = false;\r\n        }\r\n        cv_login_.notify_all();\r\n        py::gil_scoped_acquire gil;\r\n        py::dict evt;\r\n        evt[\"Reason\"] = nReason;\r\n        emit_event(\"OnFrontDisconnected\", evt);\r\n    }\r\n    void on_trade_auth_rsp(CThostFtdcRspInfoField* pRspInfo, int nRequestID) {\r\n        {\r\n            py::gil_scoped_acquire gil;\r\n            py::dict row;\r\n            row[\"RequestID\"] = nRequestID;\r\n            row[\"bIsLast\"] = true;\r\n            if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n                row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n                row[\"ErrorMsg\"] = decode_text(pRspInfo->ErrorMsg);\r\n            } else {\r\n                row[\"ErrorID\"] = 0;\r\n            }\r\n            emit_event(\"OnRspAuthenticate\", row);\r\n        }\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            on_rsp_error(nRequestID, pRspInfo->ErrorID, pRspInfo->ErrorMsg);\r\n            return;\r\n        }\r\n        send_trade_login(nRequestID + 1);\r\n    }\r\n    void on_trade_login_rsp(CThostFtdcRspUserLoginField* pRspUserLogin, CThostFtdcRspInfoField* pRspInfo, int nRequestID) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"ErrorMsg\"] = decode_text(pRspInfo->ErrorMsg);\r\n            row[\"RequestID\"] = nRequestID;\r\n            row[\"bIsLast\"] = true;\r\n            emit_event(\"OnRspUserLogin\", row);\r\n            return;\r\n        }\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            trade_login_ = true;\r\n        }\r\n        cv_login_.notify_all();\r\n        row[\"ErrorID\"] = 0;\r\n        row[\"RequestID\"] = nRequestID;\r\n        row[\"bIsLast\"] = true;\r\n        if (pRspUserLogin) {\r\n            row[\"TradingDay\"] = decode_text(pRspUserLogin->TradingDay);\r\n            row[\"LoginTime\"] = decode_text(pRspUserLogin->LoginTime);\r\n            row[\"BrokerID\"] = decode_text(pRspUserLogin->BrokerID);\r\n            row[\"UserID\"] = decode_text(pRspUserLogin->UserID);\r\n            row[\"SystemName\"] = decode_text(pRspUserLogin->SystemName);\r\n            row[\"FrontID\"] = pRspUserLogin->FrontID;\r\n            row[\"SessionID\"] = pRspUserLogin->SessionID;\r\n            row[\"MaxOrderRef\"] = decode_text(pRspUserLogin->MaxOrderRef);\r\n        }\r\n        emit_event(\"OnRspUserLogin\", row);\r\n        int settlement_req_id = nRequestID + 1;\r\n        int rc = send_settlement_info_confirm(settlement_req_id);\r\n        if (rc < 0) {\r\n            py::dict err;\r\n            err[\"ErrorID\"] = rc;\r\n            err[\"ErrorMsg\"] = \"ReqSettlementInfoConfirm dispatch failed\";\r\n            err[\"RequestID\"] = settlement_req_id;\r\n            err[\"bIsLast\"] = true;\r\n            emit_event(\"OnRspSettlementInfoConfirm\", err);\r\n        }\r\n    }\r\n    void on_market_front_connected() {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict evt;\r\n        evt[\"Reason\"] = 0;\r\n        emit_event(\"OnFrontConnectedMd\", evt);\r\n        CThostFtdcReqUserLoginField req{};\r\n        copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n        copy_cstr(req.UserID, sizeof(req.UserID), investor_id_);\r\n        copy_cstr(req.Password, sizeof(req.Password), password_);\r\n        md_api_->ReqUserLogin(&req, 1);\r\n    }\r\n    void on_market_front_disconnected(int nReason) {\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            market_login_ = false;\r\n        }\r\n        cv_login_.notify_all();\r\n        py::gil_scoped_acquire gil;\r\n        py::dict evt;\r\n        evt[\"Reason\"] = nReason;\r\n        emit_event(\"OnFrontDisconnectedMd\", evt);\r\n    }\r\n    void on_market_login_rsp(CThostFtdcRspInfoField* pRspInfo) {\r\n        {\r\n            py::gil_scoped_acquire gil;\r\n            py::dict row;\r\n            row[\"RequestID\"] = 1;\r\n            row[\"bIsLast\"] = true;\r\n            if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n                row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n                row[\"ErrorMsg\"] = decode_text(pRspInfo->ErrorMsg);\r\n            } else {\r\n                row[\"ErrorID\"] = 0;\r\n            }\r\n            emit_event(\"OnRspUserLoginMd\", row);\r\n        }\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            return;\r\n        }\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            market_login_ = true;\r\n        }\r\n        cv_login_.notify_all();\r\n    }\r\n    void on_rsp_settlement_info_confirm(CThostFtdcSettlementInfoConfirmField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"ErrorMsg\"] = decode_text(pRspInfo->ErrorMsg);\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"BrokerID\"] = decode_text(pStruct->BrokerID);\r\n            row[\"InvestorID\"] = decode_text(pStruct->InvestorID);\r\n            row[\"ConfirmDate\"] = decode_text(pStruct->ConfirmDate);\r\n            row[\"ConfirmTime\"] = decode_text(pStruct->ConfirmTime);\r\n            row[\"ErrorID\"] = 0;\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"ErrorID\"] = 0;\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"RequestID\"] = nRequestID;\r\n        row[\"bIsLast\"] = bIsLast;\r\n        bool found_pending = false;\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            auto it = pending_.find(nRequestID);\r\n            if (it != pending_.end()) {\r\n                found_pending = true;\r\n                it->second.rows.push_back(row);\r\n                if (bIsLast) {\r\n                    it->second.done = true;\r\n                    request_name_by_id_.erase(nRequestID);\r\n                    cv_.notify_all();\r\n                }\r\n            }\r\n        }\r\n        if (!found_pending) {\r\n            emit_event(\"OnRspSettlementInfoConfirm\", row);\r\n        }\r\n    }\r\n    void on_rsp_error(int request_id, int error_id, const std::string& error_msg = \"\") {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        row[\"ErrorID\"] = error_id;\r\n        row[\"RequestID\"] = request_id;\r\n        if (!error_msg.empty()) {\r\n            row[\"ErrorMsg\"] = decode_text(error_msg.c_str());\r\n        }\r\n        row[\"bIsLast\"] = true;\r\n        row[\"empty\"] = true;\r\n        std::string req_name;\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            auto req_it = request_name_by_id_.find(request_id);\r\n            if (req_it != request_name_by_id_.end()) {\r\n                req_name = req_it->second;\r\n                request_name_by_id_.erase(req_it);\r\n                row[\"RequestName\"] = req_name;\r\n            }\r\n            auto it = pending_.find(request_id);\r\n            if (it != pending_.end()) {\r\n                it->second.rows.push_back(row);\r\n                it->second.done = true;\r\n                cv_.notify_all();\r\n                return;\r\n            }\r\n        }\r\n        if (req_name == \"ReqOrderInsert\") {\r\n            emit_event(\"OnRspOrderInsert\", row);\r\n        } else if (req_name == \"ReqOrderAction\") {\r\n            emit_event(\"OnRspOrderAction\", row);\r\n        } else {\r\n            emit_event(\"OnRspError\", row);\r\n        }\r\n    }\r\n    void on_rsp_trading_account(CThostFtdcTradingAccountField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"BrokerID\"] = decode_text(pStruct->BrokerID);\r\n            row[\"AccountID\"] = decode_text(pStruct->AccountID);\r\n            row[\"Withdraw\"] = pStruct->Withdraw;\r\n            row[\"Deposit\"] = pStruct->Deposit;\r\n            row[\"PreBalance\"] = pStruct->PreBalance;\r\n            row[\"CloseProfit\"] = pStruct->CloseProfit;\r\n            row[\"PositionProfit\"] = pStruct->PositionProfit;\r\n            row[\"Commission\"] = pStruct->Commission;\r\n            row[\"CurrMargin\"] = pStruct->CurrMargin;\r\n            row[\"Available\"] = pStruct->Available;\r\n            row[\"TradingDay\"] = decode_text(pStruct->TradingDay);\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n    }\r\n    void on_rsp_investor_position_detail(CThostFtdcInvestorPositionDetailField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"BrokerID\"] = decode_text(pStruct->BrokerID);\r\n            row[\"InvestorID\"] = decode_text(pStruct->InvestorID);\r\n            row[\"Direction\"] = pStruct->Direction;\r\n            row[\"OpenDate\"] = decode_text(pStruct->OpenDate);\r\n            row[\"Volume\"] = pStruct->Volume;\r\n            row[\"OpenPrice\"] = pStruct->OpenPrice;\r\n            row[\"PositionProfitByTrade\"] = pStruct->PositionProfitByTrade;\r\n            row[\"Margin\"] = pStruct->Margin;\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n    }\r\n    void on_rsp_instrument(CThostFtdcInstrumentField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n            row[\"InstrumentName\"] = decode_text(pStruct->InstrumentName);\r\n            row[\"ProductID\"] = decode_text(pStruct->ProductID);\r\n            row[\"CreateDate\"] = decode_text(pStruct->CreateDate);\r\n            row[\"OpenDate\"] = decode_text(pStruct->OpenDate);\r\n            row[\"ExpireDate\"] = decode_text(pStruct->ExpireDate);\r\n            row[\"ProductClass\"] = pStruct->ProductClass;\r\n            row[\"VolumeMultiple\"] = pStruct->VolumeMultiple;\r\n            row[\"PriceTick\"] = pStruct->PriceTick;\r\n            row[\"LongMarginRatio\"] = pStruct->LongMarginRatio;\r\n            row[\"IsTrading\"] = pStruct->IsTrading;\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n    }\r\n    void on_rsp_instrument_commission_rate(CThostFtdcInstrumentCommissionRateField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"BrokerID\"] = decode_text(pStruct->BrokerID);\r\n            row[\"InvestorID\"] = decode_text(pStruct->InvestorID);\r\n            row[\"OpenRatioByMoney\"] = pStruct->OpenRatioByMoney;\r\n            row[\"OpenRatioByVolume\"] = pStruct->OpenRatioByVolume;\r\n            row[\"CloseRatioByMoney\"] = pStruct->CloseRatioByMoney;\r\n            row[\"CloseRatioByVolume\"] = pStruct->CloseRatioByVolume;\r\n            row[\"CloseTodayRatioByMoney\"] = pStruct->CloseTodayRatioByMoney;\r\n            row[\"CloseTodayRatioByVolume\"] = pStruct->CloseTodayRatioByVolume;\r\n            row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n            row[\"InvestUnitID\"] = decode_text(pStruct->InvestUnitID);\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n    }\r\n    void on_rsp_instrument_margin_rate(CThostFtdcInstrumentMarginRateField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"BrokerID\"] = decode_text(pStruct->BrokerID);\r\n            row[\"InvestorID\"] = decode_text(pStruct->InvestorID);\r\n            row[\"HedgeFlag\"] = pStruct->HedgeFlag;\r\n            row[\"LongMarginRatioByMoney\"] = pStruct->LongMarginRatioByMoney;\r\n            row[\"LongMarginRatioByVolume\"] = pStruct->LongMarginRatioByVolume;\r\n            row[\"ShortMarginRatioByMoney\"] = pStruct->ShortMarginRatioByMoney;\r\n            row[\"ShortMarginRatioByVolume\"] = pStruct->ShortMarginRatioByVolume;\r\n            row[\"IsRelative\"] = pStruct->IsRelative;\r\n            row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n            row[\"InvestUnitID\"] = decode_text(pStruct->InvestUnitID);\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n    }\r\n    void on_rsp_qry_order(CThostFtdcOrderField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"OrderRef\"] = decode_text(pStruct->OrderRef);\r\n            row[\"Direction\"] = pStruct->Direction;\r\n            row[\"CombOffsetFlag\"] = pStruct->CombOffsetFlag;\r\n            row[\"LimitPrice\"] = pStruct->LimitPrice;\r\n            row[\"VolumeTotalOriginal\"] = pStruct->VolumeTotalOriginal;\r\n            row[\"OrderSubmitStatus\"] = pStruct->OrderSubmitStatus;\r\n            row[\"OrderStatus\"] = pStruct->OrderStatus;\r\n            row[\"VolumeTraded\"] = pStruct->VolumeTraded;\r\n            row[\"VolumeTotal\"] = pStruct->VolumeTotal;\r\n            row[\"InsertDate\"] = decode_text(pStruct->InsertDate);\r\n            row[\"InsertTime\"] = decode_text(pStruct->InsertTime);\r\n            row[\"UpdateTime\"] = decode_text(pStruct->UpdateTime);\r\n            row[\"CancelTime\"] = decode_text(pStruct->CancelTime);\r\n            row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n            row[\"OrderSysID\"] = decode_text(pStruct->OrderSysID);\r\n            row[\"FrontID\"] = pStruct->FrontID;\r\n            row[\"SessionID\"] = pStruct->SessionID;\r\n            row[\"StatusMsg\"] = decode_text(pStruct->StatusMsg);\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n    }\r\n    void on_rsp_qry_trade(CThostFtdcTradeField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pStruct) {\r\n            row[\"BrokerID\"] = decode_text(pStruct->BrokerID);\r\n            row[\"InvestorID\"] = decode_text(pStruct->InvestorID);\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"OrderRef\"] = decode_text(pStruct->OrderRef);\r\n            row[\"UserID\"] = decode_text(pStruct->UserID);\r\n            row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n            row[\"TradeID\"] = decode_text(pStruct->TradeID);\r\n            row[\"Direction\"] = pStruct->Direction;\r\n            row[\"OrderSysID\"] = decode_text(pStruct->OrderSysID);\r\n            row[\"OffsetFlag\"] = pStruct->OffsetFlag;\r\n            row[\"HedgeFlag\"] = pStruct->HedgeFlag;\r\n            row[\"Price\"] = pStruct->Price;\r\n            row[\"Volume\"] = pStruct->Volume;\r\n            row[\"TradeDate\"] = decode_text(pStruct->TradeDate);\r\n            row[\"TradeTime\"] = decode_text(pStruct->TradeTime);\r\n            row[\"TradeType\"] = pStruct->TradeType;\r\n            row[\"TradingDay\"] = decode_text(pStruct->TradingDay);\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n    }\r\n    void on_rsp_order_insert(CThostFtdcInputOrderField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n        } else {\r\n            row[\"ErrorID\"] = 0;\r\n        }\r\n        if (pStruct) {\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"OrderRef\"] = decode_text(pStruct->OrderRef);\r\n            row[\"Direction\"] = pStruct->Direction;\r\n            row[\"CombOffsetFlag\"] = pStruct->CombOffsetFlag;\r\n            row[\"LimitPrice\"] = pStruct->LimitPrice;\r\n            row[\"VolumeTotalOriginal\"] = pStruct->VolumeTotalOriginal;\r\n        }\r\n        row[\"RequestID\"] = nRequestID;\r\n        row[\"bIsLast\"] = bIsLast;\r\n        if (bIsLast) {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            request_name_by_id_.erase(nRequestID);\r\n        }\r\n        emit_event(\"OnRspOrderInsert\", row);\r\n    }\r\n    void on_rsp_order_action(CThostFtdcInputOrderActionField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n        } else {\r\n            row[\"ErrorID\"] = 0;\r\n        }\r\n        if (pStruct) {\r\n            row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n            row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n            row[\"OrderSysID\"] = decode_text(pStruct->OrderSysID);\r\n            row[\"OrderRef\"] = decode_text(pStruct->OrderRef);\r\n        }\r\n        row[\"RequestID\"] = nRequestID;\r\n        row[\"bIsLast\"] = bIsLast;\r\n        {\r\n            std::lock_guard<std::mutex> lk(mu_);\r\n            auto it = pending_.find(nRequestID);\r\n            if (it != pending_.end()) {\r\n                it->second.rows.push_back(row);\r\n                if (bIsLast) {\r\n                    it->second.done = true;\r\n                    request_name_by_id_.erase(nRequestID);\r\n                    cv_.notify_all();\r\n                }\r\n            }\r\n        }\r\n        emit_event(\"OnRspOrderAction\", row);\r\n    }\r\n    void on_rtn_order(CThostFtdcOrderField* pStruct) {\r\n        if (!pStruct) {\r\n            return;\r\n        }\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n        row[\"OrderRef\"] = decode_text(pStruct->OrderRef);\r\n        row[\"Direction\"] = pStruct->Direction;\r\n        row[\"CombOffsetFlag\"] = pStruct->CombOffsetFlag;\r\n        row[\"LimitPrice\"] = pStruct->LimitPrice;\r\n        row[\"VolumeTotalOriginal\"] = pStruct->VolumeTotalOriginal;\r\n        row[\"OrderSubmitStatus\"] = pStruct->OrderSubmitStatus;\r\n        row[\"OrderStatus\"] = pStruct->OrderStatus;\r\n        row[\"VolumeTraded\"] = pStruct->VolumeTraded;\r\n        row[\"VolumeTotal\"] = pStruct->VolumeTotal;\r\n        row[\"InsertDate\"] = decode_text(pStruct->InsertDate);\r\n        row[\"InsertTime\"] = decode_text(pStruct->InsertTime);\r\n        row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n        row[\"OrderSysID\"] = decode_text(pStruct->OrderSysID);\r\n        row[\"FrontID\"] = pStruct->FrontID;\r\n        row[\"SessionID\"] = pStruct->SessionID;\r\n        row[\"UserID\"] = decode_text(pStruct->UserID);\r\n        row[\"StatusMsg\"] = decode_text(pStruct->StatusMsg);\r\n        emit_event(\"OnRtnOrder\", row);\r\n    }\r\n    void on_rtn_trade(CThostFtdcTradeField* pStruct) {\r\n        if (!pStruct) {\r\n            return;\r\n        }\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        row[\"BrokerID\"] = decode_text(pStruct->BrokerID);\r\n        row[\"InvestorID\"] = decode_text(pStruct->InvestorID);\r\n        row[\"InstrumentID\"] = decode_text(pStruct->InstrumentID);\r\n        row[\"OrderRef\"] = decode_text(pStruct->OrderRef);\r\n        row[\"UserID\"] = decode_text(pStruct->UserID);\r\n        row[\"ExchangeID\"] = decode_text(pStruct->ExchangeID);\r\n        row[\"TradeID\"] = decode_text(pStruct->TradeID);\r\n        row[\"Direction\"] = pStruct->Direction;\r\n        row[\"OrderSysID\"] = decode_text(pStruct->OrderSysID);\r\n        row[\"OffsetFlag\"] = pStruct->OffsetFlag;\r\n        row[\"HedgeFlag\"] = pStruct->HedgeFlag;\r\n        row[\"Price\"] = pStruct->Price;\r\n        row[\"Volume\"] = pStruct->Volume;\r\n        row[\"TradeDate\"] = decode_text(pStruct->TradeDate);\r\n        row[\"TradeTime\"] = decode_text(pStruct->TradeTime);\r\n        row[\"TradeType\"] = pStruct->TradeType;\r\n        row[\"TradingDay\"] = decode_text(pStruct->TradingDay);\r\n        emit_event(\"OnRtnTrade\", row);\r\n    }\r\n    void on_rsp_sub_market_data(CThostFtdcSpecificInstrumentField* pSpecificInstrument, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast, bool un_sub) {\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        if (pRspInfo && pRspInfo->ErrorID != 0) {\r\n            row[\"ErrorID\"] = pRspInfo->ErrorID;\r\n            row[\"empty\"] = true;\r\n        } else if (pSpecificInstrument) {\r\n            row[\"InstrumentID\"] = decode_text(pSpecificInstrument->InstrumentID);\r\n            row[\"empty\"] = false;\r\n        } else {\r\n            row[\"empty\"] = true;\r\n        }\r\n        row[\"bIsLast\"] = bIsLast;\r\n        std::lock_guard<std::mutex> lk(mu_);\r\n        auto it = pending_.find(nRequestID);\r\n        if (it != pending_.end()) {\r\n            it->second.rows.push_back(row);\r\n            if (bIsLast) {\r\n                it->second.done = true;\r\n                request_name_by_id_.erase(nRequestID);\r\n                cv_.notify_all();\r\n            }\r\n        }\r\n        (void)un_sub;\r\n    }\r\n    void on_rtn_depth_market_data(CThostFtdcDepthMarketDataField* pData) {\r\n        if (!pData) {\r\n            return;\r\n        }\r\n        py::gil_scoped_acquire gil;\r\n        py::dict row;\r\n        row[\"TradingDay\"] = decode_text(pData->TradingDay);\r\n        row[\"InstrumentID\"] = decode_text(pData->InstrumentID);\r\n        row[\"LastPrice\"] = pData->LastPrice;\r\n        row[\"OpenPrice\"] = pData->OpenPrice;\r\n        row[\"HighestPrice\"] = pData->HighestPrice;\r\n        row[\"LowestPrice\"] = pData->LowestPrice;\r\n        row[\"Volume\"] = pData->Volume;\r\n        row[\"Turnover\"] = pData->Turnover;\r\n        row[\"OpenInterest\"] = pData->OpenInterest;\r\n        row[\"UpperLimitPrice\"] = pData->UpperLimitPrice;\r\n        row[\"LowerLimitPrice\"] = pData->LowerLimitPrice;\r\n        row[\"BidPrice1\"] = pData->BidPrice1;\r\n        row[\"BidVolume1\"] = pData->BidVolume1;\r\n        row[\"AskPrice1\"] = pData->AskPrice1;\r\n        row[\"AskVolume1\"] = pData->AskVolume1;\r\n        row[\"ActionDay\"] = decode_text(pData->ActionDay);\r\n        row[\"UpdateTime\"] = decode_text(pData->ActionDay).cast<std::string>() + \" \" + decode_text(pData->UpdateTime).cast<std::string>() + \":\" + std::to_string(pData->UpdateMillisec * 1000);\r\n        emit_event(\"OnRtnDepthMarketData\", row);\r\n    }\r\n\r\n  private:\r\n    struct Pending {\r\n        std::vector<py::dict> rows;\r\n        bool done{false};\r\n    };\r\n    void enforce_query_throttle() {\r\n        std::unique_lock<std::mutex> lk(mu_);\r\n        auto now = std::chrono::steady_clock::now();\r\n        auto next_allowed = last_query_at_ + std::chrono::milliseconds(1000);\r\n        if (now < next_allowed) {\r\n            auto wait_dur = next_allowed - now;\r\n            lk.unlock();\r\n            std::this_thread::sleep_for(wait_dur);\r\n            lk.lock();\r\n        }\r\n        last_query_at_ = std::chrono::steady_clock::now();\r\n    }\r\n    void wait_login(bool trade, bool market) {\r\n        std::unique_lock<std::mutex> lk(mu_);\r\n        const auto timeout_ms = std::chrono::milliseconds(request_timeout_ms_);\r\n        bool ok = cv_login_.wait_for(lk, timeout_ms, [&] {\r\n            bool trade_ok = !trade || trade_login_;\r\n            bool market_ok = !market || market_login_;\r\n            return trade_ok && market_ok;\r\n        });\r\n        if (!ok) {\r\n            throw std::runtime_error(\"CTP login timeout\");\r\n        }\r\n    }\r\n    void send_trade_login(int req_id) {\r\n        CThostFtdcReqUserLoginField req{};\r\n        copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n        copy_cstr(req.UserID, sizeof(req.UserID), investor_id_);\r\n        copy_cstr(req.Password, sizeof(req.Password), password_);\r\n        trader_api_->ReqUserLogin(&req, req_id);\r\n    }\r\n    int send_settlement_info_confirm(int req_id) {\r\n        CThostFtdcSettlementInfoConfirmField req{};\r\n        copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n        copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n        return trader_api_->ReqSettlementInfoConfirm(&req, req_id);\r\n    }\r\n    int dispatch_request(const std::string& req_name, int request_id, const py::object& payload) {\r\n        py::dict payload_dict;\r\n        if (py::isinstance<py::dict>(payload)) {\r\n            payload_dict = payload.cast<py::dict>();\r\n        }\r\n        if (req_name == \"ReqQryTradingAccount\") {\r\n            CThostFtdcQryTradingAccountField req{};\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            return trader_api_->ReqQryTradingAccount(&req, request_id);\r\n        }\r\n        if (req_name == \"ReqQryInvestorPositionDetail\") {\r\n            CThostFtdcQryInvestorPositionDetailField req{};\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            return trader_api_->ReqQryInvestorPositionDetail(&req, request_id);\r\n        }\r\n        if (req_name == \"ReqQryInstrument\") {\r\n            CThostFtdcQryInstrumentField req{};\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            copy_cstr(req.ExchangeID, sizeof(req.ExchangeID), get_str(payload_dict, \"ExchangeID\"));\r\n            return trader_api_->ReqQryInstrument(&req, request_id);\r\n        }\r\n        if (req_name == \"ReqQryInstrumentCommissionRate\") {\r\n            CThostFtdcQryInstrumentCommissionRateField req{};\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            copy_cstr(req.ExchangeID, sizeof(req.ExchangeID), get_str(payload_dict, \"ExchangeID\"));\r\n            copy_cstr(req.InvestUnitID, sizeof(req.InvestUnitID), get_str(payload_dict, \"InvestUnitID\"));\r\n            return trader_api_->ReqQryInstrumentCommissionRate(&req, request_id);\r\n        }\r\n        if (req_name == \"ReqQryInstrumentMarginRate\") {\r\n            CThostFtdcQryInstrumentMarginRateField req{};\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            auto hedge_flag = get_str(payload_dict, \"HedgeFlag\");\r\n            req.HedgeFlag = hedge_flag.empty() ? THOST_FTDC_HF_Speculation : hedge_flag[0];\r\n            copy_cstr(req.ExchangeID, sizeof(req.ExchangeID), get_str(payload_dict, \"ExchangeID\"));\r\n            copy_cstr(req.InvestUnitID, sizeof(req.InvestUnitID), get_str(payload_dict, \"InvestUnitID\"));\r\n            return trader_api_->ReqQryInstrumentMarginRate(&req, request_id);\r\n        }\r\n        if (req_name == \"ReqQryOrder\") {\r\n            CThostFtdcQryOrderField req{};\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            copy_cstr(req.ExchangeID, sizeof(req.ExchangeID), get_str(payload_dict, \"ExchangeID\"));\r\n            copy_cstr(req.OrderSysID, sizeof(req.OrderSysID), get_str(payload_dict, \"OrderSysID\"));\r\n            copy_cstr(req.InsertTimeStart, sizeof(req.InsertTimeStart), get_str(payload_dict, \"InsertTimeStart\"));\r\n            copy_cstr(req.InsertTimeEnd, sizeof(req.InsertTimeEnd), get_str(payload_dict, \"InsertTimeEnd\"));\r\n            copy_cstr(req.InvestUnitID, sizeof(req.InvestUnitID), get_str(payload_dict, \"InvestUnitID\"));\r\n            return trader_api_->ReqQryOrder(&req, request_id);\r\n        }\r\n        if (req_name == \"ReqQryTrade\") {\r\n            CThostFtdcQryTradeField req{};\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            copy_cstr(req.ExchangeID, sizeof(req.ExchangeID), get_str(payload_dict, \"ExchangeID\"));\r\n            copy_cstr(req.TradeID, sizeof(req.TradeID), get_str(payload_dict, \"TradeID\"));\r\n            copy_cstr(req.TradeTimeStart, sizeof(req.TradeTimeStart), get_str(payload_dict, \"TradeTimeStart\"));\r\n            copy_cstr(req.TradeTimeEnd, sizeof(req.TradeTimeEnd), get_str(payload_dict, \"TradeTimeEnd\"));\r\n            copy_cstr(req.InvestUnitID, sizeof(req.InvestUnitID), get_str(payload_dict, \"InvestUnitID\"));\r\n            return trader_api_->ReqQryTrade(&req, request_id);\r\n        }\r\n        if (req_name == \"SubscribeMarketData\") {\r\n            std::vector<std::string> ids;\r\n            if (py::isinstance<py::list>(payload)) {\r\n                for (auto item : payload.cast<py::list>()) {\r\n                    ids.push_back(py::str(item).cast<std::string>());\r\n                }\r\n            }\r\n            std::vector<char*> ptrs;\r\n            ptrs.reserve(ids.size());\r\n            for (auto& s : ids) {\r\n                ptrs.push_back(s.data());\r\n            }\r\n            return md_api_->SubscribeMarketData(ptrs.data(), static_cast<int>(ptrs.size()));\r\n        }\r\n        if (req_name == \"UnSubscribeMarketData\") {\r\n            std::vector<std::string> ids;\r\n            if (py::isinstance<py::list>(payload)) {\r\n                for (auto item : payload.cast<py::list>()) {\r\n                    ids.push_back(py::str(item).cast<std::string>());\r\n                }\r\n            }\r\n            std::vector<char*> ptrs;\r\n            ptrs.reserve(ids.size());\r\n            for (auto& s : ids) {\r\n                ptrs.push_back(s.data());\r\n            }\r\n            return md_api_->UnSubscribeMarketData(ptrs.data(), static_cast<int>(ptrs.size()));\r\n        }\r\n        if (req_name == \"ReqOrderInsert\") {\r\n            CThostFtdcInputOrderField req{};\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            copy_cstr(req.OrderRef, sizeof(req.OrderRef), get_str(payload_dict, \"OrderRef\"));\r\n            req.Direction = get_str(payload_dict, \"Direction\").empty() ? '\\0' : get_str(payload_dict, \"Direction\")[0];\r\n            req.LimitPrice = get_double(payload_dict, \"LimitPrice\", 0.0);\r\n            req.VolumeTotalOriginal = get_int(payload_dict, \"VolumeTotalOriginal\", 0);\r\n            req.OrderPriceType = THOST_FTDC_OPT_LimitPrice;\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            auto cof = get_str(payload_dict, \"CombOffsetFlag\");\r\n            req.CombOffsetFlag[0] = cof.empty() ? '\\0' : cof[0];\r\n            req.CombHedgeFlag[0] = THOST_FTDC_HF_Speculation;\r\n            req.VolumeCondition = THOST_FTDC_VC_AV;\r\n            req.MinVolume = 1;\r\n            req.ForceCloseReason = THOST_FTDC_FCC_NotForceClose;\r\n            req.ContingentCondition = THOST_FTDC_CC_Immediately;\r\n            req.IsAutoSuspend = 1;\r\n            req.UserForceClose = 0;\r\n            req.TimeCondition = THOST_FTDC_TC_GFD;\r\n            copy_cstr(req.IPAddress, sizeof(req.IPAddress), ip_);\r\n            copy_cstr(req.MacAddress, sizeof(req.MacAddress), mac_);\r\n            return trader_api_->ReqOrderInsert(&req, request_id);\r\n        }\r\n        if (req_name == \"ReqOrderAction\") {\r\n            CThostFtdcInputOrderActionField req{};\r\n            copy_cstr(req.BrokerID, sizeof(req.BrokerID), broker_id_);\r\n            copy_cstr(req.InvestorID, sizeof(req.InvestorID), investor_id_);\r\n            copy_cstr(req.ExchangeID, sizeof(req.ExchangeID), get_str(payload_dict, \"ExchangeID\"));\r\n            copy_cstr(req.UserID, sizeof(req.UserID), get_str(payload_dict, \"UserID\", investor_id_));\r\n            copy_cstr(req.InstrumentID, sizeof(req.InstrumentID), get_str(payload_dict, \"InstrumentID\"));\r\n            copy_cstr(req.OrderSysID, sizeof(req.OrderSysID), get_str(payload_dict, \"OrderSysID\"));\r\n            req.OrderActionRef = request_id + 1;\r\n            req.ActionFlag = THOST_FTDC_AF_Delete;\r\n            copy_cstr(req.IPAddress, sizeof(req.IPAddress), ip_);\r\n            copy_cstr(req.MacAddress, sizeof(req.MacAddress), mac_);\r\n            return trader_api_->ReqOrderAction(&req, request_id);\r\n        }\r\n        return -999;\r\n    }\r\n    void emit_event(const std::string& topic, const py::dict& row) {\r\n        if (event_callback_.is_none()) {\r\n            return;\r\n        }\r\n        try {\r\n            event_callback_(topic, row);\r\n        } catch (const py::error_already_set& e) {\r\n            PyErr_WriteUnraisable(e.value().ptr());\r\n        }\r\n    }\r\n    friend class TraderSpi;\r\n    friend class MdSpi;\r\n    std::mutex mu_;\r\n    std::condition_variable cv_;\r\n    std::condition_variable cv_login_;\r\n    std::unordered_map<int, Pending> pending_;\r\n    std::unordered_map<int, std::string> request_name_by_id_;\r\n    CThostFtdcTraderApi* trader_api_{nullptr};\r\n    CThostFtdcMdApi* md_api_{nullptr};\r\n    TraderSpi* trader_spi_{nullptr};\r\n    MdSpi* md_spi_{nullptr};\r\n    bool started_{false};\r\n    bool trade_login_{false};\r\n    bool market_login_{false};\r\n    int request_timeout_ms_{10000};\r\n    py::object event_callback_{py::none()};\r\n    std::string trade_front_;\r\n    std::string market_front_;\r\n    std::string broker_id_;\r\n    std::string investor_id_;\r\n    std::string password_;\r\n    std::string appid_;\r\n    std::string authcode_;\r\n    std::string userinfo_;\r\n    std::string ip_;\r\n    std::string mac_;\r\n    std::string flow_path_{\"d:/Github/trader/native/ctp_bridge/flow\"};\r\n    std::chrono::steady_clock::time_point last_query_at_{};\r\n};\r\n// ----- TraderSpi impl -----\r\nvoid TraderSpi::OnFrontConnected() { owner_->on_trade_front_connected(); }\r\nvoid TraderSpi::OnFrontDisconnected(int nReason) { owner_->on_trade_front_disconnected(nReason); }\r\nvoid TraderSpi::OnRspAuthenticate(CThostFtdcRspAuthenticateField* /*pRspAuthenticateField*/, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool /*bIsLast*/) { owner_->on_trade_auth_rsp(pRspInfo, nRequestID); }\r\nvoid TraderSpi::OnRspUserLogin(CThostFtdcRspUserLoginField* pRspUserLogin, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool /*bIsLast*/) { owner_->on_trade_login_rsp(pRspUserLogin, pRspInfo, nRequestID); }\r\nvoid TraderSpi::OnRspError(CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool /*bIsLast*/) {\r\n    if (pRspInfo) {\r\n        owner_->on_rsp_error(nRequestID, pRspInfo->ErrorID, pRspInfo->ErrorMsg);\r\n    }\r\n}\r\nvoid TraderSpi::OnRspQryTradingAccount(CThostFtdcTradingAccountField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_trading_account(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_investor_position_detail(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspQryInstrument(CThostFtdcInstrumentField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_instrument(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_instrument_commission_rate(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_instrument_margin_rate(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspQryOrder(CThostFtdcOrderField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_qry_order(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspQryTrade(CThostFtdcTradeField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_qry_trade(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField* pSettlementInfoConfirm, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_settlement_info_confirm(pSettlementInfoConfirm, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspOrderInsert(CThostFtdcInputOrderField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_order_insert(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRspOrderAction(CThostFtdcInputOrderActionField* pStruct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_order_action(pStruct, pRspInfo, nRequestID, bIsLast); }\r\nvoid TraderSpi::OnRtnOrder(CThostFtdcOrderField* pStruct) { owner_->on_rtn_order(pStruct); }\r\nvoid TraderSpi::OnRtnTrade(CThostFtdcTradeField* pStruct) { owner_->on_rtn_trade(pStruct); }\r\n// ----- MdSpi impl -----\r\nvoid MdSpi::OnFrontConnected() { owner_->on_market_front_connected(); }\r\nvoid MdSpi::OnFrontDisconnected(int nReason) { owner_->on_market_front_disconnected(nReason); }\r\nvoid MdSpi::OnRspUserLogin(CThostFtdcRspUserLoginField* /*pRspUserLogin*/, CThostFtdcRspInfoField* pRspInfo, int /*nRequestID*/, bool /*bIsLast*/) { owner_->on_market_login_rsp(pRspInfo); }\r\nvoid MdSpi::OnRspError(CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool /*bIsLast*/) {\r\n    if (pRspInfo) {\r\n        owner_->on_rsp_error(nRequestID, pRspInfo->ErrorID, pRspInfo->ErrorMsg);\r\n    }\r\n}\r\nvoid MdSpi::OnRspSubMarketData(CThostFtdcSpecificInstrumentField* pSpecificInstrument, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_sub_market_data(pSpecificInstrument, pRspInfo, nRequestID, bIsLast, false); }\r\nvoid MdSpi::OnRspUnSubMarketData(CThostFtdcSpecificInstrumentField* pSpecificInstrument, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast) { owner_->on_rsp_sub_market_data(pSpecificInstrument, pRspInfo, nRequestID, bIsLast, true); }\r\nvoid MdSpi::OnRtnDepthMarketData(CThostFtdcDepthMarketDataField* pData) { owner_->on_rtn_depth_market_data(pData); }\r\nPYBIND11_MODULE(ctp_bridge_native, m) {\r\n    m.doc() = \"CTP native bridge (pybind11)\";\r\n    py::class_<CtpClient>(m, \"CtpClient\").def(py::init<>()).def(\"configure\", &CtpClient::configure).def(\"start\", &CtpClient::start).def(\"stop\", &CtpClient::stop).def(\"set_event_callback\", &CtpClient::set_event_callback).def(\"request\", &CtpClient::request);\r\n}\r\n"
  },
  {
    "path": "panel/__init__.py",
    "content": "# coding=utf-8\r\n#\r\n# Copyright 2016 timercrack\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n# not use this file except in compliance with the License. You may obtain\r\n# a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n# License for the specific language governing permissions and limitations\r\n# under the License.\r\n"
  },
  {
    "path": "panel/admin.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nfrom django.contrib import admin\nfrom django.conf.locale.zh_Hans import formats as zh_formats\n\nfrom .forms import BrokerForm\nfrom .models import *\n\nzh_formats.DATETIME_FORMAT = \"Y-m-d H:i:s\"\n\n\n@admin.register(Address)\nclass AddressAdmin(admin.ModelAdmin):\n    list_display = ('name', 'url', 'type', 'operator')\n\n\n@admin.register(Broker)\nclass BrokerAdmin(admin.ModelAdmin):\n    list_display = ('name', 'contract_type', 'trade_address', 'market_address',\n                    'identify', 'username', 'fake', 'cash', 'pre_balance', 'current')\n    form = BrokerForm\n\n\n@admin.register(Strategy)\nclass StrategyAdmin(admin.ModelAdmin):\n    list_display = ('name', 'broker', 'get_instruments', 'get_force_opens')\n\n\n@admin.register(Order)\nclass OrderAdmin(admin.ModelAdmin):\n    list_display = ('instrument', 'price', 'direction', 'offset_flag', 'status', 'send_time', 'update_time')\n\n\n@admin.register(Instrument)\nclass InstrumentAdmin(admin.ModelAdmin):\n    list_display = ('exchange', 'section', 'name', 'product_code', 'sina_code', 'night_trade', 'main_code',\n                    'last_main', 'change_time', 'up_limit_ratio',\n                    'margin_rate', 'fee_money', 'fee_volume', 'price_tick')\n    ordering = ['-exchange', 'section']\n\n\n@admin.register(MainBar)\nclass MainBarAdmin(admin.ModelAdmin):\n    list_display = ('product_code', 'code', 'time', 'open', 'high', 'low', 'close',\n                    'volume', 'open_interest', 'basis')\n    search_fields = ('product_code', 'code', 'time',)\n\n\n@admin.register(DailyBar)\nclass DailyBarAdmin(admin.ModelAdmin):\n    list_display = ('exchange', 'code', 'time', 'open', 'high', 'low', 'close', 'volume', 'open_interest')\n\n\n@admin.register(Trade)\nclass TradeAdmin(admin.ModelAdmin):\n    list_display = (\n        'broker', 'strategy', 'instrument', 'code', 'shares', 'direction', 'open_time', 'close_time',\n        'avg_entry_price', 'avg_exit_price', 'profit', 'frozen_margin', 'cost')\n\n\n@admin.register(Param)\nclass ParamAdmin(admin.ModelAdmin):\n    list_display = (\n        'strategy', 'update_time', 'code', 'str_value', 'int_value', 'float_value')\n    search_fields = ('code',)\n\n\n@admin.register(Signal)\nclass SignalAdmin(admin.ModelAdmin):\n    list_display = (\n        'strategy', 'instrument', 'code', 'type', 'trigger_value', 'price', 'volume',\n        'trigger_time', 'priority', 'processed')\n    search_fields = ('instrument',)\n\n\n@admin.register(Performance)\nclass PerformanceAdmin(admin.ModelAdmin):\n    list_display = (\n        'broker', 'day', 'capital', 'unit_count', 'NAV', 'accumulated', 'dividend', 'used_margin')\n    search_fields = ('day',)\n"
  },
  {
    "path": "panel/apps.py",
    "content": "# coding=utf-8\r\n#\r\n# Copyright 2016 timercrack\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n# not use this file except in compliance with the License. You may obtain\r\n# a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n# License for the specific language governing permissions and limitations\r\n# under the License.\r\nfrom django.apps import AppConfig\r\n\r\n\r\nclass PanelConfig(AppConfig):\r\n    name = 'panel'\r\n    verbose_name = \"交易后台\"\r\n"
  },
  {
    "path": "panel/const.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nfrom django.db import models\n\n\nclass ContractType(models.TextChoices):\n    STOCK = 'STOCK', '股票'\n    FUTURE = 'FUTURE', '期货'\n    OPTION = 'OPTION', '期权'\n\n\nclass ExchangeType(models.TextChoices):\n    SHFE = 'SHFE', '上期所'\n    DCE = 'DCE', '大商所'\n    CZCE = 'CZCE', '郑商所'\n    CFFEX = 'CFFEX', '中金所'\n    INE = 'INE', '上期能源'\n    GFEX = 'GFEX', '广交所'\n\n\nclass SectionType(models.TextChoices):\n    Financial = '金融', '金融'\n    PreciousMetal = '贵金属', '贵金属'\n    BaseMetal = '有色金属', '有色金属'\n    Ferrous = '黑色产业', '黑色产业'\n    Energy = '能源', '能源'\n    Chemical = '化工', '化工'\n    Agriculture = '农牧', '农牧'\n    NewEnergy = '新能源', '新能源'\n\n\nclass SortType(models.TextChoices):\n    StockIndex = '股指', '股指'\n    Treasury = '国债', '国债'\n    Shipping = '航运', '航运'\n    Precious = '贵金属', '贵金属'\n    CopperChain = '铜产业链', '铜产业链'\n    AluminumChain = '铝产业链', '铝产业链'\n    OtherNonferrous = '其他有色', '其他有色'\n    SteelChain = '钢铁链', '钢铁链'\n    BuildMaterial = '建材', '建材'\n    CrudeOilChain = '原油链', '原油链'\n    Olefin = '烯烃', '烯烃'\n    Aromatic = '芳烃', '芳烃'\n    Rubber = '橡胶', '橡胶'\n    CoalChem = '煤化工', '煤化工'\n    OilFat = '油脂油料', '油脂油料'\n    GrainFeed = '谷物饲料', '谷物饲料'\n    SoftAgri = '软商品', '软商品'\n    Livestock = '畜牧', '畜牧'\n    Forestry = '林纸', '林纸'\n    NewEnergyMat = '新能源材料', '新能源材料'\n\n\nclass AddressType(models.TextChoices):\n    TRADE = 'TRADE', '交易'\n    MARKET = 'MARKET', '行情'\n\n\nclass OperatorType(models.TextChoices):\n    TELECOM = 'TELECOM', '电信'\n    UNICOM = 'UNICOM', '联通'\n\n\nclass DirectionType(models.TextChoices):\n    LONG = '0', '多'\n    SHORT = '1', '空'\n\n\nclass CombOffsetFlag(models.TextChoices):  # 订单开平标志\n    Open = '0', '开'\n    Close = '1', '平'\n    ForceClose = '2', '强平'\n    CloseToday = '3', '平'\n    CloseYesterday = '4', '平昨'\n    ForceOff = '5', '强减'\n    LocalForceClose = '6', '本地强平'\n\n\nclass OffsetFlag(models.TextChoices):  # 开平标志\n    Open = '0', '开'\n    Close = '1', '平'\n    ForceClose = '2', '强平'\n    CloseToday = '3', '平今'\n    CloseYesterday = '4', '平昨'\n    ForceOff = '5', '强减'\n    LocalForceClose = '6', '本地强平'\n\n\nclass OrderStatus(models.TextChoices):  # 报单状态\n    AllTraded = '0', '全部成交'\n    PartTradedQueueing = '1', '部分成交还在队列中'\n    PartTradedNotQueueing = '2', '部分成交不在队列中'\n    NoTradeQueueing = '3', '未成交还在队列中'\n    NoTradeNotQueueing = '4', '未成交不在队列中'\n    Canceled = '5', '撤单'\n    Unknown = 'a', '未知'\n    NotTouched = 'b', '尚未触发'\n    Touched = 'c', '已触发'\n\n\nclass OrderSubmitStatus(models.TextChoices):  # 报单提交状态\n    InsertSubmitted = '0', '已经提交'\n    CancelSubmitted = '1', '撤单已经提交'\n    ModifySubmitted = '2', '修改已经提交'\n    Accepted = '3', '已经接受'\n    InsertRejected = '4', '报单已经被拒绝'\n    CancelRejected = '5', '撤单已经被拒绝'\n    ModifyRejected = '6', '改单已经被拒绝'\n\n\nDCE_NAME_CODE = {\n    '豆一': 'a',\n    '豆二': 'b',\n    '胶合板': 'bb',\n    '玉米': 'c',\n    '玉米淀粉': 'cs',\n    '纤维板': 'fb',\n    '铁矿石': 'i',\n    '焦炭': 'j',\n    '鸡蛋': 'jd',\n    '焦煤': 'jm',\n    '聚乙烯': 'l',\n    '豆粕': 'm',\n    '棕榈油': 'p',\n    '聚丙烯': 'pp',\n    '聚氯乙烯': 'v',\n    '苯乙烯': 'eb',\n    '乙二醇': 'eg',\n    '液化石油气': 'pg',\n    '生猪': 'lh',\n    '粳米': 'rr',\n    '豆油': 'y',\n    '原木': 'lg',\n    '纯苯': 'bz',\n}\n\nMONTH_CODE = {\n    1: \"F\",\n    2: \"G\",\n    3: \"H\",\n    4: \"J\",\n    5: \"K\",\n    6: \"M\",\n    7: \"N\",\n    8: \"Q\",\n    9: \"U\",\n    10: \"V\",\n    11: \"X\",\n    12: \"Z\"\n}\n\n\nKT_MARKET = {\n    'DL': 'DCE',\n    'DY': 'DCE',\n    'SQ': 'SHFE',\n    'SY': 'SHFE',\n    'ZJ': 'CFFEX',\n    'ZZ': 'CZCE',\n    'ZY': 'CZCE',\n}\n\n\nclass SignalType(models.TextChoices):\n    ROLL_CLOSE = 'ROLL_CLOSE', '换月平旧'\n    ROLL_OPEN = 'ROLL_OPEN', '换月开新'\n    BUY = 'BUY', '买开'\n    SELL_SHORT = 'SELL_SHORT', '卖开'\n    SELL = 'SELL', '卖平'\n    BUY_COVER = 'BUY_COVER', '买平'\n\n\nclass PriorityType(models.IntegerChoices):\n    LOW = 0, '低'\n    Normal = 1, '普通'\n    High = 2, '高'\n"
  },
  {
    "path": "panel/forms.py",
    "content": "from django import forms\r\nfrom .models import *\r\n\r\n\r\nclass BrokerForm(forms.ModelForm):\r\n    password = forms.CharField(label='密码', widget=forms.PasswordInput)\r\n\r\n    class Meta:\r\n        model = Broker\r\n        exclude = []\r\n"
  },
  {
    "path": "panel/models.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nimport pandas as pd\nfrom pandas.io.sql import read_sql_query\nfrom django.db import models\nfrom django.db import connection\nfrom django.core.exceptions import EmptyResultSet\n\nfrom .const import *\n\n\ndef to_df(queryset, index_col=None, parse_dates=None):\n    \"\"\"\n    :param queryset: django.db.models.query.QuerySet\n    :param index_col: str or list of str, optional, default: None\n    :param parse_dates: list or dict, default: None\n    :return: pandas.core.frame.DataFrame\n    \"\"\"\n    try:\n        query, params = queryset.query.sql_with_params()\n    except EmptyResultSet:\n        # Occurs when Django tries to create an expression for a\n        # query which will certainly be empty\n        # e.g. Book.objects.filter(author__in=[])\n        return pd.DataFrame()\n    return read_sql_query(query, connection, params=params, index_col=index_col, parse_dates=parse_dates)\n\n\nclass Autonumber(models.Model):\n    id = models.AutoField(verbose_name='自增值', primary_key=True)\n    create_date = models.DateTimeField(verbose_name='生成时间', auto_now_add=True)\n\n\nclass Address(models.Model):\n    name = models.CharField(verbose_name='名称', max_length=64)\n    url = models.CharField(verbose_name='地址', max_length=128)\n    type = models.CharField(verbose_name='类型', max_length=16, choices=AddressType.choices)\n    operator = models.CharField(verbose_name='运营商', max_length=16, choices=OperatorType.choices)\n\n    class Meta:\n        verbose_name = '前置地址'\n        verbose_name_plural = '前置地址列表'\n\n    def __str__(self):\n        return '{}{}-{}'.format(self.name, self.get_operator_display(), self.get_type_display())  # type: ignore[attr-defined]\n\n\nclass Broker(models.Model):\n    name = models.CharField(verbose_name='名称', max_length=64)\n    contract_type = models.CharField(verbose_name='市场', max_length=32, choices=ContractType.choices)\n    trade_address = models.ForeignKey(Address, verbose_name='交易前置', on_delete=models.CASCADE, related_name='trade_address')\n    market_address = models.ForeignKey(Address, verbose_name='行情前置', on_delete=models.CASCADE,\n                                       related_name='market_address')\n    identify = models.CharField(verbose_name='唯一标志', max_length=32)\n    username = models.CharField(verbose_name='用户名', max_length=32)\n    password = models.CharField(verbose_name='密码', max_length=32)\n    fake = models.DecimalField(verbose_name='虚拟资金', null=True, max_digits=12, decimal_places=2)\n    cash = models.DecimalField(verbose_name='可用资金', null=True, max_digits=12, decimal_places=2)\n    current = models.DecimalField(verbose_name='动态权益', null=True, max_digits=12, decimal_places=2)\n    pre_balance = models.DecimalField(verbose_name='静态权益', null=True, max_digits=12, decimal_places=2)\n    margin = models.DecimalField(verbose_name='保证金', null=True, max_digits=12, decimal_places=2)\n\n    class Meta:\n        verbose_name = '账户'\n        verbose_name_plural = '账户列表'\n\n    def __str__(self):\n        return '{}-{}'.format(self.name, self.get_contract_type_display())  # type: ignore[attr-defined]\n\n\nclass Performance(models.Model):\n    broker = models.ForeignKey(Broker, verbose_name='账户', on_delete=models.CASCADE)\n    day = models.DateField(verbose_name='日期')\n    capital = models.DecimalField(verbose_name='资金', max_digits=12, decimal_places=2)\n    unit_count = models.IntegerField(verbose_name='单位乘数', null=True)\n    NAV = models.DecimalField(verbose_name='单位净值', max_digits=8, decimal_places=3, null=True)\n    accumulated = models.DecimalField(verbose_name='累计净值', max_digits=8, decimal_places=3, null=True)\n    dividend = models.DecimalField(verbose_name='分红', max_digits=12, decimal_places=2, null=True)\n    used_margin = models.DecimalField(verbose_name='占用保证金', null=True, max_digits=12, decimal_places=2)\n    fake = models.DecimalField(verbose_name='虚拟', max_digits=12, decimal_places=2, null=True)\n\n    class Meta:\n        verbose_name = '绩效'\n        verbose_name_plural = '绩效列表'\n\n    def __str__(self):\n        return '{}-{}'.format(self.broker, self.NAV)\n\n\nclass Strategy(models.Model):\n    broker = models.ForeignKey(Broker, verbose_name='账户', on_delete=models.CASCADE)\n    name = models.CharField(verbose_name='名称', max_length=64)\n    instruments = models.ManyToManyField('Instrument', verbose_name='交易品种')\n    force_opens = models.ManyToManyField('Instrument', verbose_name='手动开仓', related_name='force_opens', blank=True)\n\n    class Meta:\n        verbose_name = '策略'\n        verbose_name_plural = '策略列表'\n\n    def __str__(self):\n        return '{}'.format(self.name)\n\n    def get_instruments(self):\n        return [inst for inst in self.instruments.all()]\n    get_instruments.short_description = '交易合约'  # type: ignore[attr-defined]\n    get_instruments.allow_tags = True  # type: ignore[attr-defined]\n\n    def get_force_opens(self):\n        return [inst for inst in self.force_opens.all()]\n    get_force_opens.short_description = '手动开仓'  # type: ignore[attr-defined]\n    get_force_opens.allow_tags = True  # type: ignore[attr-defined]\n\n\nclass Param(models.Model):\n    strategy = models.ForeignKey(Strategy, verbose_name='策略', on_delete=models.CASCADE)\n    code = models.CharField('参数名', max_length=64)\n    str_value = models.CharField('字符串值', max_length=128, null=True, blank=True)\n    int_value = models.IntegerField('整数值', null=True, blank=True)\n    float_value = models.DecimalField('浮点值', null=True, max_digits=12, decimal_places=3, blank=True)\n    update_time = models.DateTimeField('更新时间', auto_now=True)\n\n    class Meta:\n        verbose_name = '策略参数'\n        verbose_name_plural = '策略参数列表'\n\n    def __str__(self):\n        return '{}: {} = {}'.format(\n            self.strategy, self.code,\n            next((v for v in [self.str_value, self.int_value, self.float_value] if v is not None), '-'))\n\n\nclass Instrument(models.Model):\n    exchange = models.CharField('交易所', max_length=8, choices=ExchangeType.choices)\n    section = models.CharField('分类', max_length=48, null=True, blank=True, choices=SectionType.choices)\n    sort = models.CharField('品种', max_length=48, null=True, blank=True, choices=SortType.choices)\n    name = models.CharField('名称', max_length=32, null=True, blank=True)\n    product_code = models.CharField('代码', max_length=16, unique=True)\n    all_inst = models.CharField('品种列表', max_length=256, null=True, blank=True)\n    main_code = models.CharField('主力合约', max_length=16, null=True, blank=True)\n    last_main = models.CharField('上个主力', max_length=16, null=True, blank=True)\n    change_time = models.DateTimeField('切换时间', null=True, blank=True)\n    night_trade = models.BooleanField('夜盘', default=False)\n    volume_multiple = models.IntegerField('合约乘数', null=True, blank=True)\n    price_tick = models.DecimalField('最小变动', max_digits=8, decimal_places=3, null=True, blank=True)\n    margin_rate = models.DecimalField('保证金率', max_digits=6, decimal_places=5, null=True, blank=True)\n    fee_money = models.DecimalField('金额手续费', max_digits=7, decimal_places=6, null=True, blank=True)\n    fee_volume = models.DecimalField('手数手续费', max_digits=6, decimal_places=2, null=True, blank=True)\n    up_limit_ratio = models.DecimalField('涨停幅度', max_digits=3, decimal_places=2, null=True, blank=True)\n    down_limit_ratio = models.DecimalField('跌停幅度', max_digits=3, decimal_places=2, null=True, blank=True)\n\n    class Meta:\n        verbose_name = '合约'\n        verbose_name_plural = '合约列表'\n\n    def __str__(self):\n        return '{}.{}'.format(self.get_exchange_display(), self.name)  # type: ignore[attr-defined]\n\n\nclass Signal(models.Model):\n    strategy = models.ForeignKey(Strategy, verbose_name='策略', on_delete=models.CASCADE)\n    instrument = models.ForeignKey(Instrument, verbose_name='品种', on_delete=models.CASCADE)\n    code = models.CharField('当前合约', max_length=16, null=True)\n    type = models.CharField('信号类型', max_length=16, choices=SignalType.choices)\n    trigger_value = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='触发值', null=True, blank=True)\n    price = models.DecimalField('价格', max_digits=12, decimal_places=3, null=True, blank=True)\n    volume = models.IntegerField('数量', null=True, blank=True)\n    trigger_time = models.DateTimeField('发生时间')\n    priority = models.IntegerField('优先级', choices=PriorityType.choices, default=PriorityType.Normal)  # type: ignore[arg-type]\n    processed = models.BooleanField('已处理', default=False, blank=True)\n\n    class Meta:\n        verbose_name = '信号'\n        verbose_name_plural = '信号列表'\n\n    def __str__(self):\n        return f\"{self.instrument}({self.code}){self.type}{self.volume}手\" \\\n               f\"{'(夜)' if self.instrument.night_trade else ''}\"\n\n\nclass MainBar(models.Model):\n    exchange = models.CharField('交易所', max_length=8, choices=ExchangeType.choices)\n    product_code = models.CharField('品种代码', max_length=8, null=True, db_index=True)\n    code = models.CharField('合约代码', max_length=16, null=True, blank=True)\n    time = models.DateField('时间', db_index=True)\n    open = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='开盘价')\n    high = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='最高价')\n    low = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='最低价')\n    close = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='收盘价')\n    settlement = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='结算价', null=True)\n    volume = models.IntegerField('成交量')\n    open_interest = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='持仓量')\n    basis = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='基差', null=True)\n\n    class Meta:\n        verbose_name = '主力连续日K线'\n        verbose_name_plural = '主力连续日K线列表'\n\n    def __str__(self):\n        return '{}.{}'.format(self.exchange, self.product_code)\n\n\nclass DailyBar(models.Model):\n    exchange = models.CharField('交易所', max_length=8, choices=ExchangeType.choices)\n    code = models.CharField('品种代码', max_length=16, null=True, db_index=True)\n    expire_date = models.IntegerField('交割时间', null=True)\n    time = models.DateField('时间', db_index=True)\n    open = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='开盘价')\n    high = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='最高价')\n    low = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='最低价')\n    close = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='收盘价')\n    settlement = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='结算价', null=True)\n    volume = models.IntegerField('成交量')\n    open_interest = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='持仓量')\n\n    class Meta:\n        verbose_name = '日K线'\n        verbose_name_plural = '日K线列表'\n\n    def __str__(self):\n        return '{}.{}'.format(self.exchange, self.code)\n\n\nclass Order(models.Model):\n    broker = models.ForeignKey(Broker, verbose_name='账户', on_delete=models.CASCADE)\n    strategy = models.ForeignKey(Strategy, verbose_name='策略', on_delete=models.SET_NULL, null=True, blank=True)\n    order_ref = models.CharField('报单号', max_length=13)\n    instrument = models.ForeignKey(Instrument, verbose_name='品种', on_delete=models.CASCADE)\n    code = models.CharField('合约代码', max_length=16, null=True, blank=True)\n    front = models.IntegerField('前置编号')\n    session = models.IntegerField('会话编号')\n    price = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='报单价格')\n    volume = models.IntegerField('手数', blank=True, null=True)\n    direction = models.CharField('方向', max_length=8, choices=DirectionType.choices)\n    offset_flag = models.CharField('开平', max_length=8, choices=OffsetFlag.choices)\n    status = models.CharField('状态', max_length=16, choices=OrderStatus.choices)\n    send_time = models.DateTimeField('发送时间')\n    update_time = models.DateTimeField('更新时间')\n    signal = models.OneToOneField(Signal, verbose_name='信号', on_delete=models.SET_NULL, null=True, blank=True)\n\n    class Meta:\n        verbose_name = '报单'\n        verbose_name_plural = '报单列表'\n\n    def __str__(self):\n        return '{}-{}'.format(self.instrument, self.get_offset_flag_display())  # type: ignore[attr-defined]\n\n\nclass Trade(models.Model):\n    broker = models.ForeignKey(Broker, verbose_name='账户', on_delete=models.CASCADE)\n    strategy = models.ForeignKey(Strategy, verbose_name='策略', on_delete=models.SET_NULL, null=True, blank=True)\n    instrument = models.ForeignKey(Instrument, verbose_name='品种', on_delete=models.CASCADE)\n    open_order = models.OneToOneField(Order, verbose_name='开仓报单', on_delete=models.SET_NULL,\n                                      related_name='open_order', null=True, blank=True)\n    close_order = models.OneToOneField(Order, verbose_name='平仓报单', on_delete=models.SET_NULL,\n                                       related_name='close_order', null=True, blank=True)\n    code = models.CharField('合约代码', max_length=16, null=True, blank=True)\n    direction = models.CharField('方向', max_length=8, choices=DirectionType.choices)\n    open_time = models.DateTimeField('开仓日期')\n    close_time = models.DateTimeField('平仓日期', null=True, blank=True)\n    shares = models.IntegerField('手数', null=True, blank=True)\n    filled_shares = models.IntegerField('已成交手数', null=True, blank=True)\n    closed_shares = models.IntegerField('已平仓手数', null=True, blank=True)\n    avg_entry_price = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='持仓均价', null=True, blank=True)\n    avg_exit_price = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='平仓均价', null=True, blank=True)\n    profit = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='持仓盈亏', null=True, blank=True)\n    frozen_margin = models.DecimalField(max_digits=12, decimal_places=3, verbose_name='冻结保证金', null=True, blank=True)\n    cost = models.DecimalField(max_digits=12, decimal_places=2, verbose_name='手续费', null=True, blank=True)\n\n    class Meta:\n        verbose_name = '交易记录'\n        verbose_name_plural = '交易记录列表'\n\n    def __str__(self):\n        return '{}{}{}手'.format(self.instrument, self.direction, self.shares)\n"
  },
  {
    "path": "panel/templatetags/__init__.py",
    "content": ""
  },
  {
    "path": "panel/templatetags/custom_tag.py",
    "content": "# coding=utf-8\r\n\r\nfrom django import template\r\n\r\nregister = template.Library()\r\n\r\n\r\n@register.filter\r\ndef number(obj):\r\n    return '%g' % obj\r\n\r\n\r\n@register.filter\r\ndef change_strategy(request, new):\r\n    return request.get_full_path().replace(\r\n        'strategy={}'.format(request.GET['strategy']), 'strategy={}'.format(new))\r\n\r\n\r\n@register.filter\r\ndef in_group(user, group_name):\r\n    return user.groups.filter(name=group_name).exists()\r\n\r\n\r\n@register.filter\r\ndef format_query_string(request):\r\n    variables = request.GET.copy()\r\n    if 'page' in variables:\r\n        del variables['page']\r\n    return '&{0}'.format(variables.urlencode())\r\n\r\n\r\n@register.filter\r\ndef all_query_param(request):\r\n    return request.GET.urlencode()\r\n\r\n\r\n@register.filter\r\ndef left_bar(request):\r\n    left_open = request.COOKIES.get(\"open\", \"false\")\r\n    if left_open == \"true\":\r\n        return \"nav-md\"\r\n    return \"nav-sm\"\r\n\r\n\r\n@register.filter\r\ndef can_edit(db_obj, user):\r\n    return db_obj.has_edit_perm(user)\r\n\r\n\r\n@register.filter\r\ndef split_ip(ip):\r\n    return \"<br>\".join(ip.split(\",\"))\r\n"
  },
  {
    "path": "panel/tests.py",
    "content": "from django.test import TestCase\r\n\r\n# Create your tests here.\r\n"
  },
  {
    "path": "panel/urls.py",
    "content": "# coding=utf-8\r\n#\r\n# Copyright 2016 timercrack\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n# not use this file except in compliance with the License. You may obtain\r\n# a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n# License for the specific language governing permissions and limitations\r\n# under the License.\r\nfrom django.urls import re_path\r\n\r\nfrom .views import *\r\n\r\napp_name = 'dashboard'\r\n\r\nurlpatterns = [\r\n    re_path(r'^status$', StatusView.as_view(\r\n        template_name='panel/status.html'), name=\"status_view\"),\r\n    re_path(r'^status_data', status_data, name='get_status_data'),\r\n\r\n    re_path(r'^performance$', PerformanceView.as_view(\r\n        template_name='panel/performance.html'), name=\"performance_view\"),\r\n    re_path(r'^nav_data', nav_data, name='get_nav_data'),\r\n\r\n    re_path(r'^instrument$', InstrumentView.as_view(\r\n        template_name='panel/instrument.html'), name='instrument_view'),\r\n    re_path(r'^bar_data', bar_data, name='get_bar_data'),\r\n\r\n    re_path(r'^correlation$', CorrelationView.as_view(\r\n        template_name='panel/correlation.html'), name=\"correlation_view\"),\r\n    re_path(r'^corr_data', corr_data, name='get_corr_data'),\r\n]\r\n"
  },
  {
    "path": "panel/views.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nimport datetime\nimport orjson\n\nfrom django.db.models import Q\nfrom django.views.decorators.cache import cache_page\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.http import JsonResponse\nfrom django.utils import timezone\nfrom django.views.generic import TemplateView\nimport logging\nimport pytz\n\nfrom panel.models import *\n\nlogger = logging.getLogger('panel.view')\n\n\nclass CustomBaseView(LoginRequiredMixin, TemplateView):\n    def get_context_data(self, **kwargs):\n        context = super(CustomBaseView, self).get_context_data(**kwargs)\n        context['cur_stra'] = Strategy.objects.get(id=self.request.GET.get('strategy'))\n        context['stra_list'] = Strategy.objects.all()\n        return context\n\n\nclass StatusView(CustomBaseView):\n    def get_context_data(self, **kwargs):\n        context = super(StatusView, self).get_context_data(**kwargs)\n        stra = context['cur_stra']\n        trades = Trade.objects.filter(strategy=stra, close_time__isnull=True).values_list(\n            'frozen_margin', flat=True)\n        context['current'] = stra.broker.current\n        context['pre_balance'] = stra.broker.pre_balance\n        context['margin'] = round(100 * sum(trades) / stra.broker.current, 1)\n        context['pos_list'] = Trade.objects.filter(strategy=stra, close_time__isnull=True).order_by('-profit')\n        context['open_list'] = Signal.objects.filter(\n            Q(type=SignalType.BUY) | Q(type=SignalType.SELL_SHORT), strategy=stra, processed=False)\n        context['close_list'] = Signal.objects.filter(\n            Q(type=SignalType.BUY_COVER) | Q(type=SignalType.SELL), strategy=stra,\n            processed=False).values_list('code', flat=True)\n        context['roll_list'] = Signal.objects.filter(\n            type=SignalType.ROLL_CLOSE, strategy=stra, processed=False).values_list('code', flat=True)\n        return context\n\n\nclass PerformanceView(CustomBaseView):\n    pass\n\n\nclass CorrelationView(CustomBaseView):\n    def get_context_data(self, **kwargs):\n        context = super(CorrelationView, self).get_context_data(**kwargs)\n        sections = context['cur_stra'].instruments.order_by('section').values_list('section', flat=True).distinct()\n        inst_list = list()\n        for sec in sections:\n            inst_list.append((SectionType(sec).label, context['cur_stra'].instruments.filter(\n                section=sec).order_by('-exchange')))\n        context['inst_list'] = inst_list\n        context['strategy_inst'] = context['cur_stra'].instruments.values_list('id', flat=True)\n        return context\n\n\nclass InstrumentView(CustomBaseView):\n    def get_context_data(self, **kwargs):\n        context = super(InstrumentView, self).get_context_data(**kwargs)\n        exchanges = Instrument.objects.all().values_list('exchange', flat=True).distinct()\n        inst_list = dict()\n        for ex in exchanges:\n            inst_list[ExchangeType(ex).label] = context['cur_stra'].instruments.filter(exchange=ex)\n        context['inst_list'] = inst_list\n        return context\n\n\n# @cache_page(3600 * 24)\ndef nav_data(request):\n    q = Performance.objects.filter(broker__strategy__id=request.GET.get('strategy')).order_by(\n        '-day').values_list('day', 'NAV')\n    rst = []\n    for day, val in q:\n        rst.append([day.isoformat(), float(val)])\n    return JsonResponse(rst, safe=False)\n\n\n@cache_page(3600 * 24)\ndef bar_data(request):\n    try:\n        inst_id = request.GET['inst_id']\n        inst = Instrument.objects.get(id=inst_id)\n        break_n = Strategy.objects.first().param_set.get(code='BreakPeriod').int_value + 1\n        q = MainBar.objects.filter(product_code=inst.product_code).order_by('time').values_list(\n            'time', 'open', 'close', 'low', 'high')\n        rst = {'up': [], 'down': [], 'k': [], 'x': [], 'trade': [], 'title': str(inst)}\n        for day, oo, cc, ll, hh in q:\n            rst['x'].append(day.isoformat())\n            rst['k'].append([float(oo), float(cc), float(ll), float(hh)])\n            rst['up'].append(max(x[2] for x in rst['k'][-break_n:]))\n            rst['down'].append(min(x[2] for x in rst['k'][-break_n:]))\n        for t in Trade.objects.filter(\n                instrument_id=inst_id, strategy_id=request.GET.get('strategy')).order_by('open_time'):\n            if t.close_time is None:\n                close_price = rst['k'][-1][1]\n                close_time = rst['x'][-1]\n                if t.profit is None:\n                    continue\n            else:\n                close_price = t.avg_exit_price\n                close_time = timezone.localtime(t.close_time, pytz.FixedOffset(480)).date().isoformat()\n            rst['trade'].append([\n                {\n                    'name': '{}至{} {}仓{}手'.format(\n                        t.open_time, close_time, t.direction, t.shares),\n                    'coord': [timezone.localtime(t.open_time, pytz.FixedOffset(480)).date().isoformat(),\n                              t.avg_entry_price],\n                    'lineStyle': {\n                        'normal': {\n                            'color': '#00f' if t.profit > 0 else '#fff'\n                        }\n                    },\n                },\n                {\n                    'coord': [close_time, close_price]\n                }])\n        return JsonResponse(rst, safe=False)\n    except Exception as e:\n        logger.error('bar_data failed: %s', e, exc_info=True)\n\n\ndef calc_corr(year: int, inst_list: list):\n    category = list()\n    day = datetime.datetime.today()\n    price_dict = dict()\n    begin_day = day.replace(year=day.year - year)\n    for inst in Instrument.objects.filter(id__in=inst_list):\n        category.append(inst.name)\n        price_dict[inst.product_code] = to_df(MainBar.objects.filter(\n            time__gte=begin_day.date(), exchange=inst.exchange,\n            product_code=inst.product_code).order_by('time').values_list('time', 'close'))\n        price_dict[inst.product_code].index = pd.DatetimeIndex(price_dict[inst.product_code].time)\n        price_dict[inst.product_code]['price'] = price_dict[inst.product_code].close.pct_change()\n    return category, pd.DataFrame({k: v.price for k, v in price_dict.items()}).corr()\n\n\n@cache_page(3600 * 24)\ndef corr_data(request):\n    try:\n        year = int(request.GET.get('year'))\n        insts = orjson.loads(request.GET.get('insts'))\n        category, corr_pd = calc_corr(year, insts)\n        length = corr_pd.shape[0]\n        corr_x = pd.DataFrame([corr_pd.iloc[i, j] for i in range(length) for j in range(i+1, length)])\n        return JsonResponse({\n            'data': [[category[i], category[j], round(corr_pd.iloc[i, j], 2)]\n                     for i in range(length) for j in range(i+1, length)],\n            'score': round((((1 - (corr_x.abs() ** 2).mean()[0]) * 100) - 80) * 5, 1),\n            'index': category}, safe=False)\n    except Exception as e:\n        logger.error('corr_data failed: %s', e, exc_info=True)\n\n\ndef status_data(request):\n    try:\n        stra = Strategy.objects.get(id=request.GET.get('strategy'))\n        return JsonResponse({\n            'section_labels': [s.label for s in SectionType],\n            'section': [\n                Trade.objects.filter(\n                    strategy=stra, close_time__isnull=True,\n                    instrument__section=s.value).count()\n                for s in SectionType\n            ],\n            'long': Trade.objects.filter(\n                    strategy=stra, close_time__isnull=True, direction=DirectionType.LONG).count(),\n            'short': Trade.objects.filter(\n                    strategy=stra, close_time__isnull=True, direction=DirectionType.SHORT).count()\n        }, safe=False)\n    except Exception as e:\n        logger.error('status_data failed: %s', e, exc_info=True)\n"
  },
  {
    "path": "requirements.txt",
    "content": "aiohttp[speedups]\norjson\nappdirs\ndjango\nbeautifulsoup4\nlxml\nrequests\nnumpy\npandas\nTA-Lib\ncroniter\nchinese_calendar\nasynctest\nmysqlclient\ntqdm\npytz\ntzdata\neinops\nhuggingface_hub\nmatplotlib\nsafetensors\nsshtunnel\npybind11\nPyYAML\ntushare"
  },
  {
    "path": "runtime_config.py",
    "content": "# coding=utf-8\r\nimport configparser\r\nimport copy\r\nimport os\r\nfrom configparser import MissingSectionHeaderError\r\n\r\nimport yaml\r\n\r\n\r\nREPO_ROOT = os.path.dirname(os.path.abspath(__file__))\r\nROOT_YAML_FILE = os.path.join(REPO_ROOT, 'config.yaml')\r\nROOT_INI_FILE = os.path.join(REPO_ROOT, 'config.ini')\r\n\r\n\r\n_DEFAULT_RUNTIME_DATA = {\r\n    'ctp_native': {\r\n        'gateway': 'pybind',\r\n        'module': 'ctp_bridge_native',\r\n        'client_class': 'CtpClient',\r\n        'module_path': os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'build').replace('\\\\', '/'),\r\n        'dll_dir': os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'api', 'win').replace('\\\\', '/'),\r\n        'trade_front': 'tcp://180.168.146.187:10001',\r\n        'market_front': 'tcp://180.168.146.187:10011',\r\n        'broker_id': '',\r\n        'investor_id': '',\r\n        'password': '',\r\n        'appid': '',\r\n        'authcode': '',\r\n        'userinfo': '',\r\n        'flow_path': os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'flow').replace('\\\\', '/'),\r\n        'request_timeout_ms': 10000,\r\n        'test_instrument': 'IF99',\r\n    },\r\n    'trade': {\r\n        'command_timeout': 5,\r\n        'ignore_inst': 'WH,bb,JR,RI,RS,LR,PM,im',\r\n        'transport': 'native',\r\n    },\r\n    'log': {\r\n        'level': 'DEBUG',\r\n        'format': '%(asctime)s %(name)s [%(levelname)s] %(message)s',\r\n        'weixin_level': 'INFO',\r\n        'weixin_format': '[%(levelname)s] %(message)s',\r\n    },\r\n    'host': {\r\n        'ip': '1.2.3.4',\r\n        'mac': '02:03:04:5a:6b:7c',\r\n    },\r\n    'ssh_tunnel': {\r\n        'enabled': False,\r\n        'host': '127.0.0.1',\r\n        'port': 22,\r\n        'local_node': 'localhost',\r\n        'private_key_linux': '/root/.ssh/id_ed25519',\r\n        'private_key_win': 'C:\\\\Users\\\\timer\\\\.ssh\\\\id_ed25519.ppk',\r\n    },\r\n    'weixin': {\r\n        'Token': '',\r\n        'EncodingAESKey': '',\r\n        'CorpID': '',\r\n        'Secret': '',\r\n    },\r\n}\r\n\r\n\r\ndef _deep_merge_dict(base: dict, override: dict) -> dict:\r\n    merged = copy.deepcopy(base)\r\n    for key, value in override.items():\r\n        if isinstance(value, dict) and isinstance(merged.get(key), dict):\r\n            merged[key] = _deep_merge_dict(merged[key], value)\r\n        else:\r\n            merged[key] = value\r\n    return merged\r\n\r\n\r\ndef _normalize_yaml_data(data: dict | None) -> dict:\r\n    if not isinstance(data, dict):\r\n        return {}\r\n    normalized = {}\r\n    for section, section_values in data.items():\r\n        section_name = str(section).strip().lower()\r\n        if not section_name or not isinstance(section_values, dict):\r\n            continue\r\n        normalized[section_name] = {}\r\n        for key, value in section_values.items():\r\n            normalized[section_name][str(key).strip()] = value\r\n    return normalized\r\n\r\n\r\ndef _load_ini_data(path: str) -> dict:\r\n    parser = configparser.ConfigParser(interpolation=None)\r\n    try:\r\n        try:\r\n            parser.read(path, encoding='utf-8')\r\n        except UnicodeDecodeError:\r\n            parser.read(path, encoding='gb18030')\r\n        if parser.sections():\r\n            out = {}\r\n            for section in parser.sections():\r\n                out[section.lower()] = {k: v for k, v in parser.items(section)}\r\n            return out\r\n    except MissingSectionHeaderError:\r\n        pass\r\n\r\n    raw = {}\r\n    with open(path, 'rt', encoding='utf-8', errors='ignore') as file_obj:\r\n        for line in file_obj:\r\n            s = line.strip()\r\n            if not s or s.startswith(';') or s.startswith('#') or '=' not in s:\r\n                continue\r\n            key, value = s.split('=', 1)\r\n            raw[key.strip()] = value.strip()\r\n\r\n    mapped = copy.deepcopy(_DEFAULT_RUNTIME_DATA)\r\n    mapping = {\r\n        'trade': 'trade_front',\r\n        'market': 'market_front',\r\n        'broker': 'broker_id',\r\n        'investor': 'investor_id',\r\n        'passwd': 'password',\r\n        'appid': 'appid',\r\n        'authcode': 'authcode',\r\n        'userinfo': 'userinfo',\r\n        'module_path': 'module_path',\r\n    }\r\n    for src_key, dst_key in mapping.items():\r\n        if src_key in raw:\r\n            mapped['ctp_native'][dst_key] = raw[src_key]\r\n    if 'ip' in raw:\r\n        mapped['host']['ip'] = raw['ip']\r\n    if 'mac' in raw:\r\n        mapped['host']['mac'] = raw['mac']\r\n    return mapped\r\n\r\n\r\ndef _write_yaml(path: str, data: dict):\r\n    with open(path, 'wt', encoding='utf-8') as file_obj:\r\n        yaml.safe_dump(data, file_obj, allow_unicode=True, sort_keys=False)\r\n\r\n\r\ndef _ensure_yaml_config() -> str:\r\n    if os.path.exists(ROOT_YAML_FILE):\r\n        return ROOT_YAML_FILE\r\n    if os.path.exists(ROOT_INI_FILE):\r\n        ini_data = _load_ini_data(ROOT_INI_FILE)\r\n        yaml_data = _deep_merge_dict(_DEFAULT_RUNTIME_DATA, _normalize_yaml_data(ini_data))\r\n        _write_yaml(ROOT_YAML_FILE, yaml_data)\r\n        print('migrate config file:', ROOT_INI_FILE, '->', ROOT_YAML_FILE)\r\n        return ROOT_YAML_FILE\r\n    _write_yaml(ROOT_YAML_FILE, _DEFAULT_RUNTIME_DATA)\r\n    print('create config file:', ROOT_YAML_FILE)\r\n    return ROOT_YAML_FILE\r\n\r\n\r\ndef _to_config_parser(yaml_data: dict) -> configparser.ConfigParser:\r\n    parser = configparser.ConfigParser(interpolation=None)\r\n    for section, section_values in yaml_data.items():\r\n        section_name = section.upper()\r\n        if not parser.has_section(section_name):\r\n            parser.add_section(section_name)\r\n        for key, value in section_values.items():\r\n            parser.set(section_name, key, '' if value is None else str(value))\r\n    return parser\r\n\r\n\r\ndef load_runtime_config() -> configparser.ConfigParser:\r\n    yaml_file = _ensure_yaml_config()\r\n    with open(yaml_file, 'rt', encoding='utf-8') as file_obj:\r\n        yaml_data = yaml.safe_load(file_obj) or {}\r\n    normalized = _normalize_yaml_data(yaml_data)\r\n    return _to_config_parser(normalized)\r\n\r\n\r\nruntime_config = load_runtime_config()\r\n"
  },
  {
    "path": "strategy/__init__.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nimport orjson\n\nimport pytz\nimport time\nimport datetime\nimport logging\nfrom collections import defaultdict\nfrom django.utils import timezone\nfrom croniter import croniter\nimport asyncio\nfrom abc import abstractmethod, ABCMeta\nfrom ctp_native import LocalRedisLikeClient\nfrom utils.func_container import CallbackFunctionContainer\nfrom utils.read_config import config\n\nlogger = logging.getLogger('BaseModule')\n\n\nclass BaseModule(CallbackFunctionContainer, metaclass=ABCMeta):\n    def __init__(self):\n        super().__init__()\n        self.io_loop = asyncio.new_event_loop()\n        asyncio.set_event_loop(self.io_loop)\n        self.transport = 'native'\n        self.redis_client = LocalRedisLikeClient(self.io_loop)\n        self.sub_client = self.redis_client.pubsub()\n        self.initialized = False\n        self.sub_tasks = list()\n        self.sub_channels = list()\n        self.channel_router = dict()\n        self.crontab_router = defaultdict(dict)\n        self.datetime = None\n        self.time = None\n        self.loop_time = None\n\n    def _register_callback(self):\n        self.datetime = timezone.localtime()\n        self.time = time.time()\n        self.loop_time = self.io_loop.time()\n        for fun_name, args in self.callback_fun_args.items():\n            if 'crontab' in args:\n                key = args['crontab']\n                self.crontab_router[key]['func'] = getattr(self, fun_name)\n                self.crontab_router[key]['iter'] = croniter(args['crontab'], self.datetime)\n                self.crontab_router[key]['handle'] = None\n            elif 'channel' in args:\n                self.channel_router[args['channel']] = getattr(self, fun_name)\n\n    def _get_next(self, key):\n        return self.loop_time + (self.crontab_router[key]['iter'].get_next() - self.time)\n\n    def _call_next(self, key):\n        if self.crontab_router[key]['handle'] is not None:\n            self.crontab_router[key]['handle'].cancel()\n        self.crontab_router[key]['handle'] = self.io_loop.call_at(self._get_next(key), self._call_next, key)\n        self.io_loop.create_task(self.crontab_router[key]['func']())\n\n    async def install(self):\n        try:\n            if hasattr(self.redis_client, 'start'):\n                await self.redis_client.start()\n            self._register_callback()\n            await self.sub_client.psubscribe(*self.channel_router.keys())\n            asyncio.run_coroutine_threadsafe(self._msg_reader(), self.io_loop)\n            # self.io_loop.create_task(self._msg_reader())\n            for key, cron_dict in self.crontab_router.items():\n                if cron_dict['handle'] is not None:\n                    cron_dict['handle'].cancel()\n                cron_dict['handle'] = self.io_loop.call_at(self._get_next(key), self._call_next, key)\n            self.initialized = True\n            logger.debug('%s plugin installed', type(self).__name__)\n        except Exception as e:\n            logger.error('%s plugin install failed: %s', type(self).__name__, repr(e), exc_info=True)\n\n    async def uninstall(self):\n        try:\n            await self.sub_client.punsubscribe()\n            # await asyncio.wait(self.sub_tasks, loop=self.io_loop)\n            self.sub_tasks.clear()\n            await self.sub_client.close()\n            if hasattr(self.redis_client, 'stop'):\n                await self.redis_client.stop()\n            for key, cron_dict in self.crontab_router.items():\n                if self.crontab_router[key]['handle'] is not None:\n                    self.crontab_router[key]['handle'].cancel()\n                    self.crontab_router[key]['handle'] = None\n            self.initialized = False\n            logger.debug('%s plugin uninstalled', type(self).__name__)\n        except Exception as e:\n            logger.error('%s plugin uninstall failed: %s', type(self).__name__, repr(e), exc_info=True)\n\n    async def _msg_reader(self):\n        # {'type': 'pmessage', 'pattern': 'channel:*', 'channel': 'channel:1', 'data': 'Hello'}\n        async for msg in self.sub_client.listen():\n            if msg['type'] == 'pmessage':\n                channel = msg['channel']\n                pattern = msg['pattern']\n                data = orjson.loads(msg['data'])\n                # logger.debug(\"%s channel[%s] Got Message:%s\", type(self).__name__, channel, msg)\n                self.io_loop.create_task(self.channel_router[pattern](channel, data))\n            elif msg['type'] == 'punsubscribe':\n                break\n        logger.debug('%s quit _msg_reader!', type(self).__name__)\n\n    async def start(self):\n        await self.install()\n\n    async def stop(self):\n        await self.uninstall()\n\n    def run(self):\n        try:\n            self.io_loop.create_task(self.start())\n            self.io_loop.run_forever()\n        except KeyboardInterrupt:\n            self.io_loop.run_until_complete(self.stop())\n        except Exception as ee:\n            logger.error('发生错误: %s', repr(ee), exc_info=True)\n            self.io_loop.run_until_complete(self.stop())\n        finally:\n            logger.debug('程序已退出')\n"
  },
  {
    "path": "strategy/base_strategy.py",
    "content": "# coding=utf-8\r\n# pyright: reportAttributeAccessIssue=false, reportOptionalMemberAccess=false, reportOptionalSubscript=false, reportOptionalOperand=false, reportArgumentType=false, reportOperatorIssue=false, reportGeneralTypeIssues=false, reportCallIssue=false\r\n#\r\n# Copyright 2016 timercrack\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n# not use this file except in compliance with the License. You may obtain\r\n# a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n# License for the specific language governing permissions and limitations\r\n# under the License.\r\nimport asyncio\r\nimport re\r\nfrom abc import abstractmethod\r\nfrom collections import defaultdict\r\nimport datetime\r\nfrom decimal import Decimal\r\nfrom typing import Any\r\nimport logging\r\nfrom django.db.models import Q, F, Sum\r\nfrom django.utils import timezone\r\nimport orjson\r\nfrom strategy import BaseModule\r\nfrom utils.func_container import RegisterCallback\r\nfrom utils.read_config import config, ctp_errors\r\nfrom utils import ApiStruct, price_round, is_trading_day, update_from_shfe, update_from_dce, update_from_czce, update_from_cffex, \\\r\n    get_contracts_argument, calc_main_inst, str_to_number, get_next_id, ORDER_REF_SIGNAL_ID_START, update_from_gfex\r\nfrom panel.models import *\r\n\r\nlogger = logging.getLogger('CTPApi')\r\nHANDLER_TIME_OUT = config.getint('TRADE', 'command_timeout', fallback=10)\r\n\r\n\r\nclass BaseTradeStrategy(BaseModule):\r\n    \"\"\"\r\n    交易策略公共基类，封装 CTP 通信、账户/持仓管理、回调处理、定时任务等共用逻辑。\r\n    子类只需实现 calc_signal()，可选覆盖 get_signal_instruments() / get_margin_threshold()。\r\n    \"\"\"\r\n\r\n    def __init__(self, name: str):\r\n        super().__init__()\r\n        self._market_response_format = config.get('MSG_CHANNEL', 'market_response_format', fallback='MSG:CTP:RSP:MARKET:{}:{}')\r\n        self._trade_response_format = config.get('MSG_CHANNEL', 'trade_response_format', fallback='MSG:CTP:RSP:TRADE:{}:{}')\r\n        self._request_format = config.get('MSG_CHANNEL', 'request_format', fallback='MSG:CTP:REQ:{}')\r\n        self._ignore_inst_list = config.get('TRADE', 'ignore_inst', fallback=\"WH,bb,JR,RI,RS,LR,PM,im\").split(',')\r\n        self._strategy = Strategy.objects.get(name=name)\r\n        self._inst_ids = self._strategy.instruments.all().values_list('product_code', flat=True)\r\n        self._broker = self._strategy.broker\r\n        self._fake = self._broker.fake  # 虚拟资金\r\n        self._current = self._broker.current  # 当前动态权益\r\n        self._pre_balance = self._broker.pre_balance  # 静态权益\r\n        self._cash = self._broker.cash  # 可用资金\r\n        self._shares = dict()  # { instrument : position }\r\n        self._cur_account = None\r\n        self._margin = self._broker.margin  # 占用保证金\r\n        self._withdraw = 0  # 出金\r\n        self._deposit = 0  # 入金\r\n        self._activeOrders = dict()  # 未成交委托单\r\n        self._cur_pos = dict()  # 持有头寸\r\n        self._re_extract_code = re.compile(r'([a-zA-Z]*)(\\d+)')  # 提合约字母部分 IF1509 -> IF\r\n        self._re_extract_name = re.compile('(.*?)([0-9]+)(.*?)$')  # 提取合约文字部分\r\n        trading_day = self.redis_client.get(\"TradingDay\")\r\n        if not trading_day:\r\n            trading_day = timezone.localtime().strftime('%Y%m%d')\r\n            self.redis_client.set('TradingDay', trading_day)\r\n        last_trading_day = self.redis_client.get(\"LastTradingDay\")\r\n        if not last_trading_day:\r\n            last_trading_day = trading_day\r\n            self.redis_client.set('LastTradingDay', last_trading_day)\r\n        self._trading_day = timezone.make_aware(datetime.datetime.strptime(trading_day + '08', '%Y%m%d%H'))\r\n        self._last_trading_day = timezone.make_aware(datetime.datetime.strptime(last_trading_day + '08', '%Y%m%d%H'))\r\n        # CTP 连接状态\r\n        self._trade_connected: bool = False\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 参数读取\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    def get_param(self, code: str, default=None):\r\n        \"\"\"从 DB Param 表读取参数值，优先返回 int_value → float_value → str_value，未找到则返回 default\"\"\"\r\n        try:\r\n            p = self._strategy.param_set.get(code=code)\r\n            for val in [p.int_value, p.float_value, p.str_value]:\r\n                if val is not None:\r\n                    return val\r\n            return default\r\n        except Exception:\r\n            return default\r\n\r\n    @staticmethod\r\n    def _normalize_ctp_text(text: Any) -> str:\r\n        if text is None:\r\n            return ''\r\n        s = str(text).strip()\r\n        if not s:\r\n            return ''\r\n        # 兼容 pybind 在部分柜台返回 GBK 文本时可能出现的乱码\r\n        try:\r\n            raw = s.encode('latin1')\r\n        except UnicodeEncodeError:\r\n            return s\r\n        for enc in ('gbk', 'gb18030'):\r\n            try:\r\n                fixed = raw.decode(enc).strip()\r\n            except UnicodeDecodeError:\r\n                continue\r\n            if fixed and any('\\u4e00' <= ch <= '\\u9fff' for ch in fixed):\r\n                return fixed\r\n        return s\r\n\r\n    @staticmethod\r\n    def _is_suspect_text(text: str) -> bool:\r\n        if not text:\r\n            return True\r\n        if '\\ufffd' in text or '�' in text:\r\n            return True\r\n        if any(ch in text for ch in ('ϩ', '¾', '��')):\r\n            return True\r\n        return False\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 启动 / 账户 / 持仓 / 合约\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    async def start(self):\r\n        await self.install()\r\n        self.redis_client.set('HEARTBEAT:TRADER', 1, ex=61)\r\n        today = timezone.localtime()\r\n        now = int(today.strftime('%H%M'))\r\n        _, trading = await is_trading_day(today)\r\n        if trading and (820 <= now <= 1550 or 2010 <= now <= 2359):\r\n            await self._session_init()\r\n        # 延迟检查 CTP 连接状态\r\n        self.io_loop.call_later(10, asyncio.create_task, self._check_initial_connection())\r\n\r\n    async def _check_initial_connection(self):\r\n        if not self._trade_connected:\r\n            logger.debug('CTP 前置未连接，可能处于非交易时段，等待自动重连...')\r\n\r\n    async def _session_init(self):\r\n        \"\"\"盘前初始化：刷新账户、撤销未成交订单、同步持仓\"\"\"\r\n        if not self._trade_connected:\r\n            logger.debug('CTP 交易前置未连接，跳过 session_init')\r\n            return\r\n        try:\r\n            await self.refresh_account()\r\n            order_list = await self.query('Order') or []\r\n            for order in order_list:\r\n                # 未成交订单\r\n                if int(order['OrderStatus']) in range(1, 5) and order['OrderSubmitStatus'] == ApiStruct.OSS_Accepted:\r\n                    direct_str = DirectionType(order['Direction']).label\r\n                    logger.info(f\"撤销未成交订单: 合约{order['InstrumentID']} {direct_str}单 {order['VolumeTotal']}手 价格{order['LimitPrice']}\")\r\n                    await self.cancel_order(order)\r\n                # 已成交订单\r\n                elif order['OrderSubmitStatus'] == ApiStruct.OSS_Accepted:\r\n                    self.save_order(order)\r\n            await self.refresh_position()\r\n        except Exception as e:\r\n            logger.warning(f'_session_init 发生错误: {repr(e)}', exc_info=True)\r\n\r\n    async def refresh_account(self):\r\n        try:\r\n            logger.debug('更新账户')\r\n            account = await self.query('TradingAccount')\r\n            account = account[0]\r\n            self._withdraw = Decimal(account['Withdraw'])\r\n            self._deposit = Decimal(account['Deposit'])\r\n            # 虚拟=虚拟(原始)-入金+出金\r\n            fake = self._fake - self._deposit + self._withdraw\r\n            if fake < 1:\r\n                fake = 0\r\n            # 静态权益=上日结算+入金金额-出金金额\r\n            self._pre_balance = Decimal(account['PreBalance']) + self._deposit - self._withdraw\r\n            # 动态权益=静态权益+平仓盈亏+持仓盈亏-手续费\r\n            self._current = self._pre_balance + Decimal(account['CloseProfit']) + Decimal(account['PositionProfit']) - Decimal(account['Commission'])\r\n            self._margin = Decimal(account['CurrMargin'])\r\n            self._cash = Decimal(account['Available'])\r\n            self._cur_account = account\r\n            self._broker.cash = self._cash\r\n            self._broker.current = self._current\r\n            self._broker.pre_balance = self._pre_balance\r\n            self._broker.margin = self._margin\r\n            self._broker.save(update_fields=['cash', 'current', 'pre_balance', 'margin'])\r\n            logger.debug(f\"更新账户,可用资金: {self._cash:,.0f} 静态权益: {self._pre_balance:,.0f} 动态权益: {self._current:,.0f} \"\r\n                         f\"出入金: {self._withdraw - self._deposit:,.0f} 虚拟: {fake:,.0f}\")\r\n        except Exception as e:\r\n            logger.warning(f'refresh_account 发生错误: {repr(e)}', exc_info=True)\r\n\r\n    async def refresh_position(self):\r\n        try:\r\n            logger.debug('更新持仓...')\r\n            pos_list = await self.query('InvestorPositionDetail') or []\r\n            self._cur_pos.clear()\r\n            for pos in pos_list:\r\n                if 'empty' in pos and pos['empty'] is True or len(pos['InstrumentID']) > 6:\r\n                    continue\r\n                if pos['Volume'] > 0:\r\n                    old_pos = self._cur_pos.get(pos['InstrumentID'])\r\n                    if old_pos is None:\r\n                        self._cur_pos[pos['InstrumentID']] = pos\r\n                    else:\r\n                        old_pos['OpenPrice'] = (old_pos['OpenPrice'] * old_pos['Volume'] + pos['OpenPrice'] * pos['Volume']) / (old_pos['Volume'] + pos['Volume'])\r\n                        old_pos['Volume'] += pos['Volume']\r\n                        old_pos['PositionProfitByTrade'] += pos['PositionProfitByTrade']\r\n                        old_pos['Margin'] += pos['Margin']\r\n            Trade.objects.filter(~Q(code__in=self._cur_pos.keys()), close_time__isnull=True).delete()  # 删除不存在的头寸\r\n            for _, pos in self._cur_pos.items():\r\n                p_code = self._re_extract_code.match(pos['InstrumentID']).group(1)\r\n                inst = Instrument.objects.get(product_code=p_code)\r\n                trade = Trade.objects.filter(broker=self._broker, strategy=self._strategy, instrument=inst, code=pos['InstrumentID'], close_time__isnull=True,\r\n                                             direction=DirectionType(pos['Direction']).label).first()\r\n                bar = DailyBar.objects.filter(code=pos['InstrumentID']).order_by('-time').first()\r\n                profit = (bar.close - Decimal(pos['OpenPrice'])) * pos['Volume'] * inst.volume_multiple\r\n                if pos['Direction'] == DirectionType.SHORT:\r\n                    profit *= -1\r\n                if trade:\r\n                    trade.shares = (trade.closed_shares if trade.closed_shares else 0) + pos['Volume']\r\n                    trade.filled_shares = trade.shares\r\n                    trade.profit = profit\r\n                    trade.save(update_fields=['shares', 'filled_shares', 'profit'])\r\n                else:\r\n                    Trade.objects.create(\r\n                        broker=self._broker, strategy=self._strategy, instrument=inst, code=pos['InstrumentID'], profit=profit, filled_shares=pos['Volume'],\r\n                        direction=DirectionType(pos['Direction']).label, avg_entry_price=Decimal(pos['OpenPrice']), shares=pos['Volume'],\r\n                        open_time=timezone.make_aware(datetime.datetime.strptime(pos['OpenDate'] + '08', '%Y%m%d%H')), frozen_margin=Decimal(pos['Margin']),\r\n                        cost=pos['Volume'] * Decimal(pos['OpenPrice']) * inst.fee_money * inst.volume_multiple + pos['Volume'] * inst.fee_volume)\r\n            logger.debug('更新持仓完成!')\r\n        except Exception as e:\r\n            logger.warning(f'refresh_position 发生错误: {repr(e)}', exc_info=True)\r\n\r\n    async def refresh_instrument(self):\r\n        try:\r\n            logger.debug(\"更新合约...\")\r\n            inst_dict = defaultdict(dict)\r\n            margin_rate_cache: dict[str, Any] = {}\r\n            fee_cache: dict[str, Any] = {}\r\n            inst_list = await self.query('Instrument') or []\r\n            for inst in inst_list:\r\n                if inst['empty']:\r\n                    continue\r\n                is_trading = inst.get('IsTrading') == 1 or str(inst.get('IsTrading')) == '1'\r\n                product_class = inst.get('ProductClass')\r\n                if isinstance(product_class, int):\r\n                    product_class = chr(product_class)\r\n                if is_trading and product_class == ApiStruct.PC_Futures:\r\n                    product_id = str(inst.get('ProductID', '')).strip()\r\n                    instrument_id = str(inst.get('InstrumentID', '')).strip()\r\n                    exchange_id = str(inst.get('ExchangeID', '')).strip()\r\n                    if not product_id or not instrument_id or not exchange_id:\r\n                        continue\r\n                    if product_id in self._ignore_inst_list or inst['LongMarginRatio'] > 1:\r\n                        continue\r\n                    inst_dict[product_id][instrument_id] = dict()\r\n                    inst_dict[product_id][instrument_id]['exchange'] = exchange_id\r\n                    inst_dict[product_id][instrument_id]['name'] = self._normalize_ctp_text(inst.get('InstrumentName', ''))\r\n                    inst_dict[product_id][instrument_id]['multiple'] = inst['VolumeMultiple']\r\n                    inst_dict[product_id][instrument_id]['price_tick'] = inst['PriceTick']\r\n            for code in inst_dict.keys():\r\n                all_inst = ','.join(sorted(inst_dict[code].keys()))\r\n                inst_data = list(inst_dict[code].values())[0]\r\n                valid_name = self._re_extract_name.match(inst_data['name'])\r\n                if valid_name is not None:\r\n                    valid_name = valid_name.group(1)\r\n                else:\r\n                    valid_name = inst_data['name']\r\n                if valid_name == code:\r\n                    valid_name = ''\r\n                inst_data['name'] = valid_name\r\n                inst, created = Instrument.objects.update_or_create(product_code=code)\r\n                logger.debug(f\"inst:{inst} created:{created} main_code:{inst.main_code}\")\r\n                update_field_list = list()\r\n                # 更新主力合约的保证金和手续费\r\n                if inst.main_code:\r\n                    margin_rate = margin_rate_cache.get(inst.main_code)\r\n                    if margin_rate is None:\r\n                        margin_rate = await self.query('InstrumentMarginRate', InstrumentID=inst.main_code)\r\n                        margin_rate_cache[inst.main_code] = margin_rate\r\n                    if margin_rate:\r\n                        inst.margin_rate = margin_rate[0]['LongMarginRatioByMoney']\r\n                        update_field_list.append('margin_rate')\r\n                    else:\r\n                        logger.debug(f'{inst} 查询保证金率为空，跳过')\r\n                    fee = fee_cache.get(inst.main_code)\r\n                    if fee is None:\r\n                        fee = await self.query('InstrumentCommissionRate', InstrumentID=inst.main_code)\r\n                        fee_cache[inst.main_code] = fee\r\n                    if fee:\r\n                        inst.fee_money = Decimal(fee[0]['CloseRatioByMoney'])\r\n                        inst.fee_volume = Decimal(fee[0]['CloseRatioByVolume'])\r\n                        update_field_list += ['fee_money', 'fee_volume']\r\n                    else:\r\n                        logger.debug(f'{inst} 查询手续费为空，跳过')\r\n                if created:\r\n                    inst.exchange = inst_data['exchange']\r\n                    inst.name = inst_data['name']\r\n                    inst.all_inst = all_inst\r\n                    inst.volume_multiple = inst_data['multiple']\r\n                    inst.price_tick = inst_data['price_tick']\r\n                    update_field_list += ['exchange', 'name', 'all_inst', 'volume_multiple', 'price_tick']\r\n                else:\r\n                    if inst_data.get('exchange') and not inst.exchange:\r\n                        inst.exchange = inst_data['exchange']\r\n                        update_field_list.append('exchange')\r\n                    normalized_name = inst_data.get('name', '')\r\n                    if normalized_name and (not inst.name or self._is_suspect_text(inst.name)):\r\n                        inst.name = normalized_name\r\n                        update_field_list.append('name')\r\n                    if all_inst and (not inst.all_inst or inst.main_code):\r\n                        inst.all_inst = all_inst\r\n                        update_field_list.append('all_inst')\r\n                inst.save(update_fields=update_field_list)\r\n            logger.debug(\"更新合约完成!\")\r\n        except Exception as e:\r\n            logger.warning(f'refresh_instrument 发生错误: {repr(e)}', exc_info=True)\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 持仓查询\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    def getShares(self, instrument: str):\r\n        # 这个函数只能处理持有单一方向仓位的情况，若同时持有多空的头寸，返回结果不正确\r\n        shares = 0\r\n        pos_price = 0\r\n        for pos in self._shares[instrument]:\r\n            pos_price += pos['Volume'] * pos['OpenPrice']\r\n            shares += pos['Volume'] * (-1 if pos['Direction'] == DirectionType.SHORT else 1)\r\n        return shares, pos_price / abs(shares), self._shares[instrument][0]['OpenDate']\r\n\r\n    def getPositions(self, inst_id: int):\r\n        # 这个函数只能处理持有单一方向仓位的情况，若同时持有多空的头寸，返回结果不正确\r\n        return self._shares[inst_id][0]\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # CTP 查询通信\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    def async_query(self, query_type: str, **kwargs):\r\n        request_id = get_next_id()\r\n        kwargs['RequestID'] = request_id\r\n        self.redis_client.publish(self._request_format.format('ReqQry' + query_type), orjson.dumps(kwargs))\r\n\r\n    @staticmethod\r\n    async def query_reader(pb):\r\n        msg_list = []\r\n        async for msg in pb.listen():\r\n            msg_dict = orjson.loads(msg['data'])\r\n            if 'empty' not in msg_dict or not msg_dict['empty']:\r\n                msg_list.append(msg_dict)\r\n            if 'bIsLast' not in msg_dict or msg_dict['bIsLast']:\r\n                return msg_list\r\n\r\n    async def query(self, query_type: str, **kwargs):\r\n        sub_client = None\r\n        channel_rsp_qry, channel_rsp_err = None, None\r\n        try:\r\n            sub_client = self.redis_client.pubsub(ignore_subscribe_messages=True)\r\n            request_id = get_next_id()\r\n            kwargs['RequestID'] = request_id\r\n            channel_rsp_qry = self._trade_response_format.format('OnRspQry' + query_type, request_id)\r\n            channel_rsp_err = self._trade_response_format.format('OnRspError', request_id)\r\n            await sub_client.psubscribe(channel_rsp_qry, channel_rsp_err)\r\n            task = asyncio.create_task(self.query_reader(sub_client))\r\n            self.redis_client.publish(self._request_format.format('ReqQry' + query_type), orjson.dumps(kwargs))\r\n            await asyncio.wait_for(task, HANDLER_TIME_OUT)\r\n            await sub_client.punsubscribe()\r\n            await sub_client.close()\r\n            return task.result()\r\n        except Exception as e:\r\n            logger.warning(f'{query_type} 发生错误: {repr(e)}', exc_info=True)\r\n            if sub_client and channel_rsp_qry:\r\n                await sub_client.unsubscribe()\r\n                await sub_client.close()\r\n            return None\r\n\r\n    async def SubscribeMarketData(self, inst_ids: list):\r\n        sub_client = None\r\n        channel_rsp_dat, channel_rsp_err = None, None\r\n        try:\r\n            sub_client = self.redis_client.pubsub(ignore_subscribe_messages=True)\r\n            channel_rsp_dat = self._market_response_format.format('OnRspSubMarketData', 0)\r\n            channel_rsp_err = self._market_response_format.format('OnRspError', 0)\r\n            await sub_client.psubscribe(channel_rsp_dat, channel_rsp_err)\r\n            task = asyncio.create_task(self.query_reader(sub_client))\r\n            self.redis_client.publish(self._request_format.format('SubscribeMarketData'), orjson.dumps(inst_ids))\r\n            await asyncio.wait_for(task, HANDLER_TIME_OUT)\r\n            await sub_client.punsubscribe()\r\n            await sub_client.close()\r\n            return task.result()\r\n        except Exception as e:\r\n            logger.warning(f'SubscribeMarketData 发生错误: {repr(e)}', exc_info=True)\r\n            if sub_client and sub_client.in_pubsub and channel_rsp_dat:\r\n                await sub_client.unsubscribe()\r\n                await sub_client.close()\r\n            return None\r\n\r\n    async def UnSubscribeMarketData(self, inst_ids: list):\r\n        sub_client = None\r\n        channel_rsp_dat, channel_rsp_err = None, None\r\n        try:\r\n            sub_client = self.redis_client.pubsub(ignore_subscribe_messages=True)\r\n            channel_rsp_dat = self._market_response_format.format('OnRspUnSubMarketData', 0)\r\n            channel_rsp_err = self._market_response_format.format('OnRspError', 0)\r\n            await sub_client.psubscribe(channel_rsp_dat, channel_rsp_err)\r\n            task = asyncio.create_task(self.query_reader(sub_client))\r\n            self.redis_client.publish(self._request_format.format('UnSubscribeMarketData'), orjson.dumps(inst_ids))\r\n            await asyncio.wait_for(task, HANDLER_TIME_OUT)\r\n            await sub_client.punsubscribe()\r\n            await sub_client.close()\r\n            return task.result()\r\n        except Exception as e:\r\n            logger.warning(f'UnSubscribeMarketData 发生错误: {repr(e)}', exc_info=True)\r\n            if sub_client and sub_client.in_pubsub and channel_rsp_dat:\r\n                await sub_client.unsubscribe()\r\n                await sub_client.close()\r\n            return None\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 下单 / 撤单\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    def ReqOrderInsert(self, sig: Signal):\r\n        try:\r\n            request_id = get_next_id()\r\n            autoid = Autonumber.objects.create()\r\n            order_ref = f\"{autoid.id:07}{sig.id:05}\"\r\n            param_dict = dict()\r\n            param_dict['RequestID'] = request_id\r\n            param_dict['OrderRef'] = order_ref\r\n            param_dict['InstrumentID'] = sig.code\r\n            param_dict['VolumeTotalOriginal'] = sig.volume\r\n            param_dict['LimitPrice'] = float(sig.price)\r\n            match sig.type:\r\n                case SignalType.BUY | SignalType.SELL_SHORT:\r\n                    param_dict['Direction'] = ApiStruct.D_Buy if sig.type == SignalType.BUY else ApiStruct.D_Sell\r\n                    param_dict['CombOffsetFlag'] = ApiStruct.OF_Open\r\n                    logger.info(f'{sig.instrument} {sig.type}{sig.volume}手 价格: {sig.price}')\r\n                case SignalType.BUY_COVER | SignalType.SELL:\r\n                    param_dict['Direction'] = ApiStruct.D_Buy if sig.type == SignalType.BUY_COVER else ApiStruct.D_Sell\r\n                    param_dict['CombOffsetFlag'] = ApiStruct.OF_Close\r\n                    pos = Trade.objects.filter(\r\n                        broker=self._broker, strategy=self._strategy, code=sig.code, shares=sig.volume, close_time__isnull=True,\r\n                        direction=DirectionType.SHORT.label if sig.type == SignalType.BUY_COVER else DirectionType.LONG.label).first()\r\n                    if pos.open_time.astimezone().date() == timezone.localtime().date() and pos.instrument.exchange == ExchangeType.SHFE:\r\n                        param_dict['CombOffsetFlag'] = ApiStruct.OF_CloseToday  # 上期所区分平今和平昨\r\n                    logger.info(f'{sig.instrument} {sig.type}{sig.volume}手 价格: {sig.price}')\r\n                case SignalType.ROLL_CLOSE:\r\n                    param_dict['CombOffsetFlag'] = ApiStruct.OF_Close\r\n                    pos = Trade.objects.filter(broker=self._broker, strategy=self._strategy, code=sig.code, shares=sig.volume, close_time__isnull=True).first()\r\n                    param_dict['Direction'] = ApiStruct.D_Sell if pos.direction == DirectionType.LONG.label else ApiStruct.D_Buy\r\n                    if pos.open_time.astimezone().date() == timezone.localtime().date() and pos.instrument.exchange == ExchangeType.SHFE:\r\n                        param_dict['CombOffsetFlag'] = ApiStruct.OF_CloseToday  # 上期所区分平今和平昨\r\n                    logger.info(f'{sig.code}->{sig.instrument.main_code} {pos.direction}头换月平旧{sig.volume}手 价格: {sig.price}')\r\n                case SignalType.ROLL_OPEN:\r\n                    param_dict['CombOffsetFlag'] = ApiStruct.OF_Open\r\n                    pos = Trade.objects.filter(\r\n                        Q(close_time__isnull=True) | Q(close_time__date__gte=timezone.localtime().now().date()),\r\n                        broker=self._broker, strategy=self._strategy, code=sig.instrument.last_main, shares=sig.volume).first()\r\n                    param_dict['Direction'] = ApiStruct.D_Buy if pos.direction == DirectionType.LONG.label else ApiStruct.D_Sell\r\n                    logger.info(f'{pos.code}->{sig.code} {pos.direction}头换月开新{sig.volume}手 价格: {sig.price}')\r\n            self.redis_client.publish(self._request_format.format('ReqOrderInsert'), orjson.dumps(param_dict))\r\n        except Exception as e:\r\n            logger.warning(f'ReqOrderInsert 发生错误: {repr(e)}', exc_info=True)\r\n\r\n    async def cancel_order(self, order: dict):\r\n        sub_client = None\r\n        channel_rsp_odr_act, channel_rsp_err = None, None\r\n        try:\r\n            sub_client = self.redis_client.pubsub(ignore_subscribe_messages=True)\r\n            request_id = get_next_id()\r\n            order['RequestID'] = request_id\r\n            channel_rtn_odr = self._trade_response_format.format('OnRtnOrder', order['OrderRef'])\r\n            channel_rsp_odr_act = self._trade_response_format.format('OnRspOrderAction', 0)\r\n            channel_rsp_err = self._trade_response_format.format('OnRspError', request_id)\r\n            await sub_client.psubscribe(channel_rtn_odr, channel_rsp_odr_act, channel_rsp_err)\r\n            task = asyncio.create_task(self.query_reader(sub_client))\r\n            self.redis_client.publish(self._request_format.format('ReqOrderAction'), orjson.dumps(order))\r\n            await asyncio.wait_for(task, HANDLER_TIME_OUT)\r\n            await sub_client.punsubscribe()\r\n            await sub_client.close()\r\n            result = task.result()[0]\r\n            if 'ErrorID' in result:\r\n                err_id = result['ErrorID']\r\n                err_msg = ctp_errors.get(err_id, f\"未知错误码:{err_id}\")\r\n                logger.warning(f\"撤销订单出错: {err_msg}\")\r\n                return False\r\n            return True\r\n        except Exception as e:\r\n            logger.warning('cancel_order 发生错误: %s', repr(e), exc_info=True)\r\n            if sub_client and sub_client.in_pubsub and channel_rsp_odr_act:\r\n                await sub_client.unsubscribe()\r\n                await sub_client.close()\r\n            return False\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 行情回调\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    @RegisterCallback(channel='MSG:CTP:RSP:MARKET:OnRtnDepthMarketData:*')\r\n    async def OnRtnDepthMarketData(self, channel, tick: dict):\r\n        try:\r\n            inst = channel.split(':')[-1]\r\n            tick['UpdateTime'] = datetime.datetime.strptime(tick['UpdateTime'], \"%Y%m%d %H:%M:%S:%f\")\r\n            logger.debug('inst=%s, tick: %s', inst, tick)\r\n        except Exception as ee:\r\n            logger.warning('OnRtnDepthMarketData 发生错误: %s', repr(ee), exc_info=True)\r\n\r\n    @staticmethod\r\n    def get_trade_string(trade: dict) -> str:\r\n        if trade['OffsetFlag'] == OffsetFlag.Open:\r\n            open_direct = DirectionType(trade['Direction']).label\r\n        else:\r\n            open_direct = DirectionType.LONG.label if trade['Direction'] == DirectionType.SHORT else DirectionType.SHORT.label\r\n        return f\"{trade['ExchangeID']}.{trade['InstrumentID']} {OffsetFlag(trade['OffsetFlag']).label}{open_direct}已成交{trade['Volume']}手 \" \\\r\n               f\"价格:{trade['Price']} 时间:{trade['TradeTime']} 订单号: {trade['OrderRef']}\"\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 成交 / 订单回调\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    @RegisterCallback(channel='MSG:CTP:RSP:TRADE:OnRtnTrade:*')\r\n    async def OnRtnTrade(self, channel, trade: dict):\r\n        try:\r\n            if len(trade['InstrumentID']) > 6:\r\n                return\r\n            signal = None\r\n            new_trade = False\r\n            trade_completed = False\r\n            order_ref: str = channel.split(':')[-1]\r\n            manual_trade = int(order_ref) < 10000\r\n            if not manual_trade:\r\n                signal = Signal.objects.get(id=int(order_ref[ORDER_REF_SIGNAL_ID_START:]))\r\n            logger.info(f\"成交回报: {self.get_trade_string(trade)}\")\r\n            inst = Instrument.objects.get(product_code=self._re_extract_code.match(trade['InstrumentID']).group(1))\r\n            order = Order.objects.filter(order_ref=order_ref, code=trade['InstrumentID']).order_by('-send_time').first()\r\n            trade_cost = trade['Volume'] * Decimal(trade['Price']) * inst.fee_money * inst.volume_multiple + trade['Volume'] * inst.fee_volume\r\n            trade_margin = trade['Volume'] * Decimal(trade['Price']) * inst.margin_rate\r\n            now = timezone.localtime()\r\n            trade_time = timezone.make_aware(datetime.datetime.strptime(trade['TradeDate'] + trade['TradeTime'], '%Y%m%d%H:%M:%S'))\r\n            if trade_time.date() > now.date():\r\n                trade_time.replace(year=now.year, month=now.month, day=now.day)\r\n            if trade['OffsetFlag'] == OffsetFlag.Open:  # 开仓\r\n                last_trade = Trade.objects.filter(\r\n                    broker=self._broker, strategy=self._strategy, instrument=inst, code=trade['InstrumentID'], open_time__lte=trade_time,\r\n                    close_time__isnull=True,\r\n                    direction=DirectionType(trade['Direction']).label).first() if manual_trade else Trade.objects.filter(open_order=order).first()\r\n                if last_trade is None:\r\n                    new_trade = True\r\n                    last_trade = Trade.objects.create(\r\n                        broker=self._broker, strategy=self._strategy, instrument=inst, code=trade['InstrumentID'], open_order=order if order else None,\r\n                        direction=DirectionType(trade['Direction']).label, open_time=trade_time, shares=order.volume if order else trade['Volume'],\r\n                        cost=trade_cost, filled_shares=trade['Volume'], avg_entry_price=trade['Price'], frozen_margin=trade_margin)\r\n                if order is None or order.status == OrderStatus.AllTraded.label:\r\n                    trade_completed = True\r\n                if (not new_trade and not manual_trade) or (trade_completed and not new_trade and manual_trade):\r\n                    last_trade.avg_entry_price = (last_trade.avg_entry_price * last_trade.filled_shares + trade['Volume'] * Decimal(trade['Price'])) / \\\r\n                                                 (last_trade.filled_shares + trade['Volume'])\r\n                    last_trade.filled_shares += trade['Volume']\r\n                    if trade_completed and not new_trade and manual_trade:\r\n                        last_trade.shares += trade['Volume']\r\n                    last_trade.cost += trade_cost\r\n                    last_trade.frozen_margin += trade_margin\r\n                    last_trade.save()\r\n            else:  # 平仓\r\n                open_direct = DirectionType.LONG.label if trade['Direction'] == DirectionType.SHORT else DirectionType.SHORT.label\r\n                last_trade = Trade.objects.filter(Q(closed_shares__isnull=True) | Q(closed_shares__lt=F('shares')), shares=F('filled_shares'),\r\n                                                  broker=self._broker, strategy=self._strategy, instrument=inst, code=trade['InstrumentID'],\r\n                                                  direction=open_direct).first()\r\n                logger.debug(f'trade={last_trade}')\r\n                if last_trade:\r\n                    if last_trade.closed_shares and last_trade.avg_exit_price:\r\n                        last_trade.avg_exit_price = (last_trade.avg_exit_price * last_trade.closed_shares + trade['Volume'] * Decimal(trade['Price'])) / \\\r\n                                                    (last_trade.closed_shares + trade['Volume'])\r\n                        last_trade.closed_shares += trade['Volume']\r\n                    else:\r\n                        last_trade.avg_exit_price = trade['Volume'] * Decimal(trade['Price']) / trade['Volume']\r\n                        last_trade.closed_shares = trade['Volume']\r\n                    last_trade.cost += trade_cost\r\n                    last_trade.close_order = order\r\n                    if last_trade.closed_shares == last_trade.shares:  # 全部成交\r\n                        trade_completed = True\r\n                        last_trade.close_time = trade_time\r\n                        if last_trade.direction == DirectionType.LONG.label:\r\n                            profit_point = last_trade.avg_exit_price - last_trade.avg_entry_price\r\n                        else:\r\n                            profit_point = last_trade.avg_entry_price - last_trade.avg_exit_price\r\n                        last_trade.profit = profit_point * last_trade.shares * inst.volume_multiple\r\n                    last_trade.save(force_update=True)\r\n            logger.debug(f\"new_trade:{new_trade} manual_trade:{manual_trade} trade_completed:{trade_completed} \"\r\n                         f\"order:{order} signal: {signal}\")\r\n            if trade_completed and not manual_trade:\r\n                signal.processed = True\r\n                signal.save(update_fields=['processed'])\r\n                order.signal = signal\r\n                order.save(update_fields=['signal'])\r\n        except Exception as ee:\r\n            logger.warning(f'OnRtnTrade 发生错误: {repr(ee)}', exc_info=True)\r\n\r\n    @staticmethod\r\n    def save_order(order: dict):\r\n        try:\r\n            if int(order['OrderRef']) < 10000:  # 非本程序生成订单\r\n                return None, None\r\n            signal = Signal.objects.get(id=int(order['OrderRef'][ORDER_REF_SIGNAL_ID_START:]))\r\n            odr, created = Order.objects.update_or_create(\r\n                code=order['InstrumentID'], order_ref=order['OrderRef'], defaults={\r\n                    'broker': signal.strategy.broker, 'strategy': signal.strategy, 'instrument': signal.instrument, 'front': order['FrontID'],\r\n                    'session': order['SessionID'], 'price': order['LimitPrice'], 'volume': order['VolumeTotalOriginal'],\r\n                    'direction': DirectionType(order['Direction']).label, 'status': OrderStatus(order['OrderStatus']).label,\r\n                    'offset_flag': CombOffsetFlag(order['CombOffsetFlag']).label, 'update_time': timezone.localtime(),\r\n                    'send_time': timezone.make_aware(datetime.datetime.strptime(order['InsertDate'] + order['InsertTime'], '%Y%m%d%H:%M:%S'))})\r\n            if order['OrderStatus'] == ApiStruct.OST_Canceled:  # 删除错误订单\r\n                odr.delete()\r\n                return None, None\r\n            now = timezone.localtime().date()\r\n            if created and odr.send_time.date() > timezone.localtime().date():  # 夜盘成交时返回的时间是下一个交易日，需要改成今天\r\n                odr.send_time.replace(year=now.year, month=now.month, day=now.day)\r\n                odr.save(update_fields=['send_time'])\r\n            odr.signal = signal\r\n            return odr, created\r\n        except Exception as ee:\r\n            logger.warning(f'save_order 发生错误: {repr(ee)}', exc_info=True)\r\n            return None, None\r\n\r\n    @staticmethod\r\n    def get_order_string(order: dict) -> str:\r\n        off_set_flag = CombOffsetFlag(order['CombOffsetFlag']).label if order['CombOffsetFlag'] in CombOffsetFlag.values else \\\r\n            OffsetFlag(order['CombOffsetFlag']).label\r\n        order_str = f\"订单号:{order['OrderRef']},{order['ExchangeID']}.{order['InstrumentID']} {off_set_flag}{DirectionType(order['Direction']).label}\" \\\r\n                    f\"{order['VolumeTotalOriginal']}手 价格:{order['LimitPrice']} 报单时间:{order['InsertTime']} \" \\\r\n                    f\"提交状态:{OrderSubmitStatus(order['OrderSubmitStatus']).label} \"\r\n        if order['OrderStatus'] != OrderStatus.Unknown:\r\n            order_str += f\"成交状态:{OrderStatus(order['OrderStatus']).label} 消息:{order['StatusMsg']} \"\r\n            if order['OrderStatus'] == OrderStatus.PartTradedQueueing:\r\n                order_str += f\"成交数量:{order['VolumeTraded']} 剩余数量:{order['VolumeTotal']}\"\r\n        return order_str\r\n\r\n    @RegisterCallback(channel='MSG:CTP:RSP:TRADE:OnRtnOrder:*')\r\n    async def OnRtnOrder(self, _: str, order: dict):\r\n        try:\r\n            if len(order['InstrumentID']) > 6:\r\n                return\r\n            if order[\"OrderSysID\"]:\r\n                logger.debug(f\"订单回报: {self.get_order_string(order)}\")\r\n            order_obj, created = self.save_order(order)\r\n            if not order_obj:\r\n                return\r\n            signal = order_obj.signal\r\n            inst = Instrument.objects.get(product_code=self._re_extract_code.match(order['InstrumentID']).group(1))\r\n            # 处理由于委托价格超出交易所涨跌停板而被撤单的报单，将委托价格下调50%，重新报单\r\n            if order['OrderStatus'] == OrderStatus.Canceled and order['OrderSubmitStatus'] == OrderSubmitStatus.InsertRejected:\r\n                last_bar = DailyBar.objects.filter(exchange=inst.exchange, code=order['InstrumentID']).order_by('-time').first()\r\n                volume = int(order['VolumeTotalOriginal'])\r\n                price = Decimal(order['LimitPrice'])\r\n                if order['CombOffsetFlag'] == CombOffsetFlag.Open:\r\n                    if order['Direction'] == DirectionType.LONG:\r\n                        delta = (price - last_bar.settlement) * Decimal(0.5)\r\n                        price = price_round(last_bar.settlement + delta, inst.price_tick)\r\n                        if delta / last_bar.settlement < 0.01:\r\n                            logger.warning(f\"{inst} 新价格: {price} 过低难以成交，放弃报单!\")\r\n                            return\r\n                        logger.info(f\"{inst} 以价格 {price} 开多{volume}手 重新报单...\")\r\n                        signal.price = price\r\n                        self.io_loop.call_soon(self.ReqOrderInsert, signal)\r\n                    else:\r\n                        delta = (last_bar.settlement - price) * Decimal(0.5)\r\n                        price = price_round(last_bar.settlement - delta, inst.price_tick)\r\n                        if delta / last_bar.settlement < 0.01:\r\n                            logger.warning(f\"{inst} 新价格: {price} 过低难以成交，放弃报单!\")\r\n                            return\r\n                        logger.info(f\"{inst} 以价格 {price} 开空{volume}手 重新报单...\")\r\n                        signal.price = price\r\n                        self.io_loop.call_soon(self.ReqOrderInsert, signal)\r\n                else:\r\n                    if order['Direction'] == DirectionType.LONG:\r\n                        delta = (price - last_bar.settlement) * Decimal(0.5)\r\n                        price = price_round(last_bar.settlement + delta, inst.price_tick)\r\n                        if delta / last_bar.settlement < 0.01:\r\n                            logger.warning(f\"{inst} 新价格: {price} 过低难以成交，放弃报单!\")\r\n                            return\r\n                        logger.info(f\"{inst} 以价格 {price} 买平{volume}手 重新报单...\")\r\n                        signal.price = price\r\n                        self.io_loop.call_soon(self.ReqOrderInsert, signal)\r\n                    else:\r\n                        delta = (last_bar.settlement - price) * Decimal(0.5)\r\n                        price = price_round(last_bar.settlement - delta, inst.price_tick)\r\n                        if delta / last_bar.settlement < 0.01:\r\n                            logger.warning(f\"{inst} 新价格: {price} 过低难以成交，放弃报单!\")\r\n                            return\r\n                        logger.info(f\"{inst} 以价格 {price} 卖平{volume}手 重新报单...\")\r\n                        signal.price = price\r\n                        self.io_loop.call_soon(self.ReqOrderInsert, signal)\r\n        except Exception as ee:\r\n            logger.warning(f'OnRtnOrder 发生错误: {repr(ee)}', exc_info=True)\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 定时任务\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    @RegisterCallback(crontab='30 8 * * *')\r\n    async def refresh_trading_day(self):\r\n        \"\"\"每日08:30刷新交易日状态（常驻模式下跨日更新）\"\"\"\r\n        today = timezone.localtime()\r\n        _, trading = await is_trading_day(today)\r\n        if trading:\r\n            self._last_trading_day = self._trading_day\r\n            self._trading_day = timezone.make_aware(datetime.datetime.strptime(today.strftime('%Y%m%d') + '08', '%Y%m%d%H'))\r\n            self.redis_client.set('LastTradingDay', self._last_trading_day.strftime('%Y%m%d'))\r\n            self.redis_client.set('TradingDay', today.strftime('%Y%m%d'))\r\n            logger.info(f'交易日刷新: TradingDay={today.strftime(\"%Y%m%d\")}, LastTradingDay={self._last_trading_day.strftime(\"%Y%m%d\")}')\r\n        else:\r\n            logger.info(f'今日{today.strftime(\"%Y-%m-%d\")}是非交易日，程序待机中。')\r\n\r\n    async def _has_night_session_tonight(self) -> bool:\r\n        \"\"\"判断今晚是否有夜盘。明天是交易日则有夜盘；周五时检查下周一。\"\"\"\r\n        today = timezone.localtime()\r\n        tomorrow = today + datetime.timedelta(days=1)\r\n        _, trading = await is_trading_day(tomorrow)\r\n        if trading:\r\n            return True\r\n        # 今天是周五，明天周六不是交易日，检查下周一\r\n        if today.isoweekday() == 5:\r\n            monday = today + datetime.timedelta(days=3)\r\n            _, trading = await is_trading_day(monday)\r\n            return trading\r\n        return False\r\n\r\n    @RegisterCallback(crontab='*/1 * * * *')\r\n    async def heartbeat(self):\r\n        self.redis_client.set('HEARTBEAT:TRADER', 1, ex=301)\r\n        self.redis_client.set('STATE:CTP_CONNECTED', int(self._trade_connected), ex=301)\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # CTP 连接状态回调\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    @RegisterCallback(channel='MSG:CTP:RSP:TRADE:OnFrontConnected:*')\r\n    async def on_ctp_connected(self, channel, data: dict):\r\n        self._trade_connected = True\r\n        self.redis_client.set('STATE:CTP_CONNECTED', 1)\r\n        logger.debug('CTP 前置已连接')\r\n\r\n    @RegisterCallback(channel='MSG:CTP:RSP:TRADE:OnFrontDisconnected:*')\r\n    async def on_ctp_disconnected(self, channel, data: dict):\r\n        self._trade_connected = False\r\n        self.redis_client.set('STATE:CTP_CONNECTED', 0)\r\n        reason = data.get('Reason', '未知') if isinstance(data, dict) else '未知'\r\n        logger.debug(f'CTP 前置断开连接，原因: {reason}')\r\n\r\n    @RegisterCallback(channel='MSG:CTP:RSP:TRADE:OnRspUserLogin:*')\r\n    async def on_ctp_login(self, channel, data: dict):\r\n        if not isinstance(data, dict):\r\n            return\r\n        error_id = data.get('ErrorID', -1)\r\n        if error_id == 0:\r\n            self._trade_connected = True\r\n            self.redis_client.set('STATE:CTP_CONNECTED', 1)\r\n            trading_day = data.get('TradingDay', '')\r\n            logger.debug(f'CTP 登录成功，交易日: {trading_day}')\r\n            # 如果在交易时段，自动执行盘前初始化\r\n            today = timezone.localtime()\r\n            now = int(today.strftime('%H%M'))\r\n            _, trading = await is_trading_day(today)\r\n            night_session = await self._has_night_session_tonight()\r\n            if trading and (850 <= now <= 1550) or night_session and (2050 <= now <= 2359):\r\n                logger.debug('登录后自动执行 session_init...')\r\n                await self._session_init()\r\n        else:\r\n            error_msg = data.get('ErrorMsg', '未知错误')\r\n            logger.warning(f'CTP 登录失败，ErrorID={error_id}，{error_msg}')\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 盘前初始化定时任务\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    @RegisterCallback(crontab='50 8 * * *')\r\n    async def session_init_day(self):\r\n        _, trading = await is_trading_day(timezone.localtime())\r\n        if trading:\r\n            logger.debug('日盘盘前初始化...')\r\n            await self._session_init()\r\n\r\n    @RegisterCallback(crontab='15 15 * * *')\r\n    async def session_init_afternoon(self):\r\n        _, trading = await is_trading_day(timezone.localtime())\r\n        if trading:\r\n            logger.debug('收盘后刷新账户持仓...')\r\n            await self._session_init()\r\n\r\n    @RegisterCallback(crontab='50 20 * * *')\r\n    async def session_init_night(self):\r\n        if await self._has_night_session_tonight():\r\n            logger.debug('夜盘盘前初始化...')\r\n            await self._session_init()\r\n        else:\r\n            logger.info('今晚没有夜盘。')\r\n\r\n    @RegisterCallback(crontab='55 8 * * *')\r\n    async def processing_signal1(self):\r\n        await asyncio.sleep(5)\r\n        day = timezone.localtime()\r\n        _, trading = await is_trading_day(day)\r\n        if trading:\r\n            logger.debug('查询日盘信号..')\r\n            for sig in Signal.objects.filter(~Q(instrument__exchange=ExchangeType.CFFEX), trigger_time__gte=self._last_trading_day, strategy=self._strategy,\r\n                                             instrument__night_trade=False, processed=False).order_by('-priority'):\r\n                logger.info(f'发现日盘信号: {sig}')\r\n                self.io_loop.call_soon(self.ReqOrderInsert, sig)\r\n            if (self._trading_day - self._last_trading_day).days > 3:\r\n                logger.info(f'假期后第一天，处理节前未成交夜盘信号.')\r\n                self.io_loop.call_soon(asyncio.create_task, self.processing_signal3())\r\n\r\n    @RegisterCallback(crontab='1 9 * * *')\r\n    async def check_signal1_processed(self):\r\n        day = timezone.localtime()\r\n        _, trading = await is_trading_day(day)\r\n        if trading:\r\n            logger.debug('查询遗漏的日盘信号..')\r\n            for sig in Signal.objects.filter(~Q(instrument__exchange=ExchangeType.CFFEX), trigger_time__gte=self._last_trading_day, strategy=self._strategy,\r\n                                             instrument__night_trade=False, processed=False).order_by('-priority'):\r\n                logger.info(f'发现遗漏信号: {sig}')\r\n                self.io_loop.call_soon(self.ReqOrderInsert, sig)\r\n\r\n    @RegisterCallback(crontab='25 9 * * *')\r\n    async def processing_signal2(self):\r\n        await asyncio.sleep(5)\r\n        day = timezone.localtime()\r\n        _, trading = await is_trading_day(day)\r\n        if trading:\r\n            logger.debug('查询股指和国债信号..')\r\n            for sig in Signal.objects.filter(instrument__exchange=ExchangeType.CFFEX, trigger_time__gte=self._last_trading_day, strategy=self._strategy,\r\n                                             instrument__night_trade=False, processed=False).order_by('-priority'):\r\n                logger.info(f'发现股指和国债信号: {sig}')\r\n                self.io_loop.call_soon(self.ReqOrderInsert, sig)\r\n\r\n    @RegisterCallback(crontab='31 9 * * *')\r\n    async def check_signal2_processed(self):\r\n        day = timezone.localtime()\r\n        _, trading = await is_trading_day(day)\r\n        if trading:\r\n            logger.debug('查询遗漏的股指和国债信号..')\r\n            for sig in Signal.objects.filter(instrument__exchange=ExchangeType.CFFEX, trigger_time__gte=self._last_trading_day, strategy=self._strategy,\r\n                                             instrument__night_trade=False, processed=False).order_by('-priority'):\r\n                logger.info(f'发现遗漏的股指和国债信号: {sig}')\r\n                self.io_loop.call_soon(self.ReqOrderInsert, sig)\r\n\r\n    @RegisterCallback(crontab='55 20 * * *')\r\n    async def processing_signal3(self):\r\n        await asyncio.sleep(5)\r\n        if not await self._has_night_session_tonight():\r\n            return\r\n        logger.debug('查询夜盘信号..')\r\n        for sig in Signal.objects.filter(\r\n                trigger_time__gte=self._last_trading_day, strategy=self._strategy, instrument__night_trade=True, processed=False).order_by('-priority'):\r\n            logger.info(f'发现夜盘信号: {sig}')\r\n            self.io_loop.call_soon(self.ReqOrderInsert, sig)\r\n\r\n    @RegisterCallback(crontab='1 21 * * *')\r\n    async def check_signal3_processed(self):\r\n        if not await self._has_night_session_tonight():\r\n            return\r\n        logger.debug('查询遗漏的夜盘信号..')\r\n        for sig in Signal.objects.filter(\r\n                trigger_time__gte=self._last_trading_day, strategy=self._strategy, instrument__night_trade=True, processed=False).order_by('-priority'):\r\n            logger.info(f'发现遗漏的夜盘信号: {sig}')\r\n            self.io_loop.call_soon(self.ReqOrderInsert, sig)\r\n\r\n    @RegisterCallback(crontab='20 15 * * *')\r\n    async def refresh_all(self):\r\n        day = timezone.localtime()\r\n        _, trading = await is_trading_day(day)\r\n        if not trading:\r\n            logger.info('今日是非交易日, 不更新任何数据。')\r\n            return\r\n        await self.refresh_account()\r\n        await self.refresh_position()\r\n        await self.refresh_instrument()\r\n        logger.debug('全部更新完成!')\r\n\r\n    @RegisterCallback(crontab='30 15 * * *')\r\n    async def update_equity(self):\r\n        today, trading = await is_trading_day(timezone.localtime())\r\n        if trading:\r\n            dividend = Performance.objects.filter(\r\n                broker=self._broker, day__lt=today.date()).aggregate(Sum('dividend'))['dividend__sum']\r\n            if dividend is None:\r\n                dividend = Decimal(0)\r\n            dividend = dividend + self._deposit - self._withdraw\r\n            # 虚拟=虚拟(原始)-入金+出金\r\n            self._fake = self._fake - self._deposit + self._withdraw\r\n            if self._fake < 1:\r\n                self._fake = 0\r\n            self._broker.fake = self._fake\r\n            self._broker.save(update_fields=['fake'])\r\n            unit = dividend + self._fake\r\n            nav = (self._current + self._fake) / unit  # 单位净值\r\n            accumulated = self._current / (unit - self._fake)  # 累计净值\r\n            Performance.objects.update_or_create(broker=self._broker, day=today.date(), defaults={\r\n                'used_margin': self._margin, 'dividend': self._deposit - self._withdraw, 'fake': self._fake, 'capital': self._current, 'unit_count': unit,\r\n                'NAV': nav, 'accumulated': accumulated})\r\n            logger.info(f\"动态权益: {self._current:,.0f}({self._current / 10000:.1f}万) \"\r\n                        f\"静态权益: {self._pre_balance:,.0f}({self._pre_balance / 10000:.1f}万) \"\r\n                        f\"可用资金: {self._cash:,.0f}({self._cash / 10000:.1f}万) \"\r\n                        f\"保证金占用: {self._margin:,.0f}({self._margin / 10000:.1f}万) \"\r\n                        f\"虚拟资金: {self._fake:,.0f}({self._fake / 10000:.1f}万) 当日入金: {self._deposit:,.0f} \"\r\n                        f\"当日出金: {self._withdraw:,.0f} 单位净值: {nav:,.2f} 累计净值: {accumulated:,.2f}\")\r\n\r\n    @RegisterCallback(crontab='0 17 * * *')\r\n    async def collect_quote(self, tasks=None):\r\n        try:\r\n            day = timezone.localtime()\r\n            _, trading = await is_trading_day(day)\r\n            if not trading:\r\n                logger.info('今日是非交易日, 不计算任何数据。')\r\n                return\r\n            logger.debug(f'{day}盘后计算,获取交易所日线数据..')\r\n            if tasks is None:\r\n                tasks = [update_from_shfe, update_from_dce, update_from_czce, update_from_cffex, update_from_gfex, get_contracts_argument]\r\n            result = await asyncio.gather(*[func(day) for func in tasks], return_exceptions=True)\r\n            if all(result):\r\n                self.io_loop.call_soon(self.calculate, day)\r\n            else:\r\n                failed_tasks = [tasks[i] for i, rst in enumerate(result) if not rst]\r\n                self.io_loop.call_later(10 * 60, asyncio.create_task, self.collect_quote(failed_tasks))\r\n        except Exception as e:\r\n            logger.warning(f'collect_quote 发生错误: {repr(e)}', exc_info=True)\r\n        logger.debug('盘后计算完毕!')\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 涨跌停价计算\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    def calc_up_limit(self, inst: Instrument, bar: DailyBar):\r\n        settlement = bar.settlement\r\n        limit_ratio = str_to_number(self.redis_client.get(f\"LIMITRATIO:{inst.exchange}:{inst.product_code}:{bar.code}\"))\r\n        if limit_ratio is None:\r\n            limit_ratio = float(inst.up_limit_ratio or 0)\r\n        price_tick = inst.price_tick\r\n        price = price_round(settlement * (Decimal(1) + Decimal(limit_ratio)), price_tick)\r\n        return price - price_tick\r\n\r\n    def calc_down_limit(self, inst: Instrument, bar: DailyBar):\r\n        settlement = bar.settlement\r\n        limit_ratio = str_to_number(self.redis_client.get(f\"LIMITRATIO:{inst.exchange}:{inst.product_code}:{bar.code}\"))\r\n        if limit_ratio is None:\r\n            limit_ratio = float(inst.down_limit_ratio or 0)\r\n        price_tick = inst.price_tick\r\n        price = price_round(settlement * (Decimal(1) - Decimal(limit_ratio)), price_tick)\r\n        return price + price_tick\r\n\r\n    # ═══════════════════════════════════════════════════════════════════\r\n    # 模板方法: calculate + 可覆盖钩子\r\n    # ═══════════════════════════════════════════════════════════════════\r\n\r\n    def get_signal_instruments(self) -> set[str]:\r\n        \"\"\"返回需要计算信号的品种代码集合。子类可覆盖以扩展品种池。\"\"\"\r\n        p_code_set = set(self._inst_ids)\r\n        for code in self._cur_pos.keys():\r\n            p_code_set.add(self._re_extract_code.match(code).group(1))\r\n        return p_code_set\r\n\r\n    def get_margin_threshold(self) -> float:\r\n        \"\"\"返回保证金/权益告警阈值。子类可覆盖。\"\"\"\r\n        return 0.8\r\n\r\n    def calculate(self, day, create_main_bar=True):\r\n        try:\r\n            p_code_set = self.get_signal_instruments()\r\n            all_margin = 0\r\n            for inst in Instrument.objects.all().order_by('section', 'exchange', 'name'):\r\n                if create_main_bar:\r\n                    logger.debug(f'生成连续合约: {inst.name}')\r\n                    calc_main_inst(inst, day)\r\n                if inst.product_code in p_code_set:\r\n                    logger.debug(f'计算交易信号: {inst.name}')\r\n                    sig, margin = self.calc_signal(inst, day)\r\n                    all_margin += margin\r\n            threshold = self.get_margin_threshold()\r\n            if self._current and self._current > 0 and (all_margin + self._margin) / self._current > threshold:\r\n                logger.info(f\"!! 风险提示 !! 开仓保证金共计: {all_margin:.0f}({all_margin / 10000:.1f}万) \"\r\n                            f\"账户风险度将达到: {100 * (all_margin + self._margin) / self._current:.0f}% \"\r\n                            f\"超过{threshold * 100:.0f}%阈值!\")\r\n        except Exception as e:\r\n            logger.warning(f'calculate 发生错误: {repr(e)}', exc_info=True)\r\n\r\n    @abstractmethod\r\n    def calc_signal(self, inst: Instrument, day: datetime.datetime) -> tuple[Any | None, Decimal]:\r\n        \"\"\"计算交易信号，子类必须实现。返回 (signal_type | None, estimated_margin)\"\"\"\r\n        ...\r\n"
  },
  {
    "path": "strategy/brother2.py",
    "content": "# coding=utf-8\n# pyright: reportAttributeAccessIssue=false, reportOptionalMemberAccess=false, reportOptionalSubscript=false, reportOptionalOperand=false, reportArgumentType=false, reportOperatorIssue=false, reportGeneralTypeIssues=false\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nimport datetime\nfrom decimal import Decimal\nfrom typing import Any\nimport logging\nfrom django.db.models import Sum\nfrom talib import ATR\nfrom strategy.base_strategy import BaseTradeStrategy\nfrom utils import price_round\nfrom panel.models import *\n\nlogger = logging.getLogger('CTPApi')\n\n\nclass TradeStrategy(BaseTradeStrategy):\n    \"\"\"大哥2.2 — 经典通道突破趋势跟踪策略\"\"\"\n\n    def __init__(self, name: str):\n        super().__init__(name)\n\n    def calc_signal(self, inst: Instrument, day: datetime.datetime) -> tuple[Any | None, Decimal]:\n        try:\n            break_n = self.get_param('BreakPeriod')\n            atr_n = self.get_param('AtrPeriod')\n            long_n = self.get_param('LongPeriod')\n            short_n = self.get_param('ShortPeriod')\n            stop_n = self.get_param('StopLoss')\n            risk = self.get_param('Risk')\n            # 只读取最近400条记录，减少运算量\n            df = to_df(MainBar.objects.filter(time__lte=day.date(), exchange=inst.exchange, product_code=inst.product_code).order_by('-time').values_list(\n                'time', 'open', 'high', 'low', 'close')[:400], index_col='time', parse_dates=['time'])\n            df = df.iloc[::-1]  # 日期升序排列\n            df[\"atr\"] = ATR(df.high, df.low, df.close, timeperiod=atr_n)\n            df[\"short_trend\"] = df.close\n            df[\"long_trend\"] = df.close\n            for idx in range(1, df.shape[0]):  # 手动计算SMA\n                df.short_trend[idx] = (df.short_trend[idx - 1] * (short_n - 1) + df.close[idx]) / short_n\n                df.long_trend[idx] = (df.long_trend[idx - 1] * (long_n - 1) + df.close[idx]) / long_n\n            df[\"high_line\"] = df.close.rolling(window=break_n).max()\n            df[\"low_line\"] = df.close.rolling(window=break_n).min()\n            idx = -1\n            buy_sig = df.short_trend[idx] > df.long_trend[idx] and price_round(df.close[idx], inst.price_tick) >= price_round(df.high_line[idx - 1], inst.price_tick)\n            sell_sig = df.short_trend[idx] < df.long_trend[idx] and price_round(df.close[idx], inst.price_tick) <= price_round(df.low_line[idx - 1], inst.price_tick)\n            pos = Trade.objects.filter(close_time__isnull=True, broker=self._broker, strategy=self._strategy, instrument=inst, shares__gt=0).first()\n            roll_over = False\n            if pos:\n                roll_over = pos.code != inst.main_code and pos.code < inst.main_code\n            elif self._strategy.force_opens.filter(id=inst.id).exists() and not buy_sig and not sell_sig:\n                logger.info(f'强制开仓: {inst}')\n                if df.short_trend[idx] > df.long_trend[idx]:\n                    buy_sig = True\n                else:\n                    sell_sig = True\n                self._strategy.force_opens.remove(inst)\n            signal = signal_code = price = volume = volume_ori = use_margin = None\n            priority = PriorityType.LOW\n            if pos:\n                # 多头持仓\n                if pos.direction == DirectionType.LONG.label:\n                    first_pos = pos\n                    while hasattr(first_pos, 'open_order') and first_pos.open_order and first_pos.open_order.signal and first_pos.open_order.signal.type == \\\n                            SignalType.ROLL_OPEN:\n                        last_pos = Trade.objects.filter(\n                            close_order__signal__type=SignalType.ROLL_CLOSE, instrument=first_pos.instrument, strategy=first_pos.strategy,\n                            shares=first_pos.shares, direction=first_pos.direction, close_time__date=first_pos.open_time.date()).first()\n                        if last_pos is None:\n                            break\n                        logger.debug(f\"发现换月前持仓:{last_pos} 开仓时间: {last_pos.open_time}\")\n                        first_pos = last_pos\n                    pos_idx = df.index.get_loc(first_pos.open_time.astimezone().date().isoformat())\n                    # 多头止损\n                    if df.close[idx] <= df.high[pos_idx:idx].max() - df.atr[pos_idx - 1] * stop_n:\n                        signal = SignalType.SELL\n                        signal_code = pos.code\n                        volume = pos.shares\n                        last_bar = DailyBar.objects.filter(exchange=inst.exchange, code=pos.code, time=day.date()).first()\n                        price = self.calc_down_limit(inst, last_bar)\n                        priority = PriorityType.High\n                    # 多头换月\n                    elif roll_over:\n                        signal = SignalType.ROLL_OPEN\n                        volume = pos.shares\n                        last_bar = DailyBar.objects.filter(exchange=inst.exchange, code=pos.code, time=day.date()).first()\n                        new_bar = DailyBar.objects.filter(exchange=inst.exchange, code=inst.main_code, time=day.date()).first()\n                        price = self.calc_up_limit(inst, new_bar)\n                        priority = PriorityType.Normal\n                        Signal.objects.update_or_create(\n                            code=pos.code, strategy=self._strategy, instrument=inst, type=SignalType.ROLL_CLOSE, trigger_time=day,\n                            defaults={'price': self.calc_down_limit(inst, last_bar), 'volume': volume, 'priority': priority, 'processed': False})\n                # 空头持仓\n                else:\n                    first_pos = pos\n                    while hasattr(first_pos, 'open_order') and first_pos.open_order and first_pos.open_order.signal \\\n                            and first_pos.open_order.signal.type == SignalType.ROLL_OPEN:\n                        last_pos = Trade.objects.filter(\n                            close_order__signal__type=SignalType.ROLL_CLOSE, instrument=first_pos.instrument, strategy=first_pos.strategy,\n                            shares=first_pos.shares, direction=first_pos.direction, close_time__date=first_pos.open_time.date()).first()\n                        if last_pos is None:\n                            break\n                        logger.debug(f\"发现换月前持仓:{last_pos} 开仓时间: {last_pos.open_time}\")\n                        first_pos = last_pos\n                    pos_idx = df.index.get_loc(first_pos.open_time.astimezone().date().isoformat())\n                    # 空头止损\n                    if df.close[idx] >= df.low[pos_idx:idx].min() + df.atr[pos_idx - 1] * stop_n:\n                        signal = SignalType.BUY_COVER\n                        signal_code = pos.code\n                        volume = pos.shares\n                        last_bar = DailyBar.objects.filter(exchange=inst.exchange, code=pos.code, time=day.date()).first()\n                        price = self.calc_up_limit(inst, last_bar)\n                        priority = PriorityType.High\n                    # 空头换月\n                    elif roll_over:\n                        signal = SignalType.ROLL_OPEN\n                        volume = pos.shares\n                        last_bar = DailyBar.objects.filter(exchange=inst.exchange, code=pos.code, time=day.date()).first()\n                        new_bar = DailyBar.objects.filter(exchange=inst.exchange, code=inst.main_code, time=day.date()).first()\n                        price = self.calc_down_limit(inst, new_bar)\n                        priority = PriorityType.Normal\n                        Signal.objects.update_or_create(\n                            code=pos.code, strategy=self._strategy, instrument=inst, type=SignalType.ROLL_CLOSE, trigger_time=day,\n                            defaults={'price': self.calc_up_limit(inst, last_bar), 'volume': volume, 'priority': priority, 'processed': False})\n            # 开新仓\n            elif buy_sig or sell_sig:\n                start_cash = Performance.objects.last().unit_count\n                # 原始扎堆儿\n                profit = Trade.objects.filter(strategy=self._strategy, instrument__section=inst.section).aggregate(sum=Sum('profit'))['sum']\n                profit = profit if profit else 0\n                risk_each = Decimal(df.atr[idx]) * Decimal(inst.volume_multiple)\n                volume_ori = (start_cash + profit) * risk / risk_each\n                volume = round(volume_ori)\n                print(f\"{inst}: ({start_cash:,.0f} + {profit:,.0f}) / {risk_each:,.0f} = {volume_ori}\")\n                if volume > 0:\n                    new_bar = DailyBar.objects.filter(exchange=inst.exchange, code=inst.main_code, time=day.date()).first()\n                    if new_bar is None:\n                        logger.info(f\"未找到新日线数据，{inst.exchange} {inst.main_code} {day.date()}\")\n                    use_margin = new_bar.settlement * inst.volume_multiple * inst.margin_rate * volume\n                    price = self.calc_up_limit(inst, new_bar) if buy_sig else self.calc_down_limit(inst, new_bar)\n                    signal = SignalType.BUY if buy_sig else SignalType.SELL_SHORT\n                else:\n                    logger.info(f\"做{'多' if buy_sig else '空'}{inst},单手风险:{risk_each:.0f},超出风控额度，放弃。\")\n            if signal:\n                use_margin = use_margin if use_margin else 0\n                sig, _ = Signal.objects.update_or_create(\n                    code=signal_code if signal_code else inst.main_code, strategy=self._strategy, instrument=inst, type=signal, trigger_time=day,\n                    defaults={'price': price, 'volume': volume, 'priority': priority, 'processed': False})\n                volume_ori = volume_ori if volume_ori else volume\n                logger.info(f\"新信号: {sig}({volume_ori:.1f}手) \"\n                            f\"预估保证金: {use_margin:.0f}({use_margin / 10000:.1f}万)\")\n                return signal, Decimal(use_margin)\n        except Exception as e:\n            logger.warning(f'calc_signal 发生错误: {repr(e)}', exc_info=True)\n            return None, Decimal(0)\n        return None, Decimal(0)\n"
  },
  {
    "path": "strategy/kronos.py",
    "content": "import sys\r\nimport os\r\nimport django\r\nROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\r\nif ROOT not in sys.path:\r\n    sys.path.insert(0, ROOT)\r\nos.environ[\"DJANGO_SETTINGS_MODULE\"] = \"dashboard.settings\"\r\nos.environ[\"DJANGO_ALLOW_ASYNC_UNSAFE\"] = \"true\"\r\ndjango.setup()\r\nfrom model import Kronos, KronosTokenizer, KronosPredictor\r\nfrom panel.models import MainBar, to_df\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\n\r\nif __name__ == '__main__':\r\n    tokenizer = KronosTokenizer.from_pretrained(\"D:/Github/Kronos/token_model/\", local_files_only=True)\r\n    model = Kronos.from_pretrained(\"D:/Github/Kronos/base_model/\", local_files_only=True)\r\n    predictor = KronosPredictor(model, tokenizer, device=\"cuda:0\", max_context=512)\r\n    qs = MainBar.objects.filter(product_code=product_code).order_by('-time')[:300]\r\n    df = to_df(qs, parse_dates=['time'])\r\n\r\n    # 统一列名与类型\r\n    df.rename(columns={\r\n        'time': 'timestamps',\r\n        'open': 'open',\r\n        'high': 'high',\r\n        'low': 'low',\r\n        'close': 'close',\r\n        'volume': 'volume',\r\n        'open_interest': 'amount',\r\n    }, inplace=True)\r\n\r\n    use_cols = ['timestamps', 'open', 'high', 'low', 'close', 'volume']\r\n    df = df[use_cols].copy()\r\n\r\n    # 仅保留最后 need_rows 行用于后续切分（前250, 预测50）\r\n    if len(df) < need_rows:\r\n        raise RuntimeError(f\"MainBar数据不足{need_rows}行，当前仅有{len(df)}行\")\r\n    df[['timestamps', 'open', 'high', 'low', 'close', 'volume', 'amount']].to_csv(csv_path, index=False)"
  },
  {
    "path": "utils/ApiStruct.py",
    "content": "# coding=utf-8\nT = dict()\nT['TE_RESUME'] = 'int'  # 流重传方式\nTERT_RESTART = 0  # 从本交易日开始重传\nTERT_RESUME = 1  # 从上次收到的续传\nTERT_QUICK = 2  # 只传送登录后的流内容\nT['TraderID'] = 'char[21]'  # 交易所交易员代码\nT['InvestorID'] = 'char[13]'  # 投资者代码\nT['BrokerID'] = 'char[11]'  # 经纪公司代码\nT['BrokerAbbr'] = 'char[9]'  # 经纪公司简称\nT['BrokerName'] = 'char[81]'  # 经纪公司名称\nT['ExchangeInstID'] = 'char[31]'  # 合约在交易所的代码\nT['OrderRef'] = 'char[13]'  # 报单引用\nT['ParticipantID'] = 'char[11]'  # 会员代码\nT['UserID'] = 'char[16]'  # 用户代码\nT['Password'] = 'char[41]'  # 密码\nT['ClientID'] = 'char[11]'  # 交易编码\nT['InstrumentID'] = 'char[31]'  # 合约代码\nT['MarketID'] = 'char[31]'  # 市场代码\nT['ProductName'] = 'char[21]'  # 产品名称\nT['ExchangeID'] = 'char[9]'  # 交易所代码\nT['ExchangeName'] = 'char[61]'  # 交易所名称\nT['ExchangeAbbr'] = 'char[9]'  # 交易所简称\nT['ExchangeFlag'] = 'char[2]'  # 交易所标志\nT['MacAddress'] = 'char[21]'  # Mac地址\nT['SystemID'] = 'char[21]'  # 系统编号\nT['ExchangeProperty'] = 'char'  # 交易所属性\nEXP_Normal = '0'  # 正常\nEXP_GenOrderByTrade = '1'  # 根据成交生成报单\nT['Date'] = 'char[9]'  # 日期\nT['Time'] = 'char[9]'  # 时间\nT['LongTime'] = 'char[13]'  # 长时间\nT['InstrumentName'] = 'char[21]'  # 合约名称\nT['SettlementGroupID'] = 'char[9]'  # 结算组代码\nT['OrderSysID'] = 'char[21]'  # 报单编号\nT['TradeID'] = 'char[21]'  # 成交编号\nT['CommandType'] = 'char[65]'  # DB命令类型\nT['IPAddress'] = 'char[16]'  # IP地址\nT['IPPort'] = 'int'  # IP端口\nT['ProductInfo'] = 'char[11]'  # 产品信息\nT['ProtocolInfo'] = 'char[11]'  # 协议信息\nT['BusinessUnit'] = 'char[21]'  # 业务单元\nT['DepositSeqNo'] = 'char[15]'  # 出入金流水号\nT['IdentifiedCardNo'] = 'char[51]'  # 证件号码\nT['IdCardType'] = 'char'  # 证件类型\nICT_EID = '0'  # 组织机构代码\nICT_IDCard = '1'  # 中国公民身份证\nICT_OfficerIDCard = '2'  # 军官证\nICT_PoliceIDCard = '3'  # 警官证\nICT_SoldierIDCard = '4'  # 士兵证\nICT_HouseholdRegister = '5'  # 户口簿\nICT_Passport = '6'  # 护照\nICT_TaiwanCompatriotIDCard = '7'  # 台胞证\nICT_HomeComingCard = '8'  # 回乡证\nICT_LicenseNo = '9'  # 营业执照号\nICT_TaxNo = 'A'  # 税务登记号/当地纳税ID\nICT_HMMainlandTravelPermit = 'B'  # 港澳居民来往内地通行证\nICT_TwMainlandTravelPermit = 'C'  # 台湾居民来往大陆通行证\nICT_DrivingLicense = 'D'  # 驾照\nICT_SocialID = 'F'  # 当地社保ID\nICT_LocalID = 'G'  # 当地身份证\nICT_BusinessRegistration = 'H'  # 商业登记证\nICT_HKMCIDCard = 'I'  # 港澳永久性居民身份证\nICT_AccountsPermits = 'J'  # 人行开户许可证\nICT_OtherCard = 'x'  # 其他证件\nT['OrderLocalID'] = 'char[13]'  # 本地报单编号\nT['UserName'] = 'char[81]'  # 用户名称\nT['PartyName'] = 'char[81]'  # 参与人名称\nT['ErrorMsg'] = 'char[81]'  # 错误信息\nT['FieldName'] = 'char[2049]'  # 字段名\nT['FieldContent'] = 'char[2049]'  # 字段内容\nT['SystemName'] = 'char[41]'  # 系统名称\nT['Content'] = 'char[501]'  # 消息正文\nT['InvestorRange'] = 'char'  # 投资者范围\nIR_All = '1'  # 所有\nIR_Group = '2'  # 投资者组\nIR_Single = '3'  # 单一投资者\nT['DepartmentRange'] = 'char'  # 投资者范围\nDR_All = '1'  # 所有\nDR_Group = '2'  # 组织架构\nDR_Single = '3'  # 单一投资者\nT['DataSyncStatus'] = 'char'  # 数据同步状态\nDS_Asynchronous = '1'  # 未同步\nDS_Synchronizing = '2'  # 同步中\nDS_Synchronized = '3'  # 已同步\nT['BrokerDataSyncStatus'] = 'char'  # 经纪公司数据同步状态\nBDS_Synchronized = '1'  # 已同步\nBDS_Synchronizing = '2'  # 同步中\nT['ExchangeConnectStatus'] = 'char'  # 交易所连接状态\nECS_NoConnection = '1'  # 没有任何连接\nECS_QryInstrumentSent = '2'  # 已经发出合约查询请求\nECS_GotInformation = '9'  # 已经获取信息\nT['TraderConnectStatus'] = 'char'  # 交易所交易员连接状态\nTCS_NotConnected = '1'  # 没有任何连接\nTCS_Connected = '2'  # 已经连接\nTCS_QryInstrumentSent = '3'  # 已经发出合约查询请求\nTCS_SubPrivateFlow = '4'  # 订阅私有流\nT['FunctionCode'] = 'char'  # 功能代码\nFC_DataAsync = '1'  # 数据异步化\nFC_ForceUserLogout = '2'  # 强制用户登出\nFC_UserPasswordUpdate = '3'  # 变更管理用户口令\nFC_BrokerPasswordUpdate = '4'  # 变更经纪公司口令\nFC_InvestorPasswordUpdate = '5'  # 变更投资者口令\nFC_OrderInsert = '6'  # 报单插入\nFC_OrderAction = '7'  # 报单操作\nFC_SyncSystemData = '8'  # 同步系统数据\nFC_SyncBrokerData = '9'  # 同步经纪公司数据\nFC_BachSyncBrokerData = 'A'  # 批量同步经纪公司数据\nFC_SuperQuery = 'B'  # 超级查询\nFC_ParkedOrderInsert = 'C'  # 预埋报单插入\nFC_ParkedOrderAction = 'D'  # 预埋报单操作\nFC_SyncOTP = 'E'  # 同步动态令牌\nFC_DeleteOrder = 'F'  # 删除未知单\nT['BrokerFunctionCode'] = 'char'  # 经纪公司功能代码\nBFC_ForceUserLogout = '1'  # 强制用户登出\nBFC_UserPasswordUpdate = '2'  # 变更用户口令\nBFC_SyncBrokerData = '3'  # 同步经纪公司数据\nBFC_BachSyncBrokerData = '4'  # 批量同步经纪公司数据\nBFC_OrderInsert = '5'  # 报单插入\nBFC_OrderAction = '6'  # 报单操作\nBFC_AllQuery = '7'  # 全部查询\nBFC_log = 'a'  # 系统功能：登入/登出/修改密码等\nBFC_BaseQry = 'b'  # 基本查询：查询基础数据，如合约，交易所等常量\nBFC_TradeQry = 'c'  # 交易查询：如查成交，委托\nBFC_Trade = 'd'  # 交易功能：报单，撤单\nBFC_Virement = 'e'  # 银期转账\nBFC_Risk = 'f'  # 风险监控\nBFC_Session = 'g'  # 查询/管理：查询会话，踢人等\nBFC_RiskNoticeCtl = 'h'  # 风控通知控制\nBFC_RiskNotice = 'i'  # 风控通知发送\nBFC_BrokerDeposit = 'j'  # 察看经纪公司资金权限\nBFC_QueryFund = 'k'  # 资金查询\nBFC_QueryOrder = 'l'  # 报单查询\nBFC_QueryTrade = 'm'  # 成交查询\nBFC_QueryPosition = 'n'  # 持仓查询\nBFC_QueryMarketData = 'o'  # 行情查询\nBFC_QueryUserEvent = 'p'  # 用户事件查询\nBFC_QueryRiskNotify = 'q'  # 风险通知查询\nBFC_QueryFundChange = 'r'  # 出入金查询\nBFC_QueryInvestor = 's'  # 投资者信息查询\nBFC_QueryTradingCode = 't'  # 交易编码查询\nBFC_ForceClose = 'u'  # 强平\nBFC_PressTest = 'v'  # 压力测试\nBFC_RemainCalc = 'w'  # 权益反算\nBFC_NetPositionInd = 'x'  # 净持仓保证金指标\nBFC_RiskPredict = 'y'  # 风险预算\nBFC_DataExport = 'z'  # 数据导出\nBFC_RiskTargetSetup = 'A'  # 风控指标设置\nBFC_MarketDataWarn = 'B'  # 行情预警\nBFC_QryBizNotice = 'C'  # 业务通知查询\nBFC_CfgBizNotice = 'D'  # 业务通知模板设置\nBFC_SyncOTP = 'E'  # 同步动态令牌\nBFC_SendBizNotice = 'F'  # 发送业务通知\nBFC_CfgRiskLevelStd = 'G'  # 风险级别标准设置\nBFC_TbCommand = 'H'  # 交易终端应急功能\nBFC_DeleteOrder = 'J'  # 删除未知单\nBFC_ParkedOrderInsert = 'K'  # 预埋报单插入\nBFC_ParkedOrderAction = 'L'  # 预埋报单操作\nT['OrderActionStatus'] = 'char'  # 报单操作状态\nOAS_Submitted = 'a'  # 已经提交\nOAS_Accepted = 'b'  # 已经接受\nOAS_Rejected = 'c'  # 已经被拒绝\nT['OrderStatus'] = 'char'  # 报单状态\nOST_AllTraded = '0'  # 全部成交\nOST_PartTradedQueueing = '1'  # 部分成交还在队列中\nOST_PartTradedNotQueueing = '2'  # 部分成交不在队列中\nOST_NoTradeQueueing = '3'  # 未成交还在队列中\nOST_NoTradeNotQueueing = '4'  # 未成交不在队列中\nOST_Canceled = '5'  # 撤单\nOST_Unknown = 'a'  # 未知\nOST_NotTouched = 'b'  # 尚未触发\nOST_Touched = 'c'  # 已触发\nT['OrderSubmitStatus'] = 'char'  # 报单提交状态\nOSS_InsertSubmitted = '0'  # 已经提交\nOSS_CancelSubmitted = '1'  # 撤单已经提交\nOSS_ModifySubmitted = '2'  # 修改已经提交\nOSS_Accepted = '3'  # 已经接受\nOSS_InsertRejected = '4'  # 报单已经被拒绝\nOSS_CancelRejected = '5'  # 撤单已经被拒绝\nOSS_ModifyRejected = '6'  # 改单已经被拒绝\nT['PositionDate'] = 'char'  # 持仓日期\nPSD_Today = '1'  # 今日持仓\nPSD_History = '2'  # 历史持仓\nT['PositionDateType'] = 'char'  # 持仓日期类型\nPDT_UseHistory = '1'  # 使用历史持仓\nPDT_NoUseHistory = '2'  # 不使用历史持仓\nT['TradingRole'] = 'char'  # 交易角色\nER_Broker = '1'  # 代理\nER_Host = '2'  # 自营\nER_Maker = '3'  # 做市商\nT['ProductClass'] = 'char'  # 产品类型\nPC_Futures = '1'  # 期货\nPC_Options = '2'  # 期货期权\nPC_Combination = '3'  # 组合\nPC_Spot = '4'  # 即期\nPC_EFP = '5'  # 期转现\nPC_SpotOption = '6'  # 现货期权\nT['InstLifePhase'] = 'char'  # 合约生命周期状态\nIP_NotStart = '0'  # 未上市\nIP_Started = '1'  # 上市\nIP_Pause = '2'  # 停牌\nIP_Expired = '3'  # 到期\nT['Direction'] = 'char'  # 买卖方向\nD_Buy = '0'  # 买\nD_Sell = '1'  # 卖\nT['PositionType'] = 'char'  # 持仓类型\nPT_Net = '1'  # 净持仓\nPT_Gross = '2'  # 综合持仓\nT['PosiDirection'] = 'char'  # 持仓多空方向\nPD_Net = '1'  # 净\nPD_Long = '2'  # 多头\nPD_Short = '3'  # 空头\nT['SysSettlementStatus'] = 'char'  # 系统结算状态\nSS_NonActive = '1'  # 不活跃\nSS_Startup = '2'  # 启动\nSS_Operating = '3'  # 操作\nSS_Settlement = '4'  # 结算\nSS_SettlementFinished = '5'  # 结算完成\nT['RatioAttr'] = 'char'  # 费率属性\nRA_Trade = '0'  # 交易费率\nRA_Settlement = '1'  # 结算费率\nT['HedgeFlag'] = 'char'  # 投机套保标志\nHF_Speculation = '1'  # 投机\nHF_Arbitrage = '2'  # 套利\nHF_Hedge = '3'  # 套保\nT['BillHedgeFlag'] = 'char'  # 投机套保标志\nBHF_Speculation = '1'  # 投机\nBHF_Arbitrage = '2'  # 套利\nBHF_Hedge = '3'  # 套保\nT['ClientIDType'] = 'char'  # 交易编码类型\nCIDT_Speculation = '1'  # 投机\nCIDT_Arbitrage = '2'  # 套利\nCIDT_Hedge = '3'  # 套保\nT['OrderPriceType'] = 'char'  # 报单价格条件\nOPT_AnyPrice = '1'  # 任意价\nOPT_LimitPrice = '2'  # 限价\nOPT_BestPrice = '3'  # 最优价\nOPT_LastPrice = '4'  # 最新价\nOPT_LastPricePlusOneTicks = '5'  # 最新价浮动上浮1个ticks\nOPT_LastPricePlusTwoTicks = '6'  # 最新价浮动上浮2个ticks\nOPT_LastPricePlusThreeTicks = '7'  # 最新价浮动上浮3个ticks\nOPT_AskPrice1 = '8'  # 卖一价\nOPT_AskPrice1PlusOneTicks = '9'  # 卖一价浮动上浮1个ticks\nOPT_AskPrice1PlusTwoTicks = 'A'  # 卖一价浮动上浮2个ticks\nOPT_AskPrice1PlusThreeTicks = 'B'  # 卖一价浮动上浮3个ticks\nOPT_BidPrice1 = 'C'  # 买一价\nOPT_BidPrice1PlusOneTicks = 'D'  # 买一价浮动上浮1个ticks\nOPT_BidPrice1PlusTwoTicks = 'E'  # 买一价浮动上浮2个ticks\nOPT_BidPrice1PlusThreeTicks = 'F'  # 买一价浮动上浮3个ticks\nOPT_FiveLevelPrice = 'G'  # 五档价\nT['OffsetFlag'] = 'char'  # 开平标志\nOF_Open = '0'  # 开仓\nOF_Close = '1'  # 平仓\nOF_ForceClose = '2'  # 强平\nOF_CloseToday = '3'  # 平今\nOF_CloseYesterday = '4'  # 平昨\nOF_ForceOff = '5'  # 强减\nOF_LocalForceClose = '6'  # 本地强平\nT['ForceCloseReason'] = 'char'  # 强平原因\nFCC_NotForceClose = '0'  # 非强平\nFCC_LackDeposit = '1'  # 资金不足\nFCC_ClientOverPositionLimit = '2'  # 客户超仓\nFCC_MemberOverPositionLimit = '3'  # 会员超仓\nFCC_NotMultiple = '4'  # 持仓非整数倍\nFCC_Violation = '5'  # 违规\nFCC_Other = '6'  # 其它\nFCC_PersonDeliv = '7'  # 自然人临近交割\nT['OrderType'] = 'char'  # 报单类型\nORDT_Normal = '0'  # 正常\nORDT_DeriveFromQuote = '1'  # 报价衍生\nORDT_DeriveFromCombination = '2'  # 组合衍生\nORDT_Combination = '3'  # 组合报单\nORDT_ConditionalOrder = '4'  # 条件单\nORDT_Swap = '5'  # 互换单\nT['TimeCondition'] = 'char'  # 有效期类型\nTC_IOC = '1'  # 立即完成，否则撤销\nTC_GFS = '2'  # 本节有效\nTC_GFD = '3'  # 当日有效\nTC_GTD = '4'  # 指定日期前有效\nTC_GTC = '5'  # 撤销前有效\nTC_GFA = '6'  # 集合竞价有效\nT['VolumeCondition'] = 'char'  # 成交量类型\nVC_AV = '1'  # 任何数量\nVC_MV = '2'  # 最小数量\nVC_CV = '3'  # 全部数量\nT['ContingentCondition'] = 'char'  # 触发条件\nCC_Immediately = '1'  # 立即\nCC_Touch = '2'  # 止损\nCC_TouchProfit = '3'  # 止赢\nCC_ParkedOrder = '4'  # 预埋单\nCC_LastPriceGreaterThanStopPrice = '5'  # 最新价大于条件价\nCC_LastPriceGreaterEqualStopPrice = '6'  # 最新价大于等于条件价\nCC_LastPriceLesserThanStopPrice = '7'  # 最新价小于条件价\nCC_LastPriceLesserEqualStopPrice = '8'  # 最新价小于等于条件价\nCC_AskPriceGreaterThanStopPrice = '9'  # 卖一价大于条件价\nCC_AskPriceGreaterEqualStopPrice = 'A'  # 卖一价大于等于条件价\nCC_AskPriceLesserThanStopPrice = 'B'  # 卖一价小于条件价\nCC_AskPriceLesserEqualStopPrice = 'C'  # 卖一价小于等于条件价\nCC_BidPriceGreaterThanStopPrice = 'D'  # 买一价大于条件价\nCC_BidPriceGreaterEqualStopPrice = 'E'  # 买一价大于等于条件价\nCC_BidPriceLesserThanStopPrice = 'F'  # 买一价小于条件价\nCC_BidPriceLesserEqualStopPrice = 'H'  # 买一价小于等于条件价\nT['ActionFlag'] = 'char'  # 操作标志\nAF_Delete = '0'  # 删除\nAF_Modify = '3'  # 修改\nT['TradingRight'] = 'char'  # 交易权限\nTR_Allow = '0'  # 可以交易\nTR_CloseOnly = '1'  # 只能平仓\nTR_Forbidden = '2'  # 不能交易\nT['OrderSource'] = 'char'  # 报单来源\nOSRC_Participant = '0'  # 来自参与者\nOSRC_Administrator = '1'  # 来自管理员\nT['TradeType'] = 'char'  # 成交类型\nTRDT_SplitCombination = '#'  # 组合持仓拆分为单一持仓,初始化不应包含该类型的持仓\nTRDT_Common = '0'  # 普通成交\nTRDT_OptionsExecution = '1'  # 期权执行\nTRDT_OTC = '2'  # OTC成交\nTRDT_EFPDerived = '3'  # 期转现衍生成交\nTRDT_CombinationDerived = '4'  # 组合衍生成交\nT['PriceSource'] = 'char'  # 成交价来源\nPSRC_LastPrice = '0'  # 前成交价\nPSRC_Buy = '1'  # 买委托价\nPSRC_Sell = '2'  # 卖委托价\nT['InstrumentStatus'] = 'char'  # 合约交易状态\nIS_BeforeTrading = '0'  # 开盘前\nIS_NoTrading = '1'  # 非交易\nIS_Continous = '2'  # 连续交易\nIS_AuctionOrdering = '3'  # 集合竞价报单\nIS_AuctionBalance = '4'  # 集合竞价价格平衡\nIS_AuctionMatch = '5'  # 集合竞价撮合\nIS_Closed = '6'  # 收盘\nT['InstStatusEnterReason'] = 'char'  # 品种进入交易状态原因\nIER_Automatic = '1'  # 自动切换\nIER_Manual = '2'  # 手动切换\nIER_Fuse = '3'  # 熔断\nT['OrderActionRef'] = 'int'  # 报单操作引用\nT['InstallCount'] = 'int'  # 安装数量\nT['InstallID'] = 'int'  # 安装编号\nT['ErrorID'] = 'int'  # 错误代码\nT['SettlementID'] = 'int'  # 结算编号\nT['Volume'] = 'int'  # 数量\nT['FrontID'] = 'int'  # 前置编号\nT['SessionID'] = 'int'  # 会话编号\nT['SequenceNo'] = 'int'  # 序号\nT['CommandNo'] = 'int'  # DB命令序号\nT['Millisec'] = 'int'  # 时间（毫秒）\nT['VolumeMultiple'] = 'int'  # 合约数量乘数\nT['TradingSegmentSN'] = 'int'  # 交易阶段编号\nT['RequestID'] = 'int'  # 请求编号\nT['Year'] = 'int'  # 年份\nT['Month'] = 'int'  # 月份\nT['Bool'] = 'int'  # 布尔型\nT['Price'] = 'double'  # 价格\nT['CombOffsetFlag'] = 'char[5]'  # 组合开平标志\nT['CombHedgeFlag'] = 'char[5]'  # 组合投机套保标志\nT['Ratio'] = 'double'  # 比率\nT['Money'] = 'double'  # 资金\nT['LargeVolume'] = 'double'  # 大额数量\nT['SequenceSeries'] = 'short'  # 序列系列号\nT['CommPhaseNo'] = 'short'  # 通讯时段编号\nT['SequenceLabel'] = 'char[2]'  # 序列编号\nT['UnderlyingMultiple'] = 'double'  # 基础商品乘数\nT['Priority'] = 'int'  # 优先级\nT['ContractCode'] = 'char[41]'  # 合同编号\nT['City'] = 'char[51]'  # 市\nT['IsStock'] = 'char[11]'  # 是否股民\nT['Channel'] = 'char[51]'  # 渠道\nT['Address'] = 'char[101]'  # 通讯地址\nT['ZipCode'] = 'char[7]'  # 邮政编码\nT['Telephone'] = 'char[41]'  # 联系电话\nT['Fax'] = 'char[41]'  # 传真\nT['Mobile'] = 'char[41]'  # 手机\nT['EMail'] = 'char[41]'  # 电子邮件\nT['Memo'] = 'char[161]'  # 备注\nT['CompanyCode'] = 'char[51]'  # 企业代码\nT['Website'] = 'char[51]'  # 网站地址\nT['TaxNo'] = 'char[31]'  # 税务登记号\nT['BatchStatus'] = 'char'  # 处理状态\nBS_NoUpload = '1'  # 未上传\nBS_Uploaded = '2'  # 已上传\nBS_Failed = '3'  # 审核失败\nT['PropertyID'] = 'char[33]'  # 属性代码\nT['PropertyName'] = 'char[65]'  # 属性名称\nT['LicenseNo'] = 'char[51]'  # 营业执照号\nT['AgentID'] = 'char[13]'  # 经纪人代码\nT['AgentName'] = 'char[41]'  # 经纪人名称\nT['AgentGroupID'] = 'char[13]'  # 经纪人组代码\nT['AgentGroupName'] = 'char[41]'  # 经纪人组名称\nT['ReturnStyle'] = 'char'  # 按品种返还方式\nRS_All = '1'  # 按所有品种\nRS_ByProduct = '2'  # 按品种\nT['ReturnPattern'] = 'char'  # 返还模式\nRP_ByVolume = '1'  # 按成交手数\nRP_ByFeeOnHand = '2'  # 按留存手续费\nT['ReturnLevel'] = 'char'  # 返还级别\nRL_Level1 = '1'  # 级别1\nRL_Level2 = '2'  # 级别2\nRL_Level3 = '3'  # 级别3\nRL_Level4 = '4'  # 级别4\nRL_Level5 = '5'  # 级别5\nRL_Level6 = '6'  # 级别6\nRL_Level7 = '7'  # 级别7\nRL_Level8 = '8'  # 级别8\nRL_Level9 = '9'  # 级别9\nT['ReturnStandard'] = 'char'  # 返还标准\nRSD_ByPeriod = '1'  # 分阶段返还\nRSD_ByStandard = '2'  # 按某一标准\nT['MortgageType'] = 'char'  # 质押类型\nMT_Out = '0'  # 质出\nMT_In = '1'  # 质入\nT['InvestorSettlementParamID'] = 'char'  # 投资者结算参数代码\nISPI_MortgageRatio = '4'  # 质押比例\nISPI_MarginWay = '5'  # 保证金算法\nISPI_BillDeposit = '9'  # 结算单结存是否包含质押\nT['ExchangeSettlementParamID'] = 'char'  # 交易所结算参数代码\nESPI_MortgageRatio = '1'  # 质押比例\nESPI_OtherFundItem = '2'  # 分项资金导入项\nESPI_OtherFundImport = '3'  # 分项资金入交易所出入金\nESPI_CFFEXMinPrepa = '6'  # 中金所开户最低可用金额\nESPI_CZCESettlementType = '7'  # 郑商所结算方式\nESPI_ExchDelivFeeMode = '9'  # 交易所交割手续费收取方式\nESPI_DelivFeeMode = '0'  # 投资者交割手续费收取方式\nESPI_CZCEComMarginType = 'A'  # 郑商所组合持仓保证金收取方式\nESPI_DceComMarginType = 'B'  # 大商所套利保证金是否优惠\nESPI_OptOutDisCountRate = 'a'  # 虚值期权保证金优惠比率\nESPI_OptMiniGuarantee = 'b'  # 最低保障系数\nT['SystemParamID'] = 'char'  # 系统参数代码\nSPI_InvestorIDMinLength = '1'  # 投资者代码最小长度\nSPI_AccountIDMinLength = '2'  # 投资者帐号代码最小长度\nSPI_UserRightLogon = '3'  # 投资者开户默认登录权限\nSPI_SettlementBillTrade = '4'  # 投资者交易结算单成交汇总方式\nSPI_TradingCode = '5'  # 统一开户更新交易编码方式\nSPI_CheckFund = '6'  # 结算是否判断存在未复核的出入金和分项资金\nSPI_CommModelRight = '7'  # 是否启用手续费模板数据权限\nSPI_MarginModelRight = '9'  # 是否启用保证金率模板数据权限\nSPI_IsStandardActive = '8'  # 是否规范用户才能激活\nSPI_UploadSettlementFile = 'U'  # 上传的交易所结算文件路径\nSPI_DownloadCSRCFile = 'D'  # 上报保证金监控中心文件路径\nSPI_SettlementBillFile = 'S'  # 生成的结算单文件路径\nSPI_CSRCOthersFile = 'C'  # 证监会文件标识\nSPI_InvestorPhoto = 'P'  # 投资者照片路径\nSPI_CSRCData = 'R'  # 全结经纪公司上传文件路径\nSPI_InvestorPwdModel = 'I'  # 开户密码录入方式\nSPI_CFFEXInvestorSettleFile = 'F'  # 投资者中金所结算文件下载路径\nSPI_InvestorIDType = 'a'  # 投资者代码编码方式\nSPI_FreezeMaxReMain = 'r'  # 休眠户最高权益\nSPI_IsSync = 'A'  # 手续费相关操作实时上场开关\nSPI_RelieveOpenLimit = 'O'  # 解除开仓权限限制\nSPI_IsStandardFreeze = 'X'  # 是否规范用户才能休眠\nSPI_CZCENormalProductHedge = 'B'  # 郑商所是否开放所有品种套保交易\nT['TradeParamID'] = 'char'  # 交易系统参数代码\nTPID_EncryptionStandard = 'E'  # 系统加密算法\nTPID_RiskMode = 'R'  # 系统风险算法\nTPID_RiskModeGlobal = 'G'  # 系统风险算法是否全局 0-否 1-是\nTPID_modeEncode = 'P'  # 密码加密算法\nTPID_tickMode = 'T'  # 价格小数位数参数\nTPID_SingleUserSessionMaxNum = 'S'  # 用户最大会话数\nTPID_LoginFailMaxNum = 'L'  # 最大连续登录失败数\nTPID_IsAuthForce = 'A'  # 是否强制认证\nTPID_IsPosiFreeze = 'F'  # 是否冻结证券持仓\nTPID_IsPosiLimit = 'M'  # 是否限仓\nTPID_ForQuoteTimeInterval = 'Q'  # 郑商所询价时间间隔\nT['SettlementParamValue'] = 'char[256]'  # 参数代码值\nT['CounterID'] = 'char[33]'  # 计数器代码\nT['InvestorGroupName'] = 'char[41]'  # 投资者分组名称\nT['BrandCode'] = 'char[257]'  # 牌号\nT['Warehouse'] = 'char[257]'  # 仓库\nT['ProductDate'] = 'char[41]'  # 产期\nT['Grade'] = 'char[41]'  # 等级\nT['Classify'] = 'char[41]'  # 类别\nT['Position'] = 'char[41]'  # 货位\nT['Yieldly'] = 'char[41]'  # 产地\nT['Weight'] = 'char[41]'  # 公定重量\nT['SubEntryFundNo'] = 'int'  # 分项资金流水号\nT['FileID'] = 'char'  # 文件标识\nFI_SettlementFund = 'F'  # 资金数据\nFI_Trade = 'T'  # 成交数据\nFI_InvestorPosition = 'P'  # 投资者持仓数据\nFI_SubEntryFund = 'O'  # 投资者分项资金数据\nFI_CZCECombinationPos = 'C'  # 组合持仓数据\nFI_CSRCData = 'R'  # 上报保证金监控中心数据\nFI_CZCEClose = 'L'  # 郑商所平仓了结数据\nFI_CZCENoClose = 'N'  # 郑商所非平仓了结数据\nFI_PositionDtl = 'D'  # 持仓明细数据\nFI_OptionStrike = 'S'  # 期权执行文件\nFI_SettlementPriceComparison = 'M'  # 结算价比对文件\nFI_NonTradePosChange = 'B'  # 上期所非持仓变动明细\nT['FileName'] = 'char[257]'  # 文件名称\nT['FileType'] = 'char'  # 文件上传类型\nFUT_Settlement = '0'  # 结算\nFUT_Check = '1'  # 核对\nT['FileFormat'] = 'char'  # 文件格式\nFFT_Txt = '0'  # 文本文件(.txt)\nFFT_Zip = '1'  # 压缩文件(.zip)\nFFT_DBF = '2'  # DBF文件(.dbf)\nT['FileUploadStatus'] = 'char'  # 文件状态\nFUS_SucceedUpload = '1'  # 上传成功\nFUS_FailedUpload = '2'  # 上传失败\nFUS_SucceedLoad = '3'  # 导入成功\nFUS_PartSucceedLoad = '4'  # 导入部分成功\nFUS_FailedLoad = '5'  # 导入失败\nT['TransferDirection'] = 'char'  # 移仓方向\nTD_Out = '0'  # 移出\nTD_In = '1'  # 移入\nT['UploadMode'] = 'char[21]'  # 上传文件类型\nT['AccountID'] = 'char[13]'  # 投资者帐号\nT['BankFlag'] = 'char[4]'  # 银行统一标识类型\nT['BankAccount'] = 'char[41]'  # 银行账户\nT['OpenName'] = 'char[61]'  # 银行账户的开户人名称\nT['OpenBank'] = 'char[101]'  # 银行账户的开户行\nT['BankName'] = 'char[101]'  # 银行名称\nT['PublishPath'] = 'char[257]'  # 发布路径\nT['OperatorID'] = 'char[65]'  # 操作员代码\nT['MonthCount'] = 'int'  # 月份数量\nT['AdvanceMonthArray'] = 'char[13]'  # 月份提前数组\nT['DateExpr'] = 'char[1025]'  # 日期表达式\nT['InstrumentIDExpr'] = 'char[41]'  # 合约代码表达式\nT['InstrumentNameExpr'] = 'char[41]'  # 合约名称表达式\nT['SpecialCreateRule'] = 'char'  # 特殊的创建规则\nSC_NoSpecialRule = '0'  # 没有特殊创建规则\nSC_NoSpringFestival = '1'  # 不包含春节\nT['BasisPriceType'] = 'char'  # 挂牌基准价类型\nIPT_LastSettlement = '1'  # 上一合约结算价\nIPT_LaseClose = '2'  # 上一合约收盘价\nT['ProductLifePhase'] = 'char'  # 产品生命周期状态\nPLP_Active = '1'  # 活跃\nPLP_NonActive = '2'  # 不活跃\nPLP_Canceled = '3'  # 注销\nT['DeliveryMode'] = 'char'  # 交割方式\nDM_CashDeliv = '1'  # 现金交割\nDM_CommodityDeliv = '2'  # 实物交割\nT['LogLevel'] = 'char[33]'  # 日志级别\nT['ProcessName'] = 'char[257]'  # 存储过程名称\nT['OperationMemo'] = 'char[1025]'  # 操作摘要\nT['FundIOType'] = 'char'  # 出入金类型\nFIOT_FundIO = '1'  # 出入金\nFIOT_Transfer = '2'  # 银期转帐\nFIOT_SwapCurrency = '3'  # 银期换汇\nT['FundType'] = 'char'  # 资金类型\nFT_Deposite = '1'  # 银行存款\nFT_ItemFund = '2'  # 分项资金\nFT_Company = '3'  # 公司调整\nFT_InnerTransfer = '4'  # 资金内转\nT['FundDirection'] = 'char'  # 出入金方向\nFD_In = '1'  # 入金\nFD_Out = '2'  # 出金\nT['FundStatus'] = 'char'  # 资金状态\nFS_Record = '1'  # 已录入\nFS_Check = '2'  # 已复核\nFS_Charge = '3'  # 已冲销\nT['BillNo'] = 'char[15]'  # 票据号\nT['BillName'] = 'char[33]'  # 票据名称\nT['PublishStatus'] = 'char'  # 发布状态\nPS_None = '1'  # 未发布\nPS_Publishing = '2'  # 正在发布\nPS_Published = '3'  # 已发布\nT['EnumValueID'] = 'char[65]'  # 枚举值代码\nT['EnumValueType'] = 'char[33]'  # 枚举值类型\nT['EnumValueLabel'] = 'char[65]'  # 枚举值名称\nT['EnumValueResult'] = 'char[33]'  # 枚举值结果\nT['SystemStatus'] = 'char'  # 系统状态\nES_NonActive = '1'  # 不活跃\nES_Startup = '2'  # 启动\nES_Initialize = '3'  # 交易开始初始化\nES_Initialized = '4'  # 交易完成初始化\nES_Close = '5'  # 收市开始\nES_Closed = '6'  # 收市完成\nES_Settlement = '7'  # 结算\nT['SettlementStatus'] = 'char'  # 结算状态\nSTS_Initialize = '0'  # 初始\nSTS_Settlementing = '1'  # 结算中\nSTS_Settlemented = '2'  # 已结算\nSTS_Finished = '3'  # 结算完成\nT['RangeIntType'] = 'char[33]'  # 限定值类型\nT['RangeIntFrom'] = 'char[33]'  # 限定值下限\nT['RangeIntTo'] = 'char[33]'  # 限定值上限\nT['FunctionID'] = 'char[25]'  # 功能代码\nT['FunctionValueCode'] = 'char[257]'  # 功能编码\nT['FunctionName'] = 'char[65]'  # 功能名称\nT['RoleID'] = 'char[11]'  # 角色编号\nT['RoleName'] = 'char[41]'  # 角色名称\nT['Description'] = 'char[401]'  # 描述\nT['CombineID'] = 'char[25]'  # 组合编号\nT['CombineType'] = 'char[25]'  # 组合类型\nT['InvestorType'] = 'char'  # 投资者类型\nCT_Person = '0'  # 自然人\nCT_Company = '1'  # 法人\nCT_Fund = '2'  # 投资基金\nCT_SpecialOrgan = '3'  # 特殊法人\nCT_Asset = '4'  # 资管户\nT['BrokerType'] = 'char'  # 经纪公司类型\nBT_Trade = '0'  # 交易会员\nBT_TradeSettle = '1'  # 交易结算会员\nT['RiskLevel'] = 'char'  # 风险等级\nFAS_Low = '1'  # 低风险客户\nFAS_Normal = '2'  # 普通客户\nFAS_Focus = '3'  # 关注客户\nFAS_Risk = '4'  # 风险客户\nT['FeeAcceptStyle'] = 'char'  # 手续费收取方式\nFAS_ByTrade = '1'  # 按交易收取\nFAS_ByDeliv = '2'  # 按交割收取\nFAS_None = '3'  # 不收\nFAS_FixFee = '4'  # 按指定手续费收取\nT['PasswordType'] = 'char'  # 密码类型\nPWDT_Trade = '1'  # 交易密码\nPWDT_Account = '2'  # 资金密码\nT['Algorithm'] = 'char'  # 盈亏算法\nAG_All = '1'  # 浮盈浮亏都计算\nAG_OnlyLost = '2'  # 浮盈不计，浮亏计\nAG_OnlyGain = '3'  # 浮盈计，浮亏不计\nAG_None = '4'  # 浮盈浮亏都不计算\nT['IncludeCloseProfit'] = 'char'  # 是否包含平仓盈利\nICP_Include = '0'  # 包含平仓盈利\nICP_NotInclude = '2'  # 不包含平仓盈利\nT['AllWithoutTrade'] = 'char'  # 是否受可提比例限制\nAWT_Enable = '0'  # 无仓无成交不受可提比例限制\nAWT_Disable = '2'  # 受可提比例限制\nAWT_NoHoldEnable = '3'  # 无仓不受可提比例限制\nT['Comment'] = 'char[31]'  # 盈亏算法说明\nT['Version'] = 'char[4]'  # 版本号\nT['TradeCode'] = 'char[7]'  # 交易代码\nT['TradeDate'] = 'char[9]'  # 交易日期\nT['TradeTime'] = 'char[9]'  # 交易时间\nT['TradeSerial'] = 'char[9]'  # 发起方流水号\nT['TradeSerialNo'] = 'int'  # 发起方流水号\nT['FutureID'] = 'char[11]'  # 期货公司代码\nT['BankID'] = 'char[4]'  # 银行代码\nT['BankBrchID'] = 'char[5]'  # 银行分中心代码\nT['BankBranchID'] = 'char[11]'  # 分中心代码\nT['OperNo'] = 'char[17]'  # 交易柜员\nT['DeviceID'] = 'char[3]'  # 渠道标志\nT['RecordNum'] = 'char[7]'  # 记录数\nT['FutureAccount'] = 'char[22]'  # 期货资金账号\nT['FuturePwdFlag'] = 'char'  # 资金密码核对标志\nFPWD_UnCheck = '0'  # 不核对\nFPWD_Check = '1'  # 核对\nT['TransferType'] = 'char'  # 银期转账类型\nTT_BankToFuture = '0'  # 银行转期货\nTT_FutureToBank = '1'  # 期货转银行\nT['FutureAccPwd'] = 'char[17]'  # 期货资金密码\nT['CurrencyCode'] = 'char[4]'  # 币种\nT['RetCode'] = 'char[5]'  # 响应代码\nT['RetInfo'] = 'char[129]'  # 响应信息\nT['TradeAmt'] = 'char[20]'  # 银行总余额\nT['UseAmt'] = 'char[20]'  # 银行可用余额\nT['FetchAmt'] = 'char[20]'  # 银行可取余额\nT['TransferValidFlag'] = 'char'  # 转账有效标志\nTVF_Invalid = '0'  # 无效或失败\nTVF_Valid = '1'  # 有效\nTVF_Reverse = '2'  # 冲正\nT['CertCode'] = 'char[21]'  # 证件号码\nT['Reason'] = 'char'  # 事由\nRN_CD = '0'  # 错单\nRN_ZT = '1'  # 资金在途\nRN_QT = '2'  # 其它\nT['FundProjectID'] = 'char[5]'  # 资金项目编号\nT['Sex'] = 'char'  # 性别\nSEX_None = '0'  # 未知\nSEX_Man = '1'  # 男\nSEX_Woman = '2'  # 女\nT['Profession'] = 'char[101]'  # 职业\nT['National'] = 'char[31]'  # 国籍\nT['Province'] = 'char[51]'  # 省\nT['Region'] = 'char[16]'  # 区\nT['Country'] = 'char[16]'  # 国家\nT['LicenseNO'] = 'char[33]'  # 营业执照\nT['CompanyType'] = 'char[16]'  # 企业性质\nT['BusinessScope'] = 'char[1001]'  # 经营范围\nT['CapitalCurrency'] = 'char[4]'  # 注册资本币种\nT['UserType'] = 'char'  # 用户类型\nUT_Investor = '0'  # 投资者\nUT_Operator = '1'  # 操作员\nUT_SuperUser = '2'  # 管理员\nT['RateType'] = 'char'  # 费率类型\nRATETYPE_MarginRate = '2'  # 保证金率\nT['NoteType'] = 'char'  # 通知类型\nNOTETYPE_TradeSettleBill = '1'  # 交易结算单\nNOTETYPE_TradeSettleMonth = '2'  # 交易结算月报\nNOTETYPE_CallMarginNotes = '3'  # 追加保证金通知书\nNOTETYPE_ForceCloseNotes = '4'  # 强行平仓通知书\nNOTETYPE_TradeNotes = '5'  # 成交通知书\nNOTETYPE_DelivNotes = '6'  # 交割通知书\nT['SettlementStyle'] = 'char'  # 结算单方式\nSBS_Day = '1'  # 逐日盯市\nSBS_Volume = '2'  # 逐笔对冲\nT['BrokerDNS'] = 'char[256]'  # 域名\nT['Sentence'] = 'char[501]'  # 语句\nT['SettlementBillType'] = 'char'  # 结算单类型\nST_Day = '0'  # 日报\nST_Month = '1'  # 月报\nT['UserRightType'] = 'char'  # 客户权限类型\nURT_Logon = '1'  # 登录\nURT_Transfer = '2'  # 银期转帐\nURT_EMail = '3'  # 邮寄结算单\nURT_Fax = '4'  # 传真结算单\nURT_ConditionOrder = '5'  # 条件单\nT['MarginPriceType'] = 'char'  # 保证金价格类型\nMPT_PreSettlementPrice = '1'  # 昨结算价\nMPT_SettlementPrice = '2'  # 最新价\nMPT_AveragePrice = '3'  # 成交均价\nMPT_OpenPrice = '4'  # 开仓价\nT['BillGenStatus'] = 'char'  # 结算单生成状态\nBGS_None = '0'  # 未生成\nBGS_NoGenerated = '1'  # 生成中\nBGS_Generated = '2'  # 已生成\nT['AlgoType'] = 'char'  # 算法类型\nAT_HandlePositionAlgo = '1'  # 持仓处理算法\nAT_FindMarginRateAlgo = '2'  # 寻找保证金率算法\nT['HandlePositionAlgoID'] = 'char'  # 持仓处理算法编号\nHPA_Base = '1'  # 基本\nHPA_DCE = '2'  # 大连商品交易所\nHPA_CZCE = '3'  # 郑州商品交易所\nT['FindMarginRateAlgoID'] = 'char'  # 寻找保证金率算法编号\nFMRA_Base = '1'  # 基本\nFMRA_DCE = '2'  # 大连商品交易所\nFMRA_CZCE = '3'  # 郑州商品交易所\nT['HandleTradingAccountAlgoID'] = 'char'  # 资金处理算法编号\nHTAA_Base = '1'  # 基本\nHTAA_DCE = '2'  # 大连商品交易所\nHTAA_CZCE = '3'  # 郑州商品交易所\nT['PersonType'] = 'char'  # 联系人类型\nPST_Order = '1'  # 指定下单人\nPST_Open = '2'  # 开户授权人\nPST_Fund = '3'  # 资金调拨人\nPST_Settlement = '4'  # 结算单确认人\nPST_Company = '5'  # 法人\nPST_Corporation = '6'  # 法人代表\nPST_LinkMan = '7'  # 投资者联系人\nPST_Ledger = '8'  # 分户管理资产负责人\nPST_Trustee = '9'  # 托（保）管人\nPST_TrusteeCorporation = 'A'  # 托（保）管机构法人代表\nPST_TrusteeOpen = 'B'  # 托（保）管机构开户授权人\nPST_TrusteeContact = 'C'  # 托（保）管机构联系人\nPST_ForeignerRefer = 'D'  # 境外自然人参考证件\nPST_CorporationRefer = 'E'  # 法人代表参考证件\nT['QueryInvestorRange'] = 'char'  # 查询范围\nQIR_All = '1'  # 所有\nQIR_Group = '2'  # 查询分类\nQIR_Single = '3'  # 单一投资者\nT['InvestorRiskStatus'] = 'char'  # 投资者风险状态\nIRS_Normal = '1'  # 正常\nIRS_Warn = '2'  # 警告\nIRS_Call = '3'  # 追保\nIRS_Force = '4'  # 强平\nIRS_Exception = '5'  # 异常\nT['LegID'] = 'int'  # 单腿编号\nT['LegMultiple'] = 'int'  # 单腿乘数\nT['ImplyLevel'] = 'int'  # 派生层数\nT['ClearAccount'] = 'char[33]'  # 结算账户\nT['OrganNO'] = 'char[6]'  # 结算账户\nT['ClearbarchID'] = 'char[6]'  # 结算账户联行号\nT['UserEventType'] = 'char'  # 用户事件类型\nUET_Login = '1'  # 登录\nUET_Logout = '2'  # 登出\nUET_Trading = '3'  # 交易成功\nUET_TradingError = '4'  # 交易失败\nUET_UpdatePassword = '5'  # 修改密码\nUET_Authenticate = '6'  # 客户端认证\nUET_Other = '9'  # 其他\nT['UserEventInfo'] = 'char[1025]'  # 用户事件信息\nT['CloseStyle'] = 'char'  # 平仓方式\nICS_Close = '0'  # 先开先平\nICS_CloseToday = '1'  # 先平今再平昨\nT['StatMode'] = 'char'  # 统计方式\nSM_Non = '0'  # ----\nSM_Instrument = '1'  # 按合约统计\nSM_Product = '2'  # 按产品统计\nSM_Investor = '3'  # 按投资者统计\nT['ParkedOrderStatus'] = 'char'  # 预埋单状态\nPAOS_NotSend = '1'  # 未发送\nPAOS_Send = '2'  # 已发送\nPAOS_Deleted = '3'  # 已删除\nT['ParkedOrderID'] = 'char[13]'  # 预埋报单编号\nT['ParkedOrderActionID'] = 'char[13]'  # 预埋撤单编号\nT['VirDealStatus'] = 'char'  # 处理状态\nVDS_Dealing = '1'  # 正在处理\nVDS_DeaclSucceed = '2'  # 处理成功\nT['OrgSystemID'] = 'char'  # 原有系统代码\nORGS_Standard = '0'  # 综合交易平台\nORGS_ESunny = '1'  # 易盛系统\nORGS_KingStarV6 = '2'  # 金仕达V6系统\nT['VirTradeStatus'] = 'char'  # 交易状态\nVTS_NaturalDeal = '0'  # 正常处理中\nVTS_SucceedEnd = '1'  # 成功结束\nVTS_FailedEND = '2'  # 失败结束\nVTS_Exception = '3'  # 异常中\nVTS_ManualDeal = '4'  # 已人工异常处理\nVTS_MesException = '5'  # 通讯异常 ，请人工处理\nVTS_SysException = '6'  # 系统出错，请人工处理\nT['VirBankAccType'] = 'char'  # 银行帐户类型\nVBAT_BankBook = '1'  # 存折\nVBAT_BankCard = '2'  # 储蓄卡\nVBAT_CreditCard = '3'  # 信用卡\nT['VirementStatus'] = 'char'  # 银行帐户类型\nVMS_Natural = '0'  # 正常\nVMS_Canceled = '9'  # 销户\nT['VirementAvailAbility'] = 'char'  # 有效标志\nVAA_NoAvailAbility = '0'  # 未确认\nVAA_AvailAbility = '1'  # 有效\nVAA_Repeal = '2'  # 冲正\nT['VirementTradeCode'] = 'char[7]'  # 交易代码\nVTC_BankBankToFuture = '102001'  # 银行发起银行资金转期货\nVTC_BankFutureToBank = '102002'  # 银行发起期货资金转银行\nVTC_FutureBankToFuture = '202001'  # 期货发起银行资金转期货\nVTC_FutureFutureToBank = '202002'  # 期货发起期货资金转银行\nT['PhotoTypeName'] = 'char[41]'  # 影像类型名称\nT['PhotoTypeID'] = 'char[5]'  # 影像类型代码\nT['PhotoName'] = 'char[161]'  # 影像名称\nT['TopicID'] = 'int'  # 主题代码\nT['ReportTypeID'] = 'char[3]'  # 交易报告类型标识\nT['CharacterID'] = 'char[5]'  # 交易特征代码\nT['AMLParamID'] = 'char[21]'  # 参数代码\nT['AMLInvestorType'] = 'char[3]'  # 投资者类型\nT['AMLIdCardType'] = 'char[3]'  # 证件类型\nT['AMLTradeDirect'] = 'char[3]'  # 资金进出方向\nT['AMLTradeModel'] = 'char[3]'  # 资金进出方式\nT['AMLParamID'] = 'char[21]'  # 参数代码\nT['AMLOpParamValue'] = 'double'  # 业务参数代码值\nT['AMLCustomerCardType'] = 'char[81]'  # 客户身份证件/证明文件类型\nT['AMLInstitutionName'] = 'char[65]'  # 金融机构网点名称\nT['AMLDistrictID'] = 'char[7]'  # 金融机构网点所在地区行政区划代码\nT['AMLRelationShip'] = 'char[3]'  # 金融机构网点与大额交易的关系\nT['AMLInstitutionType'] = 'char[3]'  # 金融机构网点代码类型\nT['AMLInstitutionID'] = 'char[13]'  # 金融机构网点代码\nT['AMLAccountType'] = 'char[5]'  # 账户类型\nT['AMLTradingType'] = 'char[7]'  # 交易方式\nT['AMLTransactClass'] = 'char[7]'  # 涉外收支交易分类与代码\nT['AMLCapitalIO'] = 'char[3]'  # 资金收付标识\nT['AMLSite'] = 'char[10]'  # 交易地点\nT['AMLCapitalPurpose'] = 'char[129]'  # 资金用途\nT['AMLReportType'] = 'char[2]'  # 报文类型\nT['AMLSerialNo'] = 'char[5]'  # 编号\nT['AMLStatus'] = 'char[2]'  # 状态\nT['AMLGenStatus'] = 'char'  # Aml生成方式\nGEN_Program = '0'  # 程序生成\nGEN_HandWork = '1'  # 人工生成\nT['AMLSeqCode'] = 'char[65]'  # 业务标识号\nT['AMLFileName'] = 'char[257]'  # AML文件名\nT['AMLMoney'] = 'double'  # 反洗钱资金\nT['AMLFileAmount'] = 'int'  # 反洗钱资金\nT['CFMMCKey'] = 'char[21]'  # 密钥类型(保证金监管)\nT['CFMMCToken'] = 'char[21]'  # 令牌类型(保证金监管)\nT['CFMMCKeyKind'] = 'char'  # 动态密钥类别(保证金监管)\nCFMMCKK_REQUEST = 'R'  # 主动请求更新\nCFMMCKK_AUTO = 'A'  # CFMMC自动更新\nCFMMCKK_MANUAL = 'M'  # CFMMC手动更新\nT['AMLReportName'] = 'char[81]'  # 报文名称\nT['IndividualName'] = 'char[51]'  # 个人姓名\nT['CurrencyID'] = 'char[4]'  # 币种代码\nT['CustNumber'] = 'char[36]'  # 客户编号\nT['OrganCode'] = 'char[36]'  # 机构编码\nT['OrganName'] = 'char[71]'  # 机构名称\nT['SuperOrganCode'] = 'char[12]'  # 上级机构编码,即期货公司总部、银行总行\nT['SubBranchID'] = 'char[31]'  # 分支机构\nT['SubBranchName'] = 'char[71]'  # 分支机构名称\nT['BranchNetCode'] = 'char[31]'  # 机构网点号\nT['BranchNetName'] = 'char[71]'  # 机构网点名称\nT['OrganFlag'] = 'char[2]'  # 机构标识\nT['BankCodingForFuture'] = 'char[33]'  # 银行对期货公司的编码\nT['BankReturnCode'] = 'char[7]'  # 银行对返回码的定义\nT['PlateReturnCode'] = 'char[5]'  # 银期转帐平台对返回码的定义\nT['BankSubBranchID'] = 'char[31]'  # 银行分支机构编码\nT['FutureBranchID'] = 'char[31]'  # 期货分支机构编码\nT['ReturnCode'] = 'char[7]'  # 返回代码\nT['OperatorCode'] = 'char[17]'  # 操作员\nT['ClearDepID'] = 'char[6]'  # 机构结算帐户机构号\nT['ClearBrchID'] = 'char[6]'  # 机构结算帐户联行号\nT['ClearName'] = 'char[71]'  # 机构结算帐户名称\nT['BankAccountName'] = 'char[71]'  # 银行帐户名称\nT['InvDepID'] = 'char[6]'  # 机构投资人账号机构号\nT['InvBrchID'] = 'char[6]'  # 机构投资人联行号\nT['MessageFormatVersion'] = 'char[36]'  # 信息格式版本\nT['Digest'] = 'char[36]'  # 摘要\nT['AuthenticData'] = 'char[129]'  # 认证数据\nT['PasswordKey'] = 'char[129]'  # 密钥\nT['FutureAccountName'] = 'char[129]'  # 期货帐户名称\nT['MobilePhone'] = 'char[21]'  # 手机\nT['FutureMainKey'] = 'char[129]'  # 期货公司主密钥\nT['FutureWorkKey'] = 'char[129]'  # 期货公司工作密钥\nT['FutureTransKey'] = 'char[129]'  # 期货公司传输密钥\nT['BankMainKey'] = 'char[129]'  # 银行主密钥\nT['BankWorkKey'] = 'char[129]'  # 银行工作密钥\nT['BankTransKey'] = 'char[129]'  # 银行传输密钥\nT['BankServerDescription'] = 'char[129]'  # 银行服务器描述信息\nT['AddInfo'] = 'char[129]'  # 附加信息\nT['DescrInfoForReturnCode'] = 'char[129]'  # 返回码描述\nT['CountryCode'] = 'char[21]'  # 国家代码\nT['Serial'] = 'int'  # 流水号\nT['PlateSerial'] = 'int'  # 平台流水号\nT['BankSerial'] = 'char[13]'  # 银行流水号\nT['CorrectSerial'] = 'int'  # 被冲正交易流水号\nT['FutureSerial'] = 'int'  # 期货公司流水号\nT['ApplicationID'] = 'int'  # 应用标识\nT['BankProxyID'] = 'int'  # 银行代理标识\nT['FBTCoreID'] = 'int'  # 银期转帐核心系统标识\nT['ServerPort'] = 'int'  # 服务端口号\nT['RepealedTimes'] = 'int'  # 已经冲正次数\nT['RepealTimeInterval'] = 'int'  # 冲正时间间隔\nT['TotalTimes'] = 'int'  # 每日累计转帐次数\nT['FBTRequestID'] = 'int'  # 请求ID\nT['TID'] = 'int'  # 交易ID\nT['TradeAmount'] = 'double'  # 交易金额（元）\nT['CustFee'] = 'double'  # 应收客户费用（元）\nT['FutureFee'] = 'double'  # 应收期货公司费用（元）\nT['SingleMaxAmt'] = 'double'  # 单笔最高限额\nT['SingleMinAmt'] = 'double'  # 单笔最低限额\nT['TotalAmt'] = 'double'  # 每日累计转帐额度\nT['CertificationType'] = 'char'  # 证件类型\nCFT_IDCard = '0'  # 身份证\nCFT_Passport = '1'  # 护照\nCFT_OfficerIDCard = '2'  # 军官证\nCFT_SoldierIDCard = '3'  # 士兵证\nCFT_HomeComingCard = '4'  # 回乡证\nCFT_HouseholdRegister = '5'  # 户口簿\nCFT_LicenseNo = '6'  # 营业执照号\nCFT_InstitutionCodeCard = '7'  # 组织机构代码证\nCFT_TempLicenseNo = '8'  # 临时营业执照号\nCFT_NoEnterpriseLicenseNo = '9'  # 民办非企业登记证书\nCFT_OtherCard = 'x'  # 其他证件\nCFT_SuperDepAgree = 'a'  # 主管部门批文\nT['FileBusinessCode'] = 'char'  # 文件业务功能\nFBC_Others = '0'  # 其他\nFBC_TransferDetails = '1'  # 转账交易明细对账\nFBC_CustAccStatus = '2'  # 客户账户状态对账\nFBC_AccountTradeDetails = '3'  # 账户类交易明细对账\nFBC_FutureAccountChangeInfoDetails = '4'  # 期货账户信息变更明细对账\nFBC_CustMoneyDetail = '5'  # 客户资金台账余额明细对账\nFBC_CustCancelAccountInfo = '6'  # 客户销户结息明细对账\nFBC_CustMoneyResult = '7'  # 客户资金余额对账结果\nFBC_OthersExceptionResult = '8'  # 其它对账异常结果文件\nFBC_CustInterestNetMoneyDetails = '9'  # 客户结息净额明细\nFBC_CustMoneySendAndReceiveDetails = 'a'  # 客户资金交收明细\nFBC_CorporationMoneyTotal = 'b'  # 法人存管银行资金交收汇总\nFBC_MainbodyMoneyTotal = 'c'  # 主体间资金交收汇总\nFBC_MainPartMonitorData = 'd'  # 总分平衡监管数据\nFBC_PreparationMoney = 'e'  # 存管银行备付金余额\nFBC_BankMoneyMonitorData = 'f'  # 协办存管银行资金监管数据\nT['CashExchangeCode'] = 'char'  # 汇钞标志\nCEC_Exchange = '1'  # 汇\nCEC_Cash = '2'  # 钞\nT['YesNoIndicator'] = 'char'  # 是或否标识\nYNI_Yes = '0'  # 是\nYNI_No = '1'  # 否\nT['BanlanceType'] = 'char'  # 余额类型\nBLT_CurrentMoney = '0'  # 当前余额\nBLT_UsableMoney = '1'  # 可用余额\nBLT_FetchableMoney = '2'  # 可取余额\nBLT_FreezeMoney = '3'  # 冻结余额\nT['Gender'] = 'char'  # 性别\nGD_Unknown = '0'  # 未知状态\nGD_Male = '1'  # 男\nGD_Female = '2'  # 女\nT['FeePayFlag'] = 'char'  # 费用支付标志\nFPF_BEN = '0'  # 由受益方支付费用\nFPF_OUR = '1'  # 由发送方支付费用\nFPF_SHA = '2'  # 由发送方支付发起的费用，受益方支付接受的费用\nT['PassWordKeyType'] = 'char'  # 密钥类型\nPWKT_ExchangeKey = '0'  # 交换密钥\nPWKT_PassWordKey = '1'  # 密码密钥\nPWKT_MACKey = '2'  # MAC密钥\nPWKT_MessageKey = '3'  # 报文密钥\nT['FBTPassWordType'] = 'char'  # 密码类型\nPWT_Query = '0'  # 查询\nPWT_Fetch = '1'  # 取款\nPWT_Transfer = '2'  # 转帐\nPWT_Trade = '3'  # 交易\nT['FBTEncryMode'] = 'char'  # 加密方式\nEM_NoEncry = '0'  # 不加密\nEM_DES = '1'  # DES\nEM_3DES = '2'  # 3DES\nT['BankRepealFlag'] = 'char'  # 银行冲正标志\nBRF_BankNotNeedRepeal = '0'  # 银行无需自动冲正\nBRF_BankWaitingRepeal = '1'  # 银行待自动冲正\nBRF_BankBeenRepealed = '2'  # 银行已自动冲正\nT['BrokerRepealFlag'] = 'char'  # 期商冲正标志\nBRORF_BrokerNotNeedRepeal = '0'  # 期商无需自动冲正\nBRORF_BrokerWaitingRepeal = '1'  # 期商待自动冲正\nBRORF_BrokerBeenRepealed = '2'  # 期商已自动冲正\nT['InstitutionType'] = 'char'  # 机构类别\nTS_Bank = '0'  # 银行\nTS_Future = '1'  # 期商\nTS_Store = '2'  # 券商\nT['LastFragment'] = 'char'  # 最后分片标志\nLF_Yes = '0'  # 是最后分片\nLF_No = '1'  # 不是最后分片\nT['BankAccStatus'] = 'char'  # 银行账户状态\nBAS_Normal = '0'  # 正常\nBAS_Freeze = '1'  # 冻结\nBAS_ReportLoss = '2'  # 挂失\nT['MoneyAccountStatus'] = 'char'  # 资金账户状态\nMAS_Normal = '0'  # 正常\nMAS_Cancel = '1'  # 销户\nT['ManageStatus'] = 'char'  # 存管状态\nMSS_Point = '0'  # 指定存管\nMSS_PrePoint = '1'  # 预指定\nMSS_CancelPoint = '2'  # 撤销指定\nT['SystemType'] = 'char'  # 应用系统类型\nSYT_FutureBankTransfer = '0'  # 银期转帐\nSYT_StockBankTransfer = '1'  # 银证转帐\nSYT_TheThirdPartStore = '2'  # 第三方存管\nT['TxnEndFlag'] = 'char'  # 银期转帐划转结果标志\nTEF_NormalProcessing = '0'  # 正常处理中\nTEF_Success = '1'  # 成功结束\nTEF_Failed = '2'  # 失败结束\nTEF_Abnormal = '3'  # 异常中\nTEF_ManualProcessedForException = '4'  # 已人工异常处理\nTEF_CommuFailedNeedManualProcess = '5'  # 通讯异常 ，请人工处理\nTEF_SysErrorNeedManualProcess = '6'  # 系统出错，请人工处理\nT['ProcessStatus'] = 'char'  # 银期转帐服务处理状态\nPSS_NotProcess = '0'  # 未处理\nPSS_StartProcess = '1'  # 开始处理\nPSS_Finished = '2'  # 处理完成\nT['CustType'] = 'char'  # 客户类型\nCUSTT_Person = '0'  # 自然人\nCUSTT_Institution = '1'  # 机构户\nT['FBTTransferDirection'] = 'char'  # 银期转帐方向\nFBTTD_FromBankToFuture = '1'  # 入金，银行转期货\nFBTTD_FromFutureToBank = '2'  # 出金，期货转银行\nT['OpenOrDestroy'] = 'char'  # 开销户类别\nOOD_Open = '1'  # 开户\nOOD_Destroy = '0'  # 销户\nT['AvailabilityFlag'] = 'char'  # 有效标志\nAVAF_Invalid = '0'  # 未确认\nAVAF_Valid = '1'  # 有效\nAVAF_Repeal = '2'  # 冲正\nT['OrganType'] = 'char'  # 机构类型\nOT_Bank = '1'  # 银行代理\nOT_Future = '2'  # 交易前置\nOT_PlateForm = '9'  # 银期转帐平台管理\nT['OrganLevel'] = 'char'  # 机构级别\nOL_HeadQuarters = '1'  # 银行总行或期商总部\nOL_Branch = '2'  # 银行分中心或期货公司营业部\nT['ProtocalID'] = 'char'  # 协议类型\nPID_FutureProtocal = '0'  # 期商协议\nPID_ICBCProtocal = '1'  # 工行协议\nPID_ABCProtocal = '2'  # 农行协议\nPID_CBCProtocal = '3'  # 中国银行协议\nPID_CCBProtocal = '4'  # 建行协议\nPID_BOCOMProtocal = '5'  # 交行协议\nPID_FBTPlateFormProtocal = 'X'  # 银期转帐平台协议\nT['ConnectMode'] = 'char'  # 套接字连接方式\nCM_ShortConnect = '0'  # 短连接\nCM_LongConnect = '1'  # 长连接\nT['SyncMode'] = 'char'  # 套接字通信方式\nSRM_ASync = '0'  # 异步\nSRM_Sync = '1'  # 同步\nT['BankAccType'] = 'char'  # 银行帐号类型\nBAT_BankBook = '1'  # 银行存折\nBAT_SavingCard = '2'  # 储蓄卡\nBAT_CreditCard = '3'  # 信用卡\nT['FutureAccType'] = 'char'  # 期货公司帐号类型\nFAT_BankBook = '1'  # 银行存折\nFAT_SavingCard = '2'  # 储蓄卡\nFAT_CreditCard = '3'  # 信用卡\nT['OrganStatus'] = 'char'  # 接入机构状态\nOS_Ready = '0'  # 启用\nOS_CheckIn = '1'  # 签到\nOS_CheckOut = '2'  # 签退\nOS_CheckFileArrived = '3'  # 对帐文件到达\nOS_CheckDetail = '4'  # 对帐\nOS_DayEndClean = '5'  # 日终清理\nOS_Invalid = '9'  # 注销\nT['CCBFeeMode'] = 'char'  # 建行收费模式\nCCBFM_ByAmount = '1'  # 按金额扣收\nCCBFM_ByMonth = '2'  # 按月扣收\nT['CommApiType'] = 'char'  # 通讯API类型\nCAPIT_Client = '1'  # 客户端\nCAPIT_Server = '2'  # 服务端\nCAPIT_UserApi = '3'  # 交易系统的UserApi\nT['ServiceID'] = 'int'  # 服务编号\nT['ServiceLineNo'] = 'int'  # 服务线路编号\nT['ServiceName'] = 'char[61]'  # 服务名\nT['LinkStatus'] = 'char'  # 连接状态\nLS_Connected = '1'  # 已经连接\nLS_Disconnected = '2'  # 没有连接\nT['CommApiPointer'] = 'int'  # 通讯API指针\nT['PwdFlag'] = 'char'  # 密码核对标志\nBPWDF_NoCheck = '0'  # 不核对\nBPWDF_BlankCheck = '1'  # 明文核对\nBPWDF_EncryptCheck = '2'  # 密文核对\nT['SecuAccType'] = 'char'  # 期货帐号类型\nSAT_AccountID = '1'  # 资金帐号\nSAT_CardID = '2'  # 资金卡号\nSAT_SHStockholderID = '3'  # 上海股东帐号\nSAT_SZStockholderID = '4'  # 深圳股东帐号\nT['TransferStatus'] = 'char'  # 转账交易状态\nTRFS_Normal = '0'  # 正常\nTRFS_Repealed = '1'  # 被冲正\nT['SponsorType'] = 'char'  # 发起方\nSPTYPE_Broker = '0'  # 期商\nSPTYPE_Bank = '1'  # 银行\nT['ReqRspType'] = 'char'  # 请求响应类别\nREQRSP_Request = '0'  # 请求\nREQRSP_Response = '1'  # 响应\nT['FBTUserEventType'] = 'char'  # 银期转帐用户事件类型\nFBTUET_SignIn = '0'  # 签到\nFBTUET_FromBankToFuture = '1'  # 银行转期货\nFBTUET_FromFutureToBank = '2'  # 期货转银行\nFBTUET_OpenAccount = '3'  # 开户\nFBTUET_CancelAccount = '4'  # 销户\nFBTUET_ChangeAccount = '5'  # 变更银行账户\nFBTUET_RepealFromBankToFuture = '6'  # 冲正银行转期货\nFBTUET_RepealFromFutureToBank = '7'  # 冲正期货转银行\nFBTUET_QueryBankAccount = '8'  # 查询银行账户\nFBTUET_QueryFutureAccount = '9'  # 查询期货账户\nFBTUET_SignOut = 'A'  # 签退\nFBTUET_SyncKey = 'B'  # 密钥同步\nFBTUET_Other = 'Z'  # 其他\nT['BankIDByBank'] = 'char[21]'  # 银行自己的编码\nT['BankOperNo'] = 'char[4]'  # 银行操作员号\nT['BankCustNo'] = 'char[21]'  # 银行客户号\nT['DBOPSeqNo'] = 'int'  # 递增的序列号\nT['TableName'] = 'char[61]'  # FBT表名\nT['PKName'] = 'char[201]'  # FBT表操作主键名\nT['PKValue'] = 'char[501]'  # FBT表操作主键值\nT['DBOperation'] = 'char'  # 记录操作类型\nDBOP_Insert = '0'  # 插入\nDBOP_Update = '1'  # 更新\nDBOP_Delete = '2'  # 删除\nT['SyncFlag'] = 'char'  # 同步标记\nSYNF_Yes = '0'  # 已同步\nSYNF_No = '1'  # 未同步\nT['TargetID'] = 'char[4]'  # 同步目标编号\nT['SyncType'] = 'char'  # 同步类型\nSYNT_OneOffSync = '0'  # 一次同步\nSYNT_TimerSync = '1'  # 定时同步\nSYNT_TimerFullSync = '2'  # 定时完全同步\nT['FBETime'] = 'char[7]'  # 各种换汇时间\nT['FBEBankNo'] = 'char[13]'  # 换汇银行行号\nT['FBECertNo'] = 'char[13]'  # 换汇凭证号\nT['ExDirection'] = 'char'  # 换汇方向\nFBEDIR_Settlement = '0'  # 结汇\nFBEDIR_Sale = '1'  # 售汇\nT['FBEBankAccount'] = 'char[33]'  # 换汇银行账户\nT['FBEBankAccountName'] = 'char[61]'  # 换汇银行账户名\nT['FBEAmt'] = 'double'  # 各种换汇金额\nT['FBEBusinessType'] = 'char[3]'  # 换汇业务类型\nT['FBEPostScript'] = 'char[61]'  # 换汇附言\nT['FBERemark'] = 'char[71]'  # 换汇备注\nT['ExRate'] = 'double'  # 换汇汇率\nT['FBEResultFlag'] = 'char'  # 换汇成功标志\nFBERES_Success = '0'  # 成功\nFBERES_InsufficientBalance = '1'  # 账户余额不足\nFBERES_UnknownTrading = '8'  # 交易结果未知\nFBERES_Fail = 'x'  # 失败\nT['FBERtnMsg'] = 'char[61]'  # 换汇返回信息\nT['FBEExtendMsg'] = 'char[61]'  # 换汇扩展信息\nT['FBEBusinessSerial'] = 'char[31]'  # 换汇记账流水号\nT['FBESystemSerial'] = 'char[21]'  # 换汇流水号\nT['FBETotalExCnt'] = 'int'  # 换汇交易总笔数\nT['FBEExchStatus'] = 'char'  # 换汇交易状态\nFBEES_Normal = '0'  # 正常\nFBEES_ReExchange = '1'  # 交易重发\nT['FBEFileFlag'] = 'char'  # 换汇文件标志\nFBEFG_DataPackage = '0'  # 数据包\nFBEFG_File = '1'  # 文件\nT['FBEAlreadyTrade'] = 'char'  # 换汇已交易标志\nFBEAT_NotTrade = '0'  # 未交易\nFBEAT_Trade = '1'  # 已交易\nT['FBEOpenBank'] = 'char[61]'  # 换汇账户开户行\nT['FBEUserEventType'] = 'char'  # 银期换汇用户事件类型\nFBEUET_SignIn = '0'  # 签到\nFBEUET_Exchange = '1'  # 换汇\nFBEUET_ReExchange = '2'  # 换汇重发\nFBEUET_QueryBankAccount = '3'  # 银行账户查询\nFBEUET_QueryExchDetial = '4'  # 换汇明细查询\nFBEUET_QueryExchSummary = '5'  # 换汇汇总查询\nFBEUET_QueryExchRate = '6'  # 换汇汇率查询\nFBEUET_CheckBankAccount = '7'  # 对账文件通知\nFBEUET_SignOut = '8'  # 签退\nFBEUET_Other = 'Z'  # 其他\nT['FBEFileName'] = 'char[21]'  # 换汇相关文件名\nT['FBEBatchSerial'] = 'char[21]'  # 换汇批次号\nT['FBEReqFlag'] = 'char'  # 换汇发送标志\nFBERF_UnProcessed = '0'  # 未处理\nFBERF_WaitSend = '1'  # 等待发送\nFBERF_SendSuccess = '2'  # 发送成功\nFBERF_SendFailed = '3'  # 发送失败\nFBERF_WaitReSend = '4'  # 等待重发\nT['NotifyClass'] = 'char'  # 风险通知类型\nNC_NOERROR = '0'  # 正常\nNC_Warn = '1'  # 警示\nNC_Call = '2'  # 追保\nNC_Force = '3'  # 强平\nNC_CHUANCANG = '4'  # 穿仓\nNC_Exception = '5'  # 异常\nT['RiskNofityInfo'] = 'char[257]'  # 客户风险通知消息\nT['ForceCloseSceneId'] = 'char[24]'  # 强平场景编号\nT['ForceCloseType'] = 'char'  # 强平单类型\nFCT_Manual = '0'  # 手工强平\nFCT_Single = '1'  # 单一投资者辅助强平\nFCT_Group = '2'  # 批量投资者辅助强平\nT['InstrumentIDs'] = 'char[101]'  # 多个产品代码,用+分隔,如cu+zn\nT['RiskNotifyMethod'] = 'char'  # 风险通知途径\nRNM_System = '0'  # 系统通知\nRNM_SMS = '1'  # 短信通知\nRNM_EMail = '2'  # 邮件通知\nRNM_Manual = '3'  # 人工通知\nT['RiskNotifyStatus'] = 'char'  # 风险通知状态\nRNS_NotGen = '0'  # 未生成\nRNS_Generated = '1'  # 已生成未发送\nRNS_SendError = '2'  # 发送失败\nRNS_SendOk = '3'  # 已发送未接收\nRNS_Received = '4'  # 已接收未确认\nRNS_Confirmed = '5'  # 已确认\nT['RiskUserEvent'] = 'char'  # 风控用户操作事件\nRUE_ExportData = '0'  # 导出数据\nT['ParamID'] = 'int'  # 参数代码\nT['ParamName'] = 'char[41]'  # 参数名\nT['ParamValue'] = 'char[41]'  # 参数值\nT['ConditionalOrderSortType'] = 'char'  # 条件单索引条件\nCOST_LastPriceAsc = '0'  # 使用最新价升序\nCOST_LastPriceDesc = '1'  # 使用最新价降序\nCOST_AskPriceAsc = '2'  # 使用卖价升序\nCOST_AskPriceDesc = '3'  # 使用卖价降序\nCOST_BidPriceAsc = '4'  # 使用买价升序\nCOST_BidPriceDesc = '5'  # 使用买价降序\nT['SendType'] = 'char'  # 报送状态\nUOAST_NoSend = '0'  # 未发送\nUOAST_Sended = '1'  # 已发送\nUOAST_Generated = '2'  # 已生成\nUOAST_SendFail = '3'  # 报送失败\nUOAST_Success = '4'  # 接收成功\nUOAST_Fail = '5'  # 接收失败\nUOAST_Cancel = '6'  # 取消报送\nT['ClientIDStatus'] = 'char'  # 交易编码状态\nUOACS_NoApply = '1'  # 未申请\nUOACS_Submited = '2'  # 已提交申请\nUOACS_Sended = '3'  # 已发送申请\nUOACS_Success = '4'  # 完成\nUOACS_Refuse = '5'  # 拒绝\nUOACS_Cancel = '6'  # 已撤销编码\nT['IndustryID'] = 'char[17]'  # 行业编码\nT['QuestionID'] = 'char[5]'  # 特有信息编号\nT['QuestionContent'] = 'char[41]'  # 特有信息说明\nT['OptionID'] = 'char[13]'  # 选项编号\nT['OptionContent'] = 'char[61]'  # 选项说明\nT['QuestionType'] = 'char'  # 特有信息类型\nQT_Radio = '1'  # 单选\nQT_Option = '2'  # 多选\nQT_Blank = '3'  # 填空\nT['ProcessID'] = 'char[33]'  # 业务流水号\nT['SeqNo'] = 'int'  # 流水号\nT['UOAProcessStatus'] = 'char[3]'  # 流程状态\nT['ProcessType'] = 'char[3]'  # 流程功能类型\nT['BusinessType'] = 'char'  # 业务类型\nBT_Request = '1'  # 请求\nBT_Response = '2'  # 应答\nBT_Notice = '3'  # 通知\nT['CfmmcReturnCode'] = 'char'  # 监控中心返回码\nCRC_Success = '0'  # 成功\nCRC_Working = '1'  # 该客户已经有流程在处理中\nCRC_InfoFail = '2'  # 监控中客户资料检查失败\nCRC_IDCardFail = '3'  # 监控中实名制检查失败\nCRC_OtherFail = '4'  # 其他错误\nT['ExReturnCode'] = 'int'  # 交易所返回码\nT['ClientType'] = 'char'  # 客户类型\nCfMMCCT_All = '0'  # 所有\nCfMMCCT_Person = '1'  # 个人\nCfMMCCT_Company = '2'  # 单位\nCfMMCCT_Other = '3'  # 其他\nCfMMCCT_SpecialOrgan = '4'  # 特殊法人\nCfMMCCT_Asset = '5'  # 资管户\nT['ExchangeIDType'] = 'char'  # 交易所编号\nEIDT_SHFE = 'S'  # 上海期货交易所\nEIDT_CZCE = 'Z'  # 郑州商品交易所\nEIDT_DCE = 'D'  # 大连商品交易所\nEIDT_CFFEX = 'J'  # 中国金融期货交易所\nEIDT_INE = 'N'  # 上海国际能源交易中心股份有限公司\nT['ExClientIDType'] = 'char'  # 交易编码类型\nECIDT_Hedge = '1'  # 套保\nECIDT_Arbitrage = '2'  # 套利\nECIDT_Speculation = '3'  # 投机\nT['ClientClassify'] = 'char[11]'  # 客户分类码\nT['UOAOrganType'] = 'char[11]'  # 单位性质\nT['UOACountryCode'] = 'char[11]'  # 国家代码\nT['AreaCode'] = 'char[11]'  # 区号\nT['FuturesID'] = 'char[21]'  # 监控中心为客户分配的代码\nT['CffmcDate'] = 'char[11]'  # 日期\nT['CffmcTime'] = 'char[11]'  # 时间\nT['NocID'] = 'char[21]'  # 组织机构代码\nT['UpdateFlag'] = 'char'  # 更新状态\nUF_NoUpdate = '0'  # 未更新\nUF_Success = '1'  # 更新全部信息成功\nUF_Fail = '2'  # 更新全部信息失败\nUF_TCSuccess = '3'  # 更新交易编码成功\nUF_TCFail = '4'  # 更新交易编码失败\nUF_Cancel = '5'  # 已丢弃\nT['ApplyOperateID'] = 'char'  # 申请动作\nAOID_OpenInvestor = '1'  # 开户\nAOID_ModifyIDCard = '2'  # 修改身份信息\nAOID_ModifyNoIDCard = '3'  # 修改一般信息\nAOID_ApplyTradingCode = '4'  # 申请交易编码\nAOID_CancelTradingCode = '5'  # 撤销交易编码\nAOID_CancelInvestor = '6'  # 销户\nAOID_FreezeAccount = '8'  # 账户休眠\nAOID_ActiveFreezeAccount = '9'  # 激活休眠账户\nT['ApplyStatusID'] = 'char'  # 申请状态\nASID_NoComplete = '1'  # 未补全\nASID_Submited = '2'  # 已提交\nASID_Checked = '3'  # 已审核\nASID_Refused = '4'  # 已拒绝\nASID_Deleted = '5'  # 已删除\nT['SendMethod'] = 'char'  # 发送方式\nUOASM_ByAPI = '1'  # 文件发送\nUOASM_ByFile = '2'  # 电子发送\nT['EventType'] = 'char[33]'  # 业务操作类型\nT['EventMode'] = 'char'  # 操作方法\nEvM_ADD = '1'  # 增加\nEvM_UPDATE = '2'  # 修改\nEvM_DELETE = '3'  # 删除\nEvM_CHECK = '4'  # 复核\nEvM_COPY = '5'  # 复制\nEvM_CANCEL = '6'  # 注销\nEvM_Reverse = '7'  # 冲销\nT['UOAAutoSend'] = 'char'  # 统一开户申请自动发送\nUOAA_ASR = '1'  # 自动发送并接收\nUOAA_ASNR = '2'  # 自动发送，不自动接收\nUOAA_NSAR = '3'  # 不自动发送，自动接收\nUOAA_NSR = '4'  # 不自动发送，也不自动接收\nT['QueryDepth'] = 'int'  # 查询深度\nT['DataCenterID'] = 'int'  # 数据中心代码\nT['FlowID'] = 'char'  # 流程ID\nEvM_InvestorGroupFlow = '1'  # 投资者对应投资者组设置\nEvM_InvestorRate = '2'  # 投资者手续费率设置\nEvM_InvestorCommRateModel = '3'  # 投资者手续费率模板关系设置\nT['CheckLevel'] = 'char'  # 复核级别\nCL_Zero = '0'  # 零级复核\nCL_One = '1'  # 一级复核\nCL_Two = '2'  # 二级复核\nT['CheckNo'] = 'int'  # 操作次数\nT['CheckStatus'] = 'char'  # 复核级别\nCHS_Init = '0'  # 未复核\nCHS_Checking = '1'  # 复核中\nCHS_Checked = '2'  # 已复核\nCHS_Refuse = '3'  # 拒绝\nCHS_Cancel = '4'  # 作废\nT['UsedStatus'] = 'char'  # 生效状态\nCHU_Unused = '0'  # 未生效\nCHU_Used = '1'  # 已生效\nCHU_Fail = '2'  # 生效失败\nT['RateTemplateName'] = 'char[61]'  # 模型名称\nT['PropertyString'] = 'char[2049]'  # 用于查询的投资属性字段\nT['BankAcountOrigin'] = 'char'  # 账户来源\nBAO_ByAccProperty = '0'  # 手工录入\nBAO_ByFBTransfer = '1'  # 银期转账\nT['MonthBillTradeSum'] = 'char'  # 结算单月报成交汇总方式\nMBTS_ByInstrument = '0'  # 同日同合约\nMBTS_ByDayInsPrc = '1'  # 同日同合约同价格\nMBTS_ByDayIns = '2'  # 同合约\nT['FBTTradeCodeEnum'] = 'char[7]'  # 银期交易代码枚举\nFTC_BankLaunchBankToBroker = '102001'  # 银行发起银行转期货\nFTC_BrokerLaunchBankToBroker = '202001'  # 期货发起银行转期货\nFTC_BankLaunchBrokerToBank = '102002'  # 银行发起期货转银行\nFTC_BrokerLaunchBrokerToBank = '202002'  # 期货发起期货转银行\nT['RateTemplateID'] = 'char[9]'  # 模型代码\nT['RiskRate'] = 'char[21]'  # 风险度\nT['Timestamp'] = 'int'  # 时间戳\nT['InvestorIDRuleName'] = 'char[61]'  # 号段规则名称\nT['InvestorIDRuleExpr'] = 'char[513]'  # 号段规则表达式\nT['LastDrift'] = 'int'  # 上次OTP漂移值\nT['LastSuccess'] = 'int'  # 上次OTP成功值\nT['AuthKey'] = 'char[41]'  # 令牌密钥\nT['SerialNumber'] = 'char[17]'  # 序列号\nT['OTPType'] = 'char'  # 动态令牌类型\nOTP_NONE = '0'  # 无动态令牌\nOTP_TOTP = '1'  # 时间令牌\nT['OTPVendorsID'] = 'char[2]'  # 动态令牌提供商\nT['OTPVendorsName'] = 'char[61]'  # 动态令牌提供商名称\nT['OTPStatus'] = 'char'  # 动态令牌状态\nOTPS_Unused = '0'  # 未使用\nOTPS_Used = '1'  # 已使用\nOTPS_Disuse = '2'  # 注销\nT['BrokerUserType'] = 'char'  # 经济公司用户类型\nBUT_Investor = '1'  # 投资者\nBUT_BrokerUser = '2'  # 操作员\nT['FutureType'] = 'char'  # 期货类型\nFUTT_Commodity = '1'  # 商品期货\nFUTT_Financial = '2'  # 金融期货\nT['FundEventType'] = 'char'  # 资金管理操作类型\nFET_Restriction = '0'  # 转账限额\nFET_TodayRestriction = '1'  # 当日转账限额\nFET_Transfer = '2'  # 期商流水\nFET_Credit = '3'  # 资金冻结\nFET_InvestorWithdrawAlm = '4'  # 投资者可提资金比例\nFET_BankRestriction = '5'  # 单个银行帐户转账限额\nFET_Accountregister = '6'  # 银期签约账户\nFET_ExchangeFundIO = '7'  # 交易所出入金\nFET_InvestorFundIO = '8'  # 投资者出入金\nT['AccountSourceType'] = 'char'  # 资金账户来源\nAST_FBTransfer = '0'  # 银期同步\nAST_ManualEntry = '1'  # 手工录入\nT['CodeSourceType'] = 'char'  # 交易编码来源\nCST_UnifyAccount = '0'  # 统一开户(已规范)\nCST_ManualEntry = '1'  # 手工录入(未规范)\nT['UserRange'] = 'char'  # 操作员范围\nUR_All = '0'  # 所有\nUR_Single = '1'  # 单一操作员\nT['TimeSpan'] = 'char[9]'  # 时间跨度\nT['ImportSequenceID'] = 'char[17]'  # 动态令牌导入批次编号\nT['ByGroup'] = 'char'  # 交易统计表按客户统计方式\nBG_Investor = '2'  # 按投资者统计\nBG_Group = '1'  # 按类统计\nT['TradeSumStatMode'] = 'char'  # 交易统计表按范围统计方式\nTSSM_Instrument = '1'  # 按合约统计\nTSSM_Product = '2'  # 按产品统计\nTSSM_Exchange = '3'  # 按交易所统计\nT['ComType'] = 'int'  # 组合成交类型\nT['UserProductID'] = 'char[33]'  # 产品标识\nT['UserProductName'] = 'char[65]'  # 产品名称\nT['UserProductMemo'] = 'char[129]'  # 产品说明\nT['CSRCCancelFlag'] = 'char[2]'  # 新增或变更标志\nT['CSRCDate'] = 'char[11]'  # 日期\nT['CSRCInvestorName'] = 'char[201]'  # 客户名称\nT['CSRCOpenInvestorName'] = 'char[101]'  # 客户名称\nT['CSRCInvestorID'] = 'char[13]'  # 客户代码\nT['CSRCIdentifiedCardNo'] = 'char[51]'  # 证件号码\nT['CSRCClientID'] = 'char[11]'  # 交易编码\nT['CSRCBankFlag'] = 'char[3]'  # 银行标识\nT['CSRCBankAccount'] = 'char[23]'  # 银行账户\nT['CSRCOpenName'] = 'char[401]'  # 开户人\nT['CSRCMemo'] = 'char[101]'  # 说明\nT['CSRCTime'] = 'char[11]'  # 时间\nT['CSRCTradeID'] = 'char[21]'  # 成交流水号\nT['CSRCExchangeInstID'] = 'char[31]'  # 合约代码\nT['CSRCMortgageName'] = 'char[7]'  # 质押品名称\nT['CSRCReason'] = 'char[3]'  # 事由\nT['IsSettlement'] = 'char[2]'  # 是否为非结算会员\nT['CSRCMoney'] = 'double'  # 资金\nT['CSRCPrice'] = 'double'  # 价格\nT['CSRCOptionsType'] = 'char[2]'  # 期权类型\nT['CSRCStrikePrice'] = 'double'  # 执行价\nT['CSRCTargetProductID'] = 'char[3]'  # 标的品种\nT['CSRCTargetInstrID'] = 'char[31]'  # 标的合约\nT['CommModelName'] = 'char[161]'  # 手续费率模板名称\nT['CommModelMemo'] = 'char[1025]'  # 手续费率模板备注\nT['ExprSetMode'] = 'char'  # 日期表达式设置类型\nESM_Relative = '1'  # 相对已有规则设置\nESM_Typical = '2'  # 典型设置\nT['RateInvestorRange'] = 'char'  # 投资者范围\nRIR_All = '1'  # 公司标准\nRIR_Model = '2'  # 模板\nRIR_Single = '3'  # 单一投资者\nT['AgentBrokerID'] = 'char[13]'  # 代理经纪公司代码\nT['DRIdentityID'] = 'int'  # 交易中心代码\nT['DRIdentityName'] = 'char[65]'  # 交易中心名称\nT['DBLinkID'] = 'char[31]'  # DBLink标识号\nT['SyncDataStatus'] = 'char'  # 主次用系统数据同步状态\nSDS_Initialize = '0'  # 未同步\nSDS_Settlementing = '1'  # 同步中\nSDS_Settlemented = '2'  # 已同步\nT['TradeSource'] = 'char'  # 成交来源\nTSRC_NORMAL = '0'  # 来自交易所普通回报\nTSRC_QUERY = '1'  # 来自查询\nT['FlexStatMode'] = 'char'  # 产品合约统计方式\nFSM_Product = '1'  # 产品统计\nFSM_Exchange = '2'  # 交易所统计\nFSM_All = '3'  # 统计所有\nT['ByInvestorRange'] = 'char'  # 投资者范围统计方式\nBIR_Property = '1'  # 属性统计\nBIR_All = '2'  # 统计所有\nT['SRiskRate'] = 'char[21]'  # 风险度\nT['SequenceNo12'] = 'int'  # 序号\nT['PropertyInvestorRange'] = 'char'  # 投资者范围\nPIR_All = '1'  # 所有\nPIR_Property = '2'  # 投资者属性\nPIR_Single = '3'  # 单一投资者\nT['FileStatus'] = 'char'  # 文件状态\nFIS_NoCreate = '0'  # 未生成\nFIS_Created = '1'  # 已生成\nFIS_Failed = '2'  # 生成失败\nT['FileGenStyle'] = 'char'  # 文件生成方式\nFGS_FileTransmit = '0'  # 下发\nFGS_FileGen = '1'  # 生成\nT['SysOperMode'] = 'char'  # 系统日志操作方法\nSoM_Add = '1'  # 增加\nSoM_Update = '2'  # 修改\nSoM_Delete = '3'  # 删除\nSoM_Copy = '4'  # 复制\nSoM_AcTive = '5'  # 激活\nSoM_CanCel = '6'  # 注销\nSoM_ReSet = '7'  # 重置\nT['SysOperType'] = 'char'  # 系统日志操作类型\nSoT_UpdatePassword = '0'  # 修改操作员密码\nSoT_UserDepartment = '1'  # 操作员组织架构关系\nSoT_RoleManager = '2'  # 角色管理\nSoT_RoleFunction = '3'  # 角色功能设置\nSoT_BaseParam = '4'  # 基础参数设置\nSoT_SetUserID = '5'  # 设置操作员\nSoT_SetUserRole = '6'  # 用户角色设置\nSoT_UserIpRestriction = '7'  # 用户IP限制\nSoT_DepartmentManager = '8'  # 组织架构管理\nSoT_DepartmentCopy = '9'  # 组织架构向查询分类复制\nSoT_Tradingcode = 'A'  # 交易编码管理\nSoT_InvestorStatus = 'B'  # 投资者状态维护\nSoT_InvestorAuthority = 'C'  # 投资者权限管理\nSoT_PropertySet = 'D'  # 属性设置\nSoT_ReSetInvestorPasswd = 'E'  # 重置投资者密码\nSoT_InvestorPersonalityInfo = 'F'  # 投资者个性信息维护\nT['CSRCDataQueyType'] = 'char'  # 上报数据查询类型\nCSRCQ_Current = '0'  # 查询当前交易日报送的数据\nCSRCQ_History = '1'  # 查询历史报送的代理经纪公司的数据\nT['FreezeStatus'] = 'char'  # 休眠状态\nFRS_Normal = '1'  # 活跃\nFRS_Freeze = '0'  # 休眠\nT['StandardStatus'] = 'char'  # 规范状态\nSTST_Standard = '0'  # 已规范\nSTST_NonStandard = '1'  # 未规范\nT['CSRCFreezeStatus'] = 'char[2]'  # 休眠状态\nT['RightParamType'] = 'char'  # 配置类型\nRPT_Freeze = '1'  # 休眠户\nRPT_FreezeActive = '2'  # 激活休眠户\nRPT_OpenLimit = '3'  # 开仓权限限制\nRPT_RelieveOpenLimit = '4'  # 解除开仓权限限制\nT['RightTemplateID'] = 'char[9]'  # 模板代码\nT['RightTemplateName'] = 'char[61]'  # 模板名称\nT['DataStatus'] = 'char'  # 反洗钱审核表数据状态\nAMLDS_Normal = '0'  # 正常\nAMLDS_Deleted = '1'  # 已删除\nT['AMLCheckStatus'] = 'char'  # 审核状态\nAMLCHS_Init = '0'  # 未复核\nAMLCHS_Checking = '1'  # 复核中\nAMLCHS_Checked = '2'  # 已复核\nAMLCHS_RefuseReport = '3'  # 拒绝上报\nT['AmlDateType'] = 'char'  # 日期类型\nAMLDT_DrawDay = '0'  # 检查日期\nAMLDT_TouchDay = '1'  # 发生日期\nT['AmlCheckLevel'] = 'char'  # 审核级别\nAMLCL_CheckLevel0 = '0'  # 零级审核\nAMLCL_CheckLevel1 = '1'  # 一级审核\nAMLCL_CheckLevel2 = '2'  # 二级审核\nAMLCL_CheckLevel3 = '3'  # 三级审核\nT['AmlCheckFlow'] = 'char[2]'  # 反洗钱数据抽取审核流程\nT['DataType'] = 'char[129]'  # 数据类型\nT['ExportFileType'] = 'char'  # 导出文件类型\nEFT_CSV = '0'  # CSV\nEFT_EXCEL = '1'  # Excel\nEFT_DBF = '2'  # DBF\nT['SettleManagerType'] = 'char'  # 结算配置类型\nSMT_Before = '1'  # 结算前准备\nSMT_Settlement = '2'  # 结算\nSMT_After = '3'  # 结算后核对\nSMT_Settlemented = '4'  # 结算后处理\nT['SettleManagerID'] = 'char[33]'  # 结算配置代码\nT['SettleManagerName'] = 'char[129]'  # 结算配置名称\nT['SettleManagerLevel'] = 'char'  # 结算配置等级\nSML_Must = '1'  # 必要\nSML_Alarm = '2'  # 警告\nSML_Prompt = '3'  # 提示\nSML_Ignore = '4'  # 不检查\nT['SettleManagerGroup'] = 'char'  # 模块分组\nSMG_Exhcange = '1'  # 交易所核对\nSMG_ASP = '2'  # 内部核对\nSMG_CSRC = '3'  # 上报数据核对\nT['CheckResultMemo'] = 'char[1025]'  # 核对结果说明\nT['FunctionUrl'] = 'char[1025]'  # 功能链接\nT['AuthInfo'] = 'char[129]'  # 客户端认证信息\nT['AuthCode'] = 'char[17]'  # 客户端认证码\nT['LimitUseType'] = 'char'  # 保值额度使用类型\nLUT_Repeatable = '1'  # 可重复使用\nLUT_Unrepeatable = '2'  # 不可重复使用\nT['DataResource'] = 'char'  # 数据来源\nDAR_Settle = '1'  # 本系统\nDAR_Exchange = '2'  # 交易所\nDAR_CSRC = '3'  # 报送数据\nT['MarginType'] = 'char'  # 保证金类型\nMGT_ExchMarginRate = '0'  # 交易所保证金率\nMGT_InstrMarginRate = '1'  # 投资者保证金率\nMGT_InstrMarginRateTrade = '2'  # 投资者交易保证金率\nT['ActiveType'] = 'char'  # 生效类型\nACT_Intraday = '1'  # 仅当日生效\nACT_Long = '2'  # 长期生效\nT['MarginRateType'] = 'char'  # 冲突保证金率类型\nMRT_Exchange = '1'  # 交易所保证金率\nMRT_Investor = '2'  # 投资者保证金率\nMRT_InvestorTrade = '3'  # 投资者交易保证金率\nT['BackUpStatus'] = 'char'  # 备份数据状态\nBUS_UnBak = '0'  # 未生成备份数据\nBUS_BakUp = '1'  # 备份数据生成中\nBUS_BakUped = '2'  # 已生成备份数据\nBUS_BakFail = '3'  # 备份数据失败\nT['InitSettlement'] = 'char'  # 结算初始化状态\nSIS_UnInitialize = '0'  # 结算初始化未开始\nSIS_Initialize = '1'  # 结算初始化中\nSIS_Initialized = '2'  # 结算初始化完成\nT['ReportStatus'] = 'char'  # 报表数据生成状态\nSRS_NoCreate = '0'  # 未生成报表数据\nSRS_Create = '1'  # 报表数据生成中\nSRS_Created = '2'  # 已生成报表数据\nSRS_CreateFail = '3'  # 生成报表数据失败\nT['SaveStatus'] = 'char'  # 数据归档状态\nSSS_UnSaveData = '0'  # 归档未完成\nSSS_SaveDatad = '1'  # 归档完成\nT['SettArchiveStatus'] = 'char'  # 结算确认数据归档状态\nSAS_UnArchived = '0'  # 未归档数据\nSAS_Archiving = '1'  # 数据归档中\nSAS_Archived = '2'  # 已归档数据\nSAS_ArchiveFail = '3'  # 归档数据失败\nT['CTPType'] = 'char'  # CTP交易系统类型\nCTPT_Unkown = '0'  # 未知类型\nCTPT_MainCenter = '1'  # 主中心\nCTPT_BackUp = '2'  # 备中心\nT['ToolID'] = 'char[9]'  # 工具代码\nT['ToolName'] = 'char[81]'  # 工具名称\nT['CloseDealType'] = 'char'  # 平仓处理类型\nCDT_Normal = '0'  # 正常\nCDT_SpecFirst = '1'  # 投机平仓优先\nT['MortgageFundUseRange'] = 'char'  # 货币质押资金可用范围\nMFUR_None = '0'  # 不能使用\nMFUR_Margin = '1'  # 用于保证金\nMFUR_All = '2'  # 用于手续费、盈亏、保证金\nT['CurrencyUnit'] = 'double'  # 币种单位数量\nT['ExchangeRate'] = 'double'  # 汇率\nT['SpecProductType'] = 'char'  # 特殊产品类型\nSPT_CzceHedge = '1'  # 郑商所套保产品\nSPT_IneForeignCurrency = '2'  # 货币质押产品\nSPT_DceOpenClose = '3'  # 大连短线开平仓产品\nT['FundMortgageType'] = 'char'  # 货币质押类型\nFMT_Mortgage = '1'  # 质押\nFMT_Redemption = '2'  # 解质\nT['AccountSettlementParamID'] = 'char'  # 投资者账户结算参数代码\nASPI_BaseMargin = '1'  # 基础保证金\nASPI_LowestInterest = '2'  # 最低权益标准\nT['CurrencyName'] = 'char[31]'  # 币种名称\nT['CurrencySign'] = 'char[4]'  # 币种符号\nT['FundMortDirection'] = 'char'  # 货币质押方向\nFMD_In = '1'  # 货币质入\nFMD_Out = '2'  # 货币质出\nT['BusinessClass'] = 'char'  # 换汇类别\nBT_Profit = '0'  # 盈利\nBT_Loss = '1'  # 亏损\nBT_Other = 'Z'  # 其他\nT['SwapSourceType'] = 'char'  # 换汇数据来源\nSST_Manual = '0'  # 手工\nSST_Automatic = '1'  # 自动生成\nT['CurrExDirection'] = 'char'  # 换汇类型\nCED_Settlement = '0'  # 结汇\nCED_Sale = '1'  # 售汇\nT['CurrencySwapStatus'] = 'char'  # 申请状态\nCSS_Entry = '1'  # 已录入\nCSS_Approve = '2'  # 已审核\nCSS_Refuse = '3'  # 已拒绝\nCSS_Revoke = '4'  # 已撤销\nCSS_Send = '5'  # 已发送\nCSS_Success = '6'  # 换汇成功\nCSS_Failure = '7'  # 换汇失败\nT['CurrExchCertNo'] = 'char[13]'  # 凭证号\nT['BatchSerialNo'] = 'char[21]'  # 批次号\nT['ReqFlag'] = 'char'  # 换汇发送标志\nREQF_NoSend = '0'  # 未发送\nREQF_SendSuccess = '1'  # 发送成功\nREQF_SendFailed = '2'  # 发送失败\nREQF_WaitReSend = '3'  # 等待重发\nT['ResFlag'] = 'char'  # 换汇返回成功标志\nRESF_Success = '0'  # 成功\nRESF_InsuffiCient = '1'  # 账户余额不足\nRESF_UnKnown = '8'  # 交易结果未知\nT['PageControl'] = 'char[2]'  # 换汇页面控制\nT['RecordCount'] = 'int'  # 记录数\nT['CurrencySwapMemo'] = 'char[101]'  # 换汇需确认信息\nT['ExStatus'] = 'char'  # 修改状态\nEXS_Before = '0'  # 修改前\nEXS_After = '1'  # 修改后\nT['ClientRegion'] = 'char'  # 开户客户地域\nCR_Domestic = '1'  # 国内客户\nCR_GMT = '2'  # 港澳台客户\nCR_Foreign = '3'  # 国外客户\nT['WorkPlace'] = 'char[101]'  # 工作单位\nT['BusinessPeriod'] = 'char[21]'  # 经营期限\nT['WebSite'] = 'char[101]'  # 网址\nT['UOAIdCardType'] = 'char[3]'  # 统一开户证件类型\nT['ClientMode'] = 'char[3]'  # 开户模式\nT['InvestorFullName'] = 'char[101]'  # 投资者全称\nT['UOABrokerID'] = 'char[11]'  # 境外中介机构ID\nT['UOAZipCode'] = 'char[11]'  # 邮政编码\nT['UOAEMail'] = 'char[101]'  # 电子邮箱\nT['OldCity'] = 'char[41]'  # 城市\nT['CorporateIdentifiedCardNo'] = 'char[101]'  # 法人代表证件号码\nT['HasBoard'] = 'char'  # 是否有董事会\nHB_No = '0'  # 没有\nHB_Yes = '1'  # 有\nT['StartMode'] = 'char'  # 启动模式\nSM_Normal = '1'  # 正常\nSM_Emerge = '2'  # 应急\nSM_Restore = '3'  # 恢复\nT['TemplateType'] = 'char'  # 模型类型\nTPT_Full = '1'  # 全量\nTPT_Increment = '2'  # 增量\nTPT_BackUp = '3'  # 备份\nT['LoginMode'] = 'char'  # 登录模式\nLM_Trade = '0'  # 交易\nLM_Transfer = '1'  # 转账\nT['PromptType'] = 'char'  # 日历提示类型\nCPT_Instrument = '1'  # 合约上下市\nCPT_Margin = '2'  # 保证金分段生效\nT['LedgerManageID'] = 'char[51]'  # 分户管理资产编码\nT['InvestVariety'] = 'char[101]'  # 投资品种\nT['BankAccountType'] = 'char[2]'  # 账户类别\nT['LedgerManageBank'] = 'char[101]'  # 开户银行\nT['CffexDepartmentName'] = 'char[101]'  # 开户营业部\nT['CffexDepartmentCode'] = 'char[9]'  # 营业部代码\nT['HasTrustee'] = 'char'  # 是否有托管人\nHT_Yes = '1'  # 有\nHT_No = '0'  # 没有\nT['CSRCMemo1'] = 'char[41]'  # 说明\nT['AssetmgrCFullName'] = 'char[101]'  # 代理资产管理业务的期货公司全称\nT['AssetmgrApprovalNO'] = 'char[51]'  # 资产管理业务批文号\nT['AssetmgrMgrName'] = 'char[401]'  # 资产管理业务负责人姓名\nT['AmType'] = 'char'  # 机构类型\nAMT_Bank = '1'  # 银行\nAMT_Securities = '2'  # 证券公司\nAMT_Fund = '3'  # 基金公司\nAMT_Insurance = '4'  # 保险公司\nAMT_Trust = '5'  # 信托公司\nAMT_Other = '9'  # 其他\nT['CSRCAmType'] = 'char[5]'  # 机构类型\nT['CSRCFundIOType'] = 'char'  # 出入金类型\nCFIOT_FundIO = '0'  # 出入金\nCFIOT_SwapCurrency = '1'  # 银期换汇\nT['CusAccountType'] = 'char'  # 结算账户类型\nCAT_Futures = '1'  # 期货结算账户\nCAT_AssetmgrFuture = '2'  # 纯期货资管业务下的资管结算账户\nCAT_AssetmgrTrustee = '3'  # 综合类资管业务下的期货资管托管账户\nCAT_AssetmgrTransfer = '4'  # 综合类资管业务下的资金中转账户\nT['CSRCNational'] = 'char[4]'  # 国籍\nT['CSRCSecAgentID'] = 'char[11]'  # 二级代理ID\nT['LanguageType'] = 'char'  # 通知语言类型\nLT_Chinese = '1'  # 中文\nLT_English = '2'  # 英文\nT['AmAccount'] = 'char[23]'  # 投资账户\nT['AssetmgrClientType'] = 'char'  # 资产管理客户类型\nAMCT_Person = '1'  # 个人资管客户\nAMCT_Organ = '2'  # 单位资管客户\nAMCT_SpecialOrgan = '4'  # 特殊单位资管客户\nT['AssetmgrType'] = 'char'  # 投资类型\nASST_Futures = '3'  # 期货类\nASST_SpecialOrgan = '4'  # 综合类\nT['UOM'] = 'char[11]'  # 计量单位\nT['SHFEInstLifePhase'] = 'char[3]'  # 上期所合约生命周期状态\nT['SHFEProductClass'] = 'char[11]'  # 产品类型\nT['PriceDecimal'] = 'char[2]'  # 价格小数位\nT['InTheMoneyFlag'] = 'char[2]'  # 平值期权标志\nT['CheckInstrType'] = 'char'  # 合约比较类型\nCIT_HasExch = '0'  # 合约交易所不存在\nCIT_HasATP = '1'  # 合约本系统不存在\nCIT_HasDiff = '2'  # 合约比较不一致\nT['DeliveryType'] = 'char'  # 交割类型\nDT_HandDeliv = '1'  # 手工交割\nDT_PersonDeliv = '2'  # 到期交割\nT['BigMoney'] = 'double'  # 资金\nT['MaxMarginSideAlgorithm'] = 'char'  # 大额单边保证金算法\nMMSA_NO = '0'  # 不使用大额单边保证金算法\nMMSA_YES = '1'  # 使用大额单边保证金算法\nT['DAClientType'] = 'char'  # 资产管理客户类型\nCACT_Person = '0'  # 自然人\nCACT_Company = '1'  # 法人\nCACT_Other = '2'  # 其他\nT['CombinInstrID'] = 'char[61]'  # 套利合约代码\nT['CombinSettlePrice'] = 'char[61]'  # 各腿结算价\nT['DCEPriority'] = 'int'  # 优先级\nT['TradeGroupID'] = 'int'  # 成交组号\nT['IsCheckPrepa'] = 'int'  # 是否校验开户可用资金\nT['UOAAssetmgrType'] = 'char'  # 投资类型\nUOAAT_Futures = '1'  # 期货类\nUOAAT_SpecialOrgan = '2'  # 综合类\nT['DirectionEn'] = 'char'  # 买卖方向\nDEN_Buy = '0'  # Buy\nDEN_Sell = '1'  # Sell\nT['OffsetFlagEn'] = 'char'  # 开平标志\nOFEN_Open = '0'  # Position Opening\nOFEN_Close = '1'  # Position Close\nOFEN_ForceClose = '2'  # Forced Liquidation\nOFEN_CloseToday = '3'  # Close Today\nOFEN_CloseYesterday = '4'  # Close Prev.\nOFEN_ForceOff = '5'  # Forced Reduction\nOFEN_LocalForceClose = '6'  # Local Forced Liquidation\nT['HedgeFlagEn'] = 'char'  # 投机套保标志\nHFEN_Speculation = '1'  # Speculation\nHFEN_Arbitrage = '2'  # Arbitrage\nHFEN_Hedge = '3'  # Hedge\nT['FundIOTypeEn'] = 'char'  # 出入金类型\nFIOTEN_FundIO = '1'  # Deposit/Withdrawal\nFIOTEN_Transfer = '2'  # Bank-Futures Transfer\nFIOTEN_SwapCurrency = '3'  # Bank-Futures FX Exchange\nT['FundTypeEn'] = 'char'  # 资金类型\nFTEN_Deposite = '1'  # Bank Deposit\nFTEN_ItemFund = '2'  # Payment/Fee\nFTEN_Company = '3'  # Brokerage Adj\nFTEN_InnerTransfer = '4'  # Internal Transfer\nT['FundDirectionEn'] = 'char'  # 出入金方向\nFDEN_In = '1'  # Deposit\nFDEN_Out = '2'  # Withdrawal\nT['FundMortDirectionEn'] = 'char'  # 货币质押方向\nFMDEN_In = '1'  # Pledge\nFMDEN_Out = '2'  # Redemption\nT['SwapBusinessType'] = 'char[3]'  # 换汇业务种类\nT['OptionsType'] = 'char'  # 期权类型\nCP_CallOptions = '1'  # 看涨\nCP_PutOptions = '2'  # 看跌\nT['StrikeMode'] = 'char'  # 执行方式\nSTM_Continental = '0'  # 欧式\nSTM_American = '1'  # 美式\nSTM_Bermuda = '2'  # 百慕大\nT['StrikeType'] = 'char'  # 执行类型\nSTT_Hedge = '0'  # 自身对冲\nSTT_Match = '1'  # 匹配执行\nT['ApplyType'] = 'char'  # 中金所期权放弃执行申请类型\nAPPT_NotStrikeNum = '4'  # 不执行数量\nT['GiveUpDataSource'] = 'char'  # 放弃执行申请数据来源\nGUDS_Gen = '0'  # 系统生成\nGUDS_Hand = '1'  # 手工添加\nT['ExecOrderSysID'] = 'char[21]'  # 执行宣告系统编号\nT['ExecResult'] = 'char'  # 执行结果\nOER_NoExec = 'n'  # 没有执行\nOER_Canceled = 'c'  # 已经取消\nOER_OK = '0'  # 执行成功\nOER_NoPosition = '1'  # 期权持仓不够\nOER_NoDeposit = '2'  # 资金不够\nOER_NoParticipant = '3'  # 会员不存在\nOER_NoClient = '4'  # 客户不存在\nOER_NoInstrument = '6'  # 合约不存在\nOER_NoRight = '7'  # 没有执行权限\nOER_InvalidVolume = '8'  # 不合理的数量\nOER_NoEnoughHistoryTrade = '9'  # 没有足够的历史成交\nOER_Unknown = 'a'  # 未知\nT['StrikeSequence'] = 'int'  # 执行序号\nT['StrikeTime'] = 'char[13]'  # 执行时间\nT['CombinationType'] = 'char'  # 组合类型\nCOMBT_Future = '0'  # 期货组合\nCOMBT_BUL = '1'  # 垂直价差BUL\nCOMBT_BER = '2'  # 垂直价差BER\nCOMBT_STD = '3'  # 跨式组合\nCOMBT_STG = '4'  # 宽跨式组合\nCOMBT_PRT = '5'  # 备兑组合\nCOMBT_CLD = '6'  # 时间价差组合\nT['OptionRoyaltyPriceType'] = 'char'  # 期权权利金价格类型\nORPT_PreSettlementPrice = '1'  # 昨结算价\nORPT_OpenPrice = '4'  # 开仓价\nT['BalanceAlgorithm'] = 'char'  # 权益算法\nBLAG_Default = '1'  # 不计算期权市值盈亏\nBLAG_IncludeOptValLost = '2'  # 计算期权市值亏损\nT['ActionType'] = 'char'  # 执行类型\nACTP_Exec = '1'  # 执行\nACTP_Abandon = '2'  # 放弃\nT['ForQuoteStatus'] = 'char'  # 询价状态\nFQST_Submitted = 'a'  # 已经提交\nFQST_Accepted = 'b'  # 已经接受\nFQST_Rejected = 'c'  # 已经被拒绝\nT['ValueMethod'] = 'char'  # 取值方式\nVM_Absolute = '0'  # 按绝对值\nVM_Ratio = '1'  # 按比率\nT['ExecOrderPositionFlag'] = 'char'  # 期权行权后是否保留期货头寸的标记\nEOPF_Reserve = '0'  # 保留\nEOPF_UnReserve = '1'  # 不保留\nT['ExecOrderCloseFlag'] = 'char'  # 期权行权后生成的头寸是否自动平仓\nEOCF_AutoClose = '0'  # 自动平仓\nEOCF_NotToClose = '1'  # 免于自动平仓\nT['ProductType'] = 'char'  # 产品类型\nPTE_Futures = '1'  # 期货\nPTE_Options = '2'  # 期权\nT['CZCEUploadFileName'] = 'char'  # 郑商所结算文件名\nCUFN_CUFN_O = 'O'  # ^\\d{8}_zz_\\d{4}\nCUFN_CUFN_T = 'T'  # ^\\d{8}成交表\nCUFN_CUFN_P = 'P'  # ^\\d{8}单腿持仓表new\nCUFN_CUFN_N = 'N'  # ^\\d{8}非平仓了结表\nCUFN_CUFN_L = 'L'  # ^\\d{8}平仓表\nCUFN_CUFN_F = 'F'  # ^\\d{8}资金表\nCUFN_CUFN_C = 'C'  # ^\\d{8}组合持仓表\nCUFN_CUFN_M = 'M'  # ^\\d{8}保证金参数表\nT['DCEUploadFileName'] = 'char'  # 大商所结算文件名\nDUFN_DUFN_O = 'O'  # ^\\d{8}_dl_\\d{3}\nDUFN_DUFN_T = 'T'  # ^\\d{8}_成交表\nDUFN_DUFN_P = 'P'  # ^\\d{8}_持仓表\nDUFN_DUFN_F = 'F'  # ^\\d{8}_资金结算表\nDUFN_DUFN_C = 'C'  # ^\\d{8}_优惠组合持仓明细表\nDUFN_DUFN_D = 'D'  # ^\\d{8}_持仓明细表\nDUFN_DUFN_M = 'M'  # ^\\d{8}_保证金参数表\nDUFN_DUFN_S = 'S'  # ^\\d{8}_期权执行表\nT['SHFEUploadFileName'] = 'char'  # 上期所结算文件名\nSUFN_SUFN_O = 'O'  # ^\\d{4}_\\d{8}_\\d{8}_DailyFundChg\nSUFN_SUFN_T = 'T'  # ^\\d{4}_\\d{8}_\\d{8}_Trade\nSUFN_SUFN_P = 'P'  # ^\\d{4}_\\d{8}_\\d{8}_SettlementDetail\nSUFN_SUFN_F = 'F'  # ^\\d{4}_\\d{8}_\\d{8}_Capital\nT['CFFEXUploadFileName'] = 'char'  # 中金所结算文件名\nCFUFN_SUFN_T = 'T'  # ^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_Trade\nCFUFN_SUFN_P = 'P'  # ^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_SettlementDetail\nCFUFN_SUFN_F = 'F'  # ^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_Capital\nCFUFN_SUFN_S = 'S'  # ^\\d{4}_SG\\d{1}_\\d{8}_\\d{1}_OptionExec\nT['CombDirection'] = 'char'  # 组合指令方向\nCMDR_Comb = '0'  # 申请组合\nCMDR_UnComb = '1'  # 申请拆分\n\n\nerror = {\n    'NONE': 0, 0: 'CTP:正确', 'INVALID_DATA_SYNC_STATUS': 1, 1: 'CTP:不在已同步状态', 'INCONSISTENT_INFORMATION': 2,\n    2: 'CTP:会话信息不一致', 'INVALID_LOGIN': 3, 3: 'CTP:不合法的登录', 'USER_NOT_ACTIVE': 4, 4: 'CTP:用户不活跃',\n    'DUPLICATE_LOGIN': 5, 5: 'CTP:重复的登录', 'NOT_LOGIN_YET': 6, 6: 'CTP:还没有登录', 'NOT_INITED': 7, 7: 'CTP:还没有初始化',\n    'FRONT_NOT_ACTIVE': 8, 8: 'CTP:前置不活跃', 'NO_PRIVILEGE': 9, 9: 'CTP:无此权限', 'CHANGE_OTHER_PASSWORD': 10,\n    10: 'CTP:修改别人的口令', 'USER_NOT_FOUND': 11, 11: 'CTP:找不到该用户', 'BROKER_NOT_FOUND': 12, 12: 'CTP:找不到该经纪公司',\n    'INVESTOR_NOT_FOUND': 13, 13: 'CTP:找不到投资者', 'OLD_PASSWORD_MISMATCH': 14, 14: 'CTP:原口令不匹配', 'BAD_FIELD': 15,\n    15: 'CTP:报单字段有误', 'INSTRUMENT_NOT_FOUND': 16, 16: 'CTP:找不到合约', 'INSTRUMENT_NOT_TRADING': 17, 17: 'CTP:合约不能交易',\n    'NOT_EXCHANGE_PARTICIPANT': 18, 18: 'CTP:经纪公司不是交易所的会员', 'INVESTOR_NOT_ACTIVE': 19, 19: 'CTP:投资者不活跃',\n    'NOT_EXCHANGE_CLIENT': 20, 20: 'CTP:投资者未在交易所开户', 'NO_VALID_TRADER_AVAILABLE': 21, 21: 'CTP:该交易席位未连接到交易所',\n    'DUPLICATE_ORDER_REF': 22, 22: 'CTP:报单错误：不允许重复报单', 'BAD_ORDER_ACTION_FIELD': 23, 23: 'CTP:错误的报单操作字段',\n    'DUPLICATE_ORDER_ACTION_REF': 24, 24: 'CTP:撤单已报送，不允许重复撤单', 'ORDER_NOT_FOUND': 25, 25: 'CTP:撤单找不到相应报单',\n    'INSUITABLE_ORDER_STATUS': 26, 26: 'CTP:报单已全成交或已撤销，不能再撤', 'UNSUPPORTED_FUNCTION': 27, 27: 'CTP:不支持的功能',\n    'NO_TRADING_RIGHT': 28, 28: 'CTP:没有报单交易权限', 'CLOSE_ONLY': 29, 29: 'CTP:只能平仓', 'OVER_CLOSE_POSITION': 30,\n    30: 'CTP:平仓量超过持仓量', 'INSUFFICIENT_MONEY': 31, 31: 'CTP:资金不足', 'DUPLICATE_PK': 32, 32: 'CTP:主键重复',\n    'CANNOT_FIND_PK': 33, 33: 'CTP:找不到主键', 'CAN_NOT_INACTIVE_BROKER': 34, 34: 'CTP:设置经纪公司不活跃状态失败',\n    'BROKER_SYNCHRONIZING': 35, 35: 'CTP:经纪公司正在同步', 'BROKER_SYNCHRONIZED': 36, 36: 'CTP:经纪公司已同步', 'SHORT_SELL': 37,\n    37: 'CTP:现货交易不能卖空', 'INVALID_SETTLEMENT_REF': 38, 38: 'CTP:不合法的结算引用', 'CFFEX_NETWORK_ERROR': 39,\n    39: 'CTP:交易所网络连接失败', 'CFFEX_OVER_REQUEST': 40, 40: 'CTP:交易所未处理请求超过许可数', 'CFFEX_OVER_REQUEST_PER_SECOND': 41,\n    41: 'CTP:交易所每秒发送请求数超过许可数', 'SETTLEMENT_INFO_NOT_CONFIRMED': 42, 42: 'CTP:结算结果未确认', 'DEPOSIT_NOT_FOUND': 43,\n    43: 'CTP:没有对应的入金记录', 'EXCHANG_TRADING': 44, 44: 'CTP:交易所已经进入连续交易状态', 'PARKEDORDER_NOT_FOUND': 45,\n    45: 'CTP:找不到预埋（撤单）单', 'PARKEDORDER_HASSENDED': 46, 46: 'CTP:预埋（撤单）单已经发送', 'PARKEDORDER_HASDELETE': 47,\n    47: 'CTP:预埋（撤单）单已经删除', 'INVALID_INVESTORIDORPASSWORD': 48, 48: 'CTP:无效的投资者或者密码', 'INVALID_LOGIN_IPADDRESS': 49,\n    49: 'CTP:不合法的登录IP地址', 'OVER_CLOSETODAY_POSITION': 50, 50: 'CTP:平今仓位不足', 'OVER_CLOSEYESTERDAY_POSITION': 51,\n    51: 'CTP:平昨仓位不足', 'BROKER_NOT_ENOUGH_CONDORDER': 52, 52: 'CTP:经纪公司没有足够可用的条件单数量',\n    'INVESTOR_NOT_ENOUGH_CONDORDER': 53, 53: 'CTP:投资者没有足够可用的条件单数量', 'BROKER_NOT_SUPPORT_CONDORDER': 54,\n    54: 'CTP:经纪公司不支持条件单', 'RESEND_ORDER_BROKERINVESTOR_NOTMATCH': 55, 55: 'CTP:重发未知单经济公司/投资者不匹配',\n    'SYC_OTP_FAILED': 56, 56: 'CTP:同步动态令牌失败', 'OTP_MISMATCH': 57, 57: 'CTP:动态令牌校验错误', 'OTPPARAM_NOT_FOUND': 58,\n    58: 'CTP:找不到动态令牌配置信息', 'UNSUPPORTED_OTPTYPE': 59, 59: 'CTP:不支持的动态令牌类型', 'SINGLEUSERSESSION_EXCEED_LIMIT': 60,\n    60: 'CTP:用户在线会话超出上限', 'EXCHANGE_UNSUPPORTED_ARBITRAGE': 61, 61: 'CTP:该交易所不支持套利类型报单',\n    'NO_CONDITIONAL_ORDER_RIGHT': 62, 62: 'CTP:没有条件单交易权限', 'AUTH_FAILED': 63, 63: 'CTP:客户端认证失败', 'NOT_AUTHENT': 64,\n    64: 'CTP:客户端未认证', 'SWAPORDER_UNSUPPORTED': 65, 65: 'CTP:该合约不支持互换类型报单', 'OPTIONS_ONLY_SUPPORT_SPEC': 66,\n    66: 'CTP:该期权合约只支持投机类型报单', 'DUPLICATE_EXECORDER_REF': 67, 67: 'CTP:执行宣告错误，不允许重复执行',\n    'RESEND_EXECORDER_BROKERINVESTOR_NOTMATCH': 68, 68: 'CTP:重发未知执行宣告经纪公司/投资者不匹配', 'EXECORDER_NOTOPTIONS': 69,\n    69: 'CTP:只有期权合约可执行', 'OPTIONS_NOT_SUPPORT_EXEC': 70, 70: 'CTP:该期权合约不支持执行', 'BAD_EXECORDER_ACTION_FIELD': 71,\n    71: 'CTP:执行宣告字段有误', 'DUPLICATE_EXECORDER_ACTION_REF': 72, 72: 'CTP:执行宣告撤单已报送，不允许重复撤单',\n    'EXECORDER_NOT_FOUND': 73, 73: 'CTP:执行宣告撤单找不到相应执行宣告', 'OVER_EXECUTE_POSITION': 74, 74: 'CTP:执行仓位不足',\n    'LOGIN_FORBIDDEN': 75, 75: 'CTP:连续登录失败次数超限，登录被禁止', 'INVALID_TRANSFER_AGENT': 76, 76: 'CTP:非法银期代理关系',\n    'NO_FOUND_FUNCTION': 77, 77: 'CTP:无此功能', 'SEND_EXCHANGEORDER_FAILED': 78, 78: 'CTP:发送报单失败',\n    'SEND_EXCHANGEORDERACTION_FAILED': 79, 79: 'CTP:发送报单操作失败', 'PRICETYPE_NOTSUPPORT_BYEXCHANGE': 80,\n    80: 'CTP:交易所不支持的价格类型', 'BAD_EXECUTE_TYPE': 81, 81: 'CTP:错误的执行类型', 'BAD_OPTION_INSTR': 82, 82: 'CTP:无效的组合合约',\n    'INSTR_NOTSUPPORT_FORQUOTE': 83, 83: 'CTP:该合约不支持询价', 'RESEND_QUOTE_BROKERINVESTOR_NOTMATCH': 84,\n    84: 'CTP:重发未知报价经纪公司/投资者不匹配', 'INSTR_NOTSUPPORT_QUOTE': 85, 85: 'CTP:该合约不支持报价', 'QUOTE_NOT_FOUND': 86,\n    86: 'CTP:报价撤单找不到相应报价', 'OPTIONS_NOT_SUPPORT_ABANDON': 87, 87: 'CTP:该期权合约不支持放弃执行',\n    'COMBOPTIONS_SUPPORT_IOC_ONLY': 88, 88: 'CTP:该组合期权合约只支持IOC', 'OPEN_FILE_FAILED': 89, 89: 'CTP:打开文件失败',\n    'NEED_RETRY': 90, 90: 'CTP：查询未就绪，请稍后重试', 'EXCHANGE_RTNERROR': 91, 91: 'CTP：交易所返回的错误',\n    'QUOTE_DERIVEDORDER_ACTIONERROR': 92, 92: 'CTP:报价衍生单要等待交易所返回才能撤单', 'INSTRUMENTMAP_NOT_FOUND': 93,\n    93: 'CTP:找不到组合合约映射', 'NO_TRADING_RIGHT_IN_SEPC_DR': 101, 101: 'CTP:用户在本系统没有报单权限', 'NO_DR_NO': 102,\n    102: 'CTP:系统缺少灾备标示号', 'BATCHACTION_NOSUPPORT': 103, 103: 'CTP:该交易所不支持批量撤单', 'OUT_OF_TIMEINTERVAL': 113,\n    113: 'CTP:当前时间禁止询价', 'OUT_OF_PRICEINTERVAL': 114, 114: 'CTP:当前价差禁止询价', 'SEND_INSTITUTION_CODE_ERROR': 1000,\n    1000: 'CTP:银期转账：发送机构代码错误', 'NO_GET_PLATFORM_SN': 1001, 1001: 'CTP:银期转账：取平台流水号错误',\n    'ILLEGAL_TRANSFER_BANK': 1002, 1002: 'CTP:银期转账：不合法的转账银行', 'ALREADY_OPEN_ACCOUNT': 1003, 1003: 'CTP:银期转账：已经开户',\n    'NOT_OPEN_ACCOUNT': 1004, 1004: 'CTP:银期转账：未开户', 'PROCESSING': 1005, 1005: 'CTP:银期转账：处理中', 'OVERTIME': 1006,\n    1006: 'CTP:银期转账：交易超时', 'RECORD_NOT_FOUND': 1007, 1007: 'CTP:银期转账：找不到记录',\n    'NO_FOUND_REVERSAL_ORIGINAL_TRANSACTION': 1008, 1008: 'CTP:银期转账：找不到被冲正的原始交易', 'CONNECT_HOST_FAILED': 1009,\n    1009: 'CTP:银期转账：连接主机失败', 'SEND_FAILED': 1010, 1010: 'CTP:银期转账：发送失败', 'LATE_RESPONSE': 1011,\n    1011: 'CTP:银期转账：迟到应答', 'REVERSAL_BANKID_NOT_MATCH': 1012, 1012: 'CTP:银期转账：冲正交易银行代码错误',\n    'REVERSAL_BANKACCOUNT_NOT_MATCH': 1013, 1013: 'CTP:银期转账：冲正交易银行账户错误', 'REVERSAL_BROKERID_NOT_MATCH': 1014,\n    1014: 'CTP:银期转账：冲正交易经纪公司代码错误', 'REVERSAL_ACCOUNTID_NOT_MATCH': 1015, 1015: 'CTP:银期转账：冲正交易资金账户错误',\n    'REVERSAL_AMOUNT_NOT_MATCH': 1016, 1016: 'CTP:银期转账：冲正交易交易金额错误', 'DB_OPERATION_FAILED': 1017,\n    1017: 'CTP:银期转账：数据库操作错误', 'SEND_ASP_FAILURE': 1018, 1018: 'CTP:银期转账：发送到交易系统失败', 'NOT_SIGNIN': 1019,\n    1019: 'CTP:银期转账：没有签到', 'ALREADY_SIGNIN': 1020, 1020: 'CTP:银期转账：已经签到', 'AMOUNT_OR_TIMES_OVER': 1021,\n    1021: 'CTP:银期转账：金额或次数超限', 'NOT_IN_TRANSFER_TIME': 1022, 1022: 'CTP:银期转账：这一时间段不能转账', 'BANK_SERVER_ERROR': 1023,\n    1023: '银行主机错', 'BANK_SERIAL_IS_REPEALED': 1024, 1024: 'CTP:银期转账：银行已经冲正', 'BANK_SERIAL_NOT_EXIST': 1025,\n    1025: 'CTP:银期转账：银行流水不存在', 'NOT_ORGAN_MAP': 1026, 1026: 'CTP:银期转账：机构没有签约', 'EXIST_TRANSFER': 1027,\n    1027: 'CTP:银期转账：存在转账，不能销户', 'BANK_FORBID_REVERSAL': 1028, 1028: 'CTP:银期转账：银行不支持冲正', 'DUP_BANK_SERIAL': 1029,\n    1029: 'CTP:银期转账：重复的银行流水', 'FBT_SYSTEM_BUSY': 1030, 1030: 'CTP:银期转账：转账系统忙，稍后再试', 'MACKEY_SYNCING': 1031,\n    1031: 'CTP:银期转账：MAC密钥正在同步', 'ACCOUNTID_ALREADY_REGISTER': 1032, 1032: 'CTP:银期转账：资金账户已经登记',\n    'BANKACCOUNT_ALREADY_REGISTER': 1033, 1033: 'CTP:银期转账：银行账户已经登记', 'DUP_BANK_SERIAL_REDO_OK': 1034,\n    1034: 'CTP:银期转账：重复的银行流水,重发成功', 'CURRENCYID_NOT_SUPPORTED': 1035, 1035: 'CTP:银期转账：该币种代码不支持',\n    'INVALID_MAC': 1036, 1036: 'CTP:银期转账：MAC值验证失败', 'NOT_SUPPORT_SECAGENT_BY_BANK': 1037,\n    1037: 'CTP:银期转账：不支持银行端发起的二级代理商转账和查询', 'PINKEY_SYNCING': 1038, 1038: 'CTP:银期转账：PIN密钥正在同步',\n    'SECAGENT_QUERY_BY_CCB': 1039, 1039: 'CTP:银期转账：建行发起的二级代理商查询', 'NO_VALID_BANKOFFER_AVAILABLE': 2000,\n    2000: 'CTP:该报盘未连接到银行', 'PASSWORD_MISMATCH': 2001, 2001: 'CTP:资金密码错误', 'DUPLATION_BANK_SERIAL': 2004,\n    2004: 'CTP:银行流水号重复', 'DUPLATION_OFFER_SERIAL': 2005, 2005: 'CTP:报盘流水号重复', 'SERIAL_NOT_EXSIT': 2006,\n    2006: 'CTP:被冲正流水不存在(冲正交易)', 'SERIAL_IS_REPEALED': 2007, 2007: 'CTP:原流水已冲正(冲正交易)', 'SERIAL_MISMATCH': 2008,\n    2008: 'CTP:与原流水信息不符(冲正交易)', 'IdentifiedCardNo_MISMATCH': 2009, 2009: 'CTP:证件号码或类型错误', 'ACCOUNT_NOT_FUND': 2011,\n    2011: 'CTP:资金账户不存在', 'ACCOUNT_NOT_ACTIVE': 2012, 2012: 'CTP:资金账户已经销户', 'NOT_ALLOW_REPEAL_BYMANUAL': 2013,\n    2013: 'CTP:该交易不能执行手工冲正', 'AMOUNT_OUTOFTHEWAY': 2014, 2014: 'CTP:转帐金额错误', 'EXCHANGERATE_NOT_FOUND': 2015,\n    2015: 'CTP:找不到汇率', 'WAITING_OFFER_RSP': 999999, 999999: 'CTP:等待银期报盘处理结果', 'FBE_NO_GET_PLATFORM_SN': 3001,\n    3001: 'CTP:银期换汇：取平台流水号错误', 'FBE_ILLEGAL_TRANSFER_BANK': 3002, 3002: 'CTP:银期换汇：不合法的转账银行',\n    'FBE_PROCESSING': 3005, 3005: 'CTP:银期换汇：处理中', 'FBE_OVERTIME': 3006, 3006: 'CTP:银期换汇：交易超时',\n    'FBE_RECORD_NOT_FOUND': 3007, 3007: 'CTP:银期换汇：找不到记录', 'FBE_CONNECT_HOST_FAILED': 3009, 3009: 'CTP:银期换汇：连接主机失败',\n    'FBE_SEND_FAILED': 3010, 3010: 'CTP:银期换汇：发送失败', 'FBE_LATE_RESPONSE': 3011, 3011: 'CTP:银期换汇：迟到应答',\n    'FBE_DB_OPERATION_FAILED': 3017, 3017: 'CTP:银期换汇：数据库操作错误', 'FBE_NOT_SIGNIN': 3019, 3019: 'CTP:银期换汇：没有签到',\n    'FBE_ALREADY_SIGNIN': 3020, 3020: 'CTP:银期换汇：已经签到', 'FBE_AMOUNT_OR_TIMES_OVER': 3021, 3021: 'CTP:银期换汇：金额或次数超限',\n    'FBE_NOT_IN_TRANSFER_TIME': 3022, 3022: 'CTP:银期换汇：这一时间段不能换汇', 'FBE_BANK_SERVER_ERROR': 3023,\n    3023: 'CTP:银期换汇：银行主机错', 'FBE_NOT_ORGAN_MAP': 3026, 3026: 'CTP:银期换汇：机构没有签约', 'FBE_SYSTEM_BUSY': 3030,\n    3030: 'CTP:银期换汇：换汇系统忙，稍后再试', 'FBE_CURRENCYID_NOT_SUPPORTED': 3035, 3035: 'CTP:银期换汇：该币种代码不支持',\n    'FBE_WRONG_BANK_ACCOUNT': 3036, 3036: 'CTP:银期换汇：银行帐号不正确', 'FBE_BANK_ACCOUNT_NO_FUNDS': 3037,\n    3037: 'CTP:银期换汇：银行帐户余额不足', 'FBE_DUP_CERT_NO': 3038, 3038: 'CTP:银期换汇：凭证号重复'}\n"
  },
  {
    "path": "utils/__init__.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nimport logging\nimport orjson\nfrom decimal import Decimal\nimport datetime\nimport math\nimport re\nimport socket\nimport xml.etree.ElementTree as ET\nimport asyncio\nimport os\nfrom functools import reduce\nfrom itertools import combinations\nfrom typing import Any, cast\n\nimport pytz\nimport aiohttp\nimport numpy as np\nfrom django.db.models import Q, F, Max, Min\nfrom django.utils import timezone\nfrom talib import ATR\nfrom tqdm import tqdm\n\nfrom panel.models import *\nfrom ctp_native.state_store import state_store\nfrom utils import ApiStruct\nfrom utils.read_config import config\n\nlogger = logging.getLogger('utils')\n\nmax_conn_shfe = asyncio.Semaphore(15)\nmax_conn_dce = asyncio.Semaphore(5)\nmax_conn_gfex = asyncio.Semaphore(5)\nmax_conn_czce = asyncio.Semaphore(15)\nmax_conn_cffex = asyncio.Semaphore(15)\nmax_conn_sina = asyncio.Semaphore(15)\ncffex_ip = 'www.cffex.com.cn'    # www.cffex.com.cn\nshfe_ip = 'www.shfe.com.cn'      # www.shfe.com.cn\nczce_ip = 'www.czce.com.cn'     # www.czce.com.cn\ndce_ip = 'www.dce.com.cn'        # www.dce.com.cn\ngfex_ip = 'www.gfex.com.cn'\nIGNORE_INST_LIST = config.get('TRADE', 'ignore_inst').split(',')\nORDER_REF_SIGNAL_ID_START = -5\n\n\ndef _create_http_connector() -> aiohttp.TCPConnector:\n    \"\"\"创建更稳定的 HTTP 连接器：优先系统 DNS 解析并固定 IPv4。\"\"\"\n    return aiohttp.TCPConnector(\n        resolver=aiohttp.ThreadedResolver(),\n        family=socket.AF_INET,\n        ttl_dns_cache=300,\n        enable_cleanup_closed=True,\n        limit=30,\n    )\n\n\ndef _create_http_session(timeout_total: float = 20.0) -> aiohttp.ClientSession:\n    timeout = aiohttp.ClientTimeout(total=timeout_total, connect=8, sock_connect=8, sock_read=15)\n    return aiohttp.ClientSession(\n        connector=_create_http_connector(),\n        timeout=timeout,\n        trust_env=True,\n    )\n\n\ndef str_to_number(s):\n    try:\n        if not isinstance(s, str):\n            return s\n        return int(s)\n    except ValueError:\n        return float(s)\n\n\ndef price_round(x: Decimal, base: Decimal):\n    \"\"\"\n    根据最小精度取整，例如对于IF最小精度是0.2，那么 1.3 -> 1.2, 1.5 -> 1.4\n    :param x: Decimal 待取整的数\n    :param base: Decimal 最小精度\n    :return: float 取整结果\n    \"\"\"\n    if not type(x) is Decimal:\n        x = Decimal(x)\n    if not type(base) is Decimal:\n        base = Decimal(base)\n    precision = 0\n    s = str(round(base, 3) % 1)\n    s = s.rstrip('0').rstrip('.') if '.' in s else s\n    p1, *p2 = s.split('.')\n    if p2:\n        precision = len(p2[0])\n    return round(base * round(x / base), precision)\n\n\ndef get_next_id():\n    if not hasattr(get_next_id, \"request_id\"):\n        get_next_id.request_id = 0  # type: ignore[attr-defined]\n    get_next_id.request_id = 1 if get_next_id.request_id == 65535 else get_next_id.request_id + 1  # type: ignore[attr-defined]\n    return get_next_id.request_id  # type: ignore[attr-defined]\n\n\nasync def is_trading_day(day: datetime.datetime):\n    \"\"\"\n    判断给定日期是否为交易日。\n    交易日 = 周一至周五 且 非法定节假日（调休周末交易所也不开盘）。\n    \"\"\"\n    d = day.date() if hasattr(day, 'date') else day\n    if d.isoweekday() >= 6:\n        # 周末一律不交易，即使是调休工作日\n        return day, False\n    try:\n        from chinese_calendar import is_workday\n        # 工作日中排除法定节假日（如国庆、春节等落在周一~周五的）\n        return day, is_workday(d)\n    except Exception:\n        # chinese_calendar 不可用或日期超范围，回退到仅周末判断\n        return day, True\n\n\nasync def check_trading_day(day: datetime.datetime) -> tuple[datetime.datetime, bool]:\n    async with _create_http_session() as session:\n        await max_conn_cffex.acquire()\n        async with session.get(\n                'http://{}/fzjy/mrhq/{}/index.xml'.format(cffex_ip, day.strftime('%Y%m/%d')),\n                allow_redirects=False) as response:\n            max_conn_cffex.release()\n            return day, response.status == 200\n\n\ndef get_expire_date(inst_code: str, day: datetime.datetime):\n    expire_date = int(re.findall(r'\\d+', inst_code)[0])\n    if expire_date < 1000:\n        year_exact = math.floor(day.year % 100 / 10)\n        if expire_date < 100 and day.year % 10 == 9:\n            year_exact += 1\n        expire_date += year_exact * 1000\n    return expire_date\n\n\ndef get_contract_code_regex(product_code: str) -> str:\n    \"\"\"根据 product_code 生成匹配真实合约代码的 regex。\"\"\"\n    pc = str(product_code or '').strip().lower()\n    if pc.endswith('_f'):\n        base = re.escape(pc[:-2])\n        return rf'^{base}[0-9]+[Ff]$'\n    return rf'^{re.escape(pc)}[0-9]+$'\n\n\nasync def update_from_shfe(day: datetime.datetime) -> bool:\n    try:\n        async with _create_http_session() as session:\n            day_str = day.strftime('%Y%m%d')\n            await max_conn_shfe.acquire()\n            async with session.get(f'http://{shfe_ip}/data/tradedata/future/dailydata/kx{day_str}.dat') as response:\n                rst = await response.read()\n                rst_json = orjson.loads(rst)\n                max_conn_shfe.release()\n                inst_name_dict = {}\n                for inst_data in rst_json['o_curinstrument']:\n                    \"\"\"\n        {\"PRODUCTID\":\"cu_f    \",\"PRODUCTGROUPID\":\"cu      \",\"PRODUCTSORTNO\":10,\"PRODUCTNAME\":\"铜                  \",\n        \"DELIVERYMONTH\":\"2112\",\"PRESETTLEMENTPRICE\":69850,\"OPENPRICE\":69770,\"HIGHESTPRICE\":70280,\"LOWESTPRICE\":69600,\n        \"CLOSEPRICE\":69900,\"SETTLEMENTPRICE\":69950,\"ZD1_CHG\":50,\"ZD2_CHG\":100,\"VOLUME\":19450,\"TURNOVER\":680294.525,\n        \"TASVOLUME\":\"\",\"OPENINTEREST\":19065,\"OPENINTERESTCHG\":-5585,\"ORDERNO\":0,\"ORDERNO2\":0}\n                    \"\"\"\n                    # error_data = inst_data\n                    if inst_data['DELIVERYMONTH'] == '小计' or inst_data['PRODUCTID'] == '总计':\n                        continue\n                    if '_f' not in inst_data['PRODUCTID']:\n                        continue\n                    # logger.info(f'inst_data: {inst_data}')\n                    code = inst_data['PRODUCTGROUPID'].strip()\n                    if code in IGNORE_INST_LIST:\n                        continue\n                    name = inst_data['PRODUCTNAME'].strip()\n                    if code not in inst_name_dict:\n                        inst_name_dict[code] = name\n                    DailyBar.objects.update_or_create(\n                        code=code + inst_data['DELIVERYMONTH'],\n                        exchange=ExchangeType.SHFE, time=day, defaults={\n                            'expire_date': inst_data['DELIVERYMONTH'],\n                            'open': inst_data['OPENPRICE'] if inst_data['OPENPRICE'] else inst_data['CLOSEPRICE'],\n                            'high': inst_data['HIGHESTPRICE'] if inst_data['HIGHESTPRICE'] else\n                            inst_data['CLOSEPRICE'],\n                            'low': inst_data['LOWESTPRICE'] if inst_data['LOWESTPRICE']\n                            else inst_data['CLOSEPRICE'],\n                            'close': inst_data['CLOSEPRICE'],\n                            'settlement': inst_data['SETTLEMENTPRICE'] if inst_data['SETTLEMENTPRICE'] else\n                            inst_data['PRESETTLEMENTPRICE'],\n                            'volume': inst_data['VOLUME'] if inst_data['VOLUME'] else 0,\n                            'open_interest': inst_data['OPENINTEREST'] if inst_data['OPENINTEREST'] else 0})\n                # 更新上期所合约中文名称\n                for code, name in inst_name_dict.items():\n                    Instrument.objects.filter(product_code=code).update(name=name)\n        return True\n    except Exception as e:\n        logger.warning(f'update_from_shfe failed: {repr(e)}', exc_info=True)\n        return False\n\n\nasync def update_from_czce(day: datetime.datetime) -> bool:\n    try:\n        async with _create_http_session() as session:\n            day_str = day.strftime('%Y%m%d')\n            async with session.get(\n                    f'http://{czce_ip}/cn/DFSStaticFiles/Future/{day.year}/{day_str}/FutureDataDaily.txt') as response:\n                rst = await response.text()\n                for lines in rst.split('\\n')[1:-3]:\n                    if '小计' in lines or '合约' in lines or '品种' in lines:\n                        continue\n                    inst_data = [x.strip() for x in lines.split('|' if '|' in lines else ',')]\n                    \"\"\"\n        [0'合约代码', 1'昨结算', 2'今开盘', 3'最高价', 4'最低价', 5'今收盘', 6'今结算', 7'涨跌1', 8'涨跌2', 9'成交量(手)', \n         10'持仓量', 11'增减量', 12'成交额(万元)', 13'交割结算价']\n        ['CF601', '11,970.00', '11,970.00', '11,970.00', '11,800.00', '11,870.00', '11,905.00', '-100.00',\n         '-65.00', '13,826', '59,140', '-10,760', '82,305.24', '']\n                    \"\"\"\n                    # print(f'inst_data: {inst_data}')\n                    if re.findall('[A-Za-z]+', inst_data[0])[0] in IGNORE_INST_LIST:\n                        continue\n                    close = inst_data[5].replace(',', '') if Decimal(inst_data[5].replace(',', '')) > 0.1 \\\n                        else inst_data[6].replace(',', '')\n                    DailyBar.objects.update_or_create(\n                        code=inst_data[0],\n                        exchange=ExchangeType.CZCE, time=day, defaults={\n                            'expire_date': get_expire_date(inst_data[0], day),\n                            'open': inst_data[2].replace(',', '') if Decimal(inst_data[2].replace(',', '')) > 0.1\n                            else close,\n                            'high': inst_data[3].replace(',', '') if Decimal(inst_data[3].replace(',', '')) > 0.1\n                            else close,\n                            'low': inst_data[4].replace(',', '') if Decimal(inst_data[4].replace(',', '')) > 0.1\n                            else close,\n                            'close': close,\n                            'settlement': inst_data[6].replace(',', '') if\n                            Decimal(inst_data[6].replace(',', '')) > 0.1 else inst_data[1].replace(',', ''),\n                            'volume': inst_data[9].replace(',', ''),\n                            'open_interest': inst_data[10].replace(',', '')})\n                return True\n    except Exception as e:\n        logger.warning(f'update_from_czce failed: {repr(e)}', exc_info=True)\n        return False\n\n\nasync def update_from_dce(day: datetime.datetime) -> bool:\n    try:\n        def _to_number(value: Any, default: float = 0.0) -> float:\n            if value is None:\n                return default\n            text = str(value).strip().replace(',', '')\n            if text in ['', '-', '--', 'nan', 'None']:\n                return default\n            return float(str_to_number(text))\n\n        token = config.get('TUSHARE', 'token', fallback='').strip()\n        if not token:\n            logger.warning('update_from_dce skipped: missing tushare.token in config.yaml')\n            return False\n\n        day_str = day.strftime('%Y%m%d')\n\n        def _load_daily_df():\n            import tushare as ts\n            pro = ts.pro_api(token)\n            return pro.fut_daily(\n                trade_date=day_str,\n                exchange='DCE',\n                fields='ts_code,trade_date,pre_close,pre_settle,open,high,low,close,settle,vol,oi',\n            )\n\n        async with max_conn_dce:\n            df = await asyncio.wait_for(asyncio.to_thread(_load_daily_df), timeout=30)\n\n        if df is None or df.empty:\n            logger.warning(f'update_from_dce empty tushare result: day={day.date()}')\n            return False\n\n        parsed_count = 0\n        fail_count = 0\n\n        for _, row in df.iterrows():\n            ts_code = str(row.get('ts_code') or '').strip()\n            base_code = ts_code.split('.', maxsplit=1)[0]\n            m = re.match(r'^([A-Za-z]+)(\\d+)([A-Za-z]*)$', base_code)\n            if not m:\n                fail_count += 1\n                continue\n            raw_pc = m.group(1).lower()\n            digits = m.group(2)\n            tail = (m.group(3) or '').upper()\n            if tail and tail != 'F':\n                fail_count += 1\n                continue\n\n            product_code = f'{raw_pc}_f' if tail == 'F' else raw_pc\n            if product_code in IGNORE_INST_LIST:\n                continue\n\n            contract_code = f'{raw_pc}{digits}{tail}' if tail else f'{raw_pc}{digits}'\n\n            close = _to_number(row.get('close'), 0)\n            settlement = _to_number(row.get('settle'), close)\n            if settlement <= 0:\n                settlement = _to_number(row.get('pre_settle'), close)\n\n            if close <= 0 and settlement > 0:\n                close = settlement\n            if close <= 0:\n                fail_count += 1\n                continue\n\n            open_price = _to_number(row.get('open'), close)\n            high = _to_number(row.get('high'), close)\n            low = _to_number(row.get('low'), close)\n            volume = _to_number(row.get('vol'), 0)\n            open_interest = _to_number(row.get('oi'), 0)\n\n            DailyBar.objects.update_or_create(\n                code=contract_code,\n                exchange=ExchangeType.DCE,\n                time=day,\n                defaults={\n                    'expire_date': get_expire_date(contract_code, day),\n                    'open': open_price,\n                    'high': high,\n                    'low': low,\n                    'close': close,\n                    'settlement': settlement if settlement > 0 else close,\n                    'volume': volume,\n                    'open_interest': open_interest,\n                },\n            )\n            parsed_count += 1\n\n        if parsed_count == 0:\n            logger.warning(f'update_from_dce no rows parsed by tushare: day={day.date()} fail_count={fail_count}')\n            return False\n        logger.info(f'update_from_dce tushare success: day={day.date()} rows={parsed_count} fail_rows={fail_count}')\n        return True\n    except Exception as e:\n        logger.warning(f'update_from_dce failed: {repr(e)}', exc_info=True)\n        return False\n\n\nasync def update_from_gfex(day: datetime.datetime) -> bool:\n    try:\n        async with _create_http_session() as session:\n            await max_conn_gfex.acquire()\n            try:\n                for ids in ['lc', 'si', 'ps']:\n                    async with session.post(f'http://{gfex_ip}/gfexweb/Quote/getQuote_ftr', data={'varietyid': ids}) as response:\n                        rst = await response.text()\n                        rst_json = orjson.loads(rst)\n                        quote_map = rst_json.get('contractQuote') or {}\n                        for inst_code, inst_data in quote_map.items():\n                            expire_date = inst_code.removeprefix(ids)\n\n                            close_price = inst_data.get('closePrice')\n                            clear_price = inst_data.get('clearPrice')\n                            close = close_price if close_price not in [None, '', '--'] else clear_price\n                            if close in [None, '', '--']:\n                                close = 0\n\n                            open_price = inst_data.get('openPrice')\n                            high_price = inst_data.get('highPrice')\n                            low_price = inst_data.get('lowPrice')\n                            volume = inst_data.get('matchTotQty')\n                            open_interest = inst_data.get('openInterest')\n\n                            DailyBar.objects.update_or_create(\n                                code=inst_code,\n                                exchange=ExchangeType.GFEX, time=day, defaults={\n                                    'expire_date': expire_date,\n                                    'open': open_price if open_price not in [None, '', '--'] else close,\n                                    'high': high_price if high_price not in [None, '', '--'] else close,\n                                    'low': low_price if low_price not in [None, '', '--'] else close,\n                                    'close': close,\n                                    'settlement': clear_price if clear_price not in [None, '', '--'] else close,\n                                    'volume': volume if volume not in [None, '', '--'] else 0,\n                                    'open_interest': open_interest if open_interest not in [None, '', '--'] else 0,\n                                },\n                            )\n            finally:\n                max_conn_gfex.release()\n    except Exception as e:\n        logger.warning(f'update_from_gfex failed: {repr(e)}', exc_info=True)\n        return False\n    return True\n\n\nasync def update_from_cffex(day: datetime.datetime) -> bool:\n    try:\n        async with _create_http_session() as session:\n            await max_conn_cffex.acquire()\n            async with session.get(f\"http://{cffex_ip}/sj/hqsj/rtj/{day.strftime('%Y%m/%d')}/index.xml?id=7\") as response:\n                rst = await response.text()\n                max_conn_cffex.release()\n                tree = ET.fromstring(rst)\n                for inst_data in tree:\n                    \"\"\"\n                    <dailydata>\n                    <instrumentid>IC2112</instrumentid>\n                    <tradingday>20211209</tradingday>\n                    <openprice>7272</openprice>\n                    <highestprice>7330</highestprice>\n                    <lowestprice>7264.4</lowestprice>\n                    <closeprice>7302.4</closeprice>\n                    <preopeninterest>107546</preopeninterest>\n                    <openinterest>101956</openinterest>\n                    <presettlementprice>7274.4</presettlementprice>\n                    <settlementpriceif>7314.2</settlementpriceif>\n                    <settlementprice>7314.2</settlementprice>\n                    <volume>51752</volume>\n                    <turnover>75570943720</turnover>\n                    <productid>IC</productid>\n                    <delta/>\n                    <expiredate>20211217</expiredate>\n                    </dailydata>\n                    \"\"\"\n                    instrument_id = (inst_data.findtext('instrumentid') or '').strip()\n                    if not instrument_id:\n                        continue\n                    # 不存储期权合约\n                    if len(instrument_id) > 6:\n                        continue\n                    product_id = (inst_data.findtext('productid') or '').strip()\n                    if product_id in IGNORE_INST_LIST:\n                        continue\n\n                    close_price = (inst_data.findtext('closeprice') or '0').replace(',', '')\n                    settlement_price = (inst_data.findtext('settlementprice') or '').replace(',', '')\n                    pre_settlement = (inst_data.findtext('presettlementprice') or close_price).replace(',', '')\n\n                    DailyBar.objects.update_or_create(\n                        code=instrument_id,\n                        exchange=ExchangeType.CFFEX, time=day, defaults={\n                            'expire_date': ((inst_data.findtext('expiredate') or '')[2:6]),\n                            'open': (inst_data.findtext('openprice') or close_price).replace(',', ''),\n                            'high': (inst_data.findtext('highestprice') or close_price).replace(',', ''),\n                            'low': (inst_data.findtext('lowestprice') or close_price).replace(',', ''),\n                            'close': close_price,\n                            'settlement': settlement_price if settlement_price else pre_settlement,\n                            'volume': (inst_data.findtext('volume') or '0').replace(',', ''),\n                            'open_interest': (inst_data.findtext('openinterest') or '0').replace(',', ''),\n                        },\n                    )\n                return True\n    except Exception as e:\n        logger.warning(f'update_from_cffex failed: {repr(e)}', exc_info=True)\n        return False\n\n\ndef store_main_bar(inst: Instrument, bar: DailyBar):\n    MainBar.objects.update_or_create(\n        exchange=inst.exchange, product_code=inst.product_code, time=bar.time, defaults={\n            'code': bar.code,\n            'open': bar.open,\n            'high': bar.high,\n            'low': bar.low,\n            'close': bar.close,\n            'settlement': bar.settlement,\n            'volume': bar.volume,\n            'open_interest': bar.open_interest})\n\n\ndef handle_rollover(inst: Instrument, new_bar: DailyBar):\n    \"\"\"\n    换月处理, 基差=新合约收盘价-旧合约收盘价, 从今日起之前的所有连续合约的OHLC加上基差\n    \"\"\"\n    old_bar = DailyBar.objects.filter(exchange=inst.exchange, code=inst.last_main, time=new_bar.time).first()\n    main_bar = MainBar.objects.get(exchange=inst.exchange, product_code=inst.product_code, time=new_bar.time)\n    old_close = old_bar.close if old_bar else new_bar.close\n    basis = new_bar.close - old_close\n    main_bar.basis = basis\n    basis = float(basis)\n    main_bar.save(update_fields=['basis'])\n    MainBar.objects.filter(exchange=inst.exchange, product_code=inst.product_code, time__lt=new_bar.time).update(\n        open=F('open') + basis, high=F('high') + basis, low=F('low') + basis, close=F('close') + basis,\n        settlement=F('settlement') + basis)\n\n\ndef calc_main_inst(inst: Instrument, day: datetime.datetime):\n    updated = False\n    expire_date = get_expire_date(inst.main_code, day) if inst.main_code else day.strftime('%y%m')\n    code_regex = get_contract_code_regex(inst.product_code or '')\n    # 条件1: 成交量最大 & (成交量>1万 & 持仓量>1万 or 股指) = 主力合约\n    check_bar = DailyBar.objects.filter(\n        (Q(exchange=ExchangeType.CFFEX) | (Q(volume__gte=10000) & Q(open_interest__gte=10000))),\n        exchange=inst.exchange, code__regex=code_regex,\n        expire_date__gte=expire_date, time=day.date()).order_by('-volume').first()\n    # 条件2: 不满足条件1但是连续3天成交量最大 = 主力合约\n    if check_bar is None:\n        check_bars = DailyBar.objects.raw(\n            \"SELECT a.* from panel_dailybar a INNER JOIN (SELECT time, max(volume) v FROM panel_dailybar \"\n            \"WHERE CODE RLIKE %s and time<=%s GROUP BY time ORDER BY time DESC LIMIT 3) b \"\n            \"WHERE a.time=b.time and a.volume=b.v ORDER BY a.time DESC LIMIT 3\", [code_regex, day])\n        check_bar = check_bars[0] if len(set(bar.code for bar in check_bars)) == 1 else None\n    # 条件3: 取当前成交量最大的作为主力\n    if check_bar is None:\n        check_bar = DailyBar.objects.filter(\n            exchange=inst.exchange, code__regex=code_regex,\n            expire_date__gte=expire_date, time=day.date()).order_by('-volume', '-open_interest', 'code').first()\n    if check_bar is None:\n        check_bar = DailyBar.objects.filter(code=inst.main_code).last()\n        logger.error(f\"calc_main_inst 未找到主力合约：{inst} 使用上一个主力合约\")\n    if check_bar is None:\n        return inst.main_code, updated\n    if inst.main_code is None:  # 之前没有主力合约\n        inst.main_code = check_bar.code\n        inst.change_time = day\n        inst.save(update_fields=['main_code', 'change_time'])\n        store_main_bar(inst, check_bar)\n    else:\n        cur_main_code = cast(str, inst.main_code)\n        # 主力合约发生变化, 做换月处理\n        if check_bar.code and cur_main_code != check_bar.code and check_bar.code > cur_main_code:\n            inst.last_main = cur_main_code\n            inst.main_code = check_bar.code\n            inst.change_time = day\n            inst.save(update_fields=['last_main', 'main_code', 'change_time'])\n            store_main_bar(inst, check_bar)\n            handle_rollover(inst, check_bar)\n            updated = True\n        else:\n            # 禁止主力代码回滚：若候选合约不晚于当前主力，优先写当前主力当日bar\n            if check_bar.code and check_bar.code < cur_main_code:\n                cur_main_bar = DailyBar.objects.filter(\n                    exchange=inst.exchange,\n                    code=cur_main_code,\n                    time=day.date(),\n                ).first()\n                if cur_main_bar is not None:\n                    store_main_bar(inst, cur_main_bar)\n                else:\n                    logger.warning(\n                        'calc_main_inst skip rollback write: %s.%s day=%s cur_main=%s candidate=%s',\n                        inst.exchange,\n                        inst.product_code,\n                        day.date(),\n                        cur_main_code,\n                        check_bar.code,\n                    )\n            else:\n                store_main_bar(inst, check_bar)\n    return inst.main_code, updated\n\n\ndef create_main(inst: Instrument):\n    print('processing ', inst.product_code)\n    code_regex = get_contract_code_regex(inst.product_code or '')\n    if inst.change_time is None:\n        for day in DailyBar.objects.filter(\n                # time__gte=datetime.datetime.strptime('20211211', '%Y%m%d'),\n                exchange=inst.exchange, code__regex=code_regex).order_by(\n                'time').values_list('time', flat=True).distinct():\n            print(day, calc_main_inst(inst, timezone.make_aware(datetime.datetime.combine(day, datetime.time.min))))\n    else:\n        for day in DailyBar.objects.filter(\n                time__gt=inst.change_time,\n                exchange=inst.exchange, code__regex=code_regex).order_by(\n                'time').values_list('time', flat=True).distinct():\n            print(day, calc_main_inst(inst, timezone.make_aware(datetime.datetime.combine(day, datetime.time.min))))\n    return True\n\n\ndef create_main_all():\n    for inst in Instrument.objects.all():\n        create_main(inst)\n    print('all done!')\n\n\ndef is_auction_time(inst: Instrument, status: dict):\n    if status['InstrumentStatus'] == ApiStruct.IS_AuctionOrdering:\n        now = timezone.localtime()\n        if inst.exchange == ExchangeType.CFFEX:\n            return True\n        # 夜盘集合竞价时间是 20:55\n        if inst.night_trade and now.hour == 20:\n            return True\n        # 日盘集合竞价时间是 8:55\n        if not inst.night_trade and now.hour == 8:\n            return True\n    return False\n\n\ndef calc_sma(price, period):\n    return reduce(lambda x, y: ((period - 1) * x + y) / period, price)\n\n\ndef calc_corr(day: datetime.datetime):\n    price_dict = dict()\n    begin_day = day.replace(year=day.year - 3)\n    for code in Strategy.objects.get(name='大哥2.0').instruments.all().order_by('id').values_list(\n            'product_code', flat=True):\n        price_dict[code] = to_df(MainBar.objects.filter(\n            time__gte=begin_day.date(),\n            product_code=code).order_by('time').values_list('time', 'close'), index_col='time', parse_dates=['time'])\n        price_dict[code].index = pd.DatetimeIndex(price_dict[code].time)\n        price_dict[code]['price'] = price_dict[code].close.pct_change()\n    return pd.DataFrame({k: v.price for k, v in price_dict.items()}).corr()\n\n\ndef nCr(n, r):\n    f = math.factorial\n    return f(n) / f(r) / f(n-r)\n\n\ndef find_best_score(n: int = 20):\n    \"\"\"\n    一秒钟算5个组合，要算100年..\n    \"\"\"\n    corr_matrix = calc_corr(datetime.datetime.today())\n    code_list = Strategy.objects.get(name='大哥2.0').instruments.all().order_by('id').values_list(\n        'product_code', flat=True)\n    result = list()\n    for code_list in tqdm(combinations(code_list, n), total=nCr(code_list.count(), n)):\n        score_df = pd.DataFrame([corr_matrix.iloc[i, j] for i, j in combinations(code_list, 2)])\n        score = (round((1 - (score_df.abs() ** 2).mean()[0]) * 100, 3) - 50) * 2\n        result.append((score, ','.join(code_list)))\n    result.sort(key=lambda tup: tup[0])\n    print('得分最高: ', result[-3:])\n    print('得分最低: ', result[:3])\n\n\ndef calc_history_signal(inst: Instrument, day: datetime.datetime, strategy: Strategy):\n    param_set = cast(Any, strategy).param_set\n    break_n = param_set.get(code='BreakPeriod').int_value\n    atr_n = param_set.get(code='AtrPeriod').int_value\n    long_n = param_set.get(code='LongPeriod').int_value\n    short_n = param_set.get(code='ShortPeriod').int_value\n    stop_n = param_set.get(code='StopLoss').int_value\n    if not all([break_n, atr_n, long_n, short_n, stop_n]):\n        return\n\n    break_n = int(break_n)\n    atr_n = int(atr_n)\n    long_n = int(long_n)\n    short_n = int(short_n)\n    stop_n = int(stop_n)\n    df = to_df(MainBar.objects.filter(\n        time__lte=day.date(),\n        exchange=inst.exchange, product_code=inst.product_code).order_by('time').values_list(\n        'time', 'open', 'high', 'low', 'close', 'settlement'), index_col='time', parse_dates=['time'])\n    df.index = pd.DatetimeIndex(df.time, tz=pytz.FixedOffset(480))\n    df['atr'] = ATR(\n        np.asarray(df.high, dtype=np.float64),\n        np.asarray(df.low, dtype=np.float64),\n        np.asarray(df.close, dtype=np.float64),\n        timeperiod=atr_n,\n    )\n    # df columns: 0:time,1:open,2:high,3:low,4:close,5:settlement,6:atr,7:short_trend,8:long_trend\n    df['short_trend'] = df.close\n    df['long_trend'] = df.close\n    for idx in range(1, df.shape[0]):\n        prev_short = cast(float, df.iloc[idx - 1, 7])\n        prev_long = cast(float, df.iloc[idx - 1, 8])\n        close_v = cast(float, df.iloc[idx, 4])\n        df.iloc[idx, 7] = (prev_short * (short_n - 1) + close_v) / short_n\n        df.iloc[idx, 8] = (prev_long * (long_n - 1) + close_v) / long_n\n    df['high_line'] = df.close.rolling(window=break_n).max()\n    df['low_line'] = df.close.rolling(window=break_n).min()\n    cur_pos = 0\n    last_trade = None\n    for cur_idx in range(break_n+1, df.shape[0]):\n        idx = cur_idx - 1\n        cur_date = df.index[cur_idx].to_pydatetime()\n        prev_date = df.index[idx].to_pydatetime()\n        if cur_pos == 0:\n            if df.short_trend[idx] > df.long_trend[idx] and int(df.close[idx]) >= int(df.high_line[idx-1]):\n                new_bar = MainBar.objects.filter(\n                    exchange=inst.exchange, product_code=inst.product_code, time=cur_date).first()\n                if new_bar is None:\n                    continue\n                Signal.objects.create(\n                    code=new_bar.code, trigger_value=df.atr[idx],\n                    strategy=strategy, instrument=inst, type=SignalType.BUY, processed=True,\n                    trigger_time=prev_date, price=new_bar.open, volume=1, priority=PriorityType.LOW)\n                last_trade = Trade.objects.create(\n                    broker=strategy.broker, strategy=strategy, instrument=inst,\n                    code=new_bar.code, direction=DirectionType.LONG,\n                    open_time=cur_date, shares=1, filled_shares=1, avg_entry_price=new_bar.open)\n                cur_pos = cur_idx\n            elif df.short_trend[idx] < df.long_trend[idx] and int(df.close[idx]) < int(df.low_line[idx-1]):\n                new_bar = MainBar.objects.filter(\n                    exchange=inst.exchange, product_code=inst.product_code,\n                    time=df.index[cur_idx].to_pydatetime().date()).first()\n                if new_bar is None:\n                    continue\n                Signal.objects.create(\n                    code=new_bar.code, trigger_value=df.atr[idx],\n                    strategy=strategy, instrument=inst, type=SignalType.SELL_SHORT, processed=True,\n                    trigger_time=prev_date, price=new_bar.open, volume=1, priority=PriorityType.LOW)\n                last_trade = Trade.objects.create(\n                    broker=strategy.broker, strategy=strategy, instrument=inst,\n                    code=new_bar.code, direction=DirectionType.SHORT,\n                    open_time=cur_date, shares=1, filled_shares=1, avg_entry_price=new_bar.open)\n                cur_pos = cur_idx * -1\n        elif cur_pos > 0 and last_trade is not None and prev_date > last_trade.open_time:\n            hh = float(MainBar.objects.filter(\n                exchange=inst.exchange, product_code=inst.product_code,\n                time__gte=last_trade.open_time,\n                time__lt=prev_date).aggregate(Max('high'))['high__max'])\n            if df.close[idx] <= hh - df.atr[cur_pos-1] * stop_n:\n                new_bar = MainBar.objects.filter(\n                    exchange=inst.exchange, product_code=inst.product_code,\n                    time=df.index[cur_idx].to_pydatetime().date()).first()\n                if new_bar is None or last_trade.avg_entry_price is None:\n                    continue\n                Signal.objects.create(\n                    strategy=strategy, instrument=inst, type=SignalType.SELL, processed=True,\n                    code=new_bar.code,\n                    trigger_time=prev_date, price=new_bar.open, volume=1, priority=PriorityType.LOW)\n                last_trade.avg_exit_price = new_bar.open\n                last_trade.close_time = cur_date\n                last_trade.closed_shares = 1\n                last_trade.profit = (new_bar.open - last_trade.avg_entry_price) * (inst.volume_multiple or 0)\n                last_trade.save()\n                cur_pos = 0\n        elif cur_pos < 0 and last_trade is not None and prev_date > last_trade.open_time:\n            ll = float(MainBar.objects.filter(\n                exchange=inst.exchange, product_code=inst.product_code,\n                time__gte=last_trade.open_time,\n                time__lt=prev_date).aggregate(Min('low'))['low__min'])\n            if df.close[idx] >= ll + df.atr[cur_pos * -1-1] * stop_n:\n                new_bar = MainBar.objects.filter(\n                    exchange=inst.exchange, product_code=inst.product_code,\n                    time=df.index[cur_idx].to_pydatetime().date()).first()\n                if new_bar is None or last_trade.avg_entry_price is None:\n                    continue\n                Signal.objects.create(\n                    code=new_bar.code,\n                    strategy=strategy, instrument=inst, type=SignalType.BUY_COVER, processed=True,\n                    trigger_time=prev_date, price=new_bar.open, volume=1, priority=PriorityType.LOW)\n                last_trade.avg_exit_price = new_bar.open\n                last_trade.close_time = cur_date\n                last_trade.closed_shares = 1\n                last_trade.profit = (last_trade.avg_entry_price - new_bar.open) * (inst.volume_multiple or 0)\n                last_trade.save()\n                cur_pos = 0\n        if cur_pos != 0 and cur_date.date() == day.date() and last_trade is not None and last_trade.avg_entry_price is not None:\n            last_trade.avg_exit_price = df.open[cur_idx]\n            last_trade.close_time = cur_date\n            last_trade.closed_shares = 1\n            open_price = Decimal(str(df.open[cur_idx]))\n            if last_trade.direction == DirectionType.LONG:\n                last_trade.profit = (last_trade.avg_entry_price - Decimal(df.open[cur_idx])) * \\\n                                    (inst.volume_multiple or 0)\n            else:\n                last_trade.profit = (open_price - last_trade.avg_entry_price) * \\\n                                    (inst.volume_multiple or 0)\n            last_trade.save()\n\n\ndef calc_his_all(day: datetime.datetime):\n    strategy = Strategy.objects.get(name='大哥2.0')\n    print(f'calc_his_all day: {day} stragety: {strategy}')\n    for inst in strategy.instruments.all():\n        print('process', inst)\n        last_day = Trade.objects.filter(instrument=inst, close_time__isnull=True).values_list(\n            'open_time', flat=True).first()\n        if last_day is None:\n            last_main_day = MainBar.objects.filter(product_code=inst.product_code, time__lte=day).order_by(\n                '-time').values_list('time', flat=True).first()\n            if last_main_day is None:\n                continue\n            last_day = timezone.make_aware(datetime.datetime.combine(last_main_day, datetime.time.min))\n        calc_history_signal(inst, last_day, strategy)\n\n\ndef calc_his_up_limit(inst: Instrument, bar: DailyBar):\n    ratio = Decimal(round(float(inst.up_limit_ratio or Decimal('0')), 3))\n    settlement = cast(Decimal, bar.settlement or bar.close)\n    tick = cast(Decimal, inst.price_tick or Decimal('0.001'))\n    price = price_round(settlement * (Decimal(1) + ratio), tick)\n    return price - tick\n\n\ndef calc_his_down_limit(inst: Instrument, bar: DailyBar):\n    ratio = Decimal(round(float(inst.down_limit_ratio or Decimal('0')), 3))\n    settlement = cast(Decimal, bar.settlement or bar.close)\n    tick = cast(Decimal, inst.price_tick or Decimal('0.001'))\n    price = price_round(settlement * (Decimal(1) - ratio), tick)\n    return price + tick\n\n\nasync def clean_daily_bar():\n    day = timezone.make_aware(datetime.datetime.strptime('20100416', '%Y%m%d'))\n    end = timezone.make_aware(datetime.datetime.strptime('20160118', '%Y%m%d'))\n    tasks = []\n    while day <= end:\n        tasks.append(is_trading_day(day))\n        day += datetime.timedelta(days=1)\n    trading_days = []\n    for f in tqdm(asyncio.as_completed(tasks), total=len(tasks)):\n        rst = await f\n        trading_days.append(rst)\n    tasks.clear()\n    for day, trading in trading_days:\n        if not trading:\n            DailyBar.objects.filter(time=day.date()).delete()\n    print('done!')\n\n\ndef load_kt_data(directory: str = r'D:\\test'):\n    \"\"\"PK99.txt\n    1210224,10944.000  ,10992.000  ,10758.000  ,10904.000  ,10702.000  ,42202  ,20897  ,PK2110\n    \"\"\"\n    try:\n        for filename in os.listdir(directory):\n            if not filename.endswith(\".txt\"):\n                continue\n            code = filename.split('9', maxsplit=1)[0]\n            inst = Instrument.objects.get(product_code=code)\n            print('process', inst)\n            cur_main = last_main = change_time = None\n            insert_list = []\n            with open(os.path.join(directory, filename)) as f:\n                for line in f:\n                    date, oo, hh, ll, cc, se, oi, vo, main_code = [part.strip() for part in line.split(',')]\n                    date = f'{int(date[:3])+1900}-{date[3:5]}-{date[5:7]}'\n                    date = timezone.make_aware(datetime.datetime.strptime(date, '%Y-%m-%d'))\n                    if cur_main != main_code:\n                        if last_main != main_code:\n                            last_main = cur_main\n                        cur_main = main_code\n                        change_time = date\n                    insert_list.append(MainBar(\n                        exchange=inst.exchange, product_code=code, code=main_code, time=date, open=oo, high=hh, low=ll,\n                        close=cc, settlement=se, open_interest=oi, volume=vo, basis=None))\n            MainBar.objects.bulk_create(insert_list)\n            Instrument.objects.filter(product_code=code).update(\n                last_main=last_main, main_code=cur_main, change_time=change_time)\n        return True\n    except Exception as e:\n        logger.warning(f'load_kt_data failed: {repr(e)}', exc_info=True)\n        return False\n\n\n# 从交易所获取合约当日的涨跌停幅度 TODO: 广期所\nasync def get_contracts_argument(day: datetime.datetime | None = None) -> bool:\n    try:\n        if day is None:\n            day = timezone.localtime()\n        day_str = day.strftime('%Y%m%d')\n        async with aiohttp.ClientSession() as session:\n            # 上期所\n            async with session.get(\n                    f'http://{shfe_ip}/data/busiparamdata/future/ContractDailyTradeArgument{day_str}.dat') as response:\n                rst = await response.read()\n                rst_json = orjson.loads(rst)\n                for inst_data in rst_json['ContractDailyTradeArgument']:\n                    \"\"\"\n{\"HDEGE_LONGMARGINRATIO\":\".10000000\",\"HDEGE_SHORTMARGINRATIO\":\".10000000\",\"INSTRUMENTID\":\"cu2201\",\n\"LOWER_VALUE\":\".08000000\",\"PRICE_LIMITS\":\"\",\"SPEC_LONGMARGINRATIO\":\".10000000\",\"SPEC_SHORTMARGINRATIO\":\".10000000\",\n\"TRADINGDAY\":\"20211217\",\"UPDATE_DATE\":\"2021-12-17 09:51:20\",\"UPPER_VALUE\":\".08000000\",\"id\":124468118}\n                    \"\"\"\n                    # logger.info(f'inst_data: {inst_data}')\n                    code = re.findall('[A-Za-z]+', inst_data['INSTRUMENTID'])[0]\n                    if code in IGNORE_INST_LIST:\n                        continue\n                    limit_ratio = str_to_number(inst_data['UPPER_VALUE'])\n                    key = f\"LIMITRATIO:{ExchangeType.SHFE}:{code}:{inst_data['INSTRUMENTID']}\"\n                    state_store.set(key, limit_ratio)\n            # 大商所\n            async with session.post(f'http://{dce_ip}/publicweb/notificationtips/exportDayTradPara.html',\n                                    data={'exportFlag': 'txt'}) as response:\n                rst = await response.text()\n                for lines in rst.split('\\r\\n')[3:400]:\n                    # 跳过期权合约\n                    if '本系列限额' in lines:\n                        break\n                    inst_data_raw = [x.strip() for x in lines.split('\\t')]\n                    inst_data = []\n                    for cell in inst_data_raw:\n                        if len(cell) > 0:\n                            inst_data.append(cell)\n                    if len(inst_data) == 0:\n                        continue\n                    \"\"\"\n[0合约,1交易保证金比例(投机),2交易保证金金额（元/手）(投机),3交易保证金比例(套保),4交易保证金金额（元/手）(套保),5涨跌停板比例,\n     6涨停板价位（元）,7跌停板价位（元）]\n['a2201','0.12','7,290','0.08','4,860','0.08','6,561','5,589','30,000','15,000']\n                    \"\"\"\n                    code = re.findall('[A-Za-z]+', inst_data[0])[0]\n                    if code in IGNORE_INST_LIST:\n                        continue\n                    limit_ratio = str_to_number(inst_data[5])\n                    key = f\"LIMITRATIO:{ExchangeType.DCE}:{code}:{inst_data[0]}\"\n                    state_store.set(key, limit_ratio)\n            # 郑商所\n            async with session.get(f'http://{czce_ip}/cn/DFSStaticFiles/Future/{day.year}/{day_str}/'\n                                   f'FutureDataClearParams.txt') as response:\n                rst = await response.text()\n                for lines in rst.split('\\n')[2:]:\n                    if not lines:\n                        continue\n                    inst_data = [x.strip() for x in lines.split('|' if '|' in lines else ',')]\n                    \"\"\"\n[0合约代码,1当日结算价,2是否单边市,3连续单边市天数,4交易保证金率(%),5涨跌停板(%),6交易手续费,7交割手续费,8日内平今仓交易手续费,9日持仓限额]\n['AP201','8,148.00','N','0','10','±9','5.00','0.00','20.00','200','']\n                    \"\"\"\n                    code = re.findall('[A-Za-z]+', inst_data[0])[0]\n                    if code in IGNORE_INST_LIST:\n                        continue\n                    limit_ratio = str_to_number(inst_data[5][1:]) / 100\n                    key = f\"LIMITRATIO:{ExchangeType.CZCE}:{code}:{inst_data[0]}\"\n                    state_store.set(key, limit_ratio)\n            # 中金所\n            async with session.get(f\"http://{cffex_ip}/sj/jycs/{day.strftime('%Y%m/%d')}/index.xml\") as response:\n                rst = await response.text()\n                max_conn_cffex.release()\n                tree = ET.fromstring(rst)\n                for inst_data in tree:\n                    \"\"\"\n                    <INDEX>\n                    <TRADING_DAY>20211216</TRADING_DAY>\n                    <PRODUCT_ID>IC</PRODUCT_ID>\n                    <INSTRUMENT_ID>IC2112</INSTRUMENT_ID>\n                    <INSTRUMENT_MONTH>2112</INSTRUMENT_MONTH>\n                    <BASIS_PRICE>6072.8</BASIS_PRICE>\n                    <OPEN_DATE>20210419</OPEN_DATE>\n                    <END_TRADING_DAY>20211217</END_TRADING_DAY>\n                    <UPPER_VALUE>0.1</UPPER_VALUE>\n                    <LOWER_VALUE>0.1</LOWER_VALUE>\n                    <UPPERLIMITPRICE>8063.6</UPPERLIMITPRICE>\n                    <LOWERLIMITPRICE>6597.6</LOWERLIMITPRICE>\n                    <LONG_LIMIT>1200</LONG_LIMIT>\n                    </INDEX>\n                    \"\"\"\n                    inst_id = (inst_data.findtext('INSTRUMENT_ID') or '').strip()\n                    # 不存储期权合约\n                    if len(inst_id) > 6:\n                        continue\n                    code = (inst_data.findtext('PRODUCT_ID') or '').strip()\n                    if code in IGNORE_INST_LIST:\n                        continue\n                    limit_ratio = str_to_number((inst_data.findtext('UPPER_VALUE') or '0').strip())\n                    key = f\"LIMITRATIO:{ExchangeType.CFFEX}:{code}:{inst_id}\"\n                    state_store.set(key, limit_ratio)\n            # 保存数据\n            for inst in Instrument.objects.all():\n                key = f\"LIMITRATIO:{inst.exchange}:{inst.product_code}:{inst.main_code}\"\n                ratio = state_store.get(key)\n                if ratio:\n                    ratio = str_to_number(ratio)\n                    ratio_decimal = Decimal(str(ratio))\n                    inst.up_limit_ratio = ratio_decimal\n                    inst.down_limit_ratio = ratio_decimal\n                    inst.save(update_fields=['up_limit_ratio', 'down_limit_ratio'])\n        return True\n    except Exception as e:\n        logger.warning(f'get_contracts_argument failed: {repr(e)}', exc_info=True)\n        return False\n"
  },
  {
    "path": "utils/fetch_data.py",
    "content": "import sys\nimport os\nimport datetime\nimport asyncio\nimport pytz\n\nfrom tqdm import tqdm\nimport django\nROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nif ROOT not in sys.path:\n    sys.path.insert(0, ROOT)\nos.environ[\"DJANGO_SETTINGS_MODULE\"] = \"dashboard.settings\"\nos.environ[\"DJANGO_ALLOW_ASYNC_UNSAFE\"] = \"true\"\ndjango.setup()\nfrom utils import update_from_shfe, update_from_dce, update_from_czce, update_from_cffex, \\\n    create_main_all, check_trading_day\nfrom django.utils import timezone\n\n\nasync def fetch_bar():\n    day_end = timezone.localtime()\n    day_start = day_end - datetime.timedelta(days=365)\n    tasks = []\n    while day_start <= day_end:\n        tasks.append(check_trading_day(day_start))\n        day_start += datetime.timedelta(days=1)\n    trading_days = []\n    for f in tqdm(asyncio.as_completed(tasks), total=len(tasks)):\n        rst = await f\n        trading_days.append(rst)\n    tasks.clear()\n    for day, trading in trading_days:\n        if trading:\n            tasks += [\n                asyncio.ensure_future(update_from_shfe(day)),\n                asyncio.ensure_future(update_from_dce(day)),\n                asyncio.ensure_future(update_from_czce(day)),\n                asyncio.ensure_future(update_from_cffex(day)),\n            ]\n    print('task len=', len(tasks))\n    for f in tqdm(asyncio.as_completed(tasks), total=len(tasks)):\n        await f\n\n\nasync def fetch_bar2():\n    day_end = timezone.localtime()\n    day_start = day_end - datetime.timedelta(days=365)\n    while day_start <= day_end:\n        day, trading = await check_trading_day(day_start)\n        if trading:\n            print('process ', day)\n            tasks = [\n                asyncio.ensure_future(update_from_shfe(day)),\n                asyncio.ensure_future(update_from_dce(day)),\n                asyncio.ensure_future(update_from_czce(day)),\n                asyncio.ensure_future(update_from_cffex(day)),\n            ]\n            await asyncio.wait(tasks)\n        day_start += datetime.timedelta(days=1)\n    print('all done!')\n\n\n# asyncio.get_event_loop().run_until_complete(fetch_bar2())\ncreate_main_all()\n# fetch_from_quandl_all()\n# clean_dailybar()\n# load_kt_data()\n# calc_his_all(timezone.localtime()-datetime.timedelta(days=1))\n"
  },
  {
    "path": "utils/func_container.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\n\nfrom abc import ABCMeta\nfrom functools import wraps\n\n\ndef RegisterCallback(**out_kwargs):\n    def _callback_handler(func):\n        @wraps(func)\n        def wrapper(self, *args, **kwargs):\n            return func(self, *args, *kwargs)\n\n        for key, value in out_kwargs.items():\n            setattr(wrapper, f'arg_{key}', value)\n        setattr(wrapper, 'is_callback_function', True)\n        return wrapper\n\n    return _callback_handler\n\n\nclass CallbackFunctionContainer(object, metaclass=ABCMeta):\n    def __init__(self):\n        self.callback_fun_args = dict()\n        self._collect_all()\n\n    def _collect_all(self):\n        for fun_name in dir(self):\n            fun = getattr(self, fun_name)\n            if hasattr(fun, 'is_callback_function'):\n                params = dict()\n                for arg in dir(fun):\n                    if arg.startswith('arg_'):\n                        params[arg[4:]] = getattr(fun, arg)\n                self.callback_fun_args[fun_name] = params\n"
  },
  {
    "path": "utils/model/__init__.py",
    "content": "from .kronos import KronosTokenizer, Kronos, KronosPredictor\r\n\r\nmodel_dict = {\r\n    'kronos_tokenizer': KronosTokenizer,\r\n    'kronos': Kronos,\r\n    'kronos_predictor': KronosPredictor\r\n}\r\n\r\n\r\ndef get_model_class(model_name):\r\n    if model_name in model_dict:\r\n        return model_dict[model_name]\r\n    else:\r\n        print(f\"Model {model_name} not found in model_dict\")\r\n        raise NotImplementedError\r\n\r\n\r\n"
  },
  {
    "path": "utils/model/kronos.py",
    "content": "import numpy as np\r\nimport pandas as pd\r\nimport torch\r\nfrom huggingface_hub import PyTorchModelHubMixin\r\n\r\nfrom tqdm import trange\r\n\r\nfrom .module import *\r\n\r\n\r\nclass KronosTokenizer(nn.Module, PyTorchModelHubMixin):\r\n    \"\"\"\r\n    KronosTokenizer module for tokenizing input data using a hybrid quantization approach.\r\n\r\n    This tokenizer utilizes a combination of encoder and decoder Transformer blocks\r\n    along with the Binary Spherical Quantization (BSQuantizer) to compress and decompress input data.\r\n\r\n    Args:\r\n           d_in (int): Input dimension.\r\n           d_model (int): Model dimension.\r\n           n_heads (int): Number of attention heads.\r\n           ff_dim (int): Feed-forward dimension.\r\n           n_enc_layers (int): Number of encoder layers.\r\n           n_dec_layers (int): Number of decoder layers.\r\n           ffn_dropout_p (float): Dropout probability for feed-forward networks.\r\n           attn_dropout_p (float): Dropout probability for attention mechanisms.\r\n           resid_dropout_p (float): Dropout probability for residual connections.\r\n           s1_bits (int): Number of bits for the pre token in BSQuantizer.\r\n           s2_bits (int): Number of bits for the post token in BSQuantizer.\r\n           beta (float): Beta parameter for BSQuantizer.\r\n           gamma0 (float): Gamma0 parameter for BSQuantizer.\r\n           gamma (float): Gamma parameter for BSQuantizer.\r\n           zeta (float): Zeta parameter for BSQuantizer.\r\n           group_size (int): Group size parameter for BSQuantizer.\r\n\r\n    \"\"\"\r\n\r\n    def __init__(self, d_in, d_model, n_heads, ff_dim, n_enc_layers, n_dec_layers, ffn_dropout_p, attn_dropout_p, resid_dropout_p, s1_bits, s2_bits, beta, gamma0, gamma, zeta, group_size):\r\n\r\n        super().__init__()\r\n        self.d_in = d_in\r\n        self.d_model = d_model\r\n        self.n_heads = n_heads\r\n        self.ff_dim = ff_dim\r\n        self.enc_layers = n_enc_layers\r\n        self.dec_layers = n_dec_layers\r\n        self.ffn_dropout_p = ffn_dropout_p\r\n        self.attn_dropout_p = attn_dropout_p\r\n        self.resid_dropout_p = resid_dropout_p\r\n\r\n        self.s1_bits = s1_bits\r\n        self.s2_bits = s2_bits\r\n        self.codebook_dim = s1_bits + s2_bits # Total dimension of the codebook after quantization\r\n        self.embed = nn.Linear(self.d_in, self.d_model)\r\n        self.head = nn.Linear(self.d_model, self.d_in)\r\n\r\n        # Encoder Transformer Blocks\r\n        self.encoder = nn.ModuleList([\r\n            TransformerBlock(self.d_model, self.n_heads, self.ff_dim, self.ffn_dropout_p, self.attn_dropout_p, self.resid_dropout_p)\r\n            for _ in range(self.enc_layers - 1)\r\n        ])\r\n        # Decoder Transformer Blocks\r\n        self.decoder = nn.ModuleList([\r\n            TransformerBlock(self.d_model, self.n_heads, self.ff_dim, self.ffn_dropout_p, self.attn_dropout_p, self.resid_dropout_p)\r\n            for _ in range(self.dec_layers - 1)\r\n        ])\r\n        self.quant_embed = nn.Linear(in_features=self.d_model, out_features=self.codebook_dim) # Linear layer before quantization\r\n        self.post_quant_embed_pre = nn.Linear(in_features=self.s1_bits, out_features=self.d_model) # Linear layer after quantization (pre part - s1 bits)\r\n        self.post_quant_embed = nn.Linear(in_features=self.codebook_dim, out_features=self.d_model) # Linear layer after quantization (full codebook)\r\n        self.tokenizer = BSQuantizer(self.s1_bits, self.s2_bits, beta, gamma0, gamma, zeta, group_size) # BSQuantizer module\r\n\r\n    def forward(self, x):\r\n        \"\"\"\r\n        Forward pass of the KronosTokenizer.\r\n\r\n        Args:\r\n            x (torch.Tensor): Input tensor of shape (batch_size, seq_len, d_in).\r\n\r\n        Returns:\r\n            tuple: A tuple containing:\r\n                - tuple: (z_pre, z) - Reconstructed outputs from decoder with s1_bits and full codebook respectively,\r\n                         both of shape (batch_size, seq_len, d_in).\r\n                - torch.Tensor: bsq_loss - Loss from the BSQuantizer.\r\n                - torch.Tensor: quantized - Quantized representation from BSQuantizer.\r\n                - torch.Tensor: z_indices - Indices from the BSQuantizer.\r\n        \"\"\"\r\n        z = self.embed(x)\r\n\r\n        for layer in self.encoder:\r\n            z = layer(z)\r\n\r\n        z = self.quant_embed(z) # (B, T, codebook)\r\n\r\n        bsq_loss, quantized, z_indices = self.tokenizer(z)\r\n\r\n        quantized_pre = quantized[:, :, :self.s1_bits] # Extract the first part of quantized representation (s1_bits)\r\n        z_pre = self.post_quant_embed_pre(quantized_pre)\r\n\r\n        z = self.post_quant_embed(quantized)\r\n\r\n        # Decoder layers (for pre part - s1 bits)\r\n        for layer in self.decoder:\r\n            z_pre = layer(z_pre)\r\n        z_pre = self.head(z_pre)\r\n\r\n        # Decoder layers (for full codebook)\r\n        for layer in self.decoder:\r\n            z = layer(z)\r\n        z = self.head(z)\r\n\r\n        return (z_pre, z), bsq_loss, quantized, z_indices\r\n\r\n    def indices_to_bits(self, x, half=False):\r\n        \"\"\"\r\n        Converts indices to bit representations and scales them.\r\n\r\n        Args:\r\n            x (torch.Tensor): Indices tensor.\r\n            half (bool, optional): Whether to process only half of the codebook dimension. Defaults to False.\r\n\r\n        Returns:\r\n            torch.Tensor: Bit representation tensor.\r\n        \"\"\"\r\n        if half:\r\n            x1 = x[0] # Assuming x is a tuple of indices if half is True\r\n            x2 = x[1]\r\n            mask = 2 ** torch.arange(self.codebook_dim//2, device=x1.device, dtype=torch.long) # Create a mask for bit extraction\r\n            x1 = (x1.unsqueeze(-1) & mask) != 0 # Extract bits for the first half\r\n            x2 = (x2.unsqueeze(-1) & mask) != 0 # Extract bits for the second half\r\n            x = torch.cat([x1, x2], dim=-1) # Concatenate the bit representations\r\n        else:\r\n            mask = 2 ** torch.arange(self.codebook_dim, device=x.device, dtype=torch.long) # Create a mask for bit extraction\r\n            x = (x.unsqueeze(-1) & mask) != 0 # Extract bits\r\n\r\n        x = x.float() * 2 - 1 # Convert boolean to bipolar (-1, 1)\r\n        q_scale = 1. / (self.codebook_dim ** 0.5) # Scaling factor\r\n        x = x * q_scale\r\n        return x\r\n\r\n    def encode(self, x, half=False):\r\n        \"\"\"\r\n        Encodes the input data into quantized indices.\r\n\r\n        Args:\r\n            x (torch.Tensor): Input tensor of shape (batch_size, seq_len, d_in).\r\n            half (bool, optional): Whether to use half quantization in BSQuantizer. Defaults to False.\r\n\r\n        Returns:\r\n            torch.Tensor: Quantized indices from BSQuantizer.\r\n        \"\"\"\r\n        z = self.embed(x)\r\n        for layer in self.encoder:\r\n            z = layer(z)\r\n        z = self.quant_embed(z)\r\n\r\n        bsq_loss, quantized, z_indices = self.tokenizer(z, half)\r\n        return z_indices\r\n\r\n    def decode(self, x, half=False):\r\n        \"\"\"\r\n        Decodes quantized indices back to the input data space.\r\n\r\n        Args:\r\n            x (torch.Tensor): Quantized indices tensor.\r\n            half (bool, optional): Whether the indices were generated with half quantization. Defaults to False.\r\n\r\n        Returns:\r\n            torch.Tensor: Reconstructed output tensor of shape (batch_size, seq_len, d_in).\r\n        \"\"\"\r\n        quantized = self.indices_to_bits(x, half)\r\n        z = self.post_quant_embed(quantized)\r\n        for layer in self.decoder:\r\n            z = layer(z)\r\n        z = self.head(z)\r\n        return z\r\n\r\n\r\nclass Kronos(nn.Module, PyTorchModelHubMixin):\r\n    \"\"\"\r\n    Kronos Model.\r\n\r\n    Args:\r\n        s1_bits (int): Number of bits for pre tokens.\r\n        s2_bits (int): Number of bits for post tokens.\r\n        n_layers (int): Number of Transformer blocks.\r\n        d_model (int): Dimension of the model's embeddings and hidden states.\r\n        n_heads (int): Number of attention heads in the MultiheadAttention layers.\r\n        ff_dim (int): Dimension of the feedforward network in the Transformer blocks.\r\n        ffn_dropout_p (float): Dropout probability for the feedforward network.\r\n        attn_dropout_p (float): Dropout probability for the attention layers.\r\n        resid_dropout_p (float): Dropout probability for residual connections.\r\n        token_dropout_p (float): Dropout probability for token embeddings.\r\n        learn_te (bool): Whether to use learnable temporal embeddings.\r\n    \"\"\"\r\n\r\n    def __init__(self, s1_bits, s2_bits, n_layers, d_model, n_heads, ff_dim, ffn_dropout_p, attn_dropout_p, resid_dropout_p, token_dropout_p, learn_te):\r\n        super().__init__()\r\n        self.s1_bits = s1_bits\r\n        self.s2_bits = s2_bits\r\n        self.n_layers = n_layers\r\n        self.d_model = d_model\r\n        self.n_heads = n_heads\r\n        self.learn_te = learn_te\r\n        self.ff_dim = ff_dim\r\n        self.ffn_dropout_p = ffn_dropout_p\r\n        self.attn_dropout_p = attn_dropout_p\r\n        self.resid_dropout_p = resid_dropout_p\r\n        self.token_dropout_p = token_dropout_p\r\n\r\n        self.s1_vocab_size = 2 ** self.s1_bits\r\n        self.token_drop = nn.Dropout(self.token_dropout_p)\r\n        self.embedding = HierarchicalEmbedding(self.s1_bits, self.s2_bits, self.d_model)\r\n        self.time_emb = TemporalEmbedding(self.d_model, self.learn_te)\r\n        self.transformer = nn.ModuleList([\r\n            TransformerBlock(self.d_model, self.n_heads, self.ff_dim, self.ffn_dropout_p, self.attn_dropout_p, self.resid_dropout_p)\r\n            for _ in range(self.n_layers)\r\n        ])\r\n        self.norm = RMSNorm(self.d_model)\r\n        self.dep_layer = DependencyAwareLayer(self.d_model)\r\n        self.head = DualHead(self.s1_bits, self.s2_bits, self.d_model)\r\n        self.apply(self._init_weights)\r\n\r\n    def _init_weights(self, module):\r\n\r\n        if isinstance(module, nn.Linear):\r\n            nn.init.xavier_normal_(module.weight)\r\n            if module.bias is not None:\r\n                nn.init.zeros_(module.bias)\r\n        elif isinstance(module, nn.Embedding):\r\n            nn.init.normal_(module.weight, mean=0, std=self.embedding.d_model ** -0.5)\r\n        elif isinstance(module, nn.LayerNorm):\r\n            nn.init.ones_(module.weight)\r\n            nn.init.zeros_(module.bias)\r\n        elif isinstance(module, RMSNorm):\r\n            nn.init.ones_(module.weight)\r\n\r\n    def forward(self, s1_ids, s2_ids, stamp=None, padding_mask=None, use_teacher_forcing=False, s1_targets=None):\r\n        \"\"\"\r\n        Args:\r\n            s1_ids (torch.Tensor): Input tensor of s1 token IDs. Shape: [batch_size, seq_len]\r\n            s2_ids (torch.Tensor): Input tensor of s2 token IDs. Shape: [batch_size, seq_len]\r\n            stamp (torch.Tensor, optional): Temporal stamp tensor. Shape: [batch_size, seq_len]. Defaults to None.\r\n            padding_mask (torch.Tensor, optional): Mask for padding tokens. Shape: [batch_size, seq_len]. Defaults to None.\r\n            use_teacher_forcing (bool, optional): Whether to use teacher forcing for s1 decoding. Defaults to False.\r\n            s1_targets (torch.Tensor, optional): Target s1 token IDs for teacher forcing. Shape: [batch_size, seq_len]. Defaults to None.\r\n\r\n        Returns:\r\n            Tuple[torch.Tensor, torch.Tensor]:\r\n                - s1 logits: Logits for s1 token predictions. Shape: [batch_size, seq_len, s1_vocab_size]\r\n                - s2_logits: Logits for s2 token predictions, conditioned on s1. Shape: [batch_size, seq_len, s2_vocab_size]\r\n        \"\"\"\r\n        x = self.embedding([s1_ids, s2_ids])\r\n        if stamp is not None:\r\n            time_embedding = self.time_emb(stamp)\r\n            x = x + time_embedding\r\n        x = self.token_drop(x)\r\n\r\n        for layer in self.transformer:\r\n            x = layer(x, key_padding_mask=padding_mask)\r\n\r\n        x = self.norm(x)\r\n\r\n        s1_logits = self.head(x)\r\n\r\n        if use_teacher_forcing:\r\n            sibling_embed = self.embedding.emb_s1(s1_targets)\r\n        else:\r\n            s1_probs = F.softmax(s1_logits.detach(), dim=-1)\r\n            sample_s1_ids = torch.multinomial(s1_probs.view(-1, self.s1_vocab_size), 1).view(s1_ids.shape)\r\n            sibling_embed = self.embedding.emb_s1(sample_s1_ids)\r\n\r\n        x2 = self.dep_layer(x, sibling_embed, key_padding_mask=padding_mask) # Dependency Aware Layer: Condition on s1 embeddings\r\n        s2_logits = self.head.cond_forward(x2)\r\n        return s1_logits, s2_logits\r\n\r\n    def decode_s1(self, s1_ids, s2_ids, stamp=None, padding_mask=None):\r\n        \"\"\"\r\n        Decodes only the s1 tokens.\r\n\r\n        This method performs a forward pass to predict only s1 tokens. It returns the s1 logits\r\n        and the context representation from the Transformer, which can be used for subsequent s2 decoding.\r\n\r\n        Args:\r\n            s1_ids (torch.Tensor): Input tensor of s1 token IDs. Shape: [batch_size, seq_len]\r\n            s2_ids (torch.Tensor): Input tensor of s2 token IDs. Shape: [batch_size, seq_len]\r\n            stamp (torch.Tensor, optional): Temporal stamp tensor. Shape: [batch_size, seq_len]. Defaults to None.\r\n            padding_mask (torch.Tensor, optional): Mask for padding tokens. Shape: [batch_size, seq_len]. Defaults to None.\r\n\r\n        Returns:\r\n            Tuple[torch.Tensor, torch.Tensor]:\r\n                - s1 logits: Logits for s1 token predictions. Shape: [batch_size, seq_len, s1_vocab_size]\r\n                - context: Context representation from the Transformer. Shape: [batch_size, seq_len, d_model]\r\n        \"\"\"\r\n        x = self.embedding([s1_ids, s2_ids])\r\n        if stamp is not None:\r\n            time_embedding = self.time_emb(stamp)\r\n            x = x + time_embedding\r\n        x = self.token_drop(x)\r\n\r\n        for layer in self.transformer:\r\n            x = layer(x, key_padding_mask=padding_mask)\r\n\r\n        x = self.norm(x)\r\n\r\n        s1_logits = self.head(x)\r\n        return s1_logits, x\r\n\r\n    def decode_s2(self, context, s1_ids, padding_mask=None):\r\n        \"\"\"\r\n        Decodes the s2 tokens, conditioned on the context and s1 tokens.\r\n\r\n        This method decodes s2 tokens based on a pre-computed context representation (typically from `decode_s1`)\r\n        and the s1 token IDs. It uses the dependency-aware layer and the conditional s2 head to predict s2 tokens.\r\n\r\n        Args:\r\n            context (torch.Tensor): Context representation from the transformer (output of decode_s1).\r\n                                     Shape: [batch_size, seq_len, d_model]\r\n            s1_ids (torch.torch.Tensor): Input tensor of s1 token IDs. Shape: [batch_size, seq_len]\r\n            padding_mask (torch.Tensor, optional): Mask for padding tokens. Shape: [batch_size, seq_len]. Defaults to None.\r\n\r\n        Returns:\r\n            torch.Tensor: s2 logits. Shape: [batch_size, seq_len, s2_vocab_size]\r\n        \"\"\"\r\n        sibling_embed = self.embedding.emb_s1(s1_ids)\r\n        x2 = self.dep_layer(context, sibling_embed, key_padding_mask=padding_mask)\r\n        return self.head.cond_forward(x2)\r\n\r\n\r\ndef top_k_top_p_filtering(\r\n        logits,\r\n        top_k: int = 0,\r\n        top_p: float = 1.0,\r\n        filter_value: float = -float(\"Inf\"),\r\n        min_tokens_to_keep: int = 1,\r\n):\r\n    \"\"\"Filter a distribution of logits using top-k and/or nucleus (top-p) filtering\r\n    Args:\r\n        logits: logits distribution shape (batch size, vocabulary size)\r\n        if top_k > 0: keep only top k tokens with highest probability (top-k filtering).\r\n        if top_p < 1.0: keep the top tokens with cumulative probability >= top_p (nucleus filtering).\r\n            Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751)\r\n        Make sure we keep at least min_tokens_to_keep per batch example in the output\r\n    From: https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317\r\n    \"\"\"\r\n    if top_k > 0:\r\n        top_k = min(max(top_k, min_tokens_to_keep), logits.size(-1))  # Safety check\r\n        # Remove all tokens with a probability less than the last token of the top-k\r\n        indices_to_remove = logits < torch.topk(logits, top_k)[0][..., -1, None]\r\n        logits[indices_to_remove] = filter_value\r\n        return logits\r\n\r\n    if top_p < 1.0:\r\n        sorted_logits, sorted_indices = torch.sort(logits, descending=True)\r\n        cumulative_probs = torch.cumsum(F.softmax(sorted_logits, dim=-1), dim=-1)\r\n\r\n        # Remove tokens with cumulative probability above the threshold (token with 0 are kept)\r\n        sorted_indices_to_remove = cumulative_probs > top_p\r\n        if min_tokens_to_keep > 1:\r\n            # Keep at least min_tokens_to_keep (set to min_tokens_to_keep-1 because we add the first one below)\r\n            sorted_indices_to_remove[..., :min_tokens_to_keep] = 0\r\n        # Shift the indices to the right to keep also the first token above the threshold\r\n        sorted_indices_to_remove[..., 1:] = sorted_indices_to_remove[..., :-1].clone()\r\n        sorted_indices_to_remove[..., 0] = 0\r\n\r\n        # scatter sorted tensors to original indexing\r\n        indices_to_remove = sorted_indices_to_remove.scatter(1, sorted_indices, sorted_indices_to_remove)\r\n        logits[indices_to_remove] = filter_value\r\n        return logits\r\n\r\n\r\ndef sample_from_logits(logits, temperature=1.0, top_k=None, top_p=None, sample_logits=True):\r\n    logits = logits / temperature\r\n    if top_k is not None or top_p is not None:\r\n        if top_k > 0 or top_p < 1.0:\r\n            logits = top_k_top_p_filtering(logits, top_k=top_k, top_p=top_p)\r\n\r\n    probs = F.softmax(logits, dim=-1)\r\n\r\n    if not sample_logits:\r\n        _, x = top_k(probs, k=1, dim=-1)\r\n    else:\r\n        x = torch.multinomial(probs, num_samples=1)\r\n\r\n    return x\r\n\r\n\r\ndef auto_regressive_inference(tokenizer, model, x, x_stamp, y_stamp, max_context, pred_len, clip=5, T=1.0, top_k=0, top_p=0.99, sample_count=5, verbose=False):\r\n    with torch.no_grad():\r\n        batch_size = x.size(0)\r\n        initial_seq_len = x.size(1)\r\n        x = torch.clip(x, -clip, clip)\r\n\r\n        device = x.device\r\n        x = x.unsqueeze(1).repeat(1, sample_count, 1, 1).reshape(-1, x.size(1), x.size(2)).to(device)\r\n        x_stamp = x_stamp.unsqueeze(1).repeat(1, sample_count, 1, 1).reshape(-1, x_stamp.size(1), x_stamp.size(2)).to(device)\r\n        y_stamp = y_stamp.unsqueeze(1).repeat(1, sample_count, 1, 1).reshape(-1, y_stamp.size(1), y_stamp.size(2)).to(device)\r\n\r\n        x_token = tokenizer.encode(x, half=True)\r\n\r\n        def get_dynamic_stamp(x_stamp, y_stamp, current_seq_len, pred_step):\r\n\r\n            if current_seq_len <= max_context - pred_step:\r\n                return torch.cat([x_stamp, y_stamp[:, :pred_step, :]], dim=1)\r\n            else:\r\n                start_idx = max_context - pred_step\r\n                return torch.cat([x_stamp[:, -start_idx:, :], y_stamp[:, :pred_step, :]], dim=1)\r\n\r\n        if verbose:\r\n            ran = trange\r\n        else:\r\n            ran = range\r\n        for i in ran(pred_len):\r\n            current_seq_len = initial_seq_len + i\r\n\r\n            if current_seq_len <= max_context:\r\n                input_tokens = x_token\r\n            else:\r\n                input_tokens = [t[:, -max_context:].contiguous() for t in x_token]\r\n\r\n            current_stamp = get_dynamic_stamp(x_stamp, y_stamp, current_seq_len, i)\r\n\r\n            s1_logits, context = model.decode_s1(input_tokens[0], input_tokens[1], current_stamp)\r\n            s1_logits = s1_logits[:, -1, :]\r\n            sample_pre = sample_from_logits(s1_logits, temperature=T, top_k=top_k, top_p=top_p, sample_logits=True)\r\n\r\n            s2_logits = model.decode_s2(context, sample_pre)\r\n            s2_logits = s2_logits[:, -1, :]\r\n            sample_post = sample_from_logits(s2_logits, temperature=T, top_k=top_k, top_p=top_p, sample_logits=True)\r\n\r\n            x_token[0] = torch.cat([x_token[0], sample_pre], dim=1)\r\n            x_token[1] = torch.cat([x_token[1], sample_post], dim=1)\r\n\r\n            torch.cuda.empty_cache()\r\n\r\n        input_tokens = [t[:, -max_context:].contiguous() for t in x_token]\r\n        z = tokenizer.decode(input_tokens, half=True)\r\n        z = z.reshape(batch_size, sample_count, z.size(1), z.size(2))\r\n        preds = z.cpu().numpy()\r\n        preds = np.mean(preds, axis=1)\r\n\r\n        return preds\r\n\r\n\r\ndef calc_time_stamps(x_timestamp):\r\n    time_df = pd.DataFrame()\r\n    time_df['minute'] = x_timestamp.dt.minute\r\n    time_df['hour'] = x_timestamp.dt.hour\r\n    time_df['weekday'] = x_timestamp.dt.weekday\r\n    time_df['day'] = x_timestamp.dt.day\r\n    time_df['month'] = x_timestamp.dt.month\r\n    return time_df\r\n\r\n\r\nclass KronosPredictor:\r\n\r\n    def __init__(self, model, tokenizer, device=\"cuda:0\", max_context=512, clip=5):\r\n        self.tokenizer = tokenizer\r\n        self.model = model\r\n        self.max_context = max_context\r\n        self.clip = clip\r\n        self.price_cols = ['open', 'high', 'low', 'close']\r\n        self.vol_col = 'volume'\r\n        self.amt_vol = 'amount'\r\n        self.time_cols = ['minute', 'hour', 'weekday', 'day', 'month']\r\n        self.device = device\r\n\r\n        self.tokenizer = self.tokenizer.to(self.device)\r\n        self.model = self.model.to(self.device)\r\n\r\n    def generate(self, x, x_stamp, y_stamp, pred_len, T, top_k, top_p, sample_count, verbose):\r\n\r\n        x_tensor = torch.from_numpy(np.array(x).astype(np.float32)).to(self.device)\r\n        x_stamp_tensor = torch.from_numpy(np.array(x_stamp).astype(np.float32)).to(self.device)\r\n        y_stamp_tensor = torch.from_numpy(np.array(y_stamp).astype(np.float32)).to(self.device)\r\n\r\n        preds = auto_regressive_inference(self.tokenizer, self.model, x_tensor, x_stamp_tensor, y_stamp_tensor, self.max_context, pred_len,\r\n                                          self.clip, T, top_k, top_p, sample_count, verbose)\r\n        preds = preds[:, -pred_len:, :]\r\n        return preds\r\n\r\n    def predict(self, df, x_timestamp, y_timestamp, pred_len, T=1.0, top_k=0, top_p=0.9, sample_count=1, verbose=True):\r\n\r\n        if not isinstance(df, pd.DataFrame):\r\n            raise ValueError(\"Input must be a pandas DataFrame.\")\r\n\r\n        if not all(col in df.columns for col in self.price_cols):\r\n            raise ValueError(f\"Price columns {self.price_cols} not found in DataFrame.\")\r\n\r\n        df = df.copy()\r\n        if self.vol_col not in df.columns:\r\n            df[self.vol_col] = 0.0  # Fill missing volume with zeros\r\n            df[self.amt_vol] = 0.0  # Fill missing amount with zeros\r\n        if self.amt_vol not in df.columns and self.vol_col in df.columns:\r\n            df[self.amt_vol] = df[self.vol_col] * df[self.price_cols].mean(axis=1)\r\n\r\n        if df[self.price_cols + [self.vol_col, self.amt_vol]].isnull().values.any():\r\n            raise ValueError(\"Input DataFrame contains NaN values in price or volume columns.\")\r\n\r\n        x_time_df = calc_time_stamps(x_timestamp)\r\n        y_time_df = calc_time_stamps(y_timestamp)\r\n\r\n        x = df[self.price_cols + [self.vol_col, self.amt_vol]].values.astype(np.float32)\r\n        x_stamp = x_time_df.values.astype(np.float32)\r\n        y_stamp = y_time_df.values.astype(np.float32)\r\n\r\n        x_mean, x_std = np.mean(x, axis=0), np.std(x, axis=0)\r\n\r\n        x = (x - x_mean) / (x_std + 1e-5)\r\n        x = np.clip(x, -self.clip, self.clip)\r\n\r\n        x = x[np.newaxis, :]\r\n        x_stamp = x_stamp[np.newaxis, :]\r\n        y_stamp = y_stamp[np.newaxis, :]\r\n\r\n        preds = self.generate(x, x_stamp, y_stamp, pred_len, T, top_k, top_p, sample_count, verbose)\r\n\r\n        preds = preds.squeeze(0)\r\n        preds = preds * (x_std + 1e-5) + x_mean\r\n\r\n        pred_df = pd.DataFrame(preds, columns=self.price_cols + [self.vol_col, self.amt_vol], index=y_timestamp)\r\n        return pred_df\r\n\r\n\r\n    def predict_batch(self, df_list, x_timestamp_list, y_timestamp_list, pred_len, T=1.0, top_k=0, top_p=0.9, sample_count=1, verbose=True):\r\n        \"\"\"\r\n        Perform parallel (batch) prediction on multiple time series. All series must have the same historical length and prediction length (pred_len).\r\n\r\n        Args:\r\n            df_list (List[pd.DataFrame]): List of input DataFrames, each containing price columns and optional volume/amount columns.\r\n            x_timestamp_list (List[pd.DatetimeIndex or Series]): List of timestamps corresponding to historical data, length should match the number of rows in each DataFrame.\r\n            y_timestamp_list (List[pd.DatetimeIndex or Series]): List of future prediction timestamps, length should equal pred_len.\r\n            pred_len (int): Number of prediction steps.\r\n            T (float): Sampling temperature.\r\n            top_k (int): Top-k filtering threshold.\r\n            top_p (float): Top-p (nucleus sampling) threshold.\r\n            sample_count (int): Number of parallel samples per series, automatically averaged internally.\r\n            verbose (bool): Whether to display autoregressive progress.\r\n\r\n        Returns:\r\n            List[pd.DataFrame]: List of prediction results in the same order as input, each DataFrame contains\r\n                                `open, high, low, close, volume, amount` columns, indexed by corresponding `y_timestamp`.\r\n        \"\"\"\r\n        # Basic validation\r\n        if not isinstance(df_list, (list, tuple)) or not isinstance(x_timestamp_list, (list, tuple)) or not isinstance(y_timestamp_list, (list, tuple)):\r\n            raise ValueError(\"df_list, x_timestamp_list, y_timestamp_list must be list or tuple types.\")\r\n        if not (len(df_list) == len(x_timestamp_list) == len(y_timestamp_list)):\r\n            raise ValueError(\"df_list, x_timestamp_list, y_timestamp_list must have consistent lengths.\")\r\n\r\n        num_series = len(df_list)\r\n\r\n        x_list = []\r\n        x_stamp_list = []\r\n        y_stamp_list = []\r\n        means = []\r\n        stds = []\r\n        seq_lens = []\r\n        y_lens = []\r\n\r\n        for i in range(num_series):\r\n            df = df_list[i]\r\n            if not isinstance(df, pd.DataFrame):\r\n                raise ValueError(f\"Input at index {i} is not a pandas DataFrame.\")\r\n            if not all(col in df.columns for col in self.price_cols):\r\n                raise ValueError(f\"DataFrame at index {i} is missing price columns {self.price_cols}.\")\r\n\r\n            df = df.copy()\r\n            if self.vol_col not in df.columns:\r\n                df[self.vol_col] = 0.0\r\n                df[self.amt_vol] = 0.0\r\n            if self.amt_vol not in df.columns and self.vol_col in df.columns:\r\n                df[self.amt_vol] = df[self.vol_col] * df[self.price_cols].mean(axis=1)\r\n\r\n            if df[self.price_cols + [self.vol_col, self.amt_vol]].isnull().values.any():\r\n                raise ValueError(f\"DataFrame at index {i} contains NaN values in price or volume columns.\")\r\n\r\n            x_timestamp = x_timestamp_list[i]\r\n            y_timestamp = y_timestamp_list[i]\r\n\r\n            x_time_df = calc_time_stamps(x_timestamp)\r\n            y_time_df = calc_time_stamps(y_timestamp)\r\n\r\n            x = df[self.price_cols + [self.vol_col, self.amt_vol]].values.astype(np.float32)\r\n            x_stamp = x_time_df.values.astype(np.float32)\r\n            y_stamp = y_time_df.values.astype(np.float32)\r\n\r\n            if x.shape[0] != x_stamp.shape[0]:\r\n                raise ValueError(f\"Inconsistent lengths at index {i}: x has {x.shape[0]} vs x_stamp has {x_stamp.shape[0]}.\")\r\n            if y_stamp.shape[0] != pred_len:\r\n                raise ValueError(f\"y_timestamp length at index {i} should equal pred_len={pred_len}, got {y_stamp.shape[0]}.\")\r\n\r\n            x_mean, x_std = np.mean(x, axis=0), np.std(x, axis=0)\r\n            x_norm = (x - x_mean) / (x_std + 1e-5)\r\n            x_norm = np.clip(x_norm, -self.clip, self.clip)\r\n\r\n            x_list.append(x_norm)\r\n            x_stamp_list.append(x_stamp)\r\n            y_stamp_list.append(y_stamp)\r\n            means.append(x_mean)\r\n            stds.append(x_std)\r\n\r\n            seq_lens.append(x_norm.shape[0])\r\n            y_lens.append(y_stamp.shape[0])\r\n\r\n        # Require all series to have consistent historical and prediction lengths for batch processing\r\n        if len(set(seq_lens)) != 1:\r\n            raise ValueError(f\"Parallel prediction requires all series to have consistent historical lengths, got: {seq_lens}\")\r\n        if len(set(y_lens)) != 1:\r\n            raise ValueError(f\"Parallel prediction requires all series to have consistent prediction lengths, got: {y_lens}\")\r\n\r\n        x_batch = np.stack(x_list, axis=0).astype(np.float32)           # (B, seq_len, feat)\r\n        x_stamp_batch = np.stack(x_stamp_list, axis=0).astype(np.float32) # (B, seq_len, time_feat)\r\n        y_stamp_batch = np.stack(y_stamp_list, axis=0).astype(np.float32) # (B, pred_len, time_feat)\r\n\r\n        preds = self.generate(x_batch, x_stamp_batch, y_stamp_batch, pred_len, T, top_k, top_p, sample_count, verbose)\r\n        # preds: (B, pred_len, feat)\r\n\r\n        pred_dfs = []\r\n        for i in range(num_series):\r\n            preds_i = preds[i] * (stds[i] + 1e-5) + means[i]\r\n            pred_df = pd.DataFrame(preds_i, columns=self.price_cols + [self.vol_col, self.amt_vol], index=y_timestamp_list[i])\r\n            pred_dfs.append(pred_df)\r\n\r\n        return pred_dfs\r\n\r\n"
  },
  {
    "path": "utils/model/module.py",
    "content": "import math\r\n\r\nfrom einops import rearrange, reduce\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch.autograd import Function\r\nimport torch.nn.functional as F\r\n\r\n\r\nclass DifferentiableEntropyFunction(Function):\r\n    @staticmethod\r\n    def forward(ctx, zq, basis, K, eps):\r\n        zb = (zq + 1) / 2\r\n        zi = ((zb * basis).sum(-1)).to(torch.int64)\r\n        cnt = torch.scatter_reduce(torch.zeros(2 ** K, device=zq.device, dtype=zq.dtype),\r\n                                   0,\r\n                                   zi.flatten(),\r\n                                   torch.ones_like(zi.flatten()).to(zq.dtype),\r\n                                   'sum')\r\n        prob = (cnt + eps) / (cnt + eps).sum()\r\n        H = -(prob * torch.log(prob)).sum()\r\n        ctx.save_for_backward(zq, zi, prob)\r\n        ctx.K = K\r\n        return H\r\n\r\n    @staticmethod\r\n    def backward(ctx, grad_output):\r\n        zq, zi, prob = ctx.saved_tensors\r\n        grad_array = -grad_output * (torch.log(prob) + 1) / zi.numel() / ctx.K\r\n        reord_grad = grad_array[zi.flatten()].reshape(zi.shape)\r\n        grad_input = reord_grad.unsqueeze(-1) * zq\r\n        return grad_input, None, None, None, None\r\n\r\n\r\ndef codebook_entropy(zq, basis, K, eps=1e-4):\r\n    return DifferentiableEntropyFunction.apply(zq, basis, K, eps)\r\n\r\n\r\nclass BinarySphericalQuantizer(nn.Module):\r\n    def __init__(self, embed_dim, beta, gamma0, gamma, zeta,\r\n                 input_format='bchw',\r\n                 soft_entropy=True, group_size=9,\r\n                 persample_entropy_compute='analytical',\r\n                 cb_entropy_compute='group',\r\n                 l2_norm=True,\r\n                 inv_temperature=1):\r\n        \"\"\"\r\n        Paper link: https://arxiv.org/pdf/2406.07548.pdf\r\n        Here we use the official implementation of the BinarySphericalQuantizer.\r\n        \"\"\"\r\n        super().__init__()\r\n        self.embed_dim = embed_dim\r\n        self.beta = beta  # loss weight for commit loss\r\n        self.gamma0 = gamma0  # loss weight for entropy penalty\r\n        self.gamma = gamma  # loss weight for entropy penalty\r\n        self.zeta = zeta  # loss weight for entire entropy penalty\r\n        self.input_format = input_format\r\n        assert self.embed_dim % group_size == 0, \"embed_dim must be divisible by group_size\"\r\n        self.num_groups = self.embed_dim // group_size\r\n        self.group_size = group_size\r\n        assert persample_entropy_compute in ['group', 'analytical'], \"persample_entropy_compute must be either 'group' or 'analytical'\"\r\n        assert cb_entropy_compute in ['group', 'nce'], \"cb_entropy_compute must be either 'group' or 'nce'\"\r\n        self.persample_entropy_compute = persample_entropy_compute\r\n        self.cb_entropy_compute = cb_entropy_compute\r\n        self.l2_norm = l2_norm\r\n        self.inv_temperature = inv_temperature\r\n\r\n        self.register_buffer('basis', 2 ** torch.arange(embed_dim - 1, -1, -1))\r\n        self.register_buffer('group_basis', 2 ** torch.arange(group_size - 1, -1, -1))\r\n\r\n        self.num_dimensions = 2 ** embed_dim\r\n        self.bits_per_index = embed_dim\r\n\r\n        # we only need to keep the codebook portion up to the group size\r\n        # because we approximate the H loss with this subcode\r\n        group_codes = torch.arange(2 ** self.group_size)\r\n        group_codebook = self.indexes_to_codes(group_codes).float()[:, -group_size:]\r\n        self.register_buffer('group_codebook', group_codebook, persistent=False)\r\n\r\n        self.soft_entropy = soft_entropy  # soft_entropy: Sec 3.2 of https://arxiv.org/pdf/1911.05894.pdf\r\n\r\n    def quantize(self, z):\r\n        assert z.shape[-1] == self.embed_dim, f\"Expected {self.embed_dim} dimensions, got {z.shape[-1]}\"\r\n\r\n        zhat = torch.where(z > 0,\r\n                           torch.tensor(1, dtype=z.dtype, device=z.device),\r\n                           torch.tensor(-1, dtype=z.dtype, device=z.device))\r\n        return z + (zhat - z).detach()\r\n\r\n    def forward(self, z):\r\n        # if self.input_format == 'bchw':\r\n        #     z = rearrange(z, 'b c h w -> b h w c')\r\n        zq = self.quantize(z)\r\n\r\n        indices = self.codes_to_indexes(zq.detach())\r\n        group_indices = self.codes_to_group_indexes(zq.detach())\r\n        if not self.training:\r\n            used_codes = torch.unique(indices, return_counts=False)\r\n        else:\r\n            used_codes = None\r\n\r\n        q_scale = 1. / (self.embed_dim ** 0.5) if self.l2_norm else 1.\r\n\r\n        if self.soft_entropy:\r\n            persample_entropy, cb_entropy, avg_prob = self.soft_entropy_loss(z)\r\n            entropy_penalty = self.gamma0 * persample_entropy - self.gamma * cb_entropy\r\n        else:\r\n            zb_by_sample = ((zq + 1) / 2).reshape(z.shape[0], -1, z.shape[-1]).to(torch.float32)\r\n            persample_entropy = self.get_hard_per_sample_entropy(zb_by_sample)\r\n            cb_entropy = codebook_entropy(zq, self.basis, self.embed_dim)\r\n            entropy_penalty = self.gamma0 * persample_entropy - self.gamma * cb_entropy\r\n\r\n        zq = zq * q_scale\r\n\r\n        # commit loss\r\n        commit_loss = self.beta * torch.mean(((zq.detach() - z) ** 2).sum(dim=-1))\r\n\r\n        # if self.input_format == 'bchw':\r\n        #     zq = rearrange(zq, 'b h w c -> b c h w')\r\n\r\n        return (\r\n            zq,\r\n            commit_loss + self.zeta * entropy_penalty / self.inv_temperature,\r\n            {\"H\": cb_entropy, \"used_codes\": used_codes, \"indices\": indices, \"group_indices\": group_indices,\r\n             \"avg_prob\": avg_prob}\r\n        )\r\n\r\n    def soft_entropy_loss(self, z):\r\n        # if we divide the code in subgroups of size group_size, the codebook will be of size 2 ** group_size\r\n        # the sub-code is the last group_size bits of the full code\r\n        group_code_book = self.group_codebook / (self.embed_dim ** 0.5 if self.l2_norm else 1)\r\n        divided_z = rearrange(z, '... (g c) -> ... g c', c=self.group_size)\r\n\r\n        # we calculate the distance between the divided_z and the codebook for each subgroup\r\n        distance = - 2 * torch.einsum('... g c, d c ->... g d', divided_z, group_code_book)\r\n        prob = (-distance * self.inv_temperature).softmax(dim=-1)\r\n        if self.persample_entropy_compute == 'analytical':\r\n            if self.l2_norm:\r\n                p = torch.sigmoid(-4 * z / (self.embed_dim ** 0.5) * self.inv_temperature)\r\n            else:\r\n                p = torch.sigmoid(-4 * z * self.inv_temperature)\r\n            prob = torch.stack([p, 1 - p], dim=-1)\r\n            per_sample_entropy = self.get_entropy(prob, dim=-1, normalize=False).sum(dim=-1).mean()\r\n        else:\r\n            per_sample_entropy = self.get_entropy(prob, dim=-1, normalize=False).sum(dim=-1).mean()\r\n\r\n        # macro average of the probability of each subgroup\r\n        avg_prob = reduce(prob, '... g d ->g d', 'mean')\r\n        codebook_entropy = self.get_entropy(avg_prob, dim=-1, normalize=False)\r\n\r\n        # the approximation of the entropy is the sum of the entropy of each subgroup\r\n        return per_sample_entropy, codebook_entropy.sum(), avg_prob\r\n\r\n    def get_hard_per_sample_entropy(self, zb_by_sample):\r\n        probs_per_dim = zb_by_sample.sum(1) / zb_by_sample.shape[1]\r\n        persample_entropy = - probs_per_dim * torch.log(probs_per_dim + 1e-8) - (1 - probs_per_dim) * torch.log(1 - probs_per_dim + 1e-8)\r\n        persample_entropy = persample_entropy.sum(-1)\r\n        return persample_entropy.mean()\r\n\r\n    def codes_to_indexes(self, zhat):\r\n        \"\"\"Converts a `code` to an index in the codebook.\r\n        Args:\r\n            zhat: A tensor of shape (B, ..., C) containing the codes. must be in {-1, 1}\r\n        \"\"\"\r\n        assert zhat.shape[-1] == self.embed_dim, f\"Expected {self.embed_dim} dimensions, got {zhat.shape[-1]}\"\r\n        return ((zhat + 1) / 2 * self.basis).sum(axis=-1).to(torch.int64)\r\n\r\n    def codes_to_group_indexes(self, zhat):\r\n        \"\"\"Converts a `code` to a list of indexes (in groups) in the codebook.\r\n        Args:\r\n            zhat: A tensor of shape (B, ..., C) containing the codes. must be in {-1, 1}\r\n        \"\"\"\r\n        zhat_in_group = rearrange(zhat, 'b ... (g c) -> b ... g c', c=self.group_size)\r\n        return ((zhat_in_group + 1) / 2 * self.group_basis).sum(axis=-1).to(torch.int64)\r\n\r\n    def indexes_to_codes(self, indices):\r\n        \"\"\"Inverse of `indexes_to_codes`.\"\"\"\r\n        indices = indices.unsqueeze(-1)\r\n        codes_non_centered = torch.remainder(\r\n            torch.floor_divide(indices, self.basis), 2\r\n        )\r\n        return codes_non_centered * 2 - 1\r\n\r\n    def group_indexes_to_codes(self, group_indices):\r\n        \"\"\"Inverse of `group_indexes_to_codes`.\"\"\"\r\n        group_indices = group_indices.unsqueeze(-1)\r\n        codes_non_centered = torch.remainder(\r\n            torch.floor_divide(group_indices, self.group_basis), 2\r\n        )\r\n        codes_non_centered = rearrange(codes_non_centered, 'b ... g c -> b ... (g c)')\r\n        return codes_non_centered * 2 - 1\r\n\r\n    def get_entropy(self, count, dim=-1, eps=1e-4, normalize=True):\r\n        if normalize:\r\n            probs = (count + eps) / (count + eps).sum(dim=dim, keepdim=True)\r\n        else:\r\n            probs = count\r\n        H = -(probs * torch.log(probs + 1e-8)).sum(dim=dim)\r\n        return H\r\n\r\n    def get_group_codebook_entry(self, group_indices):\r\n        z_q = self.group_indexes_to_codes(group_indices)\r\n        q_scale = 1. / (self.embed_dim ** 0.5) if self.l2_norm else 1.\r\n        z_q = z_q * q_scale\r\n        if self.input_format == 'bchw':\r\n            h, w = int(z_q.shape[1] ** 0.5)\r\n            assert h * w == z_q.shape[1], 'Invalid sequence length'\r\n            z_q = rearrange(z_q, 'b (h w) c -> b c h w', h=h)\r\n        return z_q\r\n\r\n    def get_codebook_entry(self, indices):\r\n        z_q = self.indexes_to_codes(indices)\r\n        q_scale = 1. / (self.embed_dim ** 0.5) if self.l2_norm else 1.\r\n        z_q = z_q * q_scale\r\n        if self.input_format == 'bchw':\r\n            h, w = int(z_q.shape[1] ** 0.5)\r\n            assert h * w == z_q.shape[1], 'Invalid sequence length'\r\n            z_q = rearrange(z_q, 'b (h w) c -> b c h w', h=h)\r\n        return z_q\r\n\r\n\r\nclass BSQuantizer(nn.Module):\r\n\r\n    def __init__(self, s1_bits, s2_bits, beta, gamma0, gamma, zeta, group_size):\r\n        super().__init__()\r\n        self.codebook_dim = s1_bits + s2_bits\r\n        self.s1_bits = s1_bits\r\n        self.s2_bits = s2_bits\r\n        self.bsq = BinarySphericalQuantizer(self.codebook_dim, beta, gamma0, gamma, zeta, group_size=group_size)\r\n\r\n    def bits_to_indices(self, bits):\r\n        bits = (bits >= 0).to(torch.long)\r\n        indices = 2 ** torch.arange(\r\n            0,\r\n            bits.shape[-1],\r\n            1,\r\n            dtype=torch.long,\r\n            device=bits.device,\r\n        )\r\n        return (bits * indices).sum(-1)\r\n\r\n    def forward(self, z, half=False):\r\n        z = F.normalize(z, dim=-1)\r\n        quantized, bsq_loss, metrics = self.bsq(z)\r\n        if half:\r\n            q_pre = quantized[:, :, :self.s1_bits]\r\n            q_post = quantized[:, :, self.s1_bits:]\r\n            z_indices = [self.bits_to_indices(q_pre), self.bits_to_indices(q_post)]\r\n        else:\r\n            z_indices = self.bits_to_indices(quantized)\r\n        return bsq_loss, quantized, z_indices\r\n\r\n\r\nclass RMSNorm(torch.nn.Module):\r\n    def __init__(self, dim: int, eps: float = 1e-5):\r\n        super().__init__()\r\n        self.eps = eps\r\n        self.weight = nn.Parameter(torch.ones(dim))\r\n\r\n    def _norm(self, x):\r\n        return x * torch.rsqrt(torch.mean(x * x, dim=-1, keepdim=True) + self.eps)\r\n\r\n    def forward(self, x):\r\n        output = self._norm(x.float()).type_as(x)\r\n        return output * self.weight\r\n\r\n\r\nclass FeedForward(nn.Module):\r\n    def __init__(self, d_model, ff_dim, ffn_dropout_p=0.0):\r\n        super().__init__()\r\n\r\n        self.w1 = nn.Linear(d_model, ff_dim, bias=False)\r\n        self.w3 = nn.Linear(d_model, ff_dim, bias=False)\r\n        self.w2 = nn.Linear(ff_dim, d_model, bias=False)\r\n        self.ffn_dropout = nn.Dropout(ffn_dropout_p)\r\n\r\n    def forward(self, x):\r\n        return self.ffn_dropout(self.w2(F.silu(self.w1(x)) * self.w3(x)))\r\n\r\n\r\nclass RotaryPositionalEmbedding(nn.Module):\r\n    def __init__(self, dim):\r\n        super().__init__()\r\n        inv_freq = 1.0 / (10000 ** (torch.arange(0, dim, 2).float() / dim))\r\n        self.register_buffer(\"inv_freq\", inv_freq)\r\n        self.seq_len_cached = None\r\n        self.cos_cached = None\r\n        self.sin_cached = None\r\n\r\n    def _update_cos_sin_cache(self, x, seq_len):\r\n        if seq_len != self.seq_len_cached:\r\n            self.seq_len_cached = seq_len\r\n            t = torch.arange(seq_len, device=x.device).type_as(self.inv_freq)\r\n            freqs = torch.einsum('i,j->ij', t, self.inv_freq)\r\n            emb = torch.cat((freqs, freqs), dim=-1).to(x.device)\r\n            self.cos_cached = emb.cos()[None, None, :, :]\r\n            self.sin_cached = emb.sin()[None, None, :, :]\r\n        return self.cos_cached, self.sin_cached\r\n\r\n    def forward(self, q, k):\r\n        cos, sin = self._update_cos_sin_cache(q, q.shape[-2])\r\n        return (\r\n            (q * cos) + (self._rotate_half(q) * sin),\r\n            (k * cos) + (self._rotate_half(k) * sin),\r\n        )\r\n\r\n    def _rotate_half(self, x):\r\n        x1, x2 = x.chunk(2, dim=-1)\r\n        return torch.cat((-x2, x1), dim=-1)\r\n\r\n\r\ndef scaled_dot_product_attention(query, key, value, attn_mask=None, dropout_p=0.0, is_causal=False, scale=None) -> torch.Tensor:\r\n    L, S = query.size(-2), key.size(-2)\r\n    scale_factor = 1 / math.sqrt(query.size(-1)) if scale is None else scale\r\n    attn_bias = torch.zeros(L, S, dtype=query.dtype).to(query.device)\r\n\r\n    if is_causal:\r\n        assert attn_mask is None\r\n        temp_mask = torch.ones(L, S, dtype=torch.bool).tril(diagonal=0).to(query.device)\r\n        attn_bias.masked_fill_(temp_mask.logical_not(), float(\"-inf\"))\r\n        attn_bias.to(query.dtype)\r\n\r\n    attn_weight = query @ key.transpose(-2, -1) * scale_factor\r\n    attn_weight += attn_bias\r\n\r\n    if attn_mask is not None:\r\n        attn_mask_bias = torch.zeros_like(attn_weight)\r\n        if attn_mask.dtype == torch.bool:\r\n            attn_mask_bias.masked_fill_(attn_mask, float(\"-inf\"))\r\n        else:\r\n            attn_mask_bias += attn_mask\r\n        attn_weight += attn_mask_bias\r\n\r\n    attn_weight = torch.softmax(attn_weight, dim=-1)\r\n    attn_weight = torch.dropout(attn_weight, dropout_p, train=True)\r\n    return attn_weight @ value\r\n\r\n\r\nclass MultiHeadAttentionWithRoPE(nn.Module):\r\n    def __init__(self, d_model, n_heads, attn_dropout_p=0.0, resid_dropout_p=0.0):\r\n        super().__init__()\r\n        self.d_model = d_model\r\n        self.n_heads = n_heads\r\n        self.head_dim = d_model // n_heads\r\n\r\n        self.q_proj = nn.Linear(d_model, d_model)\r\n        self.k_proj = nn.Linear(d_model, d_model)\r\n        self.v_proj = nn.Linear(d_model, d_model)\r\n        self.out_proj = nn.Linear(d_model, d_model)\r\n        self.rotary = RotaryPositionalEmbedding(self.head_dim)\r\n        self.attn_dropout_p = attn_dropout_p\r\n        self.resid_dropout = nn.Dropout(resid_dropout_p)\r\n\r\n    def forward(self, x, key_padding_mask=None):\r\n        batch_size, seq_len, _ = x.shape\r\n\r\n        q = self.q_proj(x).view(batch_size, seq_len, self.n_heads, self.head_dim).transpose(1, 2)\r\n        k = self.k_proj(x).view(batch_size, seq_len, self.n_heads, self.head_dim).transpose(1, 2)\r\n        v = self.v_proj(x).view(batch_size, seq_len, self.n_heads, self.head_dim).transpose(1, 2)\r\n\r\n        q, k = self.rotary(q, k)\r\n\r\n        if key_padding_mask is not None:\r\n            attn_mask = key_padding_mask.unsqueeze(1).unsqueeze(2)  # [batch, 1, 1, seq_len]\r\n            attn_mask = attn_mask.expand(-1, self.n_heads, seq_len, -1)  # [batch, n_heads, q_len, k_len]\r\n        else:\r\n            attn_mask = None\r\n\r\n        attn_output = scaled_dot_product_attention(\r\n            q, k, v,\r\n            attn_mask=attn_mask,\r\n            dropout_p=self.attn_dropout_p,\r\n            is_causal=True\r\n        )\r\n\r\n        attn_output = attn_output.transpose(1, 2).contiguous().view(batch_size, seq_len, self.d_model)\r\n        return self.resid_dropout(self.out_proj(attn_output))\r\n\r\n\r\nclass MultiHeadCrossAttentionWithRoPE(nn.Module):\r\n    def __init__(self, d_model, n_heads, attn_dropout_p=0.0, resid_dropout=0.0):\r\n        super().__init__()\r\n        self.d_model = d_model\r\n        self.n_heads = n_heads\r\n        self.head_dim = d_model // n_heads\r\n\r\n        self.q_proj = nn.Linear(d_model, d_model)\r\n        self.k_proj = nn.Linear(d_model, d_model)\r\n        self.v_proj = nn.Linear(d_model, d_model)\r\n        self.out_proj = nn.Linear(d_model, d_model)\r\n        self.rotary = RotaryPositionalEmbedding(self.head_dim)\r\n        self.attn_dropout_p = attn_dropout_p\r\n        self.resid_dropout = nn.Dropout(resid_dropout)\r\n\r\n    def forward(self, query, key, value, key_padding_mask=None):\r\n        batch_size, q_len, _ = query.shape\r\n        _, seq_len, _ = key.shape\r\n\r\n        q = self.q_proj(query).view(batch_size, q_len, self.n_heads, self.head_dim).transpose(1, 2)\r\n        k = self.k_proj(key).view(batch_size, seq_len, self.n_heads, self.head_dim).transpose(1, 2)\r\n        v = self.v_proj(value).view(batch_size, seq_len, self.n_heads, self.head_dim).transpose(1, 2)\r\n\r\n        q, k = self.rotary(q, k)\r\n\r\n        if key_padding_mask is not None:\r\n            attn_mask = key_padding_mask.unsqueeze(1).unsqueeze(2)\r\n            attn_mask = attn_mask.expand(-1, self.n_heads, q_len, -1)\r\n        else:\r\n            attn_mask = None\r\n\r\n        is_causal_flag = self.training\r\n\r\n        attn_output = scaled_dot_product_attention(\r\n            q, k, v,\r\n            attn_mask=attn_mask,\r\n            dropout_p=self.attn_dropout_p,\r\n            is_causal=is_causal_flag\r\n        )\r\n\r\n        attn_output = attn_output.transpose(1, 2).contiguous().view(batch_size, q_len, self.d_model)\r\n        return self.resid_dropout(self.out_proj(attn_output))\r\n\r\n\r\nclass HierarchicalEmbedding(nn.Module):\r\n    def __init__(self, s1_bits, s2_bits, d_model=256):\r\n        super().__init__()\r\n        self.s1_bits = s1_bits\r\n        self.s2_bits = s2_bits\r\n\r\n        vocab_s1 = 2 ** s1_bits\r\n        vocab_s2 = 2 ** s2_bits\r\n\r\n        self.emb_s1 = nn.Embedding(vocab_s1, d_model)\r\n        self.emb_s2 = nn.Embedding(vocab_s2, d_model)\r\n        self.d_model = d_model\r\n        self.fusion_proj = nn.Linear(d_model * 2, d_model)\r\n\r\n        nn.init.normal_(self.emb_s1.weight, mean=0, std=d_model ** -0.5)\r\n        nn.init.normal_(self.emb_s2.weight, mean=0, std=d_model ** -0.5)\r\n\r\n    def forward(self, token_ids):\r\n        \"\"\"Inputs:\r\n        token_ids: [batch_size, seq_len] token ID\r\n        Output: [batch_size, seq_len, d_model]\r\n        \"\"\"\r\n        if isinstance(token_ids, tuple) or isinstance(token_ids, list):\r\n            s1_ids, s2_ids = token_ids\r\n        else:\r\n            s1_ids, s2_ids = self.split_token(token_ids, self.s2_bits)\r\n        s1_emb = self.emb_s1(s1_ids) * math.sqrt(self.d_model)\r\n        s2_emb = self.emb_s2(s2_ids) * math.sqrt(self.d_model)\r\n        return self.fusion_proj(torch.cat([s1_emb, s2_emb], dim=-1))\r\n\r\n\r\nclass DependencyAwareLayer(nn.Module):\r\n    def __init__(self, d_model, n_heads=4, attn_dropout_p=0.0, resid_dropout=0.0):\r\n        super().__init__()\r\n        self.cross_attn = MultiHeadCrossAttentionWithRoPE(d_model, n_heads, attn_dropout_p, resid_dropout)\r\n        self.norm = RMSNorm(d_model)\r\n\r\n    def forward(self, hidden_states, sibling_embed, key_padding_mask=None):\r\n        \"\"\"hidden_states: [batch, seq_len, d_model]\r\n        sibling_embed: Embedding from another subtoken\r\n        \"\"\"\r\n        attn_out = self.cross_attn(\r\n            query=sibling_embed,\r\n            key=hidden_states,\r\n            value=hidden_states,\r\n            key_padding_mask=key_padding_mask\r\n        )\r\n        return self.norm(hidden_states + attn_out)\r\n\r\n\r\nclass TransformerBlock(nn.Module):\r\n    def __init__(self, d_model, n_heads, ff_dim=1024, ffn_dropout_p=0.0, attn_dropout_p=0.0, resid_dropout_p=0.0):\r\n        super().__init__()\r\n        self.norm1 = RMSNorm(d_model)\r\n        self.self_attn = MultiHeadAttentionWithRoPE(d_model, n_heads, attn_dropout_p, resid_dropout_p)\r\n        self.norm2 = RMSNorm(d_model)\r\n        self.ffn = FeedForward(d_model, ff_dim, ffn_dropout_p)\r\n\r\n    def forward(self, x, key_padding_mask=None):\r\n        residual = x\r\n        x = self.norm1(x)\r\n        attn_out = self.self_attn(x, key_padding_mask=key_padding_mask)\r\n        x = residual + attn_out\r\n\r\n        residual = x\r\n        x = self.norm2(x)\r\n        ffn_out = self.ffn(x)\r\n        x = residual + ffn_out\r\n        return x\r\n\r\n\r\nclass DualHead(nn.Module):\r\n    def __init__(self, s1_bits, s2_bits, d_model):\r\n        super().__init__()\r\n        self.vocab_s1 = 2 ** s1_bits\r\n        self.vocab_s2 = 2 ** s2_bits\r\n        self.proj_s1 = nn.Linear(d_model, self.vocab_s1)\r\n        self.proj_s2 = nn.Linear(d_model, self.vocab_s2)\r\n\r\n    def compute_loss(self, s1_logits, s2_logits, s1_targets, s2_targets, padding_mask=None):\r\n        if padding_mask is not None:\r\n            valid_mask = (padding_mask == 0)\r\n            s1_logits = s1_logits[valid_mask]\r\n            s2_logits = s2_logits[valid_mask]\r\n            s1_targets = s1_targets[valid_mask]\r\n            s2_targets = s2_targets[valid_mask]\r\n            ce_s1 = F.cross_entropy(s1_logits, s1_targets)\r\n            ce_s2 = F.cross_entropy(s2_logits, s2_targets)\r\n        else:\r\n            ce_s1 = F.cross_entropy(s1_logits.reshape(-1, self.vocab_s1), s1_targets.reshape(-1))\r\n            ce_s2 = F.cross_entropy(s2_logits.reshape(-1, self.vocab_s2), s2_targets.reshape(-1))\r\n        ce_loss = (ce_s1 + ce_s2) / 2\r\n        return ce_loss, ce_s1, ce_s2\r\n\r\n    def forward(self, x):\r\n        return self.proj_s1(x)\r\n\r\n    def cond_forward(self, x2):\r\n        return self.proj_s2(x2)\r\n\r\n\r\nclass FixedEmbedding(nn.Module):\r\n    def __init__(self, c_in, d_model):\r\n        super(FixedEmbedding, self).__init__()\r\n\r\n        w = torch.zeros(c_in, d_model).float()\r\n        w.require_grad = False\r\n\r\n        position = torch.arange(0, c_in).float().unsqueeze(1)\r\n        div_term = (torch.arange(0, d_model, 2).float() * -(math.log(10000.0) / d_model)).exp()\r\n\r\n        w[:, 0::2] = torch.sin(position * div_term)\r\n        w[:, 1::2] = torch.cos(position * div_term)\r\n\r\n        self.emb = nn.Embedding(c_in, d_model)\r\n        self.emb.weight = nn.Parameter(w, requires_grad=False)\r\n\r\n    def forward(self, x):\r\n        return self.emb(x).detach()\r\n\r\n\r\nclass TemporalEmbedding(nn.Module):\r\n    def __init__(self, d_model, learn_pe):\r\n        super(TemporalEmbedding, self).__init__()\r\n\r\n        minute_size = 60\r\n        hour_size = 24\r\n        weekday_size = 7\r\n        day_size = 32\r\n        month_size = 13\r\n\r\n        Embed = FixedEmbedding if not learn_pe else nn.Embedding\r\n        self.minute_embed = Embed(minute_size, d_model)\r\n        self.hour_embed = Embed(hour_size, d_model)\r\n        self.weekday_embed = Embed(weekday_size, d_model)\r\n        self.day_embed = Embed(day_size, d_model)\r\n        self.month_embed = Embed(month_size, d_model)\r\n\r\n    def forward(self, x):\r\n        x = x.long()\r\n\r\n        minute_x = self.minute_embed(x[:, :, 0])\r\n        hour_x = self.hour_embed(x[:, :, 1])\r\n        weekday_x = self.weekday_embed(x[:, :, 2])\r\n        day_x = self.day_embed(x[:, :, 3])\r\n        month_x = self.month_embed(x[:, :, 4])\r\n\r\n        return hour_x + weekday_x + day_x + month_x + minute_x\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "utils/my_logger.py",
    "content": "# coding=utf-8\r\n#\r\n# Copyright 2016 timercrack\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r\n# not use this file except in compliance with the License. You may obtain\r\n# a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n# License for the specific language governing permissions and limitations\r\n# under the License.\r\n\r\nimport logging\r\nfrom utils.read_config import *\r\n\r\n\r\ndef get_my_logger(logger_name='main'):\r\n    logger = logging.getLogger(logger_name)\r\n    if logger.handlers:\r\n        return logger\r\n    log_file = os.path.join(app_dir.user_log_dir, '{}.log'.format(logger_name))\r\n    if not os.path.exists(app_dir.user_log_dir):\r\n        os.makedirs(app_dir.user_log_dir)\r\n    formatter = logging.Formatter(config.get('LOG', 'format',\r\n                                             fallback=\"%(asctime)s %(name)s [%(levelname)s] %(message)s\"))\r\n    file_handler = logging.FileHandler(log_file, encoding='utf-8')\r\n    file_handler.setFormatter(formatter)\r\n    console_handler = logging.StreamHandler()\r\n    console_handler.setFormatter(formatter)\r\n    logger.setLevel(config.get('LOG', 'level', fallback='ERROR'))\r\n    logger.addHandler(file_handler)\r\n    logger.addHandler(console_handler)\r\n    return logger\r\n"
  },
  {
    "path": "utils/read_config.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\nimport sys\nimport os\nimport copy\nimport xml.etree.ElementTree as ET\nimport configparser\nfrom configparser import MissingSectionHeaderError\nfrom appdirs import AppDirs\nimport yaml\n\nREPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\nDEFAULT_CONFIG_DATA = {\n    'trade': {\n        'command_timeout': 5,\n        'ignore_inst': '',\n        'transport': 'native',\n    },\n    'ctp_native': {\n        'gateway': 'pybind',\n        'module': 'ctp_bridge_native',\n        'client_class': 'CtpClient',\n        'module_path': os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'build').replace('\\\\', '/'),\n        'dll_dir': os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'api', 'win').replace('\\\\', '/'),\n        'trade_front': 'tcp://xxx:xxx',\n        'market_front': 'tcp://xxx:xxx',\n        'broker_id': '9999',\n        'investor_id': '123456',\n        'password': 'passwd',\n        'appid': 'xxx',\n        'authcode': 'xxx',\n        'userinfo': 'xxx',\n        'flow_path': os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'flow').replace('\\\\', '/'),\n        'request_timeout_ms': 10000,\n        'test_instrument': 'IF99',\n    },\n    'log': {\n        'level': 'DEBUG',\n        'format': '%(asctime)s %(name)s [%(levelname)s] %(message)s',\n        'weixin_level': 'INFO',\n        'weixin_format': '[%(levelname)s] %(message)s',\n    },\n    'host': {\n        'ip': '1.2.3.4',\n        'mac': '02:03:04:5a:6b:7c',\n    },\n    'ssh_tunnel': {\n        'enabled': False,\n        'host': '127.0.0.1',\n        'port': 22,\n        'local_node': 'localhost',\n        'private_key_linux': '/root/.ssh/id_ed25519',\n        'private_key_win': 'C:\\\\Users\\\\timer\\\\.ssh\\\\id_ed25519.ppk',\n    },\n    'weixin': {\n        'Token': '',\n        'EncodingAESKey': '',\n        'CorpID': '',\n        'Secret': '',\n    },\n}\n\napp_dir = AppDirs('trader')\nroot_yaml_file = os.path.join(REPO_ROOT, 'config.yaml')\nroot_ini_file = os.path.join(REPO_ROOT, 'config.ini')\n\n\ndef _deep_merge_dict(base: dict, override: dict) -> dict:\n    merged = copy.deepcopy(base)\n    for key, value in override.items():\n        if isinstance(value, dict) and isinstance(merged.get(key), dict):\n            merged[key] = _deep_merge_dict(merged[key], value)\n        else:\n            merged[key] = value\n    return merged\n\n\ndef _normalize_yaml_data(data: dict | None) -> dict:\n    if not isinstance(data, dict):\n        return {}\n    normalized = {}\n    for section, section_values in data.items():\n        section_name = str(section).strip().lower()\n        if not section_name or not isinstance(section_values, dict):\n            continue\n        normalized[section_name] = {}\n        for key, value in section_values.items():\n            normalized[section_name][str(key).strip()] = value\n    return normalized\n\n\ndef _load_ini_data(path: str) -> dict:\n    parser = configparser.ConfigParser(interpolation=None)\n    try:\n        try:\n            parser.read(path, encoding='utf-8')\n        except UnicodeDecodeError:\n            parser.read(path, encoding='gb18030')\n        if parser.sections():\n            out = {}\n            for section in parser.sections():\n                out[section.lower()] = {k: v for k, v in parser.items(section)}\n            return out\n    except MissingSectionHeaderError:\n        pass\n\n    raw = {}\n    with open(path, 'rt', encoding='utf-8', errors='ignore') as file_obj:\n        for line in file_obj:\n            s = line.strip()\n            if not s or s.startswith(';') or s.startswith('#') or '=' not in s:\n                continue\n            key, value = s.split('=', 1)\n            raw[key.strip()] = value.strip()\n\n    mapped = copy.deepcopy(DEFAULT_CONFIG_DATA)\n    ctp_mapping = {\n        'trade': 'trade_front',\n        'market': 'market_front',\n        'broker': 'broker_id',\n        'investor': 'investor_id',\n        'passwd': 'password',\n        'appid': 'appid',\n        'authcode': 'authcode',\n        'userinfo': 'userinfo',\n        'module_path': 'module_path',\n    }\n    for src_key, dst_key in ctp_mapping.items():\n        if src_key in raw:\n            mapped['ctp_native'][dst_key] = raw[src_key]\n    if 'ip' in raw:\n        mapped['host']['ip'] = raw['ip']\n    if 'mac' in raw:\n        mapped['host']['mac'] = raw['mac']\n    return mapped\n\n\ndef _write_yaml(path: str, data: dict):\n    with open(path, 'wt', encoding='utf-8') as file_obj:\n        yaml.safe_dump(data, file_obj, allow_unicode=True, sort_keys=False)\n\n\ndef _ensure_yaml_config() -> tuple[str, dict]:\n    if os.path.exists(root_yaml_file):\n        with open(root_yaml_file, 'rt', encoding='utf-8') as file_obj:\n            yaml_data = yaml.safe_load(file_obj) or {}\n        return root_yaml_file, _normalize_yaml_data(yaml_data)\n\n    if os.path.exists(root_ini_file):\n        ini_data = _load_ini_data(root_ini_file)\n        merged = _deep_merge_dict(DEFAULT_CONFIG_DATA, _normalize_yaml_data(ini_data))\n        _write_yaml(root_yaml_file, merged)\n        print('migrate config file:', root_ini_file, '->', root_yaml_file)\n        return root_yaml_file, merged\n\n    _write_yaml(root_yaml_file, DEFAULT_CONFIG_DATA)\n    print('create config file:', root_yaml_file)\n    return root_yaml_file, copy.deepcopy(DEFAULT_CONFIG_DATA)\n\n\ndef _to_config_parser(data: dict) -> configparser.ConfigParser:\n    parser = configparser.ConfigParser(interpolation=None)\n    for section, section_values in data.items():\n        section_name = section.upper()\n        if not parser.has_section(section_name):\n            parser.add_section(section_name)\n        for key, value in section_values.items():\n            parser.set(section_name, key, '' if value is None else str(value))\n    return parser\n\n\nconfig_file, _config_data = _ensure_yaml_config()\nconfig = _to_config_parser(_config_data)\n\nctp_errors = {}\nif os.name == 'nt':\n    ctp_xml_path = os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'api', 'win', 'error.xml')\nelse:\n    ctp_xml_path = os.path.join(REPO_ROOT, 'native', 'ctp_bridge', 'api', 'linux', 'error.xml')\n\nwith open(ctp_xml_path, 'rb') as f:\n    xml_text = f.read().decode('utf-8', errors='replace')\nif xml_text.lstrip().startswith('<?xml'):\n    xml_text = '\\n'.join(xml_text.splitlines()[1:])\n_ctp_root = ET.fromstring(xml_text)\n\nfor error in _ctp_root:\n    ctp_errors[int(error.attrib['value'])] = error.attrib['prompt']\n"
  },
  {
    "path": "utils/tick.py",
    "content": "# coding=utf-8\nimport datetime\n\n\nclass TickBar(object):\n    def __init__(self, day, data, last_volume):\n        \"\"\"\n        pData的格式转换和整理, 交易数据都转换为整数，tick的后四个字段在模拟行情中经常出错\n        :param data: ApiStruct.DepthMarketData\n        :return:\n        \"\"\"\n        self.instrument = data.InstrumentID\n        self.bid_price = data.BidPrice1\n        self.bid_volume = data.BidVolume1\n        self.ask_price = data.AskPrice1\n        self.ask_volume = data.AskVolume1\n        self.holding = data.OpenInterest\n        self.up_limit_price = data.UpperLimitPrice\n        self.down_limit_price = data.LowerLimitPrice\n        self.volume = data.Volume - last_volume\n        self.price = data.LastPrice\n        self.day_high = data.HighestPrice\n        self.day_low = data.LowestPrice\n        self.open = data.OpenPrice\n        self.pre_close = data.PreClosePrice\n        self.dateTime = datetime.datetime.strptime(day+data.UpdateTime, \"%Y%m%d%H:%M:%S\")\n        self.dateTime = self.dateTime + datetime.timedelta(microseconds=datetime.datetime.now().microsecond)\n"
  },
  {
    "path": "weixin_notifier.py",
    "content": "# coding=utf-8\n#\n# Copyright 2016 timercrack\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n# License for the specific language governing permissions and limitations\n# under the License.\n\nimport atexit\nimport logging\nimport queue\nimport threading\nimport time\nfrom typing import Optional\n\nimport orjson\nimport requests\n\nfrom runtime_config import runtime_config\n\nlogger = logging.getLogger('WeixinNotifier')\n\n\ndef _silence_http_library_debug_logs():\n    \"\"\"避免 requests/urllib3 的调试日志污染业务日志。\"\"\"\n    logging.getLogger('urllib3').setLevel(logging.WARNING)\n    logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)\n    logging.getLogger('requests').setLevel(logging.WARNING)\n\n\nclass WeixinNotifier:\n    def __init__(self):\n        self._corp_id = runtime_config.get('WEIXIN', 'CorpID', fallback='').strip()\n        self._secret = runtime_config.get('WEIXIN', 'Secret', fallback='').strip()\n        self._to_user = runtime_config.get('WEIXIN', 'ToUser', fallback='@all').strip() or '@all'\n        self._agent_id = runtime_config.getint('WEIXIN', 'AgentID', fallback=0)\n        self._token: Optional[str] = None\n        self._token_expire_at = 0.0\n        self._queue: queue.Queue[str] = queue.Queue(maxsize=1000)\n        self._stop_event = threading.Event()\n        self._thread: Optional[threading.Thread] = None\n\n    @property\n    def enabled(self) -> bool:\n        return bool(self._corp_id and self._secret)\n\n    def start(self):\n        if not self.enabled:\n            logger.info('企业微信推送未启用：缺少 weixin.CorpID 或 weixin.Secret')\n            return\n        _silence_http_library_debug_logs()\n        if self._thread and self._thread.is_alive():\n            return\n        self._thread = threading.Thread(target=self._run, name='weixin-notifier', daemon=True)\n        self._thread.start()\n        atexit.register(self.stop)\n\n    def stop(self):\n        self._stop_event.set()\n        if self._thread and self._thread.is_alive():\n            self._thread.join(timeout=2)\n\n    def enqueue(self, message: str):\n        if not self.enabled:\n            return\n        text = (message or '').strip()\n        if not text:\n            return\n        try:\n            self._queue.put_nowait(text)\n        except queue.Full:\n            try:\n                _ = self._queue.get_nowait()\n            except queue.Empty:\n                pass\n            try:\n                self._queue.put_nowait(text)\n            except queue.Full:\n                pass\n\n    def _run(self):\n        while not self._stop_event.is_set():\n            try:\n                message = self._queue.get(timeout=0.5)\n            except queue.Empty:\n                continue\n            try:\n                self._send_text(message)\n            except Exception as e:\n                logger.warning('企业微信消息发送失败: %s', repr(e), exc_info=True)\n\n    def _get_access_token(self) -> str:\n        now = time.time()\n        if self._token and now < self._token_expire_at - 60:\n            return self._token\n        resp = requests.get(\n            'https://qyapi.weixin.qq.com/cgi-bin/gettoken',\n            params={'corpid': self._corp_id, 'corpsecret': self._secret},\n            timeout=10,\n        )\n        data = resp.json()\n        err_code = data.get('errcode', -1)\n        if err_code != 0:\n            raise RuntimeError(f'gettoken failed: errcode={err_code}, errmsg={data.get(\"errmsg\", \"\")!r}')\n        token = str(data.get('access_token', '') or '').strip()\n        if not token:\n            raise RuntimeError('gettoken failed: empty access_token')\n        self._token = token\n        expires_in = int(data.get('expires_in', 7200) or 7200)\n        self._token_expire_at = now + expires_in\n        return token\n\n    def _send_text(self, text: str):\n        token = self._get_access_token()\n        payload = {\n            'touser': self._to_user,\n            'msgtype': 'text',\n            'agentid': self._agent_id,\n            'text': {'content': text},\n            'safe': 0,\n        }\n        resp = requests.post(\n            f'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token={token}',\n            data=orjson.dumps(payload),\n            headers={'Content-Type': 'application/json; charset=utf-8'},\n            timeout=10,\n        )\n        data = resp.json()\n        err_code = data.get('errcode', -1)\n        if err_code != 0:\n            raise RuntimeError(f'send message failed: errcode={err_code}, errmsg={data.get(\"errmsg\", \"\")!r}')\n\n\nclass WeixinLogHandler(logging.Handler):\n    def __init__(self, notifier: WeixinNotifier):\n        super().__init__()\n        self._notifier = notifier\n\n    def emit(self, record: logging.LogRecord):\n        try:\n            self._notifier.enqueue(self.format(record))\n        except Exception:\n            self.handleError(record)\n\n\n_notifier_singleton: Optional[WeixinNotifier] = None\n\n\ndef get_weixin_notifier() -> WeixinNotifier:\n    global _notifier_singleton\n    if _notifier_singleton is None:\n        _notifier_singleton = WeixinNotifier()\n    return _notifier_singleton\n\n\ndef install_weixin_log_handler(root_logger: logging.Logger):\n    notifier = get_weixin_notifier()\n    notifier.start()\n    if not notifier.enabled:\n        return\n    for handler in root_logger.handlers:\n        if isinstance(handler, WeixinLogHandler):\n            return\n    handler = WeixinLogHandler(notifier)\n    handler.setLevel(runtime_config.get('LOG', 'weixin_level', fallback='ERROR'))\n    handler.setFormatter(logging.Formatter(runtime_config.get('LOG', 'weixin_format', fallback='[%(levelname)s] %(message)s')))\n    root_logger.addHandler(handler)\n"
  }
]