pub struct BybitUrls {
pub rest: String,
pub ws_public_base: String,
pub ws_public: String,
pub ws_private: String,
}Expand description
Bybit API URLs.
Fields§
§rest: StringREST API base URL.
ws_public_base: StringPublic WebSocket base URL (without category suffix).
ws_public: StringPublic WebSocket URL (default: spot).
ws_private: StringPrivate WebSocket URL.
Implementations§
Source§impl BybitUrls
impl BybitUrls
Sourcepub fn production() -> Self
pub fn production() -> Self
Returns production environment URLs.
Sourcepub fn ws_public_for_category(&self, category: &str) -> String
pub fn ws_public_for_category(&self, category: &str) -> String
Returns the public WebSocket URL for a specific category.
Bybit V5 API uses different WebSocket endpoints for different categories:
- spot: /v5/public/spot
- linear: /v5/public/linear
- inverse: /v5/public/inverse
- option: /v5/public/option
§Arguments
category- The category string (spot, linear, inverse, option)
§Returns
The full WebSocket URL for the specified category.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BybitUrls
impl RefUnwindSafe for BybitUrls
impl Send for BybitUrls
impl Sync for BybitUrls
impl Unpin for BybitUrls
impl UnwindSafe for BybitUrls
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more