package polymarket

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Polymarket_gamma.ClientSource

Gamma API client for markets, events, series, and search.

include module type of Types

Enum Modules

Sourcemodule Status : sig ... end

Status filter for events and markets

Sourcemodule Parent_entity_type : sig ... end

Parent entity type for comments

Sourcemodule Slug_size : sig ... end

Slug size for URL slugs

Response Types

Sourcetype pagination = {
  1. has_more : bool;
  2. total_results : int;
}

Pagination information

Sourcetype image_optimization = {
  1. id : string;
  2. image_url_source : string option;
  3. image_url_optimized : string option;
  4. image_size_kb_source : float option;
  5. image_size_kb_optimized : float option;
  6. image_optimized_complete : bool option;
  7. image_optimized_last_updated : string option;
  8. rel_id : int option;
  9. field : string option;
  10. relname : string option;
}

Image optimization data

Sourceval yojson_of_image_optimization : image_optimization -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval image_optimization_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> image_optimization
Sourceval show_image_optimization : image_optimization -> Ppx_deriving_runtime.string

Basic Domain Types

Sourcetype team = {
  1. id : int;
  2. name : string option;
  3. league : string option;
  4. record : string option;
  5. abbreviation : string option;
  6. alias : string option;
  7. created_at : Polymarket_common.Primitives.Timestamp.t option;
  8. updated_at : Polymarket_common.Primitives.Timestamp.t option;
  9. provider_id : int option;
  10. color : string option;
}

Sports team

Sourcetype tag = {
  1. id : string;
  2. label : string option;
  3. slug : string option;
  4. force_show : bool option;
  5. published_at : string option;
  6. created_by : int option;
  7. updated_by : int option;
  8. created_at : Polymarket_common.Primitives.Timestamp.t option;
  9. updated_at : Polymarket_common.Primitives.Timestamp.t option;
  10. force_hide : bool option;
  11. requires_translation : bool option;
}

Tag for categorization

Related tag relationship

Sourcetype category = {
  1. id : string option;
  2. label : string option;
  3. parent_category : string option;
  4. slug : string option;
  5. published_at : string option;
  6. created_by : string option;
  7. updated_by : string option;
  8. created_at : string option;
  9. updated_at : string option;
}

Market category

Sourcetype event_creator = {
  1. id : string;
  2. creator_name : string option;
  3. creator_handle : string option;
  4. creator_url : string option;
  5. creator_image : string option;
  6. created_at : string option;
  7. updated_at : string option;
}

Event creator

Sourcetype chat = {
  1. id : string;
  2. channel_id : string option;
  3. channel_name : string option;
  4. channel_image : string option;
  5. live : bool option;
  6. start_time : Polymarket_common.Primitives.Timestamp.t option;
  7. end_time : Polymarket_common.Primitives.Timestamp.t option;
}

Chat channel

Sourcetype template = {
  1. id : string;
  2. event_title : string option;
  3. event_slug : string option;
  4. event_image : string option;
  5. market_title : string option;
  6. description : string option;
  7. resolution_source : string option;
  8. neg_risk : bool option;
  9. sort_by : string option;
  10. show_market_images : bool option;
  11. series_slug : string option;
  12. outcomes : string option;
}

Event template

Sourcetype search_tag = {
  1. id : string option;
  2. label : string option;
  3. slug : string option;
  4. event_count : int option;
}

Search result tag

Comment Types

Sourcetype comment_position = {
  1. token_id : string option;
  2. position_size : string option;
}

Position held by a commenter

Sourceval yojson_of_comment_position : comment_position -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval comment_position_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> comment_position
Sourcetype comment_profile = {
  1. name : string option;
  2. pseudonym : string option;
  3. display_username_public : bool option;
  4. bio : string option;
  5. is_mod : bool option;
  6. is_creator : bool option;
  7. proxy_wallet : string option;
  8. base_address : string option;
  9. profile_image : string option;
  10. profile_image_optimized : image_optimization option;
  11. positions : comment_position list;
}

Comment author profile

