Pepecoin Electrs API

REST API Documentation

https://pep-api.onchainfun.xyz/api

๐Ÿ” Get API Access

Pay 100 PEPE to get 24-hour API access. All endpoints except public ones require an API key.

Amount: 100 PEPE
Duration: 24 hours
Payment Address:
Pu2xMCd9JpaxUGCCHzT8zmExvsTp4CyRkT

โœ… Payment Confirmed!

Your API Key:

Use this key in the X-API-Key header for API requests. Valid for 24 hours.

Public Endpoints (No Key Required):
/blocks/tip/height, /blocks/tip/hash, /fee-estimates, /mempool

Blocks

Tip Information

GET
/blocks/tip/height
Get the latest block height
curl https://pep-api.onchainfun.xyz/api/blocks/tip/height
Try it out
GET
/blocks/tip/hash
Get the latest block hash
curl https://pep-api.onchainfun.xyz/api/blocks/tip/hash
Try it out

Block by Height

GET
/block-height/{height}
Get block hash at a specific height
ParameterTypeDescription
heightintegerBlock height
curl https://pep-api.onchainfun.xyz/api/block-height/0
Try it out

Block Details

GET
/block/{hash}
Get detailed block information including metadata, transaction count, size, and weight
curl https://pep-api.onchainfun.xyz/api/block/BLOCKHASH
Try it out
GET
/block/{hash}/txids
Get all transaction IDs in a block
curl https://pep-api.onchainfun.xyz/api/block/BLOCKHASH/txids
Try it out
GET
/block/{hash}/txs/{start_index}
Get block transactions with pagination. start_index must be a multiple of 25 (default page size).
curl https://pep-api.onchainfun.xyz/api/block/BLOCKHASH/txs/0
Try it out

Address & Scripthash

GET
/address/{address}
Get address statistics including chain_stats (funded/spent txo counts and sums) and mempool_stats
curl https://pep-api.onchainfun.xyz/api/address/PbwHwFpGaDYRejHKRqvsrmyKH1QWyMEzPD
Try it out
GET
/address/{address}/utxo
Get unspent transaction outputs (UTXOs) for an address. Returns array of UTXO objects with txid, vout, value, and status.
curl https://pep-api.onchainfun.xyz/api/address/PbwHwFpGaDYRejHKRqvsrmyKH1QWyMEzPD/utxo
Try it out
GET
/address/{address}/txs
Get transaction history for an address (mempool + confirmed), sorted by newest first
Query ParameterTypeDescription
max_txsintegerMaximum transactions to return
after_txidstringStart after this transaction ID (for pagination)
curl "https://pep-api.onchainfun.xyz/api/address/PbwHwFpGaDYRejHKRqvsrmyKH1QWyMEzPD/txs?max_txs=10"
Try it out
GET
/address/{address}/txs/mempool
Get unconfirmed (mempool) transactions for an address
curl https://pep-api.onchainfun.xyz/api/address/PbwHwFpGaDYRejHKRqvsrmyKH1QWyMEzPD/txs/mempool
Try it out
GET
/address/{address}/txs/chain/{last_seen_txid}
Get confirmed transactions after a specific transaction ID
curl https://pep-api.onchainfun.xyz/api/address/ADDRESS/txs/chain/LAST_TXID
Try it out
Scripthash Support: All address endpoints also work with scripthash. Replace /address/{address} with /scripthash/{scripthash}. For multi-address queries, use POST /addresses/txs or POST /scripthashes/txs.

Transaction

GET
/tx/{txid}
Get full transaction details including inputs, outputs, fees, and confirmation status
curl https://pep-api.onchainfun.xyz/api/tx/TXID
Try it out
GET
/tx/{txid}/hex
Get raw transaction in hex format
curl https://pep-api.onchainfun.xyz/api/tx/TXID/hex
Try it out
GET
/tx/{txid}/status
Get transaction confirmation status (block_height, confirmed, etc.)
curl https://pep-api.onchainfun.xyz/api/tx/TXID/status
Try it out
GET
/tx/{txid}/outspends
Get spending information for all outputs in a transaction
curl https://pep-api.onchainfun.xyz/api/tx/TXID/outspends
Try it out
POST
/tx
Broadcast a raw transaction to the network. Returns the transaction ID on success.
curl -X POST https://pep-api.onchainfun.xyz/api/tx \
  -H "Content-Type: text/plain" \
  -d "0100000001..."
Try it out

Mempool

GET
/mempool
Get mempool statistics including transaction count, total vsize, total fees, and fee histogram
curl https://pep-api.onchainfun.xyz/api/mempool
Try it out
GET
/mempool/txids
Get all transaction IDs currently in the mempool
curl https://pep-api.onchainfun.xyz/api/mempool/txids
Try it out
GET
/mempool/recent
Get recent mempool transactions overview
curl https://pep-api.onchainfun.xyz/api/mempool/recent
Try it out

Fee Estimates

GET
/fee-estimates
Get fee estimates for different confirmation targets (in sat/vB or equivalent units)
curl https://pep-api.onchainfun.xyz/api/fee-estimates
Try it out

Response Example

{
  "1": 1001.863,
  "6": 1001.863,
  "15": 1001.863,
  "25": 1001.863
}

Examples

Get Latest Block

curl https://pep-api.onchainfun.xyz/api/blocks/tip/height

Get Address Statistics

curl https://pep-api.onchainfun.xyz/api/address/PbwHwFpGaDYRejHKRqvsrmyKH1QWyMEzPD

Get Address UTXOs

curl https://pep-api.onchainfun.xyz/api/address/PbwHwFpGaDYRejHKRqvsrmyKH1QWyMEzPD/utxo

Get Transaction History

curl "https://pep-api.onchainfun.xyz/api/address/PbwHwFpGaDYRejHKRqvsrmyKH1QWyMEzPD/txs?max_txs=5"

Broadcast Transaction

curl -X POST https://pep-api.onchainfun.xyz/api/tx \
  -H "Content-Type: text/plain" \
  -d "0100000001..."

๐Ÿ” Get API Access

Pay 100 PEPE to get 24-hour API access

Amount: 100 PEPE
Duration: 24 hours
Payment Address:
Pu2xMCd9JpaxUGCCHzT8zmExvsTp4CyRkT
๐Ÿ’ก Manual Payment (Recommended):

Send 100 PEPE from your Nintondo wallet to the address above, then enter the Transaction ID below: