Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- makeRequest :: (Produces req accept, MimeUnrender accept res, MimeType contentType) => BitMEXRequest req contentType res accept -> BitMEXReader (MimeResult res)
- connect :: BitMEXWrapperConfig -> BitMEXApp () -> IO ()
- withConnectAndSubscribe :: BitMEXWrapperConfig -> [Topic Symbol] -> ClientApp a -> IO a
- sign :: ByteArrayAccess a => a -> BitMEXReader (Digest SHA256)
- makeTimestamp :: RealFrac a => a -> Int
- getMessage :: Connection -> BitMEXWrapperConfig -> IO (Maybe Response)
- sendMessage :: ToJSON a => Connection -> Command -> [a] -> IO ()
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.