Sourceval yojson_of_comment_profile : comment_profile -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval comment_profile_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> comment_profile
Sourcetype reaction = {
  1. id : string;
  2. comment_id : int option;
  3. reaction_type : string option;
  4. icon : string option;
  5. user_address : string option;
  6. created_at : string option;
  7. profile : comment_profile option;
}

Comment reaction

Sourcetype comment = {
  1. id : string;
  2. body : string option;
  3. parent_entity_type : string option;
  4. parent_entity_id : int option;
  5. parent_comment_id : string option;
  6. user_address : string option;
  7. reply_address : string option;
  8. created_at : Polymarket_common.Primitives.Timestamp.t option;
  9. updated_at : Polymarket_common.Primitives.Timestamp.t option;
  10. profile : comment_profile option;
  11. reactions : reaction list;
  12. report_count : int option;
  13. reaction_count : int option;
}

Comment

Profile Types

Sourcetype public_profile_user = {
  1. id : string;
  2. creator : bool;
  3. is_mod : bool;
}

Public profile user

Sourceval yojson_of_public_profile_user : public_profile_user -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval public_profile_user_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> public_profile_user
Sourceval show_public_profile_user : public_profile_user -> Ppx_deriving_runtime.string
Sourcetype public_profile_response = {
  1. created_at : Polymarket_common.Primitives.Timestamp.t option;
  2. proxy_wallet : string option;
  3. profile_image : string option;
  4. display_username_public : bool option;
  5. bio : string option;
  6. pseudonym : string option;
  7. name : string option;
  8. users : public_profile_user list option;
  9. x_username : string option;
  10. verified_badge : bool option;
}

Public profile response

Sourceval yojson_of_public_profile_response : public_profile_response -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval public_profile_response_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> public_profile_response
Sourceval show_public_profile_response : public_profile_response -> Ppx_deriving_runtime.string
Sourcetype profile = {
  1. id : string;
  2. name : string option;
  3. user : int option;
  4. referral : string option;
  5. created_by : int option;
  6. updated_by : int option;
  7. created_at : Polymarket_common.Primitives.Timestamp.t option;
  8. updated_at : Polymarket_common.Primitives.Timestamp.t option;
  9. utm_source : string option;
  10. utm_medium : string option;
  11. utm_campaign : string option;
  12. utm_content : string option;
  13. utm_term : string option;
  14. wallet_activated : bool option;
  15. pseudonym : string option;
  16. display_username_public : bool option;
  17. profile_image : string option;
  18. bio : string option;
  19. proxy_wallet : string option;
  20. profile_image_optimized : image_optimization option;
  21. is_close_only : bool option;
  22. is_cert_req : bool option;
  23. cert_req_date : string option;
}

User profile

Collection Type

Sourcetype collection = {
  1. id : string;
  2. ticker : string option;
  3. slug : string option;
  4. title : string option;
  5. subtitle : string option;
  6. collection_type : string option;
  7. description : string option;
  8. tags : string option;
  9. image : string option;
  10. icon : string option;
  11. header_image : string option;
  12. layout : string option;
  13. active : bool option;
  14. closed : bool option;
  15. archived : bool option;
  16. is_new : bool option;
  17. featured : bool option;
  18. restricted : bool option;
  19. is_template : bool option;
  20. template_variables : string option;
  21. published_at : string option;
  22. created_by : string option;
  23. updated_by : string option;
  24. created_at : string option;
  25. updated_at : string option;
  26. comments_enabled : bool option;
  27. image_optimized : image_optimization option;
  28. icon_optimized : image_optimization option;
  29. header_image_optimized : image_optimization option;
}

Collection of events/markets

Sourcetype clob_reward = {
  1. id : string option;
  2. condition_id : string option;
  3. asset_address : string option;
  4. rewards_amount : float option;
  5. rewards_daily_rate : float option;
  6. start_date : string option;
  7. end_date : string option;
}

CLOB rewards configuration for a market

Mutually Recursive Types: Market, Event, Series

