Module Client.UnauthedSource

Unauthenticated Client

Provides access to public endpoints that don't require any authentication.

Unauthenticated client for public endpoints only.

Sourceval create : ?base_url:string -> sw:Eio.Switch.t -> net:_ Eio.Net.t -> rate_limiter:Polymarket_rate_limiter.Rate_limiter.t -> unit -> t

Create a new unauthenticated CLOB client.

  • parameter sw

    The Eio switch for resource management

  • parameter net

    The Eio network interface

  • parameter rate_limiter

    Shared rate limiter for enforcing API limits

Order Book

Sourceval get_order_book : t -> token_id:string -> unit -> (Types.order_book_summary, Polymarket_http.Client.error) result
Sourceval get_order_books : t -> token_ids:string list -> unit -> (Types.order_book_summary list, Polymarket_http.Client.error) result

Pricing

Sourceval get_price : t -> token_id:string -> side:Polymarket_clob.Types.Side.t -> unit -> (Types.price_response, Polymarket_http.Client.error) result
Sourceval get_midpoint : t -> token_id:string -> unit -> (Types.midpoint_response, Polymarket_http.Client.error) result
Sourceval get_prices : t -> requests:(string * Polymarket_clob.Types.Side.t) list -> unit -> (Types.prices_response, Polymarket_http.Client.error) result
Sourceval get_spreads : t -> token_ids:string list -> unit -> (Types.spreads_response, Polymarket_http.Client.error) result

Timeseries

Sourceval get_price_history : t -> market:string -> ?start_ts:int -> ?end_ts:int -> ?interval:Types.Interval.t -> ?fidelity:int -> unit -> (Types.price_history, Polymarket_http.Client.error) result