ccxt_exchanges/hyperliquid/
ws_exchange_impl.rs1use async_trait::async_trait;
9use ccxt_core::{
10 Error, Result,
11 types::{Balance, Ohlcv, Order, OrderBook, Ticker, Timeframe, Trade},
12 ws_client::WsConnectionState,
13 ws_exchange::{MessageStream, WsExchange},
14};
15
16use super::HyperLiquid;
17
18#[async_trait]
19impl WsExchange for HyperLiquid {
20 async fn ws_connect(&self) -> Result<()> {
23 Err(Error::not_implemented(
24 "ws_connect - WebSocket not yet initialized",
25 ))
26 }
27
28 async fn ws_disconnect(&self) -> Result<()> {
29 Err(Error::not_implemented(
30 "ws_disconnect - WebSocket not yet initialized",
31 ))
32 }
33
34 fn ws_is_connected(&self) -> bool {
35 false
36 }
37
38 fn ws_state(&self) -> WsConnectionState {
39 WsConnectionState::Disconnected
40 }
41
42 fn subscriptions(&self) -> Vec<String> {
43 Vec::new()
44 }
45
46 async fn watch_ticker(&self, _symbol: &str) -> Result<MessageStream<Ticker>> {
48 Err(Error::not_implemented(
49 "watch_ticker - WebSocket streaming requires additional setup",
50 ))
51 }
52
53 async fn watch_tickers(&self, _symbols: &[String]) -> Result<MessageStream<Vec<Ticker>>> {
54 Err(Error::not_implemented("watch_tickers"))
55 }
56
57 async fn watch_order_book(
58 &self,
59 _symbol: &str,
60 _limit: Option<u32>,
61 ) -> Result<MessageStream<OrderBook>> {
62 Err(Error::not_implemented(
63 "watch_order_book - WebSocket streaming requires additional setup",
64 ))
65 }
66
67 async fn watch_trades(&self, _symbol: &str) -> Result<MessageStream<Vec<Trade>>> {
68 Err(Error::not_implemented(
69 "watch_trades - WebSocket streaming requires additional setup",
70 ))
71 }
72
73 async fn watch_ohlcv(
74 &self,
75 _symbol: &str,
76 _timeframe: Timeframe,
77 ) -> Result<MessageStream<Ohlcv>> {
78 Err(Error::not_implemented("watch_ohlcv"))
79 }
80
81 async fn watch_balance(&self) -> Result<MessageStream<Balance>> {
82 Err(Error::not_implemented("watch_balance"))
83 }
84
85 async fn watch_orders(&self, _symbol: Option<&str>) -> Result<MessageStream<Order>> {
86 Err(Error::not_implemented("watch_orders"))
87 }
88
89 async fn watch_my_trades(&self, _symbol: Option<&str>) -> Result<MessageStream<Trade>> {
90 Err(Error::not_implemented("watch_my_trades"))
91 }
92
93 async fn subscribe(&self, _channel: &str, _symbol: Option<&str>) -> Result<()> {
94 Err(Error::not_implemented("subscribe"))
95 }
96
97 async fn unsubscribe(&self, _channel: &str, _symbol: Option<&str>) -> Result<()> {
98 Err(Error::not_implemented("unsubscribe"))
99 }
100}