Rfq.TypesRFQ API types for Polymarket.
These types correspond to the Polymarket RFQ (Request for Quote) API at https://clob.polymarket.com/rfq.
module P : sig ... endAbstract primitive types with built-in validation.
module User_type = Clob.Types.Signature_typeReuse Signature_type from CLOB as User_type. EOA = 0, POLY_PROXY = 1, POLY_GNOSIS_SAFE = 2
module Side : sig ... endmodule State_filter : sig ... endState filter for GET requests.
module Request_state : sig ... endRequest lifecycle states.
module Quote_state : sig ... endQuote lifecycle states.
module Sort_by : sig ... endSort field for requests and quotes.
module Sort_dir = P.Sort_dirSort direction.
type create_request_body = {asset_in : P.U256.t;asset_out : P.U256.t;amount_in : string;amount_out : string;user_type : User_type.t;}Request body for creating an RFQ request.
val create_request_body_of_yojson : Yojson.Safe.t -> create_request_bodyval yojson_of_create_request_body : create_request_body -> Yojson.Safe.tval pp_create_request_body :
Stdlib.Format.formatter ->
create_request_body ->
unitval show_create_request_body : create_request_body -> stringval equal_create_request_body :
create_request_body ->
create_request_body ->
boolResponse from creating an RFQ request.
val create_request_response_of_yojson :
Yojson.Safe.t ->
create_request_responseval yojson_of_create_request_response :
create_request_response ->
Yojson.Safe.tval pp_create_request_response :
Stdlib.Format.formatter ->
create_request_response ->
unitval show_create_request_response : create_request_response -> stringval equal_create_request_response :
create_request_response ->
create_request_response ->
boolRequest body for canceling an RFQ request.
val cancel_request_body_of_yojson : Yojson.Safe.t -> cancel_request_bodyval yojson_of_cancel_request_body : cancel_request_body -> Yojson.Safe.tval pp_cancel_request_body :
Stdlib.Format.formatter ->
cancel_request_body ->
unitval show_cancel_request_body : cancel_request_body -> stringval equal_cancel_request_body :
cancel_request_body ->
cancel_request_body ->
booltype rfq_request = {request_id : P.Request_id.t;user : P.Address.t;proxy : P.Address.t;market : P.Hash64.t;token : P.U256.t;complement : P.U256.t;side : Side.t;size_in : P.Decimal.t;size_out : P.Decimal.t;price : P.Decimal.t;expiry : int;}A single RFQ request in the list response.
val rfq_request_of_yojson : Yojson.Safe.t -> rfq_requestval yojson_of_rfq_request : rfq_request -> Yojson.Safe.tval pp_rfq_request : Stdlib.Format.formatter -> rfq_request -> unitval show_rfq_request : rfq_request -> stringval equal_rfq_request : rfq_request -> rfq_request -> booltype get_requests_response = {data : rfq_request list;next_cursor : string;limit : int;count : int;}Response from getting RFQ requests.
val get_requests_response_of_yojson : Yojson.Safe.t -> get_requests_responseval yojson_of_get_requests_response : get_requests_response -> Yojson.Safe.tval pp_get_requests_response :
Stdlib.Format.formatter ->
get_requests_response ->
unitval show_get_requests_response : get_requests_response -> stringval equal_get_requests_response :
get_requests_response ->
get_requests_response ->
booltype create_quote_body = {request_id : P.Request_id.t;asset_in : P.U256.t;asset_out : P.U256.t;amount_in : string;amount_out : string;user_type : User_type.t;}Request body for creating an RFQ quote.
val create_quote_body_of_yojson : Yojson.Safe.t -> create_quote_bodyval yojson_of_create_quote_body : create_quote_body -> Yojson.Safe.tval pp_create_quote_body : Stdlib.Format.formatter -> create_quote_body -> unitval show_create_quote_body : create_quote_body -> stringval equal_create_quote_body : create_quote_body -> create_quote_body -> boolResponse from creating an RFQ quote.
val create_quote_response_of_yojson : Yojson.Safe.t -> create_quote_responseval yojson_of_create_quote_response : create_quote_response -> Yojson.Safe.tval pp_create_quote_response :
Stdlib.Format.formatter ->
create_quote_response ->
unitval show_create_quote_response : create_quote_response -> stringval equal_create_quote_response :
create_quote_response ->
create_quote_response ->
boolRequest body for canceling an RFQ quote.
val cancel_quote_body_of_yojson : Yojson.Safe.t -> cancel_quote_bodyval yojson_of_cancel_quote_body : cancel_quote_body -> Yojson.Safe.tval pp_cancel_quote_body : Stdlib.Format.formatter -> cancel_quote_body -> unitval show_cancel_quote_body : cancel_quote_body -> stringval equal_cancel_quote_body : cancel_quote_body -> cancel_quote_body -> booltype rfq_quote = {quote_id : P.Quote_id.t;request_id : P.Request_id.t;user : P.Address.t;proxy : P.Address.t;market : P.Hash64.t;token : P.U256.t;complement : P.U256.t;side : Side.t;size_in : P.Decimal.t;size_out : P.Decimal.t;price : P.Decimal.t;}A single RFQ quote in the list response.
val rfq_quote_of_yojson : Yojson.Safe.t -> rfq_quoteval yojson_of_rfq_quote : rfq_quote -> Yojson.Safe.tval pp_rfq_quote : Stdlib.Format.formatter -> rfq_quote -> unitval show_rfq_quote : rfq_quote -> stringResponse from getting RFQ quotes.
val get_quotes_response_of_yojson : Yojson.Safe.t -> get_quotes_responseval yojson_of_get_quotes_response : get_quotes_response -> Yojson.Safe.tval pp_get_quotes_response :
Stdlib.Format.formatter ->
get_quotes_response ->
unitval show_get_quotes_response : get_quotes_response -> stringval equal_get_quotes_response :
get_quotes_response ->
get_quotes_response ->
booltype accept_quote_body = {request_id : P.Request_id.t;quote_id : P.Quote_id.t;maker_amount : string;taker_amount : string;token_id : P.U256.t;maker : P.Address.t;signer : P.Address.t;taker : P.Address.t;nonce : string;expiration : int;side : Side.t;fee_rate_bps : string;signature : P.Signature.t;salt : string;owner : string;}Request body for accepting a quote (creates an order).
val accept_quote_body_of_yojson : Yojson.Safe.t -> accept_quote_bodyval yojson_of_accept_quote_body : accept_quote_body -> Yojson.Safe.tval pp_accept_quote_body : Stdlib.Format.formatter -> accept_quote_body -> unitval show_accept_quote_body : accept_quote_body -> stringval equal_accept_quote_body : accept_quote_body -> accept_quote_body -> booltype approve_order_body = accept_quote_bodyRequest body for approving an order (same as accept_quote_body).
val approve_order_body_of_yojson : Yojson.Safe.t -> approve_order_bodyval yojson_of_approve_order_body : approve_order_body -> Yojson.Safe.tval pp_approve_order_body :
Stdlib.Format.formatter ->
approve_order_body ->
unitval show_approve_order_body : approve_order_body -> stringval equal_approve_order_body : approve_order_body -> approve_order_body -> boolResponse from approving an order.
val approve_order_response_of_yojson : Yojson.Safe.t -> approve_order_responseval yojson_of_approve_order_response : approve_order_response -> Yojson.Safe.tval pp_approve_order_response :
Stdlib.Format.formatter ->
approve_order_response ->
unitval show_approve_order_response : approve_order_response -> stringval equal_approve_order_response :
approve_order_response ->
approve_order_response ->
booltype error = Polymarket_http.Client.errorStructured error type for all API errors.
val error_to_string : error -> stringConvert error to human-readable string.
val pp_error : Stdlib.Format.formatter -> error -> unitPretty printer for errors.