PUBLIC BETA · v1

PyBLØCK Market API

Build on the PyBLØCK Market: list and rent BLAKE2b rigs, follow orders, and set up miner payouts from your own app, bot or site. JSON over HTTPS, no accounts, no API keys, CORS open.

Base URL: https://b.pyblock.xyz:8443/api/market/v1.php · OpenAPI 3 (JSON) · Market →

Principles

Endpoints

GET/statsMarket summary: rigs, available, TH/s, median price.
GET/rigsListed rigs: verified TH/s, price (sats XBT/TH/day), availability, state.
GET/rigs/{mid}/{rig}One rig.
GET/miners/{mid}Public miner panel (no amounts).
GET/miners/{mid}/series?range=6|12|168|720|allHashrate history.
GET/quote?rigs=mid:rig,…&hours=HQuote a rental (min 3 h).
POST/ordersCreate an order → Lightning invoice (15 min) + secret.
GET/orders/{secret}Order status, per-rig delivery, refund / coupon.
GET/payout/challenge?address=&payout=&price=Miner: message to sign (1 h).
POST/payoutMiner: save the signed payout.

Rent hashrate in 4 calls

# 1) available rigs
curl -s https://b.pyblock.xyz:8443/api/market/v1.php/rigs | jq '.rigs[] | select(.state=="available") | {mid, rig, ths, price}'

# 2) quote
curl -s "https://b.pyblock.xyz:8443/api/market/v1.php/quote?rigs=<mid>:<rig>&hours=6"

# 3) order (pay the invoice within 15 min)
curl -s -X POST https://b.pyblock.xyz:8443/api/market/v1.php/orders -H 'Content-Type: application/json' -d '{
  "rigs": [{"mid": "<mid>", "rig": "<rig>"}], "hours": 6,
  "host": "your.pool.example", "port": 3333, "user": "<your address>.worker", "pass": "x",
  "host2": "backup.pool.example", "port2": 3333,
  "refund_to": "[email protected]", "accept": 1 }'

# 4) follow it
curl -s https://b.pyblock.xyz:8443/api/market/v1.php/orders/<secret>

List your rig (miners)

curl -s "https://b.pyblock.xyz:8443/api/market/v1.php/payout/challenge?address=<addr>&[email protected]&price=50000&backup=wavicles"
# sign .message with your wallet (BIP-137), then:
curl -s -X POST https://b.pyblock.xyz:8443/api/market/v1.php/payout -H 'Content-Type: application/json' \
  -d '{"address":"<addr>","message":"<message>","signature":"<base64>"}'