-
Notifications
You must be signed in to change notification settings - Fork 3
/
traderapi_wrap.cxx
2255 lines (1914 loc) · 103 KB
/
traderapi_wrap.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <iostream>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <sys/types.h>
#include "ThostFtdcMdApi.h"
#include "ThostFtdcTraderApi.h"
#include "ThostFtdcUserApiDataType.h"
#include "ThostFtdcUserApiStruct.h"
#include "traderapi_wrap.h"
typedef long long intgo;
#ifdef __cplusplus
extern "C" {
#endif
QCTPTraderSpi* _wrap_CThostFtdcTraderApi_CreateFtdcTraderApi()
{
CThostFtdcTraderApi* pUserApi = CThostFtdcTraderApi::CreateFtdcTraderApi("./data/");
QCTPTraderSpi* pUserSpi = new QCTPTraderSpi(pUserApi);
pUserSpi->RegisterSpi(pUserSpi);
return pUserSpi;
}
QCTPTraderSpi* _wrap_CThostFtdcTraderApi_CreateFtdcTraderApi2(uintptr_t gUserApi, const char* pszFlowPath)
{
// printf("go_user_api %lu\n", gUserApi);
CThostFtdcTraderApi* pUserApi = CThostFtdcTraderApi::CreateFtdcTraderApi(pszFlowPath);
QCTPTraderSpi* pUserSpi = new QCTPTraderSpi(pUserApi, gUserApi);
pUserSpi->RegisterSpi(pUserSpi);
return pUserSpi;
}
uintptr_t _wrap_CThostFtdcTraderApi_DestroyUserTraderApi(QCTPTraderSpi* pTraderApi)
{
delete (pTraderApi);
return 0;
}
// 创建TraderApi
///@param pszFlowPath 存贮订阅信息文件的目录,默认为当前目录
///@return 创建出的UserApi
// CThostFtdcTraderApi * _wrap_CThostFtdcTraderApi_CreateFtdcTraderApi(QCTPTraderSpi* pTraderApi, const char * pszFlowPath)
// {
// return pTraderApi->CreateFtdcTraderApi(pszFlowPath);
// }
// 获取API的版本信息
///@retrun 获取到的版本号
const char* _wrap_CThostFtdcTraderApi_GetApiVersion(QCTPTraderSpi* pTraderApi)
{
return pTraderApi->GetApiVersion();
}
// 删除接口对象本身
///@remark 不再使用本接口对象时,调用该函数删除接口对象
void _wrap_CThostFtdcTraderApi_Release(QCTPTraderSpi* pTraderApi)
{
pTraderApi->RegisterSpi(NULL);
return pTraderApi->Release();
}
// 初始化
///@remark 初始化运行环境,只有调用后,接口才开始工作
void _wrap_CThostFtdcTraderApi_Init(QCTPTraderSpi* pTraderApi)
{
return pTraderApi->Init();
}
// 等待接口线程结束运行
///@return 线程退出代码
int _wrap_CThostFtdcTraderApi_Join(QCTPTraderSpi* pTraderApi)
{
return pTraderApi->Join();
}
// 获取当前交易日
///@retrun 获取到的交易日
///@remark 只有登录成功后,才能得到正确的交易日
const char* _wrap_CThostFtdcTraderApi_GetTradingDay(QCTPTraderSpi* pTraderApi)
{
return pTraderApi->GetTradingDay();
}
// 注册前置机网络地址
///@param pszFrontAddress:前置机网络地址。
///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:17001”。
///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。
void _wrap_CThostFtdcTraderApi_RegisterFront(QCTPTraderSpi* pTraderApi, char* pszFrontAddress)
{
return pTraderApi->RegisterFront(pszFrontAddress);
}
// 注册名字服务器网络地址
///@param pszNsAddress:名字服务器网络地址。
///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:12001”。
///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。
///@remark RegisterNameServer优先于RegisterFront
void _wrap_CThostFtdcTraderApi_RegisterNameServer(QCTPTraderSpi* pTraderApi, char* pszNsAddress)
{
return pTraderApi->RegisterNameServer(pszNsAddress);
}
// 注册名字服务器用户信息
///@param pFensUserInfo:用户信息。
void _wrap_CThostFtdcTraderApi_RegisterFensUserInfo(QCTPTraderSpi* pTraderApi, CThostFtdcFensUserInfoField* pFensUserInfo)
{
return pTraderApi->RegisterFensUserInfo(pFensUserInfo);
}
// 注册回调接口
///@param pSpi 派生自回调接口类的实例
void _wrap_CThostFtdcTraderApi_RegisterSpi(QCTPTraderSpi* pTraderApi, CThostFtdcTraderSpi* pSpi)
{
// return pTraderApi->RegisterSpi(pSpi);
}
// 订阅私有流。
///@param nResumeType 私有流重传方式
/// THOST_TERT_RESTART:从本交易日开始重传
/// THOST_TERT_RESUME:从上次收到的续传
/// THOST_TERT_QUICK:只传送登录后私有流的内容
///@remark 该方法要在Init方法前调用。若不调用则不会收到私有流的数据。
void _wrap_CThostFtdcTraderApi_SubscribePrivateTopic(QCTPTraderSpi* pTraderApi, enum THOST_TE_RESUME_TYPE nResumeType)
{
return pTraderApi->SubscribePrivateTopic(nResumeType);
}
// 订阅公共流。
///@param nResumeType 公共流重传方式
/// THOST_TERT_RESTART:从本交易日开始重传
/// THOST_TERT_RESUME:从上次收到的续传
/// THOST_TERT_QUICK:只传送登录后公共流的内容
/// THOST_TERT_NONE:取消订阅公共流
///@remark 该方法要在Init方法前调用。若不调用则不会收到公共流的数据。
void _wrap_CThostFtdcTraderApi_SubscribePublicTopic(QCTPTraderSpi* pTraderApi, enum THOST_TE_RESUME_TYPE nResumeType)
{
return pTraderApi->SubscribePublicTopic(nResumeType);
}
// 客户端认证请求
int _wrap_CThostFtdcTraderApi_ReqAuthenticate(QCTPTraderSpi* pTraderApi, CThostFtdcReqAuthenticateField* pReqAuthenticateField, int nRequestID)
{
return pTraderApi->ReqAuthenticate(pReqAuthenticateField, nRequestID);
}
// 注册用户终端信息,用于中继服务器多连接模式
/// 需要在终端认证成功后,用户登录前调用该接口
int _wrap_CThostFtdcTraderApi_RegisterUserSystemInfo(QCTPTraderSpi* pTraderApi, CThostFtdcUserSystemInfoField* pUserSystemInfo)
{
return pTraderApi->RegisterUserSystemInfo(pUserSystemInfo);
}
// 上报用户终端信息,用于中继服务器操作员登录模式
/// 操作员登录后,可以多次调用该接口上报客户信息
int _wrap_CThostFtdcTraderApi_SubmitUserSystemInfo(QCTPTraderSpi* pTraderApi, CThostFtdcUserSystemInfoField* pUserSystemInfo)
{
return pTraderApi->SubmitUserSystemInfo(pUserSystemInfo);
}
// 用户登录请求
int _wrap_CThostFtdcTraderApi_ReqUserLogin(QCTPTraderSpi* pTraderApi, CThostFtdcReqUserLoginField* pReqUserLoginField, int nRequestID)
{
return pTraderApi->ReqUserLogin(pReqUserLoginField, nRequestID);
}
// Mac 用户登录请求
int _wrap_CThostFtdcTraderApi_ReqUserLoginMac(QCTPTraderSpi* pTraderApi, CThostFtdcReqUserLoginField* pReqUserLoginField, int nRequestID, TThostFtdcSystemInfoLenType length,
TThostFtdcClientSystemInfoType systemInfo)
{
return pTraderApi->ReqUserLogin(pReqUserLoginField, nRequestID, length, systemInfo);
}
// 登出请求
int _wrap_CThostFtdcTraderApi_ReqUserLogout(QCTPTraderSpi* pTraderApi, CThostFtdcUserLogoutField* pUserLogout, int nRequestID)
{
return pTraderApi->ReqUserLogout(pUserLogout, nRequestID);
}
// 用户口令更新请求
int _wrap_CThostFtdcTraderApi_ReqUserPasswordUpdate(QCTPTraderSpi* pTraderApi, CThostFtdcUserPasswordUpdateField* pUserPasswordUpdate, int nRequestID)
{
return pTraderApi->ReqUserPasswordUpdate(pUserPasswordUpdate, nRequestID);
}
// 资金账户口令更新请求
int _wrap_CThostFtdcTraderApi_ReqTradingAccountPasswordUpdate(QCTPTraderSpi* pTraderApi, CThostFtdcTradingAccountPasswordUpdateField* pTradingAccountPasswordUpdate, int nRequestID)
{
return pTraderApi->ReqTradingAccountPasswordUpdate(pTradingAccountPasswordUpdate, nRequestID);
}
// 查询用户当前支持的认证模式
int _wrap_CThostFtdcTraderApi_ReqUserAuthMethod(QCTPTraderSpi* pTraderApi, CThostFtdcReqUserAuthMethodField* pReqUserAuthMethod, int nRequestID)
{
return pTraderApi->ReqUserAuthMethod(pReqUserAuthMethod, nRequestID);
}
// 用户发出获取图形验证码请求
int _wrap_CThostFtdcTraderApi_ReqGenUserCaptcha(QCTPTraderSpi* pTraderApi, CThostFtdcReqGenUserCaptchaField* pReqGenUserCaptcha, int nRequestID)
{
return pTraderApi->ReqGenUserCaptcha(pReqGenUserCaptcha, nRequestID);
}
// 用户发出获取短信验证码请求
int _wrap_CThostFtdcTraderApi_ReqGenUserText(QCTPTraderSpi* pTraderApi, CThostFtdcReqGenUserTextField* pReqGenUserText, int nRequestID)
{
return pTraderApi->ReqGenUserText(pReqGenUserText, nRequestID);
}
// 用户发出带有图片验证码的登陆请求
int _wrap_CThostFtdcTraderApi_ReqUserLoginWithCaptcha(QCTPTraderSpi* pTraderApi, CThostFtdcReqUserLoginWithCaptchaField* pReqUserLoginWithCaptcha, int nRequestID)
{
return pTraderApi->ReqUserLoginWithCaptcha(pReqUserLoginWithCaptcha, nRequestID);
}
// 用户发出带有短信验证码的登陆请求
int _wrap_CThostFtdcTraderApi_ReqUserLoginWithText(QCTPTraderSpi* pTraderApi, CThostFtdcReqUserLoginWithTextField* pReqUserLoginWithText, int nRequestID)
{
return pTraderApi->ReqUserLoginWithText(pReqUserLoginWithText, nRequestID);
}
// 用户发出带有动态口令的登陆请求
int _wrap_CThostFtdcTraderApi_ReqUserLoginWithOTP(QCTPTraderSpi* pTraderApi, CThostFtdcReqUserLoginWithOTPField* pReqUserLoginWithOTP, int nRequestID)
{
return pTraderApi->ReqUserLoginWithOTP(pReqUserLoginWithOTP, nRequestID);
}
// 报单录入请求
int _wrap_CThostFtdcTraderApi_ReqOrderInsert(QCTPTraderSpi* pTraderApi, CThostFtdcInputOrderField* pInputOrder, int nRequestID)
{
return pTraderApi->ReqOrderInsert(pInputOrder, nRequestID);
}
// 预埋单录入请求
int _wrap_CThostFtdcTraderApi_ReqParkedOrderInsert(QCTPTraderSpi* pTraderApi, CThostFtdcParkedOrderField* pParkedOrder, int nRequestID)
{
return pTraderApi->ReqParkedOrderInsert(pParkedOrder, nRequestID);
}
// 预埋撤单录入请求
int _wrap_CThostFtdcTraderApi_ReqParkedOrderAction(QCTPTraderSpi* pTraderApi, CThostFtdcParkedOrderActionField* pParkedOrderAction, int nRequestID)
{
return pTraderApi->ReqParkedOrderAction(pParkedOrderAction, nRequestID);
}
// 报单操作请求
int _wrap_CThostFtdcTraderApi_ReqOrderAction(QCTPTraderSpi* pTraderApi, CThostFtdcInputOrderActionField* pInputOrderAction, int nRequestID)
{
return pTraderApi->ReqOrderAction(pInputOrderAction, nRequestID);
}
// 查询最大报单数量请求
int _wrap_CThostFtdcTraderApi_ReqQryMaxOrderVolume(QCTPTraderSpi* pTraderApi, CThostFtdcQryMaxOrderVolumeField* pQryMaxOrderVolume, int nRequestID)
{
return pTraderApi->ReqQryMaxOrderVolume(pQryMaxOrderVolume, nRequestID);
}
// 投资者结算结果确认
int _wrap_CThostFtdcTraderApi_ReqSettlementInfoConfirm(QCTPTraderSpi* pTraderApi, CThostFtdcSettlementInfoConfirmField* pSettlementInfoConfirm, int nRequestID)
{
return pTraderApi->ReqSettlementInfoConfirm(pSettlementInfoConfirm, nRequestID);
}
// 请求删除预埋单
int _wrap_CThostFtdcTraderApi_ReqRemoveParkedOrder(QCTPTraderSpi* pTraderApi, CThostFtdcRemoveParkedOrderField* pRemoveParkedOrder, int nRequestID)
{
return pTraderApi->ReqRemoveParkedOrder(pRemoveParkedOrder, nRequestID);
}
// 请求删除预埋撤单
int _wrap_CThostFtdcTraderApi_ReqRemoveParkedOrderAction(QCTPTraderSpi* pTraderApi, CThostFtdcRemoveParkedOrderActionField* pRemoveParkedOrderAction, int nRequestID)
{
return pTraderApi->ReqRemoveParkedOrderAction(pRemoveParkedOrderAction, nRequestID);
}
// 执行宣告录入请求
int _wrap_CThostFtdcTraderApi_ReqExecOrderInsert(QCTPTraderSpi* pTraderApi, CThostFtdcInputExecOrderField* pInputExecOrder, int nRequestID)
{
return pTraderApi->ReqExecOrderInsert(pInputExecOrder, nRequestID);
}
// 执行宣告操作请求
int _wrap_CThostFtdcTraderApi_ReqExecOrderAction(QCTPTraderSpi* pTraderApi, CThostFtdcInputExecOrderActionField* pInputExecOrderAction, int nRequestID)
{
return pTraderApi->ReqExecOrderAction(pInputExecOrderAction, nRequestID);
}
// 询价录入请求
int _wrap_CThostFtdcTraderApi_ReqForQuoteInsert(QCTPTraderSpi* pTraderApi, CThostFtdcInputForQuoteField* pInputForQuote, int nRequestID)
{
return pTraderApi->ReqForQuoteInsert(pInputForQuote, nRequestID);
}
// 报价录入请求
int _wrap_CThostFtdcTraderApi_ReqQuoteInsert(QCTPTraderSpi* pTraderApi, CThostFtdcInputQuoteField* pInputQuote, int nRequestID)
{
return pTraderApi->ReqQuoteInsert(pInputQuote, nRequestID);
}
// 报价操作请求
int _wrap_CThostFtdcTraderApi_ReqQuoteAction(QCTPTraderSpi* pTraderApi, CThostFtdcInputQuoteActionField* pInputQuoteAction, int nRequestID)
{
return pTraderApi->ReqQuoteAction(pInputQuoteAction, nRequestID);
}
// 批量报单操作请求
int _wrap_CThostFtdcTraderApi_ReqBatchOrderAction(QCTPTraderSpi* pTraderApi, CThostFtdcInputBatchOrderActionField* pInputBatchOrderAction, int nRequestID)
{
return pTraderApi->ReqBatchOrderAction(pInputBatchOrderAction, nRequestID);
}
// 期权自对冲录入请求
int _wrap_CThostFtdcTraderApi_ReqOptionSelfCloseInsert(QCTPTraderSpi* pTraderApi, CThostFtdcInputOptionSelfCloseField* pInputOptionSelfClose, int nRequestID)
{
return pTraderApi->ReqOptionSelfCloseInsert(pInputOptionSelfClose, nRequestID);
}
// 期权自对冲操作请求
int _wrap_CThostFtdcTraderApi_ReqOptionSelfCloseAction(QCTPTraderSpi* pTraderApi, CThostFtdcInputOptionSelfCloseActionField* pInputOptionSelfCloseAction, int nRequestID)
{
return pTraderApi->ReqOptionSelfCloseAction(pInputOptionSelfCloseAction, nRequestID);
}
// 申请组合录入请求
int _wrap_CThostFtdcTraderApi_ReqCombActionInsert(QCTPTraderSpi* pTraderApi, CThostFtdcInputCombActionField* pInputCombAction, int nRequestID)
{
return pTraderApi->ReqCombActionInsert(pInputCombAction, nRequestID);
}
// 请求查询报单
int _wrap_CThostFtdcTraderApi_ReqQryOrder(QCTPTraderSpi* pTraderApi, CThostFtdcQryOrderField* pQryOrder, int nRequestID)
{
return pTraderApi->ReqQryOrder(pQryOrder, nRequestID);
}
// 请求查询成交
int _wrap_CThostFtdcTraderApi_ReqQryTrade(QCTPTraderSpi* pTraderApi, CThostFtdcQryTradeField* pQryTrade, int nRequestID)
{
return pTraderApi->ReqQryTrade(pQryTrade, nRequestID);
}
// 请求查询投资者持仓
int _wrap_CThostFtdcTraderApi_ReqQryInvestorPosition(QCTPTraderSpi* pTraderApi, CThostFtdcQryInvestorPositionField* pQryInvestorPosition, int nRequestID)
{
return pTraderApi->ReqQryInvestorPosition(pQryInvestorPosition, nRequestID);
}
// 请求查询资金账户
int _wrap_CThostFtdcTraderApi_ReqQryTradingAccount(QCTPTraderSpi* pTraderApi, CThostFtdcQryTradingAccountField* pQryTradingAccount, int nRequestID)
{
return pTraderApi->ReqQryTradingAccount(pQryTradingAccount, nRequestID);
}
// 请求查询投资者
int _wrap_CThostFtdcTraderApi_ReqQryInvestor(QCTPTraderSpi* pTraderApi, CThostFtdcQryInvestorField* pQryInvestor, int nRequestID)
{
return pTraderApi->ReqQryInvestor(pQryInvestor, nRequestID);
}
// 请求查询交易编码
int _wrap_CThostFtdcTraderApi_ReqQryTradingCode(QCTPTraderSpi* pTraderApi, CThostFtdcQryTradingCodeField* pQryTradingCode, int nRequestID)
{
return pTraderApi->ReqQryTradingCode(pQryTradingCode, nRequestID);
}
// 请求查询合约保证金率
int _wrap_CThostFtdcTraderApi_ReqQryInstrumentMarginRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryInstrumentMarginRateField* pQryInstrumentMarginRate, int nRequestID)
{
return pTraderApi->ReqQryInstrumentMarginRate(pQryInstrumentMarginRate, nRequestID);
}
// 请求查询合约手续费率
int _wrap_CThostFtdcTraderApi_ReqQryInstrumentCommissionRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryInstrumentCommissionRateField* pQryInstrumentCommissionRate, int nRequestID)
{
return pTraderApi->ReqQryInstrumentCommissionRate(pQryInstrumentCommissionRate, nRequestID);
}
// 请求查询交易所
int _wrap_CThostFtdcTraderApi_ReqQryExchange(QCTPTraderSpi* pTraderApi, CThostFtdcQryExchangeField* pQryExchange, int nRequestID)
{
return pTraderApi->ReqQryExchange(pQryExchange, nRequestID);
}
// 请求查询产品
int _wrap_CThostFtdcTraderApi_ReqQryProduct(QCTPTraderSpi* pTraderApi, CThostFtdcQryProductField* pQryProduct, int nRequestID)
{
return pTraderApi->ReqQryProduct(pQryProduct, nRequestID);
}
// 请求查询合约
int _wrap_CThostFtdcTraderApi_ReqQryInstrument(QCTPTraderSpi* pTraderApi, CThostFtdcQryInstrumentField* pQryInstrument, int nRequestID)
{
return pTraderApi->ReqQryInstrument(pQryInstrument, nRequestID);
}
// 请求查询行情
int _wrap_CThostFtdcTraderApi_ReqQryDepthMarketData(QCTPTraderSpi* pTraderApi, CThostFtdcQryDepthMarketDataField* pQryDepthMarketData, int nRequestID)
{
return pTraderApi->ReqQryDepthMarketData(pQryDepthMarketData, nRequestID);
}
// 请求查询投资者结算结果
int _wrap_CThostFtdcTraderApi_ReqQrySettlementInfo(QCTPTraderSpi* pTraderApi, CThostFtdcQrySettlementInfoField* pQrySettlementInfo, int nRequestID)
{
return pTraderApi->ReqQrySettlementInfo(pQrySettlementInfo, nRequestID);
}
// 请求查询转帐银行
int _wrap_CThostFtdcTraderApi_ReqQryTransferBank(QCTPTraderSpi* pTraderApi, CThostFtdcQryTransferBankField* pQryTransferBank, int nRequestID)
{
return pTraderApi->ReqQryTransferBank(pQryTransferBank, nRequestID);
}
// 请求查询投资者持仓明细
int _wrap_CThostFtdcTraderApi_ReqQryInvestorPositionDetail(QCTPTraderSpi* pTraderApi, CThostFtdcQryInvestorPositionDetailField* pQryInvestorPositionDetail, int nRequestID)
{
return pTraderApi->ReqQryInvestorPositionDetail(pQryInvestorPositionDetail, nRequestID);
}
// 请求查询客户通知
int _wrap_CThostFtdcTraderApi_ReqQryNotice(QCTPTraderSpi* pTraderApi, CThostFtdcQryNoticeField* pQryNotice, int nRequestID)
{
return pTraderApi->ReqQryNotice(pQryNotice, nRequestID);
}
// 请求查询结算信息确认
int _wrap_CThostFtdcTraderApi_ReqQrySettlementInfoConfirm(QCTPTraderSpi* pTraderApi, CThostFtdcQrySettlementInfoConfirmField* pQrySettlementInfoConfirm, int nRequestID)
{
return pTraderApi->ReqQrySettlementInfoConfirm(pQrySettlementInfoConfirm, nRequestID);
}
// 请求查询投资者持仓明细
int _wrap_CThostFtdcTraderApi_ReqQryInvestorPositionCombineDetail(QCTPTraderSpi* pTraderApi, CThostFtdcQryInvestorPositionCombineDetailField* pQryInvestorPositionCombineDetail, int nRequestID)
{
return pTraderApi->ReqQryInvestorPositionCombineDetail(pQryInvestorPositionCombineDetail, nRequestID);
}
// 请求查询保证金监管系统经纪公司资金账户密钥
int _wrap_CThostFtdcTraderApi_ReqQryCFMMCTradingAccountKey(QCTPTraderSpi* pTraderApi, CThostFtdcQryCFMMCTradingAccountKeyField* pQryCFMMCTradingAccountKey, int nRequestID)
{
return pTraderApi->ReqQryCFMMCTradingAccountKey(pQryCFMMCTradingAccountKey, nRequestID);
}
// 请求查询仓单折抵信息
int _wrap_CThostFtdcTraderApi_ReqQryEWarrantOffset(QCTPTraderSpi* pTraderApi, CThostFtdcQryEWarrantOffsetField* pQryEWarrantOffset, int nRequestID)
{
return pTraderApi->ReqQryEWarrantOffset(pQryEWarrantOffset, nRequestID);
}
// 请求查询投资者品种/跨品种保证金
int _wrap_CThostFtdcTraderApi_ReqQryInvestorProductGroupMargin(QCTPTraderSpi* pTraderApi, CThostFtdcQryInvestorProductGroupMarginField* pQryInvestorProductGroupMargin, int nRequestID)
{
return pTraderApi->ReqQryInvestorProductGroupMargin(pQryInvestorProductGroupMargin, nRequestID);
}
// 请求查询交易所保证金率
int _wrap_CThostFtdcTraderApi_ReqQryExchangeMarginRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryExchangeMarginRateField* pQryExchangeMarginRate, int nRequestID)
{
return pTraderApi->ReqQryExchangeMarginRate(pQryExchangeMarginRate, nRequestID);
}
// 请求查询交易所调整保证金率
int _wrap_CThostFtdcTraderApi_ReqQryExchangeMarginRateAdjust(QCTPTraderSpi* pTraderApi, CThostFtdcQryExchangeMarginRateAdjustField* pQryExchangeMarginRateAdjust, int nRequestID)
{
return pTraderApi->ReqQryExchangeMarginRateAdjust(pQryExchangeMarginRateAdjust, nRequestID);
}
// 请求查询汇率
int _wrap_CThostFtdcTraderApi_ReqQryExchangeRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryExchangeRateField* pQryExchangeRate, int nRequestID)
{
return pTraderApi->ReqQryExchangeRate(pQryExchangeRate, nRequestID);
}
// 请求查询二级代理操作员银期权限
int _wrap_CThostFtdcTraderApi_ReqQrySecAgentACIDMap(QCTPTraderSpi* pTraderApi, CThostFtdcQrySecAgentACIDMapField* pQrySecAgentACIDMap, int nRequestID)
{
return pTraderApi->ReqQrySecAgentACIDMap(pQrySecAgentACIDMap, nRequestID);
}
// 请求查询产品报价汇率
int _wrap_CThostFtdcTraderApi_ReqQryProductExchRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryProductExchRateField* pQryProductExchRate, int nRequestID)
{
return pTraderApi->ReqQryProductExchRate(pQryProductExchRate, nRequestID);
}
// 请求查询产品组
int _wrap_CThostFtdcTraderApi_ReqQryProductGroup(QCTPTraderSpi* pTraderApi, CThostFtdcQryProductGroupField* pQryProductGroup, int nRequestID)
{
return pTraderApi->ReqQryProductGroup(pQryProductGroup, nRequestID);
}
// 请求查询做市商合约手续费率
int _wrap_CThostFtdcTraderApi_ReqQryMMInstrumentCommissionRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryMMInstrumentCommissionRateField* pQryMMInstrumentCommissionRate, int nRequestID)
{
return pTraderApi->ReqQryMMInstrumentCommissionRate(pQryMMInstrumentCommissionRate, nRequestID);
}
// 请求查询做市商期权合约手续费
int _wrap_CThostFtdcTraderApi_ReqQryMMOptionInstrCommRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryMMOptionInstrCommRateField* pQryMMOptionInstrCommRate, int nRequestID)
{
return pTraderApi->ReqQryMMOptionInstrCommRate(pQryMMOptionInstrCommRate, nRequestID);
}
// 请求查询报单手续费
int _wrap_CThostFtdcTraderApi_ReqQryInstrumentOrderCommRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryInstrumentOrderCommRateField* pQryInstrumentOrderCommRate, int nRequestID)
{
return pTraderApi->ReqQryInstrumentOrderCommRate(pQryInstrumentOrderCommRate, nRequestID);
}
// 请求查询资金账户
int _wrap_CThostFtdcTraderApi_ReqQrySecAgentTradingAccount(QCTPTraderSpi* pTraderApi, CThostFtdcQryTradingAccountField* pQryTradingAccount, int nRequestID)
{
return pTraderApi->ReqQrySecAgentTradingAccount(pQryTradingAccount, nRequestID);
}
// 请求查询二级代理商资金校验模式
int _wrap_CThostFtdcTraderApi_ReqQrySecAgentCheckMode(QCTPTraderSpi* pTraderApi, CThostFtdcQrySecAgentCheckModeField* pQrySecAgentCheckMode, int nRequestID)
{
return pTraderApi->ReqQrySecAgentCheckMode(pQrySecAgentCheckMode, nRequestID);
}
// 请求查询二级代理商信息
int _wrap_CThostFtdcTraderApi_ReqQrySecAgentTradeInfo(QCTPTraderSpi* pTraderApi, CThostFtdcQrySecAgentTradeInfoField* pQrySecAgentTradeInfo, int nRequestID)
{
return pTraderApi->ReqQrySecAgentTradeInfo(pQrySecAgentTradeInfo, nRequestID);
}
// 请求查询期权交易成本
int _wrap_CThostFtdcTraderApi_ReqQryOptionInstrTradeCost(QCTPTraderSpi* pTraderApi, CThostFtdcQryOptionInstrTradeCostField* pQryOptionInstrTradeCost, int nRequestID)
{
return pTraderApi->ReqQryOptionInstrTradeCost(pQryOptionInstrTradeCost, nRequestID);
}
// 请求查询期权合约手续费
int _wrap_CThostFtdcTraderApi_ReqQryOptionInstrCommRate(QCTPTraderSpi* pTraderApi, CThostFtdcQryOptionInstrCommRateField* pQryOptionInstrCommRate, int nRequestID)
{
return pTraderApi->ReqQryOptionInstrCommRate(pQryOptionInstrCommRate, nRequestID);
}
// 请求查询执行宣告
int _wrap_CThostFtdcTraderApi_ReqQryExecOrder(QCTPTraderSpi* pTraderApi, CThostFtdcQryExecOrderField* pQryExecOrder, int nRequestID)
{
return pTraderApi->ReqQryExecOrder(pQryExecOrder, nRequestID);
}
// 请求查询询价
int _wrap_CThostFtdcTraderApi_ReqQryForQuote(QCTPTraderSpi* pTraderApi, CThostFtdcQryForQuoteField* pQryForQuote, int nRequestID)
{
return pTraderApi->ReqQryForQuote(pQryForQuote, nRequestID);
}
// 请求查询报价
int _wrap_CThostFtdcTraderApi_ReqQryQuote(QCTPTraderSpi* pTraderApi, CThostFtdcQryQuoteField* pQryQuote, int nRequestID)
{
return pTraderApi->ReqQryQuote(pQryQuote, nRequestID);
}
// 请求查询期权自对冲
int _wrap_CThostFtdcTraderApi_ReqQryOptionSelfClose(QCTPTraderSpi* pTraderApi, CThostFtdcQryOptionSelfCloseField* pQryOptionSelfClose, int nRequestID)
{
return pTraderApi->ReqQryOptionSelfClose(pQryOptionSelfClose, nRequestID);
}
// 请求查询投资单元
int _wrap_CThostFtdcTraderApi_ReqQryInvestUnit(QCTPTraderSpi* pTraderApi, CThostFtdcQryInvestUnitField* pQryInvestUnit, int nRequestID)
{
return pTraderApi->ReqQryInvestUnit(pQryInvestUnit, nRequestID);
}
// 请求查询组合合约安全系数
int _wrap_CThostFtdcTraderApi_ReqQryCombInstrumentGuard(QCTPTraderSpi* pTraderApi, CThostFtdcQryCombInstrumentGuardField* pQryCombInstrumentGuard, int nRequestID)
{
return pTraderApi->ReqQryCombInstrumentGuard(pQryCombInstrumentGuard, nRequestID);
}
// 请求查询申请组合
int _wrap_CThostFtdcTraderApi_ReqQryCombAction(QCTPTraderSpi* pTraderApi, CThostFtdcQryCombActionField* pQryCombAction, int nRequestID)
{
return pTraderApi->ReqQryCombAction(pQryCombAction, nRequestID);
}
// 请求查询转帐流水
int _wrap_CThostFtdcTraderApi_ReqQryTransferSerial(QCTPTraderSpi* pTraderApi, CThostFtdcQryTransferSerialField* pQryTransferSerial, int nRequestID)
{
return pTraderApi->ReqQryTransferSerial(pQryTransferSerial, nRequestID);
}
// 请求查询银期签约关系
int _wrap_CThostFtdcTraderApi_ReqQryAccountregister(QCTPTraderSpi* pTraderApi, CThostFtdcQryAccountregisterField* pQryAccountregister, int nRequestID)
{
return pTraderApi->ReqQryAccountregister(pQryAccountregister, nRequestID);
}
// 请求查询签约银行
int _wrap_CThostFtdcTraderApi_ReqQryContractBank(QCTPTraderSpi* pTraderApi, CThostFtdcQryContractBankField* pQryContractBank, int nRequestID)
{
return pTraderApi->ReqQryContractBank(pQryContractBank, nRequestID);
}
// 请求查询预埋单
int _wrap_CThostFtdcTraderApi_ReqQryParkedOrder(QCTPTraderSpi* pTraderApi, CThostFtdcQryParkedOrderField* pQryParkedOrder, int nRequestID)
{
return pTraderApi->ReqQryParkedOrder(pQryParkedOrder, nRequestID);
}
// 请求查询预埋撤单
int _wrap_CThostFtdcTraderApi_ReqQryParkedOrderAction(QCTPTraderSpi* pTraderApi, CThostFtdcQryParkedOrderActionField* pQryParkedOrderAction, int nRequestID)
{
return pTraderApi->ReqQryParkedOrderAction(pQryParkedOrderAction, nRequestID);
}
// 请求查询交易通知
int _wrap_CThostFtdcTraderApi_ReqQryTradingNotice(QCTPTraderSpi* pTraderApi, CThostFtdcQryTradingNoticeField* pQryTradingNotice, int nRequestID)
{
return pTraderApi->ReqQryTradingNotice(pQryTradingNotice, nRequestID);
}
// 请求查询经纪公司交易参数
int _wrap_CThostFtdcTraderApi_ReqQryBrokerTradingParams(QCTPTraderSpi* pTraderApi, CThostFtdcQryBrokerTradingParamsField* pQryBrokerTradingParams, int nRequestID)
{
return pTraderApi->ReqQryBrokerTradingParams(pQryBrokerTradingParams, nRequestID);
}
// 请求查询经纪公司交易算法
int _wrap_CThostFtdcTraderApi_ReqQryBrokerTradingAlgos(QCTPTraderSpi* pTraderApi, CThostFtdcQryBrokerTradingAlgosField* pQryBrokerTradingAlgos, int nRequestID)
{
return pTraderApi->ReqQryBrokerTradingAlgos(pQryBrokerTradingAlgos, nRequestID);
}
// 请求查询监控中心用户令牌
int _wrap_CThostFtdcTraderApi_ReqQueryCFMMCTradingAccountToken(QCTPTraderSpi* pTraderApi, CThostFtdcQueryCFMMCTradingAccountTokenField* pQueryCFMMCTradingAccountToken, int nRequestID)
{
return pTraderApi->ReqQueryCFMMCTradingAccountToken(pQueryCFMMCTradingAccountToken, nRequestID);
}
// 期货发起银行资金转期货请求
int _wrap_CThostFtdcTraderApi_ReqFromBankToFutureByFuture(QCTPTraderSpi* pTraderApi, CThostFtdcReqTransferField* pReqTransfer, int nRequestID)
{
return pTraderApi->ReqFromBankToFutureByFuture(pReqTransfer, nRequestID);
}
// 期货发起期货资金转银行请求
int _wrap_CThostFtdcTraderApi_ReqFromFutureToBankByFuture(QCTPTraderSpi* pTraderApi, CThostFtdcReqTransferField* pReqTransfer, int nRequestID)
{
return pTraderApi->ReqFromFutureToBankByFuture(pReqTransfer, nRequestID);
}
// 期货发起查询银行余额请求
int _wrap_CThostFtdcTraderApi_ReqQueryBankAccountMoneyByFuture(QCTPTraderSpi* pTraderApi, CThostFtdcReqQueryAccountField* pReqQueryAccount, int nRequestID)
{
return pTraderApi->ReqQueryBankAccountMoneyByFuture(pReqQueryAccount, nRequestID);
}
// 请求查询分类合约
int _wrap_CThostFtdcTraderApi_ReqQryClassifiedInstrument(QCTPTraderSpi* pTraderApi, CThostFtdcQryClassifiedInstrumentField* pQryClassifiedInstrument, int nRequestID)
{
return pTraderApi->ReqQryClassifiedInstrument(pQryClassifiedInstrument, nRequestID);
}
// 请求组合优惠比例
int _wrap_CThostFtdcTraderApi_ReqQryCombPromotionParam(QCTPTraderSpi* pTraderApi, CThostFtdcQryCombPromotionParamField* pQryCombPromotionParam, int nRequestID)
{
return pTraderApi->ReqQryCombPromotionParam(pQryCombPromotionParam, nRequestID);
}
// 投资者风险结算持仓查询
int _wrap_CThostFtdcTraderApi_ReqQryRiskSettleInvstPosition(QCTPTraderSpi* pTraderApi, CThostFtdcQryRiskSettleInvstPositionField* pQryRiskSettleInvstPosition, int nRequestID)
{
return pTraderApi->ReqQryRiskSettleInvstPosition(pQryRiskSettleInvstPosition, nRequestID);
}
// 风险结算产品查询
int _wrap_CThostFtdcTraderApi_ReqQryRiskSettleProductStatus(QCTPTraderSpi* pTraderApi, CThostFtdcQryRiskSettleProductStatusField* pQryRiskSettleProductStatus, int nRequestID)
{
return pTraderApi->ReqQryRiskSettleProductStatus(pQryRiskSettleProductStatus, nRequestID);
}
#ifdef __cplusplus
}
#endif
// 当客户端与交易后台建立起通信连接时(还未登录前),该方法被调用。
extern "C" void wrapTraderOnFrontConnected(uintptr_t);
void QCTPTraderSpi::OnFrontConnected()
{
wrapTraderOnFrontConnected(gUserApi);
}
// 当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。
///@param nReason 错误原因
/// 0x1001 网络读失败
/// 0x1002 网络写失败
/// 0x2001 接收心跳超时
/// 0x2002 发送心跳失败
/// 0x2003 收到错误报文
extern "C" void wrapTraderOnFrontDisconnected(uintptr_t, int);
void QCTPTraderSpi::OnFrontDisconnected(int nReason)
{
wrapTraderOnFrontDisconnected(gUserApi, nReason);
}
// 心跳超时警告。当长时间未收到报文时,该方法被调用。
///@param nTimeLapse 距离上次接收报文的时间
extern "C" void wrapTraderOnHeartBeatWarning(uintptr_t, int);
void QCTPTraderSpi::OnHeartBeatWarning(int nTimeLapse)
{
wrapTraderOnHeartBeatWarning(gUserApi, nTimeLapse);
}
// 客户端认证响应
extern "C" void wrapTraderOnRspAuthenticate(uintptr_t, CThostFtdcRspAuthenticateField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspAuthenticate(CThostFtdcRspAuthenticateField* pRspAuthenticateField, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspAuthenticate(gUserApi, pRspAuthenticateField, pRspInfo, nRequestID, bIsLast);
}
// 登录请求响应
extern "C" void wrapTraderOnRspUserLogin(uintptr_t, CThostFtdcRspUserLoginField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspUserLogin(CThostFtdcRspUserLoginField* pRspUserLogin, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspUserLogin(gUserApi, pRspUserLogin, pRspInfo, nRequestID, bIsLast);
}
// 登出请求响应
extern "C" void wrapTraderOnRspUserLogout(uintptr_t, CThostFtdcUserLogoutField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspUserLogout(CThostFtdcUserLogoutField* pUserLogout, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspUserLogout(gUserApi, pUserLogout, pRspInfo, nRequestID, bIsLast);
}
// 用户口令更新请求响应
extern "C" void wrapTraderOnRspUserPasswordUpdate(uintptr_t, CThostFtdcUserPasswordUpdateField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField* pUserPasswordUpdate, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspUserPasswordUpdate(gUserApi, pUserPasswordUpdate, pRspInfo, nRequestID, bIsLast);
}
// 资金账户口令更新请求响应
extern "C" void wrapTraderOnRspTradingAccountPasswordUpdate(uintptr_t, CThostFtdcTradingAccountPasswordUpdateField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField* pTradingAccountPasswordUpdate, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspTradingAccountPasswordUpdate(gUserApi, pTradingAccountPasswordUpdate, pRspInfo, nRequestID, bIsLast);
}
// 查询用户当前支持的认证模式的回复
extern "C" void wrapTraderOnRspUserAuthMethod(uintptr_t, CThostFtdcRspUserAuthMethodField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspUserAuthMethod(CThostFtdcRspUserAuthMethodField* pRspUserAuthMethod, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspUserAuthMethod(gUserApi, pRspUserAuthMethod, pRspInfo, nRequestID, bIsLast);
}
// 获取图形验证码请求的回复
extern "C" void wrapTraderOnRspGenUserCaptcha(uintptr_t, CThostFtdcRspGenUserCaptchaField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspGenUserCaptcha(CThostFtdcRspGenUserCaptchaField* pRspGenUserCaptcha, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspGenUserCaptcha(gUserApi, pRspGenUserCaptcha, pRspInfo, nRequestID, bIsLast);
}
// 获取短信验证码请求的回复
extern "C" void wrapTraderOnRspGenUserText(uintptr_t, CThostFtdcRspGenUserTextField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspGenUserText(CThostFtdcRspGenUserTextField* pRspGenUserText, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspGenUserText(gUserApi, pRspGenUserText, pRspInfo, nRequestID, bIsLast);
}
// 报单录入请求响应
extern "C" void wrapTraderOnRspOrderInsert(uintptr_t, CThostFtdcInputOrderField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspOrderInsert(CThostFtdcInputOrderField* pInputOrder, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspOrderInsert(gUserApi, pInputOrder, pRspInfo, nRequestID, bIsLast);
}
// 预埋单录入请求响应
extern "C" void wrapTraderOnRspParkedOrderInsert(uintptr_t, CThostFtdcParkedOrderField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspParkedOrderInsert(CThostFtdcParkedOrderField* pParkedOrder, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspParkedOrderInsert(gUserApi, pParkedOrder, pRspInfo, nRequestID, bIsLast);
}
// 预埋撤单录入请求响应
extern "C" void wrapTraderOnRspParkedOrderAction(uintptr_t, CThostFtdcParkedOrderActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspParkedOrderAction(CThostFtdcParkedOrderActionField* pParkedOrderAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspParkedOrderAction(gUserApi, pParkedOrderAction, pRspInfo, nRequestID, bIsLast);
}
// 报单操作请求响应
extern "C" void wrapTraderOnRspOrderAction(uintptr_t, CThostFtdcInputOrderActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspOrderAction(CThostFtdcInputOrderActionField* pInputOrderAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspOrderAction(gUserApi, pInputOrderAction, pRspInfo, nRequestID, bIsLast);
}
// 查询最大报单数量响应
extern "C" void wrapTraderOnRspQryMaxOrderVolume(uintptr_t, CThostFtdcQryMaxOrderVolumeField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField* pQryMaxOrderVolume, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryMaxOrderVolume(gUserApi, pQryMaxOrderVolume, pRspInfo, nRequestID, bIsLast);
}
// 投资者结算结果确认响应
extern "C" void wrapTraderOnRspSettlementInfoConfirm(uintptr_t, CThostFtdcSettlementInfoConfirmField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField* pSettlementInfoConfirm, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspSettlementInfoConfirm(gUserApi, pSettlementInfoConfirm, pRspInfo, nRequestID, bIsLast);
}
// 删除预埋单响应
extern "C" void wrapTraderOnRspRemoveParkedOrder(uintptr_t, CThostFtdcRemoveParkedOrderField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField* pRemoveParkedOrder, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspRemoveParkedOrder(gUserApi, pRemoveParkedOrder, pRspInfo, nRequestID, bIsLast);
}
// 删除预埋撤单响应
extern "C" void wrapTraderOnRspRemoveParkedOrderAction(uintptr_t, CThostFtdcRemoveParkedOrderActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField* pRemoveParkedOrderAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspRemoveParkedOrderAction(gUserApi, pRemoveParkedOrderAction, pRspInfo, nRequestID, bIsLast);
}
// 执行宣告录入请求响应
extern "C" void wrapTraderOnRspExecOrderInsert(uintptr_t, CThostFtdcInputExecOrderField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspExecOrderInsert(CThostFtdcInputExecOrderField* pInputExecOrder, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspExecOrderInsert(gUserApi, pInputExecOrder, pRspInfo, nRequestID, bIsLast);
}
// 执行宣告操作请求响应
extern "C" void wrapTraderOnRspExecOrderAction(uintptr_t, CThostFtdcInputExecOrderActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspExecOrderAction(CThostFtdcInputExecOrderActionField* pInputExecOrderAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspExecOrderAction(gUserApi, pInputExecOrderAction, pRspInfo, nRequestID, bIsLast);
}
// 询价录入请求响应
extern "C" void wrapTraderOnRspForQuoteInsert(uintptr_t, CThostFtdcInputForQuoteField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspForQuoteInsert(CThostFtdcInputForQuoteField* pInputForQuote, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspForQuoteInsert(gUserApi, pInputForQuote, pRspInfo, nRequestID, bIsLast);
}
// 报价录入请求响应
extern "C" void wrapTraderOnRspQuoteInsert(uintptr_t, CThostFtdcInputQuoteField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQuoteInsert(CThostFtdcInputQuoteField* pInputQuote, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQuoteInsert(gUserApi, pInputQuote, pRspInfo, nRequestID, bIsLast);
}
// 报价操作请求响应
extern "C" void wrapTraderOnRspQuoteAction(uintptr_t, CThostFtdcInputQuoteActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQuoteAction(CThostFtdcInputQuoteActionField* pInputQuoteAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQuoteAction(gUserApi, pInputQuoteAction, pRspInfo, nRequestID, bIsLast);
}
// 批量报单操作请求响应
extern "C" void wrapTraderOnRspBatchOrderAction(uintptr_t, CThostFtdcInputBatchOrderActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField* pInputBatchOrderAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspBatchOrderAction(gUserApi, pInputBatchOrderAction, pRspInfo, nRequestID, bIsLast);
}
// 期权自对冲录入请求响应
extern "C" void wrapTraderOnRspOptionSelfCloseInsert(uintptr_t, CThostFtdcInputOptionSelfCloseField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField* pInputOptionSelfClose, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspOptionSelfCloseInsert(gUserApi, pInputOptionSelfClose, pRspInfo, nRequestID, bIsLast);
}
// 期权自对冲操作请求响应
extern "C" void wrapTraderOnRspOptionSelfCloseAction(uintptr_t, CThostFtdcInputOptionSelfCloseActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField* pInputOptionSelfCloseAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspOptionSelfCloseAction(gUserApi, pInputOptionSelfCloseAction, pRspInfo, nRequestID, bIsLast);
}
// 申请组合录入请求响应
extern "C" void wrapTraderOnRspCombActionInsert(uintptr_t, CThostFtdcInputCombActionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspCombActionInsert(CThostFtdcInputCombActionField* pInputCombAction, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspCombActionInsert(gUserApi, pInputCombAction, pRspInfo, nRequestID, bIsLast);
}
// 请求查询报单响应
extern "C" void wrapTraderOnRspQryOrder(uintptr_t, CThostFtdcOrderField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryOrder(CThostFtdcOrderField* pOrder, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryOrder(gUserApi, pOrder, pRspInfo, nRequestID, bIsLast);
}
// 请求查询成交响应
extern "C" void wrapTraderOnRspQryTrade(uintptr_t, CThostFtdcTradeField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryTrade(CThostFtdcTradeField* pTrade, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryTrade(gUserApi, pTrade, pRspInfo, nRequestID, bIsLast);
}
// 请求查询投资者持仓响应
extern "C" void wrapTraderOnRspQryInvestorPosition(uintptr_t, CThostFtdcInvestorPositionField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryInvestorPosition(CThostFtdcInvestorPositionField* pInvestorPosition, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryInvestorPosition(gUserApi, pInvestorPosition, pRspInfo, nRequestID, bIsLast);
}
// 请求查询资金账户响应
extern "C" void wrapTraderOnRspQryTradingAccount(uintptr_t, CThostFtdcTradingAccountField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryTradingAccount(CThostFtdcTradingAccountField* pTradingAccount, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryTradingAccount(gUserApi, pTradingAccount, pRspInfo, nRequestID, bIsLast);
}
// 请求查询投资者响应
extern "C" void wrapTraderOnRspQryInvestor(uintptr_t, CThostFtdcInvestorField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryInvestor(CThostFtdcInvestorField* pInvestor, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryInvestor(gUserApi, pInvestor, pRspInfo, nRequestID, bIsLast);
}
// 请求查询交易编码响应
extern "C" void wrapTraderOnRspQryTradingCode(uintptr_t, CThostFtdcTradingCodeField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryTradingCode(CThostFtdcTradingCodeField* pTradingCode, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryTradingCode(gUserApi, pTradingCode, pRspInfo, nRequestID, bIsLast);
}
// 请求查询合约保证金率响应
extern "C" void wrapTraderOnRspQryInstrumentMarginRate(uintptr_t, CThostFtdcInstrumentMarginRateField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField* pInstrumentMarginRate, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryInstrumentMarginRate(gUserApi, pInstrumentMarginRate, pRspInfo, nRequestID, bIsLast);
}
// 请求查询合约手续费率响应
extern "C" void wrapTraderOnRspQryInstrumentCommissionRate(uintptr_t, CThostFtdcInstrumentCommissionRateField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField* pInstrumentCommissionRate, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryInstrumentCommissionRate(gUserApi, pInstrumentCommissionRate, pRspInfo, nRequestID, bIsLast);
}
// 请求查询交易所响应
extern "C" void wrapTraderOnRspQryExchange(uintptr_t, CThostFtdcExchangeField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryExchange(CThostFtdcExchangeField* pExchange, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryExchange(gUserApi, pExchange, pRspInfo, nRequestID, bIsLast);
}
// 请求查询产品响应
extern "C" void wrapTraderOnRspQryProduct(uintptr_t, CThostFtdcProductField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryProduct(CThostFtdcProductField* pProduct, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryProduct(gUserApi, pProduct, pRspInfo, nRequestID, bIsLast);
}
// 请求查询合约响应
extern "C" void wrapTraderOnRspQryInstrument(uintptr_t, CThostFtdcInstrumentField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryInstrument(CThostFtdcInstrumentField* pInstrument, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryInstrument(gUserApi, pInstrument, pRspInfo, nRequestID, bIsLast);
}
// 请求查询行情响应
extern "C" void wrapTraderOnRspQryDepthMarketData(uintptr_t, CThostFtdcDepthMarketDataField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField* pDepthMarketData, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryDepthMarketData(gUserApi, pDepthMarketData, pRspInfo, nRequestID, bIsLast);
}
// 请求查询投资者结算结果响应
extern "C" void wrapTraderOnRspQrySettlementInfo(uintptr_t, CThostFtdcSettlementInfoField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQrySettlementInfo(CThostFtdcSettlementInfoField* pSettlementInfo, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQrySettlementInfo(gUserApi, pSettlementInfo, pRspInfo, nRequestID, bIsLast);
}
// 请求查询转帐银行响应
extern "C" void wrapTraderOnRspQryTransferBank(uintptr_t, CThostFtdcTransferBankField*, CThostFtdcRspInfoField*, int, bool);
void QCTPTraderSpi::OnRspQryTransferBank(CThostFtdcTransferBankField* pTransferBank, CThostFtdcRspInfoField* pRspInfo, int nRequestID, bool bIsLast)
{
wrapTraderOnRspQryTransferBank(gUserApi, pTransferBank, pRspInfo, nRequestID, bIsLast);
}
// 请求查询投资者持仓明细响应