{"openapi":"3.1.0","info":{"title":"HashStrike Partner API","version":"1.0.0","description":"Rent HashStrike hashrate for your own customers, paid from your prepaid balance. JSON only, snake_case names, money in whole sats, hashrate in TH/s, times in UTC. Every answer carries an X-Request-Id header. Keys belong on your server, never in a web page or an app. While the API is switched off every call answers 404 not_found.","contact":{"name":"HashStrike","email":"hashstrike@mineshop.eu","url":"https://hashstrike.mineshop.eu/developers"}},"servers":[{"url":"https://hashstrike.mineshop.eu/partner-api/v1"}],"tags":[{"name":"Public","description":"No key needed. Limited per IP address; answers may be cached for 30 seconds."},{"name":"Account","description":"Needs a key with the read scope."},{"name":"Rentals","description":"Needs a key: the rent scope to start a rental, the read scope to look at rentals."}],"paths":{"/status":{"get":{"operationId":"getStatus","summary":"Is the API up, are payments working, how much hashrate is free","description":"Never calls the payment server itself: payments_ok is the stored result of our own regular check.","tags":["Public"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This description of the API","description":"The OpenAPI 3.1 document you are reading. Its servers address is the configured base URL of the API.","tags":["Public"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/listings":{"get":{"operationId":"listListings","summary":"Every listing the marketplace page shows","description":"The ones you can rent now come first, then by id. The list is refreshed every 30 seconds and comes in one answer.","tags":["Public"],"security":[],"parameters":[{"name":"ref","in":"query","required":false,"description":"Your affiliate number (digits). It is added to rent_url as ?wpam_id=. Anything else is ignored.","schema":{"type":"string","pattern":"^[0-9]{1,10}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingList"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/listings/{id}":{"get":{"operationId":"getListing","summary":"One listing","description":"The same object as in the list.","tags":["Public"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of a listing from /listings.","schema":{"type":"integer","minimum":1}},{"name":"ref","in":"query","required":false,"description":"Your affiliate number (digits). It is added to rent_url as ?wpam_id=. Anything else is ignored.","schema":{"type":"string","pattern":"^[0-9]{1,10}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Listing"}}}},"404":{"description":"`not_found`: No such call, listing or rental. Also every call while the API is switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/listings/{id}/quote":{"get":{"operationId":"quoteListing","summary":"The exact price for a number of days and pieces","description":"Worked out the same way as on the website, from the listing as it is this second. A quote holds nothing: the rent call checks again.","tags":["Public"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of a listing from /listings.","schema":{"type":"integer","minimum":1}},{"name":"days","in":"query","required":true,"description":"Whole days.","schema":{"type":"integer","minimum":1,"maximum":365}},{"name":"quantity","in":"query","required":false,"description":"Pieces, up to max_quantity of the listing.","schema":{"type":"integer","minimum":1,"default":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"404":{"description":"`not_found`: No such call, listing or rental. Also every call while the API is switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`validation_failed`: A field is missing or invalid. Adds fields: the messages per field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/account":{"get":{"operationId":"getAccount","summary":"Who the key belongs to and what it may do","description":"The quickest way to test a key.","tags":["Account"],"security":[{"partnerKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"`invalid_key`: The key is missing, malformed, unknown, revoked or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`partner_not_active`: The partner account is not approved. `live_keys_not_enabled`: A live key was used while live keys are not enabled for this partner; test keys work. `ip_not_allowed`: The key has an allowlist and the call came from another address. `scope_missing`: The key does not have the scope the call needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/balance":{"get":{"operationId":"getBalance","summary":"The prepaid balance and the daily spend caps","description":"Read only. The balance is topped up on the wallet page of the account.","tags":["Account"],"security":[{"partnerKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"`invalid_key`: The key is missing, malformed, unknown, revoked or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`partner_not_active`: The partner account is not approved. `live_keys_not_enabled`: A live key was used while live keys are not enabled for this partner; test keys work. `ip_not_allowed`: The key has an allowlist and the call came from another address. `scope_missing`: The key does not have the scope the call needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rentals":{"get":{"operationId":"listRentals","summary":"Your rentals, newest first","description":"Only rentals started through the API by this account. Rows carry delivery.delivered_pct only; read one rental for the other delivery figures.","tags":["Rentals"],"security":[{"partnerKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"description":"Only rentals in this status.","schema":{"type":"string","enum":["pending","active","finished","refunded","cancelled","disputed"]}},{"name":"updated_since","in":"query","required":false,"description":"Only rentals changed at or after this time. An ISO 8601 time with its zone, like 2026-11-17T09:00:00Z or 2026-11-17T11:00:00+02:00 (send + as %2B). Other forms, a bare date or words like yesterday, answer 422.","schema":{"type":"string","format":"date-time","maxLength":40,"pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,6})?)?(Z|[+-]\\d{2}:\\d{2})$"}},{"name":"limit","in":"query","required":false,"description":"Rows per page.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","required":false,"description":"next_cursor of the answer before. It works only for the account it was given to.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalList"}}}},"401":{"description":"`invalid_key`: The key is missing, malformed, unknown, revoked or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`partner_not_active`: The partner account is not approved. `live_keys_not_enabled`: A live key was used while live keys are not enabled for this partner; test keys work. `ip_not_allowed`: The key has an allowlist and the call came from another address. `scope_missing`: The key does not have the scope the call needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`validation_failed`: A field is missing or invalid. Adds fields: the messages per field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createRental","summary":"Start a rental paid from your balance","description":"The rental is paid in full from the balance and starts right after the call. It cannot be cancelled. Hashrate that was not delivered is refunded to the balance by itself when the rental is settled. Send the same body again under the same reference and you get the first rental back (HTTP 200, \"replayed\": true): nothing is rented or charged twice. The same reference with any other field changed (dry_run aside) answers 409 reference_reused. After a timeout or a 5xx, repeat the same call or read GET /rentals/{reference}; never send the order under a new reference unless the read answers 404. With dry_run true, or with a test key, every check runs and nothing is rented: the answer is 200 with the dry-run object.","tags":["Rentals"],"security":[{"partnerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalRequest"}}}},"responses":{"200":{"description":"Either the rental this reference already has, with \"replayed\": true (nothing was charged again), or the answer of a dry run.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Rental"},{"$ref":"#/components/schemas/DryRun"}]}}}},"201":{"description":"The rental was created, paid and started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rental"}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, or not a JSON object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`invalid_key`: The key is missing, malformed, unknown, revoked or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_balance`: The balance does not cover the rental. Adds required_sats and available_sats.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`partner_not_active`: The partner account is not approved. `live_keys_not_enabled`: A live key was used while live keys are not enabled for this partner; test keys work. `ip_not_allowed`: The key has an allowlist and the call came from another address. `scope_missing`: The key does not have the scope the call needs. `spend_cap_reached`: The rental would take the account or the key over its daily spend cap. `rentals_disabled`: Starting rentals is switched off, dry runs included.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: no listing with this listing_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`listing_unavailable`: The listing cannot be rented now: rented, paused, withdrawn, or its price just changed. `price_changed`: The rental costs more than max_total_sats. Adds total_sats, the price now. `reference_reused`: The reference already belongs to a rental with other content. `too_many_unpaid_reservations`: The account holds too many unpaid reservations made on the website.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`body_too_large`: The body is larger than 16 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"`unsupported_media_type`: The body was not sent as application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`validation_failed`: A field is missing or invalid. Adds fields: the messages per field. `invalid_address`: The address is not a valid address of the coin. `pool_unreachable`: The pool address does not resolve, is not public, or the pool did not accept a test connection. `below_minimum`: The total is below the smallest rental the marketplace sells. `own_listing`: The listing belongs to the partner account itself.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls, or too many pool tests in a short time or under way at once (a rental to your own pool is tested first; the pool was not tested, nothing was rented or charged). Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rentals/{reference}":{"get":{"operationId":"getRental","summary":"One rental by your own reference","description":"With all delivery figures. A reference of another account answers 404 like one that does not exist.","tags":["Rentals"],"security":[{"partnerKey":[]}],"parameters":[{"name":"reference","in":"path","required":true,"description":"The reference you sent with the order.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rental"}}}},"401":{"description":"`invalid_key`: The key is missing, malformed, unknown, revoked or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`partner_not_active`: The partner account is not approved. `live_keys_not_enabled`: A live key was used while live keys are not enabled for this partner; test keys work. `ip_not_allowed`: The key has an allowlist and the call came from another address. `scope_missing`: The key does not have the scope the call needs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: No such call, listing or rental. Also every call while the API is switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls. Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/rentals/{reference}/pool":{"post":{"operationId":"correctRentalPool","summary":"Correct the pool of a rental whose pool is not taking the work","description":"For a running rental to your own pool, only while our checks show that the pool is not taking the rig's work (you get a warning first, with the time the rental would stop). The new details are tested like those of a new rental: the pool must be reachable, accept the login and send work. Then the rig moves to them. The price, the length and the end of the rental never change, and nothing is charged. At most 3 corrections per rental and one per 10 minutes. With dry_run true, or a test key, everything is checked and nothing is changed: the answer is {\"dry_run\": true, \"reference\", \"rental\"}. The password is never sent back. pool.url, pool.worker and pool.password are replaced together: a pool.password that is left out does not keep the saved password, it becomes \"x\".","tags":["Rentals"],"security":[{"partnerKey":[]}],"parameters":[{"name":"reference","in":"path","required":true,"description":"The reference you sent with the order.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalPoolRequest"}}}},"responses":{"200":{"description":"The pool was changed: the rental with its new pool. For a dry run: {\"dry_run\": true, \"reference\", \"rental\"} and nothing was changed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Rental"},{"$ref":"#/components/schemas/RentalPoolDryRun"}]}}}},"400":{"description":"`invalid_request`: The body is not valid JSON, or not a JSON object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`invalid_key`: The key is missing, malformed, unknown, revoked or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`partner_not_active`: The partner account is not approved. `live_keys_not_enabled`: A live key was used while live keys are not enabled for this partner; test keys work. `ip_not_allowed`: The key has an allowlist and the call came from another address. `scope_missing`: The key does not have the scope the call needs. `rentals_disabled`: Rentals through the API are switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`not_found`: No rental of your account has this reference. Also while pool corrections are switched off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`body_too_large`: The body is larger than 16 KB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"`unsupported_media_type`: The body was not sent as application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"`validation_failed`: A field is missing or invalid, or the rental's pool cannot be changed now. Adds fields: the messages per field; fields.rental says why this rental's pool cannot be changed (its pool is not failing our checks, the rental is not running, it is not a rental to your own pool, or its 3 corrections are used). `pool_unreachable`: The pool address does not resolve, is not public, or the pool did not accept the test connection or sent no work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limited`: Too many calls, this rental's pool was changed less than 10 minutes ago, or too many pool tests in a short time or under way at once (the pool was not tested, nothing was changed). Wait the seconds in the Retry-After header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`server_error`: Something failed on our side (503 while the site is down for maintenance). Quote the request_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"partnerKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer hs_live_… or hs_test_…. A test key reads like a live key and never rents."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_key","insufficient_balance","partner_not_active","live_keys_not_enabled","ip_not_allowed","scope_missing","spend_cap_reached","rentals_disabled","not_found","method_not_allowed","listing_unavailable","price_changed","reference_reused","too_many_unpaid_reservations","body_too_large","unsupported_media_type","validation_failed","invalid_address","pool_unreachable","below_minimum","own_listing","rate_limited","server_error"],"x-http-status":{"invalid_request":400,"invalid_key":401,"insufficient_balance":402,"partner_not_active":403,"live_keys_not_enabled":403,"ip_not_allowed":403,"scope_missing":403,"spend_cap_reached":403,"rentals_disabled":403,"not_found":404,"method_not_allowed":405,"listing_unavailable":409,"price_changed":409,"reference_reused":409,"too_many_unpaid_reservations":409,"body_too_large":413,"unsupported_media_type":415,"validation_failed":422,"invalid_address":422,"pool_unreachable":422,"below_minimum":422,"own_listing":422,"rate_limited":429,"server_error":500},"description":"Decide by this. invalid_request (400): The body is not valid JSON, or not a JSON object. invalid_key (401): The key is missing, malformed, unknown, revoked or expired. insufficient_balance (402): The balance does not cover the rental. Adds required_sats and available_sats. partner_not_active (403): The partner account is not approved. live_keys_not_enabled (403): A live key was used while live keys are not enabled for this partner; test keys work. ip_not_allowed (403): The key has an allowlist and the call came from another address. scope_missing (403): The key does not have the scope the call needs. spend_cap_reached (403): The rental would take the account or the key over its daily spend cap. rentals_disabled (403): Starting rentals is switched off, dry runs included. not_found (404): No such call, listing or rental. Also every call while the API is switched off. method_not_allowed (405): The path exists for another method (see the Allow header). listing_unavailable (409): The listing cannot be rented now: rented, paused, withdrawn, or its price just changed. price_changed (409): The rental costs more than max_total_sats. Adds total_sats, the price now. reference_reused (409): The reference already belongs to a rental with other content. too_many_unpaid_reservations (409): The account holds too many unpaid reservations made on the website. body_too_large (413): The body is larger than 16 KB. unsupported_media_type (415): The body was not sent as application/json. validation_failed (422): A field is missing or invalid. Adds fields: the messages per field. invalid_address (422): The address is not a valid address of the coin. pool_unreachable (422): The pool address does not resolve, is not public, or the pool did not accept a test connection. below_minimum (422): The total is below the smallest rental the marketplace sells. own_listing (422): The listing belongs to the partner account itself. rate_limited (429): Too many calls. Wait the seconds in the Retry-After header. server_error (500): Something failed on our side (503 while the site is down for maintenance). Quote the request_id."},"message":{"type":"string","description":"Plain English, for a person. The wording can change; the code does not."},"request_id":{"type":"string","description":"Also in the X-Request-Id header. Quote it to support."},"fields":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Only with validation_failed: the messages per field name (pool fields as pool.url, pool.worker, pool.password)."},"total_sats":{"type":"integer","description":"Only with price_changed: what the rental costs now, in sats."},"required_sats":{"type":"integer","description":"Only with insufficient_balance: what the rental costs, in sats."},"available_sats":{"type":"integer","description":"Only with insufficient_balance: the balance, in sats."}}}},"description":"Every error has this shape."},"Status":{"type":"object","required":["api","payments_ok","market","time"],"properties":{"api":{"type":"string","enum":["ok"]},"payments_ok":{"type":"boolean","description":"True only while our last payment check is fresh and good."},"market":{"type":"object","required":["free_th","rented_th","free_count","rented_count"],"properties":{"free_th":{"type":"number","description":"TH/s that can be rented now."},"rented_th":{"type":"number","description":"TH/s in running rentals and reservations."},"free_count":{"type":"integer"},"rented_count":{"type":"integer"}}},"time":{"type":"string","format":"date-time","description":"UTC, like 2026-11-17T09:03:26Z."}}},"Price":{"type":"object","required":["sats_per_day","sats_per_th_day","usd_per_day"],"properties":{"sats_per_day":{"type":"integer","description":"List price of one piece for one day, before discounts. Whole sats."},"sats_per_th_day":{"type":["number","null"]},"usd_per_day":{"type":["number","null"],"description":"For display only. Null when we have no exchange rate."}}},"Listing":{"type":"object","required":["id","type","title","model","algorithm","hashrate_th","price","min_days","max_days","discounts","max_quantity","coins","available","available_from","stats","rent_url","updated_at"],"properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["rig","pooled"],"description":"rig: one machine, one rental at a time. pooled: a piece of a shared stream, several pieces can be rented."},"title":{"type":"string","description":"Plain text typed by the seller, at most 120 characters. Escape it before you put it into HTML."},"model":{"type":"string"},"algorithm":{"type":"string"},"hashrate_th":{"type":"number","description":"TH/s of one piece."},"price":{"$ref":"#/components/schemas/Price"},"min_days":{"type":"integer"},"max_days":{"type":"integer"},"discounts":{"type":"array","description":"Discounts for longer rentals. The quote applies them.","items":{"type":"object","required":["from_days","percent"],"properties":{"from_days":{"type":"integer"},"percent":{"type":"number"}}}},"max_quantity":{"type":"integer","description":"The most pieces one rental can take. 1 for a rig."},"coins":{"type":"array","items":{"type":"string","enum":["btc","bch"]}},"available":{"type":"boolean","description":"True when the marketplace page shows a rent button. The quote and the rent call check again."},"available_from":{"type":["string","null"],"format":"date-time","description":"For a rented rig: when its rental ends. Otherwise null."},"stats":{"type":"object","required":["rentals","avg_delivery_pct","seller_rating","best_share"],"properties":{"rentals":{"type":"integer"},"avg_delivery_pct":{"type":["number","null"]},"seller_rating":{"type":["number","null"]},"best_share":{"type":["string","null"]}},"description":"Figures the marketplace card shows. A pooled listing has only rentals."},"rent_url":{"type":"string","format":"uri","description":"The rent page of the listing on the website."},"updated_at":{"type":"string","format":"date-time","description":"UTC, like 2026-11-17T09:03:26Z."}}},"ListingList":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Listing"}},"next_cursor":{"type":"null","description":"Always null: the list comes in one answer."}}},"Quote":{"type":"object","required":["listing_id","days","quantity","total_sats","sats_per_day","list_sats_per_day","discount_percent","available","reason"],"properties":{"listing_id":{"type":"integer"},"days":{"type":"integer"},"quantity":{"type":"integer"},"total_sats":{"type":"integer","description":"What the rental costs: sats_per_day times days. Use it as max_total_sats."},"sats_per_day":{"type":"integer","description":"Per day for all pieces, after the discount."},"list_sats_per_day":{"type":"integer","description":"Per day for all pieces, before the discount."},"discount_percent":{"type":"number"},"available":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["rented","listing_unavailable","sales_paused","days_out_of_range","below_minimum","not_available_for_days",null],"description":"Null when available. rented: the rig has a rental. listing_unavailable: the listing is not verified. sales_paused: pooled sales are paused. days_out_of_range: outside min_days to max_days. below_minimum: the total is under the smallest rental we sell. not_available_for_days: the pooled stream cannot serve this size for this long. Checked in this order."}},"description":"The numbers are filled in also when the rental is not available."},"Account":{"type":"object","required":["partner","key","limits"],"properties":{"partner":{"type":"object","required":["name","status"],"properties":{"name":{"type":"string"},"status":{"type":"string","description":"approved, or the key would not work."}}},"key":{"type":"object","required":["name","mode","scopes","hint","expires_at"],"properties":{"name":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"scopes":{"type":"array","items":{"type":"string","enum":["read","rent"]}},"hint":{"type":"string","description":"The first 12 and the last 4 characters of the key."},"expires_at":{"type":["string","null"],"format":"date-time"}}},"limits":{"type":"object","required":["read_per_minute","write_per_minute","daily_spend_cap_sats","rentals_enabled"],"properties":{"read_per_minute":{"type":"integer"},"write_per_minute":{"type":"integer"},"daily_spend_cap_sats":{"type":"integer","description":"The lower of the account cap and the cap of this key."},"rentals_enabled":{"type":"boolean","description":"False while starting rentals is switched off for everyone."}}}}},"Balance":{"type":"object","required":["available_sats","daily_spend_cap_sats","spent_last_24h_sats","key_daily_spend_cap_sats","key_spent_last_24h_sats","spend_remaining_sats"],"properties":{"available_sats":{"type":"integer","description":"The prepaid balance of the account. Whole sats."},"daily_spend_cap_sats":{"type":"integer","description":"The most the account may spend on rentals in any 24 hours."},"spent_last_24h_sats":{"type":"integer","description":"Totals of the rentals the account started in the last 24 hours. A refund does not lower it."},"key_daily_spend_cap_sats":{"type":["integer","null"],"description":"The cap of this key, when it has one of its own."},"key_spent_last_24h_sats":{"type":"integer","description":"The same sum for rentals started with this key."},"spend_remaining_sats":{"type":"integer","description":"What this key may still spend now under the caps. The balance is a separate limit."}}},"Pool":{"type":"object","required":["url","worker"],"properties":{"url":{"type":"string","maxLength":300,"description":"stratum+tcp://host:port or stratum+ssl://host:port. It must be reachable from the internet."},"worker":{"type":"string","maxLength":200,"description":"The login at that pool."},"password":{"type":"string","maxLength":200,"writeOnly":true,"description":"Optional. Never returned by any call. Left out in POST /rentals/{reference}/pool, the saved password is not kept: it becomes \"x\"."}},"additionalProperties":false},"RentalRequest":{"type":"object","required":["reference","listing_id","days","address","max_total_sats"],"properties":{"reference":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$","description":"Your own order number: 1 to 64 letters, digits, dot, dash, underscore and colon, starting with a letter or digit. Compared exactly, capitals included. Send the same body again under the same reference and you get the first rental back (HTTP 200, \"replayed\": true): nothing is rented or charged twice. The same reference with any other field changed (dry_run aside) answers 409 reference_reused. After a timeout or a 5xx, repeat the same call or read GET /rentals/{reference}; never send the order under a new reference unless the read answers 404."},"listing_id":{"type":"integer","minimum":1,"description":"The id of a listing from /listings."},"days":{"type":"integer","minimum":1,"maximum":365,"description":"Whole days, within min_days and max_days of the listing."},"quantity":{"type":"integer","minimum":1,"maximum":1000,"default":1,"description":"Pieces of the listing, up to its max_quantity. Always 1 for a rig."},"coin":{"type":"string","enum":["btc","bch"],"default":"btc","description":"One of the coins of the listing."},"address":{"type":"string","maxLength":100,"description":"The address of your customer for that coin. A block reward is paid to it."},"worker_name":{"type":"string","maxLength":40,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,39}$","description":"A name for the worker on our solo pool, kept in lower case. We make one up when it is left out. Not used when you send pool."},"pool":{"$ref":"#/components/schemas/Pool"},"max_total_sats":{"type":"integer","minimum":1,"maximum":2100000000000000,"description":"The most this rental may cost, in sats. Take total_sats of the quote. Above it nothing is rented: 409 price_changed."},"dry_run":{"type":"boolean","default":false,"description":"True runs every check and rents nothing. A test key always does this."}},"additionalProperties":false,"description":"Fields not listed here are refused with 422 validation_failed (the unknown names in fields): a misspelt dry_run never becomes a real rental."},"RentalListing":{"type":"object","required":["id","title","type"],"properties":{"id":{"type":"integer"},"title":{"type":"string"},"type":{"type":"string","enum":["rig","pooled"]}}},"Mining":{"type":"object","required":["target","pool","login"],"properties":{"target":{"type":"string","enum":["solo","pool"],"description":"solo: the HashStrike solo pool of the coin. pool: the pool you named."},"pool":{"type":["string","null"],"description":"stratum+tcp://host:port or stratum+ssl://host:port of your pool. Null for solo."},"login":{"type":"string","description":"What the hashrate signs in with: address.worker on solo, the pool worker on your pool."}},"description":"Where the hashrate goes. The pool password is never part of it."},"Delivery":{"type":"object","required":["delivered_pct"],"properties":{"delivered_pct":{"type":"number","description":"Delivered so far, as a percentage of what was paid for."},"pace_pct":{"type":["number","null"]},"current_th":{"type":["number","null"]},"average_th":{"type":["number","null"]},"last_share_at":{"type":["string","null"],"format":"date-time"},"stale":{"type":"boolean","description":"True when no work has arrived for a while."}},"description":"GET /rentals/{reference} and the answer of POST /rentals carry all six figures. A row of GET /rentals carries delivered_pct only."},"Rental":{"type":"object","required":["reference","id","status","listing","hashrate_th","quantity","days","coin","total_sats","refund_sats","starts_at","ends_at","delivery","mining","tracking_url","created_at","updated_at"],"properties":{"reference":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$","description":"Your own order number, as you sent it."},"id":{"type":"string","description":"Our number of the rental, like P2P-20261117-ZK4K1OII."},"status":{"type":"string","enum":["pending","active","finished","refunded","cancelled","disputed"],"description":"pending: created, not paid yet. active: paid and running. finished: the time is over, or it is settled. refunded: it ended with money returned to the balance (see refund_sats). cancelled: it did not start, or we stopped it. disputed: under review by us."},"listing":{"$ref":"#/components/schemas/RentalListing"},"hashrate_th":{"type":"number","description":"Rented hashrate in TH/s, all pieces together."},"quantity":{"type":"integer","minimum":1},"days":{"type":"integer","minimum":1},"coin":{"type":"string","enum":["btc","bch"]},"total_sats":{"type":"integer","description":"What the rental cost, taken from the balance in full when it started. Whole sats."},"refund_sats":{"type":["integer","null"],"description":"Null until the rental is settled or refunded. Then what came back to the balance: for hashrate that was not delivered (0 when all was delivered), or the whole remaining amount when a dispute was refunded."},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"delivery":{"$ref":"#/components/schemas/Delivery"},"mining":{"$ref":"#/components/schemas/Mining"},"tracking_url":{"type":"string","format":"uri","description":"A HashStrike-branded page with live delivery, open to anyone who has the link. Show it to your customer or not, as you like."},"created_at":{"type":"string","format":"date-time","description":"UTC, like 2026-11-17T09:03:26Z."},"updated_at":{"type":"string","format":"date-time","description":"UTC, like 2026-11-17T09:03:26Z."},"replayed":{"type":"boolean","description":"Only in the answer of a repeated POST /rentals, and then true."}}},"RentalPreview":{"type":"object","required":["reference","listing","hashrate_th","quantity","days","coin","total_sats","mining"],"properties":{"reference":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$","description":"Your own order number, as you sent it."},"listing":{"$ref":"#/components/schemas/RentalListing"},"hashrate_th":{"type":"number","description":"Rented hashrate in TH/s, all pieces together."},"quantity":{"type":"integer","minimum":1},"days":{"type":"integer","minimum":1},"coin":{"type":"string","enum":["btc","bch"]},"total_sats":{"type":"integer","description":"What the rental cost, taken from the balance in full when it started. Whole sats."},"mining":{"$ref":"#/components/schemas/Mining"}},"description":"What a dry run would have rented. No id, status, dates or tracking link: nothing was created."},"DryRun":{"type":"object","required":["dry_run","reference","total_sats","balance_sufficient","available_sats","rental"],"properties":{"dry_run":{"type":"boolean","enum":[true]},"reference":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$","description":"Your own order number, as you sent it."},"total_sats":{"type":"integer","description":"What the rental would cost. Whole sats."},"balance_sufficient":{"type":"boolean","description":"True when available_sats covers total_sats."},"available_sats":{"type":"integer","description":"The balance of the account. Whole sats."},"rental":{"$ref":"#/components/schemas/RentalPreview"}},"description":"The answer of a dry run. Every check has run; nothing is reserved, paid or kept, and the reference stays free."},"RentalList":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rental"}},"next_cursor":{"type":["string","null"],"description":"Send it as cursor to get the next page. Null on the last page."}}},"RentalPoolRequest":{"type":"object","additionalProperties":false,"required":["pool"],"properties":{"pool":{"$ref":"#/components/schemas/Pool"},"dry_run":{"type":"boolean","default":false,"description":"true: check everything, the pool test included, and change nothing."}}},"RentalPoolDryRun":{"type":"object","required":["dry_run","reference","rental"],"properties":{"dry_run":{"type":"boolean","const":true},"reference":{"type":"string"},"rental":{"$ref":"#/components/schemas/Rental"}}}}}}