pub struct MarketsClient<'a> { /* private fields */ }Implementations§
Source§impl<'a> MarketsClient<'a>
impl<'a> MarketsClient<'a>
pub fn new(client: &'a PolymarketUsClient) -> Self
Sourcepub async fn list(&self) -> Result<MarketsResponse, PolymarketUsError>
pub async fn list(&self) -> Result<MarketsResponse, PolymarketUsError>
List all markets
Sourcepub async fn list_with_query<Q: Serialize>(
&self,
query: Option<&Q>,
) -> Result<MarketsResponse, PolymarketUsError>
pub async fn list_with_query<Q: Serialize>( &self, query: Option<&Q>, ) -> Result<MarketsResponse, PolymarketUsError>
List markets with query parameters
Sourcepub async fn list_authenticated(
&self,
) -> Result<MarketsResponse, PolymarketUsError>
pub async fn list_authenticated( &self, ) -> Result<MarketsResponse, PolymarketUsError>
List markets (authenticated)
Sourcepub async fn list_authenticated_with_query<Q: Serialize>(
&self,
query: Option<&Q>,
) -> Result<MarketsResponse, PolymarketUsError>
pub async fn list_authenticated_with_query<Q: Serialize>( &self, query: Option<&Q>, ) -> Result<MarketsResponse, PolymarketUsError>
List markets with query parameters (authenticated)
Sourcepub async fn order_book(
&self,
symbol: &str,
) -> Result<OrderBook, PolymarketUsError>
pub async fn order_book( &self, symbol: &str, ) -> Result<OrderBook, PolymarketUsError>
Get order book for a market
Sourcepub async fn bbo(&self, symbol: &str) -> Result<BestBidOffer, PolymarketUsError>
pub async fn bbo(&self, symbol: &str) -> Result<BestBidOffer, PolymarketUsError>
Get best bid/offer for a market
Sourcepub async fn settlement_price(
&self,
symbol: &str,
) -> Result<SettlementPrice, PolymarketUsError>
pub async fn settlement_price( &self, symbol: &str, ) -> Result<SettlementPrice, PolymarketUsError>
Get settlement price for a market
Trait Implementations§
Source§impl<'a> Clone for MarketsClient<'a>
impl<'a> Clone for MarketsClient<'a>
Source§fn clone(&self) -> MarketsClient<'a>
fn clone(&self) -> MarketsClient<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for MarketsClient<'a>
impl<'a> !UnwindSafe for MarketsClient<'a>
impl<'a> Freeze for MarketsClient<'a>
impl<'a> Send for MarketsClient<'a>
impl<'a> Sync for MarketsClient<'a>
impl<'a> Unpin for MarketsClient<'a>
impl<'a> UnsafeUnpin for MarketsClient<'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