-
Notifications
You must be signed in to change notification settings - Fork 236
Expand file tree
/
Copy pathSecurityFtdcUserApiDataType.h
More file actions
2102 lines (1778 loc) · 78.4 KB
/
Copy pathSecurityFtdcUserApiDataType.h
File metadata and controls
2102 lines (1778 loc) · 78.4 KB
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
/////////////////////////////////////////////////////////////////////////
///@company shanghai liber information Technology Co.,Ltd
///@file SecurityFtdcUserApiDataType.h
///@brief 定义业务数据类型
/////////////////////////////////////////////////////////////////////////
#ifndef SECURITY_FTDCDATATYPE_H
#define SECURITY_FTDCDATATYPE_H
enum SECURITY_TE_RESUME_TYPE
{
SECURITY_TERT_RESTART = 0,
SECURITY_TERT_RESUME,
SECURITY_TERT_QUICK
};
/////////////////////////////////////////////////////////////////////////
///TFtdcErrorIDType是一个错误代码类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcErrorIDType;
/////////////////////////////////////////////////////////////////////////
///TFtdcErrorMsgType是一个错误信息类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcErrorMsgType[81];
/////////////////////////////////////////////////////////////////////////
///TFtdcExchangeIDType是一个交易所代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcExchangeIDType[9];
/////////////////////////////////////////////////////////////////////////
///TFtdcExchangeNameType是一个交易所名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcExchangeNameType[31];
/////////////////////////////////////////////////////////////////////////
///TFtdcExchangePropertyType是一个交易所属性类型
/////////////////////////////////////////////////////////////////////////
///正常
#define SECURITY_FTDC_EXP_Normal '0'
///根据成交生成报单
#define SECURITY_FTDC_EXP_GenOrderByTrade '1'
typedef char TSecurityFtdcExchangePropertyType;
/////////////////////////////////////////////////////////////////////////
///TFtdcExchangeConnectStatusType是一个交易所连接状态类型
/////////////////////////////////////////////////////////////////////////
///没有任何连接
#define SECURITY_FTDC_ECS_NoConnection '1'
///已经发出合约查询请求
#define SECURITY_FTDC_ECS_QryInstrumentSent '2'
///已经获取信息
#define SECURITY_FTDC_ECS_GotInformation '9'
typedef char TSecurityFtdcExchangeConnectStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcDateType是一个日期类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcDateType[9];
/////////////////////////////////////////////////////////////////////////
///TFtdcTimeType是一个时间类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcTimeType[9];
/////////////////////////////////////////////////////////////////////////
///TFtdcInstrumentIDType是一个合约代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcInstrumentIDType[31];
/////////////////////////////////////////////////////////////////////////
///TFtdcProductNameType是一个产品名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcProductNameType[21];
/////////////////////////////////////////////////////////////////////////
///TFtdcProductClassType是一个产品类型类型
/////////////////////////////////////////////////////////////////////////
///期货
#define SECURITY_FTDC_PC_Futures '1'
///期权
#define SECURITY_FTDC_PC_Options '2'
///组合
#define SECURITY_FTDC_PC_Combination '3'
///即期
#define SECURITY_FTDC_PC_Spot '4'
///期转现
#define SECURITY_FTDC_PC_EFP '5'
///证券A股
#define SECURITY_FTDC_PC_StockA '6'
///证券B股
#define SECURITY_FTDC_PC_StockB '7'
///ETF
#define SECURITY_FTDC_PC_ETF '8'
///ETF申赎
#define SECURITY_FTDC_PC_ETFPurRed '9'
typedef char TSecurityFtdcProductClassType;
/////////////////////////////////////////////////////////////////////////
///TFtdcVolumeMultipleType是一个合约数量乘数类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcVolumeMultipleType;
/////////////////////////////////////////////////////////////////////////
///TFtdcPriceType是一个价格类型
/////////////////////////////////////////////////////////////////////////
typedef double TSecurityFtdcPriceType;
/////////////////////////////////////////////////////////////////////////
///TFtdcVolumeType是一个数量类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcVolumeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcPositionTypeType是一个持仓类型类型
/////////////////////////////////////////////////////////////////////////
///净持仓
#define SECURITY_FTDC_PT_Net '1'
///综合持仓
#define SECURITY_FTDC_PT_Gross '2'
typedef char TSecurityFtdcPositionTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcPositionDateTypeType是一个持仓日期类型类型
/////////////////////////////////////////////////////////////////////////
///使用历史持仓
#define SECURITY_FTDC_PDT_UseHistory '1'
///不使用历史持仓
#define SECURITY_FTDC_PDT_NoUseHistory '2'
typedef char TSecurityFtdcPositionDateTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcExchangeInstIDType是一个合约在交易所的代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcExchangeInstIDType[31];
/////////////////////////////////////////////////////////////////////////
///TFtdcYearType是一个年份类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcYearType;
/////////////////////////////////////////////////////////////////////////
///TFtdcMonthType是一个月份类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcMonthType;
/////////////////////////////////////////////////////////////////////////
///TFtdcInstLifePhaseType是一个合约生命周期状态类型
/////////////////////////////////////////////////////////////////////////
///未上市
#define SECURITY_FTDC_IP_NotStart '0'
///上市
#define SECURITY_FTDC_IP_Started '1'
///停牌
#define SECURITY_FTDC_IP_Pause '2'
///到期
#define SECURITY_FTDC_IP_Expired '3'
typedef char TSecurityFtdcInstLifePhaseType;
/////////////////////////////////////////////////////////////////////////
///TFtdcBoolType是一个布尔型类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcBoolType;
/////////////////////////////////////////////////////////////////////////
///TFtdcRightModelIDType是一个股票权限模版代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcRightModelIDType[31];
/////////////////////////////////////////////////////////////////////////
///TFtdcRightModelNameType是一个股票权限模版名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcRightModelNameType[161];
/////////////////////////////////////////////////////////////////////////
///TFtdcPosTradeTypeType是一个持仓交易类型类型
/////////////////////////////////////////////////////////////////////////
///今日新增持仓能卖出
#define SECURITY_FTDC_PTT_CanSelTodayPos '1'
///今日新增持仓不能卖出
#define SECURITY_FTDC_PTT_CannotSellTodayPos '2'
typedef char TSecurityFtdcPosTradeTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcTraderIDType是一个交易所交易员代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcTraderIDType[21];
/////////////////////////////////////////////////////////////////////////
///TFtdcParticipantIDType是一个会员代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcParticipantIDType[11];
/////////////////////////////////////////////////////////////////////////
///TFtdcPasswordType是一个密码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcPasswordType[41];
/////////////////////////////////////////////////////////////////////////
///TFtdcBrokerIDType是一个经纪公司代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcBrokerIDType[11];
/////////////////////////////////////////////////////////////////////////
///TFtdcOrderLocalIDType是一个本地报单编号类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcOrderLocalIDType[13];
/////////////////////////////////////////////////////////////////////////
///TFtdcBrokerAbbrType是一个经纪公司简称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcBrokerAbbrType[9];
/////////////////////////////////////////////////////////////////////////
///TFtdcBrokerNameType是一个经纪公司名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcBrokerNameType[81];
/////////////////////////////////////////////////////////////////////////
///TFtdcInvestorIDType是一个投资者代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcInvestorIDType[15];
/////////////////////////////////////////////////////////////////////////
///TFtdcPartyNameType是一个参与人名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcPartyNameType[81];
/////////////////////////////////////////////////////////////////////////
///TFtdcIdCardTypeType是一个证件类型类型
/////////////////////////////////////////////////////////////////////////
///组织机构代码
#define SECURITY_FTDC_ICT_EID '0'
///身份证
#define SECURITY_FTDC_ICT_IDCard '1'
///军官证
#define SECURITY_FTDC_ICT_OfficerIDCard '2'
///警官证
#define SECURITY_FTDC_ICT_PoliceIDCard '3'
///士兵证
#define SECURITY_FTDC_ICT_SoldierIDCard '4'
///户口簿
#define SECURITY_FTDC_ICT_HouseholdRegister '5'
///护照
#define SECURITY_FTDC_ICT_Passport '6'
///台胞证
#define SECURITY_FTDC_ICT_TaiwanCompatriotIDCard '7'
///回乡证
#define SECURITY_FTDC_ICT_HomeComingCard '8'
///营业执照号
#define SECURITY_FTDC_ICT_LicenseNo '9'
///税务登记号
#define SECURITY_FTDC_ICT_TaxNo 'A'
///其他证件
#define SECURITY_FTDC_ICT_OtherCard 'x'
typedef char TSecurityFtdcIdCardTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcIdentifiedCardNoType是一个证件号码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcIdentifiedCardNoType[51];
/////////////////////////////////////////////////////////////////////////
///TFtdcClientIDType是一个交易编码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcClientIDType[21];
/////////////////////////////////////////////////////////////////////////
///TFtdcAccountIDType是一个投资者帐号类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcAccountIDType[15];
/////////////////////////////////////////////////////////////////////////
///TFtdcClientTypeType是一个交易编码类型类型
/////////////////////////////////////////////////////////////////////////
///普通
#define SECURITY_FTDC_CLT_Normal '1'
///信用交易
#define SECURITY_FTDC_CLT_Credit '2'
///衍生品账户
#define SECURITY_FTDC_CLT_Derive '3'
///其他类型
#define SECURITY_FTDC_CLT_Other '4'
typedef char TSecurityFtdcClientTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcInvestorGroupNameType是一个投资者分组名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcInvestorGroupNameType[41];
/////////////////////////////////////////////////////////////////////////
///TFtdcUserIDType是一个用户代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcUserIDType[16];
/////////////////////////////////////////////////////////////////////////
///TFtdcUserNameType是一个用户名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcUserNameType[81];
/////////////////////////////////////////////////////////////////////////
///TFtdcFunctionCodeType是一个功能代码类型
/////////////////////////////////////////////////////////////////////////
///强制用户登出
#define SECURITY_FTDC_FC_ForceUserLogout '2'
///变更管理用户口令
#define SECURITY_FTDC_FC_UserPasswordUpdate '3'
///变更经纪公司口令
#define SECURITY_FTDC_FC_BrokerPasswordUpdate '4'
///变更投资者口令
#define SECURITY_FTDC_FC_InvestorPasswordUpdate '5'
///报单插入
#define SECURITY_FTDC_FC_OrderInsert '6'
///报单操作
#define SECURITY_FTDC_FC_OrderAction '7'
///同步系统数据
#define SECURITY_FTDC_FC_SyncSystemData '8'
///同步经纪公司数据
#define SECURITY_FTDC_FC_SyncBrokerData '9'
///超级查询
#define SECURITY_FTDC_FC_SuperQuery 'B'
///报单插入
#define SECURITY_FTDC_FC_ParkedOrderInsert 'C'
///报单操作
#define SECURITY_FTDC_FC_ParkedOrderAction 'D'
///同步动态令牌
#define SECURITY_FTDC_FC_SyncOTP 'E'
///未知单操作
#define SECURITY_FTDC_FC_UnkownOrderAction 'F'
///转托管
#define SECURITY_FTDC_FC_DepositoryTransfer 'G'
///余券划转
#define SECURITY_FTDC_FC_ExcessStockTransfer 'H'
typedef char TSecurityFtdcFunctionCodeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcUserTypeType是一个用户类型类型
/////////////////////////////////////////////////////////////////////////
///投资者
#define SECURITY_FTDC_UT_Investor '0'
///操作员
#define SECURITY_FTDC_UT_Operator '1'
///管理员
#define SECURITY_FTDC_UT_SuperUser '2'
typedef char TSecurityFtdcUserTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcBrokerFunctionCodeType是一个经纪公司功能代码类型
/////////////////////////////////////////////////////////////////////////
///强制用户登出
#define SECURITY_FTDC_BFC_ForceUserLogout '1'
///变更用户口令
#define SECURITY_FTDC_BFC_UserPasswordUpdate '2'
///同步经纪公司数据
#define SECURITY_FTDC_BFC_SyncBrokerData '3'
///报单插入
#define SECURITY_FTDC_BFC_OrderInsert '5'
///报单操作
#define SECURITY_FTDC_BFC_OrderAction '6'
///全部查询
#define SECURITY_FTDC_BFC_AllQuery '7'
///未知单操作
#define SECURITY_FTDC_BFC_UnkownOrderAction '8'
///转托管
#define SECURITY_FTDC_BFC_DepositoryTransfer '9'
///余券划转
#define SECURITY_FTDC_BFC_ExcessStockTransfer 'A'
///资金内转
#define SECURITY_FTDC_BFC_FundInterTransfer 'B'
///系统功能:登入/登出/修改密码等
#define SECURITY_FTDC_BFC_log 'a'
///基本查询:查询基础数据,如合约,交易所等常量
#define SECURITY_FTDC_BFC_BaseQry 'b'
///交易查询:如查成交,委托
#define SECURITY_FTDC_BFC_TradeQry 'c'
///交易功能:报单,撤单
#define SECURITY_FTDC_BFC_Trade 'd'
///转账
#define SECURITY_FTDC_BFC_Virement 'e'
///查询/管理:查询会话,踢人等
#define SECURITY_FTDC_BFC_Session 'g'
///同步动态令牌
#define SECURITY_FTDC_BFC_SyncOTP 'E'
typedef char TSecurityFtdcBrokerFunctionCodeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcCurrencyCodeType是一个币种类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcCurrencyCodeType[4];
/////////////////////////////////////////////////////////////////////////
///TFtdcMoneyType是一个资金类型
/////////////////////////////////////////////////////////////////////////
typedef double TSecurityFtdcMoneyType;
/////////////////////////////////////////////////////////////////////////
///TFtdcRatioType是一个比率类型
/////////////////////////////////////////////////////////////////////////
typedef double TSecurityFtdcRatioType;
/////////////////////////////////////////////////////////////////////////
///TFtdcAccountTypeType是一个账户类型类型
/////////////////////////////////////////////////////////////////////////
///普通账户
#define SECURITY_FTDC_AcT_Normal '1'
///信用账户
#define SECURITY_FTDC_AcT_Credit '2'
///衍生品账户
#define SECURITY_FTDC_AcT_Derive '3'
///其他类型
#define SECURITY_FTDC_AcT_Other '4'
typedef char TSecurityFtdcAccountTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcDepartmentRangeType是一个投资者范围类型
/////////////////////////////////////////////////////////////////////////
///所有
#define SECURITY_FTDC_DR_All '1'
///组织架构
#define SECURITY_FTDC_DR_Group '2'
///单一投资者
#define SECURITY_FTDC_DR_Single '3'
typedef char TSecurityFtdcDepartmentRangeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcUserRightTypeType是一个客户权限类型类型
/////////////////////////////////////////////////////////////////////////
///登录
#define SECURITY_FTDC_URT_Logon '1'
///银期转帐
#define SECURITY_FTDC_URT_Transfer '2'
///邮寄结算单
#define SECURITY_FTDC_URT_EMail '3'
///传真结算单
#define SECURITY_FTDC_URT_Fax '4'
///条件单
#define SECURITY_FTDC_URT_ConditionOrder '5'
typedef char TSecurityFtdcUserRightTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcProductInfoType是一个产品信息类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcProductInfoType[11];
/////////////////////////////////////////////////////////////////////////
///TFtdcAuthCodeType是一个客户端认证码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcAuthCodeType[17];
/////////////////////////////////////////////////////////////////////////
///TFtdcLargeVolumeType是一个大额数量类型
/////////////////////////////////////////////////////////////////////////
typedef double TSecurityFtdcLargeVolumeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcMillisecType是一个时间(毫秒)类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcMillisecType;
/////////////////////////////////////////////////////////////////////////
///TFtdcHedgeFlagType是一个投机套保标志类型
/////////////////////////////////////////////////////////////////////////
///投机
#define SECURITY_FTDC_HF_Speculation '1'
///套保
#define SECURITY_FTDC_HF_Hedge '3'
typedef char TSecurityFtdcHedgeFlagType;
/////////////////////////////////////////////////////////////////////////
///TFtdcDirectionType是一个买卖方向类型
/////////////////////////////////////////////////////////////////////////
///买
#define SECURITY_FTDC_D_Buy '0'
///卖
#define SECURITY_FTDC_D_Sell '1'
///ETF申购
#define SECURITY_FTDC_D_ETFPur '2'
///ETF赎回
#define SECURITY_FTDC_D_ETFRed '3'
///现金替代,只用作回报
#define SECURITY_FTDC_D_CashIn '4'
///债券入库
#define SECURITY_FTDC_D_PledgeBondIn '5'
///债券出库
#define SECURITY_FTDC_D_PledgeBondOut '6'
///配股
#define SECURITY_FTDC_D_Rationed '7'
///转托管
#define SECURITY_FTDC_D_DepositoryTransfer '8'
///信用账户配股
#define SECURITY_FTDC_D_CreditRationed '9'
///担保品买入
#define SECURITY_FTDC_D_BuyCollateral 'A'
///担保品卖出
#define SECURITY_FTDC_D_SellCollateral 'B'
///担保品转入
#define SECURITY_FTDC_D_CollateralTransferIn 'C'
///担保品转出
#define SECURITY_FTDC_D_CollateralTransferOut 'D'
///融资买入
#define SECURITY_FTDC_D_MarginTrade 'E'
///融券卖出
#define SECURITY_FTDC_D_ShortSell 'F'
///卖券还款
#define SECURITY_FTDC_D_RepayMargin 'G'
///买券还券
#define SECURITY_FTDC_D_RepayStock 'H'
///直接还款
#define SECURITY_FTDC_D_DirectRepayMargin 'I'
///直接还券
#define SECURITY_FTDC_D_DirectRepayStock 'J'
///余券划转
#define SECURITY_FTDC_D_ExcessStockTransfer 'K'
///OF申购
#define SECURITY_FTDC_D_OFPur 'L'
///OF赎回
#define SECURITY_FTDC_D_OFRed 'M'
///SF拆分
#define SECURITY_FTDC_D_SFSplit 'N'
///SF合并
#define SECURITY_FTDC_D_SFMerge 'O'
///备兑
#define SECURITY_FTDC_D_Covered 'P'
///证券冻结(开)/解冻(平)
#define SECURITY_FTDC_D_Freeze 'Q'
///行权
#define SECURITY_FTDC_D_Execute 'R'
///CB回售
#define SECURITY_FTDC_D_CBRed 'S'
///CB转股
#define SECURITY_FTDC_D_CBConv 'T'
typedef char TSecurityFtdcDirectionType;
/////////////////////////////////////////////////////////////////////////
///TFtdcTradeIDType是一个成交编号类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcTradeIDType[21];
/////////////////////////////////////////////////////////////////////////
///TFtdcTradeTypeType是一个成交类型类型
/////////////////////////////////////////////////////////////////////////
///普通成交
#define SECURITY_FTDC_TRDT_Common '0'
///期权执行
#define SECURITY_FTDC_TRDT_OptionsExecution '1'
///OTC成交
#define SECURITY_FTDC_TRDT_OTC '2'
///期转现衍生成交
#define SECURITY_FTDC_TRDT_EFPDerived '3'
///组合衍生成交
#define SECURITY_FTDC_TRDT_CombinationDerived '4'
///ETF申购
#define SECURITY_FTDC_TRDT_EFTPurchase '5'
///ETF赎回
#define SECURITY_FTDC_TRDT_EFTRedem '6'
typedef char TSecurityFtdcTradeTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcCreationredemptionStatusType是一个基金当天申购赎回状态类型
/////////////////////////////////////////////////////////////////////////
///不允许申购赎回
#define SECURITY_FTDC_CDS_Forbidden '0'
///表示允许申购和赎回
#define SECURITY_FTDC_CDS_Allow '1'
///允许申购、不允许赎回
#define SECURITY_FTDC_CDS_OnlyPurchase '2'
///不允许申购、允许赎回
#define SECURITY_FTDC_CDS_OnlyRedeem '3'
typedef char TSecurityFtdcCreationredemptionStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcETFCurrenceReplaceStatusType是一个ETF现金替代标志类型
/////////////////////////////////////////////////////////////////////////
///禁止现金替代
#define SECURITY_FTDC_ETFCRS_Forbidden '0'
///可以现金替代
#define SECURITY_FTDC_ETFCRS_Allow '1'
///必须现金替代
#define SECURITY_FTDC_ETFCRS_Force '2'
///跨市场股票退补现金替代
#define SECURITY_FTDC_ETFCRS_CrossMarketComp '3'
///跨市场必须现金替代
#define SECURITY_FTDC_ETFCRS_CrossMarketFroce '4'
typedef char TSecurityFtdcETFCurrenceReplaceStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcInterestType是一个利息类型
/////////////////////////////////////////////////////////////////////////
typedef double TSecurityFtdcInterestType;
/////////////////////////////////////////////////////////////////////////
///TFtdcRepurchaseMaxTimesType是一个正回购放大倍数类型
/////////////////////////////////////////////////////////////////////////
typedef double TSecurityFtdcRepurchaseMaxTimesType;
/////////////////////////////////////////////////////////////////////////
///TFtdcCapitalStockTypeType是一个股本类型类型
/////////////////////////////////////////////////////////////////////////
///总通股本
#define SECURITY_FTDC_CPTSTOCK_TOTALSTOCK '1'
///流通股本
#define SECURITY_FTDC_CPTSTOCK_CIRCULATION '2'
typedef char TSecurityFtdcCapitalStockTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcMarginPriceTypeType是一个保证金价格类型类型
/////////////////////////////////////////////////////////////////////////
///昨结算价
#define SECURITY_FTDC_MPT_PreSettlementPrice '1'
///最新价
#define SECURITY_FTDC_MPT_SettlementPrice '2'
///成交均价
#define SECURITY_FTDC_MPT_AveragePrice '3'
///开仓价
#define SECURITY_FTDC_MPT_OpenPrice '4'
typedef char TSecurityFtdcMarginPriceTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcAlgorithmType是一个盈亏算法类型
/////////////////////////////////////////////////////////////////////////
///浮盈浮亏都计算
#define SECURITY_FTDC_AG_All '1'
///浮盈不计,浮亏计
#define SECURITY_FTDC_AG_OnlyLost '2'
///浮盈计,浮亏不计
#define SECURITY_FTDC_AG_OnlyGain '3'
///浮盈浮亏都不计算
#define SECURITY_FTDC_AG_None '4'
typedef char TSecurityFtdcAlgorithmType;
/////////////////////////////////////////////////////////////////////////
///TFtdcIncludeCloseProfitType是一个是否包含平仓盈利类型
/////////////////////////////////////////////////////////////////////////
///包含平仓盈利
#define SECURITY_FTDC_ICP_Include '0'
///不包含平仓盈利
#define SECURITY_FTDC_ICP_NotInclude '2'
typedef char TSecurityFtdcIncludeCloseProfitType;
/////////////////////////////////////////////////////////////////////////
///TFtdcAllWithoutTradeType是一个是否受可提比例限制类型
/////////////////////////////////////////////////////////////////////////
///不受可提比例限制
#define SECURITY_FTDC_AWT_Enable '0'
///受可提比例限制
#define SECURITY_FTDC_AWT_Disable '2'
///无仓不受可提比例限制
#define SECURITY_FTDC_AWT_NoHoldEnable '3'
typedef char TSecurityFtdcAllWithoutTradeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcHandlePositionAlgoIDType是一个持仓处理算法编号类型
/////////////////////////////////////////////////////////////////////////
///基本
#define SECURITY_FTDC_HPA_Base '1'
///非交易
#define SECURITY_FTDC_HPA_NoneTrade '4'
///证券
#define SECURITY_FTDC_HPA_Stock '5'
typedef char TSecurityFtdcHandlePositionAlgoIDType;
/////////////////////////////////////////////////////////////////////////
///TFtdcTradeParamIDType是一个交易系统参数代码类型
/////////////////////////////////////////////////////////////////////////
///系统加密算法
#define SECURITY_FTDC_TPID_EncryptionStandard 'E'
///用户最大会话数
#define SECURITY_FTDC_TPID_SingleUserSessionMaxNum 'S'
///最大连续登录失败数
#define SECURITY_FTDC_TPID_LoginFailMaxNum 'L'
///是否强制认证
#define SECURITY_FTDC_TPID_IsAuthForce 'A'
///是否生成用户事件
#define SECURITY_FTDC_TPID_GenUserEvent 'G'
///起始报单本地编号
#define SECURITY_FTDC_TPID_StartOrderLocalID 'O'
///融资融券买券还券算法
#define SECURITY_FTDC_TPID_RepayStockAlgo 'R'
///衍生品账户资金提取线
#define SECURITY_FTDC_TPID_DeriveWithdrawRatio 'D'
typedef char TSecurityFtdcTradeParamIDType;
/////////////////////////////////////////////////////////////////////////
///TFtdcSettlementParamValueType是一个参数代码值类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcSettlementParamValueType[256];
/////////////////////////////////////////////////////////////////////////
///TFtdcMemoType是一个备注类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcMemoType[161];
/////////////////////////////////////////////////////////////////////////
///TFtdcPriorityType是一个优先级类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcPriorityType;
/////////////////////////////////////////////////////////////////////////
///TFtdcOrderRefType是一个报单引用类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcOrderRefType[13];
/////////////////////////////////////////////////////////////////////////
///TFtdcMarketIDType是一个市场代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcMarketIDType[31];
/////////////////////////////////////////////////////////////////////////
///TFtdcMacAddressType是一个Mac地址类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcMacAddressType[21];
/////////////////////////////////////////////////////////////////////////
///TFtdcInstrumentNameType是一个合约名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcInstrumentNameType[21];
/////////////////////////////////////////////////////////////////////////
///TFtdcOrderSysIDType是一个报单编号类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcOrderSysIDType[21];
/////////////////////////////////////////////////////////////////////////
///TFtdcIPAddressType是一个IP地址类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcIPAddressType[16];
/////////////////////////////////////////////////////////////////////////
///TFtdcIPPortType是一个IP端口类型
/////////////////////////////////////////////////////////////////////////
typedef int TSecurityFtdcIPPortType;
/////////////////////////////////////////////////////////////////////////
///TFtdcProtocolInfoType是一个协议信息类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcProtocolInfoType[11];
/////////////////////////////////////////////////////////////////////////
///TFtdcDepositSeqNoType是一个出入金流水号类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcDepositSeqNoType[15];
/////////////////////////////////////////////////////////////////////////
///TFtdcSystemNameType是一个系统名称类型
/////////////////////////////////////////////////////////////////////////
typedef char TSecurityFtdcSystemNameType[41];
/////////////////////////////////////////////////////////////////////////
///TFtdcInvestorRangeType是一个投资者范围类型
/////////////////////////////////////////////////////////////////////////
///所有
#define SECURITY_FTDC_IR_All '1'
///投资者组
#define SECURITY_FTDC_IR_Group '2'
///单一投资者
#define SECURITY_FTDC_IR_Single '3'
typedef char TSecurityFtdcInvestorRangeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcDataSyncStatusType是一个数据同步状态类型
/////////////////////////////////////////////////////////////////////////
///未同步
#define SECURITY_FTDC_DS_Asynchronous '1'
///同步中
#define SECURITY_FTDC_DS_Synchronizing '2'
///已同步
#define SECURITY_FTDC_DS_Synchronized '3'
typedef char TSecurityFtdcDataSyncStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcTraderConnectStatusType是一个交易所交易员连接状态类型
/////////////////////////////////////////////////////////////////////////
///没有任何连接
#define SECURITY_FTDC_TCS_NotConnected '1'
///已经连接
#define SECURITY_FTDC_TCS_Connected '2'
///已经发出合约查询请求
#define SECURITY_FTDC_TCS_QryInstrumentSent '3'
///订阅私有流
#define SECURITY_FTDC_TCS_SubPrivateFlow '4'
typedef char TSecurityFtdcTraderConnectStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcOrderActionStatusType是一个报单操作状态类型
/////////////////////////////////////////////////////////////////////////
///已经提交
#define SECURITY_FTDC_OAS_Submitted 'a'
///已经接受
#define SECURITY_FTDC_OAS_Accepted 'b'
///已经被拒绝
#define SECURITY_FTDC_OAS_Rejected 'c'
typedef char TSecurityFtdcOrderActionStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcOrderStatusType是一个报单状态类型
/////////////////////////////////////////////////////////////////////////
///全部成交
#define SECURITY_FTDC_OST_AllTraded '0'
///部分成交还在队列中
#define SECURITY_FTDC_OST_PartTradedQueueing '1'
///部分成交不在队列中
#define SECURITY_FTDC_OST_PartTradedNotQueueing '2'
///未成交还在队列中
#define SECURITY_FTDC_OST_NoTradeQueueing '3'
///未成交不在队列中
#define SECURITY_FTDC_OST_NoTradeNotQueueing '4'
///撤单
#define SECURITY_FTDC_OST_Canceled '5'
///未知
#define SECURITY_FTDC_OST_Unknown 'a'
///尚未触发
#define SECURITY_FTDC_OST_NotTouched 'b'
///已触发
#define SECURITY_FTDC_OST_Touched 'c'
typedef char TSecurityFtdcOrderStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcOrderSubmitStatusType是一个报单提交状态类型
/////////////////////////////////////////////////////////////////////////
///已经提交
#define SECURITY_FTDC_OSS_InsertSubmitted '0'
///撤单已经提交
#define SECURITY_FTDC_OSS_CancelSubmitted '1'
///修改已经提交
#define SECURITY_FTDC_OSS_ModifySubmitted '2'
///已经接受
#define SECURITY_FTDC_OSS_Accepted '3'
///报单已经被拒绝
#define SECURITY_FTDC_OSS_InsertRejected '4'
///撤单已经被拒绝
#define SECURITY_FTDC_OSS_CancelRejected '5'
///改单已经被拒绝
#define SECURITY_FTDC_OSS_ModifyRejected '6'
typedef char TSecurityFtdcOrderSubmitStatusType;
/////////////////////////////////////////////////////////////////////////
///TFtdcPositionDateType是一个持仓日期类型
/////////////////////////////////////////////////////////////////////////
///今日持仓
#define SECURITY_FTDC_PSD_Today '1'
///历史持仓
#define SECURITY_FTDC_PSD_History '2'
typedef char TSecurityFtdcPositionDateType;
/////////////////////////////////////////////////////////////////////////
///TFtdcTradingRoleType是一个交易角色类型
/////////////////////////////////////////////////////////////////////////
///代理
#define SECURITY_FTDC_ER_Broker '1'
///自营
#define SECURITY_FTDC_ER_Host '2'
///做市商
#define SECURITY_FTDC_ER_Maker '3'
typedef char TSecurityFtdcTradingRoleType;
/////////////////////////////////////////////////////////////////////////
///TFtdcPosiDirectionType是一个持仓多空方向类型
/////////////////////////////////////////////////////////////////////////
///净
#define SECURITY_FTDC_PD_Net '1'
///多头
#define SECURITY_FTDC_PD_Long '2'
///空头
#define SECURITY_FTDC_PD_Short '3'
///备兑
#define SECURITY_FTDC_PD_Covered '4'
typedef char TSecurityFtdcPosiDirectionType;
/////////////////////////////////////////////////////////////////////////
///TFtdcOrderPriceTypeType是一个报单价格条件类型
/////////////////////////////////////////////////////////////////////////
///即时成交剩余撤销市价单
#define SECURITY_FTDC_OPT_AnyPrice '1'
///限价
#define SECURITY_FTDC_OPT_LimitPrice '2'
///最优五档即时成交剩余撤销市价单
#define SECURITY_FTDC_OPT_BestPrice '3'
///最优五档即时成交剩余转限价市价单
#define SECURITY_FTDC_OPT_BestLimitPrice '4'
///全部成交或撤销市价单
#define SECURITY_FTDC_OPT_AllPrice '5'
///本方最优价格市价单
#define SECURITY_FTDC_OPT_ForwardBestPrice '6'
///对方最优价格市价单
#define SECURITY_FTDC_OPT_ReverseBestPrice '7'
///即时成交剩余转限价市价单
#define SECURITY_FTDC_OPT_Any2LimitPrice '8'
///全部成交或撤销限价单
#define SECURITY_FTDC_OPT_AllLimitPrice '9'
///激活A股网络密码服务代码
#define SECURITY_FTDC_OPT_ActiveANetPassSvrCode 'G'
///注销A股网络密码服务代码
#define SECURITY_FTDC_OPT_InactiveANetPassSvrCode 'H'
///激活B股网络密码服务代码
#define SECURITY_FTDC_OPT_ActiveBNetPassSvrCode 'I'
///注销B股网络密码服务代码
#define SECURITY_FTDC_OPT_InactiveBNetPassSvrCode 'J'
///回购注销
#define SECURITY_FTDC_OPT_Repurchase 'K'
///指定撤销
#define SECURITY_FTDC_OPT_DesignatedCancel 'L'
///指定登记
#define SECURITY_FTDC_OPT_Designated 'M'
///证券参与申购
#define SECURITY_FTDC_OPT_SubscribingShares 'N'
///证券参与配股
#define SECURITY_FTDC_OPT_Split 'O'
///要约收购登记
#define SECURITY_FTDC_OPT_TenderOffer 'P'
///要约收购撤销
#define SECURITY_FTDC_OPT_TenderOfferCancel 'Q'
///证券投票
#define SECURITY_FTDC_OPT_Ballot 'R'
///可转债转换登记
#define SECURITY_FTDC_OPT_ConvertibleBondsConvet 'S'
///可转债回售登记
#define SECURITY_FTDC_OPT_ConvertibleBondsRepurchase 'T'
///权证行权
#define SECURITY_FTDC_OPT_Exercise 'U'
///开放式基金申购
#define SECURITY_FTDC_OPT_PurchasingFunds 'V'
///开放式基金赎回
#define SECURITY_FTDC_OPT_RedemingFunds 'W'
///开放式基金认购
#define SECURITY_FTDC_OPT_SubscribingFunds 'X'
///开放式基金转托管转出
#define SECURITY_FTDC_OPT_LOFIssue 'Y'
///开放式基金设置分红方式
#define SECURITY_FTDC_OPT_LOFSetBonusType 'Z'
///开放式基金转换为其他基金
#define SECURITY_FTDC_OPT_LOFConvert 'a'
///债券入库
#define SECURITY_FTDC_OPT_DebentureStockIn 'b'
///债券出库
#define SECURITY_FTDC_OPT_DebentureStockOut 'c'
///ETF申购
#define SECURITY_FTDC_OPT_PurchasesETF 'd'
///ETF赎回
#define SECURITY_FTDC_OPT_RedeemETF 'e'
typedef char TSecurityFtdcOrderPriceTypeType;
/////////////////////////////////////////////////////////////////////////
///TFtdcOffsetFlagType是一个开平标志类型
/////////////////////////////////////////////////////////////////////////
///开仓
#define SECURITY_FTDC_OF_Open '0'
///平仓
#define SECURITY_FTDC_OF_Close '1'
///强平
#define SECURITY_FTDC_OF_ForceClose '2'
///平今
#define SECURITY_FTDC_OF_CloseToday '3'
///平昨
#define SECURITY_FTDC_OF_CloseYesterday '4'
///强减
#define SECURITY_FTDC_OF_ForceOff '5'
///本地强平
#define SECURITY_FTDC_OF_LocalForceClose '6'
typedef char TSecurityFtdcOffsetFlagType;
/////////////////////////////////////////////////////////////////////////