Add missing haddocks.
[haskell-cryptsy-api.git] / src / Main.hs
blob023ebf2b8b568b64e9d6e79f5585a48aaecb00ed
1 module Main (main) where
3 -- base
4 import Control.Monad ((<=<))
6 -- text
7 import Data.Text (pack)
9 -- transformers
10 import Control.Monad.IO.Class (liftIO)
12 -- unordered-containers
13 import qualified Data.HashMap.Strict as HM
15 -- vector
16 import qualified Data.Vector as V
18 -- this package
19 import Cryptsy.API.Public
21 main :: IO ()
22 main = either print return <=< defaultEvalPubCryptsy $ do
23 books <- orderData
24 liftIO . print . HM.size $ orderBooks (books :: OrderData)
25 omkts <- oldMarketData
26 liftIO . print . HM.size $ markets (omkts :: MarketData)
27 mkts <- marketData
28 liftIO . print . HM.size $ markets (mkts :: MarketData)
29 book <- singleOrderBook $ pack "113"
30 liftIO . print $ ( V.length $ obBuyOrders (book :: OrderBook)
31 , V.length $ obSellOrders book
33 market <- singleMarket $ pack "113"
34 liftIO . print $ ( V.length $ mktRecentTrades (market :: Market)
35 , V.length $ mktBuyOrders market
36 , V.length $ mktSellOrders market