Sourcetype market = {
  1. id : string;
  2. question : string option;
  3. condition_id : string option;
  4. slug : string option;
  5. twitter_card_image : string option;
  6. resolution_source : string option;
  7. end_date : Polymarket_common.Primitives.Timestamp.t option;
  8. category : string option;
  9. amm_type : string option;
  10. liquidity : string option;
  11. sponsor_name : string option;
  12. sponsor_image : string option;
  13. start_date : Polymarket_common.Primitives.Timestamp.t option;
  14. x_axis_value : string option;
  15. y_axis_value : string option;
  16. denomination_token : string option;
  17. fee : string option;
  18. image : string option;
  19. icon : string option;
  20. lower_bound : string option;
  21. upper_bound : string option;
  22. description : string option;
  23. outcomes : string option;
  24. outcome_prices : string option;
  25. volume : string option;
  26. active : bool option;
  27. market_type : string option;
  28. format_type : string option;
  29. lower_bound_date : string option;
  30. upper_bound_date : string option;
  31. closed : bool option;
  32. market_maker_address : string option;
  33. created_by : int option;
  34. updated_by : int option;
  35. created_at : Polymarket_common.Primitives.Timestamp.t option;
  36. updated_at : Polymarket_common.Primitives.Timestamp.t option;
  37. closed_time : string option;
  38. wide_format : bool option;
  39. is_new : bool option;
  40. mailchimp_tag : string option;
  41. category_mailchimp_tag : string option;
  42. sent_discord : bool option;
  43. featured : bool option;
  44. archived : bool option;
  45. resolved_by : string option;
  46. restricted : bool option;
  47. market_group : int option;
  48. group_item_title : string option;
  49. group_item_threshold : string option;
  50. question_id : string option;
  51. uma_end_date : string option;
  52. enable_order_book : bool option;
  53. order_price_min_tick_size : float option;
  54. order_min_size : float option;
  55. uma_resolution_status : string option;
  56. curation_order : int option;
  57. volume_num : float option;
  58. liquidity_num : float option;
  59. end_date_iso : string option;
  60. start_date_iso : string option;
  61. uma_end_date_iso : string option;
  62. has_reviewed_dates : bool option;
  63. ready_for_cron : bool option;
  64. comments_enabled : bool option;
  65. volume_24hr : float option;
  66. volume_1wk : float option;
  67. volume_1mo : float option;
  68. volume_1yr : float option;
  69. game_start_time : string option;
  70. seconds_delay : int option;
  71. clob_token_ids : string option;
  72. disqus_thread : string option;
  73. short_outcomes : string option;
  74. team_a_id : string option;
  75. team_b_id : string option;
  76. uma_bond : string option;
  77. uma_reward : string option;
  78. fpmm_live : bool option;
  79. volume_24hr_amm : float option;
  80. volume_1wk_amm : float option;
  81. volume_1mo_amm : float option;
  82. volume_1yr_amm : float option;
  83. volume_24hr_clob : float option;
  84. volume_1wk_clob : float option;
  85. volume_1mo_clob : float option;
  86. volume_1yr_clob : float option;
  87. volume_amm : float option;
  88. volume_clob : float option;
  89. liquidity_amm : float option;
  90. liquidity_clob : float option;
  91. maker_base_fee : int option;
  92. taker_base_fee : int option;
  93. custom_liveness : int option;
  94. accepting_orders : bool option;
  95. notifications_enabled : bool option;
  96. score : int option;
  97. image_optimized : image_optimization option;
  98. icon_optimized : image_optimization option;
  99. events : event list;
  100. categories : category list;
  101. tags : tag list;
  102. creator : string option;
  103. ready : bool option;
  104. funded : bool option;
  105. past_slugs : string option;
  106. ready_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  107. funded_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  108. accepting_orders_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  109. competitive : float option;
  110. rewards_min_size : float option;
  111. rewards_max_spread : float option;
  112. spread : float option;
  113. automatically_resolved : bool option;
  114. one_day_price_change : float option;
  115. one_hour_price_change : float option;
  116. one_week_price_change : float option;
  117. one_month_price_change : float option;
  118. one_year_price_change : float option;
  119. last_trade_price : float option;
  120. best_bid : float option;
  121. best_ask : float option;
  122. automatically_active : bool option;
  123. clear_book_on_start : bool option;
  124. chart_color : string option;
  125. series_color : string option;
  126. show_gmp_series : bool option;
  127. show_gmp_outcome : bool option;
  128. manual_activation : bool option;
  129. neg_risk_other : bool option;
  130. game_id : string option;
  131. group_item_range : string option;
  132. sports_market_type : string option;
  133. line : float option;
  134. uma_resolution_statuses : string option;
  135. pending_deployment : bool option;
  136. deploying : bool option;
  137. deploying_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  138. scheduled_deployment_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  139. rfq_enabled : bool option;
  140. event_start_time : Polymarket_common.Primitives.Timestamp.t option;
  141. cyom : bool option;
  142. pager_duty_notification_enabled : bool option;
  143. approved : bool option;
  144. holding_rewards_enabled : bool option;
  145. fees_enabled : bool option;
  146. requires_translation : bool option;
  147. submitted_by : string option;
  148. neg_risk : bool option;
  149. neg_risk_market_id : string option;
  150. neg_risk_request_id : string option;
  151. clob_rewards : clob_reward list;
}

