haskell-bitmex-client-0.1.0.1: Complete BitMEX Client

Safe HaskellNone
LanguageHaskell2010

BitMEXClient.Wrapper.API

Synopsis

Documentation

makeRequest :: (Produces req accept, MimeUnrender accept res, MimeType contentType) => BitMEXRequest req contentType res accept -> BitMEXReader (MimeResult res) Source #

Prepare, authenticate and dispatch a request via the auto-generated BitMEX REST API.

connect :: BitMEXWrapperConfig -> BitMEXApp () -> IO () Source #

Establish connection to the BitMEX WebSocket API.

withConnectAndSubscribe :: BitMEXWrapperConfig -> [Topic Symbol] -> ClientApp a -> IO a Source #

Establish connection to the BitMEX WebSocket API, authenticate the user and subscribe to the provided topics.

sign :: ByteArrayAccess a => a -> BitMEXReader (Digest SHA256) Source #

Create a signature for the request.

makeTimestamp :: RealFrac a => a -> Int Source #

Convenience function to generate a timestamp for the signature of the request.

getMessage :: Connection -> BitMEXWrapperConfig -> IO (Maybe Response) Source #

Receive a message from the WebSocket connection and parse it.

sendMessage :: ToJSON a => Connection -> Command -> [a] -> IO () Source #

Send a message to the WebSocket connection.