Copyright | No Rights Reserved |
---|---|
License | Public Domain |
Maintainer | Tebello Thejane <zyxoas+hackage@gmail.com> |
Stability | Experimental |
Portability | non-portable (GHC Extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Usage example
As a small example, to get the current selling price of bitcoin on the BitX exchange, do the following:
{-# LANGUAGE QuasiQuotes #-} import Record.Lens import Record import Network.Bitcoin.BitX main = do bitXResponse <-getTicker
XBTZAR
case bitXResponse ofValidResponse
tic -> print (view
[lens| ask |] tic) _ -> error "Ah well..."
- getTicker :: CcyPair -> IO (BitXAPIResponse Ticker)
- getTickers :: IO (BitXAPIResponse [Ticker])
- getOrderBook :: CcyPair -> IO (BitXAPIResponse Orderbook)
- getTrades :: CcyPair -> IO (BitXAPIResponse [Trade])
Documentation
getTickers :: IO (BitXAPIResponse [Ticker]) Source
Returns the latest ticker indicators from all active BitX exchanges.
getOrderBook :: CcyPair -> IO (BitXAPIResponse Orderbook) Source
Returns a list of bids and asks in the order book.
Ask orders are sorted by price ascending. Bid orders are sorted by price descending. Note that multiple orders at the same price are not necessarily conflated.