The REST API can be enabled with the -rest
option. The interface runs on the same port as the JSON-RPC interface, by default port 8332
for mainnet, port 18332
for testnet, and port 18443
for regtest.
This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.
- API version: 0.16
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.GoClientCodegen
Put the package under your project folder and add the following in import:
import "./swagger"
All URIs are relative to http://localhost:3000/rest
Class | Method | HTTP request | Description |
---|---|---|---|
BlockApi | RestBlockExtended | Get /block/{blockHash} | Get block by hash. |
BlockApi | RestBlockNotxdetails | Get /block/notxdetails/{blockHash}.{format} | Get block by hash. |
ChainApi | RestChaininfo | Get /chaininfo.json | Returns various state info regarding block chain processing. |
MemoryPoolApi | RestGetutxos | Get /getutxos/checkmempool/{txHash}-{txOutput}.{format} | Returns Unspent Transaction (TX) Outputs |
MemoryPoolApi | RestHeaders | Get /headers/{headerCount}/{blockHash}.{format} | Returns headers. |
MemoryPoolApi | RestMempoolContents | Get /mempool/contents.json | Returns transactions in the TX mempool. |
MemoryPoolApi | RestMempoolInfo | Get /mempool/info.json | Returns various information about the TX mempool. |
TransactionApi | RestTx | Get /tx/{txHash} | Get transaction by hash. |
- Bip
- Bip9
- BipReject
- Block
- ChainInfo
- ChainInfoBip9Softforks
- InlineResponse200
- InlineResponseDefault
- MemoryPool
- ScriptPubKey
- Transaction
- UTxO
Endpoints do not require authorization.