Skip to main content
Developers / Partner API v1

Rent hashrate for your own customers.

The HashStrike Partner API lets your site or app rent Bitcoin hashrate from our marketplace. Your customer pays you. You pay us from a prepaid balance. A few plain JSON calls, test keys included.

What it is and how the money flows

You sell hashrate to your customer under your own name and price. When your customer orders, your server calls us, and we start the rental for the Bitcoin address or pool your customer gave you.

1Your customer pays you

In any way you like. We never see that payment.

2You pay us from your balance

Each rental is taken from your prepaid HashStrike balance, in sats.

3Hashrate starts at once

It mines for your customer's address or pool until the rental ends.

  • Your balance is prepaid. You top it up on the wallet page of your HashStrike account. The API cannot add to it.
  • A rental is paid in full when it starts. If the balance does not cover it, nothing is rented.
  • Hashrate that was not delivered is refunded. The refund goes back to your balance by itself when the rental is settled.
  • A rental cannot be cancelled. Not by a call and not on the website.

With a key you can read the rig list and prices, start a rental, and read your rentals and balance. Nothing else: a key cannot withdraw, deposit or change the account.

Getting access

  1. Create a HashStrike account and confirm your e-mail address.
  2. Turn on two-factor sign-in on the Security page of your account.
  3. Open Account → Partner API and send the short request form.
  4. When we approve it, create a test key on that page. It is shown once: copy it to your server. A test key reads like a live key and rents nothing, so you can build everything with it.
  5. When your integration works, tell us. We enable live keys for your account and e-mail you; then you create your live key on the same page.
  6. Add balance on the wallet page before your first live rental.

Base URL

https://hashstrike.mineshop.eu/partner-api/v1

HTTPS only. Everything is JSON with snake_case names. Money is whole sats. Hashrate is TH/s. Times are UTC like 2026-11-17T09:03:26Z. A list answers {"data": [...], "next_cursor": null}. Every answer carries an X-Request-Id header: quote it when you write to us.

Authentication

Send your key in the Authorization header of every call that needs one. This one is an example, not a real key:

Authorization: Bearer hs_test_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMP
  • Keys start with hs_live_ or hs_test_. A test key reads like a live key, and never rents and never spends.
  • A key has scopes: read (account, balance, rentals) and rent (start rentals).
  • A live key works only after we have enabled live keys for your account. Until then it answers 403 live_keys_not_enabled, and test keys work as usual.
  • A live key expires 180 days after you create it. We e-mail you 14, 3 and 1 day before. Press Rotate on your account page: you get the next key at once, and the old one keeps working for 24 hours while you swap it. An expired key answers invalid_key.
  • You can tie a key to the IP addresses of your server, when you create it or later on your account page. From any other address it answers ip_not_allowed.
  • Creating, rotating or revoking a key and changing its allowlist ask for your password and an authenticator code each time.
  • The rig list, quotes, status and the OpenAPI file need no key.

The calls

In the examples, $HASHSTRIKE_KEY is your key in an environment variable on your server. The answers are real answers from a test system: use the ids of your own /listings answer.

GET /status No key

Is the API up, are payments working, and how much hashrate is free right now. payments_ok is true only while our last payment check is fresh and good.

REQUEST
curl https://hashstrike.mineshop.eu/partner-api/v1/status
ANSWER
{
    "api": "ok",
    "payments_ok": true,
    "market": {
        "free_th": 35.5,
        "rented_th": 120,
        "free_count": 2,
        "rented_count": 1
    },
    "time": "2026-11-17T09:00:00Z"
}
GET /listings No key

Every listing the marketplace page shows, the ones you can rent now first. The list comes in one answer (next_cursor is always null). Add ?ref=<your affiliate number> and each rent_url carries it. Titles are plain text typed by sellers: escape them before you put them into a web page.

