# Import statement
from bcx.client import BlockchainWebsocketClient
BlockchainWebsocketClient
[source]¶High level API to interact with Blockchain Exchange
Attributes
channel_manager |
(ChannelManager) |
Methods
|
Cancel all orders |
|
Cancel order |
|
Create limit order |
|
Create market order |
|
Create generic order |
|
Get connection to a channel of interest |
|
Get last heartbeat |
|
Get connection to prices channel |
|
Get connection to trading channel |
|
Subscribe to balances channel |
|
Subscribe to heartbeat channel |
|
Subscribe to L2 order book channel |
|
Subscribe to L3 order book channel |
|
Subscribe to prices channel |
|
Subscribe to symbols channel |
|
Subscribe to ticker channel |
|
Subscribe to trades channel |
|
Subscribe to trading channel |
available_channels
¶List of all available channels on Blockchain Exchange
connected_channels
¶List of all channels that you can interact with
create_limit_order
(self, price: float, symbol: str, side: str, quantity: float, time_in_force: str, order_id: str = None)[source]¶Create limit order
create_market_order
(self, symbol: str, side: str, quantity: float, time_in_force: str, order_id: str = None)[source]¶Create market order
create_order
(self, order: bcx.orders.Order)[source]¶Create generic order
get_channel
(self, name: str, \*\*channel_params) → bcx.channels.Channel[source]¶Get connection to a channel of interest
Name of the channel
Parameters used to subscribe to channel
get_prices_channel
(self, symbol: str, granularity: int) → bcx.channels.PricesChannel[source]¶Get connection to prices channel
get_trading_channel
(self) → bcx.channels.TradingChannel[source]¶Get connection to trading channel
subscribe_to_orderbook_l2
(self, symbol: str)[source]¶Subscribe to L2 order book channel
subscribe_to_orderbook_l3
(self, symbol: str)[source]¶Subscribe to L3 order book channel