package polymarket

  1. Overview
  2. Docs
OCaml client library for the Polymarket prediction market API

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.2.0.tar.gz
md5=4eb4c5d2f63ff081c9713d90be5a51b2
sha512=0e3de0c9b40683e09ab8f9f966a44784ef1b9b482c3eefef84104a7e8042c92f1d79893ee9588b24fa3d0decaed7f365509f4d1c23c66ce8328efb64e721f276

doc/polymarket.rfq/Polymarket_rfq/Client/index.html

Module Polymarket_rfq.ClientSource

RFQ API client for Request for Quote trading.

All RFQ endpoints require L2 authentication.

Sourceval default_base_url : string

Default base URL for the RFQ API: https://clob.polymarket.com

Sourcetype t

RFQ client with L2 authentication.

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

Get the Ethereum address derived from the private key.

Sourceval credentials : t -> Auth.credentials

Get the API credentials.

Request Endpoints

Sourceval cancel_request : t -> request_id:Types.request_id -> unit -> (unit, Types.error) result
Sourceval get_requests : t -> ?offset:string -> ?limit:int -> ?state:Types.State_filter.t -> ?request_ids:string list -> ?markets:string list -> ?size_min:float -> ?size_max:float -> ?size_usdc_min:float -> ?size_usdc_max:float -> ?price_min:float -> ?price_max:float -> ?sort_by:Types.Sort_by.t -> ?sort_dir:Types.Sort_dir.t -> unit -> (Types.get_requests_response, Types.error) result

Quote Endpoints

Sourceval cancel_quote : t -> quote_id:Types.quote_id -> unit -> (unit, Types.error) result
Sourceval get_quotes : t -> ?offset:string -> ?limit:int -> ?state:Types.State_filter.t -> ?quote_ids:string list -> ?request_ids:string list -> ?markets:string list -> ?size_min:float -> ?size_max:float -> ?size_usdc_min:float -> ?size_usdc_max:float -> ?price_min:float -> ?price_max:float -> ?sort_by:Types.Sort_by.t -> ?sort_dir:Types.Sort_dir.t -> unit -> (Types.get_quotes_response, Types.error) result

Execution Endpoints

Sourceval accept_quote : t -> body:Types.accept_quote_body -> unit -> (unit, Types.error) result

Accept a quote. Use Order_builder.build_accept_quote_body to create the body.

Approve an order. Use Order_builder.build_accept_quote_body to create the body.