REQUEST
curl https://hashstrike.mineshop.eu/partner-api/v1/listings
ANSWER
{
    "data": [
        {
            "id": 214,
            "type": "rig",
            "title": "market-rig-cbdc194a",
            "model": "Antminer S21",
            "algorithm": "sha-256",
            "hashrate_th": 10,
            "price": {
                "sats_per_day": 1000,
                "sats_per_th_day": 100,
                "usd_per_day": 1
            },
            "min_days": 1,
            "max_days": 30,
            "discounts": [
                {
                    "from_days": 7,
                    "percent": 5
                },
                {
                    "from_days": 30,
                    "percent": 10
                }
            ],
            "max_quantity": 1,
            "coins": [
                "btc"
            ],
            "available": true,
            "available_from": null,
            "stats": {
                "rentals": 0,
                "avg_delivery_pct": null,
                "seller_rating": null,
                "best_share": null
            },
            "rent_url": "https://hashstrike.mineshop.eu/marketplace/rent/214",
            "updated_at": "2026-11-17T09:00:00Z"
        }
    ],
    "next_cursor": null
}
GET /listings/{id} No key

One listing: the same object as in the list. A listing the marketplace page does not show answers 404 not_found.

REQUEST
curl https://hashstrike.mineshop.eu/partner-api/v1/listings/214
GET /listings/{id}/quote No key

The exact price for a number of days (1 to 365) and pieces (1 when left out), worked out the same way as on the website. Use total_sats as max_total_sats when you rent. When the rental cannot be bought, available is false and reason says why; the numbers are filled in either way. A quote holds nothing: the rent call checks again.

REQUEST
curl "https://hashstrike.mineshop.eu/partner-api/v1/listings/301/quote?days=7&quantity=1"
ANSWER
{
    "listing_id": 301,
    "days": 7,
    "quantity": 1,
    "total_sats": 8862,
    "sats_per_day": 1266,
    "list_sats_per_day": 1333,
    "discount_percent": 5,
    "available": true,
    "reason": null
}
REASONWHAT IT MEANS
rentedThe rig has a rental. available_from of the listing says until when.
listing_unavailableThe listing is not verified yet.
sales_pausedSales of this pooled hashrate are paused.
days_out_of_rangeThe number of days is outside min_days to max_days of the listing.
below_minimumThe total is under the smallest rental we sell. Rent for more days or more pieces.
not_available_for_daysThe pooled hashrate cannot serve this size for this long. Try fewer days or fewer pieces.
GET /openapi.json No key

This API described as an OpenAPI 3.1 document, for tools that read one.

REQUEST
curl https://hashstrike.mineshop.eu/partner-api/v1/openapi.json
GET /account Key · read

Who the key belongs to and what it may do. The quickest way to test a new key.

REQUEST
curl https://hashstrike.mineshop.eu/partner-api/v1/account -H "Authorization: Bearer $HASHSTRIKE_KEY"
ANSWER
{
    "partner": {
        "name": "Example Miners",
        "status": "approved"
    },
    "key": {
        "name": "Shop server",
        "mode": "test",
        "scopes": [
            "read",
            "rent"
        ],
        "hint": "hs_test_EXAM…XAMP",
        "expires_at": null
    },
    "limits": {
        "read_per_minute": 120,
        "write_per_minute": 30,
        "daily_spend_cap_sats": 1000000,
        "rentals_enabled": true
    }
}
GET /balance Key · read

Your prepaid balance and your daily spend caps, with what the last 24 hours used of them.

REQUEST
curl https://hashstrike.mineshop.eu/partner-api/v1/balance -H "Authorization: Bearer $HASHSTRIKE_KEY"
ANSWER
{
    "available_sats": 60000,
    "daily_spend_cap_sats": 1000000,
    "spent_last_24h_sats": 40000,
    "key_daily_spend_cap_sats": null,
    "key_spent_last_24h_sats": 40000,
    "spend_remaining_sats": 960000
}
FIELDWHAT IT MEANS
available_satsYour prepaid balance.
daily_spend_cap_satsThe most your account may spend on rentals in any 24 hours.
spent_last_24h_satsThe totals of the rentals you started in the last 24 hours. A refund does not lower it.
key_daily_spend_cap_satsThe cap of this key, when it has one of its own. Otherwise null.
key_spent_last_24h_satsThe same sum for the rentals started with this key.
spend_remaining_satsWhat this key may still spend now under the caps. Your balance is a separate limit.
POST /rentals Key · rent

