API
Bot Orders
{ "name" "get bot orders", "method" "get", "url" "https //api whispertrades com/v1/bots/orders", "description" "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 \n\nauth required read orders", "tab" "examples", "examples" { "languages" \[ { "id" "bvaj0qebgjmixin 6jrc7", "language" "curl", "code" "curl location g request get 'https //api whispertrades com/v1/bots/orders/{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/orders/{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/orders/{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/orders/{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" "1vdlotynncxd1nzxxz7qg" }, "results" { "languages" \[ { "id" "23qvoxcl yfswcdh7qtlc", "language" "200", "customlabel" "", "code" "{\n \\"success\\" true,\n \\"message\\" \\"\\",\n \\"data\\" {\n \\"number\\" \\"gzh7qt03fd\\",\n \\"broker order number\\" \\"6270853416\\",\n \\"status\\" \\"filled\\",\n \\"type\\" \\"opening\\",\n \\"duration\\" \\"gtc\\",\n \\"bot\\" {\n \\"name\\" \\"0 dte 10 00 ccs\\",\n \\"number\\" \\"afka95zjfq\\"\n },\n \\"is paper\\" false,\n \\"symbol\\" \\"spxw\\",\n \\"original quantity\\" 1,\n \\"current quantity\\" 1,\n \\"filled quantity\\" 1,\n \\"order price\\" \\"2 05\\",\n \\"fill price\\" \\"2 15\\",\n \\"broker fee\\" \\"1 57\\",\n \\"submitted at\\" \\"2023 06 15t14 00 06 000000z\\",\n \\"filled at\\" \\"2023 06 15t14 00 07 000000z\\",\n \\"canceled at\\" null,\n \\"legs\\" \[\n {\n \\"number\\" 75745,\n \\"type\\" \\"call\\",\n \\"instrument\\" \\"spxw 061523c4410\\",\n \\"expiration date\\" \\"2023 06 15t00 00 00 000000z\\",\n \\"strike price\\" \\"4410 0\\",\n \\"instruction\\" \\"sell to open\\",\n \\"quantity\\" 1,\n \\"bid\\" \\"2 10\\",\n \\"mid\\" \\"2 13\\",\n \\"ask\\" \\"2 15\\"\n },\n {\n \\"number\\" 75747,\n \\"type\\" \\"call\\",\n \\"instrument\\" \\"spxw 061523c4500\\",\n \\"expiration date\\" \\"2023 06 15t00 00 00 000000z\\",\n \\"strike price\\" \\"4500 0\\",\n \\"instruction\\" \\"buy to open\\",\n \\"quantity\\" 1,\n \\"bid\\" \\"0 00\\",\n \\"mid\\" \\"0 03\\",\n \\"ask\\" \\"0 05\\"\n }\n ],\n \\"submissions\\" \[\n {\n \\"quantity\\" null,\n \\"price\\" \\"2 0500\\",\n \\"bid\\" \\"2 0000\\",\n \\"mid\\" null,\n \\"ask\\" \\"2 1500\\",\n \\"submitted at\\" \\"2023 06 15t14 00 06 000000z\\"\n }\n ],\n \\"fills\\" \[\n {\n \\"leg number\\" 75745,\n \\"quantity\\" 1,\n \\"price\\" \\"2 2000\\",\n \\"filled at\\" \\"2023 06 15t14 00 07 000000z\\",\n \\"bid\\" \\"2 1000\\",\n \\"mid\\" \\"2 1250\\",\n \\"ask\\" \\"2 1500\\"\n },\n {\n \\"leg number\\" 75747,\n \\"quantity\\" 1,\n \\"price\\" \\"0 0500\\",\n \\"filled at\\" \\"2023 06 15t14 00 07 000000z\\",\n \\"bid\\" \\"0 0000\\",\n \\"mid\\" \\"0 0250\\",\n \\"ask\\" \\"0 0500\\"\n }\n ]\n }\n}" } ], "selectedlanguageid" "23qvoxcl yfswcdh7qtlc" }, "request" { "pathparameters" \[ { "name" "number", "kind" "optional", "type" "string", "description" "unique identifier to retrieve a single order if omitted, all orders will be returned", "children" \[] } ], "queryparameters" \[ { "name" "bot", "kind" "optional", "type" "string", "description" "bot number to only retrieve orders for a specific bot", "children" \[] }, { "name" "status", "kind" "optional", "type" "string", "description" "filter the results by a certain order status expected values are working, filled, canceled, rejected, expired", "children" \[] }, { "name" "from date", "kind" "optional", "type" "string", "description" "minimum date for when order is submitted expected format is yyyy mm dd", "children" \[] }, { "name" "to date", "kind" "optional", "type" "string", "description" "maximum date for when order is submitted expected format is yyyy mm dd", "children" \[] }, { "name" "page", "kind" "optional", "type" "integer", "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" } }