Coinbase has official client libraries for Python, Ruby, PHP, Node.js and Java, but what about other languages? Enter Swagger. Swagger is an open-source project which includes an specification for describing APIs in JSON or YAML and tools for generating ready-to-go client libraries in several languages.
Here at CoinFabrik, we have been writing a first draft swagger specification for Coinbase API v2. We’ve got the basics covered for now: Users, Accounts, Addresses and Transactions. If you would like to help expand the scope, make a pull request on the github repository.
Generating a Client Library
The easiest way to generate a client library for your language of choice is to load the swagger.json file into the Swagger Editor and then download it from the “Generate Client” tab. The libraries come with full documentation on how to use them, complete with examples.
This is the full list of languages and frameworks that can be generated right from the Swagger Editor:
Akka Scala | Android | Async Scala | Clojure | C# |
---|---|---|---|---|
C# .NET 2.0 | Dart | Dynamic HTML | Flash | Go |
HTML | Java | JavaScript | JavaScript Closure Angular | Jmeter |
Objective-C | Perl | PHP | Python | QT 5 C++ |
Ruby | Scala | Swift | Tizen | Typescript Angular |
Typescript Node |