Market

Sourceand event = {
  1. id : string;
  2. ticker : string option;
  3. slug : string option;
  4. title : string option;
  5. subtitle : string option;
  6. description : string option;
  7. resolution_source : string option;
  8. start_date : Polymarket_common.Primitives.Timestamp.t option;
  9. creation_date : Polymarket_common.Primitives.Timestamp.t option;
  10. end_date : Polymarket_common.Primitives.Timestamp.t option;
  11. image : string option;
  12. icon : string option;
  13. active : bool option;
  14. closed : bool option;
  15. archived : bool option;
  16. is_new : bool option;
  17. featured : bool option;
  18. restricted : bool option;
  19. liquidity : float option;
  20. volume : float option;
  21. open_interest : float option;
  22. sort_by : string option;
  23. category : string option;
  24. subcategory : string option;
  25. is_template : bool option;
  26. template_variables : string option;
  27. published_at : string option;
  28. created_by : string option;
  29. updated_by : string option;
  30. created_at : Polymarket_common.Primitives.Timestamp.t option;
  31. updated_at : Polymarket_common.Primitives.Timestamp.t option;
  32. comments_enabled : bool option;
  33. competitive : float option;
  34. volume_24hr : float option;
  35. volume_1wk : float option;
  36. volume_1mo : float option;
  37. volume_1yr : float option;
  38. featured_image : string option;
  39. disqus_thread : string option;
  40. parent_event : string option;
  41. enable_order_book : bool option;
  42. liquidity_amm : float option;
  43. liquidity_clob : float option;
  44. neg_risk : bool option;
  45. neg_risk_market_id : string option;
  46. neg_risk_fee_bips : int option;
  47. comment_count : int option;
  48. image_optimized : image_optimization option;
  49. icon_optimized : image_optimization option;
  50. featured_image_optimized : image_optimization option;
  51. sub_events : string list option;
  52. markets : market list;
  53. series : series list;
  54. categories : category list;
  55. collections : collection list;
  56. tags : tag list;
  57. cyom : bool option;
  58. closed_time : Polymarket_common.Primitives.Timestamp.t option;
  59. show_all_outcomes : bool option;
  60. show_market_images : bool option;
  61. automatically_resolved : bool option;
  62. enable_neg_risk : bool option;
  63. automatically_active : bool option;
  64. event_date : string option;
  65. start_time : Polymarket_common.Primitives.Timestamp.t option;
  66. event_week : int option;
  67. series_slug : string option;
  68. score : string option;
  69. elapsed : string option;
  70. period : string option;
  71. live : bool option;
  72. ended : bool option;
  73. finished_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  74. gmp_chart_mode : string option;
  75. event_creators : event_creator list;
  76. tweet_count : int option;
  77. chats : chat list;
  78. featured_order : int option;
  79. estimate_value : bool option;
  80. cant_estimate : bool option;
  81. estimated_value : string option;
  82. templates : template list;
  83. spreads_main_line : float option;
  84. totals_main_line : float option;
  85. carousel_map : string option;
  86. pending_deployment : bool option;
  87. deploying : bool option;
  88. deploying_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  89. scheduled_deployment_timestamp : Polymarket_common.Primitives.Timestamp.t option;
  90. game_status : string option;
  91. neg_risk_augmented : bool option;
  92. requires_translation : bool option;
}

Event

