User
Endpoints related to user actions.
Retrieves the Open Trade Reports, only Block Trades, for the given accountId. ReceiveTime in POSIX format × 1000 (milliseconds since 1 January 1970).
A list of open trade reports
Invalid request parameters
Unauthorized access
GET /ap/GetOpenTradeReports HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"OMSId": 1,
"AccountId": 1
}
[
{
"Side": "text",
"OrderId": 1,
"Price": 1,
"Quantity": 1,
"DisplayQuantity": 1,
"Instrument": 1,
"Account": 1,
"OrderType": "text",
"ClientOrderId": 1,
"OrderState": "text",
"ReceiveTime": 1,
"ReceiveTimeTicks": 1,
"OrigQuantity": 1,
"QuantityExecuted": 1,
"AvgPrice": 1,
"CounterPartyId": 1,
"ChangeReason": "text",
"OrigOrderId": 1,
"OrigClOrdId": 1,
"EnteredBy": 1,
"IsQuote": true,
"InsideAsk": 1,
"InsideAskSize": 1,
"InsideBid": 1,
"InsideBidSize": 1,
"LastTradePrice": 1,
"RejectReason": "text",
"IsLockedIn": true,
"CancelReason": "text",
"OMSId": 1
}
]
Retrieves the Open Trade Reports, only Block Trades, for the given instrumentId. Identifying information of counterparty is removed.
A list of open trade reports
Invalid request parameters
Unauthorized access
GET /ap/GetAllOpenTradeReports HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"OMSId": 1,
"InstrumentId": 1
}
[
{
"Side": "text",
"OrderId": 1,
"Price": 1,
"Quantity": 1,
"DisplayQuantity": 1,
"Instrument": 1,
"Account": 1,
"OrderType": "text",
"ClientOrderId": 1,
"OrderState": "text",
"ReceiveTime": 1,
"ReceiveTimeTicks": 1,
"OrigQuantity": 1,
"QuantityExecuted": 1,
"AvgPrice": 1,
"CounterPartyId": 1,
"ChangeReason": "text",
"OrigOrderId": 1,
"OrigClOrdId": 1,
"EnteredBy": 1,
"IsQuote": true,
"InsideAsk": 1,
"InsideAskSize": 1,
"InsideBid": 1,
"InsideBidSize": 1,
"LastTradePrice": 1,
"RejectReason": "text",
"IsLockedIn": true,
"CancelReason": "text",
"OMSId": 1
}
]
Cancels and replaces an order with a new order in a single call.
Replacement order created successfully.
Invalid request or order cannot be replaced.
POST /ap/CancelReplaceOrder HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 257
{
"omsId": 1,
"orderIdToReplace": 1,
"clientOrdId": 1,
"orderType": 1,
"side": 1,
"accountId": 1,
"instrumentId": 1,
"useDisplayQuantity": true,
"displayQuantity": 1,
"limitPrice": 1,
"stopPrice": 1,
"referencePrice": 1,
"pegPriceType": 1,
"timeInForce": 1,
"orderIdOCO": 1,
"quantity": 1
}
{
"replacementOrderId": 1,
"replacementClOrdId": 1,
"origOrderId": 1,
"origClOrdId": 1
}
Reduces an order’s quantity without affecting its position in the book.
Order modified successfully.
Modification failed due to validation or order state.
POST /ap/ModifyOrder HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 93
{
"OMSId": 1,
"OrderId": 1,
"InstrumentId": 1,
"PreviousOrderRevision": 1,
"Quantity": 1,
"AccountId": 1
}
{
"success": true,
"requestcode": "text"
}
Cancels an order using OrderId or ClientOrderId.
Order cancelled successfully.
Order cancellation failed due to invalid input or state.
POST /ap/CancelOrder HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"OMSId": 1,
"AccountId": 1,
"OrderId": 1,
"ClorderId": 1
}
{
"success": true,
"requestcode": "text"
}
Cancels all active orders for a specified account and OMS.
All orders cancelled successfully.
One or more orders could not be cancelled due to validation or status.
POST /ap/CancelAllOrders HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"AccountId": 1,
"OMSId": 1
}
{
"success": true,
"requestcode": "text"
}
Submits a new order with the specified parameters.
Order submission response
Bad request
POST /ap/SendOrder HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 201
{
"InstrumentId": 1,
"OMSId": 1,
"AccountId": 1,
"TimeInForce": 1,
"ClientOrderId": 1,
"OrderIdOCO": 1,
"UseDisplayQuantity": true,
"Side": 1,
"quantity": 1,
"OrderType": 1,
"PegPriceType": 1,
"LimitPrice": 1,
"PostOnly": true
}
{
"status": "text",
"errormsg": "text",
"OrderId": 1
}
Withdrawal fee estimate
Bad request - invalid or missing parameters
Unauthorized - authentication required
POST /ap/GetWithdrawFee HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 72
{
"OMSId": 1,
"AccountId": 1,
"ProductId": 1,
"Amount": 1,
"AccountProviderId": 1
}
{
"FeeAmount": 1,
"TicketAmount": 1
}
A list of account deposit transactions
Bad Request
Unauthorized
POST /ap/GetAccountDepositTransactions HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"OMSId": 1,
"AccountId": 1,
"Depth": 1
}
[
{
"transactionId": 1,
"omsId": 1,
"accountId": 1,
"cr": 1,
"dr": 1,
"counterparty": 1,
"transactionType": 1,
"referenceId": 1,
"referenceType": 1,
"productId": 1,
"balance": 1,
"timeStamp": 1
}
]
A list of account transactions
Bad Request
Unauthorized
POST /ap/GetAccountTransactions HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 217
{
"startIndex": 1,
"depth": 1,
"transactionId": 1,
"referenceId": 1,
"omsId": 1,
"accountId": 1,
"counterParty": 1,
"productId": 1,
"userId": 1,
"startTimestamp": 1,
"endTimestamp": 1,
"transactionTypes": [
1
],
"transactionReferenceTypes": [
1
]
}
[
{
"transactionId": 1,
"omsId": 1,
"accountId": 1,
"cr": 1,
"dr": 1,
"counterparty": 1,
"transactionType": 1,
"referenceId": 1,
"referenceType": 1,
"productId": 1,
"balance": 1,
"timeStamp": 1
}
]
ReceiveTime in POSIX format X 1000 (milliseconds since 1 January 1970)
A list of orders
Bad Request
Unauthorized
POST /ap/GetOrderHistory HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 190
{
"omsId": 1,
"accountId": 1,
"OrderId": 1,
"clientOrderId": 1,
"originalOrderId": 1,
"originalClientOrderId": 1,
"userId": 1,
"instrumentId": 1,
"startTimestamp": 1,
"endTimestamp": 1,
"depth": 1,
"startIndex": 1
}
[
{
"Side": "text",
"OrderId": 1,
"Price": 1,
"Quantity": 1,
"DisplayQuantity": 1,
"Instrument": 1,
"Account": 1,
"OrderType": "text",
"ClientOrderId": 1,
"OrderState": "text",
"ReceiveTime": 1,
"ReceiveTimeTicks": 1,
"OrigQuantity": 1,
"QuantityExecuted": 1,
"AvgPrice": 1,
"CounterPartyId": 1,
"ChangeReason": "text",
"OrigOrderId": 1,
"OrigClOrdId": 1,
"EnteredBy": 1,
"IsQuote": true,
"InsideAsk": 1,
"InsideAskSize": 1,
"InsideBid": 1,
"InsideBidSize": 1,
"LastTradePrice": 1,
"RejectReason": "text",
"IsLockedIn": true,
"CancelReason": "text",
"OMSId": 1
}
]
A list of account positions
Bad Request
Unauthorized
POST /ap/GetAccountPositions HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"AccountId": 1,
"OMSId": 1,
"IncludePending": true
}
[
{
"omsId": 1,
"accountId": 1,
"productSymbol": "text",
"productId": 1,
"amount": 1,
"hold": 1,
"pendingDeposits": 1,
"pendingWithdraws": 1,
"totalDayDeposits": 1,
"totalMonthDeposits": 1,
"totalYearDeposits": 1,
"totalYearDepositNotional": 1,
"totalDayWithdraws": 1,
"totalMonthWithdraws": 1,
"totalYearWithdraws": 1,
"totalYearWithdrawNotional": 1
}
]
A list of account trades
Bad Request
Unauthorized
POST /ap/GetAccountTrades HTTP/1.1
Host: apstage.proxy.kiiex.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 154
{
"omsId": 1,
"accountId": 1,
"instrumentId": 1,
"tradeId": 1,
"orderId": 1,
"userId": 1,
"startTimestamp": 1,
"endTimestamp": 1,
"depth": 1,
"startIndex": 1,
"executionId": 1
}
[
{
"omsId": 1,
"executionId": 1,
"tradeId": 1,
"orderId": 1,
"accountId": 1,
"subAccountId": 1,
"clientOrderId": 1,
"instrumentId": 1,
"side": 1,
"quantity": 1,
"remainingQuantity": 1,
"price": 1,
"value": 1,
"tradeTime": 1,
"counterParty": "text",
"orderTradeRevision": 1,
"direction": 1,
"isBlockTrade": true,
"tradeTimeMS": 1,
"fee": 1,
"feeProductId": 1,
"orderOriginator": 1
}
]