Bot Orders
Updated May 8, 2024
GET
/v1/bots/orders
Get a paginated list of bot orders. Because of the large amount of data that this can return, results are paginated to 100 orders per page, listed by order creation date descending. There is an optional page parameter that you can use to return a specific page. The paginated result set will also return a 'pages' array that contains information about the number of items and pages. Auth Required: Read Orders
Path parameters
| number | string | Unique identifier to retrieve a single order. If omitted, all orders will be returned |
Query parameters
| bot | string | Bot number to only retrieve orders for a specific bot | |
| status | string | Filter the results by a certain order status. Expected values are WORKING, FILLED, CANCELED, REJECTED, EXPIRED | |
| from_date | string | Minimum date for when order is submitted. Expected format is YYYY-MM-DD | |
| to_date | string | Maximum date for when order is submitted. Expected format is YYYY-MM-DD | |
| page | Integer | Page number |
Header parameters
| API Token | string | required | Token from your Whispertrades account |
curl -X GET "https://api.whispertrades.com/v1/bots/orders" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "API Token: example"
const response = await fetch("https://api.whispertrades.com/v1/bots/orders", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"API Token": "example"
}
});
const data = await response.json();
console.log(data);
fetch("https://api.whispertrades.com/v1/bots/orders", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"API Token": "example"
}
})
.then((response) => response.json())
.then((data) => console.log(data));
import requests
response = requests.get(
"https://api.whispertrades.com/v1/bots/orders",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"API Token": "example"
},
)
data = response.json()
print(data)
Response · 200
{
"success": true,
"message": "",
"data": {
"number": "GZH7QT03FD",
"broker_order_number": "6270853416",
"status": "FILLED",
"type": "OPENING",
"duration": "GTC",
"bot": {
"name": "0 DTE 10:00 CCS",
"number": "AFKA95ZJFQ"
},
"is_paper": false,
"symbol": "SPXW",
"original_quantity": 1,
"current_quantity": 1,
"filled_quantity": 1,
"order_price": "2.05",
"fill_price": "2.15",
"broker_fee": "1.57",
"submitted_at": "2023-06-15T14:00:06.000000Z",
"filled_at": "2023-06-15T14:00:07.000000Z",
"canceled_at": null,
"legs": [
{
"number": 75745,
"type": "CALL",
"instrument": "SPXW_061523C4410",
"expiration_date": "2023-06-15T00:00:00.000000Z",
"strike_price": "4410.0",
"instruction": "SELL_TO_OPEN",
"quantity": 1,
"bid": "2.10",
"mid": "2.13",
"ask": "2.15"
},
{
"number": 75747,
"type": "CALL",
"instrument": "SPXW_061523C4500",
"expiration_date": "2023-06-15T00:00:00.000000Z",
"strike_price": "4500.0",
"instruction": "BUY_TO_OPEN",
"quantity": 1,
"bid": "0.00",
"mid": "0.03",
"ask": "0.05"
}
],
"submissions": [
{
"quantity": null,
"price": "2.0500",
"bid": "2.0000",
"mid": null,
"ask": "2.1500",
"submitted_at": "2023-06-15T14:00:06.000000Z"
}
],
"fills": [
{
"leg_number": 75745,
"quantity": 1,
"price": "2.2000",
"filled_at": "2023-06-15T14:00:07.000000Z",
"bid": "2.1000",
"mid": "2.1250",
"ask": "2.1500"
},
{
"leg_number": 75747,
"quantity": 1,
"price": "0.0500",
"filled_at": "2023-06-15T14:00:07.000000Z",
"bid": "0.0000",
"mid": "0.0250",
"ask": "0.0500"
}
]
}
}