API
Bot Variables
{ "name" "get bot variables", "method" "get", "url" "https //api whispertrades com/v1/bots/variables", "description" "get a single bot variable or a list of all variables\n\nauth required read variables", "tab" "examples", "examples" { "languages" \[ { "id" "5kj jcjh8spue1msr5psn", "language" "curl", "code" "curl location g request get 'https //api whispertrades com/v1/bots/variables/{number}' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n header 'authorization bearer \<api token>'", "customlabel" "" }, { "id" "xk0i eeta1n tdo1xgvvj", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api whispertrades com/v1/bots/variables/{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" "bcydw pgqbsanradwhvtq", "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/variables/{number}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "ei1pwrlgjzs480mj bl0x", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api whispertrades com/v1/bots/variables/{number}\\"\n\nquery = {\n 'number' 'string',\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" "ei1pwrlgjzs480mj bl0x" }, "results" { "languages" \[ { "id" "shee34nzxsu8ze vdajd9", "language" "200", "customlabel" "", "code" "{\n \\"success\\" true,\n \\"message\\" \\"\\",\n \\"data\\" {\n \\"number\\" \\"jfjapmkyxeu\\",\n \\"name\\" \\"long call hedge current profit\\",\n \\"bot\\" \\"long call hedge\\",\n \\"value\\" \\" 5232 50\\",\n \\"free text value\\" null,\n \\"last updated at\\" \\"2023 10 05t19 10 26 000000z\\",\n \\"conditions\\" \[\n {\n \\"condition\\" \\"earliest time of day\\",\n \\"value\\" \\"9 45 am\\"\n },\n ]\n },\n}" } ], "selectedlanguageid" "shee34nzxsu8ze vdajd9" }, "request" { "pathparameters" \[ { "name" "number", "kind" "optional", "type" "string", "description" "unique identifier for a specific variable to retrieve if omitted, all variables will be returned", "children" \[] } ], "queryparameters" \[], "headerparameters" \[ { "name" "api token", "kind" "required", "type" "string", "description" "token from your whispertrades account", "children" \[] } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } } { "name" "update bot variable", "method" "put", "url" "https //api whispertrades com/v1/bots/variables", "description" "change a bot variable name or free text value\n\nauth required write variables", "tab" "examples", "examples" { "languages" \[ { "id" "eswmg5jvageluzpelfmgr", "language" "curl", "code" "curl location request put 'https //api whispertrades com/v1/bots/variables/{number}' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data raw '{\\"name\\" \\"string\\",\\"value\\" \\"string\\"}' \\\\\n header 'authorization bearer \<api token>'", "customlabel" "" }, { "id" "s3il7tbv8h6bqyisjkhof", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'put',\n 'url' 'https //api whispertrades com/v1/bots/variables/{number}',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json',\n 'authorization' 'bearer \<api token>'\n },\n body json stringify({\n \\"name\\" \\"string\\",\n \\"value\\" \\"string\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" " qltzkboxcfpcx904 vm", "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 raw = json stringify({\n \\"name\\" \\"string\\",\n \\"value\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'put',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api whispertrades com/v1/bots/variables/{number}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "4qfxtormro r7v39cghtc", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api whispertrades com/v1/bots/variables/{number}\\"\n\npayload = json dumps({\n \\"name\\" \\"string\\",\n \\"value\\" \\"string\\"\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, data=payload)\n\nprint(response text)\n", "customlabel" "" } ], "selectedlanguageid" "4qfxtormro r7v39cghtc" }, "results" { "languages" \[ { "id" "rfbqevwo1yfg8gcseaox4", "language" "200", "customlabel" "", "code" "{\n \\"success\\" true,\n \\"message\\" \\"variable updated\\",\n \\"data\\" {\n \\"number\\" \\"ofxxakqzpe\\",\n \\"name\\" \\"allow entries\\",\n \\"bot\\" null,\n \\"value\\" \\"yes\\",\n \\"free text value\\" null,\n \\"last updated at\\" \\"2023 10 05t19 18 14 000000z\\",\n \\"conditions\\" \[]\n }\n}" } ], "selectedlanguageid" "rfbqevwo1yfg8gcseaox4" }, "request" { "pathparameters" \[ { "name" "number", "kind" "required", "type" "string", "description" "variable number to update", "children" \[] } ], "queryparameters" \[], "headerparameters" \[ { "name" "api token", "kind" "required", "type" "string", "description" "token from your whispertrades account", "children" \[] } ], "bodydataparameters" \[ { "name" "name", "kind" "optional", "type" "string", "description" "new name for the variable", "children" \[] }, { "name" "value", "kind" "optional", "type" "string", "description" "new free text value for the variable this is only valid if the variable is a \\"free text\\" type that is not associated with a bot", "children" \[] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } }