pub struct RiskLimitRequest<'a> {
pub category: Category,
pub symbol: Option<Cow<'a, str>>,
}Expand description
Represents a request to fetch risk limit data for a trading category on Bybit. Risk limits define the maximum position size and leverage for a trader, critical for managing exposure in perpetual futures.
Fields§
§category: CategoryThe trading category (e.g., Linear for USDT-margined perpetuals). Determines the type of futures contract. Bots must ensure this matches the trading pair.
symbol: Option<Cow<'a, str>>The trading symbol (e.g., “BTCUSDT”). Specifies the market for which risk limits are queried. Optional, as some endpoints allow category-wide queries. Bots should validate symbols to avoid API errors.
Implementations§
Source§impl<'a> RiskLimitRequest<'a>
impl<'a> RiskLimitRequest<'a>
Sourcepub fn default() -> RiskLimitRequest<'a>
pub fn default() -> RiskLimitRequest<'a>
Creates a default request for the Linear category. Simplifies initialization for bots targeting USDT-margined perpetuals.
Trait Implementations§
Source§impl<'a> Clone for RiskLimitRequest<'a>
impl<'a> Clone for RiskLimitRequest<'a>
Source§fn clone(&self) -> RiskLimitRequest<'a>
fn clone(&self) -> RiskLimitRequest<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Default for RiskLimitRequest<'a>
impl<'a> Default for RiskLimitRequest<'a>
Source§fn default() -> RiskLimitRequest<'a>
fn default() -> RiskLimitRequest<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for RiskLimitRequest<'a>
impl<'a> RefUnwindSafe for RiskLimitRequest<'a>
impl<'a> Send for RiskLimitRequest<'a>
impl<'a> Sync for RiskLimitRequest<'a>
impl<'a> Unpin for RiskLimitRequest<'a>
impl<'a> UnsafeUnpin for RiskLimitRequest<'a>
impl<'a> UnwindSafe for RiskLimitRequest<'a>
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