cryptsy-api-0.2.1: Bindings for Cryptsy cryptocurrency exchange API.

Safe HaskellNone
LanguageHaskell98

Cryptsy.API.Public.Types.Trade

Description

Type for individual executed trades from the API.

Synopsis

Documentation

data GTrade dt p q t Source

generalized trade

Constructors

Trade 

Fields

tradeId :: Text
 
tradeTime :: dt
 
tradePrice :: p
 
tradeQuantity :: q
 
tradeTotal :: t
 

Instances

(Show dt, Show p, Show q, Show t) => Show (GTrade dt p q t) 
(FromJSON dt, FromJSON p, FromJSON q, FromJSON t) => FromJSON (GTrade dt p q t) 

parseTrade Source

Arguments

:: (Value -> Parser dt)

date/time parser

-> (Value -> Parser p)

price parser

-> (Value -> Parser q)

quantity parser

-> (Value -> Parser t)

total parser

-> Value 
-> Parser (GTrade dt p q t) 

Combine component parsers into JSON Object parser.