Query for orders currently active on the exchange. An order ID may be supplied to query for a specific order, if this query parameter is not supplied then all active orders will be returned.
This API allows clients to interact with the TrueX trading platform for order management, market data retrieval, and account information.
Certain API requests must be authenticated using HMAC-SHA256 signature authentication.
curl -i -X GET \
'https://docs.truex.co/_mock/rest/v1/api/v1/order/active?id=string' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-truex-auth-signature: string' \
-H 'x-truex-auth-timestamp: string' \
-H 'x-truex-auth-token: string' \
-H 'x-truex-auth-userid: string'
Successful operation.
The current status of the order.
A unique identifier created by the client. Must be in one the follower formats:
A unique identifier created by the client. Must be in one the follower formats:
Order quantity that has been acknowledge by the exchange but is not yet trading.
Volume weighted average price calculation for all executions on the order.
[ { "id": "0987654321", "status": "ACTIVE", "order": { … }, "modify": { … }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "1", "leaves_qty": "100", "exeuted_qty": "100", "executed_vwap": "897.321" } ]
curl -i -X GET \
'https://docs.truex.co/_mock/rest/v1/api/v1/order?query=string&size=10&skip=0' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-truex-auth-signature: string' \
-H 'x-truex-auth-timestamp: string' \
-H 'x-truex-auth-token: string' \
-H 'x-truex-auth-userid: string'
Successful operation.
The current status of the order.
A unique identifier created by the client. Must be in one the follower formats:
A unique identifier created by the client. Must be in one the follower formats:
Order quantity that has been acknowledge by the exchange but is not yet trading.
Volume weighted average price calculation for all executions on the order.
[ { "id": "0987654321", "status": "ACTIVE", "order": { … }, "modify": { … }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "1", "leaves_qty": "100", "exeuted_qty": "100", "executed_vwap": "897.321" } ]
Order new request context.
A unique identifier created by the client. Must be in one the follower formats:
UUID version 4 in its human readable form, with hypens, and in lowercase (e.g. 2adc09dd-d49f-41da-b3b8-30d01bb350fe).
ASCII character string that does not exceed 18 characters.
The client ID the order will be entered on behalf of.
The ID of the instrument the order will transact in.
The amount of base asset the order is requesting to tranasct.
The highest or lowest price the order will buy or sell, respectively, at. Only required for LIMIT orders.
Side of order, can be BUY
or SELL
Type of order, can be LIMIT
, MARKET
.
The "Time In Force" (TIF) of an order indicates how long the order will remain active before being canceled, can be GTC
, IOC
.
IOC
order will cancel any unfilled quantity back to the requestor. If no matching orders are found, the IOC
order will be canceled immediately. If the TIF is omitted, the order will default to GTC
.General order flags that can be combined and used together.
Execution specific instructions that can be combined and used together.
Order level self trade protection instruction.
curl -i -X POST \
https://docs.truex.co/_mock/rest/v1/api/v1/order \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-truex-auth-signature: string' \
-H 'x-truex-auth-timestamp: string' \
-H 'x-truex-auth-token: string' \
-H 'x-truex-auth-userid: string' \
-d '{
"external_id": "321e7654-e89b-42d4-a456-426614174000",
"info": {
"client_id": "5432167890",
"instrument_id": "0987654321",
"qty": "10.5",
"price": "75.50",
"side": "BUY",
"type": "LIMIT",
"tif": "GTC",
"flags": [
"USE_AGGRESSIVE_PRICING"
],
"exec_inst_flags": [
"ALO"
],
"stp": "NONE"
}
}'
Successful operation.
The current status of the order.
A unique identifier created by the client. Must be in one the follower formats:
A unique identifier created by the client. Must be in one the follower formats:
Order quantity that has been acknowledge by the exchange but is not yet trading.
{ "id": "0987654321", "status": "ACTIVE", "order": { "client_id": "5432167890", "instrument_id": "0987654321", "qty": "10.5", "price": "75.50", "side": "BUY", "type": "LIMIT", "tif": "GTC", "flags": [ … ], "exec_inst_flags": [ … ], "stp": "NONE" }, "modify": { "client_id": "5432167890", "new_qty": "1.5", "new_price": "75.50", "new_type": "MARKET" }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "1", "leaves_qty": "100", "exeuted_qty": "100", "executed_vwap": "897.321" }
Order modify request context.
The internal order ID of the order to be modified. This is the id that was set by TrueX and should be a purely numeric string.
The external ID for the modification request set by the client. Must be in one the follower formats:
The client ID the modification will be entered on behalf of.
The new amount of base asset the order is requesting to tranasct.
The new highest or lowest price the order will buy or sell, respectively, at. Only required for LIMIT orders.
curl -i -X PATCH \
https://docs.truex.co/_mock/rest/v1/api/v1/order \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-truex-auth-signature: string' \
-H 'x-truex-auth-timestamp: string' \
-H 'x-truex-auth-token: string' \
-H 'x-truex-auth-userid: string' \
-d '{
"id": "1159718398822187014",
"external_id": "123e7654-e89b-42d4-a456-426614174000",
"info": {
"client_id": "5432167890",
"new_qty": "1.5",
"new_price": "75.50",
"new_type": "MARKET"
}
}'
Successful operation.
The current status of the order.
A unique identifier created by the client. Must be in one the follower formats:
A unique identifier created by the client. Must be in one the follower formats:
Order quantity that has been acknowledge by the exchange but is not yet trading.
{ "id": "0987654321", "status": "ACTIVE", "order": { "client_id": "5432167890", "instrument_id": "0987654321", "qty": "10.5", "price": "75.50", "side": "BUY", "type": "LIMIT", "tif": "GTC", "flags": [ … ], "exec_inst_flags": [ … ], "stp": "NONE" }, "modify": { "client_id": "5432167890", "new_qty": "1.5", "new_price": "75.50", "new_type": "MARKET" }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "1", "leaves_qty": "100", "exeuted_qty": "100", "executed_vwap": "897.321" }
curl -i -X DELETE \
'https://docs.truex.co/_mock/rest/v1/api/v1/order/{ref_order_id}' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-truex-auth-signature: string' \
-H 'x-truex-auth-timestamp: string' \
-H 'x-truex-auth-token: string' \
-H 'x-truex-auth-userid: string'
Successful operation.
The current status of the order.
A unique identifier created by the client. Must be in one the follower formats:
A unique identifier created by the client. Must be in one the follower formats:
Order quantity that has been acknowledge by the exchange but is not yet trading.
{ "id": "0987654321", "status": "ACTIVE", "order": { "client_id": "5432167890", "instrument_id": "0987654321", "qty": "10.5", "price": "75.50", "side": "BUY", "type": "LIMIT", "tif": "GTC", "flags": [ … ], "exec_inst_flags": [ … ], "stp": "NONE" }, "modify": { "client_id": "5432167890", "new_qty": "1.5", "new_price": "75.50", "new_type": "MARKET" }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "1", "leaves_qty": "100", "exeuted_qty": "100", "executed_vwap": "897.321" }