{"info":{"_postman_id":"19f3ceb2-2e77-74e8-d1f6-ba09b8624be5","name":"Stratumsphere API Docs","description":"Welcome to [Stratumsphere's](https://stratumsphere.io/) API documentation for customer application integrations.\n\nYou can use this API to integrate your in-house developed solutions to rent out miners and perform other operations allowed in the stratumsphere dashboard.\n\n# Authentication\n\nStratumsphere uses API keys to allow access to the API. You can find your API key [here](https://app.stratumsphere.io/account/integrations).\n\nStratumsphere expects the API key to be included in all API requests to the server in a header that looks like the following:\n\n`Authorization: API_KEY`\n\n ```You must replace `API_KEY` with your personal API key.```\n \n ## API Security Tips\n \n Think of your API key like a password:\n \n * Store it securely\n * Use valid HTTPS connections\n * Do not share it with anyone outside of your organization\n * Do not put it in any code on your website or in a URL that someone could find\n * If it's been compromised then change it immediately\n \n\nRefer to the [developers section](https://help.stratumsphere.io/en-us/category/developers-6dy2nl/) in the help center to get more info about integration.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Create Threshold Scheduler","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Has id\"] = jsonData.id > 0;"]}}],"id":"221cc5c9-595d-a413-04bd-bc674a6877e5","request":{"method":"POST","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Test_title\",\n\t\"location\": \"us-central\",\n\t\"coin\": \"SHA256\",\n\t\"type\": \"threshold\",\n\t\"workerNumberLimit\": \"2\",\n\t\"minerTolerance\": \"15\",\n\t\"pp_host\": \"stratum.antpool.com:3333\",\n\t\"pp_user\": \"workers_username\",\n\t\"pp_useWorkerPassword\": true,\n\t\"pp_password\": \"x\",\n\t\"pp_enableExtranonceSubscribe\": true,\n\t\"pp_appendWorkerNames\": true,\n\t\"pp_workerNameSeparator\": true,\n\t\"pp_failoverHost\": \"stratum.antpool.com:443\",\n\t\"pp_failoverUser\": \"workers_username\",\n\t\"pp_failoverPassword\": \"x\"\n}"},"url":"{{host}}/v1/schedulers","description":"This endpoint will create a scheduler with the given attributes.\n\n*Algorithms:*\n- SHA256\n- X11\n- scrypt\n- ethash\n\n*Locations:*\n- us-central\n- europe"},"response":[],"_postman_id":"221cc5c9-595d-a413-04bd-bc674a6877e5"},{"name":"Create Worker-to-Worker Scheduler","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Has id\"] = jsonData.id > 0;"]}}],"id":"ed541797-4a0f-f426-18dd-2449789676bb","request":{"method":"POST","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Test_title\",\n\t\"location\": \"us-central\",\n\t\"coin\": \"SHA256\",\n\t\"type\": \"miners\",\n\t\"workerNumberLimit\": \"50\",\n\t\"minerTolerance\": \"15\",\n\t\"pp_host\": \"stratum.antpool.com:3333\",\n\t\"pp_user\": \"workers_username\",\n\t\"pp_useWorkerPassword\": true,\n\t\"pp_password\": \"x\",\n\t\"pp_enableExtranonceSubscribe\": true,\n\t\"pp_appendWorkerNames\": true,\n\t\"pp_workerNameSeparator\": true,\n\t\"pp_failoverHost\": \"stratum.antpool.com:443\",\n\t\"pp_failoverUser\": \"workers_username\",\n\t\"pp_failoverPassword\": \"x\"\n}"},"url":"{{host}}/v1/schedulers","description":"This endpoint will create a scheduler with the given attributes.\n\n*Algorithms:*\n- SHA256\n- X11\n- scrypt\n- ethash\n\n*Locations:*\n- us-central\n- europe"},"response":[],"_postman_id":"ed541797-4a0f-f426-18dd-2449789676bb"},{"name":"List Schedulers","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;"]}}],"id":"d9ed6786-c3d7-f7d6-2e85-f605d018522c","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"MyPool\",\n\t\"location\": \"USA SEATTLE\",\n\t\"domain\": \"www.blockgen.com\",\n\t\"coin\": \"litecoin\"\n}"},"url":"{{host}}/v1/schedulers","description":"This endpoint will list all the available schedulers."},"response":[],"_postman_id":"d9ed6786-c3d7-f7d6-2e85-f605d018522c"},{"name":"Scheduler Details","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Has id\"] = jsonData.id > 0;"]}}],"id":"bf3d61c2-458d-f1bc-64c1-7b776427c9bc","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"MyPool\",\n\t\"location\": \"USA SEATTLE\",\n\t\"domain\": \"www.blockgen.com\",\n\t\"coin\": \"litecoin\"\n}"},"url":"{{host}}/v1/schedulers/{{scheduler_id}}","description":"This endpoint can be used to fetch a scheduler's details specified by the scheduler's name."},"response":[],"_postman_id":"bf3d61c2-458d-f1bc-64c1-7b776427c9bc"},{"name":"Restart Scheduler","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;","","var jsonData = JSON.parse(responseBody);","tests[\"Has id\"] = jsonData.id > 0;"]}}],"id":"c910b4bb-134d-40bd-348a-f99b72752714","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[]},"url":"{{host}}/v1/schedulers/{{scheduler_id}}/restart-service/hash-scheduler","description":"This endpoint can trigger a restart on the scheduler, specified by the scheduler's name,\n\n_Use this endpoint very carefully as it will cause slight downtime on the scheduler and a fluctuation in the hashrate of the connected workers._"},"response":[],"_postman_id":"c910b4bb-134d-40bd-348a-f99b72752714"},{"name":"Start Scheduler","id":"df96f508-e166-d321-7c08-5064af79a9a3","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[]},"url":"{{host}}/v1/schedulers/{{scheduler_id}}/start-service/hash-scheduler","description":"This endpoint can be used to start a scheduler that is stopped for a reason, specified by the scheduler's name."},"response":[],"_postman_id":"df96f508-e166-d321-7c08-5064af79a9a3"},{"name":"Stop Scheduler","id":"1ea066b4-5e79-ea14-84d9-efb90dbcd372","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[]},"url":"{{host}}/v1/schedulers/{{scheduler_id}}/stop-service/hash-scheduler","description":"This endpoint can be used to stop a scheduler. This endpoint should not be triggered under normal circumstances. It should only be triggered if it is absolutely necessary to stop a scheduler."},"response":[],"_postman_id":"1ea066b4-5e79-ea14-84d9-efb90dbcd372"},{"name":"Refresh Worker Status","id":"47344c97-4a02-8764-494a-05dd3117df8f","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n}"},"url":"{{host}}/v1/scheduler/{{scheduler_id}}/worker/{{worker_name}}","description":"This endpoint can be used to get the worker stats in real-time. It will update the values in the database and return the data in response.\n\nSince it brings the real-time data from the worker it can tend to be slower but more accurate. If faster response time is required it is preffered to use the *Worker Details* endpoint."},"response":[],"_postman_id":"47344c97-4a02-8764-494a-05dd3117df8f"},{"name":"List Workers","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is 200\"] = responseCode.code === 200;"]}}],"id":"7efb3c26-88d0-4244-a949-30e57a8175f8","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"MyPool\",\n\t\"location\": \"USA SEATTLE\",\n\t\"domain\": \"www.blockgen.com\",\n\t\"coin\": \"litecoin\"\n}"},"url":{"raw":"{{host}}/v1/scheduler/{{scheduler_id}}/scheduler-workers?page=1&sort=workerName&dir=ASC","host":["{{host}}"],"path":["v1","scheduler","{{scheduler_id}}","scheduler-workers"],"query":[{"key":"page","value":"1"},{"key":"sort","value":"workerName"},{"key":"dir","value":"ASC"}]},"description":"This endpoint can be used to list all the workers specified by the Scheduler's name. It also accepts paging and sorting parameters."},"response":[],"_postman_id":"7efb3c26-88d0-4244-a949-30e57a8175f8"},{"name":"Rebaseline Worker","id":"b6208fae-4258-78a7-2726-7e0b1246cc2e","request":{"method":"POST","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{host}}/v1/scheduler/{{scheduler_id}}/rebase-worker/{{worker_name}}","description":"This endpoint can be used to start the rebaselining process on a worker. By default workers are baselined when they are first connected to the scheduler. Baselined takes 3 hours by default and workers that are baselining cannot be pointed to rentals (They only mine to the personal pool set on the scheduler). \n\nThis endpoint should be called if the worker hashrate seems intuitively off from the baseline for a long interval of time or the hardware is repaired/replaced under the same worker name."},"response":[],"_postman_id":"b6208fae-4258-78a7-2726-7e0b1246cc2e"},{"name":"Worker Details","id":"af528b01-3a27-25d6-998e-ad695335ed2e","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"MyPool\",\n\t\"location\": \"USA SEATTLE\",\n\t\"domain\": \"www.blockgen.com\",\n\t\"coin\": \"litecoin\"\n}"},"url":"{{host}}/v1/scheduler/{{scheduler_id}}/scheduler-worker/{{worker_name}}","description":"This endpoint will return a worker's details specified by the scheduler and worker's name."},"response":[],"_postman_id":"af528b01-3a27-25d6-998e-ad695335ed2e"},{"name":"Create Threshold Rental","id":"b3034a32-0b32-f9b9-5157-840cfac5c835","request":{"method":"POST","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"PoolToBeDeleted2\",\n    \"host\" : \"stratum.antpool.com:3333\",\n    \"user\": \"sample_username\",\n    \"password\" : \"x\",\n    \"isPersonal\": false,  \n    \"threshold\": 15000000,\n    \"tolerance\": 20,\n    \"useWorkerPassword\": true,\n    \"enableExtranonceSubscribe\": true,\n    \"appendWorkerNames\": true,\n    \"workerNameSeparator\": \".\",\n    \"failoverHost\": \"stratum.antpool.com:443\",\n    \"failoverUser\": \"sample_username\",\n    \"failoverPassword\": \"x\",\n    \"expiry\": \"2018-05-19T00:52:16.062Z\"\n}"},"url":"{{host}}/v1/scheduler/{{scheduler_id}}/scheduler-rentals","description":"This endpoint can be used to create a threshold rental on a scheduler.\n\n\n_Important: Threshold rentals can only be created on threshold schedulers i.e. `schedulerId` must be the id of a scheduler created with the type `threshold`. and should not be created on Worker-to-Worker Schedulers_\n\nTo create a threshold rental you need to specify a hashrate threshold threshold that's the hashrate that Stratumsphere will maintain on this rental. You also need to specify a tolerance tolerance with it. Tolerance is acceptable error range in percentage around the specified hashrate, it's preferred to keep the tolerance between 10% - 20%. Stratumsphere will automatically assign as many workers as needed to achieve and maintain this hashrate."},"response":[],"_postman_id":"b3034a32-0b32-f9b9-5157-840cfac5c835"},{"name":"Create Miner-to-Miner Rental","id":"506b91ba-a391-6ca6-16a6-71bc142f2568","request":{"method":"POST","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"PoolToBeDeleted3\",\n    \"host\" : \"stratum.antpool.com:3333\",\n    \"user\": \"sample_username\",\n    \"password\" : \"x\",\n    \"workerNumberMaintained\": 3,  \n    \"isPersonal\": false,\n    \"useWorkerPassword\": true,\n    \"enableExtranonceSubscribe\": true,\n    \"appendWorkerNames\": true,\n    \"workerNameSeparator\": \".\",\n    \"failoverHost\": \"stratum.antpool.com:443\",\n    \"failoverUser\": \"sample_username\",\n    \"failoverPassword\": \"x\",\n    \"expiry\": \"2018-05-19T00:52:16.062Z\"\n}"},"url":"{{host}}/v1/scheduler/{{scheduler_id}}/scheduler-rentals","description":"This endpoint can be used to create a Worker-to-Worker rental on a scheduler.\n\nTo create a Miner-to-Miner rental you need to specify number of workers `workerNumberMaintained`. That is the amount of workers that Stratumsphere will maintain on this rental.\n\n_Important: Important: Miner-to-Miner rentals can only be created on Miner-to-Miner schedulers i.e. `schedulerId` must be the id of a scheduler created with the type miners. Miner-to-Miner Rentals cannot be created on Threshold Schedulers_"},"response":[],"_postman_id":"506b91ba-a391-6ca6-16a6-71bc142f2568"},{"name":"Update Threshold Rental","id":"54c615a0-55d6-3476-914e-d46219e76faa","request":{"method":"PUT","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"PoolToBeDeleted5\",\n    \"host\" : \"stratum.antpool.com:3333\",\n    \"user\": \"sample_username\",\n    \"password\" : \"x\",\n    \"isPersonal\": false,  \n    \"threshold\": 15000000,\n    \"tolerance\": 20,\n    \"useWorkerPassword\": true,\n    \"enableExtranonceSubscribe\": true,\n    \"appendWorkerNames\": true,\n    \"workerNameSeparator\": \".\",\n    \"failoverHost\": \"stratum.antpool.com:443\",\n    \"failoverUser\": \"sample_username\",\n    \"failoverPassword\": \"x\",\n    \"expiry\": \"2018-05-19T00:52:16.062Z\"\n}"},"url":"{{host}}/v1/scheduler-rental/{{rental_id}}","description":"This endpoint can be used to update the settings on a Threshold rental. Specified by the Threshold Scheduler's name and rental name."},"response":[],"_postman_id":"54c615a0-55d6-3476-914e-d46219e76faa"},{"name":"Update Miner-to-Miner Rental","id":"4307d877-6fed-aaf8-651e-f910796ea5e4","request":{"method":"PUT","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"PoolToBeDeleted3\",\n    \"host\" : \"stratum.antpool.com:3333\",\n    \"user\": \"sample_username\",\n    \"password\" : \"x\",\n    \"workerNumberMaintained\": 15,  \n    \"isPersonal\": false,\n    \"useWorkerPassword\": true,\n    \"enableExtranonceSubscribe\": true,\n    \"appendWorkerNames\": true,\n    \"workerNameSeparator\": \".\",\n    \"failoverHost\": \"stratum.antpool.com:443\",\n    \"failoverUser\": \"sample_username\",\n    \"failoverPassword\": \"x\",\n    \"expiry\": \"2018-05-19T00:52:16.062Z\"\n}"},"url":"{{host}}/v1/scheduler-rental/{{rental_id}}","description":"This endpoint can be used to update the settings on a Worker-to-Worker rental. Specified by the Worker-to-Worker Scheduler's name and rental name."},"response":[],"_postman_id":"4307d877-6fed-aaf8-651e-f910796ea5e4"},{"name":"Delete Rental","id":"290b2455-913e-6ee2-5099-7e57326d8740","request":{"method":"DELETE","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{host}}/v1/scheduler-rental/{{rental_id}}","description":"This endpoint can be used to delete a rental, specified by the scheduler and rental name."},"response":[],"_postman_id":"290b2455-913e-6ee2-5099-7e57326d8740"},{"name":"List Rentals","id":"839a3764-1da0-95f2-a915-2d510a180e2a","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"MyPool\",\n\t\"location\": \"USA SEATTLE\",\n\t\"domain\": \"www.blockgen.com\",\n\t\"coin\": \"litecoin\"\n}"},"url":"{{host}}/v1/scheduler/{{scheduler_id}}/scheduler-rentals","description":"This endpoint will list all the rentals for a scheduler specified by the name."},"response":[],"_postman_id":"839a3764-1da0-95f2-a915-2d510a180e2a"},{"name":"Rental Details","id":"d871a233-4b3b-e560-afd6-06e41cf4a0f9","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"MyPool\",\n\t\"location\": \"USA SEATTLE\",\n\t\"domain\": \"www.blockgen.com\",\n\t\"coin\": \"litecoin\"\n}"},"url":"{{host}}/v1/scheduler-rental/{{rental_id}}","description":"This endpoint can be used to get the details of a rental specified by the scheduler and rental name."},"response":[],"_postman_id":"d871a233-4b3b-e560-afd6-06e41cf4a0f9"},{"name":"Rental Hashrate History for Graphs","id":"0caf7086-25dc-57e8-e9d6-349eec122bb1","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"MyPool\",\n  \"location\": \"USA SEATTLE\",\n  \"domain\": \"www.blockgen.com\",\n  \"coin\": \"litecoin\"\n}"},"url":"{{host}}/v1/scheduler-rental-hashrate/{{rental_id}}","description":"This endpoint can be used to get an array of rental hashrate history with timestamps from the rental specified by the scheduler ID and rental name. It's useful for creating graphs of the rental hashrate over time."},"response":[],"_postman_id":"0caf7086-25dc-57e8-e9d6-349eec122bb1"},{"name":"Provision Rental End User Access","id":"84d2bcf0-5b91-7caf-85b3-a24f6a407043","request":{"method":"POST","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"muddaser@blockgen.com\"\n}"},"url":"{{host}}/v1/scheduler-rental-sendlink/{{rental_id}}","description":"This endpoint can be used to provision rental access to the end users. It will send a link to the rental end-user portal to the specified email. "},"response":[],"_postman_id":"84d2bcf0-5b91-7caf-85b3-a24f6a407043"},{"name":"Revoke Rental End User Access","id":"1207240d-5320-ca7d-a76f-eb3012157101","request":{"method":"DELETE","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"muddaser@blockgen.com\"\n}"},"url":"{{host}}/v1/scheduler-rental/{{rental_id}}","description":"This endpoint can be used to revoke rental access to the end users based on the specified email and rental."},"response":[],"_postman_id":"1207240d-5320-ca7d-a76f-eb3012157101"},{"name":"Worker Hashrate History for Graphs","id":"e825635e-32dc-949d-ab48-20ad27e491b4","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"MyPool\",\n  \"location\": \"USA SEATTLE\",\n  \"domain\": \"www.blockgen.com\",\n  \"coin\": \"litecoin\"\n}"},"url":"{{host}}/v1/scheduler-rental-hashrate/{{rental_id}}","description":"This endpoint can be used to get an array of rental hashrate history with timestamps from the worker specified by the scheduler ID and the worker's name (remember to use the correct case since, worker names are case sensitive). It's useful for creating graphs of the worker hashrate over time."},"response":[],"_postman_id":"e825635e-32dc-949d-ab48-20ad27e491b4"},{"name":"List Rental End User Tokens","id":"acc4a936-df6a-4a13-d9fc-18b834f66960","request":{"method":"GET","header":[{"key":"authorization","value":"{{api_key}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"muddaser@blockgen.com\"\n}"},"url":"{{host}}/v1/scheduler-rental-links/{{rental_id}}","description":"This endpoint can be used to list all rental end user access tokens based on the specified rental Id."},"response":[],"_postman_id":"acc4a936-df6a-4a13-d9fc-18b834f66960"}],"event":[{"listen":"prerequest","script":{"id":"769d3e51-b010-4006-8420-754a8370c238","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"36c1084a-0bbf-440a-850c-871785ecebfe","type":"text/javascript","exec":[""]}}]}