MinersWorldCoin API documentation

Reference for the REST endpoints, Esplora-compatible routes, and Socket.IO events exposed by this Python server.

REST base URL: https://api.minersworld.org. The root page is the interactive API explorer; its request cards remain unchanged.

Machine-readable contract: OpenAPI 3.1 YAML. Existing paths remain available; the main REST routes also have versioned aliases under /api/v1, where JSON responses use a standard envelope and JSON errors use HTTP error statuses. The /api/v1/esplora aliases preserve Esplora response formats.

Response and amount conventions

Most REST methods return an object containing result, error, and id (normally api-server). Node errors are returned in error. A few endpoints intentionally return plain text, arrays, or a different JSON shape; these are called out below.

In the main API, monetary amounts are integer satoshis: 1 MWC = 100,000,000 satoshis. Keep amounts as integers when building transactions. The /price endpoint is a CoinPaprika response in market units, not satoshis. The /supply/plain endpoint returns whole MWC as plain text.

The explorer adds a circulating-supply equivalent in MWC alongside the raw satoshi supply. The API's JSON response remains unchanged.

Constructing, signing, and broadcasting transactions

This server does not create transactions or sign them. It provides UTXO lookup, transaction decoding, and a node relay for already-signed raw transaction hex. Private keys stay in the wallet or signing client.

  1. Call GET /unspent/{address} to retrieve spendable outputs. Each output identifies its source with txid and index (the vout) and includes the locking script and value in satoshis. Use an amount filter only if useful; amount is integer satoshis.
  2. Select inputs whose total covers the recipient amount and fee. Construct outputs for the recipient and, if needed, a change address you control. The difference between input total and output total is the transaction fee. Recheck inputs immediately before signing because another spend can invalidate them.
  3. Build and sign with a wallet library configured for MWC's address and transaction rules. Each input must spend the referenced output and be signed by the key that controls it. Use the wallet's supported scripts and signature-hash behavior; this API cannot sign for you.
  4. Call GET /decode/{raw-hex} on the signed transaction and inspect inputs, outputs, amounts, and change before broadcasting. Decoding only parses the transaction; it does not promise mempool acceptance.
  5. POST the signed hex to /broadcast as URL-encoded form field raw, or as JSON {"raw":"…"}. The Python handler passes it to the node's sendrawtransaction RPC. On success, the node returns a transaction ID. A returned ID means accepted by that node, not confirmed in a block.
  6. Track the transaction with /transaction/{txid} and the address with /mempool/{address}. After it is mined, transaction details include block metadata and confirmations.

The legacy /fee route remains hard-coded to feerate: 1000000 and blocks: 30. That value is 1,000,000 satoshis (0.01 MWC), not a per-byte quote from current mempool conditions. Use /fee-estimates for the node's current smart-fee estimates in sat/vB; estimate availability depends on node history.

The companion MWC API and wallet project documents these network parameters for wallet configuration: public-key address prefix 20, script address prefix 10, WIF prefix 123, extended public/private key versions 0488B21E/0488ADE4, and Bech32 HRP mwc. Bitcoin mainnet defaults will derive incompatible addresses.

curl "https://api.minersworld.org/unspent/98AUvgXPjAdKHj3FqwAPJNpd8XergXBL59"

curl -X POST "https://api.minersworld.org/broadcast" \
  --data-urlencode "raw=SIGNED_RAW_TRANSACTION_HEX"

For an Esplora-style relay, POST /esplora/tx instead expects the raw hex directly as a plain-text request body and returns the txid as plain text.

Main REST endpoints