Sourceand series = {
  1. id : string;
  2. ticker : string option;
  3. slug : string option;
  4. title : string option;
  5. subtitle : string option;
  6. series_type : string option;
  7. recurrence : string option;
  8. description : string option;
  9. image : string option;
  10. icon : string option;
  11. layout : string option;
  12. active : bool option;
  13. closed : bool option;
  14. archived : bool option;
  15. is_new : bool option;
  16. featured : bool option;
  17. restricted : bool option;
  18. is_template : bool option;
  19. template_variables : bool option;
  20. published_at : string option;
  21. created_by : string option;
  22. updated_by : string option;
  23. created_at : Polymarket_common.Primitives.Timestamp.t option;
  24. updated_at : Polymarket_common.Primitives.Timestamp.t option;
  25. comments_enabled : bool option;
  26. competitive : string option;
  27. volume_24hr : float option;
  28. volume : float option;
  29. liquidity : float option;
  30. start_date : Polymarket_common.Primitives.Timestamp.t option;
  31. pyth_token_id : string option;
  32. cg_asset_name : string option;
  33. score : int option;
  34. events : event list;
  35. collections : collection list;
  36. categories : category list;
  37. tags : tag list;
  38. comment_count : int option;
  39. requires_translation : bool option;
  40. chats : chat list;
}

Series

Pagination Response Types

Sourcetype events_pagination = {
  1. data : event list;
  2. pagination : pagination option;
}

Paginated events response

Sourceval yojson_of_events_pagination : events_pagination -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval events_pagination_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> events_pagination

Search results

Sports Types

Sourcetype sports_metadata = {
  1. id : int option;
  2. sport : string;
  3. image : string option;
  4. resolution : string option;
  5. ordering : string;
  6. tags : string;
  7. series : string;
  8. created_at : string option;
}

Sports metadata

Sourceval yojson_of_sports_metadata : sports_metadata -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval sports_metadata_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> sports_metadata
Sourcetype sports_market_types_response = {
  1. market_types : string list;
}

Sports market types response

Sourceval yojson_of_sports_market_types_response : sports_market_types_response -> Ppx_yojson_conv_lib.Yojson.Safe.t
Sourceval sports_market_types_response_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> sports_market_types_response
Sourceval show_sports_market_types_response : sports_market_types_response -> Ppx_deriving_runtime.string

Field Lists for Extra Field Detection

Sourceval yojson_fields_of_pagination : string list
Sourceval yojson_fields_of_image_optimization : string list
Sourceval yojson_fields_of_team : string list
Sourceval yojson_fields_of_tag : string list
Sourceval yojson_fields_of_category : string list
Sourceval yojson_fields_of_event_creator : string list
Sourceval yojson_fields_of_chat : string list
Sourceval yojson_fields_of_template : string list
Sourceval yojson_fields_of_search_tag : string list
Sourceval yojson_fields_of_comment_position : string list
Sourceval yojson_fields_of_comment_profile : string list
Sourceval yojson_fields_of_reaction : string list
Sourceval yojson_fields_of_comment : string list
Sourceval yojson_fields_of_public_profile_user : string list
Sourceval yojson_fields_of_public_profile_response : string list
Sourceval yojson_fields_of_profile : string list
Sourceval yojson_fields_of_collection : string list
Sourceval yojson_fields_of_market : string list
Sourceval yojson_fields_of_event : string list
Sourceval yojson_fields_of_series : string list
Sourceval yojson_fields_of_events_pagination : string list
Sourceval yojson_fields_of_sports_metadata : string list
Sourceval yojson_fields_of_sports_market_types_response : string list

The client type (alias for HTTP client)

Sourceval default_base_url : string

Default base URL: https://gamma-api.polymarket.com

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

Create a Gamma API client.

  • parameter base_url

    Override the default base URL

  • parameter sw

    Eio switch for resource management

  • parameter net

    Eio network capability

  • parameter rate_limiter

    Rate limiter for API requests

Health Endpoint

Sourceval status : t -> (string, Polymarket_http.Client.error) result

Check if the API is healthy.

  • returns

    Ok "OK" on success, Error error on failure

Teams Endpoints

