mkTicker :: Int -> Text
mkTicker i = T.justifyLeft 5 'A' i' 
  where i' = T.pack ("S" ++ show i)


--instance Serialize MarketData where
--  put m = do
--    S.putByteString . T.encodeUtf16BE . ticker $ m
--    S.putFloat64be . price $ m
--    S.put . volume $ m
--    S.put . time $ m

--  get = MarketData <$> (T.decodeUtf16BE <$> S.getByteString 8)
--                   <*> S.getFloat64be
--                   <*> S.get
--                   <*> S.get
mkTicker :: Int -> Text
mkTicker i = T.justifyLeft 5 'A' i' 
  where i' = T.pack ("S" ++ show i)


--instance Serialize MarketData where
--  put m = do
--    S.putByteString . T.encodeUtf16BE . ticker $ m
--    S.putFloat64be . price $ m
--    S.put . volume $ m
--    S.put . time $ m

--  get = MarketData <$> (T.decodeUtf16BE <$> S.getByteString 8)
--                   <*> S.getFloat64be
--                   <*> S.get
--                   <*> S.get
mkTicker i = T.justifyLeft 5 'A' i' 
  where i' = T.pack ("S" ++ show i)


--instance Serialize MarketData where
--  put m = do
--    S.putByteString . T.encodeUtf16BE . ticker $ m
--    S.putFloat64be . price $ m
--    S.put . volume $ m
--    S.put . time $ m

--  get = MarketData <$> (T.decodeUtf16BE <$> S.getByteString 8)
--                   <*> S.getFloat64be
--                   <*> S.get
--                   <*> S.get