1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//! Curated glob-importable re-exports for common use cases.
//!
//! ```rust,no_run
//! use deribit_websocket::prelude::*;
//! ```
//!
//! Type names below are rendered as plain code rather than as rustdoc
//! intra-doc links because this module doc is emitted before the
//! re-exports it describes, so the linker would not resolve them.
//!
//! # What you get
//!
//! - **Client + config** — `DeribitWebSocketClient`, `WebSocketConfig`,
//! and the message-handler types (`MessageHandler`,
//! `MessageHandlerBuilder`, `MessageCallback`, `ErrorCallback`)
//! needed to drive a live connection.
//! - **Session / connection** — `WebSocketSession` and
//! `WebSocketConnection` for consumers that want to hold the
//! underlying session directly.
//! - **Error type** — `WebSocketError`. All fallible operations in this
//! crate return `Result<T, WebSocketError>`.
//! - **DTOs commonly seen on the wire** — JSON-RPC envelopes
//! (`JsonRpcRequest`, `JsonRpcResponse`, `JsonRpcNotification`,
//! `JsonRpcError`, `JsonRpcResult`), trading structures
//! (`OrderRequest`, `OrderResponse`, `OrderInfo`, `TradeExecution`,
//! `Position`, etc.), mass-quote structures (`Quote`,
//! `MassQuoteRequest`, `MassQuoteResult`, `MmpGroupConfig`, …), and
//! account/subscription helpers.
//! - **Message helpers** — `MessageBuilder`, `RequestBuilder`,
//! `ResponseHandler`, `NotificationHandler`.
//! - **Constants** — everything from [`crate::constants`], including
//! default URLs and channel name prefixes.
//! - **`setup_logger`** — quick `tracing` initialisation driven by
//! `DERIBIT_LOG_LEVEL`.
//! - **A small slice of external types** — [`serde_json::Value`],
//! [`serde_json::json`], and
//! [`tokio_tungstenite::tungstenite::Message`] (re-exported as
//! `TungsteniteMessage`) because they appear in almost every
//! callback signature.
//!
//! # What you do *not* get
//!
//! The prelude is intentionally narrow. The following are **not**
//! re-exported and should be imported by path when needed:
//!
//! - Less-common model variants — browse [`crate::model`] for the full
//! list (instrument metadata, chart candles, etc.).
//! - Low-level dispatcher / connection internals — see
//! [`crate::connection`].
//! - TLS backend helpers — see [`crate::tls`] and the crate-level
//! [`crate::install_default_crypto_provider`].
//! - The `error` module sub-types beyond `WebSocketError` — see
//! [`crate::error`] for envelope builders and helpers.
// Callback system
pub use crate;
// Client and configuration
pub use crateDeribitWebSocketClient;
pub use crateWebSocketConfig;
// Connection management
pub use crateWebSocketConnection;
// Error handling
pub use crateWebSocketError;
// Message types
pub use crate;
// Model types
pub use crate;
// Session management
pub use crateWebSocketSession;
// Subscription management (re-export from model for full channel support)
pub use crateSubscriptionChannel;
// Constants
pub use crate*;
// Utility functions
pub use cratesetup_logger;
// Re-export commonly used external types
pub use ;
pub use Message as TungsteniteMessage;