pub struct Rewards { /* private fields */ }Expand description
Rewards namespace for liquidity reward operations
Implementations§
Source§impl Rewards
impl Rewards
Sourcepub fn earnings(&self, date: impl Into<String>) -> Request<RewardEarnings>
pub fn earnings(&self, date: impl Into<String>) -> Request<RewardEarnings>
Get user earnings for a specific day (GET /rewards/user).
date must be in YYYY-MM-DD format (required by the API). The
signature_type query parameter is taken from the client configuration.
Sourcepub fn total_earnings(
&self,
date: impl Into<String>,
) -> Request<Vec<RewardTotalEarnings>>
pub fn total_earnings( &self, date: impl Into<String>, ) -> Request<Vec<RewardTotalEarnings>>
Get user total earnings for a specific day (GET /rewards/user/total).
date must be in YYYY-MM-DD format (required by the API). The endpoint
returns an array of totals grouped by asset address.
Sourcepub fn percentages(&self) -> Request<RewardPercentages>
pub fn percentages(&self) -> Request<RewardPercentages>
Get user reward percentages
Sourcepub fn market_earnings(&self) -> Request<Paginated<RewardMarketEarning>>
pub fn market_earnings(&self) -> Request<Paginated<RewardMarketEarning>>
Get user earnings broken down by market (GET /rewards/user/markets).
Returns a paginated envelope; the per-market earnings are in data.
Sourcepub fn current_markets(&self) -> Request<Paginated<RewardMarket>>
pub fn current_markets(&self) -> Request<Paginated<RewardMarket>>
Get currently active reward markets (GET /rewards/markets/current).
Returns a paginated envelope (data, next_cursor, limit, count);
the reward markets are in the data field.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Rewards
impl !UnwindSafe for Rewards
impl Freeze for Rewards
impl Send for Rewards
impl Sync for Rewards
impl Unpin for Rewards
impl UnsafeUnpin for Rewards
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more