Start a rental for your customer. It is paid in full from your balance and the hashrate starts right after the call. The answer is 201 with the rental object.

REQUEST
curl -X POST https://hashstrike.mineshop.eu/partner-api/v1/rentals -H "Authorization: Bearer $HASHSTRIKE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reference":"order-1001","listing_id":2325,"days":3,"quantity":1,"coin":"btc","address":"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq","worker_name":"rig-a","max_total_sats":30000}'
ANSWER
{
    "reference": "order-1001",
    "id": "P2P-20261117-ZK4K1OII",
    "status": "active",
    "listing": {
        "id": 2325,
        "title": "Antminer S21 200T",
        "type": "rig"
    },
    "hashrate_th": 200,
    "quantity": 1,
    "days": 3,
    "coin": "btc",
    "total_sats": 30000,
    "refund_sats": null,
    "starts_at": "2026-11-17T09:03:26Z",
    "ends_at": "2026-11-20T09:03:26Z",
    "delivery": {
        "delivered_pct": 0,
        "pace_pct": null,
        "current_th": null,
        "average_th": null,
        "last_share_at": null,
        "stale": false
    },
    "mining": {
        "target": "solo",
        "pool": null,
        "login": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq.rig-a"
    },
    "tracking_url": "https://hashstrike.mineshop.eu/marketplace/contract/YiPflvNPaoNZmOehpQVcTzbq1cMm1WXv7OmCqnEgxyaXmxMpW0UIabvCasObJhq8",
    "created_at": "2026-11-17T09:03:26Z",
    "updated_at": "2026-11-17T09:03:26Z"
}
GET /rentals/{reference} Key · read

One of your rentals, by your own order number. The answer is the rental object shown above, with all delivery figures. An order number you never used answers 404 not_found.

REQUEST
curl https://hashstrike.mineshop.eu/partner-api/v1/rentals/order-1001 -H "Authorization: Bearer $HASHSTRIKE_KEY"
POST /rentals/{reference}/pool Key · rent

Correct the pool details of one of your running rentals while its pool is not taking the work (we warn you first). The new details are tested like those of a new rental, then the rig moves to them. The price, the length and the end of the rental never change. The answer is the rental object with the new pool. A rental whose pool works answers 422 validation_failed.

REQUEST
curl -X POST https://hashstrike.mineshop.eu/partner-api/v1/rentals/order-1002/pool -H "Authorization: Bearer $HASHSTRIKE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pool":{"url":"stratum+tcp://pool.example.com:3334","worker":"account.worker1","password":"x"}}'
GET /rentals Key · read

The rentals you started through the API, newest first: 25 in one answer unless you send limit (1 to 100). Filter with status (one of the six statuses) and updated_since (an ISO 8601 time with its zone, like 2026-11-17T09:00:00Z: only rentals changed at or after it; a bare date or a word like yesterday answers 422). When next_cursor is not null, send it as cursor to get the next page. Rows carry delivered_pct only: read one rental for the other delivery figures.

