CoinbasePro

codecov

Elixir client library for CoinbasePro

Installation

If available in Hex, the package can be installed by adding coinbase_pro to your list of dependencies in mix.exs:

def deps do
  [
    {:coinbase_pro, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/coinbase_pro.

Ideas in this code

Heavily relies on Sandbox

Coinbase offers Sandbox for testing purposes. This library communicates with sandbox by default. You can get API credential for the sandbox the same way as for production.

Should not be coupled to HTTP client

There are several good HTTP clients for Elixir / Erlang. To not force a decision which one is the best, this code uses idea of behavours to support them all.

Currently only HTTPoison supprt is implemented though.

Tests are using external mocking service

There are several ways to test communication with external services: mocking with Mox for example. This library use an approach to mock all needed responses in a local server. You can read more about this approach here: https://developers.amadeus.com/blog/helpful-tools-to-create-mock-servers. Mocking server can be found here: https://github.com/kiote/coinbasepro-http-mock-server