@hitrading/ctp-node 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +208 -0
  3. package/README.zh-CN.md +185 -0
  4. package/binding.gyp +90 -0
  5. package/dist/client.d.ts +115 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +466 -0
  8. package/dist/client.js.map +1 -0
  9. package/dist/codec.d.ts +29 -0
  10. package/dist/codec.d.ts.map +1 -0
  11. package/dist/codec.js +131 -0
  12. package/dist/codec.js.map +1 -0
  13. package/dist/generated/enums.gen.d.ts +2257 -0
  14. package/dist/generated/enums.gen.d.ts.map +1 -0
  15. package/dist/generated/enums.gen.js +2576 -0
  16. package/dist/generated/enums.gen.js.map +1 -0
  17. package/dist/generated/structs.gen.d.ts +11041 -0
  18. package/dist/generated/structs.gen.d.ts.map +1 -0
  19. package/dist/generated/structs.gen.js +939 -0
  20. package/dist/generated/structs.gen.js.map +1 -0
  21. package/dist/generated/trader.gen.d.ts +273 -0
  22. package/dist/generated/trader.gen.d.ts.map +1 -0
  23. package/dist/generated/trader.gen.js +653 -0
  24. package/dist/generated/trader.gen.js.map +1 -0
  25. package/dist/index.d.ts +9 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +9 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/market-data.d.ts +66 -0
  30. package/dist/market-data.d.ts.map +1 -0
  31. package/dist/market-data.js +105 -0
  32. package/dist/market-data.js.map +1 -0
  33. package/dist/native-binding.d.ts +2 -0
  34. package/dist/native-binding.d.ts.map +1 -0
  35. package/dist/native-binding.js +22 -0
  36. package/dist/native-binding.js.map +1 -0
  37. package/dist/trader.d.ts +234 -0
  38. package/dist/trader.d.ts.map +1 -0
  39. package/dist/trader.js +388 -0
  40. package/dist/trader.js.map +1 -0
  41. package/package.json +69 -0
  42. package/prebuilds/linux-x64/@hitrading+ctp-node.node +0 -0
  43. package/prebuilds/linux-x64/thostmduserapi_se.so +0 -0
  44. package/prebuilds/linux-x64/thosttraderapi_se.so +0 -0
  45. package/prebuilds/win32-x64/@hitrading+ctp-node.node +0 -0
  46. package/prebuilds/win32-x64/thostmduserapi_se.dll +0 -0
  47. package/prebuilds/win32-x64/thosttraderapi_se.dll +0 -0
  48. package/src/addon.cc +171 -0
  49. package/src/client.ts +539 -0
  50. package/src/codec.ts +160 -0
  51. package/src/generated/enums.gen.ts +2576 -0
  52. package/src/generated/layout.gen.cc +5771 -0
  53. package/src/generated/layout.gen.h +8 -0
  54. package/src/generated/structids.gen.h +470 -0
  55. package/src/generated/structs.gen.ts +12437 -0
  56. package/src/generated/trader.gen.ts +656 -0
  57. package/src/generated/traderreq.gen.cc +706 -0
  58. package/src/generated/traderreq.gen.h +127 -0
  59. package/src/generated/traderspi.gen.cc +636 -0
  60. package/src/generated/traderspi.gen.h +334 -0
  61. package/src/index.ts +14 -0
  62. package/src/market-data.ts +145 -0
  63. package/src/native/arm.cc +77 -0
  64. package/src/native/arm.h +71 -0
  65. package/src/native/channel.cc +175 -0
  66. package/src/native/channel.h +117 -0
  67. package/src/native/gbk.cc +54 -0
  68. package/src/native/gbk.h +17 -0
  69. package/src/native/mdapi.cc +412 -0
  70. package/src/native/mdapi.h +14 -0
  71. package/src/native/mdspi.cc +103 -0
  72. package/src/native/mdspi.h +81 -0
  73. package/src/native/risk.cc +461 -0
  74. package/src/native/risk.h +183 -0
  75. package/src/native/traderapi.cc +533 -0
  76. package/src/native/traderapi.h +14 -0
  77. package/src/native-binding.ts +25 -0
  78. package/src/trader.ts +522 -0
  79. package/tradeapi/ThostFtdcMdApi.h +168 -0
  80. package/tradeapi/ThostFtdcTraderApi.h +914 -0
  81. package/tradeapi/ThostFtdcUserApiDataType.h +7068 -0
  82. package/tradeapi/ThostFtdcUserApiStruct.h +12386 -0
  83. package/tradeapi/error.dtd +9 -0
  84. package/tradeapi/error.xml +284 -0
  85. package/tradeapi/linux/thostmduserapi_se.so +0 -0
  86. package/tradeapi/linux/thosttraderapi_se.so +0 -0
  87. package/tradeapi/macos/thostmduserapi_se.framework/Versions/A/Headers/ThostFtdcMdApi.h +168 -0
  88. package/tradeapi/macos/thostmduserapi_se.framework/Versions/A/Headers/ThostFtdcUserApiDataType.h +7068 -0
  89. package/tradeapi/macos/thostmduserapi_se.framework/Versions/A/Headers/ThostFtdcUserApiStruct.h +12386 -0
  90. package/tradeapi/macos/thostmduserapi_se.framework/Versions/A/Resources/Info.plist +46 -0
  91. package/tradeapi/macos/thostmduserapi_se.framework/Versions/A/_CodeSignature/CodeResources +149 -0
  92. package/tradeapi/macos/thostmduserapi_se.framework/Versions/A/thostmduserapi_se +0 -0
  93. package/tradeapi/macos/thosttraderapi_se.framework/Versions/A/Headers/ThostFtdcTraderApi.h +914 -0
  94. package/tradeapi/macos/thosttraderapi_se.framework/Versions/A/Headers/ThostFtdcUserApiDataType.h +7068 -0
  95. package/tradeapi/macos/thosttraderapi_se.framework/Versions/A/Headers/ThostFtdcUserApiStruct.h +12386 -0
  96. package/tradeapi/macos/thosttraderapi_se.framework/Versions/A/Resources/Info.plist +46 -0
  97. package/tradeapi/macos/thosttraderapi_se.framework/Versions/A/_CodeSignature/CodeResources +149 -0
  98. package/tradeapi/macos/thosttraderapi_se.framework/Versions/A/thosttraderapi_se +0 -0
  99. package/tradeapi/windows/thostmduserapi_se.dll +0 -0
  100. package/tradeapi/windows/thostmduserapi_se.lib +0 -0
  101. package/tradeapi/windows/thosttraderapi_se.dll +0 -0
  102. package/tradeapi/windows/thosttraderapi_se.lib +0 -0
