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 async fn health(&self) -> Result<HealthResponse, PolymarketUsError>
pub async fn markets_list(&self) -> Result<MarketsResponse, PolymarketUsError>
pub async fn markets_list_with_query<Q: Serialize>( &self, query: Option<&Q>, ) -> Result<MarketsResponse, PolymarketUsError>
pub async fn markets_list_authenticated( &self, ) -> Result<MarketsResponse, PolymarketUsError>
pub async fn markets_list_authenticated_with_query<Q: Serialize>( &self, query: Option<&Q>, ) -> Result<MarketsResponse, PolymarketUsError>
pub async fn account_balances( &self, ) -> Result<AccountBalancesResponse, PolymarketUsError>
pub async fn portfolio_positions( &self, ) -> Result<PortfolioPositionsResponse, PolymarketUsError>
pub async fn portfolio_activities<Q: Serialize>( &self, query: Option<&Q>, ) -> Result<PortfolioActivitiesResponse, PolymarketUsError>
pub async fn place_order( &self, body: &PlaceOrderRequest, ) -> Result<PlaceOrderResponse, PolymarketUsError>
pub async fn place_batched_orders( &self, body: &BatchedOrderRequest, ) -> Result<BatchedOrderResponse, PolymarketUsError>
pub async fn cancel_trading_order( &self, order_id: &str, ) -> Result<CancelOrderResponse, PolymarketUsError>
pub async fn orders_create( &self, body: &PlaceOrderRequest, ) -> Result<PlaceOrderResponse, PolymarketUsError>
pub async fn orders_open<Q: Serialize>( &self, query: Option<&Q>, ) -> Result<GetOpenOrdersResponse, PolymarketUsError>
pub async fn order_retrieve( &self, order_id: &str, ) -> Result<PlaceOrderResponse, PolymarketUsError>
pub async fn order_cancel( &self, order_id: &str, body: &CancelOrderParams, ) -> Result<(), PolymarketUsError>
pub async fn order_modify( &self, order_id: &str, body: &ModifyOrderRequest, ) -> Result<(), PolymarketUsError>
pub async fn orders_cancel_all( &self, body: &CancelAllOrdersParams, ) -> Result<CancelAllOrdersResponse, PolymarketUsError>
pub async fn order_preview( &self, body: &PreviewOrderRequest, ) -> Result<PreviewOrderResponse, PolymarketUsError>
pub async fn order_close_position( &self, body: &ClosePositionRequest, ) -> Result<ClosePositionResponse, 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