pub struct PolymarketUsClient { /* private fields */ }Implementations§
Source§impl PolymarketUsClient
impl PolymarketUsClient
pub fn builder() -> PolymarketUsClientBuilder
pub fn with_reqwest(http: Client, auth: Option<UsAuth>) -> Self
pub fn auth(&self) -> Option<&UsAuth>
pub fn api_base_url(&self) -> &str
pub fn retry_config(&self) -> &RetryConfig
Sourcepub fn correlation_id_prefix(&self) -> &str
pub fn correlation_id_prefix(&self) -> &str
The prefix prepended to the X-Correlation-ID header of every request.
pub fn gateway_base_url(&self) -> &str
Sourcepub fn markets(&self) -> MarketsClient<'_>
pub fn markets(&self) -> MarketsClient<'_>
Access markets resource (discovery, order book, pricing)
Sourcepub fn events(&self) -> EventsClient<'_>
pub fn events(&self) -> EventsClient<'_>
Access events resource
Sourcepub fn orders(&self) -> OrdersClient<'_>
pub fn orders(&self) -> OrdersClient<'_>
Access orders resource (lifecycle management)
Sourcepub fn account(&self) -> AccountClient<'_>
pub fn account(&self) -> AccountClient<'_>
Access account resource (balances, buying power)
Sourcepub fn portfolio(&self) -> PortfolioClient<'_>
pub fn portfolio(&self) -> PortfolioClient<'_>
Access portfolio resource (positions, activity)
Sourcepub fn search(&self) -> SearchClient<'_>
pub fn search(&self) -> SearchClient<'_>
Access search resource (full-text search)
Sourcepub fn streaming(&self) -> PolymarketUsStreamClient
pub fn streaming(&self) -> PolymarketUsStreamClient
Build a WebSocket stream client that inherits this client’s gateway URL and credentials.
The returned client is independent of self and can outlive it.
let client = PolymarketUsClient::builder().build()?;
let mut stream = client
.streaming()
.connect(vec![StreamSubscription::market_data_lite("BTC-USD")])
.await?;pub async fn health(&self) -> Result<HealthResponse, PolymarketUsError>
Trait Implementations§
Source§impl Clone for PolymarketUsClient
impl Clone for PolymarketUsClient
Source§fn clone(&self) -> PolymarketUsClient
fn clone(&self) -> PolymarketUsClient
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 !RefUnwindSafe for PolymarketUsClient
impl !UnwindSafe for PolymarketUsClient
impl Freeze for PolymarketUsClient
impl Send for PolymarketUsClient
impl Sync for PolymarketUsClient
impl Unpin for PolymarketUsClient
impl UnsafeUnpin for PolymarketUsClient
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