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).
Authorizations
Body
OMSIdintegerOptional
AccountIdintegerOptional
Responses
200
A list of open trade reports
application/json
400
Invalid request parameters
401
Unauthorized access
get
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.
Authorizations
Body
OMSIdintegerOptional
InstrumentIdintegerOptional
Responses
200
A list of open trade reports
application/json
400
Invalid request parameters
401
Unauthorized access
get
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.
Authorizations
Body
omsIdintegerRequired
orderIdToReplaceintegerRequired
clientOrdIdintegerRequired
orderTypeintegerOptional
sideintegerRequired
accountIdintegerRequired
instrumentIdintegerRequired
useDisplayQuantitybooleanOptional
displayQuantitynumberOptional
limitPricenumberOptional
stopPricenumberOptional
referencePricenumberOptional
pegPriceTypeintegerOptional
timeInForceintegerOptional
orderIdOCOintegerOptional
quantitynumberRequired
Responses
200
Replacement order created successfully.
application/json
400
Invalid request or order cannot be replaced.
application/json
post
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.
Authorizations
Body
OMSIdintegerRequired
OrderIdintegerRequired
InstrumentIdintegerRequired
PreviousOrderRevisionintegerRequired
QuantitynumberRequired
AccountIdintegerRequired
Responses
200
Order modified successfully.
application/json
400
Modification failed due to validation or order state.
application/json
post
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.
Authorizations
Body
OMSIdintegerRequired
AccountIdintegerRequired
OrderIdintegerOptional
ClorderIdintegerOptional
Responses
200
Order cancelled successfully.
application/json
400
Order cancellation failed due to invalid input or state.
application/json
post
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.
Authorizations
Body
AccountIdintegerRequired
OMSIdintegerRequired
Responses
200
All orders cancelled successfully.
application/json
400
One or more orders could not be cancelled due to validation or status.
application/json
post
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.
Authorizations
Body
InstrumentIdintegerRequired
OMSIdintegerRequired
AccountIdintegerRequired
TimeInForceintegerRequired
ClientOrderIdintegerRequired
OrderIdOCOintegerOptional
UseDisplayQuantitybooleanOptional
SideintegerRequired
quantitynumberRequired
OrderTypeintegerRequired
PegPriceTypeintegerOptional
LimitPricenumberOptional
PostOnlybooleanOptional
Responses
200
Order submission response
application/json
400
Bad request
post
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
}
Authorizations
Body
OMSIdintegerOptional
AccountIdintegerOptional
ProductIdintegerOptional
Amountnumber · floatOptional
AccountProviderIdintegerOptional
Responses
200
Withdrawal fee estimate
application/json
400
Bad request - invalid or missing parameters
application/json
401
Unauthorized - authentication required
application/json
post
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
}
Authorizations
Body
OMSIdintegerRequired
AccountIdintegerRequired
DepthintegerOptional
Responses
200
A list of account deposit transactions
application/json
400
Bad Request
401
Unauthorized
post
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
}
]
Authorizations
Body
startIndexintegerOptional
depthintegerOptional
transactionIdintegerOptional
referenceIdintegerOptional
omsIdintegerRequired
accountIdintegerRequired
counterPartyintegerOptional
productIdintegerOptional
userIdintegerOptional
startTimestampintegerOptional
endTimestampintegerOptional
transactionTypesinteger[]Optional
transactionReferenceTypesinteger[]Optional
Responses
200
A list of account transactions
application/json
400
Bad Request
401
Unauthorized
post
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)
Authorizations
Body
omsIdintegerRequired
accountIdintegerRequired
OrderIdintegerOptional
clientOrderIdintegerOptional
originalOrderIdintegerOptional
originalClientOrderIdintegerOptional
userIdintegerOptional
instrumentIdintegerOptional
startTimestampintegerRequired
endTimestampintegerRequired
depthintegerOptional
startIndexintegerOptional
Responses
200
A list of orders
application/json
400
Bad Request
401
Unauthorized
post
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
}
]
Authorizations
Body
AccountIdintegerOptional
OMSIdintegerOptional
IncludePendingbooleanOptional
Responses
200
A list of account positions
application/json
400
Bad Request
401
Unauthorized
post
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
}
]
Authorizations
Body
omsIdintegerOptional
accountIdintegerOptional
instrumentIdintegerOptional
tradeIdintegerOptional
orderIdintegerOptional
userIdintegerOptional
startTimestampintegerOptional
endTimestampintegerOptional
depthintegerOptional
startIndexintegerOptional
executionIdintegerOptional
Responses
200
A list of account trades
application/json
400
Bad Request
401
Unauthorized
post
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
}
]
Was this helpful?