diff --git a/docs/api-reference/core/get-positions-for-a-market.md b/docs/api-reference/core/get-positions-for-a-market.md new file mode 100644 index 0000000..1592016 --- /dev/null +++ b/docs/api-reference/core/get-positions-for-a-market.md @@ -0,0 +1,199 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Get positions for a market + +> Returns positions for a given market (condition_id), grouped by outcome token, with profile data, PnL breakdown, and current pricing. + + + + +## OpenAPI + +````yaml api-reference/data-api-openapi.yaml get /v1/market-positions +openapi: 3.0.3 +info: + title: Polymarket Data API + version: 1.0.0 + description: > + HTTP API for Polymarket data. This specification documents all public + routes. +servers: + - url: https://data-api.polymarket.com + description: Relative server (same host) +security: [] +tags: + - name: Data API Status + description: Data API health check + - name: Core + - name: Builders + - name: Misc +paths: + /v1/market-positions: + get: + tags: + - Core + summary: Get positions for a market + description: > + Returns positions for a given market (condition_id), grouped by outcome + token, with profile data, PnL breakdown, and current pricing. + parameters: + - in: query + name: market + required: true + schema: + $ref: '#/components/schemas/Hash64' + description: The condition ID of the market to query positions for + - in: query + name: user + schema: + $ref: '#/components/schemas/Address' + description: Filter to a single user by proxy wallet address + - in: query + name: status + schema: + type: string + enum: + - OPEN + - CLOSED + - ALL + default: ALL + description: | + Filter positions by status. + - `OPEN` — Only positions with size > 0.01 + - `CLOSED` — Only positions with size <= 0.01 + - `ALL` — All positions regardless of size + - in: query + name: sortBy + schema: + type: string + enum: + - TOKENS + - CASH_PNL + - REALIZED_PNL + - TOTAL_PNL + default: TOTAL_PNL + description: | + Sort positions by: + - `TOKENS` — Position size (number of tokens) + - `CASH_PNL` — Unrealized cash PnL + - `REALIZED_PNL` — Realized PnL + - `TOTAL_PNL` — Total PnL (cash_pnl + realized_pnl) + - in: query + name: sortDirection + schema: + type: string + enum: + - ASC + - DESC + default: DESC + - in: query + name: limit + schema: + type: integer + default: 50 + minimum: 0 + maximum: 500 + description: Max number of positions to return per outcome token + - in: query + name: offset + schema: + type: integer + default: 0 + minimum: 0 + maximum: 10000 + description: Pagination offset per outcome token + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/MetaMarketPositionV1' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' +components: + schemas: + Hash64: + type: string + description: 0x-prefixed 64-hex string + pattern: ^0x[a-fA-F0-9]{64}$ + example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917' + Address: + type: string + description: User Profile Address (0x-prefixed, 40 hex chars) + pattern: ^0x[a-fA-F0-9]{40}$ + example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839' + MetaMarketPositionV1: + type: object + properties: + token: + type: string + description: The outcome token asset ID + positions: + type: array + items: + $ref: '#/components/schemas/MarketPositionV1' + ErrorResponse: + type: object + properties: + error: + type: string + required: + - error + MarketPositionV1: + type: object + properties: + proxyWallet: + $ref: '#/components/schemas/Address' + name: + type: string + profileImage: + type: string + verified: + type: boolean + asset: + type: string + conditionId: + $ref: '#/components/schemas/Hash64' + avgPrice: + type: number + size: + type: number + currPrice: + type: number + currentValue: + type: number + cashPnl: + type: number + totalBought: + type: number + realizedPnl: + type: number + totalPnl: + type: number + outcome: + type: string + outcomeIndex: + type: integer + +```` \ No newline at end of file diff --git a/docs/changelog/changelog.md b/docs/changelog/changelog.md index bac8a03..75947d5 100644 --- a/docs/changelog/changelog.md +++ b/docs/changelog/changelog.md @@ -1,7 +1,16 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + # Polymarket Changelog > Welcome to the Polymarket Changelog. Here you will find any important changes to Polymarket, including but not limited to CLOB, API, UI and Mobile Applications. + + * **5-minute crypto markets**: Launched with taker fees enabled. Fees follow the same curve as 15-minute crypto markets, peaking at 1.56% at 50% probability. + * **Maker Rebates**: Liquidity providers earn daily USDC rebates funded by taker fees, same as 15-minute crypto markets. + + * **Sports market fees**: Taker fees to be enabled on NCAAB (college basketball) and Serie A markets on February 18, 2026. * **Per-market rebate calculation**: Rebates are now calculated per market, makers only compete with other makers in the same market. @@ -60,7 +69,7 @@ - * We're adding new fields to the `get-book` and `get-books` CLOB endpoints to include key market metadata that previously required separate queries. + * We’re adding new fields to the `get-book` and `get-books` CLOB endpoints to include key market metadata that previously required separate queries. * `min_order_size` * type: string * description: Minimum allowed order size. @@ -73,7 +82,7 @@ - * We're excited to roll out a highly requested feature: **order batching**. With this new endpoint, users can now submit up to five trades in a single request. To help you get started, we've included sample code demonstrating how to use it. Please see [Place Multiple Orders (Batching)](/developers/CLOB/orders/create-order-batch) for more details. + * We’re excited to roll out a highly requested feature: **order batching**. With this new endpoint, users can now submit up to five trades in a single request. To help you get started, we’ve included sample code demonstrating how to use it. Please see [Place Multiple Orders (Batching)](/developers/CLOB/orders/create-order-batch) for more details. @@ -88,7 +97,7 @@ - We're excited to introduce a new order type soon to be available to all users: Fill and Kill (FAK). FAK orders behave similarly to the well-known Fill or Kil(FOK) orders, but with a key difference: + We’re excited to introduce a new order type soon to be available to all users: Fill and Kill (FAK). FAK orders behave similarly to the well-known Fill or Kil(FOK) orders, but with a key difference: * FAK will fill as many shares as possible immediately at your specified price, and any remaining unfilled portion will be canceled. * Unlike FOK, which requires the entire order to fill instantly or be canceled, FAK is more flexible and aims to capture partial fills if possible. diff --git a/docs/developers/builders/examples.md b/docs/developers/builders/examples.md index 9e4ef26..5efbc9b 100644 --- a/docs/developers/builders/examples.md +++ b/docs/developers/builders/examples.md @@ -1,3 +1,7 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + # Examples > Complete Next.js applications demonstrating Polymarket builder integration diff --git a/docs/polymarket-learn/FAQ/does-polymarket-have-an-api.md b/docs/polymarket-learn/FAQ/does-polymarket-have-an-api.md index 51b4265..5fed431 100644 --- a/docs/polymarket-learn/FAQ/does-polymarket-have-an-api.md +++ b/docs/polymarket-learn/FAQ/does-polymarket-have-an-api.md @@ -1,3 +1,7 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + # Does Polymarket have an API? > Getting data from Polymarket diff --git a/docs/polymarket-learn/FAQ/embeds.md b/docs/polymarket-learn/FAQ/embeds.md new file mode 100644 index 0000000..96980f9 --- /dev/null +++ b/docs/polymarket-learn/FAQ/embeds.md @@ -0,0 +1,34 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# How To Use Embeds + +> Adding market embeds to your Substack or website. + +Polymarket allows you to embed a live-updating widget displaying the latest odds for markets in many places around the web. + +### Web + +Navigate to the individual market you want to embed and click the embed (\< >) link. + +Select light or dark mode, and copy the auto-generated code +Paste the code into your code editor or CMS and publish as normal + +### Twitter / X + +Navigate to any Polymarket market +Copy the URL from your browser +Paste the URL into the compose window + +### Substack + +The embeds feature currently supports single markets only (eg “USA to Win Most Gold Medals”, not “Most Gold Medals at Paris Olympics’) + +To embed a market, navigate on Polymarket.com to the single market you want to embed and click “copy link.” + +Navigate to your Substack editor and paste the link directly into the body of your newsletter. The editor will recognize the market and convert it to a widget that automatically refreshes with the latest odds. + +### Ticker + +The Polymarket Live Ticker displays real-time prediction market data for your livestream or website. Navigate to [https://ticker.polymarket.com/](https://ticker.polymarket.com/) to create a custom ticker by category (Breaking News, Politics, etc.) and copy the embed code to add it to your site. diff --git a/docs/polymarket-learn/FAQ/geoblocking.md b/docs/polymarket-learn/FAQ/geoblocking.md new file mode 100644 index 0000000..d454532 --- /dev/null +++ b/docs/polymarket-learn/FAQ/geoblocking.md @@ -0,0 +1,102 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Geographic Restrictions + +> Countries and regions where Polymarket is restricted + +## Overview + +Polymarket is not available in certain countries and regions due to regulatory requirements and compliance with international sanctions. This page provides a comprehensive list of all geographically restricted locations. + +## Server Infrastructure + +* **Primary Servers**: eu-west-2 +* **Closest Non-Georestricted Region**: eu-west-1 + +## Blocked Countries + +The following **33 countries** are completely restricted from accessing Polymarket: + +| Country Code | Country Name | +| ------------ | ------------------------------------ | +| AU | Australia | +| BE | Belgium | +| BY | Belarus | +| BI | Burundi | +| CF | Central African Republic | +| CD | Congo (Kinshasa) | +| CU | Cuba | +| DE | Germany | +| ET | Ethiopia | +| FR | France | +| GB | United Kingdom | +| IR | Iran | +| IQ | Iraq | +| IT | Italy | +| KP | North Korea | +| LB | Lebanon | +| LY | Libya | +| MM | Myanmar | +| NI | Nicaragua | +| PL | Poland | +| RU | Russia | +| SG | Singapore | +| SO | Somalia | +| SS | South Sudan | +| SD | Sudan | +| SY | Syria | +| TH | Thailand | +| TW | Taiwan | +| UM | United States Minor Outlying Islands | +| US | United States | +| VE | Venezuela | +| YE | Yemen | +| ZW | Zimbabwe | + +## Blocked Regions + +In addition to fully blocked countries, the following specific regions within otherwise accessible countries are also restricted: + +| Country | Region | Region Code | +| ------------ | ------- | ----------- | +| Canada (CA) | Ontario | ON | +| Ukraine (UA) | Crimea | 43 | +| Ukraine (UA) | Donetsk | 14 | +| Ukraine (UA) | Luhansk | 09 | + +## Blocking Logic + +The geoblocking system includes: + +1. **OFAC-Sanctioned Countries**: Countries sanctioned by the U.S. Office of Foreign Assets Control (OFAC) +2. **Additional Regulatory Restrictions**: Countries added for specific regulatory compliance reasons + +### Close-Only Countries + +Some countries have a **"close-only"** restriction status. Users in these countries can: + +* ✅ Close existing positions +* ❌ Open new positions + +Countries with close-only status include: + +* Singapore (SG) +* Poland (PL) +* Thailand (TH) +* Taiwan (TW) + +## Why These Restrictions? + +Geographic restrictions are implemented to ensure compliance with: + +* International sanctions and embargoes +* Local financial regulations +* Gambling and prediction market laws +* Anti-money laundering (AML) requirements +* Know Your Customer (KYC) regulations + +## Need Help? + +If you believe you are incorrectly restricted or have questions about geographic availability, please contact [Polymarket Support](https://polymarket.com/support). diff --git a/docs/polymarket-learn/FAQ/how-to-export-private-key.md b/docs/polymarket-learn/FAQ/how-to-export-private-key.md new file mode 100644 index 0000000..987e289 --- /dev/null +++ b/docs/polymarket-learn/FAQ/how-to-export-private-key.md @@ -0,0 +1,21 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# How Do I Export My Key? + +> Exporting your private key on Magic.Link + +Exporting your private key gives you direct control and security over your funds. This process is applicable if you’ve signed up via email. + + + **DO NOT** share your private key with other parties, platforms, or people. We will never ask for your private key. + + +1. Access the Export Link while signed into Polymarket: [https://reveal.magic.link/polymarket](https://reveal.magic.link/polymarket) + +2. Sign-in on Magic.Link + +3. Export Private Key. Once revealed, you should securely store the private key displayed, where others can’t access it. + +4. Log out of Magic.Link diff --git a/docs/polymarket-learn/FAQ/is-my-money-safe.md b/docs/polymarket-learn/FAQ/is-my-money-safe.md index eb885de..26066b5 100644 --- a/docs/polymarket-learn/FAQ/is-my-money-safe.md +++ b/docs/polymarket-learn/FAQ/is-my-money-safe.md @@ -1,8 +1,12 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + # Is My Money Safe? > Yes. Polymarket is non-custodial, so you're in control of your funds. -#### Non-custodial, you're in control +#### Non-custodial, you’re in control Polymarket recognizes the importance of a trustworthy environment for managing your funds. To ensure this, Polymarket uses non-custodial wallets, meaning we never take possession of your USDC. This approach gives you full control over your assets, providing protection against potential security threats like hacks, misuse, and unauthorized transactions. diff --git a/docs/polymarket-learn/FAQ/is-polymarket-the-house.md b/docs/polymarket-learn/FAQ/is-polymarket-the-house.md new file mode 100644 index 0000000..75df977 --- /dev/null +++ b/docs/polymarket-learn/FAQ/is-polymarket-the-house.md @@ -0,0 +1,23 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Is Polymarket The House? + +> No, Polymarket is not the house. All trades happen peer-to-peer (p2p). + +## Polymarket is different in three ways: + +### 1. Traders interact directly with each other, not with Polymarket. + +Polymarket is a marketplace comprised of traders on both sides of any given market. This means you're always trading with other users, not against a centralized entity or "house." Prices on Polymarket are determined by supply and demand. As traders buy and sell shares in outcomes, prices fluctuate to reflect the collective sentiment and knowledge of market participants. + +### 2. Polymarket does not charge trading fees. + +Unlike bookmakers or wagering operations, Polymarket does not charge deposit/withdrawal fees, or any type of trading fees. This means that Polymarket does not stand to benefit from the outcome of any market or usage of any trader. + +### 3. Transact at any time. + +Polymarket enables you to sell your position at any time before the market resolves, provided there is a willing buyer of your shares. This offers flexibility and allows you to manage your risk and lock in profits or cut losses as you see fit. + +In essence, Polymarket empowers you to trade based on your own knowledge and research, without going up against a "house" with potentially unfair advantages. diff --git a/docs/polymarket-learn/FAQ/polling.md b/docs/polymarket-learn/FAQ/polling.md new file mode 100644 index 0000000..d2b772b --- /dev/null +++ b/docs/polymarket-learn/FAQ/polling.md @@ -0,0 +1,13 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Polymarket vs. Polling + +> How is Polymarket better than traditional / legacy polling? + +While legacy polls capture a snapshot of opinion at a specific moment, they are often outdated by the time they're published—sometimes lagging by several days. In contrast, Polymarket reflects real-time sentiment as events unfold, offering continuous updates and a more dynamic understanding of public opinion. + +Studies show that prediction markets like Polymarket tend to outperform traditional pollsters because participants are financially incentivized to be correct. This creates more thoughtful, data-driven predictions. Research by James Surowiecki, author of The Wisdom of Crowds, has highlighted how markets like these can be more accurate than polls due to the "collective intelligence" of diverse participants. Additionally, the Iowa Electronic Markets, an academic research project at the University of Iowa, has consistently demonstrated the superior accuracy of prediction markets like Polymarket over traditional polling in predicting political outcomes. + +Polymarket provides a constantly updating picture of public sentiment, offering a degree of accuracy and timeliness that traditional pollsters, who typically report data that is days old, simply cannot match. diff --git a/docs/polymarket-learn/FAQ/sell-early.md b/docs/polymarket-learn/FAQ/sell-early.md new file mode 100644 index 0000000..43e69fd --- /dev/null +++ b/docs/polymarket-learn/FAQ/sell-early.md @@ -0,0 +1,11 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Can I Sell Early? + +**Yes, you can sell or close your position early.** + +You may sell shares at any point before the market is resolved by either placing a market order to sell shares at the prevailing bid price in the orderbook, or by placing a limit order for how many shares you wish to sell and at what price. + +The limit order will only be executed if/when there is a willing buyer for your shares at the price you set. diff --git a/docs/polymarket-learn/FAQ/support.md b/docs/polymarket-learn/FAQ/support.md new file mode 100644 index 0000000..f6087b5 --- /dev/null +++ b/docs/polymarket-learn/FAQ/support.md @@ -0,0 +1,23 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# How Do I Contact Support? + +> Polymarket offers technical support through our website chat feature, and through Discord. + +To contact support through our website: + +* Navigate to [Polymarket](https://polymarket.com). + +* Click the blue chat icon in the bottom right and start your chat session. + +For technical support on Discord: + +* Join the [Polymarket Discord server](https://discord.gg/polymarket) + +* Navigate to the Support sidebar and click #open-a-ticket. This will open a private conversation with a Polymarket team member. + + + Be aware of numerous scams and malicious links. Polymarket team members will never DM you first or ask for private keys or personal information. Polymarket team members are identified in blue font on Discord. + diff --git a/docs/polymarket-learn/FAQ/wen-token.md b/docs/polymarket-learn/FAQ/wen-token.md new file mode 100644 index 0000000..548f8e5 --- /dev/null +++ b/docs/polymarket-learn/FAQ/wen-token.md @@ -0,0 +1,17 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Does Polymarket Have a Token? + +**Polymarket does not have a token.** + +All trading and liquidity rewards are in USDC, a USD-pegged stablecoin. + +Polymarket has not announced plans for any airdrop or token generation event. Be wary of scams claiming airdrops, giveaways, etc. + +If in doubt, refer to official Polymarket communication channels: + +* Web: [https://polymarket.com](https://polymarket.com) +* Twitter / X: [https://x.com/polymarket](https://x.com/polymarket) +* Discord: [https://discord.gg/polymarket](https://discord.gg/polymarket) diff --git a/docs/polymarket-learn/FAQ/what-are-prediction-markets.md b/docs/polymarket-learn/FAQ/what-are-prediction-markets.md index 2109dc9..296461b 100644 --- a/docs/polymarket-learn/FAQ/what-are-prediction-markets.md +++ b/docs/polymarket-learn/FAQ/what-are-prediction-markets.md @@ -1,3 +1,7 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + # What is a Prediction Market? > How people collectively forecast the future. diff --git a/docs/polymarket-learn/FAQ/why-do-i-need-crypto.md b/docs/polymarket-learn/FAQ/why-do-i-need-crypto.md new file mode 100644 index 0000000..9083991 --- /dev/null +++ b/docs/polymarket-learn/FAQ/why-do-i-need-crypto.md @@ -0,0 +1,29 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Why Crypto? + +> Why Polymarket uses crypto and blockchain technology to create the world’s largest Prediction market. + +Polymarket operates on Polygon, a proof-of-stake layer two blockchain built on [Ethereum](https://ethereum.org). All transactions are denominated in USDC, a US-dollar pegged stablecoin. + +This architecture offers several advantages over traditional prediction markets: + +## Why USDC? + +### Stable Value + +Polymarket denominates trades in USDC, which is pegged 1:1 to the US Dollar. This shields you from the volatility associated with other cryptocurrencies and offers a stable medium for trading. + +### Regulated Reserves + +USDC operates in adherence to regulatory standards and is backed by reserved assets. + +### Transparency + +Blockchain technology facilitates transparency, as all transactions are recorded publicly. + +### Global Reach + +Research has shown that wide availability of prediction markets increases their accuracy. Using decentralized blockchain technology removes the need for a central authority in trading, which fosters fairness and open participation around the globe. diff --git a/docs/polymarket-learn/deposits/coinbase.md b/docs/polymarket-learn/deposits/coinbase.md new file mode 100644 index 0000000..3ab5450 --- /dev/null +++ b/docs/polymarket-learn/deposits/coinbase.md @@ -0,0 +1,81 @@ +> ## Documentation Index +> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt +> Use this file to discover all available pages before exploring further. + +# Deposit with Coinbase + +> How to buy and deposit USDC to your Polymarket account using Coinbase. + +## Buying USDC + +**How to buy and deposit USDC to your Polymarket account using Coinbase.** + +Depositing directly to Polymarket from Coinbase is simple and easy. If you need help creating a Coinbase account, see their [guide on Coinbase.com](https://help.coinbase.com/en/coinbase/getting-started) + +