Method / pathInputsResult
GET /infoNoneNode blockchain info, with calculated supply, reward, and network hash rate added.
GET /priceNoneCoinPaprika MWC ticker JSON. Not wrapped in the standard response envelope; upstream failures return HTTP 500.
GET /height/{height}Block height; optional ?offset=0Block data. Returns at most 10 transaction IDs starting at offset.
GET /hash/{height}Block heightBlock hash at the given height.
GET /range/{height}?offset={count}Ending height; count defaults to 30 and is capped at 100Block summaries, newest first. Values below 1 are treated as 1.
GET /block/{hash}Block hash; optional ?offset=0Block data with at most 10 transaction IDs from offset.
GET /header/{hash}Block hashBlock header fields; txcount replaces node field nTx.
GET /transaction/{txid}Transaction IDTransaction details, raw hex, inputs, outputs, values in satoshis, and block metadata when confirmed. Unconfirmed height is -1.
GET /balance/{address}AddressNode address balance and received totals in satoshis.
GET /unspent/{address}?amount={sats}Address; integer satoshi minimum filter defaulting to 0UTXOs with txid, output index, locking script, value in satoshis, and height.
GET /history/{address}?offset={n}Address; offset defaults to 0Up to 10 transaction IDs, newest first, and full txcount.
GET /mempool/{address}AddressUnconfirmed transactions involving the address and their count.
GET /mempoolNoneNode mempool statistics and transaction IDs.
GET /feeNoneLegacy fixed recommendation: 1,000,000 satoshis and blocks: 30.
GET /supplyNoneCalculated height, halvings, and supply in satoshis.
GET /supply/plainNoneWhole-MWC supply as plain text.
GET /peersNonePeer IP, software version, and ping time. Shape is {result, error}, without id.
GET /decode/{raw}Raw transaction hex in the pathNode-decoded transaction. Long raw hex can exceed URL limits; parsing does not imply acceptance.
POST /broadcastURL-encoded form field raw or JSON object with a raw stringNode JSON-RPC result from sendrawtransaction. Missing raw hex returns HTTP 400.
GET /statsNoneServer uptime, REST/Socket.IO counters, active connections, subscribers, and watched-address counts.

Esplora-compatible routes

All routes below are prefixed with /esplora. The server uses block_page and tx_page settings (currently 10 and 25).

Method / pathResult
GET /block/{hash}Esplora block summary; unknown block returns 404.
GET /blocks, GET /blocks/{height}Recent block summaries up to the selected height (tip when omitted).
GET /block/{hash}/statusReturns in_best_chain: true when block lookup succeeds, plus height and next block hash. The handler does not independently verify chain membership.
GET /block/{hash}/txs/{start}Page of transaction details; start must be divisible by configured tx_page (25).
GET /block-height/{height}Plain-text block hash.
GET /blocks/tip/heightPlain-text current tip height.
GET /blocks/tip/hashPlain-text current tip hash.
GET /tx/{txid}Esplora-format transaction with status, vin/vout, value, and fee.
GET /tx/{txid}/status, /tx/{txid}/hexTransaction confirmation state or raw hex as plain text.
GET /tx/{txid}/outspendsSpent flag for each output; spent entries include spending tx/input and block status.
GET /tx/{txid}/outspend/{vout}Spend status for one output index.
GET /address/{address}Address chain/mempool statistics. Output counts are currently placeholders (zero).
GET /address/{address}/utxoAddress UTXOs in Esplora format with funding status.
GET /address/{address}/txsFirst page of address transactions.
GET /address/{address}/txs/chain/{last_txid}Next page after the specified transaction cursor.
GET /address/{address}/txs/mempoolUnconfirmed transactions affecting the address.
GET /mempool/recentRecent mempool summaries: txid, fee, weight (field named vsize), and output value.
GET /mempool/txidsAll transaction IDs currently in the node mempool.
POST /txPlain-text body containing signed raw transaction hex; returns plain-text txid, or HTTP 400 with node error.

Socket.IO events

Connect a Socket.IO client to the API origin using the default /socket.io path. Request handlers return their result through the event acknowledgement. Arguments are positional: send a string, number, or array as appropriate rather than an object with named fields. Connection and disconnection lifecycle events are handled automatically by the server.

EventArgument(s)Behavior
general.info, general.feeNoneSame result as REST /info and /fee.
address.unspentAddress string; optional amount integerAddress UTXOs.
address.balance, address.history, address.mempool, address.mempool.rawAddress stringAddress data; .raw returns transaction IDs only.
address.checkArray of address stringsAddresses with history.
transaction.infoTransaction ID stringTransaction details.
transaction.batchArray of transaction ID stringsEnvelope containing a result for each transaction.
transaction.broadcastSigned raw transaction hex stringRelays through node sendrawtransaction.
subscribe.blocks, unsubscribe.blocksNoneManage block subscription; updates arrive as block.update with height and hash.
subscribe.address, unsubscribe.addressAddress stringManage address subscription; updates arrive as address.update. Height/hash are null for mempool activity.

The explorer page intentionally remains the live endpoint runner; this documentation page explains the behavior without replacing or renaming its endpoint cards.