barter_data/exchange/bybit/spot/
mod.rs1use super::{Bybit, ExchangeServer};
2use barter_instrument::exchange::ExchangeId;
3use std::fmt::Display;
4
5pub const WEBSOCKET_BASE_URL_BYBIT_SPOT: &str = "wss://stream.bybit.com/v5/public/spot";
9
10pub type BybitSpot = Bybit<BybitServerSpot>;
12
13#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Default)]
15pub struct BybitServerSpot;
16
17impl ExchangeServer for BybitServerSpot {
18 const ID: ExchangeId = ExchangeId::BybitSpot;
19
20 fn websocket_url() -> &'static str {
21 WEBSOCKET_BASE_URL_BYBIT_SPOT
22 }
23}
24
25impl Display for BybitSpot {
26 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27 write!(f, "BybitSpot")
28 }
29}