coinbase-pro: Client for Coinbase Pro

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Client for Coinbase Pro REST and Websocket APIs


[Skip to ReadMe]

Properties

Versions0.5.0.0, 0.6.0.0, 0.7.0.0, 0.7.1.0, 0.7.1.0
Change logchangelog.md
Dependenciesaeson (>=1.2 && <1.5), aeson-casing (==0.1.*), async (>=2.1 && <2.3), base (>=4.7 && <5), binary (==0.8.*), bytestring (==0.10.*), coinbase-pro, containers (>=0.5 && <0.7), cryptonite (>=0.24 && <0.27), HsOpenSSL (==0.11.*), http-api-data (>=0.3 && <0.5), http-client (==0.5.*), http-client-tls (==0.3.*), http-streams (==0.8.*), http-types (==0.12.*), io-streams (==1.5.*), memory (>=0.14 && <0.16), network (>=2.6 && <2.9), servant (>=0.14 && <0.17), servant-client (>=0.14 && <0.17), servant-client-core (>=0.14 && <0.17), text (==1.2.*), time (==1.8.*), transformers (==0.5.*), unagi-streams (==0.2.*), unordered-containers (==0.2.*), vector (==0.12.*), websockets (==0.12.*), wuss (==1.1.*) [details]
LicenseMIT
Copyright2019 Michael Dunn <michaelsdunn1@gmail.com>
AuthorMichael Dunn <michaelsdunn1@gmail.com>
MaintainerMichael Dunn <michaelsdunn1@gmail.com>
CategoryWeb, Finance
Home pagehttps://github.com/mdunnio/coinbase-pro#readme
Bug trackerhttps://github.com/mdunnio/coinbase-pro/issues
Source repositoryhead: git clone https://github.com/https://github.com/mdunnio/coinbase-pro
Executablestest-stream, test-request
UploadedSun Oct 20 23:03:50 UTC 2019 by mdunnio

Modules

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for coinbase-pro-0.7.1.0

[back to package description]

coinbase-pro

Client for Coinabse Pro REST and Websocket APIS.

Here is a list of implemented/unimplemented features:

Request API

Market Data Requests

run (trades (ProductId "BTC-USD")) >>= print

Authenticated Private Requests

runCbAuthT cpc $ do
    fills (Just btcusd) Nothing >>= liftIO . print
  where
    accessKey  = CBAccessKey "<access-key>"
    secretKey  = CBSecretKey "<secret-key>"
    passphrase = CBAccessPassphrase "<passphrase>"
    cpc        = CoinbaseProCredentials accessKey secretKey passphrase

Websocket API

To print out all of the full order book updates for BTC-USD:

main :: IO ()
main = do
    msgs <- subscribeToFeed [ProductId "BTC-USD"] [Ticker]
    forever $ Streams.read msgs >>= print

Example

Example execs can be found in src/example/