taffybar-4.0.2: A desktop bar similar to xmobar, but with more GUI

Copyright | (c) Ivan A. Malison
License | BSD3-style (see LICENSE)
Maintainer | Ivan A. Malison
Stability | unstable
Portability | unportable
Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Taffybar.Information.Crypto

Description

This module provides utility functions for retrieving data about crypto assets.

# Documentation

getSymbolToCoinGeckoId :: MonadIO m => m (Map Text Text) Source #

newtype SymbolToCoinGeckoId Source #

Constructors

SymbolToCoinGeckoId (Map Text Text) |

newtype CryptoPriceInfo Source #

Constructors

CryptoPriceInfo |

Fields

- lastPrice :: Double

newtype CryptoPriceChannel (a :: Symbol) Source #

Constructors

CryptoPriceChannel (BroadcastChan In CryptoPriceInfo, MVar CryptoPriceInfo) |

getCryptoPriceChannel :: KnownSymbol a => TaffyIO (CryptoPriceChannel a) Source #

data CoinGeckoInfo Source #

Constructors

CoinGeckoInfo |

Fields

- identifier :: Text
- symbol :: Text

#### Instances

Instances details

FromJSON CoinGeckoInfo Source # |
Instance details Defined in System.Taffybar.Information.Crypto Methods parseJSON :: Value -> Parser CoinGeckoInfo Source # parseJSONList :: Value -> Parser [CoinGeckoInfo] Source #
Show CoinGeckoInfo Source # |
Instance details Defined in System.Taffybar.Information.Crypto Methods showsPrec :: Int -> CoinGeckoInfo -> ShowS Source # show :: CoinGeckoInfo -> String Source # showList :: [CoinGeckoInfo] -> ShowS Source #

buildCryptoPriceChannel :: forall a. KnownSymbol a => Double -> SymbolToCoinGeckoId -> TaffyIO (CryptoPriceChannel a) Source #

getLatestPrice :: MonadIO m => Text -> Text -> m (Maybe Double) Source #

getCryptoMeta :: MonadIO m => String -> String -> m ByteString Source #