Sourceval get_teams : t -> ?limit:int -> ?offset:int -> ?order:string list -> ?ascending:bool -> ?league:string list -> ?name:string list -> ?abbreviation:string list -> unit -> (team list, Polymarket_http.Client.error) result

Get list of sports teams.

  • parameter limit

    Maximum number of results (non-negative)

  • parameter offset

    Pagination offset (non-negative)

  • parameter order

    Fields to order by

  • parameter ascending

    Sort ascending if true

  • parameter league

    Filter by league(s)

  • parameter name

    Filter by team name(s)

  • parameter abbreviation

    Filter by team abbreviation(s)

Sourceval get_sports : t -> unit -> (sports_metadata list, Polymarket_http.Client.error) result

Get list of sports with metadata.

Sourceval get_sports_market_types : t -> unit -> (sports_market_types_response, Polymarket_http.Client.error) result

Get list of sports market types.

Tags Endpoints

Sourceval get_tags : t -> ?limit:int -> ?offset:int -> ?order:string list -> ?ascending:bool -> ?include_template:bool -> ?is_carousel:bool -> unit -> (tag list, Polymarket_http.Client.error) result

Get list of tags.

  • parameter limit

    Maximum number of results (non-negative)

  • parameter offset

    Pagination offset (non-negative)

  • parameter order

    Fields to order by

  • parameter ascending

    Sort ascending if true

  • parameter include_template

    Include template tags if true

  • parameter is_carousel

    Filter by carousel flag

Sourceval get_tag : t -> id:string -> ?include_template:bool -> unit -> (tag, Polymarket_http.Client.error) result

Get a tag by ID.

  • parameter id

    Tag ID (required)

  • parameter include_template

    Include template data if true

Sourceval get_tag_by_slug : t -> slug:string -> ?include_template:bool -> unit -> (tag, Polymarket_http.Client.error) result

Get a tag by slug.

  • parameter slug

    Tag slug (required)

  • parameter include_template

    Include template data if true

Get related tags for a tag.

  • parameter id

    Tag ID (required)

  • parameter omit_empty

    Omit empty related tags

  • parameter status

    Filter by status (active, closed, all)

Get related tags for a tag by slug.

  • parameter slug

    Tag slug (required)

  • parameter omit_empty

    Omit empty related tags

  • parameter status

    Filter by status (active, closed, all)

Get full tag objects for tags related to a tag.

  • parameter id

    Tag ID (required)

  • parameter omit_empty

    Omit empty related tags

  • parameter status

    Filter by status (active, closed, all)

Get full tag objects for tags related to a tag by slug.

  • parameter slug

    Tag slug (required)

  • parameter omit_empty

    Omit empty related tags

  • parameter status

    Filter by status (active, closed, all)

Events Endpoints

Sourceval get_events : t -> ?limit:int -> ?offset:int -> ?order:string list -> ?ascending:bool -> ?id:int list -> ?tag_id:int -> ?exclude_tag_id:int list -> ?slug:string list -> ?tag_slug:string -> ?related_tags:bool -> ?active:bool -> ?archived:bool -> ?featured:bool -> ?cyom:bool -> ?include_chat:bool -> ?include_template:bool -> ?recurrence:string -> ?closed:bool -> ?liquidity_min:float -> ?liquidity_max:float -> ?volume_min:float -> ?volume_max:float -> ?start_date_min:Polymarket_common.Primitives.Timestamp.t -> ?start_date_max:Polymarket_common.Primitives.Timestamp.t -> ?end_date_min:Polymarket_common.Primitives.Timestamp.t -> ?end_date_max:Polymarket_common.Primitives.Timestamp.t -> unit -> (event list, Polymarket_http.Client.error) result