REQUEST
curl "https://hashstrike.mineshop.eu/partner-api/v1/rentals?limit=1" -H "Authorization: Bearer $HASHSTRIKE_KEY"
ANSWER
{
    "data": [
        {
            "reference": "order-1002",
            "id": "P2P-20261117-Q0MJPZEV",
            "status": "active",
            "listing": {
                "id": 2326,
                "title": "API S21 380e8d",
                "type": "rig"
            },
            "hashrate_th": 200,
            "quantity": 1,
            "days": 1,
            "coin": "btc",
            "total_sats": 10000,
            "refund_sats": null,
            "starts_at": "2026-11-17T09:03:26Z",
            "ends_at": "2026-11-18T09:03:26Z",
            "delivery": {
                "delivered_pct": 0
            },
            "mining": {
                "target": "pool",
                "pool": "stratum+tcp://pool.example.com:3333",
                "login": "account.worker1"
            },
            "tracking_url": "https://hashstrike.mineshop.eu/marketplace/contract/EzwUWydXSLXOhwcRBqRLuucO8fJalbQiFF2jxZ25b3Ej40p5r3XTmQING5eSYhLm",
            "created_at": "2026-11-17T09:03:26Z",
            "updated_at": "2026-11-17T09:03:26Z"
        }
    ],
    "next_cursor": "OTEuZWI3NWEzZmJiOTY2ZjU3M2JiZDYyNTUxNzFhYzliM2E"
}

Renting in detail

POST /rentals takes a JSON body (Content-Type: application/json, at most 16 KB). It answers 201 with the rental object.

FIELDNEEDEDWHAT IT IS
referenceyesYour own order number. 1 to 64 characters: letters, digits, dot, dash, underscore and colon, starting with a letter or digit. Capitals count.
listing_idyesThe id of a listing from /listings.
daysyesWhole days, 1 to 365, and within min_days and max_days of the listing.
quantitynoHow many pieces of the listing, up to its max_quantity. 1 when left out. A rig is always 1.
coinnobtc (when left out) or bch. It must be one of the coins of the listing.
addressyesThe address of your customer for that coin, at most 100 characters. A block reward is paid to it.
worker_namenoA name for the worker on our solo pool: up to 40 letters, digits, dash and underscore. Kept in lower case. We make one up when you leave it out. Not used when you send pool.
poolnoMine on the pool of your customer instead of our solo pool: an object with url and worker, and password if the pool wants one.
pool.urlwith poolstratum+tcp://host:port or stratum+ssl://host:port, at most 300 characters. It must be reachable from the internet.
pool.workerwith poolThe login at that pool, at most 200 characters.
pool.passwordnoAt most 200 characters. We never send it back in any answer.
max_total_satsyesThe most this rental may cost, in whole sats. Take total_sats from the quote.
dry_runnotrue checks everything and rents nothing.

Any other field, at the top or inside pool, is refused with 422 validation_failed and nothing is rented: a misspelt dry_run never turns a trial into a real, paid rental.

Sending it twice never rents twice

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.

{
    "reference": "order-1001",
    "id": "P2P-20261117-ZK4K1OII",
    "status": "active",
    "…": "…",
    "replayed": true
}

The price cannot surprise you

Prices move. If the rental would cost more than max_total_sats, nothing is rented and the answer is 409 price_changed with the price now in total_sats:

{
    "error": {
        "code": "price_changed",
        "message": "The price is above max_total_sats.",
        "request_id": "7550b303-eab8-41c8-8034-aa77ec6367c3",
        "total_sats": 10000
    }
}

Trying it without spending

Send "dry_run": true, or use a test key: a test key always makes a trial call, whatever you send. Every check runs, nothing is reserved or paid, and the reference stays free. The answer is 200 and tells you what the rental would cost and whether your balance covers it:

REQUEST
curl -X POST https://hashstrike.mineshop.eu/partner-api/v1/rentals -H "Authorization: Bearer $HASHSTRIKE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reference":"order-1001","listing_id":2325,"days":3,"quantity":1,"coin":"btc","address":"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq","worker_name":"rig-a","max_total_sats":30000,"dry_run":true}'
ANSWER
{
    "dry_run": true,
    "reference": "order-1001",
    "total_sats": 30000,
    "balance_sufficient": true,
    "available_sats": 100000,
    "rental": {
        "reference": "order-1001",
        "listing": {
            "id": 2325,
            "title": "Antminer S21 200T",
            "type": "rig"
        },
        "hashrate_th": 200,
        "quantity": 1,
        "days": 3,
        "coin": "btc",
        "total_sats": 30000,
        "mining": {
            "target": "solo",
            "pool": null,
            "login": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq.rig-a"
        }
    }
}

