API
Bot Positions
Get a paginated list of bot positions. Because of the large amount of data that this can return, results are paginated to 100 positions per page, listed by position entry 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 Positions
GET
Request
Path Params
number
optional
String
Unique identifier to retrieve a single position. If omitted, all positions will be returned
Query Parameters
bot
optional
String
Bot number to only retrieve positions for a specific bot
status
optional
String
Filter the results by a certain position status. Expected values are OPEN or CLOSED
from_date
optional
String
Minimum date for position entry. Expected format is YYYY-MM-DD
to_date
optional
String
Maximum date for position entry. Expected format is YYYY-MM-DD
page
optional
String
Page number
Header Parameters
API Token
required
String
Token from your Whispertrades account
Curl
Node.js
JS
Python
1curl --location -g --request GET 'https://api.whispertrades.com/v1/bots/positions/{number}' \
2--header 'Accept: application/json' \
3--header 'Content-Type: application/json' \
4--header 'Authorization: Bearer <API Token>'
Responses
200
1{
2 "success": true,
3 "message": "",
4 "data": {
5 "number": "S1TCAKFTMZ",
6 "status": "CLOSED",
7 "bot": {
8 "name": "0 DTE 12:00 CCS",
9 "number": "1YJ351W9EY"
10 },
11 "broker_connection": {
12 "broker": "tastytrade",
13 "name": "Shared brokerage",
14 "number": "SATFKAQ8KA",
15 "account_number": "491857185",
16 "net_liquidation_value": "291851.29"
17 },
18 "is_paper": false,
19 "tags": "",
20 "symbol": "SPXW",
21 "type": "Call Credit Spread",
22 "entered_at": "2023-10-06T16:00:10.000000Z",
23 "exited_at": "2023-10-06T19:53:18.000000Z",
24 "entry_bid": "3.1500",
25 "entry_ask": "3.4000",
26 "entry_price": -3.3,
27 "exit_bid": "0.0000",
28 "exit_ask": "0.1000",
29 "exit_price": 0.05,
30 "broker_fee": "2.01",
31 "current_bid": null,
32 "current_mid": null,
33 "current_ask": null,
34 "current_profit": null,
35 "current_delta": "0.0294",
36 "current_spx_beta_weight": "10.51",
37 "entry_value": 330,
38 "exit_value": 5,
39 "max_risk": "8500.00",
40 "profit_dollars": "322.99",
41 "starting_balance": "1676.80",
42 "ending_balance": "1999.79",
43 "underlying_at_entry": 4302.03,
44 "underlying_at_exit": 4312.52,
45 "vix_at_entry": "17.75",
46 "vix_at_exit": "17.22",
47 "legs": [
48 {
49 "status": "CLOSED",
50 "type": "CALL",
51 "action": "SELL_TO_OPEN",
52 "instrument": "SPXW_100623C4325",
53 "expiration_date": "2023-10-06",
54 "days_to_expiration": 0,
55 "days_to_expiration_at_exit": 0,
56 "strike_price": "4325.0",
57 "quantity": 1,
58 "quantity_open": 0,
59 "entered_at": "2023-10-06T16:00:10.000000Z",
60 "exited_at": "2023-10-06T19:53:18.000000Z",
61 "entry_bid": "3.2000",
62 "entry_ask": "3.4000",
63 "entry_price": -3.35,
64 "exit_bid": "0.0500",
65 "exit_ask": "0.1000",
66 "exit_price": 0.05,
67 "current_bid": "0.0500",
68 "current_mid": "0.0750",
69 "current_ask": "0.1000",
70 "current_profit": "327.50",
71 "current_delta": "0.0294",
72 "current_spx_beta_weight": "-1.51",
73 "profit_dollars": "330.00",
74 "delta_at_entry": "0.2085",
75 "delta_at_exit": "0.0289",
76 "iv_at_entry": "0.1768",
77 "iv_at_exit": "0.0514",
78 "held_to_expiration": null,
79 "assigned": null,
80 "exercised": null
81 },
82 {
83 "status": "CLOSED",
84 "type": "CALL",
85 "action": "BUY_TO_OPEN",
86 "symbol": "SPXW_100623C4410",
87 "expiration_date": "2023-10-06",
88 "days_to_expiration": 0,
89 "days_to_expiration_at_exit": 0,
90 "strike_price": "4410.0",
91 "quantity": 1,
92 "quantity_open": 0,
93 "entered_at": "2023-10-06T16:00:10.000000Z",
94 "exited_at": "2023-10-06T19:53:18.000000Z",
95 "entry_bid": "0.0000",
96 "entry_ask": "0.0500",
97 "entry_price": 0.05,
98 "exit_bid": "0.0000",
99 "exit_ask": "0.0500",
100 "exit_price": -0,
101 "current_bid": "0.0000",
102 "current_mid": "0.0250",
103 "current_ask": "0.0500",
104 "current_profit": "-2.50",
105 "current_delta": "0.0000",
106 "current_spx_beta_weight": "11.00",
107 "profit_dollars": "-5.00",
108 "delta_at_entry": "0.0000",
109 "delta_at_exit": "0.0000",
110 "iv_at_entry": "0.0466",
111 "iv_at_exit": "0.0576",
112 "held_to_expiration": null,
113 "assigned": null,
114 "exercised": null
115 }
116 ]
117 }
118}
Close a specific bot position. This is only valid during market hours and while the bot is set to Enabled or Disable on Close.
Auth Required: Write Positions
PUT
Request
Path Params
number
required
String
Position number to close
Header Parameters
API Token
required
String
Token from your Whispertrades account
Curl
Node.js
JS
Python
1curl --location -g --request PUT 'https://api.whispertrades.com/v1/bots/positions/{number}/close' \
2--header 'Accept: application/json' \
3--header 'Content-Type: application/json' \
4--header 'Authorization: Bearer <API Token>'
Responses
200
1{
2 "success": true,
3 "message": "Close position initiated",
4 "data": {
5 "number": "S1TCAKFTMZ",
6 "status": "OPEN",
7 "bot": {
8 "name": "0 DTE 12:00 CCS",
9 "number": "1YJ351W9EY"
10 },
11 "broker_connection": {
12 "name": "Personal",
13 "number": "SATYKFAJQA",
14 "account_number": "938278493"
15 },
16 "is_paper": false,
17 "tags": "",
18 "symbol": "SPXW",
19 "type": "Call Credit Spread",
20 "entered_at": "2023-10-06T16:00:10.000000Z",
21 "exited_at": null,
22 "entry_bid": "3.1500",
23 "entry_ask": "3.4000",
24 "entry_price": -3.3,
25 "exit_bid": null,
26 "exit_ask": null,
27 "exit_price": null,
28 "broker_fee": "2.01",
29 "current_bid": "1.05",
30 "current_mid": "1.10",
31 "current_ask": "1.15",
32 "current_profit": "220.00",
33 "current_delta": "0.0294",
34 "entry_value": 330,
35 "exit_value": 5,
36 "max_risk": "8500.00",
37 "profit_dollars": null,
38 "starting_balance": "0.00",
39 "ending_balance": "0.00",
40 "underlying_at_entry": 4302.03,
41 "underlying_at_exit": null,
42 "vix_at_entry": "17.75",
43 "vix_at_exit": null,
44 "legs": [
45 {
46 "status": "OPEN",
47 "type": "CALL",
48 "action": "SELL_TO_OPEN",
49 "instrument": "SPXW_100623C4325",
50 "expiration_date": "2023-10-06",
51 "days_to_expiration": 0,
52 "days_to_expiration_at_exit": null,
53 "strike_price": "4325.0",
54 "quantity": 1,
55 "quantity_open": 1,
56 "entered_at": "2023-10-06T16:00:10.000000Z",
57 "exited_at": null,
58 "entry_bid": "3.2000",
59 "entry_ask": "3.4000",
60 "entry_price": -3.35,
61 "exit_bid": "0.0500",
62 "exit_ask": "0.1000",
63 "exit_price": 0.05,
64 "current_bid": "1.10",
65 "current_mid": "1.15",
66 "current_ask": "1.20",
67 "current_profit": "222.50",
68 "current_delta": "0.0294",
69 "profit_dollars": null,
70 "delta_at_entry": "0.2085",
71 "delta_at_exit": null,
72 "iv_at_entry": "0.1768",
73 "iv_at_exit": null,
74 "held_to_expiration": null,
75 "assigned": null,
76 "exercised": null
77 },
78 {
79 "status": "OPEN",
80 "type": "CALL",
81 "action": "BUY_TO_OPEN",
82 "symbol": "SPXW_100623C4410",
83 "expiration_date": "2023-10-06",
84 "days_to_expiration": 0,
85 "days_to_expiration_at_exit": 0,
86 "strike_price": "4410.0",
87 "quantity": 1,
88 "quantity_open": 1,
89 "entered_at": "2023-10-06T16:00:10.000000Z",
90 "exited_at": null,
91 "entry_bid": "0.0000",
92 "entry_ask": "0.0500",
93 "entry_price": 0.05,
94 "exit_bid": null,
95 "exit_ask": null,
96 "exit_price": null,
97 "current_bid": "0.0000",
98 "current_mid": "0.0250",
99 "current_ask": "0.0500",
100 "current_profit": "-2.50",
101 "current_delta": "0.0000",
102 "profit_dollars": "-5.00",
103 "delta_at_entry": "0.0000",
104 "delta_at_exit": null,
105 "iv_at_entry": "0.0466",
106 "iv_at_exit": null,
107 "held_to_expiration": null,
108 "assigned": null,
109 "exercised": null
110 }
111 ]
112 }
113}