List events.

  • parameter limit

    Maximum number of results (non-negative)

  • parameter offset

    Pagination offset (non-negative)

  • parameter order

    Fields to order by

  • parameter ascending

    Sort ascending if true

  • parameter id

    Filter by event IDs (array)

  • parameter tag_id

    Filter by tag ID

  • parameter exclude_tag_id

    Exclude events with these tag IDs (array)

  • parameter slug

    Filter by event slugs (array)

  • parameter tag_slug

    Filter by tag slug

  • parameter related_tags

    Include related tags

  • parameter active

    Filter by active status

  • parameter archived

    Filter by archived status

  • parameter featured

    Filter by featured status

  • parameter cyom

    Filter by CYOM (create your own market) status

  • parameter include_chat

    Include chat data

  • parameter include_template

    Include template data

  • parameter recurrence

    Filter by recurrence type

  • parameter closed

    Filter by closed status

  • parameter liquidity_min

    Minimum liquidity

  • parameter liquidity_max

    Maximum liquidity

  • parameter volume_min

    Minimum volume

  • parameter volume_max

    Maximum volume

  • parameter start_date_min

    Minimum start date

  • parameter start_date_max

    Maximum start date

  • parameter end_date_min

    Minimum end date

  • parameter end_date_max

    Maximum end date

Sourceval get_event : t -> id:string -> ?include_chat:bool -> ?include_template:bool -> unit -> (event, Polymarket_http.Client.error) result

Get an event by ID.

  • parameter id

    Event ID (required)

  • parameter include_chat

    Include chat data

  • parameter include_template

    Include template data

Sourceval get_event_by_slug : t -> slug:string -> ?include_chat:bool -> ?include_template:bool -> unit -> (event, Polymarket_http.Client.error) result

Get an event by slug.

  • parameter slug

    Event slug (required)

  • parameter include_chat

    Include chat data

  • parameter include_template

    Include template data

Sourceval get_event_tags : t -> id:string -> unit -> (tag list, Polymarket_http.Client.error) result

Get tags for an event.

  • parameter id

    Event ID (required)

Markets Endpoints

Sourceval get_markets : t -> ?limit:int -> ?offset:int -> ?order:string -> ?ascending:bool -> ?id:int list -> ?slug:string list -> ?clob_token_ids:string list -> ?condition_ids:string list -> ?market_maker_address:string list -> ?liquidity_num_min:float -> ?liquidity_num_max:float -> ?volume_num_min:float -> ?volume_num_max:float -> ?start_date_min:Polymarket_common.Primitives.Timestamp.t -> ?start_date_max:Polymarket_common.Primitives.Timestamp.t -> ?end_date_min:Polymarket_common.Primitives.Timestamp.t -> ?end_date_max:Polymarket_common.Primitives.Timestamp.t -> ?tag_id:int -> ?related_tags:bool -> ?cyom:bool -> ?uma_resolution_status:string -> ?game_id:string -> ?sports_market_types:string list -> ?rewards_min_size:float -> ?question_ids:string list -> ?include_tag:bool -> ?closed:bool -> unit -> (market list, Polymarket_http.Client.error) result

Get list of markets.

  • parameter limit

    Maximum number of results (non-negative)

  • parameter offset

    Pagination offset (non-negative)

  • parameter order

    Comma-separated list of fields to order by

  • parameter ascending

    Sort ascending if true

  • parameter id

    Filter by market IDs (array)

  • parameter slug

    Filter by market slugs (array)

  • parameter clob_token_ids

    Filter by CLOB token IDs (array)

  • parameter condition_ids

    Filter by condition IDs (array)

  • parameter market_maker_address

    Filter by market maker addresses (array)

  • parameter liquidity_num_min

    Minimum liquidity

  • parameter liquidity_num_max

    Maximum liquidity

  • parameter volume_num_min

    Minimum volume

  • parameter volume_num_max

    Maximum volume

  • parameter start_date_min

    Minimum start date

  • parameter start_date_max

    Maximum start date

  • parameter end_date_min

    Minimum end date

  • parameter end_date_max

    Maximum end date

  • parameter tag_id

    Filter by tag ID

  • parameter related_tags

    Include related tags

  • parameter cyom

    Filter by CYOM (create your own market) status

  • parameter uma_resolution_status

    Filter by UMA resolution status

  • parameter game_id

    Filter by game ID

  • parameter sports_market_types

    Filter by sports market types (array)

  • parameter rewards_min_size

    Minimum rewards size

  • parameter question_ids

    Filter by question IDs (array)

  • parameter include_tag

    Include tag data

  • parameter closed

    Filter by closed status

