1 module Main
(main
) where
4 import Control
.Monad
((<=<))
7 import Data
.Text
(pack
)
10 import Control
.Monad
.IO.Class
(liftIO
)
12 -- unordered-containers
13 import qualified Data
.HashMap
.Strict
as HM
16 import qualified Data
.Vector
as V
19 import Cryptsy
.API
.Public
22 main
= either print return <=< defaultEvalPubCryptsy
$ do
24 liftIO
. print . HM
.size
$ orderBooks
(books
:: OrderData
)
25 omkts
<- oldMarketData
26 liftIO
. print . HM
.size
$ markets
(omkts
:: 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