Orders
The Orders API allows you to create, cancel, and retrieve orders for a customer. You can also create batch orders for multiple customers.
POST/v1/orders
Create Order
Use this endpoint to create an order on behalf of a customer.
Request Body
Parameter | Description | Type | Input |
---|---|---|---|
customerId | Unique ID for the customer | UUID | Required |
portfolioId | Unique ID for the portfolio | UUID | Required |
custodianId | Unique ID for the custodianId | UUID | Required |
type | Type of order (either "LIMIT" or "MARKET") | String | Required |
limitPrice | Limit price for the order | Number | Required (only when type is "LIMIT") |
quantity | Quantity for the order | Number | Required |
side | Side of order (either "BUY" or "SELL") | String | Required |
solicited | Specifies if the order is solicited | Boolean | Required |
symbol | Symbol for the order | String | Required |
timeInForce | Time in force for the order (either "DAY" or "GTC") | String | Required |
Success Response
JSON
201 Created{
"createdAt": "2024-03-05T23:56:56.890Z",
"updatedAt": "2024-03-05T23:57:00.488Z",
"orderId": "9ab59a5e-9cae-44e6-9cc5-734ef688b453",
"custodianOrderId": "9aa2e6da-e9fe-43d0-82df-5c28d4e04aa6",
"customerId": "014f3054-fac3-47cc-a167-1de0cc1deeb6",
"portfolioId": "4b3cacdf-f715-4663-a2c9-2f3d1a4fbcc2",
"averageFilledPrice": null,
"quantity": 1,
"side": "BUY",
"solicited": false,
"symbol": "CVS",
"timeInForce": "DAY",
"type": "MARKET",
"limitPrice": null,
"status": "CREATED",
"message": "Order created successfully",
"reservedAmount": 76.88
}
GET/v1/orders/{orderId}
Get Order
Use this endpoint to retrieve an order for a customer.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
orderId | Unique ID for the order | UUID | Required |
Success Response
JSON
200 OK{
"createdAt": "2024-03-05T23:56:56.890Z",
"updatedAt": "2024-03-05T23:57:00.488Z",
"orderId": "9ab59a5e-9cae-44e6-9cc5-734ef688b453",
"custodianOrderId": "9aa2e6da-e9fe-43d0-82df-5c28d4e04aa6",
"customerId": "014f3054-fac3-47cc-a167-1de0cc1deeb6",
"portfolioId": "4b3cacdf-f715-4663-a2c9-2f3d1a4fbcc2",
"averageFilledPrice": null,
"quantity": 1,
"side": "BUY",
"solicited": false,
"symbol": "CVS",
"timeInForce": "DAY",
"type": "LIMIT",
"limitPrice": 70.25,
"status": "CANCELED",
"message": "Order canceled successfully",
"reservedAmount": 76.88
}
GET/v1/orders?customerId={customerId}&page={page}&limit={limit}
Get Orders by Customer
Use this endpoint to retrieve all orders for a customer.
Query Parameters
Parameter | Description | Type | Input |
---|---|---|---|
customerId | Unique ID for the customer | UUID | Required |
page | Page number | Number | Optional |
limit | Number of items per page | Number | Optional |
Success Response
JSON
200 OK{
"orders": [
{
"createdAt": "2024-04-27T12:39:56.175Z",
"updatedAt": "2024-04-27T12:39:56.175Z",
"orderId": "953a9190-f769-426f-a908-c0e106cdb248",
"custodianOrderId": "f835df20-4234-420b-b9e2-2954389c9623",
"customerId": "014f3054-fac3-47cc-a167-1de0cc1deeb6",
"portfolioId": "4b3cacdf-f715-4663-a2c9-2f3d1a4fbcc2",
"averageFilledPrice": 74.14,
"quantity": 1,
"side": "BUY",
"solicited": false,
"symbol": "CVS",
"timeInForce": "DAY",
"type": "MARKET",
"limitPrice": null,
"status": "FILLED",
"message": "Order filled successfully",
"reservedAmount": 76.88
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 10,
"hasMore": false
}
}
GET/v1/orders?correspondentId={correspondentId}&page={page}&limit={limit}
Get Orders by Correspondent
Use this endpoint to retrieve all orders for a correspondent.
Query Parameters
Parameter | Description | Type | Input |
---|---|---|---|
correspondentId | Unique ID for the correspondent | UUID | Required |
page | Page number | Number | Optional |
limit | Number of items per page | Number | Optional |
Success Response
JSON
200 OK{
"orders": [
{
"createdAt": "2024-04-27T12:39:56.175Z",
"updatedAt": "2024-04-27T12:39:56.175Z",
"orderId": "953a9190-f769-426f-a908-c0e106cdb248",
"custodianOrderId": "f835df20-4234-420b-b9e2-2954389c9623",
"customerId": "014f3054-fac3-47cc-a167-1de0cc1deeb6",
"portfolioId": "4b3cacdf-f715-4663-a2c9-2f3d1a4fbcc2",
"averageFilledPrice": 74.14,
"quantity": 1,
"side": "BUY",
"solicited": false,
"symbol": "CVS",
"timeInForce": "DAY",
"type": "MARKET",
"limitPrice": null,
"status": "FILLED",
"message": "Order filled successfully",
"reservedAmount": 76.88
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 10,
"hasMore": false
}
}
DELETE/v1/orders/{orderId}/cancel
Cancel Order
Use this endpoint to cancel an order. Only "PENDING" or "ACTIVE" orders can be canceled.
Path Parameters
Parameter | Description | Type | Input |
---|---|---|---|
orderId | Unique ID for the order | UUID | Required |
Success Response
JSON
200 OK{
"createdAt": "2024-03-05T23:56:56.890Z",
"updatedAt": "2024-03-05T23:57:00.488Z",
"orderId": "9ab59a5e-9cae-44e6-9cc5-734ef688b453",
"custodianOrderId": "9aa2e6da-e9fe-43d0-82df-5c28d4e04aa6",
"customerId": "014f3054-fac3-47cc-a167-1de0cc1deeb6",
"portfolioId": "4b3cacdf-f715-4663-a2c9-2f3d1a4fbcc2",
"averageFilledPrice": null,
"quantity": 1,
"side": "BUY",
"solicited": false,
"symbol": "CVS",
"timeInForce": "DAY",
"type": "LIMIT",
"limitPrice": 70.25,
"status": "CANCELED",
"message": "Order canceled successfully",
"reservedAmount": 76.88
}