Mining on your customer's own pool

Leave pool out and the hashrate mines solo on our pool, for your customer's address. Send pool and it goes to that pool instead. We check that the pool can be reached before anything is paid: if not, the answer is 422 pool_unreachable. The password is never sent back.

REQUEST
curl -X POST https://hashstrike.mineshop.eu/partner-api/v1/rentals -H "Authorization: Bearer $HASHSTRIKE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reference":"order-1002","listing_id":2326,"days":1,"address":"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq","pool":{"url":"stratum+tcp://pool.example.com:3333","worker":"account.worker1","password":"x"},"max_total_sats":10000}'
IN THE ANSWER
{
    "mining": {
        "target": "pool",
        "pool": "stratum+tcp://pool.example.com:3333",
        "login": "account.worker1"
    }
}

When the balance or the daily cap is too low

If your balance does not cover the rental, nothing is rented and the answer is 402 insufficient_balance with both amounts. If the rental would take you over your daily spend cap, the answer is 403 spend_cap_reached (see Limits).

{
    "error": {
        "code": "insufficient_balance",
        "message": "Your balance doesn't cover 300,000 sats — deposit first from your wallet page.",
        "request_id": "49d3fff4-47d2-4889-9ce6-17bd12fa7e72",
        "required_sats": 300000,
        "available_sats": 60000
    }
}

The rental object

POST /rentals, GET /rentals/{reference} and each row of GET /rentals answer with the same object.

FIELDWHAT IT IS
referenceYour own order number, as you sent it.
idOur number of the rental.
statusOne of the six values in the next table.
listingWhat was rented: id, title and type (rig or pooled).
hashrate_thThe rented hashrate in TH/s, all pieces together.
quantityHow many pieces.
daysHow many days.
coinbtc or bch.
total_satsWhat the rental cost. It was taken from your balance in full when the rental started.
refund_satsnull until the rental is settled or refunded. Then the sats that came back to your balance: for hashrate that was not delivered (0 when all of it was delivered), or the whole remaining amount when a dispute was refunded.
starts_atWhen the rental started.
ends_atWhen it ends.
deliveryHow much has been delivered. See below.
miningWhere the hashrate goes. See below.
tracking_urlA HashStrike-branded page that shows live delivery. Anyone with the link can open it, without an account. Show it to your customer or keep it to yourself.
created_atWhen you sent the order.
updated_atWhen the rental last changed.

status

STATUSWHAT IT MEANS
pendingCreated and not paid yet. You will rarely see it: a rental started through the API is paid at once.
activePaid and running.
finishedThe time is over, or the rental is settled.
refundedIt ended with money returned to your balance: refund_sats says how much.
cancelledIt did not start, or we stopped it.
disputedUnder review by us.

delivery

GET /rentals/{reference} and the answer of POST /rentals carry all six figures. A row of GET /rentals carries delivered_pct only.

FIELDWHAT IT IS
delivered_pctDelivered so far, as a percentage of what was paid for.
pace_pctDelivered so far compared with what was due by now, as a percentage. null before there is anything to compare.
current_thTH/s right now.
average_thTH/s on average since the start.
last_share_atWhen work last arrived.
staletrue when no work has arrived for a while.

mining

FIELDWHAT IT IS
targetsolo: our solo pool of the coin. pool: the pool you named.
poolThe address of your pool. null on solo.
loginWhat the hashrate signs in with: address.worker_name on solo, your pool worker on your pool.

Errors

Every error has the same shape. Decide by code, show message to a person, keep request_id for support. Some errors add more inside error:

