summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdunnio <>2019-10-20 23:04:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-10-20 23:04:00 (GMT)
commit5ff161bd4b11e230aa1fb4b28815896e1a71c76f (patch)
treedd7a253f3ef017bb5f2b2e476c439473dc4a6ac9
parentc318d97e8ac633e353220bb4bdaf31ed847e3cf1 (diff)
version 0.7.1.0HEAD0.7.1.0master
-rw-r--r--changelog.md3
-rw-r--r--coinbase-pro.cabal4
-rw-r--r--src/example/request/Main.hs30
3 files changed, 17 insertions, 20 deletions
diff --git a/changelog.md b/changelog.md
index eb8b20e..110a4f5 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,6 @@
+# Version 0.7.1.0
+ - Fixed broken examples
+
# Version 0.7.0.0
- Unauthenticated requests are now all in the `ClientM` monad. `CoinbasePro.Request.run` is now required
to operate in the IO monad.
diff --git a/coinbase-pro.cabal b/coinbase-pro.cabal
index bd975be..84cb506 100644
--- a/coinbase-pro.cabal
+++ b/coinbase-pro.cabal
@@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
--- hash: 1ab32e4b55d042111e39fa8c604bf0b9bfeae0e5462638e322911b1ae0a0b59a
+-- hash: 1b0e7a2a88033345218e186ffcb056ef043bd04fc8557f5aadb11e0ef9805efb
name: coinbase-pro
-version: 0.7.0.0
+version: 0.7.1.0
synopsis: Client for Coinbase Pro
description: Client for Coinbase Pro REST and Websocket APIs
category: Web, Finance
diff --git a/src/example/request/Main.hs b/src/example/request/Main.hs
index e9d8c23..0e0e04d 100644
--- a/src/example/request/Main.hs
+++ b/src/example/request/Main.hs
@@ -18,7 +18,6 @@ import CoinbasePro.Unauthenticated
main :: IO ()
main = do
run (stats btcusd) >>= print
- run (stats btcusd) >>= print
run (candles btcusd Nothing Nothing Minute) >>= print
run (trades btcusd) >>= print
run time >>= print
@@ -26,23 +25,18 @@ main = do
run (aggregateOrderBook btcusd (Just Best)) >>= print
run (aggregateOrderBook btcusd (Just TopFifty)) >>= print
run (fullOrderBook btcusd) >>= print
- run_ $ do
- currencies
- products
- -- runCbAuthT cpc $ do
- -- accounts >>= liftIO . print
- -- fees >>= liftIO . print
- -- trailingVolume >>= liftIO . print
- -- account aid >>= liftIO . print
- -- fills (Just btcusd) Nothing >>= liftIO . print
- -- listOrders (Just [All]) (Just btcusd) >>= liftIO . print
- -- placeOrder btcusd Sell (Size 0.001) (Price 99999.00) True Nothing Nothing Nothing >>= liftIO . print
- -- placeOrder btcusd Buy (Size 1.0) (Price 1.00) True Nothing Nothing Nothing >>= liftIO . print
- -- cancelAll (Just btcusd) >>= liftIO . print
+ runCbAuthT cpc $ do
+ accounts >>= liftIO . print
+ account aid >>= liftIO . print
+ fills (Just btcusd) Nothing >>= liftIO . print
+ listOrders (Just [All]) (Just btcusd) >>= liftIO . print
+ placeOrder btcusd Sell (Size 0.001) (Price 99999.00) True Nothing Nothing Nothing >>= liftIO . print
+ placeOrder btcusd Buy (Size 1.0) (Price 1.00) True Nothing Nothing Nothing >>= liftIO . print
+ cancelAll (Just btcusd) >>= liftIO . print
where
- accessKey = CBAccessKey "315dd0794fd50876e0c3235e79fb7a92"
- secretKey = CBSecretKey "M37/sDmlZtI+Qxm9ODr6RNWzfoW+4w/fyyx5x8LxSRg8keHjt8Aepr+RmlprYzUaOQoi/ZHsYu0bNGiMUDl35g=="
- passphrase = CBAccessPassphrase "test123"
+ accessKey = CBAccessKey "accesskey"
+ secretKey = CBSecretKey "secretkey"
+ passphrase = CBAccessPassphrase "passphrase"
cpc = CoinbaseProCredentials accessKey secretKey passphrase
- accountId = AccountId "e4a37481-12e7-4564-b073-90627d202c2a"
+ aid = AccountId "accountid"
btcusd = ProductId "BTC-USD"