Get Order Information
Preview Orders TigerHttpRequest(MethodName.PREVIEW_ORDER)
Corresponding Request Class TradeOrderPreviewRequest
Description Preview order, returns whether the order can be submitted and margin usage information
Argument Same as place order interface parameters OCA orders and attached orders are not currently supported
Argument | Type | Required | Description |
---|---|---|---|
account | string | Yes | Account id, example :DU575569. Global Accounbt Only |
symbol | string | Yes | Ticker symbol of the asset, example: AAPL |
sec_type | string | Yes | Security Type (STK-stocks, OPT-US Options, WAR-Warrants, IOPT-CBBC) |
action | string | Yes | Order direction: BUY/SELL |
order_type | string | Yes | Order Types,'MKT'-Market Order / 'LMT'-Limit Order / 'STP'-Stop Order / 'STP_LMT'-Stop-Limit Order / 'TRAIL'-Trailing Stop Order |
total_quantity | int | Yes | Order's quantity (There is a minimum quantity requirement for HK market) |
limit_price | double | No | Limit price, required if placing a limit order (inluding STP and STP_LMT) |
aux_price | double | No | Auxiliary price. it represents the stop price if placing a stop price, trailing price if placing a trailing stop order |
trailing_percent | double | No | Trailing activation price for trailing stop orders (by percentage). When the order type is TRAIL, it cannot be assgined a value when aux_price already has a value |
outside_rth | boolean | No | if trade outside regular trading hours (only applicable to U.S. market) |
market | string | No | Market (US, HK, CN, etc.) |
currency | string | No | Currency (USD, HKD, CNH, etc.) |
time_in_force | string | No | Time in force,'DAY'-valid until market close,'GTC'-Good-Till-Cancel,'DAY' by default |
exchange | string | No | Exchange code (U.S stocks SMART, Shanghai-Hong Kong Stock Connect-SEHK, A-Shares-SEHKNTL,Shenzhen-Hong Kong Stock Connect SEHKSZSE) |
expiry | string | No | Expiration data for options, warrants and CBBC |
strike | string | No | Strike price for options, warrants and CBBC |
right | string | No | PUT/CALL for options, warrants and CBBC |
multiplier | float | No | multiplier for options, warrants and CBBC |
local_symbol | string | No | Required when trading CBBC, This is the 5-digit number under the Warrant/CBBC list in the TigerTrade APP |
Response
Field | Type | Description |
---|---|---|
account | String | Account ID |
initMargin | Double | Initial margin after order placement, futures not supported |
maintMargin | Double | Maintenance margin after order placement, futures not supported |
equityWithLoan | Double | Available assets after order placement, futures not supported |
initMarginBefore | Double | Initial margin before order placement, futures not supported |
maintMarginBefore | Double | Maintenance margin before order placement, futures not supported |
equityWithLoanBefore | Double | Available assets before order placement, futures not supported |
marginCurrency | String | Margin currency |
commission | Double | Estimated commission |
gst | Double | Estimated consumption tax |
commissionCurrency | String | Commission currency |
availableEe | Double | Available remaining assets, futures not supported |
excessLiquidity | Double | Remaining liquidity, futures not supported |
overnightLiquidation | Double | Overnight remaining liquidity, futures not supported |
isPass | Boolean | Whether the order can be submitted |
message | String | Error reason if order cannot be submitted |
Example
TradeOrderPreviewRequest request = TradeOrderPreviewRequest.buildLimitOrder(
contract, ActionType.BUY, 1, 100D);
TradeOrderPreviewResponse response = client.execute(request);
System.out.println(JSONObject.toJSONString(response));
Response Example
{"code":0,"message":"success","timestamp":1748413352204,"data":{"account":"600666","initMargin":432.617714,"maintMargin":424.264714,"equityWithLoan":1111.3237541,"initMarginBefore":387.617714,"maintMarginBefore":386.764714,"equityWithLoanBefore":1111.3237541,"marginCurrency":"USD","commission":0.0,"commissionCurrency":"USD","availableEE":677.8311632,"excessLiquidity":687.05904,"overnightLiquidation":687.05904,"gst":0.0,"isPass":true}
Get Orders
RequestQuerySingleOrderRequest(MethodName.ORDERS)
QueryOrderRequest(MethodName.ORDERS)
Description
Get details for orders that you placed
Argument
Get a single order
Argument | Type | Required | Description |
---|---|---|---|
account | string | Yes | Account id: 572386 |
id | int | Yes | order id, this id is used to identify an order on the server |
secret_key | string | No | Secret key for the trader of institutions, please config in client_config, ignore if you are a individual user |
show_charges | bool | No | return commission and fee details |
Get a list of orders
Argument | Type | Required | Description |
---|---|---|---|
account | string | Yes | Account id:572386 |
seg_type | SegmentType | No | Account segment. Available: SegmentType.SEC for Securities; SegmentType.FUT for Commodities; SegmentType.FUND for funds, SegmentType.ALL for Securities + Commodities + Funds. defaul value is SegmentType.SEC |
sec_type | string | No | ALL/STK/OPT/FUT/FOP/CASH/FUND, ALL by default |
market | string | No | ALL/US/HK/CN, defaul value is ALL |
symbol | string | No | Stock ticker symbol |
expiry | string | No | Expiration data for options, warrants and CBBC |
strike | string | No | Strike price for options, warrants and CBBC |
right | string | No | PUT/CALL for options, warrants and CBBC |
start_date | string | No | The starting time of the order placing time (when sort_by=LATEST_STATUS_UPDATED, the starting time of the order status updated time), the format is '2018-05-01'/ "2018-05-01 10:00:00"(Default 'GMT +8', can set the value of TimeZoneId to 'NewYork'), close interval |
end_date | string | No | The ending time of the order placing time (when sort_by=LATEST_STATUS_UPDATED, the ending time of the order status updated time), the format is '2018-05-15' /"2018-05-01 10:00:00"(Default 'GMT +8', can set the value of TimeZoneId to 'NewYork'), open interval |
states | array | No | Order status, open orders by default, Please refer to: Order Status for possible states |
isBrief | boolean | No | 0 for detailed information, 1 for concise information |
limit | integer | No | Maximum number of orders returned. Default value is 100. Maximum possible value is 300 |
sort_by | OrderSortBy | No | Fields used to sort and filter start_date and end_date,LATEST_CREATED/LATEST_STATUS_UPDATED; Default:LATEST_CREATED |
secret_key | string | No | Secret key for the trader of institutions, please config in client_config, ignore if you are a indiviual user |
lang | string | No | Language: zh_CN,zh_TW,en_US, By default: en_US |
page_token | string | No | Token for paging query |
Response
com.tigerbrokers.stock.openapi.client.https.response.trade.SingleOrderResponse
or com.tigerbrokers.stock.openapi.client.https.response.trade.BatchOrderResponse
Name | Type | Description |
---|---|---|
nextPageToken | string | page token for next query |
items | array | An array of orders, please refer to the description below for detailed fields |
items have the following attributes:
Name | Example | Description |
---|---|---|
id | 135482687464472583 | unique order id assigned by the server |
orderId | 1000003917 | order id assigned by the user, not unique |
externalId | 1000003917 | external id, The value is the same as 'orderId' when placing an order through the API |
parentId | 0 | order id of the main (parent) order |
account | 572386 | Account id |
action | BUY | Order direction: BUY/SELL |
orderType | LMT | Order Types,'MKT'-Market Order / 'LMT'-Limit Order / 'STP'-Stop Order / 'STP_LMT'-Stop-Limit Order / 'TRAIL'-Trailing Stop Order |
limitPrice | 108.62 | Limit price |
auxPrice | 0.0 | Auxiliary price. it represents the stop price if placing a stop price, trailing price if placing a trailing stop order |
trailingPercent | 5 | Trailing activation price for trailing stop orders (by percentage) |
totalQuantity | 50 | Order's quantity |
totalQuantityScale | 0 | The offset of the order quantity, default is 0. The combination of 'totalQuantity' and 'totalQuantityScale' of odd lot orders represents the actual order quantity. For example, totalQuantity=111 totalQuantityScale=2, then the real quantity=111*10^(-2)=1.11 |
timeInForce | DAY | DAY/GTC/GTD |
expireTime | 1669000183188 | supported by GTD order |
outsideRth | True | if trade outside regular trading hours (only applicable to U.S. market) |
filledQuantity | 50 | filled quantity |
filledQuantityScale | 0 | filled quantity scale,For example, the filledQuantity value is 2135, the filledQuantityScale is 2, and the actual number of filledQuantity is 21.35 |
totalCashAmount | 100 | Total order cash amount, null when ordering by shares |
filledCashAmount | 100 | Filled order amount, null when ordering by shares |
refundCashAmount | 0 | Refunded amount, equal to 'totalCashAmount' minus 'filledCashAmount'. Null when ordering by shares or when the order is not terminated. |
avgFillPrice | 108.62 | average fill price |
liquidation | false | if the order has been cleared |
remark | Order is expired | error message |
status | Filled | order status, refer to:Order status |
attrDesc | Exercise | Options status, refer to:Options status |
commission | 0.99 | Total commission |
commissionCurrency | USD | Currency of the commission |
gst | 1.34 | Goods and Services Tax (TBSG only) |
realizedPnl | 0.0 | Realized PNL |
percentOffset | 0.0 | Percent offset |
openTime | 1657667486000 | Time when order is placed |
updateTime | 1657670428000 | Last time when the order is updated |
latestTime | 1657670428000 | Last status update time |
symbol | BABA | Stock ticker symbol |
currency | USD | Currency |
market | US | Market |
multiplier | 0.0 | lot size |
secType | STK | Security Type (STK-stocks, OPT-US Options, WAR-Warrants, IOPT-CBBC) |
userMark | my_strategy_1 | order's remark info,max length is 200 |
canModify | false | Whether the order can be modified |
canCancel | false | Whether the order can be cancelled |
liquidation | false | is it a forced liquidation order |
isOpen | true | Is it an opening order |
replaceStatus | NONE | Order replace status |
cancelStatus | NONE | Order cancel status |
charges | commission and fee details(Only valid when querying order by ID and 'show_charges' = true). refer to Charge details. | |
commissionDiscountAmount | 0 | commission discount amount(Only valid when querying order by ID) |
orderDiscountAmount | 0 | order discount amount(Only valid when querying order by ID) |
orderDiscount | 0 | order discount status. 1:unfinished;2:finished;0:default |
attrList | ["EXERCISE"] | order attribute list, The meanings of each attribute are as follows: LIQUIDATION, FRACTIONAL_SHARE Smashed stock order (non-whole shares), EXERCISE exercise, EXPIRE expiration, ASSIGNMENT passive exercise allocation, CASH_SETTLE cash delivery, KNOCK_OUT knock out, RECALL recall order, ODD_LOT Smashed stock order (non-whole shares), DEALER trader order, GREY_MARKET Hong Kong stock dark order, BLOCK_TRADE bulk trading, ATTACHED_ORDER additional order, OCA OCA order |
Charge
Description:
Name | Example | Description |
---|---|---|
category | TIGER | fee category:TIGER/THIRD_PARTY |
categoryDesc | Tiger Charge | fee category desc:Tiger Charge; Third Parties |
total | 18 | tatal amount |
details | fee details. refer to ChargeDetails details. |
ChargeDetails
Description:
Name | Example | Description |
---|---|---|
type | SETTLEMENT_FEE | fee type:SETTLEMENT_FEE/STAMP_DUTY/TRANSACTION_LEVY/EXCHANGE_FEE/FRC_TRANSACTION_LEVY |
typeDesc | Settlement Fee | fee type desc:Settlement Fee; Stamp Duty; Transaction Levy; Exchange Fee; AFRC Transaction Levy |
originalAmount | 4 | original amount |
afterDiscountAmount | 4 | amount after deduction |
Example
Get an Order
TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(ClientConfig.DEFAULT_CONFIG);
QuerySingleOrderRequest request = new QuerySingleOrderRequest();
String bizContent = AccountParamBuilder.instance()
.account("572386")
.id(31227598058424320L)
.isShowCharges(true)
.lang(Language.en_US)
.buildJson();
request.setBizContent(bizContent);
SingleOrderResponse response = client.execute(request);
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response));
Long id = response.getItem().getId();
String action = response.getItem().getAction();
// ...
} else {
System.out.println(response.getMessage());
}
Get Order List
TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(ClientConfig.DEFAULT_CONFIG);
QueryOrderRequest request = new QueryOrderRequest();
String bizContent = AccountParamBuilder.instance()
.account("572386")
.startDate("2023-04-01 00:00:00", TimeZoneId.NewYork)
.endDate("2023-06-20 23:59:59", TimeZoneId.NewYork)
.secType(SecType.STK)
.sortBy(OrderSortBy.LATEST_CREATED)
.limit(5)
.buildJson();
request.setBizContent(bizContent);
BatchOrderResponse response = client.execute(request);
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response));
List<TradeOrder> orders = response.getItem().getOrders();
TradeOrder order1 = orders.get(0);
String symbol = order1.getString("symbol");
Long id = order1.getLong("id");
// ...
} else {
System.out.println(response.getMessage());
}
Response Example
Single Order
{
"code": 0,
"data": {
"account": "572386",
"action": "SELL",
"algoStrategy": "LMT",
"attrDesc": "",
"attrList": [
"SETTLED"
],
"avgFillPrice": 3.54,
"canCancel": false,
"canModify": false,
"cancelStatus": "NONE",
"charges": [
{
"category": "TIGER",
"categoryDesc": "Tiger Charge",
"details": [
{
"afterDiscountAmount": 18,
"originalAmount": 18,
"type": "USER_COMMISSION",
"typeDesc": "Commission"
}
],
"total": 18
},
{
"category": "THIRD_PARTY",
"categoryDesc": "Third Parties",
"details": [
{
"afterDiscountAmount": 4,
"originalAmount": 4,
"type": "SETTLEMENT_FEE",
"typeDesc": "Settlement Fee"
},
{
"afterDiscountAmount": 22,
"originalAmount": 22,
"type": "STAMP_DUTY",
"typeDesc": "Stamp Duty"
},
{
"afterDiscountAmount": 0.58,
"originalAmount": 0.58,
"type": "TRANSACTION_LEVY",
"typeDesc": "Transaction Levy"
},
{
"afterDiscountAmount": 1.2,
"originalAmount": 1.2,
"type": "EXCHANGE_FEE",
"typeDesc": "Exchange Fee"
},
{
"afterDiscountAmount": 0.04,
"originalAmount": 0.04,
"type": "FRC_TRANSACTION_LEVY",
"typeDesc": "AFRC Transaction Levy"
}
],
"total": 27.82
}
],
"commission": 45.82,
"currency": "HKD",
"discount": 0,
"externalId": "710344498739626686",
"filledCashAmount": 21240,
"filledQuantity": 6000,
"filledQuantityScale": 0,
"gst": 0,
"id": 36810407788938240,
"identifier": "01177",
"isOpen": false,
"latestTime": 1729740324000,
"limitPrice": 3.54,
"liquidation": false,
"market": "HK",
"name": "SINO BIOPHARM",
"openTime": 1729740323000,
"orderDiscount": 0,
"orderId": 0,
"orderType": "LMT",
"outsideRth": false,
"realizedPnl": -6388.735,
"remark": "",
"replaceStatus": "NONE",
"secType": "STK",
"source": "android",
"status": "Filled",
"symbol": "01177",
"timeInForce": "GTC",
"totalQuantity": 6000,
"totalQuantityScale": 0,
"tradingSessionType": "RTH",
"updateTime": 1730045103000,
"userMark": ""
},
"message": "success",
"sign": "F9xRzsjqgFlfaUJVajSber2jfCOVt1DIovKcE3yxWK9DFqfTPXHxKqCJ3aT8bGPl/8THViWW0A62LlRL1RB41cLt6bsMUyG7+nSQOE2vPIdo29SyZGcPAiSdRHbY8h3Nq9V1PzVQVqs07joUOw5dUuO5M3TgY/R0UHFV0lwxkBM=",
"success": true,
"timestamp": 1730971141181
}
List of orders
{
"code":0,
"data":{
"items":[
{
"account":"572386",
"action":"BUY",
"algoStrategy":"MKT",
"attrDesc":"",
"avgFillPrice":9.36,
"canCancel":false,
"canModify":false,
"commission":2.4,
"currency":"USD",
"discount":0,
"externalId":"980",
"filledQuantity":10,
"id":31227598058424320,
"identifier":"NIO.SI",
"isOpen":true,
"latestTime":1687146866000,
"liquidation":false,
"market":"SG",
"name":"NIO Inc.",
"openTime":1687146865000,
"orderId":980,
"orderType":"MKT",
"outsideRth":false,
"realizedPnl":0,
"remark":"",
"secType":"STK",
"source":"OpenApi",
"status":"Filled",
"symbol":"NIO.SI",
"timeInForce":"DAY",
"totalQuantity":10,
"updateTime":1687146866000,
"userMark":""
},
{
"account":"572386",
"action":"BUY",
"algoStrategy":"LMT",
"attrDesc":"",
"avgFillPrice":0,
"canCancel":false,
"canModify":false,
"commission":0,
"currency":"USD",
"discount":0,
"externalId":"979",
"filledQuantity":0,
"id":31227591745209344,
"identifier":"NIO.SI",
"isOpen":true,
"latestTime":1687146817000,
"limitPrice":2,
"liquidation":false,
"market":"SG",
"name":"NIO Inc.",
"openTime":1687146817000,
"orderId":979,
"orderType":"LMT",
"outsideRth":true,
"realizedPnl":0,
"remark":"Order Price exceed max price step (30) limit. For more information, please contact customer service at 400-603-7555.",
"secType":"STK",
"source":"OpenApi",
"status":"Invalid",
"symbol":"NIO.SI",
"timeInForce":"DAY",
"totalQuantity":10,
"updateTime":1687146817000,
"userMark":""
},
{
"account":"572386",
"action":"BUY",
"algoStrategy":"LMT",
"attrDesc":"",
"avgFillPrice":0,
"canCancel":false,
"canModify":false,
"commission":0,
"currency":"USD",
"discount":0,
"externalId":"978",
"filledQuantity":0,
"id":31227575457809408,
"identifier":"NIO.SI",
"isOpen":true,
"latestTime":1687146693000,
"limitPrice":9,
"liquidation":false,
"market":"SG",
"name":"NIO Inc.",
"openTime":1687146693000,
"orderId":978,
"orderType":"LMT",
"outsideRth":true,
"realizedPnl":0,
"remark":"Order Price exceed max price step (30) limit. For more information, please contact customer service at 400-603-7555.",
"secType":"STK",
"source":"OpenApi",
"status":"Invalid",
"symbol":"NIO.SI",
"timeInForce":"DAY",
"totalQuantity":10,
"updateTime":1687146693000,
"userMark":""
},
{
"account":"572386",
"action":"BUY",
"algoStrategy":"LMT",
"attrDesc":"",
"avgFillPrice":0,
"canCancel":false,
"canModify":false,
"commission":0,
"currency":"USD",
"discount":0,
"externalId":"977",
"filledQuantity":0,
"id":31175091790938112,
"identifier":"JD",
"isOpen":true,
"latestTime":1686788253000,
"limitPrice":35,
"liquidation":false,
"market":"US",
"name":"JD.com",
"openTime":1686746274000,
"orderId":977,
"orderType":"LMT",
"outsideRth":true,
"realizedPnl":0,
"remark":"Order is expired",
"secType":"STK",
"source":"OpenApi",
"status":"Inactive",
"symbol":"JD",
"timeInForce":"DAY",
"totalQuantity":1,
"updateTime":1686788253000,
"userMark":""
},
{
"account":"572386",
"action":"BUY",
"algoStrategy":"LMT",
"attrDesc":"",
"avgFillPrice":0,
"canCancel":false,
"canModify":false,
"commission":0,
"currency":"USD",
"discount":0,
"externalId":"976",
"filledQuantity":0,
"id":31175084828133376,
"identifier":"JD",
"isOpen":true,
"latestTime":1686788253000,
"limitPrice":35.9,
"liquidation":false,
"market":"US",
"name":"JD.com",
"openTime":1686746221000,
"orderId":976,
"orderType":"LMT",
"outsideRth":true,
"realizedPnl":0,
"remark":"Order is expired",
"secType":"STK",
"source":"OpenApi",
"status":"Inactive",
"symbol":"JD",
"timeInForce":"DAY",
"totalQuantity":1,
"updateTime":1686788253000,
"userMark":""
}
],
"nextPageToken":"b3JkZXJzfDE2ODAzMjE2MDAwMDB8MTY4NzMxOTk5OTAwMHwzMTE3NTA4NDgyODEzMzM3Ng=="
},
"message":"success",
"sign":"u59vLeh+5Wvim9SwxaW16k9nvTXfnSkZqPqUcq0p0CBtfXQNUFk4nxJXXA6jKXF2RcdfzZn+lkODMpxiI8dGC2bi+/4MoqpnkWGQFAlur/YCSSgTG+TUv1p2mfwZ2CLpKzzNaDk1NEcni+AX1JBeWJeo0GS6bgo8ic22hdS5BLE=",
"success":true,
"timestamp":1687251914180
}
Get Filled Orders
RequestQueryOrderRequest(MethodName.FILLED_ORDERS)
Description
Get a list of orders that has been filled
Argument
Refer to get orders, start_date and end_date are required argument.
Example
TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(ClientConfig.DEFAULT_CONFIG);
QueryOrderRequest request = new QueryOrderRequest(MethodName.FILLED_ORDERS);
String bizContent = AccountParamBuilder.instance()
.account("402901")
.secType(SecType.STK)
.startDate("2021-11-15 22:34:30")
.endDate("2022-01-06 22:34:31")
.buildJson();
request.setBizContent(bizContent);
BatchOrderResponse response = client.execute(request);
Response
See get orders
Get Open Orders
RequestQueryOrderRequest(MethodName.ACTIVE_ORDERS)
Argument
See get orders
Example
TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(ClientConfig.DEFAULT_CONFIG);
QueryOrderRequest request = new QueryOrderRequest(MethodName.ACTIVE_ORDERS);
String bizContent = AccountParamBuilder.instance()
.account("DU575569")
.secType(SecType.STK)
.buildJson();
request.setBizContent(bizContent);
BatchOrderResponse response = client.execute(request);
Response
See get orders
Get inactive orders
RequestQueryOrderRequest(MethodName.INACTIVE_ORDERS)
Argument
See get orders
Response
TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(ClientConfig.DEFAULT_CONFIG);
QueryOrderRequest request = new QueryOrderRequest(MethodName.INACTIVE_ORDERS);
String bizContent = AccountParamBuilder.instance()
.account("DU575569")
.secType(SecType.STK)
.buildJson();
request.setBizContent(bizContent);
BatchOrderResponse response = client.execute(request);
Response
See get orders
Get Transaction History TigerHttpRequest(MethodName.ORDER_TRANSACTIONS)
Description
Get the transaction record of the order
Argument
Argument | Type | Required | Description |
---|---|---|---|
account | String | Yes | Account id, prime account only |
order_id | long | Yes | Order ID. order_id and symbol, at least one needs to have a value. if orderId is assigned, you are not able to search orders by order id |
symbol | String | Yes | ticker symbol. order_id and symbol, at least one needs to have a value |
sec_type | String | No, required if search by symbol | STK:stocks/FUT:futures/OPT:options/WAR:warrants/IOPT:CBBC, ALL if not specify |
expiry | String | No, required when sec_type is OPT/WAR/IOPT | Expiration Date |
right | String | No, required when sec_type is OPT/WAR/IOPT | CALL/PUT |
start_date | long | No | start date |
end_date | long | No | end date |
limit | int | No | Maximum number of orders returned, 20 by default, maximum is 100 |
secretKey | String | No | Secret key for the trader of institutions, please config in client_config, ignore if you are a indiviual user |
page_token | String | No | pagination token |
Response
Name | Example | Description |
---|---|---|
id | 24653027221308416 | transaction ID |
accountId | 402190 | account ID |
orderId | 24637316162520064 | order ID |
secType | STK | security type |
symbol | CII | symbol |
currency | USD | currency |
market | US | market |
action | BUY | order direction, BUY/SELL |
filledQuantity | 100 | filled quantity |
filledPrice | 21 | filled price |
filledAmount | 2167.0 | filled amount |
transactedAt | 2021-11-15 22:34:30 | transaction time |
transactionTime | 1636986870000 | transaction timestamp |
nextPageToken | b3JkZXJzfDE2ODAzMjE2MDAwMDB8MTY4NzMxOTk5OTAwMHwzMTE3NTA4NDgyODEzMzM3Ng== | pagination token |
Example
// search by symbols
TigerHttpRequest request = new TigerHttpRequest(MethodName.ORDER_TRANSACTIONS);
String bizContent = AccountParamBuilder.instance()
.account("402501")
.secType(SecType.STK)
.symbol("CII")
.limit(30)
.startDate("2021-11-15 22:34:30")
.endDate("2021-11-15 22:34:31")
.buildJson();
request.setBizContent(bizContent);
TigerHttpResponse response = client.execute(request);
JSONArray data = JSON.parseObject(response.getData()).getJSONArray("items");
JSONObject trans1 = data.getJSONObject(0);
// Search by orderId
TigerHttpRequest request = new TigerHttpRequest(MethodName.ORDER_TRANSACTIONS);
String bizContent = AccountParamBuilder.instance()
.account("402501")
.orderId(24637316162520064L)
.limit(30)
.buildJson();
request.setBizContent(bizContent);
TigerHttpResponse response = client.execute(request);
JSONArray data = JSON.parseObject(response.getData()).getJSONArray("items");
JSONObject trans1 = data.getJSONObject(0);
Response Example
{
"items": [
{
"id": 24653027221308416,
"accountId": 402901,
"orderId": 24637316162520064,
"secType": "STK",
"symbol": "CII",
"currency": "USD",
"market": "US",
"action": "BUY",
"filledQuantity": 100,
"filledPrice": 21.67,
"filledAmount": 2167,
"transactedAt": "2021-11-15 22:34:30",
"transactionTime": 1636986870000
}
]
}