# Import statement
from bcx.websocket import BlockchainWebsocket
BlockchainWebsocket
[source]¶Low level API to interact with Blockchain Exchange
Attributes
Connection to blockchain exchange websocket |
|
List of additional headers sent to blockchain exchange |
|
Wait for socket to connect before dropping connection |
|
Blockchain exchange websocket origin |
|
URI of blockchain exchange websocket |
Methods
|
Connect to blockchain exchange websocket |
|
Reconnect to blockchain exchange websocket |
|
Send raw string message to blockchain exchange |
|
Send message represented as python dictionary to blockchain exchange |
|
Set method responsible for handling messages received from blockchain exchange |
send
(self, message: str) → None[source]¶Send raw string message to blockchain exchange
send_json
(self, message: dict) → None[source]¶Send message represented as python dictionary to blockchain exchange
set_ws_message_handler
(self, handler: <built-in function callable>)[source]¶Set method responsible for handling messages received from blockchain exchange
ws
¶Connection to blockchain exchange websocket
ws_connect_headers
¶List of additional headers sent to blockchain exchange
ws_connect_timeout_seconds
¶Wait for socket to connect before dropping connection
ws_origin
¶Blockchain exchange websocket origin
ws_uri
¶URI of blockchain exchange websocket