@@ -0,0 +1,656 @@
1
+ /* AUTO-GENERATED by scripts/codegen/generate-trader.mjs. Do not edit. */
2
+
3
+ import { CtpClient } from "../client.js";
4
+ import { STRUCT_ID } from "./structs.gen.js";
5
+ import type * as S from "./structs.gen.js";
6
+
7
+ export enum TraderEvent {
8
+ FrontConnected = "front-connected",
9
+ FrontDisconnected = "front-disconnected",
10
+ HeartBeatWarning = "heart-beat-warning",
11
+ RspAuthenticate = "rsp-authenticate",
12
+ RspUserLogin = "rsp-user-login",
13
+ RspUserLogout = "rsp-user-logout",
14
+ RspUserPasswordUpdate = "rsp-user-password-update",
15
+ RspTradingAccountPasswordUpdate = "rsp-trading-account-password-update",
16
+ RspUserAuthMethod = "rsp-user-auth-method",
17
+ RspGenUserCaptcha = "rsp-gen-user-captcha",
18
+ RspGenUserText = "rsp-gen-user-text",
19
+ RspOrderInsert = "rsp-order-insert",
20
+ RspParkedOrderInsert = "rsp-parked-order-insert",
21
+ RspParkedOrderAction = "rsp-parked-order-action",
22
+ RspOrderAction = "rsp-order-action",
23
+ RspQryMaxOrderVolume = "rsp-qry-max-order-volume",
24
+ RspSettlementInfoConfirm = "rsp-settlement-info-confirm",
25
+ RspRemoveParkedOrder = "rsp-remove-parked-order",
26
+ RspRemoveParkedOrderAction = "rsp-remove-parked-order-action",
27
+ RspExecOrderInsert = "rsp-exec-order-insert",
28
+ RspExecOrderAction = "rsp-exec-order-action",
29
+ RspForQuoteInsert = "rsp-for-quote-insert",
30
+ RspQuoteInsert = "rsp-quote-insert",
31
+ RspQuoteAction = "rsp-quote-action",
32
+ RspBatchOrderAction = "rsp-batch-order-action",
33
+ RspOptionSelfCloseInsert = "rsp-option-self-close-insert",
34
+ RspOptionSelfCloseAction = "rsp-option-self-close-action",
35
+ RspCombActionInsert = "rsp-comb-action-insert",
36
+ RspQryOrder = "rsp-qry-order",
37
+ RspQryTrade = "rsp-qry-trade",
38
+ RspQryInvestorPosition = "rsp-qry-investor-position",
39
+ RspQryTradingAccount = "rsp-qry-trading-account",
40
+ RspQryInvestor = "rsp-qry-investor",
41
+ RspQryTradingCode = "rsp-qry-trading-code",
42
+ RspQryInstrumentMarginRate = "rsp-qry-instrument-margin-rate",
43
+ RspQryInstrumentCommissionRate = "rsp-qry-instrument-commission-rate",
44
+ RspQryExchange = "rsp-qry-exchange",
45
+ RspQryProduct = "rsp-qry-product",
46
+ RspQryInstrument = "rsp-qry-instrument",
47
+ RspQryDepthMarketData = "rsp-qry-depth-market-data",
48
+ RspQryTraderOffer = "rsp-qry-trader-offer",
49
+ RspQrySettlementInfo = "rsp-qry-settlement-info",
50
+ RspQryTransferBank = "rsp-qry-transfer-bank",
51
+ RspQryInvestorPositionDetail = "rsp-qry-investor-position-detail",
52
+ RspQryNotice = "rsp-qry-notice",
53
+ RspQrySettlementInfoConfirm = "rsp-qry-settlement-info-confirm",
54
+ RspQryInvestorPositionCombineDetail = "rsp-qry-investor-position-combine-detail",
55
+ RspQryCFMMCTradingAccountKey = "rsp-qry-cfmmc-trading-account-key",
56
+ RspQryEWarrantOffset = "rsp-qry-e-warrant-offset",
57
+ RspQryInvestorProductGroupMargin = "rsp-qry-investor-product-group-margin",
58
+ RspQryExchangeMarginRate = "rsp-qry-exchange-margin-rate",
59
+ RspQryExchangeMarginRateAdjust = "rsp-qry-exchange-margin-rate-adjust",
60
+ RspQryExchangeRate = "rsp-qry-exchange-rate",
61
+ RspQrySecAgentACIDMap = "rsp-qry-sec-agent-acid-map",
62
+ RspQryProductExchRate = "rsp-qry-product-exch-rate",
63
+ RspQryProductGroup = "rsp-qry-product-group",
64
+ RspQryMMInstrumentCommissionRate = "rsp-qry-mm-instrument-commission-rate",
65
+ RspQryMMOptionInstrCommRate = "rsp-qry-mm-option-instr-comm-rate",
66
+ RspQryInstrumentOrderCommRate = "rsp-qry-instrument-order-comm-rate",
67
+ RspQrySecAgentTradingAccount = "rsp-qry-sec-agent-trading-account",
68
+ RspQrySecAgentCheckMode = "rsp-qry-sec-agent-check-mode",
69
+ RspQrySecAgentTradeInfo = "rsp-qry-sec-agent-trade-info",
70
+ RspQryOptionInstrTradeCost = "rsp-qry-option-instr-trade-cost",
71
+ RspQryOptionInstrCommRate = "rsp-qry-option-instr-comm-rate",
72
+ RspQryExecOrder = "rsp-qry-exec-order",
73
+ RspQryForQuote = "rsp-qry-for-quote",
74
+ RspQryQuote = "rsp-qry-quote",
75
+ RspQryOptionSelfClose = "rsp-qry-option-self-close",
76
+ RspQryInvestUnit = "rsp-qry-invest-unit",
77
+ RspQryCombInstrumentGuard = "rsp-qry-comb-instrument-guard",
78
+ RspQryCombAction = "rsp-qry-comb-action",
79
+ RspQryTransferSerial = "rsp-qry-transfer-serial",
80
+ RspQryAccountregister = "rsp-qry-accountregister",
81
+ RspError = "rsp-error",
82
+ RtnOrder = "rtn-order",
83
+ RtnTrade = "rtn-trade",
84
+ ErrRtnOrderInsert = "err-rtn-order-insert",
85
+ ErrRtnOrderAction = "err-rtn-order-action",
86
+ RtnInstrumentStatus = "rtn-instrument-status",
87
+ RtnBulletin = "rtn-bulletin",
88
+ RtnTradingNotice = "rtn-trading-notice",
89
+ RtnErrorConditionalOrder = "rtn-error-conditional-order",
90
+ RtnExecOrder = "rtn-exec-order",
91
+ ErrRtnExecOrderInsert = "err-rtn-exec-order-insert",
92
+ ErrRtnExecOrderAction = "err-rtn-exec-order-action",
93
+ ErrRtnForQuoteInsert = "err-rtn-for-quote-insert",
94
+ RtnQuote = "rtn-quote",
95
+ ErrRtnQuoteInsert = "err-rtn-quote-insert",
96
+ ErrRtnQuoteAction = "err-rtn-quote-action",
97
+ RtnForQuoteRsp = "rtn-for-quote-rsp",
98
+ RtnCFMMCTradingAccountToken = "rtn-cfmmc-trading-account-token",
99
+ ErrRtnBatchOrderAction = "err-rtn-batch-order-action",
100
+ RtnOptionSelfClose = "rtn-option-self-close",
101
+ ErrRtnOptionSelfCloseInsert = "err-rtn-option-self-close-insert",
102
+ ErrRtnOptionSelfCloseAction = "err-rtn-option-self-close-action",
103
+ RtnCombAction = "rtn-comb-action",
104
+ ErrRtnCombActionInsert = "err-rtn-comb-action-insert",
105
+ RspQryContractBank = "rsp-qry-contract-bank",
106
+ RspQryParkedOrder = "rsp-qry-parked-order",
107
+ RspQryParkedOrderAction = "rsp-qry-parked-order-action",
108
+ RspQryTradingNotice = "rsp-qry-trading-notice",
109
+ RspQryBrokerTradingParams = "rsp-qry-broker-trading-params",
110
+ RspQryBrokerTradingAlgos = "rsp-qry-broker-trading-algos",
111
+ RspQueryCFMMCTradingAccountToken = "rsp-query-cfmmc-trading-account-token",
112
+ RtnFromBankToFutureByBank = "rtn-from-bank-to-future-by-bank",
113
+ RtnFromFutureToBankByBank = "rtn-from-future-to-bank-by-bank",
114
+ RtnRepealFromBankToFutureByBank = "rtn-repeal-from-bank-to-future-by-bank",
115
+ RtnRepealFromFutureToBankByBank = "rtn-repeal-from-future-to-bank-by-bank",
116
+ RtnFromBankToFutureByFuture = "rtn-from-bank-to-future-by-future",
117
+ RtnFromFutureToBankByFuture = "rtn-from-future-to-bank-by-future",
118
+ RtnRepealFromBankToFutureByFutureManual = "rtn-repeal-from-bank-to-future-by-future-manual",
119
+ RtnRepealFromFutureToBankByFutureManual = "rtn-repeal-from-future-to-bank-by-future-manual",
120
+ RtnQueryBankBalanceByFuture = "rtn-query-bank-balance-by-future",
121
+ ErrRtnBankToFutureByFuture = "err-rtn-bank-to-future-by-future",
122
+ ErrRtnFutureToBankByFuture = "err-rtn-future-to-bank-by-future",
123
+ ErrRtnRepealBankToFutureByFutureManual = "err-rtn-repeal-bank-to-future-by-future-manual",
124
+ ErrRtnRepealFutureToBankByFutureManual = "err-rtn-repeal-future-to-bank-by-future-manual",
125
+ ErrRtnQueryBankBalanceByFuture = "err-rtn-query-bank-balance-by-future",
126
+ RtnRepealFromBankToFutureByFuture = "rtn-repeal-from-bank-to-future-by-future",
127
+ RtnRepealFromFutureToBankByFuture = "rtn-repeal-from-future-to-bank-by-future",
128
+ RspFromBankToFutureByFuture = "rsp-from-bank-to-future-by-future",
129
+ RspFromFutureToBankByFuture = "rsp-from-future-to-bank-by-future",
130
+ RspQueryBankAccountMoneyByFuture = "rsp-query-bank-account-money-by-future",
131
+ RtnOpenAccountByBank = "rtn-open-account-by-bank",
132
+ RtnCancelAccountByBank = "rtn-cancel-account-by-bank",
133
+ RtnChangeAccountByBank = "rtn-change-account-by-bank",
134
+ RspQryClassifiedInstrument = "rsp-qry-classified-instrument",
135
+ RspQryCombPromotionParam = "rsp-qry-comb-promotion-param",
136
+ RspQryRiskSettleInvstPosition = "rsp-qry-risk-settle-invst-position",
137
+ RspQryRiskSettleProductStatus = "rsp-qry-risk-settle-product-status",
138
+ RspQrySPBMFutureParameter = "rsp-qry-spbm-future-parameter",
139
+ RspQrySPBMOptionParameter = "rsp-qry-spbm-option-parameter",
140
+ RspQrySPBMIntraParameter = "rsp-qry-spbm-intra-parameter",
141
+ RspQrySPBMInterParameter = "rsp-qry-spbm-inter-parameter",
142
+ RspQrySPBMPortfDefinition = "rsp-qry-spbm-portf-definition",
143
+ RspQrySPBMInvestorPortfDef = "rsp-qry-spbm-investor-portf-def",
144
+ RspQryInvestorPortfMarginRatio = "rsp-qry-investor-portf-margin-ratio",
145
+ RspQryInvestorProdSPBMDetail = "rsp-qry-investor-prod-spbm-detail",
146
+ RspQryInvestorCommoditySPMMMargin = "rsp-qry-investor-commodity-spmm-margin",
147
+ RspQryInvestorCommodityGroupSPMMMargin = "rsp-qry-investor-commodity-group-spmm-margin",
148
+ RspQrySPMMInstParam = "rsp-qry-spmm-inst-param",
149
+ RspQrySPMMProductParam = "rsp-qry-spmm-product-param",
150
+ RspQrySPBMAddOnInterParameter = "rsp-qry-spbm-add-on-inter-parameter",
151
+ RspQryRCAMSCombProductInfo = "rsp-qry-rcams-comb-product-info",
152
+ RspQryRCAMSInstrParameter = "rsp-qry-rcams-instr-parameter",
153
+ RspQryRCAMSIntraParameter = "rsp-qry-rcams-intra-parameter",
154
+ RspQryRCAMSInterParameter = "rsp-qry-rcams-inter-parameter",
155
+ RspQryRCAMSShortOptAdjustParam = "rsp-qry-rcams-short-opt-adjust-param",
156
+ RspQryRCAMSInvestorCombPosition = "rsp-qry-rcams-investor-comb-position",
157
+ RspQryInvestorProdRCAMSMargin = "rsp-qry-investor-prod-rcams-margin",
158
+ RspQryRULEInstrParameter = "rsp-qry-rule-instr-parameter",
159
+ RspQryRULEIntraParameter = "rsp-qry-rule-intra-parameter",
160
+ RspQryRULEInterParameter = "rsp-qry-rule-inter-parameter",
161
+ RspQryInvestorProdRULEMargin = "rsp-qry-investor-prod-rule-margin",
162
+ }
163
+
164
+ export const TRADER_EVENTS: Map<number, string> = new Map([
165
+ [8192 + 1, "front-connected"],
166
+ [8192 + 2, "front-disconnected"],
167
+ [8192 + 3, "heart-beat-warning"],
168
+ [8192 + 4, "rsp-authenticate"],
169
+ [8192 + 5, "rsp-user-login"],
170
+ [8192 + 6, "rsp-user-logout"],
171
+ [8192 + 7, "rsp-user-password-update"],
172
+ [8192 + 8, "rsp-trading-account-password-update"],
173
+ [8192 + 9, "rsp-user-auth-method"],
174
+ [8192 + 10, "rsp-gen-user-captcha"],
175
+ [8192 + 11, "rsp-gen-user-text"],
176
+ [8192 + 12, "rsp-order-insert"],
177
+ [8192 + 13, "rsp-parked-order-insert"],
178
+ [8192 + 14, "rsp-parked-order-action"],
179
+ [8192 + 15, "rsp-order-action"],
180
+ [8192 + 16, "rsp-qry-max-order-volume"],
181
+ [8192 + 17, "rsp-settlement-info-confirm"],
182
+ [8192 + 18, "rsp-remove-parked-order"],
183
+ [8192 + 19, "rsp-remove-parked-order-action"],
184
+ [8192 + 20, "rsp-exec-order-insert"],
185
+ [8192 + 21, "rsp-exec-order-action"],
186
+ [8192 + 22, "rsp-for-quote-insert"],
187
+ [8192 + 23, "rsp-quote-insert"],
188
+ [8192 + 24, "rsp-quote-action"],
189
+ [8192 + 25, "rsp-batch-order-action"],
190
+ [8192 + 26, "rsp-option-self-close-insert"],
191
+ [8192 + 27, "rsp-option-self-close-action"],
192
+ [8192 + 28, "rsp-comb-action-insert"],
193
+ [8192 + 29, "rsp-qry-order"],
194
+ [8192 + 30, "rsp-qry-trade"],
195
+ [8192 + 31, "rsp-qry-investor-position"],
196
+ [8192 + 32, "rsp-qry-trading-account"],
197
+ [8192 + 33, "rsp-qry-investor"],
198
+ [8192 + 34, "rsp-qry-trading-code"],
199
+ [8192 + 35, "rsp-qry-instrument-margin-rate"],
200
+ [8192 + 36, "rsp-qry-instrument-commission-rate"],
201
+ [8192 + 37, "rsp-qry-exchange"],
202
+ [8192 + 38, "rsp-qry-product"],
203
+ [8192 + 39, "rsp-qry-instrument"],
204
+ [8192 + 40, "rsp-qry-depth-market-data"],
205
+ [8192 + 41, "rsp-qry-trader-offer"],
206
+ [8192 + 42, "rsp-qry-settlement-info"],
207
+ [8192 + 43, "rsp-qry-transfer-bank"],
208
+ [8192 + 44, "rsp-qry-investor-position-detail"],
209
+ [8192 + 45, "rsp-qry-notice"],
210
+ [8192 + 46, "rsp-qry-settlement-info-confirm"],
211
+ [8192 + 47, "rsp-qry-investor-position-combine-detail"],
212
+ [8192 + 48, "rsp-qry-cfmmc-trading-account-key"],
213
+ [8192 + 49, "rsp-qry-e-warrant-offset"],
214
+ [8192 + 50, "rsp-qry-investor-product-group-margin"],
215
+ [8192 + 51, "rsp-qry-exchange-margin-rate"],
216
+ [8192 + 52, "rsp-qry-exchange-margin-rate-adjust"],
217
+ [8192 + 53, "rsp-qry-exchange-rate"],
218
+ [8192 + 54, "rsp-qry-sec-agent-acid-map"],
219
+ [8192 + 55, "rsp-qry-product-exch-rate"],
220
+ [8192 + 56, "rsp-qry-product-group"],
221
+ [8192 + 57, "rsp-qry-mm-instrument-commission-rate"],
222
+ [8192 + 58, "rsp-qry-mm-option-instr-comm-rate"],
223
+ [8192 + 59, "rsp-qry-instrument-order-comm-rate"],
224
+ [8192 + 60, "rsp-qry-sec-agent-trading-account"],
225
+ [8192 + 61, "rsp-qry-sec-agent-check-mode"],
226
+ [8192 + 62, "rsp-qry-sec-agent-trade-info"],
227
+ [8192 + 63, "rsp-qry-option-instr-trade-cost"],
228
+ [8192 + 64, "rsp-qry-option-instr-comm-rate"],
229
+ [8192 + 65, "rsp-qry-exec-order"],
230
+ [8192 + 66, "rsp-qry-for-quote"],
231
+ [8192 + 67, "rsp-qry-quote"],
232
+ [8192 + 68, "rsp-qry-option-self-close"],
233
+ [8192 + 69, "rsp-qry-invest-unit"],
234
+ [8192 + 70, "rsp-qry-comb-instrument-guard"],
235
+ [8192 + 71, "rsp-qry-comb-action"],
236
+ [8192 + 72, "rsp-qry-transfer-serial"],
237
+ [8192 + 73, "rsp-qry-accountregister"],
238
+ [8192 + 74, "rsp-error"],
239
+ [8192 + 75, "rtn-order"],
240
+ [8192 + 76, "rtn-trade"],
241
+ [8192 + 77, "err-rtn-order-insert"],
242
+ [8192 + 78, "err-rtn-order-action"],
243
+ [8192 + 79, "rtn-instrument-status"],
244
+ [8192 + 80, "rtn-bulletin"],
245
+ [8192 + 81, "rtn-trading-notice"],
246
+ [8192 + 82, "rtn-error-conditional-order"],
247
+ [8192 + 83, "rtn-exec-order"],
248
+ [8192 + 84, "err-rtn-exec-order-insert"],
249
+ [8192 + 85, "err-rtn-exec-order-action"],
250
+ [8192 + 86, "err-rtn-for-quote-insert"],
251
+ [8192 + 87, "rtn-quote"],
252
+ [8192 + 88, "err-rtn-quote-insert"],
253
+ [8192 + 89, "err-rtn-quote-action"],
254
+ [8192 + 90, "rtn-for-quote-rsp"],
255
+ [8192 + 91, "rtn-cfmmc-trading-account-token"],
256
+ [8192 + 92, "err-rtn-batch-order-action"],
257
+ [8192 + 93, "rtn-option-self-close"],
258
+ [8192 + 94, "err-rtn-option-self-close-insert"],
259
+ [8192 + 95, "err-rtn-option-self-close-action"],
260
+ [8192 + 96, "rtn-comb-action"],
261
+ [8192 + 97, "err-rtn-comb-action-insert"],
262
+ [8192 + 98, "rsp-qry-contract-bank"],
263
+ [8192 + 99, "rsp-qry-parked-order"],
264
+ [8192 + 100, "rsp-qry-parked-order-action"],
265
+ [8192 + 101, "rsp-qry-trading-notice"],
266
+ [8192 + 102, "rsp-qry-broker-trading-params"],
267
+ [8192 + 103, "rsp-qry-broker-trading-algos"],
268
+ [8192 + 104, "rsp-query-cfmmc-trading-account-token"],
269
+ [8192 + 105, "rtn-from-bank-to-future-by-bank"],
270
+ [8192 + 106, "rtn-from-future-to-bank-by-bank"],
271
+ [8192 + 107, "rtn-repeal-from-bank-to-future-by-bank"],
272
+ [8192 + 108, "rtn-repeal-from-future-to-bank-by-bank"],
273
+ [8192 + 109, "rtn-from-bank-to-future-by-future"],
274
+ [8192 + 110, "rtn-from-future-to-bank-by-future"],
275
+ [8192 + 111, "rtn-repeal-from-bank-to-future-by-future-manual"],
276
+ [8192 + 112, "rtn-repeal-from-future-to-bank-by-future-manual"],
277
+ [8192 + 113, "rtn-query-bank-balance-by-future"],
278
+ [8192 + 114, "err-rtn-bank-to-future-by-future"],
279
+ [8192 + 115, "err-rtn-future-to-bank-by-future"],
280
+ [8192 + 116, "err-rtn-repeal-bank-to-future-by-future-manual"],
281
+ [8192 + 117, "err-rtn-repeal-future-to-bank-by-future-manual"],
282
+ [8192 + 118, "err-rtn-query-bank-balance-by-future"],
283
+ [8192 + 119, "rtn-repeal-from-bank-to-future-by-future"],
284
+ [8192 + 120, "rtn-repeal-from-future-to-bank-by-future"],
285
+ [8192 + 121, "rsp-from-bank-to-future-by-future"],
286
+ [8192 + 122, "rsp-from-future-to-bank-by-future"],
287
+ [8192 + 123, "rsp-query-bank-account-money-by-future"],
288
+ [8192 + 124, "rtn-open-account-by-bank"],
289
+ [8192 + 125, "rtn-cancel-account-by-bank"],
290
+ [8192 + 126, "rtn-change-account-by-bank"],
291
+ [8192 + 127, "rsp-qry-classified-instrument"],
292
+ [8192 + 128, "rsp-qry-comb-promotion-param"],
293
+ [8192 + 129, "rsp-qry-risk-settle-invst-position"],
294
+ [8192 + 130, "rsp-qry-risk-settle-product-status"],
295
+ [8192 + 131, "rsp-qry-spbm-future-parameter"],
296
+ [8192 + 132, "rsp-qry-spbm-option-parameter"],
297
+ [8192 + 133, "rsp-qry-spbm-intra-parameter"],
298
+ [8192 + 134, "rsp-qry-spbm-inter-parameter"],
299
+ [8192 + 135, "rsp-qry-spbm-portf-definition"],
300
+ [8192 + 136, "rsp-qry-spbm-investor-portf-def"],
301
+ [8192 + 137, "rsp-qry-investor-portf-margin-ratio"],
302
+ [8192 + 138, "rsp-qry-investor-prod-spbm-detail"],
303
+ [8192 + 139, "rsp-qry-investor-commodity-spmm-margin"],
304
+ [8192 + 140, "rsp-qry-investor-commodity-group-spmm-margin"],
305
+ [8192 + 141, "rsp-qry-spmm-inst-param"],
306
+ [8192 + 142, "rsp-qry-spmm-product-param"],
307
+ [8192 + 143, "rsp-qry-spbm-add-on-inter-parameter"],
308
+ [8192 + 144, "rsp-qry-rcams-comb-product-info"],
309
+ [8192 + 145, "rsp-qry-rcams-instr-parameter"],
310
+ [8192 + 146, "rsp-qry-rcams-intra-parameter"],
311
+ [8192 + 147, "rsp-qry-rcams-inter-parameter"],
312
+ [8192 + 148, "rsp-qry-rcams-short-opt-adjust-param"],
313
+ [8192 + 149, "rsp-qry-rcams-investor-comb-position"],
314
+ [8192 + 150, "rsp-qry-investor-prod-rcams-margin"],
315
+ [8192 + 151, "rsp-qry-rule-instr-parameter"],
316
+ [8192 + 152, "rsp-qry-rule-intra-parameter"],
317
+ [8192 + 153, "rsp-qry-rule-inter-parameter"],
318
+ [8192 + 154, "rsp-qry-investor-prod-rule-margin"],
319
+ ]);
320
+
321
+ /* eslint-disable @typescript-eslint/no-explicit-any */
322
+ export abstract class TraderBase extends CtpClient {
323
+ reqAuthenticate(req: Partial<S.ReqAuthenticate> = {}): Promise<unknown> {
324
+ return this.request((id) => this.native._req(1, this.encode(STRUCT_ID.ReqAuthenticate, req as Record<string, unknown>), id), true);
325
+ }
326
+ reqUserLogin(req: Partial<S.ReqUserLogin> = {}): Promise<unknown> {
327
+ return this.request((id) => this.native._req(2, this.encode(STRUCT_ID.ReqUserLogin, req as Record<string, unknown>), id), true);
328
+ }
329
+ reqUserLogout(req: Partial<S.UserLogout> = {}): Promise<unknown> {
330
+ return this.request((id) => this.native._req(3, this.encode(STRUCT_ID.UserLogout, req as Record<string, unknown>), id), true);
331
+ }
332
+ reqUserPasswordUpdate(req: Partial<S.UserPasswordUpdate> = {}): Promise<unknown> {
333
+ return this.request((id) => this.native._req(4, this.encode(STRUCT_ID.UserPasswordUpdate, req as Record<string, unknown>), id), true);
334
+ }
335
+ reqTradingAccountPasswordUpdate(req: Partial<S.TradingAccountPasswordUpdate> = {}): Promise<unknown> {
336
+ return this.request((id) => this.native._req(5, this.encode(STRUCT_ID.TradingAccountPasswordUpdate, req as Record<string, unknown>), id), true);
337
+ }
338
+ reqUserAuthMethod(req: Partial<S.ReqUserAuthMethod> = {}): Promise<unknown> {
339
+ return this.request((id) => this.native._req(6, this.encode(STRUCT_ID.ReqUserAuthMethod, req as Record<string, unknown>), id), true);
340
+ }
341
+ reqGenUserCaptcha(req: Partial<S.ReqGenUserCaptcha> = {}): Promise<unknown> {
342
+ return this.request((id) => this.native._req(7, this.encode(STRUCT_ID.ReqGenUserCaptcha, req as Record<string, unknown>), id), true);
343
+ }
344
+ reqGenUserText(req: Partial<S.ReqGenUserText> = {}): Promise<unknown> {
345
+ return this.request((id) => this.native._req(8, this.encode(STRUCT_ID.ReqGenUserText, req as Record<string, unknown>), id), true);
346
+ }
347
+ reqUserLoginWithCaptcha(req: Partial<S.ReqUserLoginWithCaptcha> = {}): Promise<unknown> {
348
+ return this.request((id) => this.native._req(9, this.encode(STRUCT_ID.ReqUserLoginWithCaptcha, req as Record<string, unknown>), id), true);
349
+ }
350
+ reqUserLoginWithText(req: Partial<S.ReqUserLoginWithText> = {}): Promise<unknown> {
351
+ return this.request((id) => this.native._req(10, this.encode(STRUCT_ID.ReqUserLoginWithText, req as Record<string, unknown>), id), true);
352
+ }
353
+ reqUserLoginWithOtp(req: Partial<S.ReqUserLoginWithOTP> = {}): Promise<unknown> {
354
+ return this.request((id) => this.native._req(11, this.encode(STRUCT_ID.ReqUserLoginWithOTP, req as Record<string, unknown>), id), true);
355
+ }
356
+ reqOrderInsert(req: Partial<S.InputOrder> = {}): Promise<void> {
357
+ return this.submit((id) => this.native._req(12, this.encode(STRUCT_ID.InputOrder, req as Record<string, unknown>), id));
358
+ }
359
+ reqParkedOrderInsert(req: Partial<S.ParkedOrder> = {}): Promise<unknown> {
360
+ return this.request((id) => this.native._req(13, this.encode(STRUCT_ID.ParkedOrder, req as Record<string, unknown>), id), true);
361
+ }
362
+ reqParkedOrderAction(req: Partial<S.ParkedOrderAction> = {}): Promise<unknown> {
363
+ return this.request((id) => this.native._req(14, this.encode(STRUCT_ID.ParkedOrderAction, req as Record<string, unknown>), id), true);
364
+ }
365
+ reqOrderAction(req: Partial<S.InputOrderAction> = {}): Promise<void> {
366
+ return this.submit((id) => this.native._req(15, this.encode(STRUCT_ID.InputOrderAction, req as Record<string, unknown>), id));
367
+ }
368
+ reqQryMaxOrderVolume(req: Partial<S.QryMaxOrderVolume> = {}): Promise<unknown[]> {
369
+ return this.request((id) => this.native._req(16, this.encode(STRUCT_ID.QryMaxOrderVolume, req as Record<string, unknown>), id), false);
370
+ }
371
+ reqSettlementInfoConfirm(req: Partial<S.SettlementInfoConfirm> = {}): Promise<unknown> {
372
+ return this.request((id) => this.native._req(17, this.encode(STRUCT_ID.SettlementInfoConfirm, req as Record<string, unknown>), id), true);
373
+ }
374
+ reqRemoveParkedOrder(req: Partial<S.RemoveParkedOrder> = {}): Promise<unknown> {
375
+ return this.request((id) => this.native._req(18, this.encode(STRUCT_ID.RemoveParkedOrder, req as Record<string, unknown>), id), true);
376
+ }
377
+ reqRemoveParkedOrderAction(req: Partial<S.RemoveParkedOrderAction> = {}): Promise<unknown> {
378
+ return this.request((id) => this.native._req(19, this.encode(STRUCT_ID.RemoveParkedOrderAction, req as Record<string, unknown>), id), true);
379
+ }
380
+ reqExecOrderInsert(req: Partial<S.InputExecOrder> = {}): Promise<void> {
381
+ return this.submit((id) => this.native._req(20, this.encode(STRUCT_ID.InputExecOrder, req as Record<string, unknown>), id));
382
+ }
383
+ reqExecOrderAction(req: Partial<S.InputExecOrderAction> = {}): Promise<void> {
384
+ return this.submit((id) => this.native._req(21, this.encode(STRUCT_ID.InputExecOrderAction, req as Record<string, unknown>), id));
385
+ }
386
+ reqForQuoteInsert(req: Partial<S.InputForQuote> = {}): Promise<void> {
387
+ return this.submit((id) => this.native._req(22, this.encode(STRUCT_ID.InputForQuote, req as Record<string, unknown>), id));
388
+ }
389
+ reqQuoteInsert(req: Partial<S.InputQuote> = {}): Promise<void> {
390
+ return this.submit((id) => this.native._req(23, this.encode(STRUCT_ID.InputQuote, req as Record<string, unknown>), id));
391
+ }
392
+ reqQuoteAction(req: Partial<S.InputQuoteAction> = {}): Promise<void> {
393
+ return this.submit((id) => this.native._req(24, this.encode(STRUCT_ID.InputQuoteAction, req as Record<string, unknown>), id));
394
+ }
395
+ reqBatchOrderAction(req: Partial<S.InputBatchOrderAction> = {}): Promise<void> {
396
+ return this.submit((id) => this.native._req(25, this.encode(STRUCT_ID.InputBatchOrderAction, req as Record<string, unknown>), id));
397
+ }
398
+ reqOptionSelfCloseInsert(req: Partial<S.InputOptionSelfClose> = {}): Promise<void> {
399
+ return this.submit((id) => this.native._req(26, this.encode(STRUCT_ID.InputOptionSelfClose, req as Record<string, unknown>), id));
400
+ }
401
+ reqOptionSelfCloseAction(req: Partial<S.InputOptionSelfCloseAction> = {}): Promise<void> {
402
+ return this.submit((id) => this.native._req(27, this.encode(STRUCT_ID.InputOptionSelfCloseAction, req as Record<string, unknown>), id));
403
+ }
404
+ reqCombActionInsert(req: Partial<S.InputCombAction> = {}): Promise<void> {
405
+ return this.submit((id) => this.native._req(28, this.encode(STRUCT_ID.InputCombAction, req as Record<string, unknown>), id));
406
+ }
407
+ reqQryOrder(req: Partial<S.QryOrder> = {}): Promise<unknown[]> {
408
+ return this.request((id) => this.native._req(29, this.encode(STRUCT_ID.QryOrder, req as Record<string, unknown>), id), false);
409
+ }
410
+ reqQryTrade(req: Partial<S.QryTrade> = {}): Promise<unknown[]> {
411
+ return this.request((id) => this.native._req(30, this.encode(STRUCT_ID.QryTrade, req as Record<string, unknown>), id), false);
412
+ }
413
+ reqQryInvestorPosition(req: Partial<S.QryInvestorPosition> = {}): Promise<unknown[]> {
414
+ return this.request((id) => this.native._req(31, this.encode(STRUCT_ID.QryInvestorPosition, req as Record<string, unknown>), id), false);
415
+ }
416
+ reqQryTradingAccount(req: Partial<S.QryTradingAccount> = {}): Promise<unknown[]> {
417
+ return this.request((id) => this.native._req(32, this.encode(STRUCT_ID.QryTradingAccount, req as Record<string, unknown>), id), false);
418
+ }
419
+ reqQryInvestor(req: Partial<S.QryInvestor> = {}): Promise<unknown[]> {
420
+ return this.request((id) => this.native._req(33, this.encode(STRUCT_ID.QryInvestor, req as Record<string, unknown>), id), false);
421
+ }
422
+ reqQryTradingCode(req: Partial<S.QryTradingCode> = {}): Promise<unknown[]> {
423
+ return this.request((id) => this.native._req(34, this.encode(STRUCT_ID.QryTradingCode, req as Record<string, unknown>), id), false);
424
+ }
425
+ reqQryInstrumentMarginRate(req: Partial<S.QryInstrumentMarginRate> = {}): Promise<unknown[]> {
426
+ return this.request((id) => this.native._req(35, this.encode(STRUCT_ID.QryInstrumentMarginRate, req as Record<string, unknown>), id), false);
427
+ }
428
+ reqQryInstrumentCommissionRate(req: Partial<S.QryInstrumentCommissionRate> = {}): Promise<unknown[]> {
429
+ return this.request((id) => this.native._req(36, this.encode(STRUCT_ID.QryInstrumentCommissionRate, req as Record<string, unknown>), id), false);
430
+ }
431
+ reqQryExchange(req: Partial<S.QryExchange> = {}): Promise<unknown[]> {
432
+ return this.request((id) => this.native._req(37, this.encode(STRUCT_ID.QryExchange, req as Record<string, unknown>), id), false);
433
+ }
434
+ reqQryProduct(req: Partial<S.QryProduct> = {}): Promise<unknown[]> {
435
+ return this.request((id) => this.native._req(38, this.encode(STRUCT_ID.QryProduct, req as Record<string, unknown>), id), false);
436
+ }
437
+ reqQryInstrument(req: Partial<S.QryInstrument> = {}): Promise<unknown[]> {
438
+ return this.request((id) => this.native._req(39, this.encode(STRUCT_ID.QryInstrument, req as Record<string, unknown>), id), false);
439
+ }
440
+ reqQryDepthMarketData(req: Partial<S.QryDepthMarketData> = {}): Promise<unknown[]> {
441
+ return this.request((id) => this.native._req(40, this.encode(STRUCT_ID.QryDepthMarketData, req as Record<string, unknown>), id), false);
442
+ }
443
+ reqQryTraderOffer(req: Partial<S.QryTraderOffer> = {}): Promise<unknown[]> {
444
+ return this.request((id) => this.native._req(41, this.encode(STRUCT_ID.QryTraderOffer, req as Record<string, unknown>), id), false);
445
+ }
446
+ reqQrySettlementInfo(req: Partial<S.QrySettlementInfo> = {}): Promise<unknown[]> {
447
+ return this.request((id) => this.native._req(42, this.encode(STRUCT_ID.QrySettlementInfo, req as Record<string, unknown>), id), false);
448
+ }
449
+ reqQryTransferBank(req: Partial<S.QryTransferBank> = {}): Promise<unknown[]> {
450
+ return this.request((id) => this.native._req(43, this.encode(STRUCT_ID.QryTransferBank, req as Record<string, unknown>), id), false);
451
+ }
452
+ reqQryInvestorPositionDetail(req: Partial<S.QryInvestorPositionDetail> = {}): Promise<unknown[]> {
453
+ return this.request((id) => this.native._req(44, this.encode(STRUCT_ID.QryInvestorPositionDetail, req as Record<string, unknown>), id), false);
454
+ }
455
+ reqQryNotice(req: Partial<S.QryNotice> = {}): Promise<unknown[]> {
456
+ return this.request((id) => this.native._req(45, this.encode(STRUCT_ID.QryNotice, req as Record<string, unknown>), id), false);
457
+ }
458
+ reqQrySettlementInfoConfirm(req: Partial<S.QrySettlementInfoConfirm> = {}): Promise<unknown[]> {
459
+ return this.request((id) => this.native._req(46, this.encode(STRUCT_ID.QrySettlementInfoConfirm, req as Record<string, unknown>), id), false);
460
+ }
461
+ reqQryInvestorPositionCombineDetail(req: Partial<S.QryInvestorPositionCombineDetail> = {}): Promise<unknown[]> {
462
+ return this.request((id) => this.native._req(47, this.encode(STRUCT_ID.QryInvestorPositionCombineDetail, req as Record<string, unknown>), id), false);
463
+ }
464
+ reqQryCfmmcTradingAccountKey(req: Partial<S.QryCFMMCTradingAccountKey> = {}): Promise<unknown[]> {
465
+ return this.request((id) => this.native._req(48, this.encode(STRUCT_ID.QryCFMMCTradingAccountKey, req as Record<string, unknown>), id), false);
466
+ }
467
+ reqQryEWarrantOffset(req: Partial<S.QryEWarrantOffset> = {}): Promise<unknown[]> {
468
+ return this.request((id) => this.native._req(49, this.encode(STRUCT_ID.QryEWarrantOffset, req as Record<string, unknown>), id), false);
469
+ }
470
+ reqQryInvestorProductGroupMargin(req: Partial<S.QryInvestorProductGroupMargin> = {}): Promise<unknown[]> {
471
+ return this.request((id) => this.native._req(50, this.encode(STRUCT_ID.QryInvestorProductGroupMargin, req as Record<string, unknown>), id), false);
472
+ }
473
+ reqQryExchangeMarginRate(req: Partial<S.QryExchangeMarginRate> = {}): Promise<unknown[]> {
474
+ return this.request((id) => this.native._req(51, this.encode(STRUCT_ID.QryExchangeMarginRate, req as Record<string, unknown>), id), false);
475
+ }
476
+ reqQryExchangeMarginRateAdjust(req: Partial<S.QryExchangeMarginRateAdjust> = {}): Promise<unknown[]> {
477
+ return this.request((id) => this.native._req(52, this.encode(STRUCT_ID.QryExchangeMarginRateAdjust, req as Record<string, unknown>), id), false);
478
+ }
479
+ reqQryExchangeRate(req: Partial<S.QryExchangeRate> = {}): Promise<unknown[]> {
480
+ return this.request((id) => this.native._req(53, this.encode(STRUCT_ID.QryExchangeRate, req as Record<string, unknown>), id), false);
481
+ }
482
+ reqQrySecAgentAcidMap(req: Partial<S.QrySecAgentACIDMap> = {}): Promise<unknown[]> {
483
+ return this.request((id) => this.native._req(54, this.encode(STRUCT_ID.QrySecAgentACIDMap, req as Record<string, unknown>), id), false);
484
+ }
485
+ reqQryProductExchRate(req: Partial<S.QryProductExchRate> = {}): Promise<unknown[]> {
486
+ return this.request((id) => this.native._req(55, this.encode(STRUCT_ID.QryProductExchRate, req as Record<string, unknown>), id), false);
487
+ }
488
+ reqQryProductGroup(req: Partial<S.QryProductGroup> = {}): Promise<unknown[]> {
489
+ return this.request((id) => this.native._req(56, this.encode(STRUCT_ID.QryProductGroup, req as Record<string, unknown>), id), false);
490
+ }
491
+ reqQryMmInstrumentCommissionRate(req: Partial<S.QryMMInstrumentCommissionRate> = {}): Promise<unknown[]> {
492
+ return this.request((id) => this.native._req(57, this.encode(STRUCT_ID.QryMMInstrumentCommissionRate, req as Record<string, unknown>), id), false);
493
+ }
494
+ reqQryMmOptionInstrCommRate(req: Partial<S.QryMMOptionInstrCommRate> = {}): Promise<unknown[]> {
495
+ return this.request((id) => this.native._req(58, this.encode(STRUCT_ID.QryMMOptionInstrCommRate, req as Record<string, unknown>), id), false);
496
+ }
497
+ reqQryInstrumentOrderCommRate(req: Partial<S.QryInstrumentOrderCommRate> = {}): Promise<unknown[]> {
498
+ return this.request((id) => this.native._req(59, this.encode(STRUCT_ID.QryInstrumentOrderCommRate, req as Record<string, unknown>), id), false);
499
+ }
500
+ reqQrySecAgentTradingAccount(req: Partial<S.QryTradingAccount> = {}): Promise<unknown[]> {
501
+ return this.request((id) => this.native._req(60, this.encode(STRUCT_ID.QryTradingAccount, req as Record<string, unknown>), id), false);
502
+ }
503
+ reqQrySecAgentCheckMode(req: Partial<S.QrySecAgentCheckMode> = {}): Promise<unknown[]> {
504
+ return this.request((id) => this.native._req(61, this.encode(STRUCT_ID.QrySecAgentCheckMode, req as Record<string, unknown>), id), false);
505
+ }
506
+ reqQrySecAgentTradeInfo(req: Partial<S.QrySecAgentTradeInfo> = {}): Promise<unknown[]> {
507
+ return this.request((id) => this.native._req(62, this.encode(STRUCT_ID.QrySecAgentTradeInfo, req as Record<string, unknown>), id), false);
508
+ }
509
+ reqQryOptionInstrTradeCost(req: Partial<S.QryOptionInstrTradeCost> = {}): Promise<unknown[]> {
510
+ return this.request((id) => this.native._req(63, this.encode(STRUCT_ID.QryOptionInstrTradeCost, req as Record<string, unknown>), id), false);
511
+ }
512
+ reqQryOptionInstrCommRate(req: Partial<S.QryOptionInstrCommRate> = {}): Promise<unknown[]> {
513
+ return this.request((id) => this.native._req(64, this.encode(STRUCT_ID.QryOptionInstrCommRate, req as Record<string, unknown>), id), false);
514
+ }
515
+ reqQryExecOrder(req: Partial<S.QryExecOrder> = {}): Promise<unknown[]> {
516
+ return this.request((id) => this.native._req(65, this.encode(STRUCT_ID.QryExecOrder, req as Record<string, unknown>), id), false);
517
+ }
518
+ reqQryForQuote(req: Partial<S.QryForQuote> = {}): Promise<unknown[]> {
519
+ return this.request((id) => this.native._req(66, this.encode(STRUCT_ID.QryForQuote, req as Record<string, unknown>), id), false);
520
+ }
521
+ reqQryQuote(req: Partial<S.QryQuote> = {}): Promise<unknown[]> {
522
+ return this.request((id) => this.native._req(67, this.encode(STRUCT_ID.QryQuote, req as Record<string, unknown>), id), false);
523
+ }
524
+ reqQryOptionSelfClose(req: Partial<S.QryOptionSelfClose> = {}): Promise<unknown[]> {
525
+ return this.request((id) => this.native._req(68, this.encode(STRUCT_ID.QryOptionSelfClose, req as Record<string, unknown>), id), false);
526
+ }
527
+ reqQryInvestUnit(req: Partial<S.QryInvestUnit> = {}): Promise<unknown[]> {
528
+ return this.request((id) => this.native._req(69, this.encode(STRUCT_ID.QryInvestUnit, req as Record<string, unknown>), id), false);
529
+ }
530
+ reqQryCombInstrumentGuard(req: Partial<S.QryCombInstrumentGuard> = {}): Promise<unknown[]> {
531
+ return this.request((id) => this.native._req(70, this.encode(STRUCT_ID.QryCombInstrumentGuard, req as Record<string, unknown>), id), false);
532
+ }
533
+ reqQryCombAction(req: Partial<S.QryCombAction> = {}): Promise<unknown[]> {
534
+ return this.request((id) => this.native._req(71, this.encode(STRUCT_ID.QryCombAction, req as Record<string, unknown>), id), false);
535
+ }
536
+ reqQryTransferSerial(req: Partial<S.QryTransferSerial> = {}): Promise<unknown[]> {
537
+ return this.request((id) => this.native._req(72, this.encode(STRUCT_ID.QryTransferSerial, req as Record<string, unknown>), id), false);
538
+ }
539
+ reqQryAccountregister(req: Partial<S.QryAccountregister> = {}): Promise<unknown[]> {
540
+ return this.request((id) => this.native._req(73, this.encode(STRUCT_ID.QryAccountregister, req as Record<string, unknown>), id), false);
541
+ }
542
+ reqQryContractBank(req: Partial<S.QryContractBank> = {}): Promise<unknown[]> {
543
+ return this.request((id) => this.native._req(74, this.encode(STRUCT_ID.QryContractBank, req as Record<string, unknown>), id), false);
544
+ }
545
+ reqQryParkedOrder(req: Partial<S.QryParkedOrder> = {}): Promise<unknown[]> {
546
+ return this.request((id) => this.native._req(75, this.encode(STRUCT_ID.QryParkedOrder, req as Record<string, unknown>), id), false);
547
+ }
548
+ reqQryParkedOrderAction(req: Partial<S.QryParkedOrderAction> = {}): Promise<unknown[]> {
549
+ return this.request((id) => this.native._req(76, this.encode(STRUCT_ID.QryParkedOrderAction, req as Record<string, unknown>), id), false);
550
+ }
551
+ reqQryTradingNotice(req: Partial<S.QryTradingNotice> = {}): Promise<unknown[]> {
552
+ return this.request((id) => this.native._req(77, this.encode(STRUCT_ID.QryTradingNotice, req as Record<string, unknown>), id), false);
553
+ }
554
+ reqQryBrokerTradingParams(req: Partial<S.QryBrokerTradingParams> = {}): Promise<unknown[]> {
555
+ return this.request((id) => this.native._req(78, this.encode(STRUCT_ID.QryBrokerTradingParams, req as Record<string, unknown>), id), false);
556
+ }
557
+ reqQryBrokerTradingAlgos(req: Partial<S.QryBrokerTradingAlgos> = {}): Promise<unknown[]> {
558
+ return this.request((id) => this.native._req(79, this.encode(STRUCT_ID.QryBrokerTradingAlgos, req as Record<string, unknown>), id), false);
559
+ }
560
+ reqQueryCfmmcTradingAccountToken(req: Partial<S.QueryCFMMCTradingAccountToken> = {}): Promise<unknown> {
561
+ return this.request((id) => this.native._req(80, this.encode(STRUCT_ID.QueryCFMMCTradingAccountToken, req as Record<string, unknown>), id), true);
562
+ }
563
+ reqFromBankToFutureByFuture(req: Partial<S.ReqTransfer> = {}): Promise<unknown> {
564
+ return this.request((id) => this.native._req(81, this.encode(STRUCT_ID.ReqTransfer, req as Record<string, unknown>), id), true);
565
+ }
566
+ reqFromFutureToBankByFuture(req: Partial<S.ReqTransfer> = {}): Promise<unknown> {
567
+ return this.request((id) => this.native._req(82, this.encode(STRUCT_ID.ReqTransfer, req as Record<string, unknown>), id), true);
568
+ }
569
+ reqQueryBankAccountMoneyByFuture(req: Partial<S.ReqQueryAccount> = {}): Promise<unknown> {
570
+ return this.request((id) => this.native._req(83, this.encode(STRUCT_ID.ReqQueryAccount, req as Record<string, unknown>), id), true);
571
+ }
572
+ reqQryClassifiedInstrument(req: Partial<S.QryClassifiedInstrument> = {}): Promise<unknown[]> {
573
+ return this.request((id) => this.native._req(84, this.encode(STRUCT_ID.QryClassifiedInstrument, req as Record<string, unknown>), id), false);
574
+ }
575
+ reqQryCombPromotionParam(req: Partial<S.QryCombPromotionParam> = {}): Promise<unknown[]> {
576
+ return this.request((id) => this.native._req(85, this.encode(STRUCT_ID.QryCombPromotionParam, req as Record<string, unknown>), id), false);
577
+ }
578
+ reqQryRiskSettleInvstPosition(req: Partial<S.QryRiskSettleInvstPosition> = {}): Promise<unknown[]> {
579
+ return this.request((id) => this.native._req(86, this.encode(STRUCT_ID.QryRiskSettleInvstPosition, req as Record<string, unknown>), id), false);
580
+ }
581
+ reqQryRiskSettleProductStatus(req: Partial<S.QryRiskSettleProductStatus> = {}): Promise<unknown[]> {
582
+ return this.request((id) => this.native._req(87, this.encode(STRUCT_ID.QryRiskSettleProductStatus, req as Record<string, unknown>), id), false);
583
+ }
584
+ reqQrySpbmFutureParameter(req: Partial<S.QrySPBMFutureParameter> = {}): Promise<unknown[]> {
585
+ return this.request((id) => this.native._req(88, this.encode(STRUCT_ID.QrySPBMFutureParameter, req as Record<string, unknown>), id), false);
586
+ }
587
+ reqQrySpbmOptionParameter(req: Partial<S.QrySPBMOptionParameter> = {}): Promise<unknown[]> {
588
+ return this.request((id) => this.native._req(89, this.encode(STRUCT_ID.QrySPBMOptionParameter, req as Record<string, unknown>), id), false);
589
+ }
590
+ reqQrySpbmIntraParameter(req: Partial<S.QrySPBMIntraParameter> = {}): Promise<unknown[]> {
591
+ return this.request((id) => this.native._req(90, this.encode(STRUCT_ID.QrySPBMIntraParameter, req as Record<string, unknown>), id), false);
592
+ }
593
+ reqQrySpbmInterParameter(req: Partial<S.QrySPBMInterParameter> = {}): Promise<unknown[]> {
594
+ return this.request((id) => this.native._req(91, this.encode(STRUCT_ID.QrySPBMInterParameter, req as Record<string, unknown>), id), false);
595
+ }
596
+ reqQrySpbmPortfDefinition(req: Partial<S.QrySPBMPortfDefinition> = {}): Promise<unknown[]> {
597
+ return this.request((id) => this.native._req(92, this.encode(STRUCT_ID.QrySPBMPortfDefinition, req as Record<string, unknown>), id), false);
598
+ }
599
+ reqQrySpbmInvestorPortfDef(req: Partial<S.QrySPBMInvestorPortfDef> = {}): Promise<unknown[]> {
600
+ return this.request((id) => this.native._req(93, this.encode(STRUCT_ID.QrySPBMInvestorPortfDef, req as Record<string, unknown>), id), false);
601
+ }
602
+ reqQryInvestorPortfMarginRatio(req: Partial<S.QryInvestorPortfMarginRatio> = {}): Promise<unknown[]> {
603
+ return this.request((id) => this.native._req(94, this.encode(STRUCT_ID.QryInvestorPortfMarginRatio, req as Record<string, unknown>), id), false);
604
+ }
605
+ reqQryInvestorProdSpbmDetail(req: Partial<S.QryInvestorProdSPBMDetail> = {}): Promise<unknown[]> {
606
+ return this.request((id) => this.native._req(95, this.encode(STRUCT_ID.QryInvestorProdSPBMDetail, req as Record<string, unknown>), id), false);
607
+ }
608
+ reqQryInvestorCommoditySpmmMargin(req: Partial<S.QryInvestorCommoditySPMMMargin> = {}): Promise<unknown[]> {
609
+ return this.request((id) => this.native._req(96, this.encode(STRUCT_ID.QryInvestorCommoditySPMMMargin, req as Record<string, unknown>), id), false);
610
+ }
611
+ reqQryInvestorCommodityGroupSpmmMargin(req: Partial<S.QryInvestorCommodityGroupSPMMMargin> = {}): Promise<unknown[]> {
612
+ return this.request((id) => this.native._req(97, this.encode(STRUCT_ID.QryInvestorCommodityGroupSPMMMargin, req as Record<string, unknown>), id), false);
613
+ }
614
+ reqQrySpmmInstParam(req: Partial<S.QrySPMMInstParam> = {}): Promise<unknown[]> {
615
+ return this.request((id) => this.native._req(98, this.encode(STRUCT_ID.QrySPMMInstParam, req as Record<string, unknown>), id), false);
616
+ }
617
+ reqQrySpmmProductParam(req: Partial<S.QrySPMMProductParam> = {}): Promise<unknown[]> {
618
+ return this.request((id) => this.native._req(99, this.encode(STRUCT_ID.QrySPMMProductParam, req as Record<string, unknown>), id), false);
619
+ }
620
+ reqQrySpbmAddOnInterParameter(req: Partial<S.QrySPBMAddOnInterParameter> = {}): Promise<unknown[]> {
621
+ return this.request((id) => this.native._req(100, this.encode(STRUCT_ID.QrySPBMAddOnInterParameter, req as Record<string, unknown>), id), false);
622
+ }
623
+ reqQryRcamsCombProductInfo(req: Partial<S.QryRCAMSCombProductInfo> = {}): Promise<unknown[]> {
624
+ return this.request((id) => this.native._req(101, this.encode(STRUCT_ID.QryRCAMSCombProductInfo, req as Record<string, unknown>), id), false);
625
+ }
626
+ reqQryRcamsInstrParameter(req: Partial<S.QryRCAMSInstrParameter> = {}): Promise<unknown[]> {
627
+ return this.request((id) => this.native._req(102, this.encode(STRUCT_ID.QryRCAMSInstrParameter, req as Record<string, unknown>), id), false);
628
+ }
629
+ reqQryRcamsIntraParameter(req: Partial<S.QryRCAMSIntraParameter> = {}): Promise<unknown[]> {
630
+ return this.request((id) => this.native._req(103, this.encode(STRUCT_ID.QryRCAMSIntraParameter, req as Record<string, unknown>), id), false);
631
+ }
632
+ reqQryRcamsInterParameter(req: Partial<S.QryRCAMSInterParameter> = {}): Promise<unknown[]> {
633
+ return this.request((id) => this.native._req(104, this.encode(STRUCT_ID.QryRCAMSInterParameter, req as Record<string, unknown>), id), false);
634
+ }
635
+ reqQryRcamsShortOptAdjustParam(req: Partial<S.QryRCAMSShortOptAdjustParam> = {}): Promise<unknown[]> {
636
+ return this.request((id) => this.native._req(105, this.encode(STRUCT_ID.QryRCAMSShortOptAdjustParam, req as Record<string, unknown>), id), false);
637
+ }
638
+ reqQryRcamsInvestorCombPosition(req: Partial<S.QryRCAMSInvestorCombPosition> = {}): Promise<unknown[]> {
639
+ return this.request((id) => this.native._req(106, this.encode(STRUCT_ID.QryRCAMSInvestorCombPosition, req as Record<string, unknown>), id), false);
640
+ }
641
+ reqQryInvestorProdRcamsMargin(req: Partial<S.QryInvestorProdRCAMSMargin> = {}): Promise<unknown[]> {
642
+ return this.request((id) => this.native._req(107, this.encode(STRUCT_ID.QryInvestorProdRCAMSMargin, req as Record<string, unknown>), id), false);
643
+ }
644
+ reqQryRuleInstrParameter(req: Partial<S.QryRULEInstrParameter> = {}): Promise<unknown[]> {
645
+ return this.request((id) => this.native._req(108, this.encode(STRUCT_ID.QryRULEInstrParameter, req as Record<string, unknown>), id), false);
646
+ }
647
+ reqQryRuleIntraParameter(req: Partial<S.QryRULEIntraParameter> = {}): Promise<unknown[]> {
648
+ return this.request((id) => this.native._req(109, this.encode(STRUCT_ID.QryRULEIntraParameter, req as Record<string, unknown>), id), false);
649
+ }
650
+ reqQryRuleInterParameter(req: Partial<S.QryRULEInterParameter> = {}): Promise<unknown[]> {
651
+ return this.request((id) => this.native._req(110, this.encode(STRUCT_ID.QryRULEInterParameter, req as Record<string, unknown>), id), false);
652
+ }
653
+ reqQryInvestorProdRuleMargin(req: Partial<S.QryInvestorProdRULEMargin> = {}): Promise<unknown[]> {
654
+ return this.request((id) => this.native._req(111, this.encode(STRUCT_ID.QryInvestorProdRULEMargin, req as Record<string, unknown>), id), false);
655
+ }
656
+ }