{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-}
module BitMEX.API where
import BitMEX.Core
import BitMEX.MimeTypes
import BitMEX.Model as M
import qualified Data.Aeson as A
import qualified Data.ByteString as B
import qualified Data.ByteString.Base64 as B64
import qualified Data.ByteString.Char8 as BC
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 GHC.Base as P (Alternative)
import qualified Lens.Micro as L
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.Monoid ((<>))
import Data.Function ((&))
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
aPIKeyDisable
:: (Consumes APIKeyDisable contentType)
=> ContentType contentType
-> Accept accept
-> ApiKeyId
-> BitMEXRequest APIKeyDisable contentType APIKey accept
aPIKeyDisable _ _ (ApiKeyId apiKeyId) =
_mkRequest "POST" ["/apiKey/disable"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("apiKeyID", apiKeyId)
data APIKeyDisable
instance Consumes APIKeyDisable MimeJSON
instance Consumes APIKeyDisable MimeFormUrlEncoded
instance Produces APIKeyDisable MimeJSON
instance Produces APIKeyDisable MimeXML
instance Produces APIKeyDisable MimeTextxml
instance Produces APIKeyDisable MimeJavascript
instance Produces APIKeyDisable MimeTextjavascript
aPIKeyEnable
:: (Consumes APIKeyEnable contentType)
=> ContentType contentType
-> Accept accept
-> ApiKeyId
-> BitMEXRequest APIKeyEnable contentType APIKey accept
aPIKeyEnable _ _ (ApiKeyId apiKeyId) =
_mkRequest "POST" ["/apiKey/enable"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("apiKeyID", apiKeyId)
data APIKeyEnable
instance Consumes APIKeyEnable MimeJSON
instance Consumes APIKeyEnable MimeFormUrlEncoded
instance Produces APIKeyEnable MimeJSON
instance Produces APIKeyEnable MimeXML
instance Produces APIKeyEnable MimeTextxml
instance Produces APIKeyEnable MimeJavascript
instance Produces APIKeyEnable MimeTextjavascript
aPIKeyGet
:: Accept accept
-> BitMEXRequest APIKeyGet MimeNoContent [APIKey] accept
aPIKeyGet _ =
_mkRequest "GET" ["/apiKey"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data APIKeyGet
instance HasOptionalParam APIKeyGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance Consumes APIKeyGet MimeJSON
instance Consumes APIKeyGet MimeFormUrlEncoded
instance Produces APIKeyGet MimeJSON
instance Produces APIKeyGet MimeXML
instance Produces APIKeyGet MimeTextxml
instance Produces APIKeyGet MimeJavascript
instance Produces APIKeyGet MimeTextjavascript
aPIKeyNew
:: (Consumes APIKeyNew contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest APIKeyNew contentType APIKey accept
aPIKeyNew _ _ =
_mkRequest "POST" ["/apiKey"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data APIKeyNew
instance HasOptionalParam APIKeyNew Name where
applyOptionalParam req (Name xs) =
req `addForm` toForm ("name", xs)
instance HasOptionalParam APIKeyNew Cidr where
applyOptionalParam req (Cidr xs) =
req `addForm` toForm ("cidr", xs)
instance HasOptionalParam APIKeyNew Permissions where
applyOptionalParam req (Permissions xs) =
req `addForm` toForm ("permissions", xs)
instance HasOptionalParam APIKeyNew Enabled where
applyOptionalParam req (Enabled xs) =
req `addForm` toForm ("enabled", xs)
instance HasOptionalParam APIKeyNew Token where
applyOptionalParam req (Token xs) =
req `addForm` toForm ("token", xs)
instance Consumes APIKeyNew MimeJSON
instance Consumes APIKeyNew MimeFormUrlEncoded
instance Produces APIKeyNew MimeJSON
instance Produces APIKeyNew MimeXML
instance Produces APIKeyNew MimeTextxml
instance Produces APIKeyNew MimeJavascript
instance Produces APIKeyNew MimeTextjavascript
aPIKeyRemove
:: (Consumes APIKeyRemove contentType)
=> ContentType contentType
-> Accept accept
-> ApiKeyId
-> BitMEXRequest APIKeyRemove contentType InlineResponse200 accept
aPIKeyRemove _ _ (ApiKeyId apiKeyId) =
_mkRequest "DELETE" ["/apiKey"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("apiKeyID", apiKeyId)
data APIKeyRemove
instance Consumes APIKeyRemove MimeJSON
instance Consumes APIKeyRemove MimeFormUrlEncoded
instance Produces APIKeyRemove MimeJSON
instance Produces APIKeyRemove MimeXML
instance Produces APIKeyRemove MimeTextxml
instance Produces APIKeyRemove MimeJavascript
instance Produces APIKeyRemove MimeTextjavascript
announcementGet
:: Accept accept
-> BitMEXRequest AnnouncementGet MimeNoContent [Announcement] accept
announcementGet _ =
_mkRequest "GET" ["/announcement"]
data AnnouncementGet
instance HasOptionalParam AnnouncementGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance Consumes AnnouncementGet MimeJSON
instance Consumes AnnouncementGet MimeFormUrlEncoded
instance Produces AnnouncementGet MimeJSON
instance Produces AnnouncementGet MimeXML
instance Produces AnnouncementGet MimeTextxml
instance Produces AnnouncementGet MimeJavascript
instance Produces AnnouncementGet MimeTextjavascript
announcementGetUrgent
:: Accept accept
-> BitMEXRequest AnnouncementGetUrgent MimeNoContent [Announcement] accept
announcementGetUrgent _ =
_mkRequest "GET" ["/announcement/urgent"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data AnnouncementGetUrgent
instance Consumes AnnouncementGetUrgent MimeJSON
instance Consumes AnnouncementGetUrgent MimeFormUrlEncoded
instance Produces AnnouncementGetUrgent MimeJSON
instance Produces AnnouncementGetUrgent MimeXML
instance Produces AnnouncementGetUrgent MimeTextxml
instance Produces AnnouncementGetUrgent MimeJavascript
instance Produces AnnouncementGetUrgent MimeTextjavascript
chatGet
:: Accept accept
-> BitMEXRequest ChatGet MimeNoContent [Chat] accept
chatGet _ =
_mkRequest "GET" ["/chat"]
data ChatGet
instance HasOptionalParam ChatGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam ChatGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam ChatGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam ChatGet ChannelId where
applyOptionalParam req (ChannelId xs) =
req `setQuery` toQuery ("channelID", Just xs)
instance Consumes ChatGet MimeJSON
instance Consumes ChatGet MimeFormUrlEncoded
instance Produces ChatGet MimeJSON
instance Produces ChatGet MimeXML
instance Produces ChatGet MimeTextxml
instance Produces ChatGet MimeJavascript
instance Produces ChatGet MimeTextjavascript
chatGetChannels
:: Accept accept
-> BitMEXRequest ChatGetChannels MimeNoContent [ChatChannels] accept
chatGetChannels _ =
_mkRequest "GET" ["/chat/channels"]
data ChatGetChannels
instance Consumes ChatGetChannels MimeJSON
instance Consumes ChatGetChannels MimeFormUrlEncoded
instance Produces ChatGetChannels MimeJSON
instance Produces ChatGetChannels MimeXML
instance Produces ChatGetChannels MimeTextxml
instance Produces ChatGetChannels MimeJavascript
instance Produces ChatGetChannels MimeTextjavascript
chatGetConnected
:: Accept accept
-> BitMEXRequest ChatGetConnected MimeNoContent ConnectedUsers accept
chatGetConnected _ =
_mkRequest "GET" ["/chat/connected"]
data ChatGetConnected
instance Consumes ChatGetConnected MimeJSON
instance Consumes ChatGetConnected MimeFormUrlEncoded
instance Produces ChatGetConnected MimeJSON
instance Produces ChatGetConnected MimeXML
instance Produces ChatGetConnected MimeTextxml
instance Produces ChatGetConnected MimeJavascript
instance Produces ChatGetConnected MimeTextjavascript
chatNew
:: (Consumes ChatNew contentType)
=> ContentType contentType
-> Accept accept
-> Message
-> BitMEXRequest ChatNew contentType Chat accept
chatNew _ _ (Message message) =
_mkRequest "POST" ["/chat"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("message", message)
data ChatNew
instance HasOptionalParam ChatNew ChannelId where
applyOptionalParam req (ChannelId xs) =
req `addForm` toForm ("channelID", xs)
instance Consumes ChatNew MimeJSON
instance Consumes ChatNew MimeFormUrlEncoded
instance Produces ChatNew MimeJSON
instance Produces ChatNew MimeXML
instance Produces ChatNew MimeTextxml
instance Produces ChatNew MimeJavascript
instance Produces ChatNew MimeTextjavascript
executionGet
:: Accept accept
-> BitMEXRequest ExecutionGet MimeNoContent [Execution] accept
executionGet _ =
_mkRequest "GET" ["/execution"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data ExecutionGet
instance HasOptionalParam ExecutionGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam ExecutionGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam ExecutionGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam ExecutionGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam ExecutionGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam ExecutionGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam ExecutionGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam ExecutionGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes ExecutionGet MimeJSON
instance Consumes ExecutionGet MimeFormUrlEncoded
instance Produces ExecutionGet MimeJSON
instance Produces ExecutionGet MimeXML
instance Produces ExecutionGet MimeTextxml
instance Produces ExecutionGet MimeJavascript
instance Produces ExecutionGet MimeTextjavascript
executionGetTradeHistory
:: Accept accept
-> BitMEXRequest ExecutionGetTradeHistory MimeNoContent [Execution] accept
executionGetTradeHistory _ =
_mkRequest "GET" ["/execution/tradeHistory"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data ExecutionGetTradeHistory
instance HasOptionalParam ExecutionGetTradeHistory Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam ExecutionGetTradeHistory Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam ExecutionGetTradeHistory Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam ExecutionGetTradeHistory Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam ExecutionGetTradeHistory Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam ExecutionGetTradeHistory Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam ExecutionGetTradeHistory StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam ExecutionGetTradeHistory EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes ExecutionGetTradeHistory MimeJSON
instance Consumes ExecutionGetTradeHistory MimeFormUrlEncoded
instance Produces ExecutionGetTradeHistory MimeJSON
instance Produces ExecutionGetTradeHistory MimeXML
instance Produces ExecutionGetTradeHistory MimeTextxml
instance Produces ExecutionGetTradeHistory MimeJavascript
instance Produces ExecutionGetTradeHistory MimeTextjavascript
fundingGet
:: Accept accept
-> BitMEXRequest FundingGet MimeNoContent [Funding] accept
fundingGet _ =
_mkRequest "GET" ["/funding"]
data FundingGet
instance HasOptionalParam FundingGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam FundingGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam FundingGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam FundingGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam FundingGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam FundingGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam FundingGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam FundingGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes FundingGet MimeJSON
instance Consumes FundingGet MimeFormUrlEncoded
instance Produces FundingGet MimeJSON
instance Produces FundingGet MimeXML
instance Produces FundingGet MimeTextxml
instance Produces FundingGet MimeJavascript
instance Produces FundingGet MimeTextjavascript
instrumentGet
:: Accept accept
-> BitMEXRequest InstrumentGet MimeNoContent [Instrument] accept
instrumentGet _ =
_mkRequest "GET" ["/instrument"]
data InstrumentGet
instance HasOptionalParam InstrumentGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam InstrumentGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam InstrumentGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam InstrumentGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam InstrumentGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam InstrumentGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam InstrumentGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam InstrumentGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes InstrumentGet MimeJSON
instance Consumes InstrumentGet MimeFormUrlEncoded
instance Produces InstrumentGet MimeJSON
instance Produces InstrumentGet MimeXML
instance Produces InstrumentGet MimeTextxml
instance Produces InstrumentGet MimeJavascript
instance Produces InstrumentGet MimeTextjavascript
instrumentGetActive
:: Accept accept
-> BitMEXRequest InstrumentGetActive MimeNoContent [Instrument] accept
instrumentGetActive _ =
_mkRequest "GET" ["/instrument/active"]
data InstrumentGetActive
instance Consumes InstrumentGetActive MimeJSON
instance Consumes InstrumentGetActive MimeFormUrlEncoded
instance Produces InstrumentGetActive MimeJSON
instance Produces InstrumentGetActive MimeXML
instance Produces InstrumentGetActive MimeTextxml
instance Produces InstrumentGetActive MimeJavascript
instance Produces InstrumentGetActive MimeTextjavascript
instrumentGetActiveAndIndices
:: Accept accept
-> BitMEXRequest InstrumentGetActiveAndIndices MimeNoContent [Instrument] accept
instrumentGetActiveAndIndices _ =
_mkRequest "GET" ["/instrument/activeAndIndices"]
data InstrumentGetActiveAndIndices
instance Consumes InstrumentGetActiveAndIndices MimeJSON
instance Consumes InstrumentGetActiveAndIndices MimeFormUrlEncoded
instance Produces InstrumentGetActiveAndIndices MimeJSON
instance Produces InstrumentGetActiveAndIndices MimeXML
instance Produces InstrumentGetActiveAndIndices MimeTextxml
instance Produces InstrumentGetActiveAndIndices MimeJavascript
instance Produces InstrumentGetActiveAndIndices MimeTextjavascript
instrumentGetActiveIntervals
:: Accept accept
-> BitMEXRequest InstrumentGetActiveIntervals MimeNoContent InstrumentInterval accept
instrumentGetActiveIntervals _ =
_mkRequest "GET" ["/instrument/activeIntervals"]
data InstrumentGetActiveIntervals
instance Consumes InstrumentGetActiveIntervals MimeJSON
instance Consumes InstrumentGetActiveIntervals MimeFormUrlEncoded
instance Produces InstrumentGetActiveIntervals MimeJSON
instance Produces InstrumentGetActiveIntervals MimeXML
instance Produces InstrumentGetActiveIntervals MimeTextxml
instance Produces InstrumentGetActiveIntervals MimeJavascript
instance Produces InstrumentGetActiveIntervals MimeTextjavascript
instrumentGetCompositeIndex
:: Accept accept
-> BitMEXRequest InstrumentGetCompositeIndex MimeNoContent [IndexComposite] accept
instrumentGetCompositeIndex _ =
_mkRequest "GET" ["/instrument/compositeIndex"]
data InstrumentGetCompositeIndex
instance HasOptionalParam InstrumentGetCompositeIndex Account where
applyOptionalParam req (Account xs) =
req `setQuery` toQuery ("account", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam InstrumentGetCompositeIndex EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes InstrumentGetCompositeIndex MimeJSON
instance Consumes InstrumentGetCompositeIndex MimeFormUrlEncoded
instance Produces InstrumentGetCompositeIndex MimeJSON
instance Produces InstrumentGetCompositeIndex MimeXML
instance Produces InstrumentGetCompositeIndex MimeTextxml
instance Produces InstrumentGetCompositeIndex MimeJavascript
instance Produces InstrumentGetCompositeIndex MimeTextjavascript
instrumentGetIndices
:: Accept accept
-> BitMEXRequest InstrumentGetIndices MimeNoContent [Instrument] accept
instrumentGetIndices _ =
_mkRequest "GET" ["/instrument/indices"]
data InstrumentGetIndices
instance Consumes InstrumentGetIndices MimeJSON
instance Consumes InstrumentGetIndices MimeFormUrlEncoded
instance Produces InstrumentGetIndices MimeJSON
instance Produces InstrumentGetIndices MimeXML
instance Produces InstrumentGetIndices MimeTextxml
instance Produces InstrumentGetIndices MimeJavascript
instance Produces InstrumentGetIndices MimeTextjavascript
insuranceGet
:: Accept accept
-> BitMEXRequest InsuranceGet MimeNoContent [Insurance] accept
insuranceGet _ =
_mkRequest "GET" ["/insurance"]
data InsuranceGet
instance HasOptionalParam InsuranceGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam InsuranceGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam InsuranceGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam InsuranceGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam InsuranceGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam InsuranceGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam InsuranceGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam InsuranceGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes InsuranceGet MimeJSON
instance Consumes InsuranceGet MimeFormUrlEncoded
instance Produces InsuranceGet MimeJSON
instance Produces InsuranceGet MimeXML
instance Produces InsuranceGet MimeTextxml
instance Produces InsuranceGet MimeJavascript
instance Produces InsuranceGet MimeTextjavascript
leaderboardGet
:: Accept accept
-> BitMEXRequest LeaderboardGet MimeNoContent [Leaderboard] accept
leaderboardGet _ =
_mkRequest "GET" ["/leaderboard"]
data LeaderboardGet
instance HasOptionalParam LeaderboardGet Method where
applyOptionalParam req (Method xs) =
req `setQuery` toQuery ("method", Just xs)
instance Consumes LeaderboardGet MimeJSON
instance Consumes LeaderboardGet MimeFormUrlEncoded
instance Produces LeaderboardGet MimeJSON
instance Produces LeaderboardGet MimeXML
instance Produces LeaderboardGet MimeTextxml
instance Produces LeaderboardGet MimeJavascript
instance Produces LeaderboardGet MimeTextjavascript
liquidationGet
:: Accept accept
-> BitMEXRequest LiquidationGet MimeNoContent [Liquidation] accept
liquidationGet _ =
_mkRequest "GET" ["/liquidation"]
data LiquidationGet
instance HasOptionalParam LiquidationGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam LiquidationGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam LiquidationGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam LiquidationGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam LiquidationGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam LiquidationGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam LiquidationGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam LiquidationGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes LiquidationGet MimeJSON
instance Consumes LiquidationGet MimeFormUrlEncoded
instance Produces LiquidationGet MimeJSON
instance Produces LiquidationGet MimeXML
instance Produces LiquidationGet MimeTextxml
instance Produces LiquidationGet MimeJavascript
instance Produces LiquidationGet MimeTextjavascript
notificationGet
:: Accept accept
-> BitMEXRequest NotificationGet MimeNoContent [Notification] accept
notificationGet _ =
_mkRequest "GET" ["/notification"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data NotificationGet
instance Consumes NotificationGet MimeJSON
instance Consumes NotificationGet MimeFormUrlEncoded
instance Produces NotificationGet MimeJSON
instance Produces NotificationGet MimeXML
instance Produces NotificationGet MimeTextxml
instance Produces NotificationGet MimeJavascript
instance Produces NotificationGet MimeTextjavascript
orderAmend
:: (Consumes OrderAmend contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest OrderAmend contentType Order accept
orderAmend _ _ =
_mkRequest "PUT" ["/order"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data OrderAmend
instance HasOptionalParam OrderAmend OrderId where
applyOptionalParam req (OrderId xs) =
req `addForm` toForm ("orderID", xs)
instance HasOptionalParam OrderAmend OrigClOrdId where
applyOptionalParam req (OrigClOrdId xs) =
req `addForm` toForm ("origClOrdID", xs)
instance HasOptionalParam OrderAmend ClOrdId where
applyOptionalParam req (ClOrdId xs) =
req `addForm` toForm ("clOrdID", xs)
instance HasOptionalParam OrderAmend SimpleOrderQty where
applyOptionalParam req (SimpleOrderQty xs) =
req `addForm` toForm ("simpleOrderQty", xs)
instance HasOptionalParam OrderAmend OrderQty where
applyOptionalParam req (OrderQty xs) =
req `addForm` toForm ("orderQty", xs)
instance HasOptionalParam OrderAmend SimpleLeavesQty where
applyOptionalParam req (SimpleLeavesQty xs) =
req `addForm` toForm ("simpleLeavesQty", xs)
instance HasOptionalParam OrderAmend LeavesQty where
applyOptionalParam req (LeavesQty xs) =
req `addForm` toForm ("leavesQty", xs)
instance HasOptionalParam OrderAmend Price where
applyOptionalParam req (Price xs) =
req `addForm` toForm ("price", xs)
instance HasOptionalParam OrderAmend StopPx where
applyOptionalParam req (StopPx xs) =
req `addForm` toForm ("stopPx", xs)
instance HasOptionalParam OrderAmend PegOffsetValue where
applyOptionalParam req (PegOffsetValue xs) =
req `addForm` toForm ("pegOffsetValue", xs)
instance HasOptionalParam OrderAmend ParamText where
applyOptionalParam req (ParamText xs) =
req `addForm` toForm ("text", xs)
instance Consumes OrderAmend MimeJSON
instance Consumes OrderAmend MimeFormUrlEncoded
instance Produces OrderAmend MimeJSON
instance Produces OrderAmend MimeXML
instance Produces OrderAmend MimeTextxml
instance Produces OrderAmend MimeJavascript
instance Produces OrderAmend MimeTextjavascript
orderAmendBulk
:: (Consumes OrderAmendBulk contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest OrderAmendBulk contentType [Order] accept
orderAmendBulk _ _ =
_mkRequest "PUT" ["/order/bulk"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data OrderAmendBulk
instance HasOptionalParam OrderAmendBulk Orders where
applyOptionalParam req (Orders xs) =
req `addForm` toForm ("orders", xs)
instance Consumes OrderAmendBulk MimeJSON
instance Consumes OrderAmendBulk MimeFormUrlEncoded
instance Produces OrderAmendBulk MimeJSON
instance Produces OrderAmendBulk MimeXML
instance Produces OrderAmendBulk MimeTextxml
instance Produces OrderAmendBulk MimeJavascript
instance Produces OrderAmendBulk MimeTextjavascript
orderCancel
:: (Consumes OrderCancel contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest OrderCancel contentType [Order] accept
orderCancel _ _ =
_mkRequest "DELETE" ["/order"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data OrderCancel
instance HasOptionalParam OrderCancel OrderId where
applyOptionalParam req (OrderId xs) =
req `addForm` toForm ("orderID", xs)
instance HasOptionalParam OrderCancel ClOrdId where
applyOptionalParam req (ClOrdId xs) =
req `addForm` toForm ("clOrdID", xs)
instance HasOptionalParam OrderCancel ParamText where
applyOptionalParam req (ParamText xs) =
req `addForm` toForm ("text", xs)
instance Consumes OrderCancel MimeJSON
instance Consumes OrderCancel MimeFormUrlEncoded
instance Produces OrderCancel MimeJSON
instance Produces OrderCancel MimeXML
instance Produces OrderCancel MimeTextxml
instance Produces OrderCancel MimeJavascript
instance Produces OrderCancel MimeTextjavascript
orderCancelAll
:: (Consumes OrderCancelAll contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest OrderCancelAll contentType A.Value accept
orderCancelAll _ _ =
_mkRequest "DELETE" ["/order/all"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data OrderCancelAll
instance HasOptionalParam OrderCancelAll Symbol where
applyOptionalParam req (Symbol xs) =
req `addForm` toForm ("symbol", xs)
instance HasOptionalParam OrderCancelAll Filter where
applyOptionalParam req (Filter xs) =
req `addForm` toForm ("filter", xs)
instance HasOptionalParam OrderCancelAll ParamText where
applyOptionalParam req (ParamText xs) =
req `addForm` toForm ("text", xs)
instance Consumes OrderCancelAll MimeJSON
instance Consumes OrderCancelAll MimeFormUrlEncoded
instance Produces OrderCancelAll MimeJSON
instance Produces OrderCancelAll MimeXML
instance Produces OrderCancelAll MimeTextxml
instance Produces OrderCancelAll MimeJavascript
instance Produces OrderCancelAll MimeTextjavascript
orderCancelAllAfter
:: (Consumes OrderCancelAllAfter contentType)
=> ContentType contentType
-> Accept accept
-> Timeout
-> BitMEXRequest OrderCancelAllAfter contentType A.Value accept
orderCancelAllAfter _ _ (Timeout timeout) =
_mkRequest "POST" ["/order/cancelAllAfter"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("timeout", timeout)
data OrderCancelAllAfter
instance Consumes OrderCancelAllAfter MimeJSON
instance Consumes OrderCancelAllAfter MimeFormUrlEncoded
instance Produces OrderCancelAllAfter MimeJSON
instance Produces OrderCancelAllAfter MimeXML
instance Produces OrderCancelAllAfter MimeTextxml
instance Produces OrderCancelAllAfter MimeJavascript
instance Produces OrderCancelAllAfter MimeTextjavascript
orderClosePosition
:: (Consumes OrderClosePosition contentType)
=> ContentType contentType
-> Accept accept
-> Symbol
-> BitMEXRequest OrderClosePosition contentType Order accept
orderClosePosition _ _ (Symbol symbol) =
_mkRequest "POST" ["/order/closePosition"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("symbol", symbol)
data OrderClosePosition
instance HasOptionalParam OrderClosePosition Price where
applyOptionalParam req (Price xs) =
req `addForm` toForm ("price", xs)
instance Consumes OrderClosePosition MimeJSON
instance Consumes OrderClosePosition MimeFormUrlEncoded
instance Produces OrderClosePosition MimeJSON
instance Produces OrderClosePosition MimeXML
instance Produces OrderClosePosition MimeTextxml
instance Produces OrderClosePosition MimeJavascript
instance Produces OrderClosePosition MimeTextjavascript
orderGetOrders
:: Accept accept
-> BitMEXRequest OrderGetOrders MimeNoContent [Order] accept
orderGetOrders _ =
_mkRequest "GET" ["/order"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data OrderGetOrders
instance HasOptionalParam OrderGetOrders Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam OrderGetOrders Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam OrderGetOrders Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam OrderGetOrders Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam OrderGetOrders Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam OrderGetOrders Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam OrderGetOrders StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam OrderGetOrders EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes OrderGetOrders MimeJSON
instance Consumes OrderGetOrders MimeFormUrlEncoded
instance Produces OrderGetOrders MimeJSON
instance Produces OrderGetOrders MimeXML
instance Produces OrderGetOrders MimeTextxml
instance Produces OrderGetOrders MimeJavascript
instance Produces OrderGetOrders MimeTextjavascript
orderNew
:: (Consumes OrderNew contentType)
=> ContentType contentType
-> Accept accept
-> Symbol
-> BitMEXRequest OrderNew contentType Order accept
orderNew _ _ (Symbol symbol) =
_mkRequest "POST" ["/order"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("symbol", symbol)
data OrderNew
instance HasOptionalParam OrderNew Side where
applyOptionalParam req (Side xs) =
req `addForm` toForm ("side", xs)
instance HasOptionalParam OrderNew SimpleOrderQty where
applyOptionalParam req (SimpleOrderQty xs) =
req `addForm` toForm ("simpleOrderQty", xs)
instance HasOptionalParam OrderNew Quantity where
applyOptionalParam req (Quantity xs) =
req `addForm` toForm ("quantity", xs)
instance HasOptionalParam OrderNew OrderQty where
applyOptionalParam req (OrderQty xs) =
req `addForm` toForm ("orderQty", xs)
instance HasOptionalParam OrderNew Price where
applyOptionalParam req (Price xs) =
req `addForm` toForm ("price", xs)
instance HasOptionalParam OrderNew DisplayQty where
applyOptionalParam req (DisplayQty xs) =
req `addForm` toForm ("displayQty", xs)
instance HasOptionalParam OrderNew StopPrice where
applyOptionalParam req (StopPrice xs) =
req `addForm` toForm ("stopPrice", xs)
instance HasOptionalParam OrderNew StopPx where
applyOptionalParam req (StopPx xs) =
req `addForm` toForm ("stopPx", xs)
instance HasOptionalParam OrderNew ClOrdId where
applyOptionalParam req (ClOrdId xs) =
req `addForm` toForm ("clOrdID", xs)
instance HasOptionalParam OrderNew ClOrdLinkId where
applyOptionalParam req (ClOrdLinkId xs) =
req `addForm` toForm ("clOrdLinkID", xs)
instance HasOptionalParam OrderNew PegOffsetValue where
applyOptionalParam req (PegOffsetValue xs) =
req `addForm` toForm ("pegOffsetValue", xs)
instance HasOptionalParam OrderNew PegPriceType where
applyOptionalParam req (PegPriceType xs) =
req `addForm` toForm ("pegPriceType", xs)
instance HasOptionalParam OrderNew ParamType where
applyOptionalParam req (ParamType xs) =
req `addForm` toForm ("type", xs)
instance HasOptionalParam OrderNew OrdType where
applyOptionalParam req (OrdType xs) =
req `addForm` toForm ("ordType", xs)
instance HasOptionalParam OrderNew TimeInForce where
applyOptionalParam req (TimeInForce xs) =
req `addForm` toForm ("timeInForce", xs)
instance HasOptionalParam OrderNew ExecInst where
applyOptionalParam req (ExecInst xs) =
req `addForm` toForm ("execInst", xs)
instance HasOptionalParam OrderNew ContingencyType where
applyOptionalParam req (ContingencyType xs) =
req `addForm` toForm ("contingencyType", xs)
instance HasOptionalParam OrderNew ParamText where
applyOptionalParam req (ParamText xs) =
req `addForm` toForm ("text", xs)
instance Consumes OrderNew MimeJSON
instance Consumes OrderNew MimeFormUrlEncoded
instance Produces OrderNew MimeJSON
instance Produces OrderNew MimeXML
instance Produces OrderNew MimeTextxml
instance Produces OrderNew MimeJavascript
instance Produces OrderNew MimeTextjavascript
orderNewBulk
:: (Consumes OrderNewBulk contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest OrderNewBulk contentType [Order] accept
orderNewBulk _ _ =
_mkRequest "POST" ["/order/bulk"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data OrderNewBulk
instance HasOptionalParam OrderNewBulk Orders where
applyOptionalParam req (Orders xs) =
req `addForm` toForm ("orders", xs)
instance Consumes OrderNewBulk MimeJSON
instance Consumes OrderNewBulk MimeFormUrlEncoded
instance Produces OrderNewBulk MimeJSON
instance Produces OrderNewBulk MimeXML
instance Produces OrderNewBulk MimeTextxml
instance Produces OrderNewBulk MimeJavascript
instance Produces OrderNewBulk MimeTextjavascript
orderBookGet
:: Accept accept
-> Symbol
-> BitMEXRequest OrderBookGet MimeNoContent [OrderBook] accept
orderBookGet _ (Symbol symbol) =
_mkRequest "GET" ["/orderBook"]
`setQuery` toQuery ("symbol", Just symbol)
data OrderBookGet
instance HasOptionalParam OrderBookGet Depth where
applyOptionalParam req (Depth xs) =
req `setQuery` toQuery ("depth", Just xs)
instance Consumes OrderBookGet MimeJSON
instance Consumes OrderBookGet MimeFormUrlEncoded
instance Produces OrderBookGet MimeJSON
instance Produces OrderBookGet MimeXML
instance Produces OrderBookGet MimeTextxml
instance Produces OrderBookGet MimeJavascript
instance Produces OrderBookGet MimeTextjavascript
orderBookGetL2
:: Accept accept
-> Symbol
-> BitMEXRequest OrderBookGetL2 MimeNoContent [OrderBookL2] accept
orderBookGetL2 _ (Symbol symbol) =
_mkRequest "GET" ["/orderBook/L2"]
`setQuery` toQuery ("symbol", Just symbol)
data OrderBookGetL2
instance HasOptionalParam OrderBookGetL2 Depth where
applyOptionalParam req (Depth xs) =
req `setQuery` toQuery ("depth", Just xs)
instance Consumes OrderBookGetL2 MimeJSON
instance Consumes OrderBookGetL2 MimeFormUrlEncoded
instance Produces OrderBookGetL2 MimeJSON
instance Produces OrderBookGetL2 MimeXML
instance Produces OrderBookGetL2 MimeTextxml
instance Produces OrderBookGetL2 MimeJavascript
instance Produces OrderBookGetL2 MimeTextjavascript
positionGet
:: Accept accept
-> BitMEXRequest PositionGet MimeNoContent [Position] accept
positionGet _ =
_mkRequest "GET" ["/position"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data PositionGet
instance HasOptionalParam PositionGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam PositionGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam PositionGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance Consumes PositionGet MimeJSON
instance Consumes PositionGet MimeFormUrlEncoded
instance Produces PositionGet MimeJSON
instance Produces PositionGet MimeXML
instance Produces PositionGet MimeTextxml
instance Produces PositionGet MimeJavascript
instance Produces PositionGet MimeTextjavascript
positionIsolateMargin
:: (Consumes PositionIsolateMargin contentType)
=> ContentType contentType
-> Accept accept
-> Symbol
-> BitMEXRequest PositionIsolateMargin contentType Position accept
positionIsolateMargin _ _ (Symbol symbol) =
_mkRequest "POST" ["/position/isolate"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("symbol", symbol)
data PositionIsolateMargin
instance HasOptionalParam PositionIsolateMargin Enabled where
applyOptionalParam req (Enabled xs) =
req `addForm` toForm ("enabled", xs)
instance Consumes PositionIsolateMargin MimeJSON
instance Consumes PositionIsolateMargin MimeFormUrlEncoded
instance Produces PositionIsolateMargin MimeJSON
instance Produces PositionIsolateMargin MimeXML
instance Produces PositionIsolateMargin MimeTextxml
instance Produces PositionIsolateMargin MimeJavascript
instance Produces PositionIsolateMargin MimeTextjavascript
positionTransferIsolatedMargin
:: (Consumes PositionTransferIsolatedMargin contentType)
=> ContentType contentType
-> Accept accept
-> Symbol
-> Amount
-> BitMEXRequest PositionTransferIsolatedMargin contentType Position accept
positionTransferIsolatedMargin _ _ (Symbol symbol) (Amount amount) =
_mkRequest "POST" ["/position/transferMargin"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("symbol", symbol)
`addForm` toForm ("amount", amount)
data PositionTransferIsolatedMargin
instance Consumes PositionTransferIsolatedMargin MimeJSON
instance Consumes PositionTransferIsolatedMargin MimeFormUrlEncoded
instance Produces PositionTransferIsolatedMargin MimeJSON
instance Produces PositionTransferIsolatedMargin MimeXML
instance Produces PositionTransferIsolatedMargin MimeTextxml
instance Produces PositionTransferIsolatedMargin MimeJavascript
instance Produces PositionTransferIsolatedMargin MimeTextjavascript
positionUpdateLeverage
:: (Consumes PositionUpdateLeverage contentType)
=> ContentType contentType
-> Accept accept
-> Symbol
-> Leverage
-> BitMEXRequest PositionUpdateLeverage contentType Position accept
positionUpdateLeverage _ _ (Symbol symbol) (Leverage leverage) =
_mkRequest "POST" ["/position/leverage"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("symbol", symbol)
`addForm` toForm ("leverage", leverage)
data PositionUpdateLeverage
instance Consumes PositionUpdateLeverage MimeJSON
instance Consumes PositionUpdateLeverage MimeFormUrlEncoded
instance Produces PositionUpdateLeverage MimeJSON
instance Produces PositionUpdateLeverage MimeXML
instance Produces PositionUpdateLeverage MimeTextxml
instance Produces PositionUpdateLeverage MimeJavascript
instance Produces PositionUpdateLeverage MimeTextjavascript
positionUpdateRiskLimit
:: (Consumes PositionUpdateRiskLimit contentType)
=> ContentType contentType
-> Accept accept
-> Symbol
-> RiskLimit
-> BitMEXRequest PositionUpdateRiskLimit contentType Position accept
positionUpdateRiskLimit _ _ (Symbol symbol) (RiskLimit riskLimit) =
_mkRequest "POST" ["/position/riskLimit"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("symbol", symbol)
`addForm` toForm ("riskLimit", riskLimit)
data PositionUpdateRiskLimit
instance Consumes PositionUpdateRiskLimit MimeJSON
instance Consumes PositionUpdateRiskLimit MimeFormUrlEncoded
instance Produces PositionUpdateRiskLimit MimeJSON
instance Produces PositionUpdateRiskLimit MimeXML
instance Produces PositionUpdateRiskLimit MimeTextxml
instance Produces PositionUpdateRiskLimit MimeJavascript
instance Produces PositionUpdateRiskLimit MimeTextjavascript
quoteGet
:: Accept accept
-> BitMEXRequest QuoteGet MimeNoContent [Quote] accept
quoteGet _ =
_mkRequest "GET" ["/quote"]
data QuoteGet
instance HasOptionalParam QuoteGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam QuoteGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam QuoteGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam QuoteGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam QuoteGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam QuoteGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam QuoteGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam QuoteGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes QuoteGet MimeJSON
instance Consumes QuoteGet MimeFormUrlEncoded
instance Produces QuoteGet MimeJSON
instance Produces QuoteGet MimeXML
instance Produces QuoteGet MimeTextxml
instance Produces QuoteGet MimeJavascript
instance Produces QuoteGet MimeTextjavascript
quoteGetBucketed
:: Accept accept
-> BitMEXRequest QuoteGetBucketed MimeNoContent [Quote] accept
quoteGetBucketed _ =
_mkRequest "GET" ["/quote/bucketed"]
data QuoteGetBucketed
instance HasOptionalParam QuoteGetBucketed BinSize where
applyOptionalParam req (BinSize xs) =
req `setQuery` toQuery ("binSize", Just xs)
instance HasOptionalParam QuoteGetBucketed Partial where
applyOptionalParam req (Partial xs) =
req `setQuery` toQuery ("partial", Just xs)
instance HasOptionalParam QuoteGetBucketed Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam QuoteGetBucketed Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam QuoteGetBucketed Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam QuoteGetBucketed Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam QuoteGetBucketed Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam QuoteGetBucketed Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam QuoteGetBucketed StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam QuoteGetBucketed EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes QuoteGetBucketed MimeJSON
instance Consumes QuoteGetBucketed MimeFormUrlEncoded
instance Produces QuoteGetBucketed MimeJSON
instance Produces QuoteGetBucketed MimeXML
instance Produces QuoteGetBucketed MimeTextxml
instance Produces QuoteGetBucketed MimeJavascript
instance Produces QuoteGetBucketed MimeTextjavascript
schemaGet
:: Accept accept
-> BitMEXRequest SchemaGet MimeNoContent A.Value accept
schemaGet _ =
_mkRequest "GET" ["/schema"]
data SchemaGet
instance HasOptionalParam SchemaGet Model where
applyOptionalParam req (Model xs) =
req `setQuery` toQuery ("model", Just xs)
instance Consumes SchemaGet MimeJSON
instance Consumes SchemaGet MimeFormUrlEncoded
instance Produces SchemaGet MimeJSON
instance Produces SchemaGet MimeXML
instance Produces SchemaGet MimeTextxml
instance Produces SchemaGet MimeJavascript
instance Produces SchemaGet MimeTextjavascript
schemaWebsocketHelp
:: Accept accept
-> BitMEXRequest SchemaWebsocketHelp MimeNoContent A.Value accept
schemaWebsocketHelp _ =
_mkRequest "GET" ["/schema/websocketHelp"]
data SchemaWebsocketHelp
instance Consumes SchemaWebsocketHelp MimeJSON
instance Consumes SchemaWebsocketHelp MimeFormUrlEncoded
instance Produces SchemaWebsocketHelp MimeJSON
instance Produces SchemaWebsocketHelp MimeXML
instance Produces SchemaWebsocketHelp MimeTextxml
instance Produces SchemaWebsocketHelp MimeJavascript
instance Produces SchemaWebsocketHelp MimeTextjavascript
settlementGet
:: Accept accept
-> BitMEXRequest SettlementGet MimeNoContent [Settlement] accept
settlementGet _ =
_mkRequest "GET" ["/settlement"]
data SettlementGet
instance HasOptionalParam SettlementGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam SettlementGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam SettlementGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam SettlementGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam SettlementGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam SettlementGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam SettlementGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam SettlementGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes SettlementGet MimeJSON
instance Consumes SettlementGet MimeFormUrlEncoded
instance Produces SettlementGet MimeJSON
instance Produces SettlementGet MimeXML
instance Produces SettlementGet MimeTextxml
instance Produces SettlementGet MimeJavascript
instance Produces SettlementGet MimeTextjavascript
statsGet
:: Accept accept
-> BitMEXRequest StatsGet MimeNoContent [Stats] accept
statsGet _ =
_mkRequest "GET" ["/stats"]
data StatsGet
instance Consumes StatsGet MimeJSON
instance Consumes StatsGet MimeFormUrlEncoded
instance Produces StatsGet MimeJSON
instance Produces StatsGet MimeXML
instance Produces StatsGet MimeTextxml
instance Produces StatsGet MimeJavascript
instance Produces StatsGet MimeTextjavascript
statsHistory2
:: Accept accept
-> BitMEXRequest StatsHistory2 MimeNoContent [StatsHistory] accept
statsHistory2 _ =
_mkRequest "GET" ["/stats/history"]
data StatsHistory2
instance Consumes StatsHistory2 MimeJSON
instance Consumes StatsHistory2 MimeFormUrlEncoded
instance Produces StatsHistory2 MimeJSON
instance Produces StatsHistory2 MimeXML
instance Produces StatsHistory2 MimeTextxml
instance Produces StatsHistory2 MimeJavascript
instance Produces StatsHistory2 MimeTextjavascript
statsHistoryUSD
:: Accept accept
-> BitMEXRequest StatsHistoryUSD MimeNoContent [StatsUSD] accept
statsHistoryUSD _ =
_mkRequest "GET" ["/stats/historyUSD"]
data StatsHistoryUSD
instance Consumes StatsHistoryUSD MimeJSON
instance Consumes StatsHistoryUSD MimeFormUrlEncoded
instance Produces StatsHistoryUSD MimeJSON
instance Produces StatsHistoryUSD MimeXML
instance Produces StatsHistoryUSD MimeTextxml
instance Produces StatsHistoryUSD MimeJavascript
instance Produces StatsHistoryUSD MimeTextjavascript
tradeGet
:: Accept accept
-> BitMEXRequest TradeGet MimeNoContent [Trade] accept
tradeGet _ =
_mkRequest "GET" ["/trade"]
data TradeGet
instance HasOptionalParam TradeGet Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam TradeGet Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam TradeGet Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam TradeGet Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam TradeGet Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam TradeGet Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam TradeGet StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam TradeGet EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes TradeGet MimeJSON
instance Consumes TradeGet MimeFormUrlEncoded
instance Produces TradeGet MimeJSON
instance Produces TradeGet MimeXML
instance Produces TradeGet MimeTextxml
instance Produces TradeGet MimeJavascript
instance Produces TradeGet MimeTextjavascript
tradeGetBucketed
:: Accept accept
-> BitMEXRequest TradeGetBucketed MimeNoContent [TradeBin] accept
tradeGetBucketed _ =
_mkRequest "GET" ["/trade/bucketed"]
data TradeGetBucketed
instance HasOptionalParam TradeGetBucketed BinSize where
applyOptionalParam req (BinSize xs) =
req `setQuery` toQuery ("binSize", Just xs)
instance HasOptionalParam TradeGetBucketed Partial where
applyOptionalParam req (Partial xs) =
req `setQuery` toQuery ("partial", Just xs)
instance HasOptionalParam TradeGetBucketed Symbol where
applyOptionalParam req (Symbol xs) =
req `setQuery` toQuery ("symbol", Just xs)
instance HasOptionalParam TradeGetBucketed Filter where
applyOptionalParam req (Filter xs) =
req `setQuery` toQuery ("filter", Just xs)
instance HasOptionalParam TradeGetBucketed Columns where
applyOptionalParam req (Columns xs) =
req `setQuery` toQuery ("columns", Just xs)
instance HasOptionalParam TradeGetBucketed Count where
applyOptionalParam req (Count xs) =
req `setQuery` toQuery ("count", Just xs)
instance HasOptionalParam TradeGetBucketed Start where
applyOptionalParam req (Start xs) =
req `setQuery` toQuery ("start", Just xs)
instance HasOptionalParam TradeGetBucketed Reverse where
applyOptionalParam req (Reverse xs) =
req `setQuery` toQuery ("reverse", Just xs)
instance HasOptionalParam TradeGetBucketed StartTime where
applyOptionalParam req (StartTime xs) =
req `setQuery` toQuery ("startTime", Just xs)
instance HasOptionalParam TradeGetBucketed EndTime where
applyOptionalParam req (EndTime xs) =
req `setQuery` toQuery ("endTime", Just xs)
instance Consumes TradeGetBucketed MimeJSON
instance Consumes TradeGetBucketed MimeFormUrlEncoded
instance Produces TradeGetBucketed MimeJSON
instance Produces TradeGetBucketed MimeXML
instance Produces TradeGetBucketed MimeTextxml
instance Produces TradeGetBucketed MimeJavascript
instance Produces TradeGetBucketed MimeTextjavascript
userCancelWithdrawal
:: (Consumes UserCancelWithdrawal contentType)
=> ContentType contentType
-> Accept accept
-> Token
-> BitMEXRequest UserCancelWithdrawal contentType Transaction accept
userCancelWithdrawal _ _ (Token token) =
_mkRequest "POST" ["/user/cancelWithdrawal"]
`addForm` toForm ("token", token)
data UserCancelWithdrawal
instance Consumes UserCancelWithdrawal MimeJSON
instance Consumes UserCancelWithdrawal MimeFormUrlEncoded
instance Produces UserCancelWithdrawal MimeJSON
instance Produces UserCancelWithdrawal MimeXML
instance Produces UserCancelWithdrawal MimeTextxml
instance Produces UserCancelWithdrawal MimeJavascript
instance Produces UserCancelWithdrawal MimeTextjavascript
userCheckReferralCode
:: Accept accept
-> BitMEXRequest UserCheckReferralCode MimeNoContent Double accept
userCheckReferralCode _ =
_mkRequest "GET" ["/user/checkReferralCode"]
data UserCheckReferralCode
instance HasOptionalParam UserCheckReferralCode ReferralCode where
applyOptionalParam req (ReferralCode xs) =
req `setQuery` toQuery ("referralCode", Just xs)
instance Consumes UserCheckReferralCode MimeJSON
instance Consumes UserCheckReferralCode MimeFormUrlEncoded
instance Produces UserCheckReferralCode MimeJSON
instance Produces UserCheckReferralCode MimeXML
instance Produces UserCheckReferralCode MimeTextxml
instance Produces UserCheckReferralCode MimeJavascript
instance Produces UserCheckReferralCode MimeTextjavascript
userConfirm
:: (Consumes UserConfirm contentType)
=> ContentType contentType
-> Accept accept
-> Token
-> BitMEXRequest UserConfirm contentType AccessToken accept
userConfirm _ _ (Token token) =
_mkRequest "POST" ["/user/confirmEmail"]
`addForm` toForm ("token", token)
data UserConfirm
instance Consumes UserConfirm MimeJSON
instance Consumes UserConfirm MimeFormUrlEncoded
instance Produces UserConfirm MimeJSON
instance Produces UserConfirm MimeXML
instance Produces UserConfirm MimeTextxml
instance Produces UserConfirm MimeJavascript
instance Produces UserConfirm MimeTextjavascript
userConfirmEnableTFA
:: (Consumes UserConfirmEnableTFA contentType)
=> ContentType contentType
-> Accept accept
-> Token
-> BitMEXRequest UserConfirmEnableTFA contentType Bool accept
userConfirmEnableTFA _ _ (Token token) =
_mkRequest "POST" ["/user/confirmEnableTFA"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("token", token)
data UserConfirmEnableTFA
instance HasOptionalParam UserConfirmEnableTFA ParamType where
applyOptionalParam req (ParamType xs) =
req `addForm` toForm ("type", xs)
instance Consumes UserConfirmEnableTFA MimeJSON
instance Consumes UserConfirmEnableTFA MimeFormUrlEncoded
instance Produces UserConfirmEnableTFA MimeJSON
instance Produces UserConfirmEnableTFA MimeXML
instance Produces UserConfirmEnableTFA MimeTextxml
instance Produces UserConfirmEnableTFA MimeJavascript
instance Produces UserConfirmEnableTFA MimeTextjavascript
userConfirmWithdrawal
:: (Consumes UserConfirmWithdrawal contentType)
=> ContentType contentType
-> Accept accept
-> Token
-> BitMEXRequest UserConfirmWithdrawal contentType Transaction accept
userConfirmWithdrawal _ _ (Token token) =
_mkRequest "POST" ["/user/confirmWithdrawal"]
`addForm` toForm ("token", token)
data UserConfirmWithdrawal
instance Consumes UserConfirmWithdrawal MimeJSON
instance Consumes UserConfirmWithdrawal MimeFormUrlEncoded
instance Produces UserConfirmWithdrawal MimeJSON
instance Produces UserConfirmWithdrawal MimeXML
instance Produces UserConfirmWithdrawal MimeTextxml
instance Produces UserConfirmWithdrawal MimeJavascript
instance Produces UserConfirmWithdrawal MimeTextjavascript
userDisableTFA
:: (Consumes UserDisableTFA contentType)
=> ContentType contentType
-> Accept accept
-> Token
-> BitMEXRequest UserDisableTFA contentType Bool accept
userDisableTFA _ _ (Token token) =
_mkRequest "POST" ["/user/disableTFA"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("token", token)
data UserDisableTFA
instance HasOptionalParam UserDisableTFA ParamType where
applyOptionalParam req (ParamType xs) =
req `addForm` toForm ("type", xs)
instance Consumes UserDisableTFA MimeJSON
instance Consumes UserDisableTFA MimeFormUrlEncoded
instance Produces UserDisableTFA MimeJSON
instance Produces UserDisableTFA MimeXML
instance Produces UserDisableTFA MimeTextxml
instance Produces UserDisableTFA MimeJavascript
instance Produces UserDisableTFA MimeTextjavascript
userGet
:: Accept accept
-> BitMEXRequest UserGet MimeNoContent User accept
userGet _ =
_mkRequest "GET" ["/user"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGet
instance Consumes UserGet MimeJSON
instance Consumes UserGet MimeFormUrlEncoded
instance Produces UserGet MimeJSON
instance Produces UserGet MimeXML
instance Produces UserGet MimeTextxml
instance Produces UserGet MimeJavascript
instance Produces UserGet MimeTextjavascript
userGetAffiliateStatus
:: Accept accept
-> BitMEXRequest UserGetAffiliateStatus MimeNoContent Affiliate accept
userGetAffiliateStatus _ =
_mkRequest "GET" ["/user/affiliateStatus"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGetAffiliateStatus
instance Consumes UserGetAffiliateStatus MimeJSON
instance Consumes UserGetAffiliateStatus MimeFormUrlEncoded
instance Produces UserGetAffiliateStatus MimeJSON
instance Produces UserGetAffiliateStatus MimeXML
instance Produces UserGetAffiliateStatus MimeTextxml
instance Produces UserGetAffiliateStatus MimeJavascript
instance Produces UserGetAffiliateStatus MimeTextjavascript
userGetCommission
:: Accept accept
-> BitMEXRequest UserGetCommission MimeNoContent [UserCommission] accept
userGetCommission _ =
_mkRequest "GET" ["/user/commission"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGetCommission
instance Consumes UserGetCommission MimeJSON
instance Consumes UserGetCommission MimeFormUrlEncoded
instance Produces UserGetCommission MimeJSON
instance Produces UserGetCommission MimeXML
instance Produces UserGetCommission MimeTextxml
instance Produces UserGetCommission MimeJavascript
instance Produces UserGetCommission MimeTextjavascript
userGetDepositAddress
:: Accept accept
-> BitMEXRequest UserGetDepositAddress MimeNoContent Text accept
userGetDepositAddress _ =
_mkRequest "GET" ["/user/depositAddress"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGetDepositAddress
instance HasOptionalParam UserGetDepositAddress Currency where
applyOptionalParam req (Currency xs) =
req `setQuery` toQuery ("currency", Just xs)
instance Consumes UserGetDepositAddress MimeJSON
instance Consumes UserGetDepositAddress MimeFormUrlEncoded
instance Produces UserGetDepositAddress MimeJSON
instance Produces UserGetDepositAddress MimeXML
instance Produces UserGetDepositAddress MimeTextxml
instance Produces UserGetDepositAddress MimeJavascript
instance Produces UserGetDepositAddress MimeTextjavascript
userGetMargin
:: Accept accept
-> BitMEXRequest UserGetMargin MimeNoContent Margin accept
userGetMargin _ =
_mkRequest "GET" ["/user/margin"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGetMargin
instance HasOptionalParam UserGetMargin Currency where
applyOptionalParam req (Currency xs) =
req `setQuery` toQuery ("currency", Just xs)
instance Consumes UserGetMargin MimeJSON
instance Consumes UserGetMargin MimeFormUrlEncoded
instance Produces UserGetMargin MimeJSON
instance Produces UserGetMargin MimeXML
instance Produces UserGetMargin MimeTextxml
instance Produces UserGetMargin MimeJavascript
instance Produces UserGetMargin MimeTextjavascript
userGetWallet
:: Accept accept
-> BitMEXRequest UserGetWallet MimeNoContent Wallet accept
userGetWallet _ =
_mkRequest "GET" ["/user/wallet"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGetWallet
instance HasOptionalParam UserGetWallet Currency where
applyOptionalParam req (Currency xs) =
req `setQuery` toQuery ("currency", Just xs)
instance Consumes UserGetWallet MimeJSON
instance Consumes UserGetWallet MimeFormUrlEncoded
instance Produces UserGetWallet MimeJSON
instance Produces UserGetWallet MimeXML
instance Produces UserGetWallet MimeTextxml
instance Produces UserGetWallet MimeJavascript
instance Produces UserGetWallet MimeTextjavascript
userGetWalletHistory
:: Accept accept
-> BitMEXRequest UserGetWalletHistory MimeNoContent [Transaction] accept
userGetWalletHistory _ =
_mkRequest "GET" ["/user/walletHistory"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGetWalletHistory
instance HasOptionalParam UserGetWalletHistory Currency where
applyOptionalParam req (Currency xs) =
req `setQuery` toQuery ("currency", Just xs)
instance Consumes UserGetWalletHistory MimeJSON
instance Consumes UserGetWalletHistory MimeFormUrlEncoded
instance Produces UserGetWalletHistory MimeJSON
instance Produces UserGetWalletHistory MimeXML
instance Produces UserGetWalletHistory MimeTextxml
instance Produces UserGetWalletHistory MimeJavascript
instance Produces UserGetWalletHistory MimeTextjavascript
userGetWalletSummary
:: Accept accept
-> BitMEXRequest UserGetWalletSummary MimeNoContent [Transaction] accept
userGetWalletSummary _ =
_mkRequest "GET" ["/user/walletSummary"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserGetWalletSummary
instance HasOptionalParam UserGetWalletSummary Currency where
applyOptionalParam req (Currency xs) =
req `setQuery` toQuery ("currency", Just xs)
instance Consumes UserGetWalletSummary MimeJSON
instance Consumes UserGetWalletSummary MimeFormUrlEncoded
instance Produces UserGetWalletSummary MimeJSON
instance Produces UserGetWalletSummary MimeXML
instance Produces UserGetWalletSummary MimeTextxml
instance Produces UserGetWalletSummary MimeJavascript
instance Produces UserGetWalletSummary MimeTextjavascript
userLogout
:: Accept accept
-> BitMEXRequest UserLogout MimeNoContent res accept
userLogout _ =
_mkRequest "POST" ["/user/logout"]
data UserLogout
instance Consumes UserLogout MimeJSON
instance Consumes UserLogout MimeFormUrlEncoded
instance Produces UserLogout MimeJSON
instance Produces UserLogout MimeXML
instance Produces UserLogout MimeTextxml
instance Produces UserLogout MimeJavascript
instance Produces UserLogout MimeTextjavascript
userLogoutAll
:: Accept accept
-> BitMEXRequest UserLogoutAll MimeNoContent Double accept
userLogoutAll _ =
_mkRequest "POST" ["/user/logoutAll"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserLogoutAll
instance Consumes UserLogoutAll MimeJSON
instance Consumes UserLogoutAll MimeFormUrlEncoded
instance Produces UserLogoutAll MimeJSON
instance Produces UserLogoutAll MimeXML
instance Produces UserLogoutAll MimeTextxml
instance Produces UserLogoutAll MimeJavascript
instance Produces UserLogoutAll MimeTextjavascript
userMinWithdrawalFee
:: Accept accept
-> BitMEXRequest UserMinWithdrawalFee MimeNoContent A.Value accept
userMinWithdrawalFee _ =
_mkRequest "GET" ["/user/minWithdrawalFee"]
data UserMinWithdrawalFee
instance HasOptionalParam UserMinWithdrawalFee Currency where
applyOptionalParam req (Currency xs) =
req `setQuery` toQuery ("currency", Just xs)
instance Consumes UserMinWithdrawalFee MimeJSON
instance Consumes UserMinWithdrawalFee MimeFormUrlEncoded
instance Produces UserMinWithdrawalFee MimeJSON
instance Produces UserMinWithdrawalFee MimeXML
instance Produces UserMinWithdrawalFee MimeTextxml
instance Produces UserMinWithdrawalFee MimeJavascript
instance Produces UserMinWithdrawalFee MimeTextjavascript
userRequestEnableTFA
:: (Consumes UserRequestEnableTFA contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest UserRequestEnableTFA contentType Bool accept
userRequestEnableTFA _ _ =
_mkRequest "POST" ["/user/requestEnableTFA"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserRequestEnableTFA
instance HasOptionalParam UserRequestEnableTFA ParamType where
applyOptionalParam req (ParamType xs) =
req `addForm` toForm ("type", xs)
instance Consumes UserRequestEnableTFA MimeJSON
instance Consumes UserRequestEnableTFA MimeFormUrlEncoded
instance Produces UserRequestEnableTFA MimeJSON
instance Produces UserRequestEnableTFA MimeXML
instance Produces UserRequestEnableTFA MimeTextxml
instance Produces UserRequestEnableTFA MimeJavascript
instance Produces UserRequestEnableTFA MimeTextjavascript
userRequestWithdrawal
:: (Consumes UserRequestWithdrawal contentType)
=> ContentType contentType
-> Accept accept
-> Currency
-> Amount
-> Address
-> BitMEXRequest UserRequestWithdrawal contentType Transaction accept
userRequestWithdrawal _ _ (Currency currency) (Amount amount) (Address address) =
_mkRequest "POST" ["/user/requestWithdrawal"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("currency", currency)
`addForm` toForm ("amount", amount)
`addForm` toForm ("address", address)
data UserRequestWithdrawal
instance HasOptionalParam UserRequestWithdrawal OtpToken where
applyOptionalParam req (OtpToken xs) =
req `addForm` toForm ("otpToken", xs)
instance HasOptionalParam UserRequestWithdrawal Fee where
applyOptionalParam req (Fee xs) =
req `addForm` toForm ("fee", xs)
instance Consumes UserRequestWithdrawal MimeJSON
instance Consumes UserRequestWithdrawal MimeFormUrlEncoded
instance Produces UserRequestWithdrawal MimeJSON
instance Produces UserRequestWithdrawal MimeXML
instance Produces UserRequestWithdrawal MimeTextxml
instance Produces UserRequestWithdrawal MimeJavascript
instance Produces UserRequestWithdrawal MimeTextjavascript
userSavePreferences
:: (Consumes UserSavePreferences contentType)
=> ContentType contentType
-> Accept accept
-> Prefs
-> BitMEXRequest UserSavePreferences contentType User accept
userSavePreferences _ _ (Prefs prefs) =
_mkRequest "POST" ["/user/preferences"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
`addForm` toForm ("prefs", prefs)
data UserSavePreferences
instance HasOptionalParam UserSavePreferences Overwrite where
applyOptionalParam req (Overwrite xs) =
req `addForm` toForm ("overwrite", xs)
instance Consumes UserSavePreferences MimeJSON
instance Consumes UserSavePreferences MimeFormUrlEncoded
instance Produces UserSavePreferences MimeJSON
instance Produces UserSavePreferences MimeXML
instance Produces UserSavePreferences MimeTextxml
instance Produces UserSavePreferences MimeJavascript
instance Produces UserSavePreferences MimeTextjavascript
userUpdate
:: (Consumes UserUpdate contentType)
=> ContentType contentType
-> Accept accept
-> BitMEXRequest UserUpdate contentType User accept
userUpdate _ _ =
_mkRequest "PUT" ["/user"]
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiKey)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiNonce)
`_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyApiSignature)
data UserUpdate
instance HasOptionalParam UserUpdate Firstname where
applyOptionalParam req (Firstname xs) =
req `addForm` toForm ("firstname", xs)
instance HasOptionalParam UserUpdate Lastname where
applyOptionalParam req (Lastname xs) =
req `addForm` toForm ("lastname", xs)
instance HasOptionalParam UserUpdate OldPassword where
applyOptionalParam req (OldPassword xs) =
req `addForm` toForm ("oldPassword", xs)
instance HasOptionalParam UserUpdate NewPassword where
applyOptionalParam req (NewPassword xs) =
req `addForm` toForm ("newPassword", xs)
instance HasOptionalParam UserUpdate NewPasswordConfirm where
applyOptionalParam req (NewPasswordConfirm xs) =
req `addForm` toForm ("newPasswordConfirm", xs)
instance HasOptionalParam UserUpdate Username where
applyOptionalParam req (Username xs) =
req `addForm` toForm ("username", xs)
instance HasOptionalParam UserUpdate Country where
applyOptionalParam req (Country xs) =
req `addForm` toForm ("country", xs)
instance HasOptionalParam UserUpdate PgpPubKey where
applyOptionalParam req (PgpPubKey xs) =
req `addForm` toForm ("pgpPubKey", xs)
instance Consumes UserUpdate MimeJSON
instance Consumes UserUpdate MimeFormUrlEncoded
instance Produces UserUpdate MimeJSON
instance Produces UserUpdate MimeXML
instance Produces UserUpdate MimeTextxml
instance Produces UserUpdate MimeJavascript
instance Produces UserUpdate MimeTextjavascript
newtype Account = Account { unAccount :: Double } deriving (P.Eq, P.Show)
newtype Address = Address { unAddress :: Text } deriving (P.Eq, P.Show)
newtype Amount = Amount { unAmount :: Double } deriving (P.Eq, P.Show)
newtype ApiKeyId = ApiKeyId { unApiKeyId :: Text } deriving (P.Eq, P.Show)
newtype BinSize = BinSize { unBinSize :: Text } deriving (P.Eq, P.Show)
newtype ChannelId = ChannelId { unChannelId :: Double } deriving (P.Eq, P.Show)
newtype Cidr = Cidr { unCidr :: Text } deriving (P.Eq, P.Show)
newtype ClOrdId = ClOrdId { unClOrdId :: Text } deriving (P.Eq, P.Show)
newtype ClOrdLinkId = ClOrdLinkId { unClOrdLinkId :: Text } deriving (P.Eq, P.Show)
newtype Columns = Columns { unColumns :: Text } deriving (P.Eq, P.Show)
newtype ContingencyType = ContingencyType { unContingencyType :: Text } deriving (P.Eq, P.Show)
newtype Count = Count { unCount :: Double } deriving (P.Eq, P.Show)
newtype Country = Country { unCountry :: Text } deriving (P.Eq, P.Show)
newtype Currency = Currency { unCurrency :: Text } deriving (P.Eq, P.Show)
newtype Depth = Depth { unDepth :: Double } deriving (P.Eq, P.Show)
newtype DisplayQty = DisplayQty { unDisplayQty :: Double } deriving (P.Eq, P.Show)
newtype Enabled = Enabled { unEnabled :: Bool } deriving (P.Eq, P.Show)
newtype EndTime = EndTime { unEndTime :: DateTime } deriving (P.Eq, P.Show)
newtype ExecInst = ExecInst { unExecInst :: Text } deriving (P.Eq, P.Show)
newtype Fee = Fee { unFee :: Double } deriving (P.Eq, P.Show)
newtype Filter = Filter { unFilter :: Text } deriving (P.Eq, P.Show)
newtype Firstname = Firstname { unFirstname :: Text } deriving (P.Eq, P.Show)
newtype Lastname = Lastname { unLastname :: Text } deriving (P.Eq, P.Show)
newtype LeavesQty = LeavesQty { unLeavesQty :: Double } deriving (P.Eq, P.Show)
newtype Leverage = Leverage { unLeverage :: Double } deriving (P.Eq, P.Show)
newtype Message = Message { unMessage :: Text } deriving (P.Eq, P.Show)
newtype Method = Method { unMethod :: Text } deriving (P.Eq, P.Show)
newtype Model = Model { unModel :: Text } deriving (P.Eq, P.Show)
newtype Name = Name { unName :: Text } deriving (P.Eq, P.Show)
newtype NewPassword = NewPassword { unNewPassword :: Text } deriving (P.Eq, P.Show)
newtype NewPasswordConfirm = NewPasswordConfirm { unNewPasswordConfirm :: Text } deriving (P.Eq, P.Show)
newtype OldPassword = OldPassword { unOldPassword :: Text } deriving (P.Eq, P.Show)
newtype OrdType = OrdType { unOrdType :: Text } deriving (P.Eq, P.Show)
newtype OrderId = OrderId { unOrderId :: Text } deriving (P.Eq, P.Show)
newtype OrderQty = OrderQty { unOrderQty :: Double } deriving (P.Eq, P.Show)
newtype Orders = Orders { unOrders :: Text } deriving (P.Eq, P.Show)
newtype OrigClOrdId = OrigClOrdId { unOrigClOrdId :: Text } deriving (P.Eq, P.Show)
newtype OtpToken = OtpToken { unOtpToken :: Text } deriving (P.Eq, P.Show)
newtype Overwrite = Overwrite { unOverwrite :: Bool } deriving (P.Eq, P.Show)
newtype ParamText = ParamText { unParamText :: Text } deriving (P.Eq, P.Show)
newtype ParamType = ParamType { unParamType :: Text } deriving (P.Eq, P.Show)
newtype Partial = Partial { unPartial :: Bool } deriving (P.Eq, P.Show)
newtype PegOffsetValue = PegOffsetValue { unPegOffsetValue :: Double } deriving (P.Eq, P.Show)
newtype PegPriceType = PegPriceType { unPegPriceType :: Text } deriving (P.Eq, P.Show)
newtype Permissions = Permissions { unPermissions :: Text } deriving (P.Eq, P.Show)
newtype PgpPubKey = PgpPubKey { unPgpPubKey :: Text } deriving (P.Eq, P.Show)
newtype Prefs = Prefs { unPrefs :: Text } deriving (P.Eq, P.Show)
newtype Price = Price { unPrice :: Double } deriving (P.Eq, P.Show)
newtype Quantity = Quantity { unQuantity :: Double } deriving (P.Eq, P.Show)
newtype ReferralCode = ReferralCode { unReferralCode :: Text } deriving (P.Eq, P.Show)
newtype Reverse = Reverse { unReverse :: Bool } deriving (P.Eq, P.Show)
newtype RiskLimit = RiskLimit { unRiskLimit :: Double } deriving (P.Eq, P.Show)
newtype Side = Side { unSide :: Text } deriving (P.Eq, P.Show)
newtype SimpleLeavesQty = SimpleLeavesQty { unSimpleLeavesQty :: Double } deriving (P.Eq, P.Show)
newtype SimpleOrderQty = SimpleOrderQty { unSimpleOrderQty :: Double } deriving (P.Eq, P.Show)
newtype Start = Start { unStart :: Double } deriving (P.Eq, P.Show)
newtype StartTime = StartTime { unStartTime :: DateTime } deriving (P.Eq, P.Show)
newtype StopPrice = StopPrice { unStopPrice :: Double } deriving (P.Eq, P.Show)
newtype StopPx = StopPx { unStopPx :: Double } deriving (P.Eq, P.Show)
newtype Symbol = Symbol { unSymbol :: Text } deriving (P.Eq, P.Show)
newtype TimeInForce = TimeInForce { unTimeInForce :: Text } deriving (P.Eq, P.Show)
newtype Timeout = Timeout { unTimeout :: Double } deriving (P.Eq, P.Show)
newtype Token = Token { unToken :: Text } deriving (P.Eq, P.Show)
newtype Username = Username { unUsername :: Text } deriving (P.Eq, P.Show)
data AuthApiKeyApiKey =
AuthApiKeyApiKey Text
deriving (P.Eq, P.Show, P.Typeable)
instance AuthMethod AuthApiKeyApiKey where
applyAuthMethod _ a@(AuthApiKeyApiKey secret) req =
P.pure $
if (P.typeOf a `P.elem` rAuthTypes req)
then req `setHeader` toHeader ("api-key", secret)
& L.over rAuthTypesL (P.filter (/= P.typeOf a))
else req
data AuthApiKeyApiNonce =
AuthApiKeyApiNonce Text
deriving (P.Eq, P.Show, P.Typeable)
instance AuthMethod AuthApiKeyApiNonce where
applyAuthMethod _ a@(AuthApiKeyApiNonce secret) req =
P.pure $
if (P.typeOf a `P.elem` rAuthTypes req)
then req `setHeader` toHeader ("api-nonce", secret)
& L.over rAuthTypesL (P.filter (/= P.typeOf a))
else req
data AuthApiKeyApiSignature =
AuthApiKeyApiSignature Text
deriving (P.Eq, P.Show, P.Typeable)
instance AuthMethod AuthApiKeyApiSignature where
applyAuthMethod _ a@(AuthApiKeyApiSignature secret) req =
P.pure $
if (P.typeOf a `P.elem` rAuthTypes req)
then req `setHeader` toHeader ("api-signature", secret)
& L.over rAuthTypesL (P.filter (/= P.typeOf a))
else req
data MimeJavascript = MimeJavascript deriving (P.Typeable)
instance MimeType MimeJavascript where
mimeType _ = Just $ P.fromString "application/javascript"
data MimeTextjavascript = MimeTextjavascript deriving (P.Typeable)
instance MimeType MimeTextjavascript where
mimeType _ = Just $ P.fromString "text/javascript"
data MimeTextxml = MimeTextxml deriving (P.Typeable)
instance MimeType MimeTextxml where
mimeType _ = Just $ P.fromString "text/xml"