{
    "error": {
        "code": "validation_failed",
        "message": "Some fields are missing or invalid.",
        "request_id": "eca8af40-0455-4a82-b5dc-5af9f37f13d6",
        "fields": {
            "reference": [
                "The reference field is required."
            ],
            "days": [
                "The days field must be at least 1."
            ]
        }
    }
}
CODESTATUSMEANINGADDS
invalid_request400The request body is not valid JSON.
invalid_key401Missing or invalid API key.
insufficient_balance402The account balance does not cover this rental.required_sats, available_sats
partner_not_active403This partner account is not active.
live_keys_not_enabled403Live keys are not enabled for this partner account yet. Use a test key, or ask us to enable live keys.
ip_not_allowed403This IP address is not on the allowlist of the key.
scope_missing403This key does not have the scope this request needs.
spend_cap_reached403The daily spend cap is reached.
rentals_disabled403Starting rentals through the API is switched off.
not_found404Not found.
method_not_allowed405This method is not allowed on this URL.Allow header
listing_unavailable409This listing is not available.
price_changed409The price is above max_total_sats.total_sats
reference_reused409This reference was already used for a different rental.
too_many_unpaid_reservations409Too many unpaid reservations.
body_too_large413The request body is larger than 16 KB.
unsupported_media_type415Send the request body as application/json.
validation_failed422Some fields are missing or invalid.fields
invalid_address422The address is not valid.
pool_unreachable422The pool could not be reached.
below_minimum422The rental is below the minimum.
own_listing422A partner cannot rent its own listing.
rate_limited429Too many requests. Retry after the number of seconds in Retry-After.Retry-After header
server_error500Something went wrong on our side. Quote the request_id when you contact support.
  • fields names each field that is wrong, with the reason. Fields of pool are named pool.url, pool.worker and pool.password.
  • total_sats is the price now. required_sats and available_sats are the price and your balance.
  • The wording of message can differ from this table and can change. The code does not.
  • While the site is down for maintenance, server_error comes with status 503 and a Retry-After header.
  • After a timeout or a 5xx on POST /rentals, do not guess: repeat the same call, or read GET /rentals/{reference}.

Limits

WHATLIMIT
Calls without a key60 a minute per IP address
Reading with a key120 a minute per key, 300 a minute for all your keys together
Renting30 a minute per key, 60 a minute for all your keys together
Calls with a key from one IP address600 a minute
Refused calls20 a minute per IP address, then that address is locked out
Spending1,000,000 sats in any 24 hours, unless we agreed another cap with you
Request body16 KB
Keys10 active keys per account, 20 IP addresses or ranges per key
  • Over a limit the answer is 429 rate_limited with a Retry-After header in seconds. Answers carry X-RateLimit-Limit and X-RateLimit-Remaining.
  • Lockout. A call with a wrong key, and a call refused with partner_not_active, live_keys_not_enabled, ip_not_allowed or scope_missing, counts as refused. After 20 of them in a minute from one IP address, every call with a key from that address answers rate_limited until the minute is over, a good key included.
  • After 60 refused calls within 15 minutes, that address is locked out for the rest of those 15 minutes. Fix the key or the allowlist instead of retrying: Retry-After says how long to wait.
  • The daily spend cap counts the total of every rental you started in the last 24 hours. A refund does not give it back. A rental that would go over it answers 403 spend_cap_reached. A key can have a lower cap of its own. GET /balance shows what is left.
  • A body over 16 KB answers 413 body_too_large.
  • The rig list is refreshed every 30 seconds. A quote is always worked out fresh.

Rules

  • Keys stay on your server. Never in a web page, a phone app or a public repository. If one leaks, revoke it on your account page.
  • You are the seller to your customer. Your prices, your terms, your support. We are your supplier.
  • Never promise block rewards. Rented hashrate is a chance to find a block, not a payout.
  • Under-delivery is refunded automatically. If less hashrate is delivered than was paid for, the difference returns to your balance when the rental is settled.
  • Rentals start right after the call and cannot be cancelled. Check the address and use dry_run first.

Questions: hashstrike@mineshop.eu