Bitcoin Rest API swagger specification document in Yml and Json (OpenAPI).
The current version uses the Version 2.0 of the OpenAPI Specification: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
You can import the YML/Json file in the Swagger editor and generate a client for any supported languages.
A collection of pre-generated client repositories is available in the bitcoind-rest group: https://github.com/bitcoind-rest
- Docs https://lepetitbloc.github.io/bitcoin-swagger/
- Version 2.0 of the OpenAPI Specification https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
- https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md
Bitcoin Rest API doesn't provide any mechanism to handle CORS. For the time being we recommend to setup an Nginx proxy in front of the Bitcoin Rest API.
see the following PR on Bitcoin repository: add support for CORS headers
We're using a local swagger-editor and a
bitcoind
binary running on thetestnet
to develop and live-test the specification file. You can start them both as containers with docker-composer.
- Start
bitcoind
andswagger-editor
containers viadocker-compose
:
docker-compose up
- Visit http://localhost:3000
- Import
swagger.yml
from the > File > Import file menu in the GUI.
Note: The YML file is used as the reference, the Json file is exported via the GUI.
MIT