content: {-
     CoinAPI Market Data REST API
  
     No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
  
     OpenAPI Version: 3.0.4
     CoinAPI Market Data REST API API version: v1
     Contact: support@apibricks.io
     Generated by OpenAPI Generator (https://openapi-generator.tech)
  -}
  
  {-|
  Module : CoinAPIMarketDataREST.API.Quotes
  -}
  
  {-# LANGUAGE FlexibleContexts #-}
  {-# LANGUAGE FlexibleInstances #-}
  {-# LANGUAGE MonoLocalBinds #-}
  {-# LANGUAGE MultiParamTypeClasses #-}
  {-# LANGUAGE OverloadedStrings #-}
  {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
  
  module CoinAPIMarketDataREST.API.Quotes where
  
  import CoinAPIMarketDataREST.Core
  import CoinAPIMarketDataREST.MimeTypes
  import CoinAPIMarketDataREST.Model as M
  
  import qualified Data.Aeson as A
  import qualified Data.ByteString as B
  import qualified Data.ByteString.Lazy as BL
  import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep)
  import qualified Data.Foldable as P
  import qualified Data.Map as Map
  import qualified Data.Maybe as P
  import qualified Data.Proxy as P (Proxy(..))
  import qualified Data.Set as Set
  import qualified Data.String as P
  import qualified Data.Text as T
  import qualified Data.Text.Encoding as T
  import qualified Data.Text.Lazy as TL
  import qualified Data.Text.Lazy.Encoding as TL
  import qualified Data.Time as TI
  import qualified Network.HTTP.Client.MultipartFormData as NH
  import qualified Network.HTTP.Media as ME
  import qualified Network.HTTP.Types as NH
  import qualified Web.FormUrlEncoded as WH
  import qualified Web.HttpApiData as WH
  
  import Data.Text (Text)
  import GHC.Base ((<|>))
  
  import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor)
  import qualified Prelude as P
  
  -- * Operations
  
  
  -- ** Quotes
  
  -- *** v1QuotesCurrentGet
  
  -- | @GET \/v1\/quotes\/current@
  -- 
  -- Current data
  -- 
  -- Get current quotes for all symbols or for a specific symbol.              :::info When requesting current data for a specific symbol, output is not encapsulated into JSON array as only one item is returned. :::
  -- 
  -- AuthMethod: 'AuthApiKeyAPIKey', 'AuthBasicJWT'
  -- 
  v1QuotesCurrentGet
    :: Accept accept -- ^ request accept ('MimeType')
    -> CoinAPIMarketDataRESTRequest V1QuotesCurrentGet MimeNoContent [V1QuoteTrade] accept
  v1QuotesCurrentGet  _ =
    _mkRequest "GET" ["/v1/quotes/current"]
      `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAPIKey)
      `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJWT)
  
  data V1QuotesCurrentGet  
  
  -- | /Optional Param/ "filter_symbol_id" - Comma or semicolon delimited parts of symbol identifier used to filter response. (optional)
  instance HasOptionalParam V1QuotesCurrentGet FilterSymbolId where
    applyOptionalParam req (FilterSymbolId xs) =
      req `addQuery` toQuery ("filter_symbol_id", Just xs)
  -- | @application/json@
  instance Produces V1QuotesCurrentGet MimeJSON
  -- | @application/x-msgpack@
  instance Produces V1QuotesCurrentGet MimeXMsgpack
  -- | @text/json@
  instance Produces V1QuotesCurrentGet MimeTextJson
  -- | @text/plain@
  instance Produces V1QuotesCurrentGet MimePlainText
  
  
  -- *** v1QuotesLatestGet
  
  -- | @GET \/v1\/quotes\/latest@
  -- 
  -- Latest data
  -- 
  -- Get latest updates of the quotes up to 1 minute ago. Latest data is always returned in time descending order.
  -- 
  -- AuthMethod: 'AuthApiKeyAPIKey', 'AuthBasicJWT'
  -- 
  v1QuotesLatestGet
    :: Accept accept -- ^ request accept ('MimeType')
    -> CoinAPIMarketDataRESTRequest V1QuotesLatestGet MimeNoContent [V1Quote] accept
  v1QuotesLatestGet  _ =
    _mkRequest "GET" ["/v1/quotes/latest"]
      `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAPIKey)
      `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJWT)
  
  data V1QuotesLatestGet  
  
  -- | /Optional Param/ "filter_symbol_id" - Comma or semicolon delimited parts of symbol identifier used to filter response. (optional)
  instance HasOptionalParam V1QuotesLatestGet FilterSymbolId where
    applyOptionalParam req (FilterSymbolId xs) =
      req `addQuery` toQuery ("filter_symbol_id", Just xs)
  
  -- | /Optional Param/ "limit" - Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)
  instance HasOptionalParam V1QuotesLatestGet Limit where
    applyOptionalParam req (Limit xs) =
      req `addQuery` toQuery ("limit", Just xs)
  -- | @application/json@
  instance Produces V1QuotesLatestGet MimeJSON
  -- | @application/x-msgpack@
  instance Produces V1QuotesLatestGet MimeXMsgpack
  -- | @text/json@
  instance Produces V1QuotesLatestGet MimeTextJson
  -- | @text/plain@
  instance Produces V1QuotesLatestGet MimePlainText
  
  
  -- *** v1QuotesSymbolIdCurrentGet
  
  -- | @GET \/v1\/quotes\/{symbol_id}\/current@
  -- 
  -- Current quotes for a specific symbol
  -- 
  -- AuthMethod: 'AuthApiKeyAPIKey', 'AuthBasicJWT'
  -- 
  v1QuotesSymbolIdCurrentGet
    :: Accept accept -- ^ request accept ('MimeType')
    -> SymbolId -- ^ "symbolId" -  The symbol identifier (from the Metadata -> Symbols)
    -> CoinAPIMarketDataRESTRequest V1QuotesSymbolIdCurrentGet MimeNoContent V1QuoteTrade accept
  v1QuotesSymbolIdCurrentGet  _ (SymbolId symbolId) =
    _mkRequest "GET" ["/v1/quotes/",toPath symbolId,"/current"]
      `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAPIKey)
      `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJWT)
  
  data V1QuotesSymbolIdCurrentGet  
  -- | @application/json@
  instance Produces V1QuotesSymbolIdCurrentGet MimeJSON
  -- | @application/x-msgpack@
  instance Produces V1QuotesSymbolIdCurrentGet MimeXMsgpack
  -- | @text/json@
  instance Produces V1QuotesSymbolIdCurrentGet MimeTextJson
  -- | @text/plain@
  instance Produces V1QuotesSymbolIdCurrentGet MimePlainText
  
  
  -- *** v1QuotesSymbolIdHistoryGet
  
  -- | @GET \/v1\/quotes\/{symbol_id}\/history@
  -- 
  -- Historical data
  -- 
  -- Get historical quote updates within requested time range, returned in time ascending order.  :::warning The 'time_start' and 'time_end' parameters must be from the same day as this endpoint provides intraday data only for specific day. Please use the 'date' parameter instead for querying data for a specific day without filter. :::
  -- 
  -- AuthMethod: 'AuthApiKeyAPIKey', 'AuthBasicJWT'
  -- 
  v1QuotesSymbolIdHistoryGet
    :: Accept accept -- ^ request accept ('MimeType')
    -> SymbolId -- ^ "symbolId" -  Symbol identifier for requested timeseries (from the Metadata -> Symbols)
    -> CoinAPIMarketDataRESTRequest V1QuotesSymbolIdHistoryGet MimeNoContent [V1Quote] accept
  v1QuotesSymbolIdHistoryGet  _ (SymbolId symbolId) =
    _mkRequest "GET" ["/v1/quotes/",toPath symbolId,"/history"]
      `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAPIKey)
      `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJWT)
  
  data V1QuotesSymbolIdHistoryGet  
  
  -- | /Optional Param/ "date" - Date in ISO 8601, returned data is for the whole given day (preferred method, required if 'time_start' is not provided)
  instance HasOptionalParam V1QuotesSymbolIdHistoryGet ParamDate where
    applyOptionalParam req (ParamDate xs) =
      req `addQuery` toQuery ("date", Just xs)
  
  -- | /Optional Param/ "time_start" - Starting time in ISO 8601
  instance HasOptionalParam V1QuotesSymbolIdHistoryGet TimeStart where
    applyOptionalParam req (TimeStart xs) =
      req `addQuery` toQuery ("time_start", Just xs)
  
  -- | /Optional Param/ "time_end" - Timeseries ending time in ISO 8601
  instance HasOptionalParam V1QuotesSymbolIdHistoryGet TimeEnd where
    applyOptionalParam req (TimeEnd xs) =
      req `addQuery` toQuery ("time_end", Just xs)
  
  -- | /Optional Param/ "limit" - Amount of items to return (optional, minimum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)
  instance HasOptionalParam V1QuotesSymbolIdHistoryGet Limit where
    applyOptionalParam req (Limit xs) =
      req `addQuery` toQuery ("limit", Just xs)
  -- | @application/json@
  instance Produces V1QuotesSymbolIdHistoryGet MimeJSON
  -- | @application/x-msgpack@
  instance Produces V1QuotesSymbolIdHistoryGet MimeXMsgpack
  -- | @text/json@
  instance Produces V1QuotesSymbolIdHistoryGet MimeTextJson
  -- | @text/plain@
  instance Produces V1QuotesSymbolIdHistoryGet MimePlainText
  
  
  -- *** v1QuotesSymbolIdLatestGet
  
  -- | @GET \/v1\/quotes\/{symbol_id}\/latest@
  -- 
  -- Latest quote updates for a specific symbol
  -- 
  -- AuthMethod: 'AuthApiKeyAPIKey', 'AuthBasicJWT'
  -- 
  v1QuotesSymbolIdLatestGet
    :: Accept accept -- ^ request accept ('MimeType')
    -> SymbolId -- ^ "symbolId" -  Symbol identifier of requested timeseries (from the Metadata -> Symbols)
    -> CoinAPIMarketDataRESTRequest V1QuotesSymbolIdLatestGet MimeNoContent [V1Quote] accept
  v1QuotesSymbolIdLatestGet  _ (SymbolId symbolId) =
    _mkRequest "GET" ["/v1/quotes/",toPath symbolId,"/latest"]
      `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAPIKey)
      `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicJWT)
  
  data V1QuotesSymbolIdLatestGet  
  
  -- | /Optional Param/ "limit" - Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)
  instance HasOptionalParam V1QuotesSymbolIdLatestGet Limit where
    applyOptionalParam req (Limit xs) =
      req `addQuery` toQuery ("limit", Just xs)
  -- | @application/json@
  instance Produces V1QuotesSymbolIdLatestGet MimeJSON
  -- | @application/x-msgpack@
  instance Produces V1QuotesSymbolIdLatestGet MimeXMsgpack
  -- | @text/json@
  instance Produces V1QuotesSymbolIdLatestGet MimeTextJson
  -- | @text/plain@
  instance Produces V1QuotesSymbolIdLatestGet MimePlainText
  
  