Historical Trailing Profit Query
getTrailHistory
Input Parameters
| Parameter | Type | Description |
|---|---|---|
| account | Account | Account |
| start_date | string | Query start date |
| end_date | string | QueryEnd date |
Result
| Parameter | Type | Description |
|---|---|---|
| isSuccess | bool | Whether successful |
| data | list | Conditional order response information |
| message | string ? (optional) | When isSuccess : false Returns an error message |
Order Information ConditionDetail Fields
Return type : Object
| Parameter | Type | Description |
|---|---|---|
| guid | string | Conditional Order ID |
| batchNo | string | Split-order batch number |
| orderLevel | string | Conditional order level |
| lastTime | string | Update time |
| parentGuid | string | Parent order ID |
| symbol | string | Symbol |
| orderAmount | string | Order amount |
| childBatchNo | string | Child split-order batch number |
| account | string | Account |
| conditionContent | string | Condition content |
| action | string | Action |
| conditionBuySell | string | Side |
| conditionSymbol | string | Instrument name |
| conditionPrice | string | Price |
| conditionVolume | string | Order quantity |
| conditionFilledVolume | string | Filled quantity |
| createTime | string | Creation time |
| startDate | string | Scheduled start time |
| status | string | Current status |
| errorMessage | string | Current statusErrorDescription |
| detailRecordsCount | string | QueryDetail record count |
| detailRecords | List | QueryDetail records |
| >> guid | string | Conditional Order ID |
| >> account | string | Account |
| >> conditionContent | string | Condition content |
| >> action | string | Action |
| >> conditionBuySell | string | Side |
| >> conditionSymbol | string | Instrument name |
| >> conditionPrice | string | Price |
| >> conditionVolume | string | Order quantity |
| >> conditionFilledVolume | string | Filled quantity |
| >> startDate | string | Scheduled time |
| >> status | string | Current status |
| >> errorMessage | string | Current statusErrorDescription |
| tpslCount | string | Take-Profit/Stop-Lossrecord count |
| tpslRecord | List | Take-Profit/Stop-LossDetail records |
| >> guid | string | Conditional Order ID |
| >> account | string | Account |
| >> conditionContent | string | Condition content |
| >> action | string | Action |
| >> conditionBuySell | string | Side |
| >> conditionSymbol | string | Instrument name |
| >> conditionPrice | string | Price |
| >> conditionVolume | string | Order quantity |
| >> conditionFilledVolume | string | Filled quantity |
| >> startDate | string | Scheduled time |
| >> status | string | Current status |
| >> errorMessage | string | Current 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: [],
}
]
}