API
Bot Positions
name get bot positions method get url https api whispertrades com v1 bots positions description 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 n nauth required read positions tab examples examples languages id bvaj0qebgjmixin 6jrc7 language curl code curl location g request get https api whispertrades com v1 bots positions number n header accept application json n header content type application json n header authorization bearer api token customlabel id ztczqv4juth7xefguf5i language nodejs code var request require request ; nvar options n method get n url https api whispertrades com v1 bots positions number n headers n accept application json n content type application json n authorization bearer api token n n ; nrequest options function error response n if error throw new error error ; n console log response body ; n ; n customlabel id f8w2pglxy52d7m1pdm2ee language javascript code var myheaders new headers ; nmyheaders append accept application json ; nmyheaders append content type application json ; nmyheaders append authorization bearer api token ; n nvar requestoptions n method get n headers myheaders n redirect follow n ; n nfetch https api whispertrades com v1 bots positions number requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel id 1vdlotynncxd1nzxxz7qg language python code import requests nimport json n nurl https api whispertrades com v1 bots positions number n nquery n bot string n status string n from date string n to date string n page integer n nheaders n accept application json n content type application json n authorization bearer api token n n nresponse requests request get url headers headers params query n nprint response text n customlabel selectedlanguageid bvaj0qebgjmixin 6jrc7 results languages id 23qvoxcl yfswcdh7qtlc language 200 customlabel code n success true n message n data n number s1tcakftmz n status closed n bot n name 0 dte 12 00 ccs n number 1yj351w9ey n n broker connection n broker tastytrade n name shared brokerage n number satfkaq8ka n account number 491857185 n net liquidation value 291851 29 n n is paper false n tags n symbol spxw n type call credit spread n entered at 2023 10 06t16 00 10 000000z n exited at 2023 10 06t19 53 18 000000z n entry bid 3 1500 n entry ask 3 4000 n entry price 3 3 n exit bid 0 0000 n exit ask 0 1000 n exit price 0 05 n broker fee 2 01 n current bid null n current mid null n current ask null n current profit null n current delta 0 0294 n current spx beta weight 10 51 n entry value 330 n exit value 5 n max risk 8500 00 n profit dollars 322 99 n starting balance 1676 80 n ending balance 1999 79 n underlying at entry 4302 03 n underlying at exit 4312 52 n vix at entry 17 75 n vix at exit 17 22 n legs n n status closed n type call n action sell to open n instrument spxw 100623c4325 n expiration date 2023 10 06 n days to expiration 0 n days to expiration at exit 0 n strike price 4325 0 n quantity 1 n quantity open 0 n entered at 2023 10 06t16 00 10 000000z n exited at 2023 10 06t19 53 18 000000z n entry bid 3 2000 n entry ask 3 4000 n entry price 3 35 n exit bid 0 0500 n exit ask 0 1000 n exit price 0 05 n current bid 0 0500 n current mid 0 0750 n current ask 0 1000 n current profit 327 50 n current delta 0 0294 n current spx beta weight 1 51 n profit dollars 330 00 n delta at entry 0 2085 n delta at exit 0 0289 n iv at entry 0 1768 n iv at exit 0 0514 n held to expiration null n assigned null n exercised null n n n status closed n type call n action buy to open n symbol spxw 100623c4410 n expiration date 2023 10 06 n days to expiration 0 n days to expiration at exit 0 n strike price 4410 0 n quantity 1 n quantity open 0 n entered at 2023 10 06t16 00 10 000000z n exited at 2023 10 06t19 53 18 000000z n entry bid 0 0000 n entry ask 0 0500 n entry price 0 05 n exit bid 0 0000 n exit ask 0 0500 n exit price 0 n current bid 0 0000 n current mid 0 0250 n current ask 0 0500 n current profit 2 50 n current delta 0 0000 n current spx beta weight 11 00 n profit dollars 5 00 n delta at entry 0 0000 n delta at exit 0 0000 n iv at entry 0 0466 n iv at exit 0 0576 n held to expiration null n assigned null n exercised null n n n n selectedlanguageid 23qvoxcl yfswcdh7qtlc request pathparameters name number kind optional type string description unique identifier to retrieve a single position if omitted all positions will be returned children queryparameters name bot kind optional type string description bot number to only retrieve positions for a specific bot children name status kind optional type string description filter the results by a certain position status expected values are open or closed children name from date kind optional type string description minimum date for position entry expected format is yyyy mm dd children name to date kind optional type string description maximum date for position entry expected format is yyyy mm dd children name page kind optional type string description page number children headerparameters name api token kind required type string description token from your whispertrades account children bodydataparameters formdataparameters currentnewparameter label query parameter value queryparameters name close bot position method put url https api whispertrades com v1 bots positions number close description close a specific bot position this is only valid during market hours and while the bot is set to enabled or disable on close n nauth required write positions tab examples examples languages id bvaj0qebgjmixin 6jrc7 language curl code curl location g request put https api whispertrades com v1 bots positions number close n header accept application json n header content type application json n header authorization bearer api token customlabel id ztczqv4juth7xefguf5i language nodejs code var request require request ; nvar options n method put n url https api whispertrades com v1 bots positions number close n headers n accept application json n content type application json n authorization bearer api token n n ; nrequest options function error response n if error throw new error error ; n console log response body ; n ; n customlabel id f8w2pglxy52d7m1pdm2ee language javascript code var myheaders new headers ; nmyheaders append accept application json ; nmyheaders append content type application json ; nmyheaders append authorization bearer api token ; n nvar requestoptions n method put n headers myheaders n redirect follow n ; n nfetch https api whispertrades com v1 bots positions number close requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel id 1vdlotynncxd1nzxxz7qg language python code import requests nimport json n nurl https api whispertrades com v1 bots positions number close n nheaders n accept application json n content type application json n authorization bearer api token n n nresponse requests request put url headers headers params query n nprint response text n customlabel selectedlanguageid bvaj0qebgjmixin 6jrc7 results languages id 23qvoxcl yfswcdh7qtlc language 200 customlabel code n success true n message close position initiated n data n number s1tcakftmz n status open n bot n name 0 dte 12 00 ccs n number 1yj351w9ey n n broker connection n name personal n number satykfajqa n account number 938278493 n n is paper false n tags n symbol spxw n type call credit spread n entered at 2023 10 06t16 00 10 000000z n exited at null n entry bid 3 1500 n entry ask 3 4000 n entry price 3 3 n exit bid null n exit ask null n exit price null n broker fee 2 01 n current bid 1 05 n current mid 1 10 n current ask 1 15 n current profit 220 00 n current delta 0 0294 n entry value 330 n exit value 5 n max risk 8500 00 n profit dollars null n starting balance 0 00 n ending balance 0 00 n underlying at entry 4302 03 n underlying at exit null n vix at entry 17 75 n vix at exit null n legs n n status open n type call n action sell to open n instrument spxw 100623c4325 n expiration date 2023 10 06 n days to expiration 0 n days to expiration at exit null n strike price 4325 0 n quantity 1 n quantity open 1 n entered at 2023 10 06t16 00 10 000000z n exited at null n entry bid 3 2000 n entry ask 3 4000 n entry price 3 35 n exit bid 0 0500 n exit ask 0 1000 n exit price 0 05 n current bid 1 10 n current mid 1 15 n current ask 1 20 n current profit 222 50 n current delta 0 0294 n profit dollars null n delta at entry 0 2085 n delta at exit null n iv at entry 0 1768 n iv at exit null n held to expiration null n assigned null n exercised null n n n status open n type call n action buy to open n symbol spxw 100623c4410 n expiration date 2023 10 06 n days to expiration 0 n days to expiration at exit 0 n strike price 4410 0 n quantity 1 n quantity open 1 n entered at 2023 10 06t16 00 10 000000z n exited at null n entry bid 0 0000 n entry ask 0 0500 n entry price 0 05 n exit bid null n exit ask null n exit price null n current bid 0 0000 n current mid 0 0250 n current ask 0 0500 n current profit 2 50 n current delta 0 0000 n profit dollars 5 00 n delta at entry 0 0000 n delta at exit null n iv at entry 0 0466 n iv at exit null n held to expiration null n assigned null n exercised null n n n n selectedlanguageid 23qvoxcl yfswcdh7qtlc request pathparameters name number kind required type string description position number to close children queryparameters headerparameters name api token kind required type string description token from your whispertrades account children bodydataparameters formdataparameters currentnewparameter label query parameter value queryparameters