|
|
|
|
@ -622,23 +622,23 @@ data Quotation =
@@ -622,23 +622,23 @@ data Quotation =
|
|
|
|
|
qSecId :: !Int |
|
|
|
|
, qBoard :: !T.Text |
|
|
|
|
, qSeccode :: !T.Text |
|
|
|
|
, qOpen :: !Double |
|
|
|
|
, qWaprice :: !Double |
|
|
|
|
, qBidDepth :: !Int |
|
|
|
|
, qBidDepthT :: !Int |
|
|
|
|
, qNumBids :: !Int |
|
|
|
|
, qOfferDepth :: !Int |
|
|
|
|
, qOfferDepthT :: !Int |
|
|
|
|
, qBid :: !Double |
|
|
|
|
, qOffer :: !Double |
|
|
|
|
, qNumOffers :: !Int |
|
|
|
|
, qNumTrades :: !Int |
|
|
|
|
, qVolToday :: !Int |
|
|
|
|
, qOpenPositions :: !Int |
|
|
|
|
, qLastPrice :: !Double |
|
|
|
|
, qQuantity :: !Int |
|
|
|
|
, qOpen :: !(Maybe Double) |
|
|
|
|
, qWaprice :: !(Maybe Double) |
|
|
|
|
, qBidDepth :: !(Maybe Int) |
|
|
|
|
, qBidDepthT :: !(Maybe Int) |
|
|
|
|
, qNumBids :: !(Maybe Int) |
|
|
|
|
, qOfferDepth :: !(Maybe Int) |
|
|
|
|
, qOfferDepthT :: !(Maybe Int) |
|
|
|
|
, qBid :: !(Maybe Double) |
|
|
|
|
, qOffer :: !(Maybe Double) |
|
|
|
|
, qNumOffers :: !(Maybe Int) |
|
|
|
|
, qNumTrades :: !(Maybe Int) |
|
|
|
|
, qVolToday :: !(Maybe Int) |
|
|
|
|
, qOpenPositions :: !(Maybe Int) |
|
|
|
|
, qLastPrice :: !(Maybe Double) |
|
|
|
|
, qQuantity :: !(Maybe Int) |
|
|
|
|
, qTimestamp :: !UTCTime |
|
|
|
|
, qValToday :: !Double |
|
|
|
|
, qValToday :: !(Maybe Double) |
|
|
|
|
} deriving (Show, Eq, Ord) |
|
|
|
|
|
|
|
|
|
newtype ResponseQuotations = |
|
|
|
|
@ -654,23 +654,23 @@ instance TransaqResponseC ResponseQuotations where
@@ -654,23 +654,23 @@ instance TransaqResponseC ResponseQuotations where
|
|
|
|
|
!qSecId <- findAttr (uname "secid") tag >>= readMaybe |
|
|
|
|
!qBoard <- T.pack <$> childContent "board" tag |
|
|
|
|
!qSeccode <- T.pack <$> childContent "seccode" tag |
|
|
|
|
!qOpen <- childContent "open" tag >>= readMaybe |
|
|
|
|
!qWaprice <- childContent "waprice" tag >>= readMaybe |
|
|
|
|
!qBidDepth <- childContent "biddepth" tag >>= readMaybe |
|
|
|
|
!qBidDepthT <- childContent "biddeptht" tag >>= readMaybe |
|
|
|
|
!qNumBids <- childContent "numbids" tag >>= readMaybe |
|
|
|
|
!qBid <- childContent "bid" tag >>= readMaybe |
|
|
|
|
!qOfferDepth <- childContent "offerdepth" tag >>= readMaybe |
|
|
|
|
!qOfferDepthT <- childContent "offerdeptht" tag >>= readMaybe |
|
|
|
|
!qNumOffers <- childContent "numoffers" tag >>= readMaybe |
|
|
|
|
!qOffer <- childContent "offer" tag >>= readMaybe |
|
|
|
|
!qNumTrades <- childContent "numtrades" tag >>= readMaybe |
|
|
|
|
!qVolToday <- childContent "voltoday" tag >>= readMaybe |
|
|
|
|
!qOpenPositions <- childContent "openpositions" tag >>= readMaybe |
|
|
|
|
!qLastPrice <- childContent "last" tag >>= readMaybe |
|
|
|
|
!qQuantity <- childContent "quantity" tag >>= readMaybe |
|
|
|
|
let !qOpen = childContent "open" tag >>= readMaybe |
|
|
|
|
let !qWaprice = childContent "waprice" tag >>= readMaybe |
|
|
|
|
let !qBidDepth = childContent "biddepth" tag >>= readMaybe |
|
|
|
|
let !qBidDepthT = childContent "biddeptht" tag >>= readMaybe |
|
|
|
|
let !qNumBids = childContent "numbids" tag >>= readMaybe |
|
|
|
|
let !qBid = childContent "bid" tag >>= readMaybe |
|
|
|
|
let !qOfferDepth = childContent "offerdepth" tag >>= readMaybe |
|
|
|
|
let !qOfferDepthT = childContent "offerdeptht" tag >>= readMaybe |
|
|
|
|
let !qNumOffers = childContent "numoffers" tag >>= readMaybe |
|
|
|
|
let !qOffer = childContent "offer" tag >>= readMaybe |
|
|
|
|
let !qNumTrades = childContent "numtrades" tag >>= readMaybe |
|
|
|
|
let !qVolToday = childContent "voltoday" tag >>= readMaybe |
|
|
|
|
let !qOpenPositions = childContent "openpositions" tag >>= readMaybe |
|
|
|
|
let !qLastPrice = childContent "last" tag >>= readMaybe |
|
|
|
|
let !qQuantity = childContent "quantity" tag >>= readMaybe |
|
|
|
|
!qTimestamp <- childContent "time" tag >>= (parseTimestamp . T.pack) |
|
|
|
|
!qValToday <- childContent "valToday" tag >>= readMaybe |
|
|
|
|
let !qValToday = childContent "valToday" tag >>= readMaybe |
|
|
|
|
pure $ Just Quotation {..} |
|
|
|
|
|
|
|
|
|
data TradingPeriod = |
|
|
|
|
|