Skip to content

Commit db49a2b

Browse files
committed
添加产品代码
1 parent 050f703 commit db49a2b

8 files changed

Lines changed: 15 additions & 4 deletions

File tree

QuantBox_CTP_Trade/TraderApi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,7 @@ void CTraderApi::OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CTho
11741174
strncpy(pField->ExchangeID, pInstrument->ExchangeID, sizeof(ExchangeIDType));
11751175

11761176
strncpy(pField->Symbol, pInstrument->InstrumentID, sizeof(SymbolType));
1177+
strncpy(pField->ProductID, pInstrument->ProductID, sizeof(InstrumentIDType));
11771178

11781179
strncpy(pField->InstrumentName, pInstrument->InstrumentName, sizeof(InstrumentNameType));
11791180
pField->Type = CThostFtdcInstrumentField_2_InstrumentType(pInstrument);

QuantBox_Femas_Trade/TraderApi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,7 @@ void CTraderApi::OnRspQryInstrument(CUstpFtdcRspInstrumentField *pRspInstrument,
11201120
strcpy(pField->ExchangeID, pRspInstrument->ExchangeID);
11211121

11221122
strcpy(pField->Symbol, pRspInstrument->InstrumentID);
1123+
strncpy(pField->ProductID, pRspInstrument->ProductID, sizeof(InstrumentIDType));
11231124

11241125
strcpy(pField->InstrumentName, pRspInstrument->InstrumentName);
11251126
pField->Type = CUstpFtdcRspInstrumentField_2_InstrumentType(pRspInstrument);

QuantBox_Kingstar_Trade/TraderApi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,7 @@ void CTraderApi::OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CTho
11671167
strncpy(pField->ExchangeID, pInstrument->ExchangeID, sizeof(ExchangeIDType));
11681168

11691169
strncpy(pField->Symbol, pInstrument->InstrumentID, sizeof(SymbolType));
1170+
strncpy(pField->ProductID, pInstrument->ProductID, sizeof(InstrumentIDType));
11701171

11711172
strncpy(pField->InstrumentName, pInstrument->InstrumentName, sizeof(InstrumentNameType));
11721173
pField->Type = CThostFtdcInstrumentField_2_InstrumentType(pInstrument);

QuantBox_LTS_Level2/QuantBox_LTS_Level2.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@
124124
<ModuleDefinitionFile>..\include\ApiHeader.def</ModuleDefinitionFile>
125125
</Link>
126126
<PostBuildEvent>
127-
<Command>xcopy "$(TargetPath)" "$(SolutionDir)XAPI\LTS_L2\x86\" /Y
128-
xcopy "$(SolutionDir)include\LTS_L2\win32\*.dll" "$(SolutionDir)XAPI\LTS_L2\x86\" /Y</Command>
127+
<Command>xcopy "$(TargetPath)" "$(SolutionDir)XAPI\LTS\x86\" /Y
128+
xcopy "$(SolutionDir)include\LTS_L2\win32\*.dll" "$(SolutionDir)XAPI\LTS\x86\" /Y</Command>
129129
</PostBuildEvent>
130130
</ItemDefinitionGroup>
131131
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

QuantBox_LTS_Trade/TraderApi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@ void CTraderApi::OnRspQryInstrument(CSecurityFtdcInstrumentField *pInstrument, C
805805

806806
sprintf(pField->Symbol,"%s.%s",pInstrument->InstrumentID,pInstrument->ExchangeID);
807807
sprintf(pField->InstrumentName, "%s(%s)", pInstrument->ExchangeInstID, pInstrument->InstrumentName);
808+
strncpy(pField->ProductID, pInstrument->ProductID, sizeof(InstrumentIDType));
808809

809810
//strncpy(pField->InstrumentName, pInstrument->InstrumentName, sizeof(InstrumentNameType));
810811
pField->Type = CSecurityFtdcInstrumentField_2_InstrumentType(pInstrument);

csharp/QuantBox.XAPI/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.2.0.0")]
36-
[assembly: AssemblyFileVersion("1.2.0.0")]
35+
[assembly: AssemblyVersion("1.2.0.1")]
36+
[assembly: AssemblyFileVersion("1.2.0.1")]

csharp/QuantBox.XAPI/Struct.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,11 @@ public struct InstrumentField
432432
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 9)]
433433
public string ExchangeID;
434434
/// <summary>
435+
/// 产品代码
436+
/// </summary>
437+
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 31)]
438+
public string ProductID;
439+
/// <summary>
435440
/// 合约名称
436441
/// </summary>
437442
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]

include/ApiStruct.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ struct InstrumentField
337337
InstrumentIDType InstrumentID;
338338
///交易所代码
339339
ExchangeIDType ExchangeID;
340+
///产品代码
341+
InstrumentIDType ProductID;
340342
///合约名称
341343
InstrumentNameType InstrumentName;
342344
///基础商品代码

0 commit comments

Comments
 (0)