Aurum.Coinbase (aurum v0.2.0)
This module provides abstractions around basic HTTP methods within the context of the coinbase ecosystem. It takes care of using your Coinbase API Key/Secret to generate the required HMAC authentication signature based on the current timestamp so that the consumer of this module can focus on application logic.
Link to this section Summary
Functions
Perform a signed delete request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
Perform a signed get request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
Perform a signed put request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
Perform a signed post request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
Perform a signed put request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
Link to this section Functions
delete(path)
Specs
Perform a signed delete request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
get(path)
Specs
Perform a signed get request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
patch(path, body)
Specs
Perform a signed put request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
The request body can be in the form of a map for your convienience, for example:
Coinbase.patch("/v2/some/resource", %{total: 10, currency: "USD"})
Is equivalent to:
Coinbase.patch("/v2/some/resource", ~S({"total": "10", "currency": "USD"}))
post(path, body)
Specs
Perform a signed post request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
The request body can be in the form of a map for your convienience, for example:
Coinbase.post("/v2/accounts/<account_id>/sells", %{total: 10, currency: "USD"})
Is equivalent to:
Coinbase.post("/v2/accounts/<account_id>/sells", ~S({"total": "10", "currency": "USD"}))
put(path, body)
Specs
Perform a signed put request to the specified path. Due to some of the implementation details the path string must begin with /v2
in order to correctly call the API.
The request body can be in the form of a map for your convienience, for example:
Coinbase.put("/v2/some/resource", %{total: 10, currency: "USD"})
Is equivalent to:
Coinbase.put("/v2/some/resource", ~S({"total": "10", "currency": "USD"}))