Sourceval get_market : t -> id:string -> ?include_tag:bool -> unit -> (market, Polymarket_http.Client.error) result

Get a market by ID.

  • parameter id

    Market ID (required)

  • parameter include_tag

    Include tag data

Sourceval get_market_by_slug : t -> slug:string -> ?include_tag:bool -> unit -> (market, Polymarket_http.Client.error) result

Get a market by slug.

  • parameter slug

    Market slug (required)

  • parameter include_tag

    Include tag data

Sourceval get_market_tags : t -> id:string -> unit -> (tag list, Polymarket_http.Client.error) result

Get tags for a market.

  • parameter id

    Market ID (required)

Series Endpoints

Sourceval get_series_list : t -> ?limit:int -> ?offset:int -> ?order:string -> ?ascending:bool -> ?slug:string list -> ?categories_ids:int list -> ?categories_labels:string list -> ?closed:bool -> ?include_chat:bool -> ?recurrence:string -> unit -> (series list, Polymarket_http.Client.error) result

Get list of series.

  • parameter limit

    Maximum number of results (non-negative)

  • parameter offset

    Pagination offset (non-negative)

  • parameter order

    Comma-separated list of fields to order by

  • parameter ascending

    Sort ascending if true

  • parameter slug

    Filter by series slugs (array)

  • parameter categories_ids

    Filter by category IDs (array)

  • parameter categories_labels

    Filter by category labels (array)

  • parameter closed

    Filter by closed status

  • parameter include_chat

    Include chat data

  • parameter recurrence

    Filter by recurrence type

Sourceval get_series : t -> id:string -> ?include_chat:bool -> unit -> (series, Polymarket_http.Client.error) result

Get a series by ID.

  • parameter id

    Series ID (required)

  • parameter include_chat

    Include chat data

Comments Endpoints

Sourceval get_comments : t -> ?limit:int -> ?offset:int -> ?order:string -> ?ascending:bool -> ?parent_entity_type:Parent_entity_type.t -> ?parent_entity_id:int -> ?get_positions:bool -> ?holders_only:bool -> unit -> (comment list, Polymarket_http.Client.error) result

Get list of comments.

  • parameter limit

    Maximum number of results (non-negative)

  • parameter offset

    Pagination offset (non-negative)

  • parameter order

    Comma-separated list of fields to order by

  • parameter ascending

    Sort ascending if true

  • parameter parent_entity_type

    Entity type (Event, Series, market)

  • parameter parent_entity_id

    Entity ID

  • parameter get_positions

    Include position data

  • parameter holders_only

    Filter to holders only

Sourceval get_comment : t -> id:string -> ?get_positions:bool -> unit -> (comment, Polymarket_http.Client.error) result

Get a comment by ID.

  • parameter id

    Comment ID (required)

  • parameter get_positions

    Include position data

Sourceval get_user_comments : t -> user_address:string -> ?limit:int -> ?offset:int -> ?order:string -> ?ascending:bool -> unit -> (comment list, Polymarket_http.Client.error) result

Get comments by user address.

  • parameter user_address

    User address (required)

  • parameter limit

    Maximum number of results (non-negative)

  • parameter offset

    Pagination offset (non-negative)

  • parameter order

    Comma-separated list of fields to order by

  • parameter ascending

    Sort ascending if true

Profile Endpoints

Sourceval get_public_profile : t -> address:string -> unit -> (public_profile_response, Polymarket_http.Client.error) result

Get public profile by address.

  • parameter address

    User address (required)

Search Endpoint

Search for events, tags, and profiles.

  • parameter q

    Search query (required)

  • parameter cache

    Enable caching

  • parameter events_status

    Filter events by status

  • parameter limit_per_type

    Maximum results per type

  • parameter page

    Pagination page number

  • parameter events_tag

    Filter by event tags (array)

  • parameter keep_closed_markets

    Include closed markets (0 or 1)

  • parameter sort

    Sort field

  • parameter ascending

    Sort ascending if true

  • parameter search_tags

    Include tags in search results

  • parameter search_profiles

    Include profiles in search results

  • parameter recurrence

    Filter by recurrence type

  • parameter exclude_tag_id

    Tag IDs to exclude (array)

  • parameter optimized

    Use optimized response format