Skip to main content

Historical Trailing Profit Query

getTrailHistory

Input Parameters

ParameterTypeDescription
accountAccountAccount
start_datestringQuery start date
end_datestringQueryEnd date

Result

ParameterTypeDescription
isSuccessboolWhether successful
datalistConditional order response information
messagestring ? (optional)When isSuccess : false Returns an error message

Order Information ConditionDetail Fields

Return type : Object

ParameterTypeDescription
guidstringConditional Order ID
batchNostringSplit-order batch number
orderLevelstringConditional order level
lastTimestringUpdate time
parentGuidstringParent order ID
symbolstringSymbol
orderAmountstringOrder amount
childBatchNostringChild split-order batch number
accountstringAccount
conditionContentstringCondition content
actionstringAction
conditionBuySellstringSide
conditionSymbolstringInstrument name
conditionPricestringPrice
conditionVolumestringOrder quantity
conditionFilledVolumestringFilled quantity
createTimestringCreation time
startDatestringScheduled start time
statusstringCurrent status
errorMessagestringCurrent statusErrorDescription
detailRecordsCountstringQueryDetail record count
detailRecordsListQueryDetail records
>> guidstringConditional Order ID
>> accountstringAccount
>> conditionContentstringCondition content
>> actionstringAction
>> conditionBuySellstringSide
>> conditionSymbolstringInstrument name
>> conditionPricestringPrice
>> conditionVolumestringOrder quantity
>> conditionFilledVolumestringFilled quantity
>> startDatestringScheduled time
>> statusstringCurrent status
>> errorMessagestringCurrent statusErrorDescription
tpslCountstringTake-Profit/Stop-Lossrecord count
tpslRecordListTake-Profit/Stop-LossDetail records
>> guidstringConditional Order ID
>> accountstringAccount
>> conditionContentstringCondition content
>> actionstringAction
>> conditionBuySellstringSide
>> conditionSymbolstringInstrument name
>> conditionPricestringPrice
>> conditionVolumestringOrder quantity
>> conditionFilledVolumestringFilled quantity
>> startDatestringScheduled time
>> statusstringCurrent status
>> errorMessagestringCurrent statusErrorDescription

Request Example

sdk.stock.getTrailHistory(account,"20240301","20240601")

Response Example


{
isSuccess: true,
data :[
{
guid: "5c154a76-e7ef-4b8f-94b5-80bf08fa4b8e",
batchNo: "",
orderLevel: "0",
lastTime: "2024-08-02 16:45:01",
symbol: "2889",
orderAmount: "0",
childBatchNo: "",
account: "1307515",
conditionContent: "from2024/08/02to2024/08/02, whenWaterland Financialfrom1000(initialBase price),Downreaches10%,tofixedlotsallfilledorexpirytoreachesis",
action: "Place order",
conditionBuySell: "Cash equityBuy",
conditionSymbol: "Waterland Financial (2889)",
conditionPrice: "Matched price(1) level(ROD)",
conditionVolume: "1lots",
conditionFilledVolume: "0lots",
createTime: "2024-08-02 10:07:31",
startDate: "2024/08/02",
status: "Conditional order terminated(I)",
detailRecordsCount: "0",
detailRecords: [],
tpslCount: "0",
tpslRecord: [],
},
{
guid: "c71117c8-aa70-4477-9f04-ff4c73a4fad0",
batchNo: "",
orderLevel: "0",
lastTime: "2024-07-29 17:30:00",
symbol: "2330",
orderAmount: "0",
childBatchNo: "",
account: "1307515",
conditionContent: "from2024/07/29to2024/07/29, whenTSMCfrom860(initialBase price),Upreaches5%,tofixedlotsallfilledorexpirytoreachesis",
action: "Place order",
conditionBuySell: "Cash equityBuy",
conditionSymbol: "TSMC (2330)",
conditionPrice: "Matched price(5) level(ROD)",
conditionVolume: "2lots",
conditionFilledVolume: "0lots",
createTime: "2024-07-29 11:01:49",
startDate: "2024/07/29",
status: "Conditional order terminated(I)",
detailRecordsCount: "0",
detailRecords: [],
tpslCount: "0",
tpslRecord: [],
}
]
}