diff --git a/.env.example b/.env.example
index b81b38f..9d0876a 100644
--- a/.env.example
+++ b/.env.example
@@ -3,65 +3,329 @@
# ============================================================
# 复制: cp .env.example .env
# 必填项: TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID
+# 修改后需重启机器人才能生效
# ============================================================
-# --- 资金与仓位 ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 资金与仓位 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 初始本金(美元),用于 Kelly 公式计算建议仓位
+# 调大 → 建议仓位更大;调小 → 建议仓位更保守
INITIAL_CAPITAL_USD=10000
+
+# 单笔最大仓位比例(占本金百分比)
+# 0.05 = 5%,即单笔最多 $500(本金 $10000 时)
+# 调大 → 允许更重的单笔仓位;调小 → 更分散
MAX_POSITION_PCT=0.05
+
+# Kelly 分数系数(0~1),用于降低 Kelly 公式的激进程度
+# 0.5 = 半凯利(推荐),1.0 = 全凯利(激进),0.25 = 四分之一凯利(保守)
+# 调大 → 仓位更大但风险更高;调小 → 更保守
KELLY_FRACTION=0.5
-# --- 价格防护 ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 价格防护 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 允许跟单的最低 / 最高价格
+# 极端价格(<0.10 或 >0.90)通常是噪音或信息已充分定价,赔率极差
+# 调大范围 → 接收更多信号但质量可能下降;收窄范围 → 只跟踪中等赔率市场
MIN_PRICE=0.10
MAX_PRICE=0.90
-# --- 交易规则 ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 交易规则 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 被监控钱包的单笔最低交易金额(美元),低于此值被忽略
+# 调大 → 过滤小额噪音,信号更少但更可靠;调小 → 更多信号但可能包含噪音
MIN_TRADE_SIZE_USD=500
+
+# 信号产生后的模拟执行延迟(秒),实盘时有用
EXECUTION_DELAY_SECONDS=5
+
+# 是否启用实盘交易(true=实盘下单,false=仅记录信号不执行)
+# 设为 true 前必须填写下方的 POLY_API_KEY 等 CLOB 凭证
ENABLE_EXECUTION=false
-# --- 钱包池(top N 监控)---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 钱包池(目标钱包筛选) ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 钱包池上限(最多跟踪多少个钱包)
+# 实际数量取决于多少钱包通过下方三道过滤门槛,不足则全取
+# 调大 → 池子更大,共识信号可能更多;调小 → 更聚焦
WALLET_POOL_SIZE=100
+
+# ═══════════════════════════════════════════════════════════════
+# 以下三个过滤条件共用一个时间窗口:WALLET_PNL_WINDOW_DAYS
+# ═══════════════════════════════════════════════════════════════
+
+# 钱包最低总盈亏(美元)— 窗口内的现金盈亏 + 已平仓盈亏
+# 现金盈亏 = 当前持仓 cashPnl;已平仓盈亏 = /closed-positions 按 timestamp 过滤
+# 调大 → 只要高盈利钱包;调小 → 扩大池子,可能混入不稳定钱包
WALLET_PNL_MIN_USD=5000
+
+# 钱包最少交易笔数 — /trades 接口,按 transactionHash 去重,仅统计窗口内
+# 调大 → 只要经验丰富的钱包;调小 → 扩大池子,包含新手钱包
WALLET_MIN_TRADES=30
+
+# 钱包最少覆盖品类数 — /trades + /positions 的 eventSlug 合并去重,仅统计窗口内
+# 调大 → 只要多元化钱包;调小 → 扩大池子,包含专注单一品类的钱包
WALLET_MIN_CATEGORIES=3
+
+# 时间窗口(天),以上三个过滤条件共用此窗口
+# 默认 90 天(从 30 天改为 90 天以降低幸存者偏差 — 只看 30 天会过度偏向
+# 近期运气好的钱包,而 90 天能过滤掉短期波动,识别真正稳定的盈利者)
+# 调大 → 数据量更大,门槛变低,更多钱包通过;调小 → 只看近期,更严格
+WALLET_PNL_WINDOW_DAYS=90
+
+# /closed-positions 分页上限(每页 50 条,20 页 = 1000 条)
+# 超活跃钱包在 90 天窗口内可能产生 500+ 平仓记录,上限太低会截断 PnL
+# 贝叶斯更新阶段自动用 3 倍此值(只处理池内 ~100 钱包,可承受更多 API 调用)
+# 调大 → PnL 更准确但 API 调用更多;调小 → 更快但可能低估活跃钱包的 PnL
+CLOSED_POSITIONS_MAX_PAGES=20
+
+# 钱包池刷新间隔(小时),到期后重新扫描市场 + 重新评估钱包
+# 调小 → 更频繁刷新,钱包池更新更快但 API 调用更多
+# 调大 → 减少 API 压力,但可能错过新晋优质钱包
WALLET_REFRESH_HOURS=24
-# --- 贝叶斯先验 ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 贝叶斯信誉分先验参数 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 新钱包的初始信誉分(0~1),0.5 表示"不确定其能力"
+# 调大 → 对新钱包更信任,信号更容易触发;调小 → 对新钱包更谨慎
BAYESIAN_PRIOR_SKILL=0.5
+
+# 历史表现衰减窗口(天),通过 /closed-positions 的 timestamp 字段过滤
+# 只统计此窗口内的平仓盈亏来更新信誉分,超出窗口的平仓记录被忽略
+# 调大 → 历史数据保留更久;调小 → 更看重近期表现
BAYESIAN_DECAY_DAYS=14
-# --- Telegram 通知 ---
+# 贝叶斯更新步长(0~1),控制单次信誉分变化幅度
+# 0.05 = 每次最多调整 5%,比较保守;0.1 = 更激进
+# 调大 → 信誉分变化更快但可能过度反应;调小 → 更平稳但适应慢
+BAYESIAN_STEP=0.05
+
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ Telegram 通知 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 是否开启 Telegram 信号推送
TELEGRAM_ENABLED=false
+
+# Telegram Bot Token(从 @BotFather 获取)
TELEGRAM_BOT_TOKEN=
+
+# Telegram 接收消息的 Chat ID(用户或群组 ID)
TELEGRAM_CHAT_ID=
-# --- Polymarket CLOB (仅启用实盘时填) ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ Polymarket CLOB 实盘凭证(启用实盘时必填) ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# Polymarket API Key(从 polymarket.com/settings/api 获取)
POLY_API_KEY=
+
+# Polymarket API Secret
POLY_API_SECRET=
+
+# Polymarket API Passphrase
POLY_API_PASSPHRASE=
+
+# 钱包私钥(用于链上签名下单)
POLY_WALLET_PRIVATE_KEY=
-# --- HTTP / 代理(按需) ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ HTTP / 代理(按需配置) ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# HTTP 代理地址,用于访问 Polymarket API(国内网络可能需要)
+# 格式: http://127.0.0.1:7890(Clash/V2Ray 等代理)
+# 留空则直连,不经过代理
HTTP_PROXY=
-# --- 数据源轮询 ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 数据源轮询参数 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 轮询间隔(秒),每隔多久拉取一次所有钱包的最新交易
+# 调小 → 更及时但 API 调用更多(注意频率限制);调大 → 省 API 但可能延迟
USER_POLL_INTERVAL_SECONDS=30
+
+# 预热时长(秒),启动后跳过历史交易的时间窗口
+# 避免机器人把启动前的旧交易当作"新交易"来跟单
+# 调大 → 更安全地跳过热启动历史;调小 → 更快开始工作
STREAM_WARMUP_SECONDS=30
+
+# 每个钱包每次拉取的最大交易记录数
+# 预热期间会用这笔数建立"已见过"的基准线
+# 调大 → 基准线更长,预热更慢;调小 → 更快但可能漏掉部分历史
STREAM_MAX_TRADES_PER_WALLET=20
-# --- 共识参数 ---
+# 是否开启详细轮询日志(每轮都打印 poll 信息)
+# true → 每 30s 输出一次 poll 统计;false → 每 10 轮才输出一次
+STREAM_VERBOSE_LOGGING=false
+
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 共识信号参数 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 共识时间窗口(秒),在此窗口内多个钱包的同方向交易才算"共识"
+# 调大 → 更容易形成共识但信号可能滞后;调小 → 信号更及时但共识更难达成
CONSENSUS_WINDOW_SECONDS=600
+
+# 最少共识钱包数,至少 N 个钱包同方向交易才触发信号
+# 调大 → 信号更可靠但数量更少;调小 → 信号更多但可能包含噪音
CONSENSUS_MIN_WALLETS=2
+
+# 共识强度阈值,买入强度 - 卖出强度 必须 ≥ 此值才触发
+# 强度 = 各钱包信誉分之和,0.4 约等于 1 个 0.4 分钱包或 2 个 0.2 分钱包
+# 调大 → 信号更确定但更难触发;调小 → 更容易触发信号
CONSENSUS_STRENGTH_THRESHOLD=0.4
+
+# 钱包防抖(秒),同一钱包在同一市场 N 秒内只处理一次交易
+# 防止同一钱包短时间内多次交易产生重复信号
+# 调大 → 防抖更严格;调小 → 更敏感但可能重复
WALLET_DEBOUNCE_SECONDS=600
+
+# 最低信誉分,信誉分低于此值的钱包被忽略
+# 0~1,0.3 是比较宽松的阈值
+# 调大 → 只跟高信誉钱包;调小 → 更包容但可能跟踪表现差的钱包
MIN_CREDIBILITY=0.3
+
+# 信誉分更新间隔(分钟),贝叶斯算法根据最新表现重新计算钱包信誉
+# 调小 → 信誉分变化更频繁;调大 → 更新更平稳
CREDIBILITY_UPDATE_MINUTES=60
-# --- 调试日志 ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 信号过滤(策略修复) ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 仅发 BUY 信号。SELL 在 Polymarket = 卖出已持有的 token(非做空),
+# 无持仓跟踪无法跟单 SELL,仅记录为反向指标
+# true → 只跟 BUY(推荐);false → 也跟 SELL 信号
+BUY_ONLY_SIGNALS=true
+
+# 同市场信号冷却(秒)— 同一 condition_id 发出信号后 N 秒内不再重复
+# 86400 = 1 天,防止同一市场短时间内反复发信号
+# 调大 → 更保守,一天最多一个信号/市场;调小 → 更频繁
+SIGNAL_COOLDOWN_SECONDS=86400
+
+# 跳过距结算不足 N 小时的市场(流动性薄 + 结算风险高)
+# 24 = 跳过 24 小时内结算的市场
+# 调大 → 更安全但可跟的市场更少;调小 → 接受更高结算风险
+MIN_HOURS_TO_RESOLUTION=24
+
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 钱包池过滤(策略修复) ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 排除做市商(同一 conditionId 持有 Yes+No 双边持仓的钱包)
+# 做市商的交易不是方向性的,跟单无意义
+# true → 排除双边持仓 >10% 的钱包;false → 不排除
+EXCLUDE_MARKET_MAKERS=true
+
+# 未实现 cashPnl 折扣(0.0~1.0)
+# Polymarket 中间价常高估实际可成交价(薄流动性 + bid-ask spread)
+# 0.5 = 只计一半未实现盈亏;1.0 = 全额计入;0.0 = 完全忽略未实现盈亏
+CASH_PNL_DISCOUNT=0.5
+
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ Kelly 仓位管理(策略修复) ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 历史已 resolve 的信号不足 N 条时,不用 Kelly 公式,改用保守固定仓位
+# 防止数据不足时 Kelly 公式产生不可靠的仓位建议
+# 调大 → Kelly 更晚启用,前期更保守;调小 → Kelly 更早启用但可能不准
+KELLY_MIN_SAMPLES=50
+
+# Kelly 数据不足时的保守固定仓位比例(占本金百分比)
+# 0.01 = 1%,即 $100 本金时每次下 $1
+# 调大 → 前期仓位更大;调小 → 更保守
+KELLY_FALLBACK_FRACTION=0.01
+
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 风控熔断(策略修复) ║
+# ╚══════════════════════════════════════════════════════════════╝
+# 信号发出前会检查三道风控闸门:日亏损 / 连续亏损 / 最大持仓
+# 任一闸门触发都会阻止新信号产生
+
+# 日亏损上限(美元)— 24h 内已实现亏损超过此值则暂停发信号
+# 调大 → 容忍更大日内亏损;调小 → 更快止损
+MAX_DAILY_LOSS_USD=500
+
+# 连续亏损次数上限 — 连续 N 次信号亏损则暂停
+# 调大 → 容忍更长连亏;调小 → 更快暂停
+MAX_CONSECUTIVE_LOSSES=5
+
+# 熔断暂停时长(分钟)— 闸门触发后暂停 N 分钟
+# 调大 → 暂停更久,给市场更多时间恢复;调小 → 更快恢复
+RISK_PAUSE_MINUTES=60
+
+# 最大同时持仓数 — 未 resolve 的信号数超过此值则不发新信号
+# 调大 → 允许更多并行持仓;调小 → 更集中
+MAX_OPEN_POSITIONS=10
+
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 信号结果回填(策略分析) ║
+# ╚══════════════════════════════════════════════════════════════╝
+# 信号发出后,市场结算的结果会被自动回填到 copy_signals 表
+# 数据用于 /analytics 看板的命中率与 PnL 聚合统计
+
+# 回填循环间隔(分钟),每 N 分钟扫描一次未回填的信号
+# 调小 → 更及时回填新结果但 API 调用更多;调大 → 更省 API
+OUTCOME_RESOLVE_MINUTES=15
+
+# 每批扫描的最大信号数(防止一次性打太多 API)
+# 调大 → 单次回填更快但可能集中触发限流;调小 → 更温和
+OUTCOME_RESOLVE_BATCH_SIZE=50
+
+# 单次 /markets 请求超时(秒)
+OUTCOME_RESOLVE_TIMEOUT=5.0
+
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 调试日志 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 是否打印 API 返回的原始交易数据(true=会输出大量日志,仅调试时用)
DEBUG_LOG_API_PAYLOADS=false
-# --- 数据库 ---
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 数据库 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# SQLite 数据库文件路径(相对项目根目录)
+# 删除此文件即可清空所有数据,重新冷启动
DB_PATH=data/copytrader.db
-# --- 日志 ---
-LOG_LEVEL=INFO
+
+# ╔══════════════════════════════════════════════════════════════╗
+# ║ 日志级别 ║
+# ╚══════════════════════════════════════════════════════════════╝
+
+# 日志级别: DEBUG / INFO / WARNING / ERROR
+# DEBUG → 输出所有调试信息(包括每笔交易过滤详情)
+# INFO → 正常运行时推荐(信号、轮询统计、心跳等)
+# WARNING → 仅警告和错误
+LOG_LEVEL=INFO
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/.gitignore b/PolymarketDocumentation-main/.gitignore
new file mode 100644
index 0000000..b7faf40
--- /dev/null
+++ b/PolymarketDocumentation-main/.gitignore
@@ -0,0 +1,207 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[codz]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py.cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+# For a library or package, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# .python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# UV
+# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
+# This is especially recommended for binary packages to ensure reproducibility, and is more
+# commonly ignored for libraries.
+#uv.lock
+
+# poetry
+# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
+# This is especially recommended for binary packages to ensure reproducibility, and is more
+# commonly ignored for libraries.
+# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
+#poetry.lock
+#poetry.toml
+
+# pdm
+# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
+# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
+# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
+#pdm.lock
+#pdm.toml
+.pdm-python
+.pdm-build/
+
+# pixi
+# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
+#pixi.lock
+# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
+# in the .venv directory. It is recommended not to include this directory in version control.
+.pixi
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.envrc
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+
+# PyCharm
+# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
+# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
+# and can be added to the global gitignore or merged into this file. For a more nuclear
+# option (not recommended) you can uncomment the following to ignore the entire idea folder.
+#.idea/
+
+# Abstra
+# Abstra is an AI-powered process automation framework.
+# Ignore directories containing user credentials, local state, and settings.
+# Learn more at https://abstra.io/docs
+.abstra/
+
+# Visual Studio Code
+# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
+# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
+# and can be added to the global gitignore or merged into this file. However, if you prefer,
+# you could uncomment the following to ignore the entire vscode folder
+# .vscode/
+
+# Ruff stuff:
+.ruff_cache/
+
+# PyPI configuration file
+.pypirc
+
+# Cursor
+# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
+# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
+# refer to https://docs.cursor.com/context/ignore-files
+.cursorignore
+.cursorindexingignore
+
+# Marimo
+marimo/_static/
+marimo/_lsp/
+__marimo__/
diff --git a/PolymarketDocumentation-main/CRON.md b/PolymarketDocumentation-main/CRON.md
new file mode 100644
index 0000000..e08b87b
--- /dev/null
+++ b/PolymarketDocumentation-main/CRON.md
@@ -0,0 +1,69 @@
+# Polymarket Documentation - Daily Update Instructions for AI Agent
+
+## Mission
+Your task is to check for updates to the Polymarket documentation and push any changes to the GitHub repository daily.
+
+## What You Are
+You are an AI assistant responsible for keeping the Polymarket documentation synchronized with the official docs.polymarket.com website.
+
+## When to Run
+Execute this task once per day. Choose a consistent time (e.g., early morning your time).
+
+## Step-by-Step Instructions
+
+### Step 1: Navigate to the Repository
+Go to the PolymarketDocumentation folder:
+```
+/home/himalaya/clawd/PolymarketDocumentation
+```
+
+### Step 2: Check if TARGET.md Has New URLs
+Read the TARGET.md file and check if any new URLs have been added compared to what's already been scraped. The file contains a list of documentation URLs that need to be fetched.
+
+### Step 3: Scrape New or Updated Pages
+For each URL in TARGET.md that doesn't already have a corresponding file in the docs/ folder, or if you suspect the official docs have been updated:
+
+1. Use the web_fetch tool or curl to fetch each URL
+2. Save the content as a .md file in the appropriate docs/ subfolder
+3. Match the folder structure to the URL path (e.g., `/quickstart/overview.md` goes in `docs/quickstart/`)
+
+### Step 4: Check for Changes
+Run `git status` to see what files have been added or modified.
+
+### Step 5: Commit Changes
+If there are new or updated files:
+1. Add all changes: `git add -A`
+2. Commit with a message that includes today's date, for example: "Update Polymarket documentation - 2026-02-14"
+3. Use `git commit` to save the changes locally
+
+### Step 6: Push to GitHub
+After committing, push the changes to the remote repository:
+```
+git push origin main
+```
+
+### Step 7: Report
+Tell the user what was done:
+- How many new files were added
+- Which sections were updated
+- Confirm the push was successful
+
+## Important Notes
+
+- Only commit and push if there are actual changes
+- If TARGET.md hasn't changed and all docs are already scraped, simply report "No updates needed today"
+- Keep the folder structure organized - match the URL paths
+- The repository is at: https://github.com/Etherdrake/PolymarketDocumentation
+
+## Example Output
+
+When you complete this task, say something like:
+
+"Checked Polymarket documentation. No new URLs in TARGET.md and all 117 files already present. No update needed today."
+
+OR:
+
+"Updated Polymarket documentation: Added 3 new API reference files (get-market-price, get-order-book, list-events). Pushed to GitHub successfully."
+
+## Manual Trigger
+If the user asks you to check for updates, run through these steps immediately rather than waiting for your daily schedule.
diff --git a/PolymarketDocumentation-main/INSTRUCTIONS.md b/PolymarketDocumentation-main/INSTRUCTIONS.md
new file mode 100644
index 0000000..955d836
--- /dev/null
+++ b/PolymarketDocumentation-main/INSTRUCTIONS.md
@@ -0,0 +1,202 @@
+# Polymarket Documentation Scraper Instructions
+
+## Overview
+This document contains instructions for scraping Polymarket documentation from `docs.polymarket.com` and organizing it into the GitHub repository.
+
+The target URLs are stored in `TARGET.md` - edit that file to add/remove URLs to scrape.
+
+## How It Works
+
+1. **TARGET.md** - Contains the list of URLs to scrape (one per line)
+2. **INSTRUCTIONS.md** - This file with scraping instructions
+3. **scrape.sh** - The automation script that reads from TARGET.md
+
+## Quick Start
+
+```bash
+cd /home/himalaya/clawd/PolymarketDocumentation
+./scrape.sh
+```
+
+## Directory Structure
+Organize the scraped files into the following structure:
+```
+PolymarketDocumentation/
+├── TARGET.md # Source URLs (edit this file)
+├── INSTRUCTIONS.md # This file
+├── scrape.sh # Automation script
+├── quickstart/
+│ ├── overview.md
+│ ├── fetching-data.md
+│ ├── first-order.md
+│ └── reference/
+│ ├── glossary.md
+│ ├── endpoints.md
+│ └── introduction/
+│ └── rate-limits.md
+├── developers/
+│ ├── market-makers/
+│ │ ├── introduction.md
+│ │ ├── setup.md
+│ │ ├── trading.md
+│ │ ├── liquidity-rewards.md
+│ │ ├── maker-rebates-program.md
+│ │ ├── data-feeds.md
+│ │ └── inventory.md
+│ ├── CLOB/
+│ │ ├── introduction.md
+│ │ ├── status.md
+│ │ ├── quickstart.md
+│ │ ├── authentication.md
+│ │ ├── geoblock.md
+│ │ ├── timeseries.md
+│ │ ├── clients/
+│ │ │ ├── methods-overview.md
+│ │ │ ├── methods-public.md
+│ │ │ ├── methods-l1.md
+│ │ │ ├── methods-l2.md
+│ │ │ └── methods-builder.md
+│ │ ├── orders/
+│ │ │ ├── orders.md
+│ │ │ ├── create-order.md
+│ │ │ ├── create-order-batch.md
+│ │ │ ├── get-order.md
+│ │ │ ├── get-active-order.md
+│ │ │ ├── check-scoring.md
+│ │ │ ├── cancel-orders.md
+│ │ │ └── onchain-order-info.md
+│ │ ├── trades/
+│ │ │ ├── trades-overview.md
+│ │ │ └── trades.md
+│ │ └── websocket/
+│ │ ├── wss-overview.md
+│ │ ├── wss-auth.md
+│ │ ├── user-channel.md
+│ │ └── market-channel.md
+│ ├── sports-websocket/
+│ │ ├── overview.md
+│ │ ├── message-format.md
+│ │ └── quickstart.md
+│ ├── RTDS/
+│ │ ├── RTDS-overview.md
+│ │ ├── RTDS-crypto-prices.md
+│ │ └── RTDS-comments.md
+│ └── gamma-markets-api/
+│ ├── overview.md
+│ ├── gamma-structure.md
+│ └── fetch-markets-guide.md
+├── api-reference/
+│ ├── orderbook/
+│ │ ├── get-order-book-summary.md
+│ │ └── get-multiple-order-books-summaries-by-request.md
+│ ├── pricing/
+│ │ ├── get-market-price.md
+│ │ ├── get-multiple-market-prices.md
+│ │ ├── get-multiple-market-prices-by-request.md
+│ │ ├── get-midpoint-price.md
+│ │ └── get-price-history-for-a-traded-token.md
+│ └── spreads/
+│ └── get-bid-ask-spreads.md
+└── quickstart-websocket/
+ └── WSS-Quickstart.md
+```
+
+## The Scrape Script (scrape.sh)
+
+```bash
+#!/bin/bash
+
+# Base URL
+BASE_URL="https://docs.polymarket.com"
+
+# Output directory
+OUTPUT_DIR="PolymarketDocumentation"
+
+# Create output directory
+mkdir -p "$OUTPUT_DIR"
+
+# Read URLs from TARGET.md (skip comments and empty lines)
+grep -v '^#' "$OUTPUT_DIR/TARGET.md" | grep -v '^$' | while read -r url; do
+ # Extract the path portion (remove https://docs.polymarket.com/)
+ path="${url#https://docs.polymarket.com/}"
+
+ # Remove .md extension for directory structure
+ filename=$(basename "$path" .md)
+ dir=$(dirname "$path")
+
+ # Create directory
+ mkdir -p "$OUTPUT_DIR/$dir"
+
+ # Determine output file path
+ output_file="$OUTPUT_DIR/$path"
+
+ # Fetch the page
+ echo "Fetching: $url -> $output_file"
+ curl -s "$url" -o "$output_file"
+
+ # Check if successful
+ if [ $? -eq 0 ] && [ -s "$output_file" ]; then
+ echo " ✅ Success: $filename"
+ else
+ echo " ❌ Failed: $filename"
+ fi
+
+ # Rate limit (0.5 seconds between requests)
+ sleep 0.5
+done
+
+echo "Done! Scraped files to $OUTPUT_DIR/"
+```
+
+## Alternative: Using Python Script
+
+```python
+#!/usr/bin/env python3
+import os
+import urllib.request
+import time
+import re
+
+BASE_URL = "https://docs.polymarket.com"
+OUTPUT_DIR = "PolymarketDocumentation"
+
+# Read URLs from TARGET.md
+with open("TARGET.md", "r") as f:
+ urls = [line.strip() for line in f if line.strip() and not line.startswith("#")]
+
+for url in urls:
+ # Extract path and create directories
+ path = url.replace("https://docs.polymarket.com/", "")
+ filepath = os.path.join(OUTPUT_DIR, path)
+ os.makedirs(os.path.dirname(filepath), exist_ok=True)
+
+ # Fetch the page
+ print(f"Fetching: {url}")
+ try:
+ urllib.request.urlretrieve(url, filepath)
+ print(f" ✅ Saved: {filepath}")
+ except Exception as e:
+ print(f" ❌ Error: {e}")
+
+ # Rate limit
+ time.sleep(0.5)
+
+print("Done!")
+```
+
+## Notes
+- The `.md` suffix converts HTML pages to markdown format automatically
+- Some URLs may require authentication - handle accordingly
+- Rate limiting should be respected between requests
+- Check for HTTP 200 status codes to verify successful fetches
+
+## Adding New URLs
+
+To add new URLs to scrape, simply edit `TARGET.md` and add the URL on a new line:
+
+```markdown
+## New Section
+https://docs.polymarket.com/new-section/page.md
+```
+
+Then run the scrape script again to fetch the new URLs.
diff --git a/PolymarketDocumentation-main/LICENSE b/PolymarketDocumentation-main/LICENSE
new file mode 100644
index 0000000..7336962
--- /dev/null
+++ b/PolymarketDocumentation-main/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 Max Bodewes
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/PolymarketDocumentation-main/README.md b/PolymarketDocumentation-main/README.md
new file mode 100644
index 0000000..0c8d15a
--- /dev/null
+++ b/PolymarketDocumentation-main/README.md
@@ -0,0 +1,2 @@
+# PolymarketDocumentation
+Full and completely scraped and maintained Polymarket documentation
diff --git a/PolymarketDocumentation-main/TARGET.md b/PolymarketDocumentation-main/TARGET.md
new file mode 100644
index 0000000..c9639d9
--- /dev/null
+++ b/PolymarketDocumentation-main/TARGET.md
@@ -0,0 +1,488 @@
+# Target URLs for Polymarket Documentation
+
+These URLs will be scraped and organized into the repository.
+
+## Quickstart
+https://docs.polymarket.com/quickstart.md
+https://docs.polymarket.com/quickstart/overview.md
+https://docs.polymarket.com/quickstart/fetching-data.md
+https://docs.polymarket.com/quickstart/first-order.md
+
+https://docs.polymarket.com/quickstart/introduction/rate-limits.md
+https://docs.polymarket.com/quickstart/reference/endpoints.md
+
+## Market Makers
+https://docs.polymarket.com/market-makers/overview.md
+https://docs.polymarket.com/market-makers/getting-started.md
+https://docs.polymarket.com/market-makers/trading.md
+https://docs.polymarket.com/market-makers/liquidity-rewards.md
+https://docs.polymarket.com/market-makers/maker-rebates.md
+https://docs.polymarket.com/market-makers/inventory.md
+https://docs.polymarket.com/market-makers/combos.md
+https://docs.polymarket.com/developers/market-makers/introduction.md
+https://docs.polymarket.com/developers/market-makers/setup.md
+https://docs.polymarket.com/developers/market-makers/data-feeds.md
+
+## Polymarket Builders Program
+https://docs.polymarket.com/builders/overview.md
+https://docs.polymarket.com/builders/tiers.md
+https://docs.polymarket.com/builders/api-keys.md
+https://docs.polymarket.com/developers/builders/builder-intro.md
+https://docs.polymarket.com/developers/builders/builder-tiers.md
+https://docs.polymarket.com/developers/builders/builder-profile.md
+https://docs.polymarket.com/developers/builders/order-attribution.md
+https://docs.polymarket.com/developers/builders/relayer-client.md
+https://docs.polymarket.com/developers/builders/blockchain-data-resources.md
+https://docs.polymarket.com/developers/builders/examples.md
+
+## Central Limit Order Book (CLOB)
+https://docs.polymarket.com/trading/overview.md
+https://docs.polymarket.com/trading/quickstart.md
+https://docs.polymarket.com/developers/CLOB/introduction.md
+https://docs.polymarket.com/developers/CLOB/status.md
+https://docs.polymarket.com/developers/CLOB/quickstart.md
+https://docs.polymarket.com/developers/CLOB/authentication.md
+https://docs.polymarket.com/developers/CLOB/geoblock.md
+https://docs.polymarket.com/developers/CLOB/clients/methods-overview.md
+https://docs.polymarket.com/developers/CLOB/clients/methods-public.md
+https://docs.polymarket.com/developers/CLOB/clients/methods-l1.md
+https://docs.polymarket.com/developers/CLOB/clients/methods-l2.md
+https://docs.polymarket.com/developers/CLOB/clients/methods-builder.md
+
+## API Reference - Market Data
+https://docs.polymarket.com/api-reference/introduction.md
+https://docs.polymarket.com/api-reference/authentication.md
+https://docs.polymarket.com/api-reference/rate-limits.md
+https://docs.polymarket.com/api-reference/geoblock.md
+https://docs.polymarket.com/api-reference/clients-sdks.md
+
+## API Reference - Market Data (Data API)
+https://docs.polymarket.com/market-data/overview.md
+https://docs.polymarket.com/market-data/fetching-markets.md
+https://docs.polymarket.com/api-reference/market-data/get-order-book.md
+https://docs.polymarket.com/api-reference/market-data/get-order-books-request-body.md
+https://docs.polymarket.com/api-reference/market-data/get-market-price.md
+https://docs.polymarket.com/api-reference/market-data/get-market-prices-query-parameters.md
+https://docs.polymarket.com/api-reference/market-data/get-market-prices-request-body.md
+https://docs.polymarket.com/api-reference/data/get-midpoint-price.md
+https://docs.polymarket.com/api-reference/market-data/get-midpoint-prices-query-parameters.md
+https://docs.polymarket.com/api-reference/market-data/get-midpoint-prices-request-body.md
+https://docs.polymarket.com/api-reference/market-data/get-spread.md
+https://docs.polymarket.com/api-reference/market-data/get-spreads.md
+https://docs.polymarket.com/api-reference/market-data/get-last-trade-price.md
+https://docs.polymarket.com/api-reference/market-data/get-last-trade-prices-query-parameters.md
+https://docs.polymarket.com/api-reference/market-data/get-last-trade-prices-request-body.md
+https://docs.polymarket.com/api-reference/market-data/get-fee-rate.md
+https://docs.polymarket.com/api-reference/market-data/get-fee-rate-by-path-parameter.md
+https://docs.polymarket.com/api-reference/market-data/get-tick-size.md
+https://docs.polymarket.com/api-reference/market-data/get-tick-size-by-path-parameter.md
+https://docs.polymarket.com/api-reference/data/get-server-time.md
+
+## API Reference - Orderbook
+
+
+## API Reference - WSS RFQ
+https://docs.polymarket.com/api-reference/wss/rfq.md
+
+## API Reference - Trade (CLOB)
+https://docs.polymarket.com/api-reference/trade/post-a-new-order.md
+https://docs.polymarket.com/api-reference/trade/post-multiple-orders.md
+https://docs.polymarket.com/api-reference/trade/get-single-order-by-id.md
+https://docs.polymarket.com/api-reference/trade/get-user-orders.md
+https://docs.polymarket.com/api-reference/trade/get-trades.md
+https://docs.polymarket.com/api-reference/trade/cancel-single-order.md
+https://docs.polymarket.com/api-reference/trade/cancel-multiple-orders.md
+https://docs.polymarket.com/api-reference/trade/cancel-all-orders.md
+https://docs.polymarket.com/api-reference/trade/cancel-orders-for-a-market.md
+https://docs.polymarket.com/api-reference/trade/get-order-scoring-status.md
+https://docs.polymarket.com/api-reference/trade/send-heartbeat.md
+https://docs.polymarket.com/api-reference/trade/get-builder-trades.md
+
+## Historical Timeseries Data
+https://docs.polymarket.com/developers/CLOB/timeseries.md
+
+## Order Management
+https://docs.polymarket.com/developers/CLOB/orders/orders.md
+https://docs.polymarket.com/developers/CLOB/orders/create-order.md
+https://docs.polymarket.com/developers/CLOB/orders/create-order-batch.md
+https://docs.polymarket.com/developers/CLOB/orders/get-order.md
+https://docs.polymarket.com/developers/CLOB/orders/get-active-order.md
+https://docs.polymarket.com/developers/CLOB/orders/check-scoring.md
+https://docs.polymarket.com/developers/CLOB/orders/cancel-orders.md
+https://docs.polymarket.com/developers/CLOB/orders/onchain-order-info.md
+https://docs.polymarket.com/trading/orders/overview.md
+https://docs.polymarket.com/trading/orders/create.md
+https://docs.polymarket.com/trading/orders/cancel.md
+https://docs.polymarket.com/trading/orders/attribution.md
+
+## Trades
+https://docs.polymarket.com/developers/CLOB/trades/trades-overview.md
+https://docs.polymarket.com/developers/CLOB/trades/trades.md
+
+## Websocket
+https://docs.polymarket.com/market-data/websocket/overview.md
+https://docs.polymarket.com/market-data/websocket/market-channel.md
+https://docs.polymarket.com/market-data/websocket/user-channel.md
+https://docs.polymarket.com/developers/CLOB/websocket/wss-overview.md
+https://docs.polymarket.com/quickstart/websocket/WSS-Quickstart.md
+https://docs.polymarket.com/developers/CLOB/websocket/wss-auth.md
+https://docs.polymarket.com/developers/CLOB/websocket/user-channel.md
+https://docs.polymarket.com/developers/CLOB/websocket/market-channel.md
+https://docs.polymarket.com/api-reference/wss/market.md
+https://docs.polymarket.com/api-reference/wss/user.md
+
+## Sports Websocket
+https://docs.polymarket.com/developers/sports-websocket/overview.md
+https://docs.polymarket.com/developers/sports-websocket/message-format.md
+https://docs.polymarket.com/developers/sports-websocket/quickstart.md
+https://docs.polymarket.com/market-data/websocket/sports.md
+https://docs.polymarket.com/api-reference/wss/sports.md
+
+## Real Time Data Stream
+https://docs.polymarket.com/market-data/websocket/rtds.md
+https://docs.polymarket.com/developers/RTDS/RTDS-overview.md
+https://docs.polymarket.com/developers/RTDS/RTDS-crypto-prices.md
+https://docs.polymarket.com/developers/RTDS/RTDS-comments.md
+
+## Gamma Structure
+https://docs.polymarket.com/developers/gamma-markets-api/overview.md
+https://docs.polymarket.com/developers/gamma-markets-api/gamma-structure.md
+https://docs.polymarket.com/developers/gamma-markets-api/fetch-markets-guide.md
+
+## Gamma Endpoints - Status
+
+## API Reference - Sports
+https://docs.polymarket.com/api-reference/sports/list-teams.md
+https://docs.polymarket.com/api-reference/sports/get-sports-metadata-information.md
+https://docs.polymarket.com/api-reference/sports/get-valid-sports-market-types.md
+
+## API Reference - Tags
+https://docs.polymarket.com/api-reference/tags/list-tags.md
+https://docs.polymarket.com/api-reference/tags/get-tag-by-id.md
+https://docs.polymarket.com/api-reference/tags/get-tag-by-slug.md
+https://docs.polymarket.com/api-reference/tags/get-related-tags-relationships-by-tag-id.md
+https://docs.polymarket.com/api-reference/tags/get-related-tags-relationships-by-tag-slug.md
+https://docs.polymarket.com/api-reference/tags/get-tags-related-to-a-tag-id.md
+https://docs.polymarket.com/api-reference/tags/get-tags-related-to-a-tag-slug.md
+
+## API Reference - Events
+https://docs.polymarket.com/api-reference/events/list-events.md
+https://docs.polymarket.com/api-reference/events/list-events-keyset-pagination.md
+https://docs.polymarket.com/api-reference/events/get-event-by-id.md
+https://docs.polymarket.com/api-reference/events/get-event-tags.md
+https://docs.polymarket.com/api-reference/events/get-event-by-slug.md
+
+## API Reference - Markets
+https://docs.polymarket.com/api-reference/markets/list-markets.md
+https://docs.polymarket.com/api-reference/markets/list-markets-keyset-pagination.md
+https://docs.polymarket.com/api-reference/markets/get-market-by-id.md
+https://docs.polymarket.com/api-reference/markets/get-market-tags-by-id.md
+https://docs.polymarket.com/api-reference/markets/get-market-by-slug.md
+https://docs.polymarket.com/api-reference/markets/get-clob-market-info.md
+https://docs.polymarket.com/api-reference/markets/get-market-by-token.md
+https://docs.polymarket.com/api-reference/markets/get-prices-history.md
+https://docs.polymarket.com/api-reference/markets/get-batch-prices-history.md
+https://docs.polymarket.com/api-reference/markets/get-sampling-markets.md
+https://docs.polymarket.com/api-reference/markets/get-simplified-markets.md
+https://docs.polymarket.com/api-reference/markets/get-sampling-simplified-markets.md
+
+## API Reference - Series
+https://docs.polymarket.com/api-reference/series/list-series.md
+https://docs.polymarket.com/api-reference/series/get-series-by-id.md
+
+## API Reference - Comments
+https://docs.polymarket.com/api-reference/comments/list-comments.md
+https://docs.polymarket.com/api-reference/comments/get-comments-by-comment-id.md
+https://docs.polymarket.com/api-reference/comments/get-comments-by-user-address.md
+
+## API Reference - Profiles
+https://docs.polymarket.com/api-reference/profiles/get-public-profile-by-wallet-address.md
+
+## API Reference - Search
+https://docs.polymarket.com/api-reference/search/search-markets-events-and-profiles.md
+
+## API Reference - Data API Status
+
+## API Reference - Misc
+https://docs.polymarket.com/api-reference/misc/download-an-accounting-snapshot-zip-of-csvs.md
+https://docs.polymarket.com/api-reference/misc/get-total-markets-a-user-has-traded.md
+https://docs.polymarket.com/api-reference/misc/get-open-interest.md
+https://docs.polymarket.com/api-reference/misc/get-live-volume-for-an-event.md
+
+## API Reference - Core
+https://docs.polymarket.com/api-reference/core/get-current-positions-for-a-user.md
+https://docs.polymarket.com/api-reference/core/get-trades-for-a-user-or-markets.md
+https://docs.polymarket.com/api-reference/core/get-user-activity.md
+https://docs.polymarket.com/api-reference/core/get-top-holders-for-markets.md
+https://docs.polymarket.com/api-reference/core/get-total-value-of-a-users-positions.md
+https://docs.polymarket.com/api-reference/core/get-closed-positions-for-a-user.md
+https://docs.polymarket.com/api-reference/core/get-trader-leaderboard-rankings.md
+https://docs.polymarket.com/api-reference/core/get-positions-for-a-market.md
+
+## API Reference - Builders
+https://docs.polymarket.com/api-reference/builders/get-aggregated-builder-leaderboard.md
+https://docs.polymarket.com/api-reference/builders/get-daily-builder-volume-time-series.md
+
+## Bridge & Swap - Overview
+
+https://docs.polymarket.com/developers/misc-endpoints/bridge-overview.md
+
+## API Reference - Bridge
+https://docs.polymarket.com/api-reference/bridge/get-supported-assets.md
+https://docs.polymarket.com/api-reference/bridge/get-a-quote.md
+
+https://docs.polymarket.com/api-reference/bridge/create-withdrawal-addresses.md
+https://docs.polymarket.com/api-reference/bridge/get-transaction-status.md
+https://docs.polymarket.com/api-reference/bridge/create-bridge-addresses.md
+https://docs.polymarket.com/trading/bridge/deposit.md
+https://docs.polymarket.com/trading/bridge/quote.md
+https://docs.polymarket.com/trading/bridge/status.md
+https://docs.polymarket.com/trading/bridge/supported-assets.md
+https://docs.polymarket.com/trading/bridge/withdraw.md
+
+## Subgraph
+
+
+## Resolution
+https://docs.polymarket.com/developers/resolution/UMA.md
+
+## Conditional Token Frameworks (CTF)
+https://docs.polymarket.com/trading/ctf/overview.md
+https://docs.polymarket.com/trading/ctf/split.md
+https://docs.polymarket.com/trading/ctf/merge.md
+https://docs.polymarket.com/trading/ctf/redeem.md
+https://docs.polymarket.com/developers/CTF/overview.md
+https://docs.polymarket.com/developers/CTF/split.md
+https://docs.polymarket.com/developers/CTF/merge.md
+https://docs.polymarket.com/developers/CTF/redeem.md
+https://docs.polymarket.com/developers/CTF/deployment-resources.md
+
+## Proxy Wallets
+https://docs.polymarket.com/developers/proxy-wallet.md
+
+## Negative Risk
+https://docs.polymarket.com/advanced/neg-risk.md
+https://docs.polymarket.com/developers/neg-risk/overview.md
+
+## Changelog
+https://docs.polymarket.com/changelog/changelog.md
+
+## Polymarket Learn - FAQ
+https://docs.polymarket.com/polymarket-learn/FAQ/does-polymarket-have-an-api.md
+https://docs.polymarket.com/polymarket-learn/FAQ/embeds.md
+https://docs.polymarket.com/polymarket-learn/FAQ/geoblocking.md
+https://docs.polymarket.com/polymarket-learn/FAQ/how-to-export-private-key.md
+https://docs.polymarket.com/polymarket-learn/FAQ/is-my-money-safe.md
+https://docs.polymarket.com/polymarket-learn/FAQ/is-polymarket-the-house.md
+https://docs.polymarket.com/polymarket-learn/FAQ/polling.md
+https://docs.polymarket.com/polymarket-learn/FAQ/recover-missing-deposit.md
+https://docs.polymarket.com/polymarket-learn/FAQ/sell-early.md
+https://docs.polymarket.com/polymarket-learn/FAQ/support.md
+https://docs.polymarket.com/polymarket-learn/FAQ/wen-token.md
+https://docs.polymarket.com/polymarket-learn/FAQ/what-are-prediction-markets.md
+https://docs.polymarket.com/polymarket-learn/FAQ/why-do-i-need-crypto.md
+
+## Polymarket Learn - Deposits
+https://docs.polymarket.com/polymarket-learn/deposits/coinbase.md
+https://docs.polymarket.com/polymarket-learn/deposits/how-to-withdraw.md
+https://docs.polymarket.com/polymarket-learn/deposits/large-cross-chain-deposits.md
+https://docs.polymarket.com/polymarket-learn/deposits/moonpay.md
+https://docs.polymarket.com/polymarket-learn/deposits/supported-tokens.md
+https://docs.polymarket.com/polymarket-learn/deposits/usdc-on-eth.md
+
+## Polymarket Learn - Get Started
+https://docs.polymarket.com/polymarket-learn/get-started/how-to-deposit.md
+https://docs.polymarket.com/polymarket-learn/get-started/how-to-signup.md
+https://docs.polymarket.com/polymarket-learn/get-started/making-your-first-trade.md
+https://docs.polymarket.com/polymarket-learn/get-started/what-is-polymarket.md
+
+## Polymarket Learn - Markets
+https://docs.polymarket.com/polymarket-learn/markets/dispute.md
+https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-clarified.md
+https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-created.md
+https://docs.polymarket.com/polymarket-learn/markets/how-are-markets-resolved.md
+
+## Polymarket Learn - Trading
+https://docs.polymarket.com/polymarket-learn/trading/fees.md
+https://docs.polymarket.com/polymarket-learn/trading/holding-rewards.md
+https://docs.polymarket.com/polymarket-learn/trading/how-are-prices-calculated.md
+https://docs.polymarket.com/polymarket-learn/trading/limit-orders.md
+https://docs.polymarket.com/polymarket-learn/trading/liquidity-rewards.md
+https://docs.polymarket.com/polymarket-learn/trading/maker-rebates-program.md
+https://docs.polymarket.com/polymarket-learn/trading/market-orders.md
+https://docs.polymarket.com/polymarket-learn/trading/no-limits.md
+https://docs.polymarket.com/polymarket-learn/trading/using-the-orderbook.md
+
+## Polymarket 101
+https://docs.polymarket.com/polymarket-101.md
+
+## Concepts
+https://docs.polymarket.com/concepts/markets-events.md
+https://docs.polymarket.com/concepts/order-lifecycle.md
+https://docs.polymarket.com/concepts/positions-tokens.md
+https://docs.polymarket.com/concepts/prices-orderbook.md
+https://docs.polymarket.com/concepts/resolution.md
+https://docs.polymarket.com/concepts/pusd.md
+
+## Trading
+https://docs.polymarket.com/trading/fees.md
+https://docs.polymarket.com/trading/gasless.md
+https://docs.polymarket.com/trading/orderbook.md
+https://docs.polymarket.com/trading/clients/public.md
+https://docs.polymarket.com/trading/clients/l1.md
+https://docs.polymarket.com/trading/clients/l2.md
+https://docs.polymarket.com/trading/clients/builder.md
+https://docs.polymarket.com/trading/deposit-wallets.md
+https://docs.polymarket.com/trading/taker-rebates.md
+
+## Index & Resources
+https://docs.polymarket.com/index.md
+https://docs.polymarket.com/resources/contract-addresses.md
+https://docs.polymarket.com/resources/error-codes.md
+https://docs.polymarket.com/resources/contracts.md
+
+## NEW - API Reference - Rebates (2026-03-27)
+https://docs.polymarket.com/api-reference/rebates/get-current-rebated-fees-for-a-maker.md
+
+## NEW - API Reference - Relayer
+https://docs.polymarket.com/api-reference/relayer-api-keys/get-all-relayer-api-keys.md
+https://docs.polymarket.com/api-reference/relayer/check-if-a-safe-is-deployed.md
+https://docs.polymarket.com/api-reference/relayer/check-if-a-wallet-is-deployed.md
+https://docs.polymarket.com/api-reference/relayer/get-a-transaction-by-id.md
+https://docs.polymarket.com/api-reference/relayer/get-current-nonce-for-a-user.md
+https://docs.polymarket.com/api-reference/relayer/get-recent-transactions-for-a-user.md
+https://docs.polymarket.com/api-reference/relayer/get-relayer-address-and-nonce.md
+https://docs.polymarket.com/api-reference/relayer/submit-a-transaction.md
+
+## NEW - API Reference - Rewards
+https://docs.polymarket.com/api-reference/rewards/get-current-active-rewards-configurations.md
+https://docs.polymarket.com/api-reference/rewards/get-earnings-for-user-by-date.md
+https://docs.polymarket.com/api-reference/rewards/get-multiple-markets-with-rewards.md
+https://docs.polymarket.com/api-reference/rewards/get-raw-rewards-for-a-specific-market.md
+https://docs.polymarket.com/api-reference/rewards/get-reward-percentages-for-user.md
+https://docs.polymarket.com/api-reference/rewards/get-total-earnings-for-user-by-date.md
+https://docs.polymarket.com/api-reference/rewards/get-user-earnings-and-markets-configuration.md
+
+## NEW - Resources
+https://docs.polymarket.com/resources/blockchain-data.md
+https://docs.polymarket.com/resources/referral-program.md
+
+## NEW - Trading
+https://docs.polymarket.com/trading/matching-engine.md
+
+## Dev Tooling
+https://docs.polymarket.com/dev-tooling.md
+https://docs.polymarket.com/dev-tooling/python.md
+https://docs.polymarket.com/dev-tooling/typescript.md
+
+## NEW - Builders
+https://docs.polymarket.com/builders/fees.md
+
+## NEW - API Reference - Combo Markets (2026-06-17)
+https://docs.polymarket.com/api-reference/combo-markets/get-combo-markets.md
+
+## NEW - API Reference - Core (Combo) (2026-06-17)
+https://docs.polymarket.com/api-reference/core/get-user-combo-activity.md
+https://docs.polymarket.com/api-reference/core/get-user-combo-positions.md
+
+## NEW - API Reference - Maker (RFQ) (2026-06-17)
+https://docs.polymarket.com/api-reference/maker/cancel-a-quote.md
+https://docs.polymarket.com/api-reference/maker/confirm-or-decline-last-look.md
+https://docs.polymarket.com/api-reference/maker/submit-a-quote.md
+
+## NEW - Perps (2026-07-13)
+https://docs.polymarket.com/perps/overview.md
+https://docs.polymarket.com/perps/account-management.md
+https://docs.polymarket.com/perps/authenticated-sessions.md
+https://docs.polymarket.com/perps/changelog.md
+https://docs.polymarket.com/perps/concepts.md
+https://docs.polymarket.com/perps/faq.md
+https://docs.polymarket.com/perps/fund-your-account.md
+https://docs.polymarket.com/perps/market-data.md
+https://docs.polymarket.com/perps/overview.md
+https://docs.polymarket.com/perps/place-your-first-trade.md
+https://docs.polymarket.com/perps/rate-limits.md
+https://docs.polymarket.com/perps/realtime-updates.md
+https://docs.polymarket.com/perps/referral-program.md
+https://docs.polymarket.com/perps/trading.md
+https://docs.polymarket.com/perps/learn-about-trading/architecture.md
+https://docs.polymarket.com/perps/learn-about-trading/fees.md
+https://docs.polymarket.com/perps/learn-about-trading/funding.md
+https://docs.polymarket.com/perps/learn-about-trading/geographic-restrictions.md
+https://docs.polymarket.com/perps/learn-about-trading/index-price.md
+https://docs.polymarket.com/perps/learn-about-trading/liquidation-mechanics.md
+https://docs.polymarket.com/perps/learn-about-trading/margin.md
+https://docs.polymarket.com/perps/learn-about-trading/mark-price.md
+https://docs.polymarket.com/perps/learn-about-trading/market-sessions.md
+https://docs.polymarket.com/perps/learn-about-trading/markets.md
+https://docs.polymarket.com/perps/learn-about-trading/overview.md
+
+## NEW - Perps WebSocket (2026-07-13)
+https://docs.polymarket.com/api-reference/wss/perps-auth.md
+https://docs.polymarket.com/api-reference/wss/perps-auto-cancel.md
+https://docs.polymarket.com/api-reference/wss/perps-balances.md
+https://docs.polymarket.com/api-reference/wss/perps-bbo.md
+https://docs.polymarket.com/api-reference/wss/perps-book.md
+https://docs.polymarket.com/api-reference/wss/perps-cancel-orders.md
+https://docs.polymarket.com/api-reference/wss/perps-cancel-orders-coid.md
+https://docs.polymarket.com/api-reference/wss/perps-deposits.md
+https://docs.polymarket.com/api-reference/wss/perps-fills.md
+https://docs.polymarket.com/api-reference/wss/perps-funding.md
+https://docs.polymarket.com/api-reference/wss/perps-klines.md
+https://docs.polymarket.com/api-reference/wss/perps-orders.md
+https://docs.polymarket.com/api-reference/wss/perps-ping.md
+https://docs.polymarket.com/api-reference/wss/perps-place-orders.md
+https://docs.polymarket.com/api-reference/wss/perps-portfolio.md
+https://docs.polymarket.com/api-reference/wss/perps-statistics.md
+https://docs.polymarket.com/api-reference/wss/perps-tickers.md
+https://docs.polymarket.com/api-reference/wss/perps-trades.md
+https://docs.polymarket.com/api-reference/wss/perps-update-leverage.md
+https://docs.polymarket.com/api-reference/wss/perps-withdrawals.md
+
+## NEW - Account & Trading API (2026-07-13)
+https://docs.polymarket.com/api-reference/apply-referral-code.md
+https://docs.polymarket.com/api-reference/cancel-orders.md
+https://docs.polymarket.com/api-reference/cancel-orders-coid.md
+https://docs.polymarket.com/api-reference/check-invite-code.md
+https://docs.polymarket.com/api-reference/create-account-invite.md
+https://docs.polymarket.com/api-reference/create-orders.md
+https://docs.polymarket.com/api-reference/create-proxy.md
+https://docs.polymarket.com/api-reference/delete-proxy.md
+https://docs.polymarket.com/api-reference/get-account-limits.md
+https://docs.polymarket.com/api-reference/get-account-referral.md
+https://docs.polymarket.com/api-reference/get-account-rewards.md
+https://docs.polymarket.com/api-reference/get-account-stats.md
+https://docs.polymarket.com/api-reference/get-auto-cancel-status.md
+https://docs.polymarket.com/api-reference/get-balances.md
+https://docs.polymarket.com/api-reference/get-bbo.md
+https://docs.polymarket.com/api-reference/get-book.md
+https://docs.polymarket.com/api-reference/get-collateral-assets.md
+https://docs.polymarket.com/api-reference/get-credentials.md
+https://docs.polymarket.com/api-reference/get-deposits.md
+https://docs.polymarket.com/api-reference/get-equity.md
+https://docs.polymarket.com/api-reference/get-exchange-info.md
+https://docs.polymarket.com/api-reference/get-fees.md
+https://docs.polymarket.com/api-reference/get-fills.md
+https://docs.polymarket.com/api-reference/get-funding-charges.md
+https://docs.polymarket.com/api-reference/get-historical-funding.md
+https://docs.polymarket.com/api-reference/get-index.md
+https://docs.polymarket.com/api-reference/get-instrument-config.md
+https://docs.polymarket.com/api-reference/get-instruments.md
+https://docs.polymarket.com/api-reference/get-internal-transfers.md
+https://docs.polymarket.com/api-reference/get-klines.md
+https://docs.polymarket.com/api-reference/get-limit-tiers.md
+https://docs.polymarket.com/api-reference/get-open-orders.md
+https://docs.polymarket.com/api-reference/get-orders.md
+https://docs.polymarket.com/api-reference/get-pnl.md
+https://docs.polymarket.com/api-reference/get-portfolio.md
+https://docs.polymarket.com/api-reference/get-public-portfolio.md
+https://docs.polymarket.com/api-reference/get-recent-trades.md
+https://docs.polymarket.com/api-reference/get-server-time.md
+https://docs.polymarket.com/api-reference/get-statistics.md
+https://docs.polymarket.com/api-reference/get-tickers.md
+https://docs.polymarket.com/api-reference/get-withdrawals.md
+https://docs.polymarket.com/api-reference/internal-transfer.md
+https://docs.polymarket.com/api-reference/set-auto-cancel.md
+https://docs.polymarket.com/api-reference/test-connection.md
+https://docs.polymarket.com/api-reference/update-leverage.md
+https://docs.polymarket.com/api-reference/withdraw.md
diff --git a/PolymarketDocumentation-main/docs/advanced/neg-risk.md b/PolymarketDocumentation-main/docs/advanced/neg-risk.md
new file mode 100644
index 0000000..579d57c
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/advanced/neg-risk.md
@@ -0,0 +1,145 @@
+> ## 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.
+
+# Negative Risk Markets
+
+> Capital-efficient trading for multi-outcome events
+
+**Negative risk** is a mechanism for multi-outcome events where only one outcome can win. It enables capital-efficient trading by allowing positions across all outcomes within an event to be related through a **conversion** operation.
+
+## How It Works
+
+In a standard multi-outcome event, each market is independent. If you want to bet against one outcome, you must buy that outcome's No tokens—but those No tokens have no relationship to the other outcomes.
+
+Negative risk changes this. In a neg risk event:
+
+* A **No share** in any market can be converted into **1 Yes share in every other market**
+* This conversion happens through the Neg Risk Adapter contract
+
+### Example
+
+Consider an event: "Who will win the 2024 Presidential Election?" with three outcomes:
+
+| Outcome | Your Position |
+| ------- | ------------- |
+| Trump | — |
+| Harris | — |
+| Other | 1 No |
+
+With negative risk, that 1 No on "Other" can be converted into:
+
+| Outcome | After Conversion |
+| ------- | ---------------- |
+| Trump | 1 Yes |
+| Harris | 1 Yes |
+| Other | — |
+
+This is capital-efficient because betting against one outcome is economically equivalent to betting *for* all other outcomes.
+
+## Identifying Neg Risk Markets
+
+The Gamma API includes a `negRisk` boolean on events and markets:
+
+```json theme={null}
+{
+ "id": "123",
+ "title": "Who will win the 2024 Presidential Election?",
+ "negRisk": true,
+ "markets": [...]
+}
+```
+
+When placing orders on neg risk markets, you must specify this in your order options:
+
+```typescript theme={null}
+const response = await client.createAndPostOrder(
+ {
+ tokenID: "TOKEN_ID",
+ price: 0.5,
+ size: 100,
+ side: Side.BUY,
+ },
+ {
+ tickSize: "0.01",
+ negRisk: true, // Required for neg risk markets
+ },
+);
+```
+
+## Contract Addresses
+
+Neg risk markets use different contracts than standard markets:
+
+See [Contracts](/resources/contracts) for the Neg Risk Adapter and Neg Risk CTF Exchange addresses.
+
+## Augmented Negative Risk
+
+Standard negative risk requires the complete set of outcomes to be known at market creation. But sometimes new outcomes emerge after trading begins (e.g., a new candidate enters a race).
+
+**Augmented negative risk** solves this with:
+
+| Outcome Type | Description |
+| ------------------------ | ------------------------------------------------------------- |
+| **Named outcomes** | Known outcomes (e.g., "Trump", "Harris") |
+| **Placeholder outcomes** | Reserved slots that can be clarified later (e.g., "Person A") |
+| **Explicit Other** | Catches any outcome not explicitly named |
+
+### How Placeholders Work
+
+1. Event launches with named outcomes + placeholders + "Other"
+2. When a new outcome emerges, a placeholder is clarified via the bulletin board
+3. The "Other" definition narrows as placeholders are assigned
+
+### Trading Rules for Augmented Neg Risk
+
+
+ Only trade on **named outcomes**. Placeholder outcomes should be ignored until
+ they are named or until resolution occurs. The Polymarket UI does not display
+ unnamed outcomes.
+
+
+* If the correct outcome at resolution is not named, the market resolves to "Other"
+* The "Other" outcome's definition changes as placeholders are clarified—avoid trading it directly
+
+### Identifying Augmented Neg Risk
+
+An event is augmented neg risk when both flags are true:
+
+```json theme={null}
+{
+ "enableNegRisk": true,
+ "negRiskAugmented": true
+}
+```
+
+
+ The Gamma API includes a boolean field `negRisk` on events and markets, which indicates whether the event uses negative risk. For augmented neg risk events, an additional `enableNegRisk` field is also `true`. When placing orders, the SDK option is always `negRisk: true` / `neg_risk: True` regardless of whether the market is standard or augmented neg risk.
+
+
+## Technical Details
+
+### Conversion Mechanics
+
+The conversion operation is atomic and happens through the Neg Risk Adapter:
+
+1. You hold 1 No token for Outcome A
+2. Call the convert function on the adapter
+3. You receive 1 Yes token for every other outcome in the event
+
+## Resources
+
+* [Neg Risk Adapter Source Code](https://github.com/Polymarket/neg-risk-ctf-adapter)
+* [Gamma API Documentation](/market-data/overview)
+
+## Next Steps
+
+
+
+ Understand how multi-market events are structured.
+
+
+
+ Learn about token operations like split, merge, and redeem.
+
+
diff --git a/PolymarketDocumentation-main/docs/api-reference/apply-referral-code.md b/PolymarketDocumentation-main/docs/api-reference/apply-referral-code.md
new file mode 100644
index 0000000..6abaeb4
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/apply-referral-code.md
@@ -0,0 +1,226 @@
+> ## 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.
+
+# Apply Referral Code
+
+> Apply a referral code to the authenticated account after signup. Accounts
+can only apply a referral code if they do not already have one.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json post /v1/account/referral
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/referral:
+ post:
+ summary: Apply Referral Code
+ description: >
+ Apply a referral code to the authenticated account after signup.
+ Accounts
+
+ can only apply a referral code if they do not already have one.
+ operationId: applyReferral
+ requestBody:
+ required: true
+ description: Referral code to apply.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AccountReferralRequest'
+ examples:
+ applyReferral:
+ summary: Apply a referral code
+ value:
+ code: ABC123
+ responses:
+ '200':
+ description: Referral code accepted.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericAccepted'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ AccountReferralRequest:
+ type: object
+ required:
+ - code
+ properties:
+ code:
+ $ref: '#/components/schemas/code'
+ GenericAccepted:
+ type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ code:
+ type: string
+ description: Referral or invite code
+ example: ABC123
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/authentication.md b/PolymarketDocumentation-main/docs/api-reference/authentication.md
new file mode 100644
index 0000000..d099fd7
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/authentication.md
@@ -0,0 +1,437 @@
+> ## 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.
+
+# Authentication
+
+> How to authenticate requests to the CLOB API
+
+The CLOB API uses two levels of authentication: **L1 (Private Key)** and **L2 (API Key)**. Either can be accomplished using the CLOB client or REST API.
+
+## Public vs Authenticated
+
+
+
+ The **Gamma API**, **Data API**, and CLOB read endpoints (orderbook, prices, spreads) require no authentication.
+
+
+
+ CLOB trading endpoints (placing orders, cancellations, heartbeat) require all 5 `POLY_*` L2 HTTP headers.
+
+
+
+***
+
+## Two-Level Authentication Model
+
+The CLOB uses two levels of authentication: L1 (Private Key) and L2 (API Key). Either can be accomplished using the CLOB client or REST API
+
+### L1 Authentication
+
+L1 authentication uses the wallet's private key to sign an EIP-712 message used in the request header. It proves ownership and control over the private key. The private key stays in control of the user and all trading activity remains non-custodial.
+
+**Used for:**
+
+* Creating API credentials
+* Deriving existing API credentials
+* Signing and creating user's orders locally
+
+### L2 Authentication
+
+L2 uses API credentials (apiKey, secret, passphrase) generated from L1 authentication. These are used solely to authenticate requests made to the CLOB API. Requests are signed using HMAC-SHA256.
+
+**Used for:**
+
+* Cancel or get user's open orders
+* Check user's balances and allowances
+* Post user's signed orders
+
+
+ Even with L2 authentication headers, methods that create user orders still
+ require the user to sign the order payload.
+
+
+***
+
+## Getting API Credentials
+
+Before making authenticated requests, you need to obtain API credentials using L1 authentication.
+
+### Using the SDK
+
+
+
+ ```typescript theme={null}
+ import { ClobClient } from "@polymarket/clob-client-v2";
+ import { createWalletClient, http } from "viem";
+ import { privateKeyToAccount } from "viem/accounts";
+
+ const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
+ const signer = createWalletClient({ account, transport: http() });
+
+ const client = new ClobClient({
+ host: "https://clob.polymarket.com",
+ chain: 137, // Polygon mainnet
+ signer,
+ });
+
+ // Creates new credentials or derives existing ones
+ const credentials = await client.createOrDeriveApiKey();
+
+ console.log(credentials);
+ // {
+ // key: "550e8400-e29b-41d4-a716-446655440000",
+ // secret: "base64EncodedSecretString",
+ // passphrase: "randomPassphraseString"
+ // }
+ ```
+
+
+
+ ```python theme={null}
+ from py_clob_client_v2 import ClobClient
+ import os
+
+ client = ClobClient(
+ host="https://clob.polymarket.com",
+ chain_id=137, # Polygon mainnet
+ key=os.getenv("PRIVATE_KEY")
+ )
+
+ # Creates new credentials or derives existing ones
+ credentials = client.create_or_derive_api_key()
+
+ print(credentials)
+ # {
+ # "apiKey": "550e8400-e29b-41d4-a716-446655440000",
+ # "secret": "base64EncodedSecretString",
+ # "passphrase": "randomPassphraseString"
+ # }
+ ```
+
+
+
+ ```rust theme={null}
+ use std::str::FromStr;
+ use polymarket_client_sdk_v2::POLYGON;
+ use polymarket_client_sdk_v2::auth::{LocalSigner, Signer};
+ use polymarket_client_sdk_v2::clob::{Client, Config};
+
+ let private_key = std::env::var("POLYMARKET_PRIVATE_KEY")?;
+ let signer = LocalSigner::from_str(&private_key)?
+ .with_chain_id(Some(POLYGON));
+
+ // Creates new credentials or derives existing ones,
+ // then initializes the authenticated client — all in one step
+ let client = Client::new("https://clob.polymarket.com", Config::default())?
+ .authentication_builder(&signer)
+ .authenticate()
+ .await?;
+
+ let credentials = client.credentials();
+ println!("API Key: {}", credentials.key());
+ ```
+
+
+
+
+ **Never commit private keys to version control.** Always use environment
+ variables or secure key management systems.
+
+
+### Using the REST API
+
+While we highly recommend using our provided clients to handle signing and authentication, the following is for developers who choose NOT to use our [Python](https://github.com/Polymarket/py-clob-client-v2) or [TypeScript](https://github.com/Polymarket/clob-client-v2) clients.
+
+**Create API Credentials**
+
+```bash theme={null}
+POST https://clob.polymarket.com/auth/api-key
+```
+
+**Derive API Credentials**
+
+```bash theme={null}
+GET https://clob.polymarket.com/auth/derive-api-key
+```
+
+Required L1 headers:
+
+| Header | Description |
+| ---------------- | ---------------------- |
+| `POLY_ADDRESS` | Polygon signer address |
+| `POLY_SIGNATURE` | CLOB EIP-712 signature |
+| `POLY_TIMESTAMP` | Current UNIX timestamp |
+| `POLY_NONCE` | Nonce (default: 0) |
+
+The `POLY_SIGNATURE` is generated by signing the following EIP-712 struct:
+
+
+
+ ```typescript TypeScript theme={null}
+ const domain = {
+ name: "ClobAuthDomain",
+ version: "1",
+ chainId: chainId, // Polygon Chain ID 137
+ };
+
+ const types = {
+ ClobAuth: [
+ { name: "address", type: "address" },
+ { name: "timestamp", type: "string" },
+ { name: "nonce", type: "uint256" },
+ { name: "message", type: "string" },
+ ],
+ };
+
+ const value = {
+ address: signingAddress, // The Signing address
+ timestamp: ts, // The CLOB API server timestamp
+ nonce: nonce, // The nonce used
+ message: "This message attests that I control the given wallet",
+ };
+
+ const sig = await signer._signTypedData(domain, types, value);
+ ```
+
+ ```python Python theme={null}
+ domain = {
+ "name": "ClobAuthDomain",
+ "version": "1",
+ "chainId": chainId, # Polygon Chain ID 137
+ }
+
+ types = {
+ "ClobAuth": [
+ {"name": "address", "type": "address"},
+ {"name": "timestamp", "type": "string"},
+ {"name": "nonce", "type": "uint256"},
+ {"name": "message", "type": "string"},
+ ]
+ }
+
+ value = {
+ "address": signingAddress, # The signing address
+ "timestamp": ts, # The CLOB API server timestamp
+ "nonce": nonce, # The nonce used
+ "message": "This message attests that I control the given wallet",
+ }
+
+ sig = signer.sign_typed_data(domain, types, value)
+ ```
+
+
+
+Reference implementations:
+
+* [TypeScript](https://github.com/Polymarket/clob-client-v2/blob/main/src/signing/eip712.ts)
+* [Python](https://github.com/Polymarket/py-clob-client-v2/blob/main/py_clob_client_v2/signing/eip712.py)
+
+Response:
+
+```json theme={null}
+{
+ "apiKey": "550e8400-e29b-41d4-a716-446655440000",
+ "secret": "base64EncodedSecretString",
+ "passphrase": "randomPassphraseString"
+}
+```
+
+**You'll need all three values for L2 authentication.**
+
+***
+
+## L2 Authentication Headers
+
+All trading endpoints require these 5 headers:
+
+| Header | Description |
+| ----------------- | ----------------------------- |
+| `POLY_ADDRESS` | Polygon signer address |
+| `POLY_SIGNATURE` | HMAC signature for request |
+| `POLY_TIMESTAMP` | Current UNIX timestamp |
+| `POLY_API_KEY` | User's API `apiKey` value |
+| `POLY_PASSPHRASE` | User's API `passphrase` value |
+
+The `POLY_SIGNATURE` for L2 is an HMAC-SHA256 signature created using the user's API credentials `secret` value. Reference implementations can be found in the [TypeScript](https://github.com/Polymarket/clob-client-v2/blob/main/src/signing/hmac.ts) and [Python](https://github.com/Polymarket/py-clob-client-v2/blob/main/py_clob_client_v2/signing/hmac.py) clients.
+
+### CLOB Client
+
+
+
+ ```typescript theme={null}
+ import { ClobClient, Side } from "@polymarket/clob-client-v2";
+ import { createWalletClient, http } from "viem";
+ import { privateKeyToAccount } from "viem/accounts";
+
+ const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
+ const signer = createWalletClient({ account, transport: http() });
+ const depositWalletAddress = process.env.DEPOSIT_WALLET_ADDRESS!;
+
+ const client = new ClobClient({
+ host: "https://clob.polymarket.com",
+ chain: 137,
+ signer,
+ creds: apiCreds, // Generated from L1 auth, API credentials enable L2 methods
+ signatureType: 3, // POLY_1271, explained below
+ funderAddress: depositWalletAddress, // deposit wallet funder
+ });
+
+ // Now you can trade!
+ const order = await client.createAndPostOrder(
+ { tokenID: "123456", price: 0.65, size: 100, side: Side.BUY },
+ { tickSize: "0.01", negRisk: false }
+ );
+ ```
+
+
+
+ ```python theme={null}
+ from py_clob_client_v2 import ClobClient, OrderArgs, PartialCreateOrderOptions
+ from py_clob_client_v2.order_builder.constants import BUY
+ import os
+
+ client = ClobClient(
+ host="https://clob.polymarket.com",
+ chain_id=137,
+ key=os.getenv("PRIVATE_KEY"),
+ creds=api_creds, # Generated from L1 auth, API credentials enable L2 methods
+ signature_type=3, # POLY_1271, explained below
+ funder=os.getenv("DEPOSIT_WALLET_ADDRESS")
+ )
+
+ # Now you can trade!
+ order = client.create_and_post_order(
+ OrderArgs(token_id="123456", price=0.65, size=100, side=BUY),
+ options=PartialCreateOrderOptions(tick_size="0.01", neg_risk=False),
+ )
+ ```
+
+
+
+ ```rust theme={null}
+ use polymarket_client_sdk_v2::clob::types::{Side, SignatureType};
+ use polymarket_client_sdk_v2::types::dec;
+
+ let deposit_wallet = std::env::var("DEPOSIT_WALLET_ADDRESS")?.parse()?;
+
+ let client = Client::new("https://clob.polymarket.com", Config::default())?
+ .authentication_builder(&signer)
+ .funder(deposit_wallet)
+ .signature_type(SignatureType::Poly1271)
+ .authenticate()
+ .await?;
+
+ // Now you can trade!
+ let order = client.limit_order()
+ .token_id("123456".parse()?)
+ .price(dec!(0.65))
+ .size(dec!(100))
+ .side(Side::Buy)
+ .build().await?;
+ let signed = client.sign(&signer, order).await?;
+ let response = client.post_order(signed).await?;
+ ```
+
+
+
+
+ Even with L2 authentication headers, methods that create user orders still
+ require the user to sign the order payload.
+
+
+***
+
+## Signature Types and Funder
+
+When initializing the L2 client, you must specify your wallet **signatureType** and the **funder** address which holds the funds:
+
+| Signature Type | Value | Description |
+| -------------- | ----- | -------------------------------------------------------------------------------------------------------------------------- |
+| EOA | `0` | Standard Ethereum wallet (MetaMask). Funder is the EOA address and will need POL to pay gas on transactions. |
+| POLY\_PROXY | `1` | Existing Polymarket proxy wallet flow, commonly used by users who logged in via Magic Link email/Google. |
+| GNOSIS\_SAFE | `2` | Existing Gnosis Safe wallet flow. Existing Safe users can continue using this type. |
+| POLY\_1271 | `3` | Deposit wallet flow for new API users. The funder is the deposit wallet address and orders are validated through ERC-1271. |
+
+
+ New API users should use deposit wallets with `POLY_1271`. Existing Safe and
+ Proxy users are unaffected and can keep using their current funder address and
+ signature type. See the [Deposit Wallet Guide](/trading/deposit-wallets) for
+ setup details.
+
+
+***
+
+## Security Best Practices
+
+
+
+ Store private keys in environment variables or secure key management systems. Never commit them to version control.
+
+ ```bash theme={null}
+ # .env (never commit this file)
+ PRIVATE_KEY=0x...
+ ```
+
+
+
+ Never expose your API secret in client-side code. All authenticated requests should originate from your backend.
+
+
+
+***
+
+## Troubleshooting
+
+
+
+ Your wallet's private key is incorrect or improperly formatted.
+
+ **Solutions:**
+
+ * Verify your private key is a valid hex string (starts with "0x")
+ * Ensure you're using the correct key for the intended address
+ * Check that the key has proper permissions
+
+
+
+ The nonce you provided has already been used to create an API key.
+
+ **Solutions:**
+
+ * Use `deriveApiKey()` with the same nonce to retrieve existing credentials
+ * Or use a different nonce with `createApiKey()`
+
+
+
+ Your funder address is incorrect or doesn't match your wallet.
+
+ **Solution:** Check your Polymarket profile address at [polymarket.com/settings](https://polymarket.com/settings).
+
+ If it does not exist or user has never logged into Polymarket.com, deploy it first before creating L2 authentication.
+
+
+
+ Unfortunately, there's no way to recover lost API credentials without the nonce. You'll need to create new credentials:
+
+ ```typescript theme={null}
+ // Create fresh credentials with a new nonce
+ const newCreds = await client.createApiKey();
+ // Save the nonce this time!
+ ```
+
+
+
+***
+
+## Next Steps
+
+
+
+ Learn how to create and submit orders.
+
+
+
+ Check trading availability by region.
+
+
diff --git a/PolymarketDocumentation-main/docs/api-reference/bridge/create-bridge-addresses.md b/PolymarketDocumentation-main/docs/api-reference/bridge/create-bridge-addresses.md
new file mode 100644
index 0000000..cc2bee9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/bridge/create-bridge-addresses.md
@@ -0,0 +1,128 @@
+> ## 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.
+
+# Create bridge addresses
+
+
+
+## OpenAPI
+
+````yaml /api-spec/bridge-openapi.yaml post /deposit
+openapi: 3.0.3
+info:
+ title: Polymarket Bridge API
+ version: 1.0.0
+ description: HTTP API for Polymarket bridge and swap operations.
+servers:
+ - url: https://bridge.polymarket.com
+ description: Polymarket Bridge API
+security: []
+tags:
+ - name: Bridge
+ description: Bridge and swap operations for Polymarket
+paths:
+ /deposit:
+ post:
+ tags:
+ - Bridge
+ summary: Create bridge addresses
+ parameters:
+ - $ref: '#/components/parameters/BuilderCodeHeader'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DepositRequest'
+ example:
+ address: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ responses:
+ '201':
+ description: Bridge addresses created successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DepositResponse'
+ '400':
+ description: >-
+ Bad Request - Invalid address, request body, or malformed
+ X-Builder-Code
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ parameters:
+ BuilderCodeHeader:
+ name: X-Builder-Code
+ in: header
+ required: false
+ description: >
+ Optional builder code (bytes32 hex) attributing this request to your
+ integration so transfer issues can be traced to your app. Omitting it
+ still succeeds but returns a `missing_builder_code` warning; a malformed
+ code returns 400. Get your code at
+ https://polymarket.com/settings?tab=builder
+ schema:
+ type: string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x00000000000000000000000000000000000000000000000000000000abcd1234'
+ schemas:
+ DepositRequest:
+ type: object
+ required:
+ - address
+ properties:
+ address:
+ $ref: '#/components/schemas/Address'
+ description: >-
+ Your Polymarket wallet address where deposited funds will be
+ credited as pUSD
+ DepositResponse:
+ type: object
+ properties:
+ address:
+ type: object
+ description: Bridge addresses for different blockchain networks
+ properties:
+ evm:
+ type: string
+ description: >-
+ EVM-compatible bridge address (Ethereum, Polygon, Arbitrum,
+ Base, etc.)
+ example: '0x23566f8b2E82aDfCf01846E54899d110e97AC053'
+ svm:
+ type: string
+ description: Solana Virtual Machine bridge address
+ example: CrvTBvzryYxBHbWu2TiQpcqD5M7Le7iBKzVmEj3f36Jb
+ btc:
+ type: string
+ description: Bitcoin bridge address
+ example: bc1q8eau83qffxcj8ht4hsjdza3lha9r3egfqysj3g
+ note:
+ type: string
+ description: Additional information about the bridge addresses
+ example: >-
+ Only certain chains and tokens are supported. See /supported-assets
+ for details.
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/bridge/create-withdrawal-addresses.md b/PolymarketDocumentation-main/docs/api-reference/bridge/create-withdrawal-addresses.md
new file mode 100644
index 0000000..36cc347
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/bridge/create-withdrawal-addresses.md
@@ -0,0 +1,152 @@
+> ## 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.
+
+# Create withdrawal addresses
+
+
+
+## OpenAPI
+
+````yaml /api-spec/bridge-openapi.yaml post /withdraw
+openapi: 3.0.3
+info:
+ title: Polymarket Bridge API
+ version: 1.0.0
+ description: HTTP API for Polymarket bridge and swap operations.
+servers:
+ - url: https://bridge.polymarket.com
+ description: Polymarket Bridge API
+security: []
+tags:
+ - name: Bridge
+ description: Bridge and swap operations for Polymarket
+paths:
+ /withdraw:
+ post:
+ tags:
+ - Bridge
+ summary: Create withdrawal addresses
+ parameters:
+ - $ref: '#/components/parameters/BuilderCodeHeader'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WithdrawalRequest'
+ example:
+ address: '0x9156dd10bea4c8d7e2d591b633d1694b1d764756'
+ toChainId: '1'
+ toTokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
+ recipientAddr: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
+ responses:
+ '201':
+ description: Withdrawal addresses created successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DepositResponse'
+ example:
+ address:
+ evm: '0x23566f8b2E82aDfCf01846E54899d110e97AC053'
+ svm: CrvTBvzryYxBHbWu2TiQpcqD5M7Le7iBKzVmEj3f36Jb
+ btc: bc1q8eau83qffxcj8ht4hsjdza3lha9r3egfqysj3g
+ note: >-
+ Send funds to these addresses to bridge to your destination
+ chain and token.
+ '400':
+ description: Bad Request - Invalid/missing parameters or malformed X-Builder-Code
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ parameters:
+ BuilderCodeHeader:
+ name: X-Builder-Code
+ in: header
+ required: false
+ description: >
+ Optional builder code (bytes32 hex) attributing this request to your
+ integration so transfer issues can be traced to your app. Omitting it
+ still succeeds but returns a `missing_builder_code` warning; a malformed
+ code returns 400. Get your code at
+ https://polymarket.com/settings?tab=builder
+ schema:
+ type: string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x00000000000000000000000000000000000000000000000000000000abcd1234'
+ schemas:
+ WithdrawalRequest:
+ type: object
+ required:
+ - address
+ - toChainId
+ - toTokenAddress
+ - recipientAddr
+ properties:
+ address:
+ $ref: '#/components/schemas/Address'
+ description: Source Polymarket wallet address on Polygon
+ toChainId:
+ type: string
+ description: >-
+ Destination chain ID (e.g., "1" for Ethereum, "8453" for Base,
+ "1151111081099710" for Solana)
+ example: '1'
+ toTokenAddress:
+ type: string
+ description: Destination token contract address
+ example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
+ recipientAddr:
+ type: string
+ description: Destination wallet address where funds will be sent
+ example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
+ DepositResponse:
+ type: object
+ properties:
+ address:
+ type: object
+ description: Bridge addresses for different blockchain networks
+ properties:
+ evm:
+ type: string
+ description: >-
+ EVM-compatible bridge address (Ethereum, Polygon, Arbitrum,
+ Base, etc.)
+ example: '0x23566f8b2E82aDfCf01846E54899d110e97AC053'
+ svm:
+ type: string
+ description: Solana Virtual Machine bridge address
+ example: CrvTBvzryYxBHbWu2TiQpcqD5M7Le7iBKzVmEj3f36Jb
+ btc:
+ type: string
+ description: Bitcoin bridge address
+ example: bc1q8eau83qffxcj8ht4hsjdza3lha9r3egfqysj3g
+ note:
+ type: string
+ description: Additional information about the bridge addresses
+ example: >-
+ Only certain chains and tokens are supported. See /supported-assets
+ for details.
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/bridge/get-a-quote.md b/PolymarketDocumentation-main/docs/api-reference/bridge/get-a-quote.md
new file mode 100644
index 0000000..10970e2
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/bridge/get-a-quote.md
@@ -0,0 +1,224 @@
+> ## 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 a quote
+
+
+
+## OpenAPI
+
+````yaml /api-spec/bridge-openapi.yaml post /quote
+openapi: 3.0.3
+info:
+ title: Polymarket Bridge API
+ version: 1.0.0
+ description: HTTP API for Polymarket bridge and swap operations.
+servers:
+ - url: https://bridge.polymarket.com
+ description: Polymarket Bridge API
+security: []
+tags:
+ - name: Bridge
+ description: Bridge and swap operations for Polymarket
+paths:
+ /quote:
+ post:
+ tags:
+ - Bridge
+ summary: Get a quote
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QuoteRequest'
+ example:
+ fromAmountBaseUnit: '10000000'
+ fromChainId: '137'
+ fromTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
+ recipientAddress: '0x17eC161f126e82A8ba337f4022d574DBEaFef575'
+ toChainId: '137'
+ toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ responses:
+ '200':
+ description: Quote retrieved successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QuoteResponse'
+ example:
+ estCheckoutTimeMs: 25000
+ estFeeBreakdown:
+ appFeeLabel: Fun.xyz fee
+ appFeePercent: 0
+ appFeeUsd: 0
+ fillCostPercent: 0
+ fillCostUsd: 0
+ gasUsd: 0.003854
+ maxSlippage: 0
+ minReceived: 14.488305
+ swapImpact: 0
+ swapImpactUsd: 0
+ totalImpact: 0
+ totalImpactUsd: 0
+ estInputUsd: 14.488305
+ estOutputUsd: 14.488305
+ estToTokenBaseUnit: '14491203'
+ quoteId: >-
+ 0x00c34ba467184b0146406d62b0e60aaa24ed52460bd456222b6155a0d9de0ad5
+ '400':
+ description: Bad Request - Missing required field
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ missingFromAmount:
+ value:
+ error: fromAmountBaseUnit is required
+ missingFromChainId:
+ value:
+ error: fromChainId is required
+ missingFromTokenAddress:
+ value:
+ error: fromTokenAddress is required
+ missingRecipientAddress:
+ value:
+ error: recipientAddress is required
+ missingToChainId:
+ value:
+ error: toChainId is required
+ missingToTokenAddress:
+ value:
+ error: toTokenAddress is required
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: cannot get quote
+components:
+ schemas:
+ QuoteRequest:
+ type: object
+ required:
+ - fromAmountBaseUnit
+ - fromChainId
+ - fromTokenAddress
+ - recipientAddress
+ - toChainId
+ - toTokenAddress
+ properties:
+ fromAmountBaseUnit:
+ type: string
+ description: Amount of tokens to send
+ example: '10000000'
+ fromChainId:
+ type: string
+ description: Source Chain ID
+ example: '137'
+ fromTokenAddress:
+ type: string
+ description: Source token address
+ example: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
+ recipientAddress:
+ type: string
+ description: Address of the recipient
+ example: '0x17eC161f126e82A8ba337f4022d574DBEaFef575'
+ toChainId:
+ type: string
+ description: Destination Chain ID
+ example: '137'
+ toTokenAddress:
+ type: string
+ description: Destination token address
+ example: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ QuoteResponse:
+ type: object
+ properties:
+ estCheckoutTimeMs:
+ type: integer
+ description: Estimated time to complete the checkout in milliseconds
+ example: 25000
+ estFeeBreakdown:
+ $ref: '#/components/schemas/FeeBreakdown'
+ estInputUsd:
+ type: number
+ description: Estimated token amount received in USD
+ example: 14.488305
+ estOutputUsd:
+ type: number
+ description: Estimated token amount sent in USD
+ example: 14.488305
+ estToTokenBaseUnit:
+ type: string
+ description: Estimated token amount received
+ example: '14491203'
+ quoteId:
+ type: string
+ description: Unique quote id of the request
+ example: '0x00c34ba467184b0146406d62b0e60aaa24ed52460bd456222b6155a0d9de0ad5'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ FeeBreakdown:
+ type: object
+ description: Breakdown of the estimated fees
+ properties:
+ appFeeLabel:
+ type: string
+ description: Label of the app fee
+ example: Fun.xyz fee
+ appFeePercent:
+ type: number
+ description: App fees as a percentage of the total amount sent
+ example: 0
+ appFeeUsd:
+ type: number
+ description: App fees in USD
+ example: 0
+ fillCostPercent:
+ type: number
+ description: Fill cost percentage of the total amount sent
+ example: 0
+ fillCostUsd:
+ type: number
+ description: Fill cost in USD
+ example: 0
+ gasUsd:
+ type: number
+ description: Gas fee in USD
+ example: 0.003854
+ maxSlippage:
+ type: number
+ description: Maximum potential slippage as a percentage
+ example: 0
+ minReceived:
+ type: number
+ description: Amount after factoring slippage
+ example: 14.488305
+ swapImpact:
+ type: number
+ description: Swap impact as a percentage of the total amount sent
+ example: 0
+ swapImpactUsd:
+ type: number
+ description: Swap impact of the transaction in USD
+ example: 0
+ totalImpact:
+ type: number
+ description: Total impact as a percentage of the total amount sent
+ example: 0
+ totalImpactUsd:
+ type: number
+ description: Impact cost of the transaction
+ example: 0
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/bridge/get-supported-assets.md b/PolymarketDocumentation-main/docs/api-reference/bridge/get-supported-assets.md
new file mode 100644
index 0000000..b5cd652
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/bridge/get-supported-assets.md
@@ -0,0 +1,99 @@
+> ## 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 supported assets
+
+
+
+## OpenAPI
+
+````yaml /api-spec/bridge-openapi.yaml get /supported-assets
+openapi: 3.0.3
+info:
+ title: Polymarket Bridge API
+ version: 1.0.0
+ description: HTTP API for Polymarket bridge and swap operations.
+servers:
+ - url: https://bridge.polymarket.com
+ description: Polymarket Bridge API
+security: []
+tags:
+ - name: Bridge
+ description: Bridge and swap operations for Polymarket
+paths:
+ /supported-assets:
+ get:
+ tags:
+ - Bridge
+ summary: Get supported assets
+ responses:
+ '200':
+ description: Successfully retrieved supported assets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SupportedAssetsResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ SupportedAssetsResponse:
+ type: object
+ properties:
+ supportedAssets:
+ type: array
+ items:
+ $ref: '#/components/schemas/SupportedAsset'
+ description: >-
+ List of supported assets with minimum amounts for deposits and
+ withdrawals
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ SupportedAsset:
+ type: object
+ properties:
+ chainId:
+ type: string
+ description: Chain ID
+ example: '1'
+ chainName:
+ type: string
+ description: Human-readable chain name
+ example: Ethereum
+ token:
+ $ref: '#/components/schemas/Token'
+ minCheckoutUsd:
+ type: number
+ description: Minimum amount in USD for deposits and withdrawals
+ example: 45
+ Token:
+ type: object
+ properties:
+ name:
+ type: string
+ description: Full token name
+ example: USD Coin
+ symbol:
+ type: string
+ description: Token symbol
+ example: USDC
+ address:
+ type: string
+ description: Token contract address
+ example: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
+ decimals:
+ type: integer
+ description: Token decimals
+ example: 6
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/bridge/get-transaction-status.md b/PolymarketDocumentation-main/docs/api-reference/bridge/get-transaction-status.md
new file mode 100644
index 0000000..f4c340d
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/bridge/get-transaction-status.md
@@ -0,0 +1,154 @@
+> ## 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 transaction status
+
+
+
+## OpenAPI
+
+````yaml /api-spec/bridge-openapi.yaml get /status/{address}
+openapi: 3.0.3
+info:
+ title: Polymarket Bridge API
+ version: 1.0.0
+ description: HTTP API for Polymarket bridge and swap operations.
+servers:
+ - url: https://bridge.polymarket.com
+ description: Polymarket Bridge API
+security: []
+tags:
+ - name: Bridge
+ description: Bridge and swap operations for Polymarket
+paths:
+ /status/{address}:
+ get:
+ tags:
+ - Bridge
+ summary: Get transaction status
+ parameters:
+ - name: address
+ in: path
+ required: true
+ description: >-
+ The address to query for transaction status (EVM, SVM, or BTC
+ address from the `/deposit` or `/withdraw` response)
+ schema:
+ type: string
+ example: EXoZue2avJae1d45B3fVw2unhkrtToSYQqHtHgfZ2cbE
+ responses:
+ '200':
+ description: Successfully retrieved transaction status
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TransactionStatusResponse'
+ example:
+ transactions:
+ - fromChainId: '1151111081099710'
+ fromTokenAddress: '11111111111111111111111111111111'
+ fromAmountBaseUnit: '13566635'
+ toChainId: '137'
+ toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ status: DEPOSIT_DETECTED
+ - fromChainId: '1151111081099710'
+ fromTokenAddress: '11111111111111111111111111111111'
+ fromAmountBaseUnit: '13400000'
+ toChainId: '137'
+ toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ createdTimeMs: 1757646914535
+ status: PROCESSING
+ - fromChainId: '1151111081099710'
+ fromTokenAddress: '11111111111111111111111111111111'
+ fromAmountBaseUnit: '13500152'
+ toChainId: '137'
+ toTokenAddress: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ txHash: >-
+ 3atr19NAiNCYt24RHM1WnzZp47RXskpTDzspJoCBBaMFwUB8fk37hFkxz35P5UEnnmWz21rb2t5wJ8pq3EE2XnxU
+ createdTimeMs: 1757531217339
+ status: COMPLETED
+ '400':
+ description: Bad Request - Missing address parameter
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: address is required
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: cannot get transaction status
+components:
+ schemas:
+ TransactionStatusResponse:
+ type: object
+ properties:
+ transactions:
+ type: array
+ items:
+ $ref: '#/components/schemas/Transaction'
+ description: List of transactions for the given address
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ Transaction:
+ type: object
+ properties:
+ fromChainId:
+ type: string
+ description: Source chain ID
+ example: '1151111081099710'
+ fromTokenAddress:
+ type: string
+ description: Source token contract address
+ example: '11111111111111111111111111111111'
+ fromAmountBaseUnit:
+ type: string
+ description: Amount in base units (without decimals)
+ example: '13566635'
+ toChainId:
+ type: string
+ description: Destination chain ID
+ example: '137'
+ toTokenAddress:
+ type: string
+ description: Destination token contract address
+ example: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ status:
+ type: string
+ description: >
+ Current status of the transaction. If a transaction fails, remains
+ stuck, or funds are held due to a compliance check, direct users to
+ our Bridge API provider's support
+ (https://intercom.help/funxyz/en/articles/10732578-contact-us).
+ enum:
+ - DEPOSIT_DETECTED
+ - PROCESSING
+ - ORIGIN_TX_CONFIRMED
+ - SUBMITTED
+ - COMPLETED
+ - FAILED
+ example: COMPLETED
+ txHash:
+ type: string
+ description: Transaction hash (only available when status is COMPLETED)
+ example: >-
+ 3atr19NAiNCYt24RHM1WnzZp47RXskpTDzspJoCBBaMFwUB8fk37hFkxz35P5UEnnmWz21rb2t5wJ8pq3EE2XnxU
+ createdTimeMs:
+ type: number
+ description: >-
+ Unix timestamp in milliseconds when transaction was created (missing
+ when status is DEPOSIT_DETECTED)
+ example: 1757531217339
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/builders/get-aggregated-builder-leaderboard.md b/PolymarketDocumentation-main/docs/api-reference/builders/get-aggregated-builder-leaderboard.md
new file mode 100644
index 0000000..6834755
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/builders/get-aggregated-builder-leaderboard.md
@@ -0,0 +1,122 @@
+> ## 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 aggregated builder leaderboard
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /v1/builders/leaderboard
+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/builders/leaderboard:
+ get:
+ tags:
+ - Builders
+ summary: Get aggregated builder leaderboard
+ parameters:
+ - in: query
+ name: timePeriod
+ schema:
+ type: string
+ enum:
+ - DAY
+ - WEEK
+ - MONTH
+ - ALL
+ default: DAY
+ description: |
+ The time period to aggregate results over.
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 25
+ minimum: 0
+ maximum: 50
+ description: Maximum number of builders to return
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 1000
+ description: Starting index for pagination
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/LeaderboardEntry'
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ LeaderboardEntry:
+ type: object
+ properties:
+ rank:
+ type: string
+ description: The rank position of the builder
+ builder:
+ type: string
+ description: The builder name or identifier
+ builderCode:
+ type: string
+ description: >-
+ The builder's onchain attribution code as attached to orders via
+ `builderCode` (see CLOB V2). Empty string for legacy builders
+ without a registered code.
+ volume:
+ type: number
+ description: Total trading volume attributed to this builder
+ activeUsers:
+ type: integer
+ description: Number of active users for this builder
+ verified:
+ type: boolean
+ description: Whether the builder is verified
+ builderLogo:
+ type: string
+ description: URL to the builder's logo image
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/builders/get-daily-builder-volume-time-series.md b/PolymarketDocumentation-main/docs/api-reference/builders/get-daily-builder-volume-time-series.md
new file mode 100644
index 0000000..3256844
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/builders/get-daily-builder-volume-time-series.md
@@ -0,0 +1,111 @@
+> ## 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 daily builder volume time-series
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /v1/builders/volume
+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/builders/volume:
+ get:
+ tags:
+ - Builders
+ summary: Get daily builder volume time-series
+ parameters:
+ - in: query
+ name: timePeriod
+ schema:
+ type: string
+ enum:
+ - DAY
+ - WEEK
+ - MONTH
+ - ALL
+ default: DAY
+ description: |
+ The time period to fetch daily records for.
+ responses:
+ '200':
+ description: Success - Returns array of daily volume records
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BuilderVolumeEntry'
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ BuilderVolumeEntry:
+ type: object
+ properties:
+ dt:
+ type: string
+ format: date-time
+ description: The timestamp for this volume entry in ISO 8601 format
+ example: '2025-11-15T00:00:00Z'
+ builder:
+ type: string
+ description: The builder name or identifier
+ builderCode:
+ type: string
+ description: >-
+ The builder's onchain attribution code as attached to orders via
+ `builderCode` (see CLOB V2). Empty string for legacy builders
+ without a registered code.
+ builderLogo:
+ type: string
+ description: URL to the builder's logo image
+ verified:
+ type: boolean
+ description: Whether the builder is verified
+ volume:
+ type: number
+ description: Trading volume for this builder on this date
+ activeUsers:
+ type: integer
+ description: Number of active users for this builder on this date
+ rank:
+ type: string
+ description: The rank position of the builder on this date
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/cancel-orders-coid.md b/PolymarketDocumentation-main/docs/api-reference/cancel-orders-coid.md
new file mode 100644
index 0000000..077ae15
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/cancel-orders-coid.md
@@ -0,0 +1,278 @@
+> ## 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.
+
+# Cancel Orders COID
+
+> Cancel orders by client order ID.
+Requires proxy signature, see [proxy signing](/http/signing#2-proxy-signing).
+
+
+Request Weight: **1 + floor(n / 20)** Action Weight: **0**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json delete /v1/trade/orders-coid
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/trade/orders-coid:
+ delete:
+ summary: Cancel Orders COID
+ description: >
+ Cancel orders by client order ID.
+
+ Requires proxy signature, see [proxy
+ signing](/http/signing#2-proxy-signing).
+ operationId: cancelOrdersByCoid
+ requestBody:
+ description: Cancel by coid request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelByCoidRequest'
+ responses:
+ '200':
+ description: Cancel response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CancelResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ CancelByCoidRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpCancelOrdersByCoid'
+ - $ref: '#/components/schemas/BaseOp'
+ - type: object
+ properties:
+ exp:
+ $ref: '#/components/schemas/exp'
+ CancelResponse:
+ oneOf:
+ - $ref: '#/components/schemas/CancelAccepted'
+ - $ref: '#/components/schemas/CancelRejected'
+ OpCancelOrdersByCoid:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - cancelOrdersCOID
+ args:
+ type: array
+ description: |
+ Array of client order IDs to cancel. Cancelling an order that has
+ attached take-profit / stop-loss children (see `CreateOrder.tr`)
+ cascades to those children — they are cancelled with reason
+ `ParentCancelled`.
+ items:
+ $ref: '#/components/schemas/coid'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ exp:
+ type: integer
+ description: >-
+ Command expiry timestamp in Unix milliseconds. If provided, it must be
+ in the future and within the gateway's default command timeout. It can
+ shorten request validity but cannot extend it. This is not an order
+ auto-cancel time.
+ example: 1767225600000
+ CancelAccepted:
+ type: object
+ required:
+ - status
+ - oid
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ oid:
+ $ref: '#/components/schemas/oid'
+ coid:
+ $ref: '#/components/schemas/coid'
+ description: Echoed only when the request carried a client_order_id.
+ CancelRejected:
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ oid:
+ $ref: '#/components/schemas/oid'
+ coid:
+ $ref: '#/components/schemas/coid'
+ error:
+ $ref: '#/components/schemas/error'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ coid:
+ type: string
+ description: Client order ID
+ minLength: 32
+ maxLength: 32
+ pattern: ^[0-9a-f]{32}$
+ example: 550e8400e29b41d4a716446655440000
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ oid:
+ type: integer
+ description: Order ID
+ example: 1234567890
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/cancel-orders.md b/PolymarketDocumentation-main/docs/api-reference/cancel-orders.md
new file mode 100644
index 0000000..8922897
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/cancel-orders.md
@@ -0,0 +1,277 @@
+> ## 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.
+
+# Cancel Orders
+
+> Cancel orders.
+Requires proxy signature, see [proxy signing](/http/signing#2-proxy-signing).
+
+
+Request Weight: **1 + floor(n / 20)** Action Weight: **0**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json delete /v1/trade/orders
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/trade/orders:
+ delete:
+ summary: Cancel Orders
+ description: >
+ Cancel orders.
+
+ Requires proxy signature, see [proxy
+ signing](/http/signing#2-proxy-signing).
+ operationId: cancelOrders
+ requestBody:
+ description: Cancel request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelRequest'
+ responses:
+ '200':
+ description: Cancel response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CancelResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ CancelRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpCancelOrders'
+ - $ref: '#/components/schemas/BaseOp'
+ - type: object
+ properties:
+ exp:
+ $ref: '#/components/schemas/exp'
+ CancelResponse:
+ oneOf:
+ - $ref: '#/components/schemas/CancelAccepted'
+ - $ref: '#/components/schemas/CancelRejected'
+ OpCancelOrders:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - cancelOrders
+ args:
+ type: array
+ description: |
+ Array of order IDs to cancel. Cancelling an order that has attached
+ take-profit / stop-loss children (see `CreateOrder.tr`) cascades to
+ those children — they are cancelled with reason `ParentCancelled`.
+ items:
+ $ref: '#/components/schemas/oid'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ exp:
+ type: integer
+ description: >-
+ Command expiry timestamp in Unix milliseconds. If provided, it must be
+ in the future and within the gateway's default command timeout. It can
+ shorten request validity but cannot extend it. This is not an order
+ auto-cancel time.
+ example: 1767225600000
+ CancelAccepted:
+ type: object
+ required:
+ - status
+ - oid
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ oid:
+ $ref: '#/components/schemas/oid'
+ coid:
+ $ref: '#/components/schemas/coid'
+ description: Echoed only when the request carried a client_order_id.
+ CancelRejected:
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ oid:
+ $ref: '#/components/schemas/oid'
+ coid:
+ $ref: '#/components/schemas/coid'
+ error:
+ $ref: '#/components/schemas/error'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ oid:
+ type: integer
+ description: Order ID
+ example: 1234567890
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ coid:
+ type: string
+ description: Client order ID
+ minLength: 32
+ maxLength: 32
+ pattern: ^[0-9a-f]{32}$
+ example: 550e8400e29b41d4a716446655440000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/check-invite-code.md b/PolymarketDocumentation-main/docs/api-reference/check-invite-code.md
new file mode 100644
index 0000000..9b6e619
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/check-invite-code.md
@@ -0,0 +1,162 @@
+> ## 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.
+
+# Check Invite Code
+
+> Check whether an invite code can be used. When `address` is provided, the
+response is invalid if that address already has an account.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/invite
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/invite:
+ get:
+ summary: Check Invite Code
+ description: >
+ Check whether an invite code can be used. When `address` is provided,
+ the
+
+ response is invalid if that address already has an account.
+ operationId: checkInviteCode
+ parameters:
+ - name: code
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/code'
+ - name: address
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/address'
+ responses:
+ '200':
+ description: Invite code validation response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InviteCheckResponse'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ code:
+ type: string
+ description: Referral or invite code
+ example: ABC123
+ address:
+ type: string
+ description: Address
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ InviteCheckResponse:
+ type: object
+ required:
+ - valid
+ properties:
+ valid:
+ type: boolean
+ description: Whether the invite code can be used.
+ error:
+ type: string
+ description: Present when the invite code is invalid or unusable.
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/clients-sdks.md b/PolymarketDocumentation-main/docs/api-reference/clients-sdks.md
new file mode 100644
index 0000000..af061da
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/clients-sdks.md
@@ -0,0 +1,99 @@
+> ## 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.
+
+# Clients & SDKs
+
+> Official open-source libraries for interacting with Polymarket
+
+Polymarket provides official open-source clients in TypeScript, Python, and Rust. All three support the full CLOB API including market data, order management, and authentication.
+
+## Installation
+
+
+ ```bash TypeScript theme={null}
+ npm install @polymarket/clob-client-v2 viem
+ ```
+
+ ```bash Python theme={null}
+ pip install py-clob-client-v2
+ ```
+
+ ```bash Rust theme={null}
+ cargo add polymarket_client_sdk_v2 --features clob
+ ```
+
+
+## Quick Example
+
+
+ ```typescript TypeScript theme={null}
+ import { ClobClient } from "@polymarket/clob-client-v2";
+
+ const client = new ClobClient({
+ host: "https://clob.polymarket.com",
+ chain: 137,
+ signer,
+ creds: apiCreds,
+ });
+
+ const markets = await client.getMarkets();
+ ```
+
+ ```python Python theme={null}
+ from py_clob_client_v2 import ClobClient
+
+ client = ClobClient(
+ "https://clob.polymarket.com",
+ key=private_key,
+ chain_id=137,
+ creds=api_creds,
+ )
+
+ markets = client.get_markets()
+ ```
+
+ ```rust Rust theme={null}
+ use polymarket_client_sdk_v2::clob::{Client, Config};
+
+ let client = Client::new("https://clob.polymarket.com", Config::default())?
+ .authentication_builder(&signer)
+ .authenticate()
+ .await?;
+
+ let markets = client.markets(None).await?;
+ ```
+
+
+## Source Code
+
+| Language | Package | Repository |
+| ---------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
+| TypeScript | `@polymarket/clob-client-v2` | [github.com/Polymarket/clob-client-v2](https://github.com/Polymarket/clob-client-v2) |
+| Python | `py-clob-client-v2` | [github.com/Polymarket/py-clob-client-v2](https://github.com/Polymarket/py-clob-client-v2) |
+| Rust | `polymarket_client_sdk_v2` | [github.com/Polymarket/rs-clob-client-v2](https://github.com/Polymarket/rs-clob-client-v2) |
+
+Each repository includes working examples in the `/examples` directory.
+
+## Relayer SDK
+
+For [gasless transactions](/trading/gasless), the relayer client handles deposit
+wallet creation and signed wallet batches for new API users. Existing Safe and
+Proxy wallet flows remain supported.
+
+| Language | Package | Repository |
+| ---------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
+| TypeScript | `@polymarket/builder-relayer-client` | [github.com/Polymarket/builder-relayer-client](https://github.com/Polymarket/builder-relayer-client) |
+| Python | `py-builder-relayer-client` | [github.com/Polymarket/py-builder-relayer-client](https://github.com/Polymarket/py-builder-relayer-client) |
+
+## Next Steps
+
+
+
+ Set up your client and place your first order.
+
+
+
+ Understand L1/L2 auth and API credentials.
+
+
diff --git a/PolymarketDocumentation-main/docs/api-reference/combo-markets/get-combo-markets.md b/PolymarketDocumentation-main/docs/api-reference/combo-markets/get-combo-markets.md
new file mode 100644
index 0000000..693e009
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/combo-markets/get-combo-markets.md
@@ -0,0 +1,218 @@
+> ## 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 combo markets
+
+> Returns active markets that can be used as combo legs, ordered by volume
+descending. This endpoint is public and does not require CLOB
+authentication.
+
+Entries in `position_ids`, `outcomes`, and `outcome_prices` correspond by
+array index (`[0]` is YES, `[1]` is NO). Use `next_cursor` unchanged in
+the next request; a value of `null` indicates the final page.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/combos-rfq-openapi.yaml get /v1/rfq/combo-markets
+openapi: 3.1.0
+info:
+ title: Polymarket Combinatorial RFQ API
+ description: >
+ REST API for the combinatorial RFQ (Request for Quote) system.
+
+
+ This spec covers the publicly documented endpoints used by quoters (market
+
+ makers): the combo-market catalog and the authenticated maker commands for
+
+ submitting, cancelling, and confirming quotes.
+
+
+ Conventions:
+
+ - All `*_e6` fields are six-decimal fixed-point values encoded as
+ **strings**
+ to avoid number precision issues.
+ - All timestamps are **Unix milliseconds** (integer); zero/omitted means
+ unset.
+
+ - Errors return an HTTP status code with a body of the form `{ "error":
+ "..." }`.
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://combos-rfq-api.polymarket.com
+ description: Production combinatorial RFQ API
+security: []
+tags:
+ - name: Combo Markets
+ description: Public catalog of markets that can be used as combo legs
+ - name: Maker
+ description: Authenticated quoter (maker) commands
+paths:
+ /v1/rfq/combo-markets:
+ get:
+ tags:
+ - Combo Markets
+ summary: Get combo markets
+ description: >
+ Returns active markets that can be used as combo legs, ordered by volume
+
+ descending. This endpoint is public and does not require CLOB
+
+ authentication.
+
+
+ Entries in `position_ids`, `outcomes`, and `outcome_prices` correspond
+ by
+
+ array index (`[0]` is YES, `[1]` is NO). Use `next_cursor` unchanged in
+
+ the next request; a value of `null` indicates the final page.
+ operationId: getComboMarkets
+ parameters:
+ - name: limit
+ in: query
+ required: false
+ description: Number of markets to return. Defaults to `50`; maximum `100`.
+ schema:
+ type: integer
+ minimum: 1
+ maximum: 100
+ default: 50
+ - name: cursor
+ in: query
+ required: false
+ description: Opaque cursor returned as `next_cursor` by the previous response.
+ schema:
+ type: string
+ - name: exclude
+ in: query
+ required: false
+ description: >-
+ Comma-separated condition IDs to omit, such as markets already
+ shown.
+ schema:
+ type: string
+ example: 0x4cd7...110ff,0x0391ab0e...
+ responses:
+ '200':
+ description: Catalog page of combo-able markets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ComboMarketsResponse'
+ example:
+ markets:
+ - id: '1897034'
+ condition_id: 0x4cd7...110ff
+ position_ids:
+ - 1012585...362880
+ - 1012585...362881
+ slug: fifwc-mex-rsa-2026-06-11-mex
+ title: Will Mexico win on 2026-06-11?
+ outcomes:
+ - 'Yes'
+ - 'No'
+ outcome_prices:
+ - '0.685'
+ - '0.315'
+ image: https://...
+ volume: 330327.7128580074
+ tags:
+ - sports
+ - soccer
+ - games
+ - world-cup
+ next_cursor: Mg
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ security: []
+components:
+ schemas:
+ ComboMarketsResponse:
+ type: object
+ properties:
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComboMarket'
+ next_cursor:
+ type:
+ - string
+ - 'null'
+ description: Cursor for the next page, or `null` on the final page.
+ required:
+ - markets
+ - next_cursor
+ ComboMarket:
+ type: object
+ properties:
+ id:
+ type: string
+ condition_id:
+ type: string
+ position_ids:
+ type: array
+ description: Combo position IDs; `[0]` is YES, `[1]` is NO.
+ items:
+ type: string
+ slug:
+ type: string
+ title:
+ type: string
+ outcomes:
+ type: array
+ items:
+ type: string
+ outcome_prices:
+ type: array
+ items:
+ type: string
+ image:
+ type: string
+ volume:
+ type: number
+ format: double
+ tags:
+ type: array
+ items:
+ type: string
+ required:
+ - id
+ - condition_id
+ - position_ids
+ - slug
+ - title
+ - outcomes
+ - outcome_prices
+ - image
+ - volume
+ - tags
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Human-readable error detail
+ required:
+ - error
+ responses:
+ BadRequest:
+ description: >-
+ Invalid request (malformed JSON, invalid parameters, or failed
+ validation)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid quote
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/comments/get-comments-by-comment-id.md b/PolymarketDocumentation-main/docs/api-reference/comments/get-comments-by-comment-id.md
new file mode 100644
index 0000000..caf3a13
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/comments/get-comments-by-comment-id.md
@@ -0,0 +1,212 @@
+> ## 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 comments by comment id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /comments/{id}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /comments/{id}:
+ get:
+ tags:
+ - Comments
+ summary: Get comments by comment id
+ operationId: getCommentsById
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ - name: get_positions
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Comments
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Comment'
+components:
+ schemas:
+ Comment:
+ type: object
+ properties:
+ id:
+ type: string
+ body:
+ type: string
+ nullable: true
+ parentEntityType:
+ type: string
+ nullable: true
+ parentEntityID:
+ type: integer
+ nullable: true
+ parentCommentID:
+ type: string
+ nullable: true
+ userAddress:
+ type: string
+ nullable: true
+ replyAddress:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ profile:
+ $ref: '#/components/schemas/CommentProfile'
+ reactions:
+ type: array
+ items:
+ $ref: '#/components/schemas/Reaction'
+ reportCount:
+ type: integer
+ nullable: true
+ reactionCount:
+ type: integer
+ nullable: true
+ CommentProfile:
+ type: object
+ properties:
+ name:
+ type: string
+ nullable: true
+ pseudonym:
+ type: string
+ nullable: true
+ displayUsernamePublic:
+ type: boolean
+ nullable: true
+ bio:
+ type: string
+ nullable: true
+ isMod:
+ type: boolean
+ nullable: true
+ isCreator:
+ type: boolean
+ nullable: true
+ proxyWallet:
+ type: string
+ nullable: true
+ baseAddress:
+ type: string
+ nullable: true
+ profileImage:
+ type: string
+ nullable: true
+ profileImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ positions:
+ type: array
+ items:
+ $ref: '#/components/schemas/CommentPosition'
+ Reaction:
+ type: object
+ properties:
+ id:
+ type: string
+ commentID:
+ type: integer
+ nullable: true
+ reactionType:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ userAddress:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ profile:
+ $ref: '#/components/schemas/CommentProfile'
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ CommentPosition:
+ type: object
+ properties:
+ tokenId:
+ type: string
+ nullable: true
+ positionSize:
+ type: string
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/comments/get-comments-by-user-address.md b/PolymarketDocumentation-main/docs/api-reference/comments/get-comments-by-user-address.md
new file mode 100644
index 0000000..8524523
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/comments/get-comments-by-user-address.md
@@ -0,0 +1,237 @@
+> ## 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 comments by user address
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /comments/user_address/{user_address}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /comments/user_address/{user_address}:
+ get:
+ tags:
+ - Comments
+ - Profiles
+ summary: Get comments by user address
+ operationId: getCommentsByUserAddress
+ parameters:
+ - name: user_address
+ in: path
+ required: true
+ schema:
+ type: string
+ - $ref: '#/components/parameters/limit'
+ - $ref: '#/components/parameters/offset'
+ - $ref: '#/components/parameters/order'
+ - $ref: '#/components/parameters/ascending'
+ responses:
+ '200':
+ description: Comments
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Comment'
+components:
+ parameters:
+ limit:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ offset:
+ name: offset
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ order:
+ name: order
+ in: query
+ schema:
+ type: string
+ description: Comma-separated list of fields to order by
+ ascending:
+ name: ascending
+ in: query
+ schema:
+ type: boolean
+ schemas:
+ Comment:
+ type: object
+ properties:
+ id:
+ type: string
+ body:
+ type: string
+ nullable: true
+ parentEntityType:
+ type: string
+ nullable: true
+ parentEntityID:
+ type: integer
+ nullable: true
+ parentCommentID:
+ type: string
+ nullable: true
+ userAddress:
+ type: string
+ nullable: true
+ replyAddress:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ profile:
+ $ref: '#/components/schemas/CommentProfile'
+ reactions:
+ type: array
+ items:
+ $ref: '#/components/schemas/Reaction'
+ reportCount:
+ type: integer
+ nullable: true
+ reactionCount:
+ type: integer
+ nullable: true
+ CommentProfile:
+ type: object
+ properties:
+ name:
+ type: string
+ nullable: true
+ pseudonym:
+ type: string
+ nullable: true
+ displayUsernamePublic:
+ type: boolean
+ nullable: true
+ bio:
+ type: string
+ nullable: true
+ isMod:
+ type: boolean
+ nullable: true
+ isCreator:
+ type: boolean
+ nullable: true
+ proxyWallet:
+ type: string
+ nullable: true
+ baseAddress:
+ type: string
+ nullable: true
+ profileImage:
+ type: string
+ nullable: true
+ profileImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ positions:
+ type: array
+ items:
+ $ref: '#/components/schemas/CommentPosition'
+ Reaction:
+ type: object
+ properties:
+ id:
+ type: string
+ commentID:
+ type: integer
+ nullable: true
+ reactionType:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ userAddress:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ profile:
+ $ref: '#/components/schemas/CommentProfile'
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ CommentPosition:
+ type: object
+ properties:
+ tokenId:
+ type: string
+ nullable: true
+ positionSize:
+ type: string
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/comments/list-comments.md b/PolymarketDocumentation-main/docs/api-reference/comments/list-comments.md
new file mode 100644
index 0000000..1872c9b
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/comments/list-comments.md
@@ -0,0 +1,251 @@
+> ## 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.
+
+# List comments
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /comments
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /comments:
+ get:
+ tags:
+ - Comments
+ summary: List comments
+ operationId: listComments
+ parameters:
+ - $ref: '#/components/parameters/limit'
+ - $ref: '#/components/parameters/offset'
+ - $ref: '#/components/parameters/order'
+ - $ref: '#/components/parameters/ascending'
+ - name: parent_entity_type
+ in: query
+ schema:
+ type: string
+ enum:
+ - Event
+ - Series
+ - market
+ - name: parent_entity_id
+ in: query
+ schema:
+ type: integer
+ - name: get_positions
+ in: query
+ schema:
+ type: boolean
+ - name: holders_only
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: List of comments
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Comment'
+components:
+ parameters:
+ limit:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ offset:
+ name: offset
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ order:
+ name: order
+ in: query
+ schema:
+ type: string
+ description: Comma-separated list of fields to order by
+ ascending:
+ name: ascending
+ in: query
+ schema:
+ type: boolean
+ schemas:
+ Comment:
+ type: object
+ properties:
+ id:
+ type: string
+ body:
+ type: string
+ nullable: true
+ parentEntityType:
+ type: string
+ nullable: true
+ parentEntityID:
+ type: integer
+ nullable: true
+ parentCommentID:
+ type: string
+ nullable: true
+ userAddress:
+ type: string
+ nullable: true
+ replyAddress:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ profile:
+ $ref: '#/components/schemas/CommentProfile'
+ reactions:
+ type: array
+ items:
+ $ref: '#/components/schemas/Reaction'
+ reportCount:
+ type: integer
+ nullable: true
+ reactionCount:
+ type: integer
+ nullable: true
+ CommentProfile:
+ type: object
+ properties:
+ name:
+ type: string
+ nullable: true
+ pseudonym:
+ type: string
+ nullable: true
+ displayUsernamePublic:
+ type: boolean
+ nullable: true
+ bio:
+ type: string
+ nullable: true
+ isMod:
+ type: boolean
+ nullable: true
+ isCreator:
+ type: boolean
+ nullable: true
+ proxyWallet:
+ type: string
+ nullable: true
+ baseAddress:
+ type: string
+ nullable: true
+ profileImage:
+ type: string
+ nullable: true
+ profileImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ positions:
+ type: array
+ items:
+ $ref: '#/components/schemas/CommentPosition'
+ Reaction:
+ type: object
+ properties:
+ id:
+ type: string
+ commentID:
+ type: integer
+ nullable: true
+ reactionType:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ userAddress:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ profile:
+ $ref: '#/components/schemas/CommentProfile'
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ CommentPosition:
+ type: object
+ properties:
+ tokenId:
+ type: string
+ nullable: true
+ positionSize:
+ type: string
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-closed-positions-for-a-user.md b/PolymarketDocumentation-main/docs/api-reference/core/get-closed-positions-for-a-user.md
new file mode 100644
index 0000000..fbb7a6a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-closed-positions-for-a-user.md
@@ -0,0 +1,194 @@
+> ## 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 closed positions for a user
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /closed-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:
+ /closed-positions:
+ get:
+ tags:
+ - Core
+ summary: Get closed positions for a user
+ parameters:
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ description: The address of the user in question
+ - in: query
+ name: market
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Hash64'
+ description: >-
+ The conditionId of the market in question. Supports multiple csv
+ separated values. Cannot be used with the eventId param.
+ - in: query
+ name: title
+ schema:
+ type: string
+ maxLength: 100
+ description: Filter by market title
+ - in: query
+ name: eventId
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ type: integer
+ minimum: 1
+ description: >-
+ The event id of the event in question. Supports multiple csv
+ separated values. Returns positions for all markets for those event
+ ids. Cannot be used with the market param.
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 10
+ minimum: 0
+ maximum: 50
+ description: The max number of positions to return
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 100000
+ description: The starting index for pagination
+ - in: query
+ name: sortBy
+ schema:
+ type: string
+ enum:
+ - REALIZEDPNL
+ - TITLE
+ - PRICE
+ - AVGPRICE
+ - TIMESTAMP
+ default: REALIZEDPNL
+ description: The sort criteria
+ - in: query
+ name: sortDirection
+ schema:
+ type: string
+ enum:
+ - ASC
+ - DESC
+ default: DESC
+ description: The sort direction
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ClosedPosition'
+ '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:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ Hash64:
+ type: string
+ description: 0x-prefixed 64-hex string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
+ ClosedPosition:
+ type: object
+ properties:
+ proxyWallet:
+ $ref: '#/components/schemas/Address'
+ asset:
+ type: string
+ conditionId:
+ $ref: '#/components/schemas/Hash64'
+ avgPrice:
+ type: number
+ totalBought:
+ type: number
+ realizedPnl:
+ type: number
+ curPrice:
+ type: number
+ timestamp:
+ type: integer
+ format: int64
+ title:
+ type: string
+ slug:
+ type: string
+ icon:
+ type: string
+ eventSlug:
+ type: string
+ outcome:
+ type: string
+ outcomeIndex:
+ type: integer
+ oppositeOutcome:
+ type: string
+ oppositeAsset:
+ type: string
+ endDate:
+ type: string
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-current-positions-for-a-user.md b/PolymarketDocumentation-main/docs/api-reference/core/get-current-positions-for-a-user.md
new file mode 100644
index 0000000..f53ef8a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-current-positions-for-a-user.md
@@ -0,0 +1,221 @@
+> ## 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 current positions for a user
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /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:
+ /positions:
+ get:
+ tags:
+ - Core
+ summary: Get current positions for a user
+ parameters:
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ description: User address (required)
+ - in: query
+ name: market
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Hash64'
+ description: >-
+ Comma-separated list of condition IDs. Mutually exclusive with
+ eventId.
+ - in: query
+ name: eventId
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ type: integer
+ minimum: 1
+ description: Comma-separated list of event IDs. Mutually exclusive with market.
+ - in: query
+ name: sizeThreshold
+ schema:
+ type: number
+ default: 1
+ minimum: 0
+ - in: query
+ name: redeemable
+ schema:
+ type: boolean
+ default: false
+ - in: query
+ name: mergeable
+ schema:
+ type: boolean
+ default: false
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 100
+ minimum: 0
+ maximum: 500
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 10000
+ - in: query
+ name: sortBy
+ schema:
+ type: string
+ enum:
+ - CURRENT
+ - INITIAL
+ - TOKENS
+ - CASHPNL
+ - PERCENTPNL
+ - TITLE
+ - RESOLVING
+ - PRICE
+ - AVGPRICE
+ default: TOKENS
+ - in: query
+ name: sortDirection
+ schema:
+ type: string
+ enum:
+ - ASC
+ - DESC
+ default: DESC
+ - in: query
+ name: title
+ schema:
+ type: string
+ maxLength: 100
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Position'
+ '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:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ Hash64:
+ type: string
+ description: 0x-prefixed 64-hex string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
+ Position:
+ type: object
+ properties:
+ proxyWallet:
+ $ref: '#/components/schemas/Address'
+ asset:
+ type: string
+ conditionId:
+ $ref: '#/components/schemas/Hash64'
+ size:
+ type: number
+ avgPrice:
+ type: number
+ initialValue:
+ type: number
+ currentValue:
+ type: number
+ cashPnl:
+ type: number
+ percentPnl:
+ type: number
+ totalBought:
+ type: number
+ realizedPnl:
+ type: number
+ percentRealizedPnl:
+ type: number
+ curPrice:
+ type: number
+ redeemable:
+ type: boolean
+ mergeable:
+ type: boolean
+ title:
+ type: string
+ slug:
+ type: string
+ icon:
+ type: string
+ eventSlug:
+ type: string
+ outcome:
+ type: string
+ outcomeIndex:
+ type: integer
+ oppositeOutcome:
+ type: string
+ oppositeAsset:
+ type: string
+ endDate:
+ type: string
+ negativeRisk:
+ type: boolean
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-positions-for-a-market.md b/PolymarketDocumentation-main/docs/api-reference/core/get-positions-for-a-market.md
new file mode 100644
index 0000000..cecef8f
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-positions-for-a-market.md
@@ -0,0 +1,193 @@
+> ## 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
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-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
+ 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/PolymarketDocumentation-main/docs/api-reference/core/get-top-holders-for-markets.md b/PolymarketDocumentation-main/docs/api-reference/core/get-top-holders-for-markets.md
new file mode 100644
index 0000000..3b3eea7
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-top-holders-for-markets.md
@@ -0,0 +1,140 @@
+> ## 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 top holders for markets
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /holders
+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:
+ /holders:
+ get:
+ tags:
+ - Core
+ summary: Get top holders for markets
+ parameters:
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 20
+ minimum: 0
+ maximum: 20
+ description: Maximum number of holders to return per token. Capped at 20.
+ - in: query
+ name: market
+ required: true
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Hash64'
+ description: Comma-separated list of condition IDs.
+ - in: query
+ name: minBalance
+ schema:
+ type: integer
+ default: 1
+ minimum: 0
+ maximum: 999999
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/MetaHolder'
+ '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'
+ MetaHolder:
+ type: object
+ properties:
+ token:
+ type: string
+ holders:
+ type: array
+ items:
+ $ref: '#/components/schemas/Holder'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ Holder:
+ type: object
+ properties:
+ proxyWallet:
+ $ref: '#/components/schemas/Address'
+ bio:
+ type: string
+ asset:
+ type: string
+ pseudonym:
+ type: string
+ amount:
+ type: number
+ displayUsernamePublic:
+ type: boolean
+ outcomeIndex:
+ type: integer
+ name:
+ type: string
+ profileImage:
+ type: string
+ profileImageOptimized:
+ type: string
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-total-value-of-a-users-positions.md b/PolymarketDocumentation-main/docs/api-reference/core/get-total-value-of-a-users-positions.md
new file mode 100644
index 0000000..61227ec
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-total-value-of-a-users-positions.md
@@ -0,0 +1,97 @@
+> ## 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 total value of a user's positions
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /value
+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:
+ /value:
+ get:
+ tags:
+ - Core
+ summary: Get total value of a user's positions
+ parameters:
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ - in: query
+ name: market
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Hash64'
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Value'
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ Hash64:
+ type: string
+ description: 0x-prefixed 64-hex string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
+ Value:
+ type: object
+ properties:
+ user:
+ $ref: '#/components/schemas/Address'
+ value:
+ type: number
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-trader-leaderboard-rankings.md b/PolymarketDocumentation-main/docs/api-reference/core/get-trader-leaderboard-rankings.md
new file mode 100644
index 0000000..ab9cc29
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-trader-leaderboard-rankings.md
@@ -0,0 +1,162 @@
+> ## 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 trader leaderboard rankings
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /v1/leaderboard
+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/leaderboard:
+ get:
+ tags:
+ - Core
+ summary: Get trader leaderboard rankings
+ parameters:
+ - in: query
+ name: category
+ schema:
+ type: string
+ enum:
+ - OVERALL
+ - POLITICS
+ - SPORTS
+ - ESPORTS
+ - CRYPTO
+ - CULTURE
+ - MENTIONS
+ - WEATHER
+ - ECONOMICS
+ - TECH
+ - FINANCE
+ default: OVERALL
+ description: Market category for the leaderboard
+ - in: query
+ name: timePeriod
+ schema:
+ type: string
+ enum:
+ - DAY
+ - WEEK
+ - MONTH
+ - ALL
+ default: DAY
+ description: Time period for leaderboard results
+ - in: query
+ name: orderBy
+ schema:
+ type: string
+ enum:
+ - PNL
+ - VOL
+ default: PNL
+ description: Leaderboard ordering criteria
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 25
+ minimum: 1
+ maximum: 50
+ description: Max number of leaderboard traders to return
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 1000
+ description: Starting index for pagination
+ - in: query
+ name: user
+ schema:
+ $ref: '#/components/schemas/Address'
+ description: Limit leaderboard to a single user by address
+ - in: query
+ name: userName
+ schema:
+ type: string
+ description: Limit leaderboard to a single username
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TraderLeaderboardEntry'
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ TraderLeaderboardEntry:
+ type: object
+ properties:
+ rank:
+ type: string
+ description: The rank position of the trader
+ proxyWallet:
+ $ref: '#/components/schemas/Address'
+ userName:
+ type: string
+ description: The trader's username
+ vol:
+ type: number
+ description: Trading volume for this trader
+ pnl:
+ type: number
+ description: Profit and loss for this trader
+ profileImage:
+ type: string
+ description: URL to the trader's profile image
+ xUsername:
+ type: string
+ description: The trader's X (Twitter) username
+ verifiedBadge:
+ type: boolean
+ description: Whether the trader has a verified badge
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-trades-for-a-user-or-markets.md b/PolymarketDocumentation-main/docs/api-reference/core/get-trades-for-a-user-or-markets.md
new file mode 100644
index 0000000..b22ff2a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-trades-for-a-user-or-markets.md
@@ -0,0 +1,210 @@
+> ## 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 trades for a user or markets
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /trades
+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:
+ /trades:
+ get:
+ tags:
+ - Core
+ summary: Get trades for a user or markets
+ parameters:
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 100
+ minimum: 0
+ maximum: 10000
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 10000
+ - in: query
+ name: takerOnly
+ schema:
+ type: boolean
+ default: true
+ - in: query
+ name: filterType
+ schema:
+ type: string
+ enum:
+ - CASH
+ - TOKENS
+ description: Must be provided together with filterAmount.
+ - in: query
+ name: filterAmount
+ schema:
+ type: number
+ minimum: 0
+ description: Must be provided together with filterType.
+ - in: query
+ name: market
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Hash64'
+ description: >-
+ Comma-separated list of condition IDs. Mutually exclusive with
+ eventId.
+ - in: query
+ name: eventId
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ type: integer
+ minimum: 1
+ description: Comma-separated list of event IDs. Mutually exclusive with market.
+ - in: query
+ name: user
+ schema:
+ $ref: '#/components/schemas/Address'
+ - in: query
+ name: side
+ schema:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ - in: query
+ name: start
+ schema:
+ type: integer
+ minimum: 0
+ description: >-
+ Lower-bound timestamp (epoch seconds) for the trade window. Omit or
+ pass `0` for the default window (most recent ~3 years); pass a
+ positive epoch (e.g. `1`) to retrieve full history.
+ - in: query
+ name: end
+ schema:
+ type: integer
+ minimum: 0
+ description: >-
+ Upper-bound timestamp (epoch seconds) for the trade window. Omit for
+ the default (current time); rows newer than `end` are excluded.
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Trade'
+ '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'
+ Trade:
+ type: object
+ properties:
+ proxyWallet:
+ $ref: '#/components/schemas/Address'
+ side:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ asset:
+ type: string
+ conditionId:
+ $ref: '#/components/schemas/Hash64'
+ size:
+ type: number
+ price:
+ type: number
+ timestamp:
+ type: integer
+ format: int64
+ title:
+ type: string
+ slug:
+ type: string
+ icon:
+ type: string
+ eventSlug:
+ type: string
+ outcome:
+ type: string
+ outcomeIndex:
+ type: integer
+ name:
+ type: string
+ pseudonym:
+ type: string
+ bio:
+ type: string
+ profileImage:
+ type: string
+ profileImageOptimized:
+ type: string
+ transactionHash:
+ type: string
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-user-activity.md b/PolymarketDocumentation-main/docs/api-reference/core/get-user-activity.md
new file mode 100644
index 0000000..4001432
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-user-activity.md
@@ -0,0 +1,255 @@
+> ## 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 user activity
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /activity
+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:
+ /activity:
+ get:
+ tags:
+ - Core
+ summary: Get user activity
+ parameters:
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 100
+ minimum: 0
+ maximum: 500
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 10000
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ - in: query
+ name: market
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Hash64'
+ description: >-
+ Comma-separated list of condition IDs. Mutually exclusive with
+ eventId.
+ - in: query
+ name: eventId
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ type: integer
+ minimum: 1
+ description: Comma-separated list of event IDs. Mutually exclusive with market.
+ - in: query
+ name: type
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - TRADE
+ - SPLIT
+ - MERGE
+ - REDEEM
+ - REWARD
+ - CONVERSION
+ - DEPOSIT
+ - WITHDRAWAL
+ - YIELD
+ - MAKER_REBATE
+ - TAKER_REBATE
+ - REFERRAL_REWARD
+ - in: query
+ name: start
+ schema:
+ type: integer
+ minimum: 0
+ description: >-
+ Lower-bound timestamp (epoch seconds) for the activity window. Omit
+ or pass `0` for the default window (most recent ~3 years); pass a
+ positive epoch (e.g. `1`) to retrieve full history.
+ - in: query
+ name: end
+ schema:
+ type: integer
+ minimum: 0
+ description: >-
+ Upper-bound timestamp (epoch seconds) for the activity window. Omit
+ for the default (current time); rows newer than `end` are excluded.
+ - in: query
+ name: sortBy
+ schema:
+ type: string
+ enum:
+ - TIMESTAMP
+ - TOKENS
+ - CASH
+ default: TIMESTAMP
+ - in: query
+ name: sortDirection
+ schema:
+ type: string
+ enum:
+ - ASC
+ - DESC
+ default: DESC
+ - in: query
+ name: side
+ schema:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Activity'
+ '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:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ Hash64:
+ type: string
+ description: 0x-prefixed 64-hex string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
+ Activity:
+ type: object
+ properties:
+ proxyWallet:
+ $ref: '#/components/schemas/Address'
+ timestamp:
+ type: integer
+ format: int64
+ conditionId:
+ $ref: '#/components/schemas/Hash64'
+ type:
+ type: string
+ enum:
+ - TRADE
+ - SPLIT
+ - MERGE
+ - REDEEM
+ - REWARD
+ - CONVERSION
+ - DEPOSIT
+ - WITHDRAWAL
+ - YIELD
+ - MAKER_REBATE
+ - TAKER_REBATE
+ - REFERRAL_REWARD
+ size:
+ type: number
+ usdcSize:
+ type: number
+ transactionHash:
+ type: string
+ price:
+ type: number
+ asset:
+ type: string
+ side:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ outcomeIndex:
+ type: integer
+ title:
+ type: string
+ slug:
+ type: string
+ icon:
+ type: string
+ eventSlug:
+ type: string
+ outcome:
+ type: string
+ name:
+ type: string
+ pseudonym:
+ type: string
+ bio:
+ type: string
+ profileImage:
+ type: string
+ profileImageOptimized:
+ type: string
+ isCombo:
+ type: boolean
+ description: >-
+ True when this row is part of a combinatorial (multi-market)
+ position. Flag only — combo detail is not embedded here. The row's
+ conditionId equals the combo's combo_condition_id; pass it to
+ /v1/activity/combos or /v1/positions/combos via market_id to fetch
+ legs and detail. Omitted on non-combo rows.
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-user-combo-activity.md b/PolymarketDocumentation-main/docs/api-reference/core/get-user-combo-activity.md
new file mode 100644
index 0000000..5fdc115
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-user-combo-activity.md
@@ -0,0 +1,280 @@
+> ## 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 user combo activity
+
+> Combo lifecycle and redeem events (split / merge / convert / compress / wrap / unwrap / redeem) for a user, with per-leg breakdown. The combo counterpart to /activity trade rows. Also available at /v1/data/user/{address}/activity/combos (address from the path).
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /v1/activity/combos
+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/activity/combos:
+ get:
+ tags:
+ - Core
+ summary: Get user combo activity
+ description: >-
+ Combo lifecycle and redeem events (split / merge / convert / compress /
+ wrap / unwrap / redeem) for a user, with per-leg breakdown. The combo
+ counterpart to /activity trade rows. Also available at
+ /v1/data/user/{address}/activity/combos (address from the path).
+ parameters:
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ - in: query
+ name: market_id
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComboConditionId'
+ description: >-
+ Comma-separated combo_condition_id values to filter to specific
+ combos. These equal the market_id of isCombo rows on /activity. Omit
+ for all of the user's combo activity.
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 50
+ minimum: 0
+ maximum: 500
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 10000
+ - in: query
+ name: cursor
+ schema:
+ type: string
+ description: >-
+ Opaque continuation token from a previous response's
+ pagination.next_cursor. When present it supersedes offset (which is
+ ignored). Invalid, tampered, or cross-endpoint tokens return 400.
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CombosActivityResponse'
+ '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:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ ComboConditionId:
+ type: string
+ description: >-
+ Combo condition ID (0x-prefixed, 62 hex chars / bytes31). Equals the
+ market_id (unified) / conditionId (legacy) of isCombo rows on /activity.
+ pattern: ^0x[a-fA-F0-9]{62}$
+ example: '0x0391ab0ebea17b65ba87e071b0566e816b0000000000000000000000000000'
+ CombosActivityResponse:
+ type: object
+ properties:
+ activity:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComboActivity'
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ ComboActivity:
+ type: object
+ properties:
+ id:
+ type: string
+ event_kind:
+ type: string
+ description: >-
+ Raw on-chain event, e.g. PositionsSplit, PositionsMerged,
+ PositionRedeemed.
+ side:
+ type: string
+ description: Normalized label for rendering.
+ enum:
+ - Split
+ - Merge
+ - Convert
+ - Compress
+ - Wrap
+ - Unwrap
+ - Redeem
+ module_kind:
+ type: string
+ description: Always Combinatorial.
+ user_address:
+ $ref: '#/components/schemas/Address'
+ combo_condition_id:
+ $ref: '#/components/schemas/ComboConditionId'
+ combo_position_id:
+ type: string
+ module_id:
+ type: integer
+ amount_usdc:
+ type: number
+ nullable: true
+ description: Lifecycle amount; null on redeems.
+ payout_usdc:
+ type: number
+ nullable: true
+ description: Redeem payout; null on lifecycle events.
+ timestamp:
+ type: integer
+ format: int64
+ tx_dttm:
+ type: string
+ description: RFC3339 UTC
+ tx_hash:
+ type: string
+ log_index:
+ type: integer
+ block_number:
+ type: integer
+ format: int64
+ legs:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComboLeg'
+ Pagination:
+ type: object
+ description: >-
+ Standard pagination metadata. No total count; has_more is derived from
+ page fullness. next_cursor is opaque.
+ properties:
+ limit:
+ type: integer
+ offset:
+ type: integer
+ has_more:
+ type: boolean
+ next_cursor:
+ type: string
+ nullable: true
+ description: >-
+ Opaque signed cursor for the next page; null when has_more is false.
+ Pass it back verbatim as ?cursor= on the next request (keep the same
+ sort where the endpoint has one). Never parse or construct it. On
+ cursor-enabled endpoints this makes deep pagination O(page) and
+ stable against concurrent inserts.
+ ComboLeg:
+ type: object
+ properties:
+ leg_index:
+ type: integer
+ leg_position_id:
+ type: string
+ leg_condition_id:
+ type: string
+ description: The leg market's condition ID (distinct from the combo's).
+ leg_outcome_index:
+ type: integer
+ leg_outcome_label:
+ type: string
+ leg_status:
+ type: string
+ description: Placeholder (OPEN) until leg-resolution integration ships.
+ leg_resolved_at:
+ type: string
+ nullable: true
+ leg_current_price:
+ type: string
+ description: Placeholder ("0") until live-price integration ships.
+ market:
+ $ref: '#/components/schemas/ComboMarket'
+ ComboMarket:
+ type: object
+ properties:
+ market_id:
+ type: string
+ slug:
+ type: string
+ title:
+ type: string
+ outcome:
+ type: string
+ image_url:
+ type: string
+ icon_url:
+ type: string
+ category:
+ type: string
+ subcategory:
+ type: string
+ tags:
+ type: array
+ items:
+ type: string
+ end_date:
+ type: string
+ description: RFC3339 UTC
+ event:
+ $ref: '#/components/schemas/ComboEvent'
+ ComboEvent:
+ type: object
+ properties:
+ event_id:
+ type: string
+ event_slug:
+ type: string
+ event_title:
+ type: string
+ event_image:
+ type: string
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/core/get-user-combo-positions.md b/PolymarketDocumentation-main/docs/api-reference/core/get-user-combo-positions.md
new file mode 100644
index 0000000..9e40600
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/core/get-user-combo-positions.md
@@ -0,0 +1,329 @@
+> ## 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 user combo positions
+
+> Combinatorial (multi-market) positions held by a user, with per-leg breakdown. Also available at /v1/data/user/{address}/positions/combos (address from the path).
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /v1/positions/combos
+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/positions/combos:
+ get:
+ tags:
+ - Core
+ summary: Get user combo positions
+ description: >-
+ Combinatorial (multi-market) positions held by a user, with per-leg
+ breakdown. Also available at /v1/data/user/{address}/positions/combos
+ (address from the path).
+ parameters:
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ - in: query
+ name: status
+ schema:
+ type: string
+ enum:
+ - OPEN
+ - PARTIAL
+ - RESOLVED_WIN
+ - RESOLVED_LOSS
+ - in: query
+ name: sort
+ schema:
+ type: string
+ enum:
+ - current_value_desc
+ - first_entry_desc
+ - entry_cost_desc
+ - resolved_at_desc
+ - updated_asc
+ default: current_value_desc
+ - in: query
+ name: market_id
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComboConditionId'
+ description: >-
+ Comma-separated combo_condition_id values to filter to specific
+ combos. These equal the market_id of isCombo rows on /activity. Omit
+ for all of the user's combos.
+ - in: query
+ name: limit
+ schema:
+ type: integer
+ default: 20
+ minimum: 0
+ maximum: 1000
+ - in: query
+ name: offset
+ schema:
+ type: integer
+ default: 0
+ minimum: 0
+ maximum: 100000
+ - in: query
+ name: updatedAfter
+ schema:
+ type: integer
+ description: >-
+ Incremental-sync watermark (epoch seconds, inclusive): only rows
+ whose updated_at is at or after this time. Positions mutate on
+ resolution and redemption, so this catches changes a creation-time
+ filter cannot. In sync mode
+ (updatedAfter/updatedBefore/sort=updated_asc) every live row is
+ returned regardless of balance, and the effective upper bound is
+ clamped ~90s behind now (commit-visibility safety lag) — very recent
+ rows appear on the next poll. Rows at the boundary may re-deliver:
+ upsert by (combo_condition_id, combo_position_id).
+ - in: query
+ name: updatedBefore
+ schema:
+ type: integer
+ description: >-
+ Optional upper bound (epoch seconds, inclusive) for updated_at;
+ clamped to the safety lag. Must be >= updatedAfter.
+ - in: query
+ name: cursor
+ schema:
+ type: string
+ description: >-
+ Opaque continuation token from a previous response's
+ pagination.next_cursor. When present it supersedes offset (which is
+ ignored). Invalid, tampered, or cross-endpoint tokens return 400.
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CombosResponse'
+ '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:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ ComboConditionId:
+ type: string
+ description: >-
+ Combo condition ID (0x-prefixed, 62 hex chars / bytes31). Equals the
+ market_id (unified) / conditionId (legacy) of isCombo rows on /activity.
+ pattern: ^0x[a-fA-F0-9]{62}$
+ example: '0x0391ab0ebea17b65ba87e071b0566e816b0000000000000000000000000000'
+ CombosResponse:
+ type: object
+ properties:
+ combos:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComboPosition'
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ ComboPosition:
+ type: object
+ properties:
+ combo_condition_id:
+ $ref: '#/components/schemas/ComboConditionId'
+ combo_position_id:
+ type: string
+ module_id:
+ type: integer
+ description: 3 = Combinatorial
+ user_address:
+ $ref: '#/components/schemas/Address'
+ shares_balance:
+ type: string
+ description: Decimal string (precision-preserving).
+ entry_avg_price_usdc:
+ type: string
+ entry_cost_usdc:
+ type: string
+ description: >-
+ REMAINING cost basis (entry_avg_price × shares_balance). Reads ~0
+ after a winning combo is redeemed — use total_cost_usdc to display
+ what was paid on closed positions.
+ realized_payout_usdc:
+ type: string
+ description: >-
+ Gross redemption proceeds (winning combo shares redeem 1:1 at $1).
+ "0.00" while OPEN / unredeemed / RESOLVED_LOSS; accumulates under
+ PARTIAL. Gross payout, not net PnL — net = realized_payout_usdc −
+ total_cost_usdc.
+ total_cost_usdc:
+ type: string
+ description: >-
+ Original cost basis = entry_avg_price × (shares_balance +
+ realized_payout). Survives redemption burning the shares; equals
+ entry_cost_usdc while OPEN.
+ status:
+ type: string
+ enum:
+ - OPEN
+ - PARTIAL
+ - RESOLVED_WIN
+ - RESOLVED_LOSS
+ first_entry_at:
+ type: string
+ description: RFC3339 UTC
+ resolved_at:
+ type: string
+ nullable: true
+ updated_at:
+ type: string
+ description: >-
+ Last-modified time (UTC, ISO 8601). Bumps on any recompute of the
+ row (trade, redemption, resolution classification) — the
+ incremental-sync watermark field. Omitted on responses served by the
+ legacy backend.
+ legs_total:
+ type: integer
+ legs_resolved:
+ type: integer
+ legs_pending:
+ type: integer
+ legs:
+ type: array
+ items:
+ $ref: '#/components/schemas/ComboLeg'
+ Pagination:
+ type: object
+ description: >-
+ Standard pagination metadata. No total count; has_more is derived from
+ page fullness. next_cursor is opaque.
+ properties:
+ limit:
+ type: integer
+ offset:
+ type: integer
+ has_more:
+ type: boolean
+ next_cursor:
+ type: string
+ nullable: true
+ description: >-
+ Opaque signed cursor for the next page; null when has_more is false.
+ Pass it back verbatim as ?cursor= on the next request (keep the same
+ sort where the endpoint has one). Never parse or construct it. On
+ cursor-enabled endpoints this makes deep pagination O(page) and
+ stable against concurrent inserts.
+ ComboLeg:
+ type: object
+ properties:
+ leg_index:
+ type: integer
+ leg_position_id:
+ type: string
+ leg_condition_id:
+ type: string
+ description: The leg market's condition ID (distinct from the combo's).
+ leg_outcome_index:
+ type: integer
+ leg_outcome_label:
+ type: string
+ leg_status:
+ type: string
+ description: Placeholder (OPEN) until leg-resolution integration ships.
+ leg_resolved_at:
+ type: string
+ nullable: true
+ leg_current_price:
+ type: string
+ description: Placeholder ("0") until live-price integration ships.
+ market:
+ $ref: '#/components/schemas/ComboMarket'
+ ComboMarket:
+ type: object
+ properties:
+ market_id:
+ type: string
+ slug:
+ type: string
+ title:
+ type: string
+ outcome:
+ type: string
+ image_url:
+ type: string
+ icon_url:
+ type: string
+ category:
+ type: string
+ subcategory:
+ type: string
+ tags:
+ type: array
+ items:
+ type: string
+ end_date:
+ type: string
+ description: RFC3339 UTC
+ event:
+ $ref: '#/components/schemas/ComboEvent'
+ ComboEvent:
+ type: object
+ properties:
+ event_id:
+ type: string
+ event_slug:
+ type: string
+ event_title:
+ type: string
+ event_image:
+ type: string
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/create-account-invite.md b/PolymarketDocumentation-main/docs/api-reference/create-account-invite.md
new file mode 100644
index 0000000..49ed06a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/create-account-invite.md
@@ -0,0 +1,236 @@
+> ## 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.
+
+# Create Account Invite
+
+> Create or return the authenticated account's primary invite code. The call
+is idempotent for accounts that already have a primary invite code.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json post /v1/account/invite
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/invite:
+ post:
+ summary: Create Account Invite
+ description: >
+ Create or return the authenticated account's primary invite code. The
+ call
+
+ is idempotent for accounts that already have a primary invite code.
+ operationId: createAccountInvite
+ requestBody:
+ description: Empty invite creation request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateInviteRequest'
+ examples:
+ createAccountInvite:
+ summary: Create or get the authenticated account invite code
+ value: {}
+ responses:
+ '200':
+ description: Account invite response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateInviteResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ CreateInviteRequest:
+ type: object
+ additionalProperties: false
+ CreateInviteResponse:
+ type: object
+ required:
+ - status
+ - code
+ - referrals_available
+ - cooldown_ms
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ code:
+ $ref: '#/components/schemas/code'
+ referrals_available:
+ type: integer
+ minimum: 0
+ description: Remaining lifetime referrals for this invite code.
+ cooldown_ms:
+ type: integer
+ nullable: true
+ minimum: 0
+ description: >-
+ Milliseconds until referrals become available again. Null for
+ lifetime caps because no windowed cooldown applies.
+ code:
+ type: string
+ description: Referral or invite code
+ example: ABC123
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/create-orders.md b/PolymarketDocumentation-main/docs/api-reference/create-orders.md
new file mode 100644
index 0000000..7c2fd4c
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/create-orders.md
@@ -0,0 +1,362 @@
+> ## 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.
+
+# Create Orders
+
+> Create new orders.
+Requires proxy signature, see [proxy signing](/http/signing#2-proxy-signing).
+
+
+Request Weight: **1 + floor(n / 20)** Action Weight: **1 / order**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json post /v1/trade/orders
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/trade/orders:
+ post:
+ summary: Create Orders
+ description: >
+ Create new orders.
+
+ Requires proxy signature, see [proxy
+ signing](/http/signing#2-proxy-signing).
+ operationId: createOrders
+ requestBody:
+ description: Order request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrderRequest'
+ responses:
+ '200':
+ description: >-
+ Order ACK response. Order result should be fetched using the get
+ orders endpoint.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/OrderResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ OrderRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpCreateOrders'
+ - $ref: '#/components/schemas/BaseOp'
+ - type: object
+ properties:
+ exp:
+ $ref: '#/components/schemas/exp'
+ OrderResponse:
+ oneOf:
+ - $ref: '#/components/schemas/OrderAccepted'
+ - $ref: '#/components/schemas/OrderRejected'
+ OpCreateOrders:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - createOrders
+ args:
+ type: array
+ items:
+ $ref: '#/components/schemas/CreateOrder'
+ grp:
+ $ref: '#/components/schemas/grp'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ exp:
+ type: integer
+ description: >-
+ Command expiry timestamp in Unix milliseconds. If provided, it must be
+ in the future and within the gateway's default command timeout. It can
+ shorten request validity but cannot extend it. This is not an order
+ auto-cancel time.
+ example: 1767225600000
+ OrderAccepted:
+ type: object
+ required:
+ - status
+ - oid
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ oid:
+ $ref: '#/components/schemas/oid'
+ coid:
+ $ref: '#/components/schemas/coid'
+ description: Echoed only when the request carried a client_order_id.
+ OrderRejected:
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ oid:
+ $ref: '#/components/schemas/oid'
+ coid:
+ $ref: '#/components/schemas/coid'
+ error:
+ $ref: '#/components/schemas/error'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ CreateOrder:
+ type: object
+ required:
+ - iid
+ - buy
+ - qty
+ properties:
+ iid:
+ $ref: '#/components/schemas/iid'
+ buy:
+ $ref: '#/components/schemas/buy'
+ p:
+ $ref: '#/components/schemas/p'
+ qty:
+ $ref: '#/components/schemas/qty'
+ tif:
+ $ref: '#/components/schemas/tif'
+ po:
+ $ref: '#/components/schemas/po'
+ ro:
+ $ref: '#/components/schemas/ro'
+ c:
+ $ref: '#/components/schemas/coid'
+ tr:
+ type: object
+ description: Optional trigger attached to this order.
+ properties:
+ market:
+ $ref: '#/components/schemas/market'
+ trp:
+ $ref: '#/components/schemas/trp'
+ tpsl:
+ $ref: '#/components/schemas/tpsl'
+ grp:
+ type: string
+ description: TPSL grouping
+ enum:
+ - order
+ - position
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ oid:
+ type: integer
+ description: Order ID
+ example: 1234567890
+ coid:
+ type: string
+ description: Client order ID
+ minLength: 32
+ maxLength: 32
+ pattern: ^[0-9a-f]{32}$
+ example: 550e8400e29b41d4a716446655440000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ buy:
+ type: boolean
+ description: Is buy
+ example: true
+ p:
+ type: string
+ description: Price
+ example: '100.00'
+ qty:
+ type: string
+ description: Quantity in no. of contracts
+ example: '10.00'
+ tif:
+ type: string
+ description: Time in force
+ enum:
+ - gtc
+ - ioc
+ - fok
+ po:
+ type: boolean
+ description: Post only
+ default: false
+ example: false
+ ro:
+ type: boolean
+ description: Reduce only
+ example: false
+ default: false
+ market:
+ type: boolean
+ description: Whether the trigger executes as a market order
+ trp:
+ type: string
+ description: Trigger price
+ example: '110.00'
+ tpsl:
+ type: string
+ description: Trigger type
+ enum:
+ - tp
+ - sl
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/create-proxy.md b/PolymarketDocumentation-main/docs/api-reference/create-proxy.md
new file mode 100644
index 0000000..a327027
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/create-proxy.md
@@ -0,0 +1,302 @@
+> ## 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.
+
+# Create Proxy
+
+> Create a new proxy to sign orders. Returns an API secret for private account access.
+Requires EOA signature, see [EOA signing](/http/signing#1-eoa-signing).
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json post /v1/account/proxy
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/proxy:
+ post:
+ summary: Create Proxy
+ description: >
+ Create a new proxy to sign orders. Returns an API secret for private
+ account access.
+
+ Requires EOA signature, see [EOA signing](/http/signing#1-eoa-signing).
+ operationId: createProxy
+ requestBody:
+ description: Proxy creation request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProxyRequest'
+ examples:
+ createProxy:
+ summary: Create a proxy
+ value:
+ op:
+ type: createProxy
+ args:
+ owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
+ proxy: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ expiry: 1767225600000
+ sig: >-
+ 0x4d11d89f6d8e2f0fd22fb5dd9e6e88a35f3a2c0f3a9e4ff9f8f0da5e6c5f241d2ed7d173f7fcb15726b8a7e7f1f1277ec54c060f5b3ab4d72dbf4d0e40ee6e9a1c
+ salt: 123456789
+ ts: 1767000000000
+ responses:
+ '200':
+ description: Proxy creation response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProxyResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '422':
+ $ref: '#/components/responses/Error422Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ ProxyRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpCreateProxy'
+ - $ref: '#/components/schemas/BaseOp'
+ - type: object
+ properties:
+ label:
+ $ref: '#/components/schemas/label'
+ code:
+ $ref: '#/components/schemas/code'
+ ProxyResponse:
+ type: object
+ required:
+ - status
+ - secret
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ secret:
+ $ref: '#/components/schemas/secret'
+ OpCreateProxy:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - createProxy
+ args:
+ type: object
+ required:
+ - owner
+ - proxy
+ - expiry
+ properties:
+ owner:
+ $ref: '#/components/schemas/owner'
+ proxy:
+ $ref: '#/components/schemas/proxy'
+ expiry:
+ $ref: '#/components/schemas/expiry'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ label:
+ type: string
+ description: Human-readable label for a proxy key or internal transfer
+ example: trading-bot
+ code:
+ type: string
+ description: Referral or invite code
+ example: ABC123
+ secret:
+ type: string
+ description: API secret
+ example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ GenericRejected:
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ owner:
+ type: string
+ description: Owner address in hex format
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ proxy:
+ type: string
+ description: Proxy address in hex format
+ example: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ expiry:
+ type: integer
+ description: Expiry timestamp in milliseconds
+ example: 1767225600000
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error422Response:
+ description: |
+ Unprocessable Entity — the request was well-formed but a domain rule
+ rejected it on its merits (insufficient balance, invalid leverage,
+ proxy already exists, …). The body is the discriminated rejection
+ (`status: err`) with the engine error identifier in `error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericRejected'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/delete-proxy.md b/PolymarketDocumentation-main/docs/api-reference/delete-proxy.md
new file mode 100644
index 0000000..b6caa38
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/delete-proxy.md
@@ -0,0 +1,263 @@
+> ## 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.
+
+# Delete Proxy
+
+> Delete a proxy by address.
+Requires EOA signature, see [EOA signing](/http/signing#1-eoa-signing).
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json delete /v1/account/proxy
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/proxy:
+ delete:
+ summary: Delete Proxy
+ description: |
+ Delete a proxy by address.
+ Requires EOA signature, see [EOA signing](/http/signing#1-eoa-signing).
+ operationId: deleteProxy
+ requestBody:
+ description: Delete proxy request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeleteProxyRequest'
+ examples:
+ deleteProxy:
+ summary: Delete a proxy
+ value:
+ op:
+ type: deleteProxy
+ args:
+ proxy: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ sig: >-
+ 0x9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a1c
+ salt: 888888888
+ ts: 1767000020000
+ responses:
+ '200':
+ description: Delete proxy response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericAccepted'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '422':
+ $ref: '#/components/responses/Error422Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ DeleteProxyRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpDeleteProxy'
+ - $ref: '#/components/schemas/BaseOp'
+ GenericAccepted:
+ type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ OpDeleteProxy:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - deleteProxy
+ args:
+ type: object
+ required:
+ - proxy
+ properties:
+ proxy:
+ $ref: '#/components/schemas/proxy'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ GenericRejected:
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ proxy:
+ type: string
+ description: Proxy address in hex format
+ example: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error422Response:
+ description: |
+ Unprocessable Entity — the request was well-formed but a domain rule
+ rejected it on its merits (insufficient balance, invalid leverage,
+ proxy already exists, …). The body is the discriminated rejection
+ (`status: err`) with the engine error identifier in `error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericRejected'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/events/get-event-by-id.md b/PolymarketDocumentation-main/docs/api-reference/events/get-event-by-id.md
new file mode 100644
index 0000000..ccea68b
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/events/get-event-by-id.md
@@ -0,0 +1,1213 @@
+> ## 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 event by id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /events/{id}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /events/{id}:
+ get:
+ tags:
+ - Events
+ summary: Get event by id
+ operationId: getEvent
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ - name: include_chat
+ in: query
+ schema:
+ type: boolean
+ - name: include_template
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Event
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Event'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/events/get-event-by-slug.md b/PolymarketDocumentation-main/docs/api-reference/events/get-event-by-slug.md
new file mode 100644
index 0000000..5a72460
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/events/get-event-by-slug.md
@@ -0,0 +1,1213 @@
+> ## 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 event by slug
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /events/slug/{slug}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /events/slug/{slug}:
+ get:
+ tags:
+ - Events
+ summary: Get event by slug
+ operationId: getEventBySlug
+ parameters:
+ - $ref: '#/components/parameters/pathSlug'
+ - name: include_chat
+ in: query
+ schema:
+ type: boolean
+ - name: include_template
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Event
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Event'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathSlug:
+ name: slug
+ in: path
+ required: true
+ schema:
+ type: string
+ schemas:
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/events/get-event-tags.md b/PolymarketDocumentation-main/docs/api-reference/events/get-event-tags.md
new file mode 100644
index 0000000..102a5a3
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/events/get-event-tags.md
@@ -0,0 +1,108 @@
+> ## 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 event tags
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /events/{id}/tags
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /events/{id}/tags:
+ get:
+ tags:
+ - Events
+ - Tags
+ summary: Get event tags
+ operationId: getEventTags
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ responses:
+ '200':
+ description: Tags attached to the event
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/events/list-events-keyset-pagination.md b/PolymarketDocumentation-main/docs/api-reference/events/list-events-keyset-pagination.md
new file mode 100644
index 0000000..e2e9644
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/events/list-events-keyset-pagination.md
@@ -0,0 +1,1471 @@
+> ## 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.
+
+# List events (keyset pagination)
+
+> Returns events using cursor-based (keyset) pagination for stable, efficient paging through large result sets. Use `next_cursor` from each response as `after_cursor` in the next request. The `offset` parameter is explicitly rejected; use `after_cursor` instead.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /events/keyset
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /events/keyset:
+ get:
+ tags:
+ - Events
+ summary: List events (keyset pagination)
+ description: >
+ Returns events using cursor-based (keyset) pagination for stable,
+ efficient paging through large result sets. Use `next_cursor` from each
+ response as `after_cursor` in the next request. The `offset` parameter
+ is explicitly rejected; use `after_cursor` instead.
+ operationId: listEventsKeyset
+ parameters:
+ - name: limit
+ in: query
+ description: Maximum number of results to return (max 500)
+ schema:
+ type: integer
+ minimum: 1
+ maximum: 500
+ default: 20
+ - name: order
+ in: query
+ description: Comma-separated list of JSON field names to order by
+ schema:
+ type: string
+ - name: ascending
+ in: query
+ description: Sort direction. Only used when order is set.
+ schema:
+ type: boolean
+ default: true
+ - name: after_cursor
+ in: query
+ description: Opaque cursor token from a previous response's next_cursor
+ schema:
+ type: string
+ - name: offset
+ in: query
+ description: Not allowed. Returns 422 if provided.
+ schema:
+ type: integer
+ - name: id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: slug
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: closed
+ in: query
+ schema:
+ type: boolean
+ - name: live
+ in: query
+ schema:
+ type: boolean
+ - name: featured
+ in: query
+ schema:
+ type: boolean
+ - name: cyom
+ in: query
+ schema:
+ type: boolean
+ - name: title_search
+ in: query
+ schema:
+ type: string
+ - name: liquidity_min
+ in: query
+ schema:
+ type: number
+ - name: liquidity_max
+ in: query
+ schema:
+ type: number
+ - name: volume_min
+ in: query
+ schema:
+ type: number
+ - name: volume_max
+ in: query
+ schema:
+ type: number
+ - name: start_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: start_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: start_time_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: start_time_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: tag_id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: tag_slug
+ in: query
+ schema:
+ type: string
+ - name: exclude_tag_id
+ in: query
+ description: Tag IDs to exclude. Cannot overlap with tag_id.
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: related_tags
+ in: query
+ schema:
+ type: boolean
+ - name: tag_match
+ in: query
+ schema:
+ type: string
+ - name: series_id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: game_id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: event_date
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: event_week
+ in: query
+ schema:
+ type: integer
+ - name: featured_order
+ in: query
+ schema:
+ type: boolean
+ - name: recurrence
+ in: query
+ schema:
+ type: string
+ - name: created_by
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: parent_event_id
+ in: query
+ schema:
+ type: integer
+ - name: include_children
+ in: query
+ schema:
+ type: boolean
+ - name: partner_slug
+ in: query
+ description: When set, external_partners are attached to matching events
+ schema:
+ type: string
+ - name: include_chat
+ in: query
+ description: When true, includes Chats and Series.Chats relations
+ schema:
+ type: boolean
+ - name: include_template
+ in: query
+ description: When true, includes Templates relation
+ schema:
+ type: boolean
+ - name: include_best_lines
+ in: query
+ description: When true, includes BestLines relation
+ schema:
+ type: boolean
+ - name: locale
+ in: query
+ schema:
+ type: string
+ responses:
+ '200':
+ description: >
+ Paginated list of events. Always includes Series, Tags, Markets, and
+ EventCreators relations. Chats/Series.Chats, Templates, and
+ BestLines are optional via their respective include_ flags. Nested
+ markets include clob_rewards and fee_schedule. Teams are enriched
+ automatically. external_partners attached only when partner_slug is
+ set.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeysetEventsResponse'
+ '422':
+ description: >
+ Validation error. Returned when offset is provided, cursor is
+ invalid, order fields are not valid, tag_id overlaps with
+ exclude_tag_id, invalid recurrence, or other filter validation
+ fails.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ValidationError'
+ '500':
+ description: Internal server error (DB failures, cursor encode failures)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InternalError'
+ '503':
+ description: Service unavailable when keyset pagination is not configured
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ServiceUnavailableError'
+components:
+ schemas:
+ KeysetEventsResponse:
+ type: object
+ properties:
+ events:
+ type: array
+ description: Array of Event objects. Empty array if none found.
+ items:
+ $ref: '#/components/schemas/Event'
+ next_cursor:
+ type: string
+ description: >
+ Opaque cursor token for fetching the next page. Present only when
+ the number of returned events equals the effective limit. Omitted on
+ the last page.
+ ValidationError:
+ type: object
+ properties:
+ type:
+ type: string
+ example: validation error
+ error:
+ type: string
+ example: offset is not allowed on keyset endpoints
+ InternalError:
+ type: object
+ properties:
+ type:
+ type: string
+ example: internal error
+ error:
+ type: string
+ example: cannot get the information
+ ServiceUnavailableError:
+ type: object
+ properties:
+ type:
+ type: string
+ example: service unavailable
+ error:
+ type: string
+ example: keyset pagination is not configured
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/events/list-events.md b/PolymarketDocumentation-main/docs/api-reference/events/list-events.md
new file mode 100644
index 0000000..ec3c888
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/events/list-events.md
@@ -0,0 +1,1323 @@
+> ## 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.
+
+# List events
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /events
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /events:
+ get:
+ tags:
+ - Events
+ summary: List events
+ operationId: listEvents
+ parameters:
+ - $ref: '#/components/parameters/limit'
+ - $ref: '#/components/parameters/offset'
+ - $ref: '#/components/parameters/order'
+ - $ref: '#/components/parameters/ascending'
+ - name: id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: tag_id
+ in: query
+ schema:
+ type: integer
+ - name: exclude_tag_id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: slug
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: tag_slug
+ in: query
+ schema:
+ type: string
+ - name: related_tags
+ in: query
+ schema:
+ type: boolean
+ - name: active
+ in: query
+ schema:
+ type: boolean
+ - name: archived
+ in: query
+ schema:
+ type: boolean
+ - name: featured
+ in: query
+ schema:
+ type: boolean
+ - name: cyom
+ in: query
+ schema:
+ type: boolean
+ - name: include_chat
+ in: query
+ schema:
+ type: boolean
+ - name: include_template
+ in: query
+ schema:
+ type: boolean
+ - name: recurrence
+ in: query
+ schema:
+ type: string
+ - name: closed
+ in: query
+ schema:
+ type: boolean
+ - name: liquidity_min
+ in: query
+ schema:
+ type: number
+ - name: liquidity_max
+ in: query
+ schema:
+ type: number
+ - name: volume_min
+ in: query
+ schema:
+ type: number
+ - name: volume_max
+ in: query
+ schema:
+ type: number
+ - name: start_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: start_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ responses:
+ '200':
+ description: List of events
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+components:
+ parameters:
+ limit:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ offset:
+ name: offset
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ order:
+ name: order
+ in: query
+ schema:
+ type: string
+ description: Comma-separated list of fields to order by
+ ascending:
+ name: ascending
+ in: query
+ schema:
+ type: boolean
+ schemas:
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/geoblock.md b/PolymarketDocumentation-main/docs/api-reference/geoblock.md
new file mode 100644
index 0000000..f94e30f
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/geoblock.md
@@ -0,0 +1,233 @@
+> ## 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
+
+> Check geographic restrictions before placing orders on the Polymarket API
+
+Polymarket restricts order placement from certain geographic locations due to regulatory requirements and compliance with international sanctions. Before placing orders, builders should verify the location.
+
+
+ Orders submitted from blocked regions will be rejected. Implement geoblock
+ checks in your application to provide users with appropriate feedback before
+ they attempt to trade.
+
+
+***
+
+## Geoblock Endpoint
+
+Check the geographic eligibility of the requesting IP address:
+
+```bash theme={null}
+GET https://polymarket.com/api/geoblock
+```
+
+This endpoint is on `polymarket.com`, not the API servers.
+
+### Response
+
+```json theme={null}
+{
+ "blocked": true,
+ "ip": "203.0.113.42",
+ "country": "US",
+ "region": "NY"
+}
+```
+
+| Field | Type | Description |
+| --------- | ------- | ----------------------------------------------- |
+| `blocked` | boolean | Whether the user is blocked from placing orders |
+| `ip` | string | Detected IP address |
+| `country` | string | ISO 3166-1 alpha-2 country code |
+| `region` | string | Region/state code |
+
+***
+
+## Restricted Jurisdictions
+
+Restrictions fall into three groups. **Block completely** means no new orders and no closing of existing positions. **Close-only** means users can close existing positions but cannot open new ones. Each group notes whether it applies on the frontend, the API, or both. Codes are ISO 3166-1 alpha-2 for countries and ISO 3166-2 for sub-national regions.
+
+### OFAC-Sanctioned Jurisdictions (Block Completely)
+
+Blocked on both the frontend and the API. No new orders, and existing positions cannot be closed.
+
+| Jurisdiction | Code |
+| ----------------- | ----- |
+| Iran | IR |
+| Syria | SY |
+| Cuba | CU |
+| North Korea | KP |
+| Ukraine — Crimea | UA-43 |
+| Ukraine — Donetsk | UA-14 |
+| Ukraine — Luhansk | UA-09 |
+
+### Regulatory-Restricted Jurisdictions (Close-Only on Frontend and API)
+
+Users can close existing positions but cannot open new ones, on both the frontend and the API.
+
+| Jurisdiction | Code |
+| ------------------------------------ | ----- |
+| Australia | AU |
+| Belarus | BY |
+| Belgium | BE |
+| Burundi | BI |
+| Brazil | BR |
+| Canada — British Columbia | CA-BC |
+| Canada — Ontario | CA-ON |
+| Canada — Alberta | CA-AB |
+| Canada — Quebec | CA-QC |
+| Central African Republic | CF |
+| Congo (Kinshasa) | CD |
+| Ethiopia | ET |
+| France | FR |
+| Germany | DE |
+| Iraq | IQ |
+| Italy | IT |
+| Lebanon | LB |
+| Libya | LY |
+| Myanmar | MM |
+| Nicaragua | NI |
+| North Korea | KP |
+| Poland | PL |
+| Russia | RU |
+| Singapore | SG |
+| Somalia | SO |
+| Slovakia | SK |
+| South Sudan | SS |
+| Sudan | SD |
+| Taiwan | TW |
+| Thailand | TH |
+| United Kingdom | GB |
+| United States | US |
+| United States Minor Outlying Islands | UM |
+| Venezuela | VE |
+| Yemen | YE |
+| Zimbabwe | ZW |
+
+### Regulatory-Restricted Jurisdictions (Close-Only on Frontend)
+
+Close-only on the Polymarket frontend; the API itself is not restricted.
+
+| Jurisdiction | Code |
+| ------------------- | ---- |
+| Japan | JP |
+| Netherlands | NL |
+| Malta (Sports Only) | MT |
+
+***
+
+## 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
+
+***
+
+## Server Infrastructure
+
+* **Primary Servers**: eu-west-2
+* **Closest Non-Georestricted Region**: eu-west-1
+
+
+ **Direct co-location available.** Users who complete the [KYC/KYB
+ form](https://docs.google.com/forms/d/e/1FAIpQLSfY-3Dl3yxq8HKFjFad8YzKZmm0k3Gdg29HD6gL-K-AmI6KXw/viewform) can get access to co-locate
+ directly in `eu-west-2` for the lowest possible latency to Polymarket's
+ primary servers.
+
+
+***
+
+## Usage Examples
+
+
+
+ ```typescript theme={null}
+ interface GeoblockResponse {
+ blocked: boolean;
+ ip: string;
+ country: string;
+ region: string;
+ }
+
+ async function checkGeoblock(): Promise {
+ const response = await fetch("https://polymarket.com/api/geoblock");
+ return response.json();
+ }
+
+ // Usage
+ const geo = await checkGeoblock();
+
+ if (geo.blocked) {
+ console.log(`Trading not available in ${geo.country}`);
+ } else {
+ console.log("Trading available");
+ }
+ ```
+
+
+
+ ```python theme={null}
+ import requests
+
+ def check_geoblock() -> dict:
+ response = requests.get("https://polymarket.com/api/geoblock")
+ return response.json()
+
+ # Usage
+ geo = check_geoblock()
+
+ if geo["blocked"]:
+ print(f"Trading not available in {geo['country']}")
+ else:
+ print("Trading available")
+ ```
+
+
+
+ ```rust theme={null}
+ use polymarket_client_sdk_v2::clob::{Client, Config};
+
+ let client = Client::new("https://clob.polymarket.com", Config::default())?;
+ let geo = client.check_geoblock().await?;
+
+ if geo.blocked {
+ println!("Trading not available in {}", geo.country);
+ } else {
+ println!("Trading available");
+ }
+ ```
+
+
+
+***
+
+## 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
+
+If you believe you are incorrectly restricted or have questions about geographic availability, please contact [Polymarket Support](https://polymarket.com/support).
+
+***
+
+## Next Steps
+
+
+
+ Learn how to authenticate trading requests.
+
+
+
+ Start placing orders (from eligible regions).
+
+
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-account-limits.md b/PolymarketDocumentation-main/docs/api-reference/get-account-limits.md
new file mode 100644
index 0000000..f48086c
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-account-limits.md
@@ -0,0 +1,242 @@
+> ## 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 Account Limits
+
+> Get the authenticated account's effective rate-limit allowances for its current
+volume-based tier: order-action rate, open-order cap, and the display-only
+messages-per-minute figure. `open_orders` reflects the account's current live
+open-order count; the rate-usage counters (`actions_per_minute`,
+`actions_burst`, and `reset`) are not tracked here and are reported as 0.
+
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/limits
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/limits:
+ get:
+ summary: Get Account Limits
+ description: >
+ Get the authenticated account's effective rate-limit allowances for its
+ current
+
+ volume-based tier: order-action rate, open-order cap, and the
+ display-only
+
+ messages-per-minute figure. `open_orders` reflects the account's current
+ live
+
+ open-order count; the rate-usage counters (`actions_per_minute`,
+
+ `actions_burst`, and `reset`) are not tracked here and are reported as
+ 0.
+ operationId: getAccountLimits
+ responses:
+ '200':
+ description: Account limits response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AccountLimits'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ AccountLimits:
+ type: object
+ required:
+ - actions_per_minute
+ - actions_per_minute_limit
+ - actions_burst
+ - actions_burst_limit
+ - open_orders
+ - open_orders_limit
+ - reset
+ - messages_per_minute
+ properties:
+ actions_per_minute:
+ $ref: '#/components/schemas/actions_per_minute'
+ actions_per_minute_limit:
+ $ref: '#/components/schemas/actions_per_minute_limit'
+ actions_burst:
+ $ref: '#/components/schemas/actions_burst'
+ actions_burst_limit:
+ $ref: '#/components/schemas/actions_burst_limit'
+ open_orders:
+ $ref: '#/components/schemas/open_orders'
+ open_orders_limit:
+ $ref: '#/components/schemas/open_orders_limit'
+ reset:
+ $ref: '#/components/schemas/rate_reset'
+ messages_per_minute:
+ $ref: '#/components/schemas/messages_per_minute'
+ actions_per_minute:
+ type: integer
+ description: Order action tokens used by the account in the current minute
+ example: 23
+ actions_per_minute_limit:
+ type: integer
+ description: Maximum order action tokens per account per minute
+ example: 300
+ actions_burst:
+ type: integer
+ description: Additional account action allowance remaining
+ actions_burst_limit:
+ type: integer
+ description: Additional account action allowance limit
+ open_orders:
+ type: integer
+ description: Current number of open orders
+ example: 42
+ open_orders_limit:
+ type: integer
+ description: Maximum number of open orders per account
+ example: 1000
+ rate_reset:
+ type: integer
+ description: Timestamp in milliseconds when the current interval resets
+ example: 1767225660000
+ messages_per_minute:
+ type: integer
+ description: >-
+ Display-only per-minute action/message allowance, equal to
+ actions_per_minute_limit. Not separately configured or enforced.
+ example: 300
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-account-referral.md b/PolymarketDocumentation-main/docs/api-reference/get-account-referral.md
new file mode 100644
index 0000000..f4bf745
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-account-referral.md
@@ -0,0 +1,207 @@
+> ## 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 Account Referral
+
+> Get the authenticated account's invite code, parent referral code, direct
+referral count, and fee share rate.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/referral
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/referral:
+ get:
+ summary: Get Account Referral
+ description: >
+ Get the authenticated account's invite code, parent referral code,
+ direct
+
+ referral count, and fee share rate.
+ operationId: getAccountReferral
+ responses:
+ '200':
+ description: Account referral response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AccountReferral'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ AccountReferral:
+ type: object
+ required:
+ - code
+ - children_count
+ - referrals_left
+ - fee_share_rate
+ properties:
+ code:
+ $ref: '#/components/schemas/code'
+ parent:
+ $ref: '#/components/schemas/code'
+ description: >-
+ Parent referral code, omitted when the account has no parent
+ referral.
+ children_count:
+ $ref: '#/components/schemas/children_count'
+ referrals_left:
+ $ref: '#/components/schemas/referrals_left'
+ fee_share_rate:
+ $ref: '#/components/schemas/fee_share_rate'
+ code:
+ type: string
+ description: Referral or invite code
+ example: ABC123
+ children_count:
+ type: integer
+ description: Number of directly referred child accounts
+ example: 12
+ referrals_left:
+ type: integer
+ description: Number of additional referrals remaining for this account's invite code
+ example: 11
+ fee_share_rate:
+ type: string
+ description: Referral fee share rate. Defaults to 0.2.
+ example: '0.2'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-account-rewards.md b/PolymarketDocumentation-main/docs/api-reference/get-account-rewards.md
new file mode 100644
index 0000000..2327cc0
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-account-rewards.md
@@ -0,0 +1,333 @@
+> ## 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 Account Rewards
+
+> Get per-instrument daily liquidity reward shares for the authenticated account.
+Reward periods run from 12:00 UTC to 12:00 UTC and are labeled by their UTC end date.
+OI rewards pay 6% APR on the account's full daily average gross OI across all
+instruments when the combined daily average gross OI of its rewards entity is
+at least $1M. Accounts without an entity mapping qualify independently.
+The first reward period starts at 2026-05-08 12:00 UTC. If no date range is provided,
+the latest computed reward period is returned.
+
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/rewards
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/rewards:
+ get:
+ summary: Get Account Rewards
+ description: >
+ Get per-instrument daily liquidity reward shares for the authenticated
+ account.
+
+ Reward periods run from 12:00 UTC to 12:00 UTC and are labeled by their
+ UTC end date.
+
+ OI rewards pay 6% APR on the account's full daily average gross OI
+ across all
+
+ instruments when the combined daily average gross OI of its rewards
+ entity is
+
+ at least $1M. Accounts without an entity mapping qualify independently.
+
+ The first reward period starts at 2026-05-08 12:00 UTC. If no date range
+ is provided,
+
+ the latest computed reward period is returned.
+ operationId: getAccountRewards
+ parameters:
+ - name: date
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/date'
+ - name: start_date
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_date'
+ - name: end_date
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_date'
+ - name: limit
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/limit'
+ responses:
+ '200':
+ description: Account rewards response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AccountRewards'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ date:
+ type: string
+ description: UTC reward period end date in YYYY-MM-DD format
+ example: '2026-05-10'
+ start_date:
+ type: string
+ description: Inclusive UTC start date in YYYY-MM-DD format
+ example: '2026-05-01'
+ end_date:
+ type: string
+ description: Inclusive UTC end date in YYYY-MM-DD format
+ example: '2026-05-10'
+ limit:
+ type: integer
+ description: Maximum number of entries to return
+ example: 100
+ AccountRewards:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccountReward'
+ more:
+ $ref: '#/components/schemas/more'
+ AccountReward:
+ type: object
+ required:
+ - date
+ - maker_share_7d
+ - reward_distributed
+ - breakdown
+ properties:
+ date:
+ $ref: '#/components/schemas/date'
+ maker_share_7d:
+ $ref: '#/components/schemas/maker_share_7d'
+ reward_distributed:
+ $ref: '#/components/schemas/reward_distributed'
+ breakdown:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccountRewardInstrument'
+ oi_rewards:
+ $ref: '#/components/schemas/AccountRewardOi'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ maker_share_7d:
+ type: string
+ description: Rolling 7-day account maker volume divided by total exchange volume
+ example: '0.35'
+ reward_distributed:
+ type: boolean
+ description: Whether rewards for this period have been marked as distributed
+ example: true
+ AccountRewardInstrument:
+ type: object
+ required:
+ - instrument_id
+ - reward_pool
+ - reward_amount
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/instrument_id'
+ reward_pool:
+ $ref: '#/components/schemas/reward_pool'
+ reward_amount:
+ $ref: '#/components/schemas/reward_amount'
+ AccountRewardOi:
+ type: object
+ required:
+ - account_oi
+ - reward_amount
+ properties:
+ account_oi:
+ $ref: '#/components/schemas/account_oi'
+ reward_amount:
+ $ref: '#/components/schemas/reward_amount'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ reward_pool:
+ type: string
+ description: Configured reward pool for the instrument
+ example: '1000'
+ reward_amount:
+ type: string
+ description: Reward amount attributed to this reward row
+ example: '127.50344'
+ account_oi:
+ type: string
+ description: >-
+ Daily average gross open-interest notional for this account across all
+ instruments
+ example: '3200000'
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-account-stats.md b/PolymarketDocumentation-main/docs/api-reference/get-account-stats.md
new file mode 100644
index 0000000..5c840e5
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-account-stats.md
@@ -0,0 +1,223 @@
+> ## 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 Account Stats
+
+> Get the authenticated account's 7-day trading stats (taker volume, maker volume,
+account maker share, and entity maker share when applicable).
+Stats are cached by UTC day and may be stale by up to 24 hours.
+
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/stats
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/stats:
+ get:
+ summary: Get Account Stats
+ description: >
+ Get the authenticated account's 7-day trading stats (taker volume, maker
+ volume,
+
+ account maker share, and entity maker share when applicable).
+
+ Stats are cached by UTC day and may be stale by up to 24 hours.
+ operationId: getAccountStats
+ responses:
+ '200':
+ description: Account stats response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AccountStats'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ AccountStats:
+ type: object
+ required:
+ - volume_7d
+ - taker_volume_7d
+ - maker_volume_7d
+ - account_maker_share_7d
+ properties:
+ volume_7d:
+ $ref: '#/components/schemas/volume_7d'
+ taker_volume_7d:
+ $ref: '#/components/schemas/taker_volume_7d'
+ maker_volume_7d:
+ $ref: '#/components/schemas/maker_volume_7d'
+ account_maker_share_7d:
+ $ref: '#/components/schemas/account_maker_share_7d'
+ entity_maker_share_7d:
+ $ref: '#/components/schemas/entity_maker_share_7d'
+ entity_id:
+ $ref: '#/components/schemas/entity_id'
+ entity_name:
+ $ref: '#/components/schemas/entity_name'
+ volume_7d:
+ type: string
+ description: Rolling 7-day perpetual trading volume in USD
+ example: '5000000'
+ taker_volume_7d:
+ type: string
+ description: Rolling 7-day perpetual taker volume in USD
+ example: '3500000'
+ maker_volume_7d:
+ type: string
+ description: Rolling 7-day perpetual maker volume in USD
+ example: '1500000'
+ account_maker_share_7d:
+ type: string
+ description: Rolling 7-day account maker volume divided by total exchange volume
+ example: '0.35'
+ entity_maker_share_7d:
+ type: string
+ description: Rolling 7-day entity maker volume divided by total exchange volume
+ example: '0.35'
+ entity_id:
+ type: integer
+ description: Liquidity rewards entity ID
+ example: 42
+ entity_name:
+ type: string
+ description: Liquidity rewards entity name
+ example: desk
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-auto-cancel-status.md b/PolymarketDocumentation-main/docs/api-reference/get-auto-cancel-status.md
new file mode 100644
index 0000000..4c19601
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-auto-cancel-status.md
@@ -0,0 +1,210 @@
+> ## 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 Auto-Cancel Status
+
+> Get the current auto-cancel dead-man-switch status for the authenticated
+account, including the armed deadline, today's trigger count, and when
+the daily counter resets.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/auto-cancel
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/auto-cancel:
+ get:
+ summary: Get Auto-Cancel Status
+ description: |
+ Get the current auto-cancel dead-man-switch status for the authenticated
+ account, including the armed deadline, today's trigger count, and when
+ the daily counter resets.
+ operationId: getAutoCancel
+ responses:
+ '200':
+ description: Auto-cancel status response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AutoCancelStatus'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ AutoCancelStatus:
+ type: object
+ required:
+ - deadline
+ - triggered
+ - daily_limit
+ - next_reset
+ properties:
+ deadline:
+ $ref: '#/components/schemas/auto_cancel_deadline'
+ triggered:
+ $ref: '#/components/schemas/auto_cancel_triggered'
+ daily_limit:
+ $ref: '#/components/schemas/auto_cancel_daily_limit'
+ next_reset:
+ $ref: '#/components/schemas/auto_cancel_next_reset'
+ auto_cancel_deadline:
+ type: integer
+ description: |
+ Unix-ms deadline for the per-account auto-cancel dead-man-switch.
+ Zero means no schedule is armed. When the deadline elapses, every
+ open order on the account is cancelled and the schedule clears.
+ example: 1767000045000
+ auto_cancel_triggered:
+ type: integer
+ description: |
+ Number of times auto-cancel has fired for this account during the
+ current UTC day. Resets to zero at 00:00 UTC.
+ example: 0
+ auto_cancel_daily_limit:
+ type: integer
+ description: |
+ Maximum number of auto-cancel triggers allowed per UTC day.
+ example: 10
+ auto_cancel_next_reset:
+ type: integer
+ description: |
+ Unix-ms timestamp of the next UTC midnight when the daily trigger
+ count resets to zero.
+ example: 1767052800000
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-balances.md b/PolymarketDocumentation-main/docs/api-reference/get-balances.md
new file mode 100644
index 0000000..3c7730a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-balances.md
@@ -0,0 +1,191 @@
+> ## 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 Balances
+
+> Get asset balances for the authenticated account.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/balances
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/balances:
+ get:
+ summary: Get Balances
+ description: Get asset balances for the authenticated account.
+ operationId: getBalances
+ responses:
+ '200':
+ description: Balances response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Balance'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ Balance:
+ type: object
+ required:
+ - asset
+ - balance
+ - value
+ properties:
+ asset:
+ $ref: '#/components/schemas/asset'
+ balance:
+ $ref: '#/components/schemas/balance'
+ value:
+ $ref: '#/components/schemas/value'
+ asset:
+ type: string
+ description: Asset name
+ example: USDC
+ balance:
+ type: string
+ description: Total balance
+ example: '10000.00'
+ value:
+ type: string
+ description: USD value
+ example: '10000.00'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-bbo.md b/PolymarketDocumentation-main/docs/api-reference/get-bbo.md
new file mode 100644
index 0000000..59bbf95
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-bbo.md
@@ -0,0 +1,211 @@
+> ## 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 BBO
+
+> Get best bid and offer for all instruments.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/bbo
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/bbo:
+ get:
+ summary: Get BBO
+ description: Get best bid and offer for all instruments.
+ operationId: getBBO
+ parameters:
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ responses:
+ '200':
+ description: BBO response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BBO'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ BBO:
+ title: BBO
+ type: object
+ required:
+ - instrument_id
+ - bid_price
+ - bid_quantity
+ - ask_price
+ - ask_quantity
+ - timestamp
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ bid_price:
+ $ref: '#/components/schemas/best_bid_price'
+ bid_quantity:
+ $ref: '#/components/schemas/best_bid_quantity'
+ ask_price:
+ $ref: '#/components/schemas/best_ask_price'
+ ask_quantity:
+ $ref: '#/components/schemas/best_ask_quantity'
+ timestamp:
+ $ref: '#/components/schemas/ts'
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ best_bid_price:
+ type: string
+ description: Best bid price
+ example: '99.50'
+ best_bid_quantity:
+ type: string
+ description: Best bid quantity
+ example: '10.00'
+ best_ask_price:
+ type: string
+ description: Best ask price
+ example: '100.50'
+ best_ask_quantity:
+ type: string
+ description: Best ask quantity
+ example: '10.00'
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-book.md b/PolymarketDocumentation-main/docs/api-reference/get-book.md
new file mode 100644
index 0000000..7734972
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-book.md
@@ -0,0 +1,233 @@
+> ## 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 Book
+
+> Get book for an instrument.
+
+Request Weight:
+
+
+
+Depth 10: **2**
+
+
+
+Depth 100: **5**
+
+
+
+Depth 500: **10**
+
+
+
+Depth 1000: **20**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/book
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/book:
+ get:
+ summary: Get Book
+ description: Get book for an instrument.
+ operationId: getBook
+ parameters:
+ - name: instrument_id
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ - name: depth
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/depth'
+ responses:
+ '200':
+ description: Book response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Book'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ depth:
+ type: integer
+ description: Number of book levels to return
+ enum:
+ - 10
+ - 100
+ - 500
+ - 1000
+ default: 100
+ Book:
+ type: object
+ required:
+ - instrument_id
+ - bids
+ - asks
+ - timestamp
+ - sequence
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/instrument_id'
+ bids:
+ type: array
+ items:
+ $ref: '#/components/schemas/level'
+ description: Bid levels
+ asks:
+ type: array
+ items:
+ $ref: '#/components/schemas/level'
+ description: Ask levels
+ timestamp:
+ $ref: '#/components/schemas/timestamp'
+ sequence:
+ $ref: '#/components/schemas/sequence'
+ level:
+ type: array
+ items:
+ type: string
+ maxItems: 2
+ description: |
+ - `"100.00"` - Price
+ - `"10.00"` - Quantity
+ example:
+ - '100.00'
+ - '10.00'
+ timestamp:
+ type: integer
+ description: Timestamp in milliseconds
+ example: 1767225600000
+ sequence:
+ type: integer
+ description: Sequence number
+ example: 1234567890
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-collateral-assets.md b/PolymarketDocumentation-main/docs/api-reference/get-collateral-assets.md
new file mode 100644
index 0000000..6afb9ab
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-collateral-assets.md
@@ -0,0 +1,169 @@
+> ## 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 Collateral Assets
+
+> Get a list of collateral assets.
+
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/assets
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/assets:
+ get:
+ summary: Get Collateral Assets
+ description: |
+ Get a list of collateral assets.
+ operationId: getAssets
+ responses:
+ '200':
+ description: Assets response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Asset'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ Asset:
+ type: object
+ required:
+ - asset
+ - address
+ - decimals
+ - collateral_ratio
+ - withdrawal_fee
+ properties:
+ asset:
+ $ref: '#/components/schemas/asset'
+ address:
+ $ref: '#/components/schemas/address'
+ decimals:
+ $ref: '#/components/schemas/decimals'
+ collateral_ratio:
+ $ref: '#/components/schemas/collateral_ratio'
+ withdrawal_fee:
+ $ref: '#/components/schemas/withdrawal_fee'
+ asset:
+ type: string
+ description: Asset name
+ example: USDC
+ address:
+ type: string
+ description: Address
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ decimals:
+ type: integer
+ description: Asset decimals
+ example: 6
+ collateral_ratio:
+ type: string
+ description: Collateral ratio
+ example: '1.00'
+ withdrawal_fee:
+ type: string
+ description: Withdrawal transaction fee in decimalized asset units
+ example: '5.00'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-credentials.md b/PolymarketDocumentation-main/docs/api-reference/get-credentials.md
new file mode 100644
index 0000000..5c30ec5
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-credentials.md
@@ -0,0 +1,230 @@
+> ## 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 Credentials
+
+> Get the account ID, address, and proxy keys for the authenticated account.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/credentials
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/credentials:
+ get:
+ summary: Get Credentials
+ description: >-
+ Get the account ID, address, and proxy keys for the authenticated
+ account.
+ operationId: getCredentials
+ responses:
+ '200':
+ description: Credentials response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Credentials'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ Credentials:
+ type: object
+ required:
+ - address
+ - keys
+ properties:
+ address:
+ $ref: '#/components/schemas/address'
+ keys:
+ type: array
+ items:
+ $ref: '#/components/schemas/Key'
+ address:
+ type: string
+ description: Address
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ Key:
+ type: object
+ required:
+ - proxy
+ - expiry
+ properties:
+ proxy:
+ $ref: '#/components/schemas/proxy'
+ label:
+ $ref: '#/components/schemas/label'
+ expiry:
+ $ref: '#/components/schemas/expiry'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ proxy:
+ type: string
+ description: Proxy address in hex format
+ example: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ label:
+ type: string
+ description: Human-readable label for a proxy key or internal transfer
+ example: trading-bot
+ expiry:
+ type: integer
+ description: Expiry timestamp in milliseconds
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-deposits.md b/PolymarketDocumentation-main/docs/api-reference/get-deposits.md
new file mode 100644
index 0000000..4a700bf
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-deposits.md
@@ -0,0 +1,318 @@
+> ## 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 Deposits
+
+> Get deposit history for the authenticated account.
+If no end time is provided, the current time will be used.
+Maximum of 100 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/deposits
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/deposits:
+ get:
+ summary: Get Deposits
+ description: |
+ Get deposit history for the authenticated account.
+ If no end time is provided, the current time will be used.
+ Maximum of 100 entries returned per request.
+ operationId: getDeposits
+ parameters:
+ - name: deposit_status
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/deposit_status'
+ - name: hash
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/hash'
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Deposit history response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Deposits'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ deposit_status:
+ type: string
+ description: Deposit status
+ enum:
+ - pending
+ - confirmed
+ - removed
+ hash:
+ type: string
+ description: On-chain transaction hash, "0x" if not yet mined
+ default: 0x
+ example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ Deposits:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Deposit'
+ more:
+ $ref: '#/components/schemas/more'
+ Deposit:
+ type: object
+ required:
+ - hash
+ - asset
+ - amount
+ - status
+ - from
+ - to
+ - confirmations
+ - required_confirmations
+ - created_timestamp
+ properties:
+ hash:
+ $ref: '#/components/schemas/hash'
+ asset:
+ $ref: '#/components/schemas/asset'
+ amount:
+ $ref: '#/components/schemas/amount'
+ from:
+ $ref: '#/components/schemas/from'
+ to:
+ $ref: '#/components/schemas/to'
+ status:
+ $ref: '#/components/schemas/deposit_status'
+ confirmations:
+ $ref: '#/components/schemas/confirmations'
+ required_confirmations:
+ $ref: '#/components/schemas/required_confirmations'
+ created_timestamp:
+ $ref: '#/components/schemas/created_timestamp'
+ confirmed_timestamp:
+ $ref: '#/components/schemas/confirmed_timestamp'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ asset:
+ type: string
+ description: Asset name
+ example: USDC
+ amount:
+ type: string
+ description: >-
+ Raw token amount including decimals. For withdrawals this matches the
+ uint256 amount in the EIP-712 signature (e.g. "100000000" for 100 USDC
+ with 6 decimals).
+ example: '100000000'
+ from:
+ type: string
+ description: Sender address in hex format
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ to:
+ type: string
+ description: Destination address in hex format
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ confirmations:
+ type: integer
+ description: Number of block confirmations
+ example: 12
+ required_confirmations:
+ type: integer
+ description: Required number of block confirmations
+ example: 12
+ created_timestamp:
+ type: integer
+ description: Creation timestamp in milliseconds
+ example: 1767225600000
+ confirmed_timestamp:
+ type: integer
+ description: Confirmation timestamp in milliseconds
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-equity.md b/PolymarketDocumentation-main/docs/api-reference/get-equity.md
new file mode 100644
index 0000000..66e6fb3
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-equity.md
@@ -0,0 +1,255 @@
+> ## 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 Equity
+
+> Get equity history for the authenticated account.
+If no end time is provided, the current time will be used.
+Maximum of 1000 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/equity
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/equity:
+ get:
+ summary: Get Equity
+ description: |
+ Get equity history for the authenticated account.
+ If no end time is provided, the current time will be used.
+ Maximum of 1000 entries returned per request.
+ operationId: getEquityHistory
+ parameters:
+ - name: interval
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/interval'
+ - name: start_timestamp
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Equity history response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EquityHistory'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ interval:
+ type: string
+ description: Kline interval
+ enum:
+ - 1s
+ - 1m
+ - 5m
+ - 15m
+ - 30m
+ - 1h
+ - 4h
+ - 6h
+ - 12h
+ - 1d
+ - 1w
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ EquityHistory:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ description: |
+ - `1767225600000` - Timestamp
+ - `"10000.00"` - Equity
+ items:
+ type: array
+ example:
+ - 1767225600000
+ - '10000.00'
+ maxItems: 1000
+ more:
+ $ref: '#/components/schemas/more'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-exchange-info.md b/PolymarketDocumentation-main/docs/api-reference/get-exchange-info.md
new file mode 100644
index 0000000..109d3dc
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-exchange-info.md
@@ -0,0 +1,161 @@
+> ## 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 Exchange Info
+
+> Get exchange information.
+
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/exchange
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/exchange:
+ get:
+ summary: Get Exchange Info
+ description: |
+ Get exchange information.
+ operationId: getExchange
+ responses:
+ '200':
+ description: Successful exchange information response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Exchange'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ Exchange:
+ type: object
+ required:
+ - name
+ - version
+ - chain_id
+ - contract
+ properties:
+ name:
+ $ref: '#/components/schemas/name'
+ version:
+ $ref: '#/components/schemas/version'
+ chain_id:
+ $ref: '#/components/schemas/chain_id'
+ contract:
+ $ref: '#/components/schemas/contract'
+ name:
+ type: string
+ description: Exchange name used in the EIP-712 domain.
+ example: Polymarket
+ version:
+ type: string
+ description: Exchange version used in the EIP-712 domain.
+ example: '1'
+ chain_id:
+ type: integer
+ format: uint32
+ description: Chain ID of the network the exchange is deployed on.
+ example: 137
+ contract:
+ type: string
+ description: Verifying contract address or the EIP-712 domain.
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-fees.md b/PolymarketDocumentation-main/docs/api-reference/get-fees.md
new file mode 100644
index 0000000..b5e4e20
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-fees.md
@@ -0,0 +1,179 @@
+> ## 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 Fees
+
+> Get the default fee schedule for each instrument type and category. Rates returned are the $0-tier defaults; the account's actual rate on each fill depends on its trailing 30-day volume tier.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/fees
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/fees:
+ get:
+ summary: Get Fees
+ description: >-
+ Get the default fee schedule for each instrument type and category.
+ Rates returned are the $0-tier defaults; the account's actual rate on
+ each fill depends on its trailing 30-day volume tier.
+ operationId: getInfoFees
+ responses:
+ '200':
+ description: Fee schedule response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FeesInfo'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ FeesInfo:
+ type: object
+ required:
+ - fee_schedule
+ properties:
+ fee_schedule:
+ type: array
+ items:
+ $ref: '#/components/schemas/FeeScheduleEntry'
+ FeeScheduleEntry:
+ type: object
+ required:
+ - instrument_type
+ - category
+ - taker_fee_rate
+ - maker_fee_rate
+ properties:
+ instrument_type:
+ $ref: '#/components/schemas/instrument_type'
+ category:
+ $ref: '#/components/schemas/category'
+ taker_fee_rate:
+ $ref: '#/components/schemas/taker_fee_rate'
+ maker_fee_rate:
+ $ref: '#/components/schemas/maker_fee_rate'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ instrument_type:
+ type: string
+ description: Instrument type
+ enum:
+ - perpetual
+ category:
+ type: string
+ description: Instrument category
+ enum:
+ - equity
+ - commodity
+ - index
+ - crypto
+ taker_fee_rate:
+ type: string
+ description: >-
+ Default taker fee rate for the $0 volume tier. Actual rate scales down
+ with the account's trailing 30-day volume tier.
+ example: '0.0004'
+ maker_fee_rate:
+ type: string
+ description: >-
+ Default maker fee rate for the $0 volume tier. Positive at lower tiers,
+ zero at the $500M tier, and a rebate (negative) at the top tier.
+ example: '0.000125'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-fills.md b/PolymarketDocumentation-main/docs/api-reference/get-fills.md
new file mode 100644
index 0000000..5f5fad9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-fills.md
@@ -0,0 +1,342 @@
+> ## 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 Fills
+
+> Get fill history for the authenticated account.
+If no end time is provided, the current time will be used.
+Maximum of 100 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/fills
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/fills:
+ get:
+ summary: Get Fills
+ description: |
+ Get fill history for the authenticated account.
+ If no end time is provided, the current time will be used.
+ Maximum of 100 entries returned per request.
+ operationId: getFills
+ parameters:
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Fills response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AccountTrades'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ AccountTrades:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccountTradeData'
+ description: Account's trade history
+ more:
+ $ref: '#/components/schemas/more'
+ AccountTradeData:
+ type: object
+ required:
+ - trade_id
+ - order_id
+ - instrument_id
+ - side
+ - price
+ - quantity
+ - taker
+ - fee
+ - fee_asset
+ - previous_size
+ - previous_entry_price
+ - pnl
+ - timestamp
+ - liquidation
+ - hash
+ properties:
+ trade_id:
+ $ref: '#/components/schemas/tid'
+ order_id:
+ $ref: '#/components/schemas/oid'
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ side:
+ $ref: '#/components/schemas/side'
+ price:
+ $ref: '#/components/schemas/p'
+ quantity:
+ $ref: '#/components/schemas/qty'
+ taker:
+ $ref: '#/components/schemas/taker'
+ fee:
+ $ref: '#/components/schemas/fee'
+ fee_asset:
+ $ref: '#/components/schemas/fea'
+ previous_size:
+ $ref: '#/components/schemas/psz'
+ previous_entry_price:
+ $ref: '#/components/schemas/pep'
+ pnl:
+ $ref: '#/components/schemas/pnl'
+ liquidation:
+ $ref: '#/components/schemas/liq'
+ timestamp:
+ $ref: '#/components/schemas/ts'
+ hash:
+ $ref: '#/components/schemas/hash'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ tid:
+ type: integer
+ description: Trade ID
+ example: 1
+ oid:
+ type: integer
+ description: Order ID
+ example: 1234567890
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ side:
+ type: string
+ description: Side
+ enum:
+ - long
+ - short
+ p:
+ type: string
+ description: Price
+ example: '100.00'
+ qty:
+ type: string
+ description: Quantity in no. of contracts
+ example: '10.00'
+ taker:
+ type: boolean
+ description: Whether this side was the taker
+ fee:
+ type: string
+ description: Fee amount for this trade side
+ example: '1.25'
+ fea:
+ type: string
+ description: Fee asset name
+ example: USDC
+ psz:
+ type: string
+ description: Position size before the fill
+ example: '26.86'
+ pep:
+ type: string
+ description: Position entry price before the fill
+ example: '100.00'
+ pnl:
+ type: string
+ description: PnL in USD
+ example: '100.00'
+ liq:
+ type: boolean
+ description: Whether the fill was a liquidation
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ hash:
+ type: string
+ description: On-chain transaction hash, "0x" if not yet mined
+ default: 0x
+ example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-funding-charges.md b/PolymarketDocumentation-main/docs/api-reference/get-funding-charges.md
new file mode 100644
index 0000000..566eeec
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-funding-charges.md
@@ -0,0 +1,287 @@
+> ## 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 Funding Charges
+
+> Get funding payment history for the authenticated account.
+If no end time is provided, the current time will be used.
+Maximum of 100 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/funding
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/funding:
+ get:
+ summary: Get Funding Charges
+ description: |
+ Get funding payment history for the authenticated account.
+ If no end time is provided, the current time will be used.
+ Maximum of 100 entries returned per request.
+ operationId: getAccountFunding
+ parameters:
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Account funding history response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AccountFundingHistory'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ AccountFundingHistory:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccountFundingData'
+ more:
+ $ref: '#/components/schemas/more'
+ AccountFundingData:
+ type: object
+ required:
+ - instrument_id
+ - size
+ - funding_rate
+ - funding_asset
+ - funding
+ - timestamp
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ size:
+ $ref: '#/components/schemas/sz'
+ funding_rate:
+ $ref: '#/components/schemas/fr'
+ funding_asset:
+ $ref: '#/components/schemas/fua'
+ funding:
+ $ref: '#/components/schemas/fund'
+ timestamp:
+ $ref: '#/components/schemas/ts'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ sz:
+ type: string
+ description: >-
+ Signed position size in no. of contracts (positive = long, negative =
+ short)
+ example: '10.00'
+ fr:
+ type: string
+ description: Funding rate
+ example: '0.0001'
+ fua:
+ type: string
+ description: Funding asset name
+ example: USDC
+ fund:
+ type: string
+ description: Funding paid in USD
+ example: '1.00'
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-historical-funding.md b/PolymarketDocumentation-main/docs/api-reference/get-historical-funding.md
new file mode 100644
index 0000000..a6ee0bc
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-historical-funding.md
@@ -0,0 +1,217 @@
+> ## 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 Historical Funding
+
+> Get public funding rate history for an instrument.
+Maximum of 100 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/funding
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/funding:
+ get:
+ summary: Get Historical Funding
+ description: |
+ Get public funding rate history for an instrument.
+ Maximum of 100 entries returned per request.
+ operationId: getFundingHistory
+ parameters:
+ - name: instrument_id
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Funding rate history response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FundingHistory'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ FundingHistory:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/FundingRate'
+ more:
+ $ref: '#/components/schemas/more'
+ FundingRate:
+ type: object
+ required:
+ - funding_rate
+ - timestamp
+ properties:
+ funding_rate:
+ $ref: '#/components/schemas/fr'
+ timestamp:
+ $ref: '#/components/schemas/ts'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ fr:
+ type: string
+ description: Funding rate
+ example: '0.0001'
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-index.md b/PolymarketDocumentation-main/docs/api-reference/get-index.md
new file mode 100644
index 0000000..fbea083
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-index.md
@@ -0,0 +1,233 @@
+> ## 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 Index
+
+> Get index price and the list of constituents for an asset.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/index
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/index:
+ get:
+ summary: Get Index
+ description: Get index price and the list of constituents for an asset.
+ operationId: getIndex
+ parameters:
+ - name: asset
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/asset'
+ responses:
+ '200':
+ description: Index constituents response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Index'
+ examples:
+ index:
+ summary: Index constituents
+ value:
+ asset: NVDA
+ index_price: '160.00'
+ constituents:
+ - source: chainlink
+ symbol: NVDA/USD
+ weight: '1.0'
+ price: '160.00'
+ ts: 1767225600000
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ asset:
+ type: string
+ description: Asset name
+ example: USDC
+ Index:
+ type: object
+ required:
+ - asset
+ - index_price
+ - constituents
+ - ts
+ properties:
+ asset:
+ $ref: '#/components/schemas/asset'
+ index_price:
+ $ref: '#/components/schemas/index_price'
+ constituents:
+ type: array
+ items:
+ $ref: '#/components/schemas/IndexConstituent'
+ ts:
+ $ref: '#/components/schemas/ts'
+ index_price:
+ type: string
+ description: Index price
+ example: '100.00'
+ IndexConstituent:
+ type: object
+ required:
+ - source
+ - symbol
+ - weight
+ - price
+ properties:
+ source:
+ $ref: '#/components/schemas/source'
+ symbol:
+ $ref: '#/components/schemas/symbol'
+ weight:
+ $ref: '#/components/schemas/weight'
+ price:
+ $ref: '#/components/schemas/price'
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ source:
+ type: string
+ description: Source name
+ example: chainlink
+ symbol:
+ type: string
+ description: Instrument symbol
+ example: NVDA-USDC
+ weight:
+ type: string
+ description: Index constituent weight
+ example: '0.25'
+ price:
+ type: string
+ description: Price
+ example: '100.00'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-instrument-config.md b/PolymarketDocumentation-main/docs/api-reference/get-instrument-config.md
new file mode 100644
index 0000000..c6cac46
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-instrument-config.md
@@ -0,0 +1,226 @@
+> ## 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 Instrument Config
+
+> Get per-instrument configuration (leverage and margin mode) for the authenticated account.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/config
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/config:
+ get:
+ summary: Get Instrument Config
+ description: >-
+ Get per-instrument configuration (leverage and margin mode) for the
+ authenticated account.
+ operationId: getConfig
+ parameters:
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ responses:
+ '200':
+ description: Instrument config response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/AccountConfig'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ AccountConfig:
+ description: Account configuration.
+ type: object
+ required:
+ - instrument_id
+ - leverage
+ - cross
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ leverage:
+ $ref: '#/components/schemas/lev'
+ cross:
+ $ref: '#/components/schemas/cross'
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ lev:
+ type: integer
+ description: Leverage
+ example: 10
+ cross:
+ type: boolean
+ description: Whether to use cross margin mode
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-instruments.md b/PolymarketDocumentation-main/docs/api-reference/get-instruments.md
new file mode 100644
index 0000000..02662a9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-instruments.md
@@ -0,0 +1,310 @@
+> ## 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 Instruments
+
+> Get all instruments.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/instruments
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/instruments:
+ get:
+ summary: Get Instruments
+ description: Get all instruments.
+ operationId: getInstruments
+ parameters:
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ - name: instrument_type
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/instrument_type'
+ - name: category
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/category'
+ responses:
+ '200':
+ description: Instruments response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Instrument'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ instrument_type:
+ type: string
+ description: Instrument type
+ enum:
+ - perpetual
+ category:
+ type: string
+ description: Instrument category
+ enum:
+ - equity
+ - commodity
+ - index
+ - crypto
+ Instrument:
+ type: object
+ required:
+ - instrument_id
+ - instrument_type
+ - category
+ - symbol
+ - base_asset
+ - quote_asset
+ - funding_interval
+ - quantity_decimals
+ - price_decimals
+ - price_bounds
+ - liquidation_fee
+ - max_order_count
+ - min_notional
+ - max_market_notional
+ - max_limit_notional
+ - max_leverage
+ - risk_tiers
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/instrument_id'
+ instrument_type:
+ $ref: '#/components/schemas/instrument_type'
+ category:
+ $ref: '#/components/schemas/category'
+ symbol:
+ $ref: '#/components/schemas/symbol'
+ base_asset:
+ $ref: '#/components/schemas/base_asset'
+ quote_asset:
+ $ref: '#/components/schemas/quote_asset'
+ funding_interval:
+ $ref: '#/components/schemas/funding_interval'
+ quantity_decimals:
+ $ref: '#/components/schemas/quantity_decimals'
+ price_decimals:
+ $ref: '#/components/schemas/price_decimals'
+ price_bounds:
+ $ref: '#/components/schemas/price_bounds'
+ liquidation_fee:
+ $ref: '#/components/schemas/liquidation_fee'
+ max_order_count:
+ $ref: '#/components/schemas/max_order_count'
+ min_notional:
+ $ref: '#/components/schemas/min_notional'
+ max_market_notional:
+ $ref: '#/components/schemas/max_market_notional'
+ max_limit_notional:
+ $ref: '#/components/schemas/max_limit_notional'
+ max_leverage:
+ $ref: '#/components/schemas/max_leverage'
+ risk_tiers:
+ type: array
+ items:
+ $ref: '#/components/schemas/RiskTier'
+ symbol:
+ type: string
+ description: Instrument symbol
+ example: NVDA-USDC
+ base_asset:
+ type: string
+ description: Base asset name
+ example: NVDA
+ quote_asset:
+ type: string
+ description: Quote asset name
+ example: USDC
+ funding_interval:
+ type: string
+ description: Funding interval
+ example: 1h
+ quantity_decimals:
+ type: integer
+ description: Number of decimal places for quantity.
+ example: 2
+ price_decimals:
+ type: integer
+ description: >-
+ Number of decimal places for price. Non-integer prices have a maximum of
+ 5 significant figures; integer prices are allowed regardless of
+ significant figures.
+ example: 2
+ price_bounds:
+ type: string
+ description: Price bounds percentage
+ example: '0.05'
+ liquidation_fee:
+ type: string
+ description: Liquidation fee rate
+ example: '0.025'
+ max_order_count:
+ type: integer
+ description: Maximum open order count
+ example: 200
+ min_notional:
+ type: string
+ description: Minimum notional value in USD
+ example: '1.00'
+ max_market_notional:
+ type: string
+ description: Maximum market order notional value in USD
+ example: '1000000.00'
+ max_limit_notional:
+ type: string
+ description: Maximum limit order notional value in USD
+ example: '10000000.00'
+ max_leverage:
+ type: integer
+ description: Maximum leverage
+ example: 20
+ RiskTier:
+ type: object
+ required:
+ - lower_bound
+ - max_leverage
+ properties:
+ lower_bound:
+ $ref: '#/components/schemas/lower_bound'
+ max_leverage:
+ $ref: '#/components/schemas/max_leverage'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ lower_bound:
+ type: string
+ description: Position size lower bound
+ example: '0'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-internal-transfers.md b/PolymarketDocumentation-main/docs/api-reference/get-internal-transfers.md
new file mode 100644
index 0000000..2d967ae
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-internal-transfers.md
@@ -0,0 +1,282 @@
+> ## 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 Internal Transfers
+
+> Get settled internal transfer history for the authenticated account.
+Returns both inbound and outbound transfers.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/internal-transfers
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/internal-transfers:
+ get:
+ summary: Get Internal Transfers
+ description: |
+ Get settled internal transfer history for the authenticated account.
+ Returns both inbound and outbound transfers.
+ operationId: getInternalTransfers
+ parameters:
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Internal transfer history response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InternalTransfers'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ InternalTransfers:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/InternalTransfer'
+ more:
+ $ref: '#/components/schemas/more'
+ InternalTransfer:
+ type: object
+ required:
+ - transfer_id
+ - asset
+ - amount
+ - direction
+ - counterparty
+ - created_timestamp
+ properties:
+ transfer_id:
+ $ref: '#/components/schemas/transfer_id'
+ asset:
+ $ref: '#/components/schemas/asset'
+ amount:
+ $ref: '#/components/schemas/amount'
+ direction:
+ $ref: '#/components/schemas/direction'
+ counterparty:
+ $ref: '#/components/schemas/counterparty'
+ label:
+ $ref: '#/components/schemas/label'
+ created_timestamp:
+ $ref: '#/components/schemas/created_timestamp'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ transfer_id:
+ type: integer
+ description: Internal transfer ID
+ asset:
+ type: string
+ description: Asset name
+ example: USDC
+ amount:
+ type: string
+ description: >-
+ Raw token amount including decimals. For withdrawals this matches the
+ uint256 amount in the EIP-712 signature (e.g. "100000000" for 100 USDC
+ with 6 decimals).
+ example: '100000000'
+ direction:
+ type: string
+ description: Transfer direction relative to the authenticated account
+ enum:
+ - in
+ - out
+ counterparty:
+ type: string
+ description: Counterparty account address in hex format
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ label:
+ type: string
+ description: Human-readable label for a proxy key or internal transfer
+ example: trading-bot
+ created_timestamp:
+ type: integer
+ description: Creation timestamp in milliseconds
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-klines.md b/PolymarketDocumentation-main/docs/api-reference/get-klines.md
new file mode 100644
index 0000000..343a9b6
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-klines.md
@@ -0,0 +1,237 @@
+> ## 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 Klines
+
+> Get klines for an instrument.
+If no end time is provided, the current time will be used.
+Maximum of 1000 entries returned per request.
+
+
+Request Weight: **5**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/klines
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/klines:
+ get:
+ summary: Get Klines
+ description: |
+ Get klines for an instrument.
+ If no end time is provided, the current time will be used.
+ Maximum of 1000 entries returned per request.
+ operationId: getKlines
+ parameters:
+ - name: instrument_id
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ - name: interval
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/interval'
+ - name: start_timestamp
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Klines response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KlinesResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ interval:
+ type: string
+ description: Kline interval
+ enum:
+ - 1s
+ - 1m
+ - 5m
+ - 15m
+ - 30m
+ - 1h
+ - 4h
+ - 6h
+ - 12h
+ - 1d
+ - 1w
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ KlinesResponse:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/kline'
+ maxItems: 1000
+ more:
+ $ref: '#/components/schemas/more'
+ kline:
+ type: array
+ description: |
+ - `1767225600000` - Open time
+ - `"100.00"` - Open price
+ - `"105.00"` - High price
+ - `"99.00"` - Low price
+ - `"102.00"` - Close price
+ - `"500.00"` - Volume (base unit)
+ - `42` - Number of trades
+ example:
+ - 1767225600000
+ - '100.00'
+ - '105.00'
+ - '99.00'
+ - '102.00'
+ - '500.00'
+ - 42
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-limit-tiers.md b/PolymarketDocumentation-main/docs/api-reference/get-limit-tiers.md
new file mode 100644
index 0000000..a90655d
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-limit-tiers.md
@@ -0,0 +1,188 @@
+> ## 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 Limit Tiers
+
+> Get the list of account limit tiers. Action and open-order fields are enforced per account; legacy request-rate fields are not used for gateway request enforcement.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/limit-tiers
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/limit-tiers:
+ get:
+ summary: Get Limit Tiers
+ description: >-
+ Get the list of account limit tiers. Action and open-order fields are
+ enforced per account; legacy request-rate fields are not used for
+ gateway request enforcement.
+ operationId: getLimitTiers
+ responses:
+ '200':
+ description: Limit tiers response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/LimitTier'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ LimitTier:
+ type: object
+ required:
+ - min_volume_14d
+ - rate_per_minute_limit
+ - rate_burst_limit
+ - actions_per_minute_limit
+ - actions_burst_limit
+ - open_orders_limit
+ - messages_per_minute
+ properties:
+ min_volume_14d:
+ $ref: '#/components/schemas/min_volume'
+ rate_per_minute_limit:
+ $ref: '#/components/schemas/rate_per_minute_limit'
+ rate_burst_limit:
+ $ref: '#/components/schemas/rate_burst_limit'
+ actions_per_minute_limit:
+ $ref: '#/components/schemas/actions_per_minute_limit'
+ actions_burst_limit:
+ $ref: '#/components/schemas/actions_burst_limit'
+ open_orders_limit:
+ $ref: '#/components/schemas/open_orders_limit'
+ messages_per_minute:
+ $ref: '#/components/schemas/messages_per_minute'
+ min_volume:
+ type: string
+ description: Minimum volume threshold for this tier
+ example: '0'
+ rate_per_minute_limit:
+ type: integer
+ description: >-
+ Maximum IP request weight per minute. In limit tiers, this is a legacy
+ field and is not used for gateway enforcement.
+ example: 1200
+ rate_burst_limit:
+ type: integer
+ description: >-
+ Legacy limit-tier request-rate field. It is not used for gateway
+ enforcement.
+ actions_per_minute_limit:
+ type: integer
+ description: Maximum order action tokens per account per minute
+ example: 300
+ actions_burst_limit:
+ type: integer
+ description: Additional account action allowance limit
+ open_orders_limit:
+ type: integer
+ description: Maximum number of open orders per account
+ example: 1000
+ messages_per_minute:
+ type: integer
+ description: >-
+ Display-only per-minute action/message allowance, equal to
+ actions_per_minute_limit. Not separately configured or enforced.
+ example: 300
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-open-orders.md b/PolymarketDocumentation-main/docs/api-reference/get-open-orders.md
new file mode 100644
index 0000000..3160927
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-open-orders.md
@@ -0,0 +1,382 @@
+> ## 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 Open Orders
+
+> Get open orders for the authenticated account.
+
+Request Weight:
+
+
+
+With instrument ID: **1**
+
+
+
+Without instrument ID: **20**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/open-orders
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/open-orders:
+ get:
+ summary: Get Open Orders
+ description: Get open orders for the authenticated account.
+ operationId: getOpenOrders
+ parameters:
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/iid'
+ responses:
+ '200':
+ description: Orders response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/OrderData'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ OrderData:
+ type: object
+ required:
+ - order_id
+ - instrument_id
+ - buy
+ - price
+ - quantity
+ - tif
+ - post_only
+ - ro
+ - status
+ - resting_quantity
+ - filled_quantity
+ - created_timestamp
+ - updated_timestamp
+ properties:
+ order_id:
+ $ref: '#/components/schemas/oid'
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ buy:
+ $ref: '#/components/schemas/buy'
+ price:
+ $ref: '#/components/schemas/p'
+ quantity:
+ $ref: '#/components/schemas/qty'
+ tif:
+ $ref: '#/components/schemas/tif'
+ post_only:
+ $ref: '#/components/schemas/po'
+ ro:
+ $ref: '#/components/schemas/ro'
+ resting_quantity:
+ $ref: '#/components/schemas/rest'
+ filled_quantity:
+ $ref: '#/components/schemas/fill'
+ status:
+ $ref: '#/components/schemas/st'
+ created_timestamp:
+ $ref: '#/components/schemas/cts'
+ updated_timestamp:
+ $ref: '#/components/schemas/uts'
+ client_order_id:
+ $ref: '#/components/schemas/coid'
+ tpsl:
+ $ref: '#/components/schemas/TpSlOrderFields'
+ description: >-
+ Conditional-order fields. Present only when the order is a TP/SL
+ conditional order — `null`/omitted for regular orders.
+ oid:
+ type: integer
+ description: Order ID
+ example: 1234567890
+ buy:
+ type: boolean
+ description: Is buy
+ example: true
+ p:
+ type: string
+ description: Price
+ example: '100.00'
+ qty:
+ type: string
+ description: Quantity in no. of contracts
+ example: '10.00'
+ tif:
+ type: string
+ description: Time in force
+ enum:
+ - gtc
+ - ioc
+ - fok
+ po:
+ type: boolean
+ description: Post only
+ default: false
+ example: false
+ ro:
+ type: boolean
+ description: Reduce only
+ example: false
+ default: false
+ rest:
+ type: string
+ description: Resting quantity
+ example: '9.00'
+ fill:
+ type: string
+ description: Filled quantity
+ example: '1.00'
+ st:
+ type: string
+ description: Order status
+ example: open
+ cts:
+ type: integer
+ description: Create timestamp in milliseconds
+ example: 1767225600000
+ uts:
+ type: integer
+ description: Update timestamp in milliseconds
+ example: 1767225600000
+ coid:
+ type: string
+ description: Client order ID
+ minLength: 32
+ maxLength: 32
+ pattern: ^[0-9a-f]{32}$
+ example: 550e8400e29b41d4a716446655440000
+ TpSlOrderFields:
+ type: object
+ description: TP/SL-specific fields surfaced alongside the regular order shape.
+ required:
+ - kind
+ - scope
+ - trp
+ properties:
+ kind:
+ $ref: '#/components/schemas/kind'
+ scope:
+ $ref: '#/components/schemas/tr_scope'
+ trp:
+ $ref: '#/components/schemas/trp'
+ parent_oid:
+ $ref: '#/components/schemas/parent_oid'
+ armed_qty:
+ $ref: '#/components/schemas/qty'
+ description: >-
+ Quantity armed at attach time (OCO) or `"0"` for position-based
+ (sized at trigger time).
+ slip_bps:
+ $ref: '#/components/schemas/slip_bps'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ kind:
+ type: string
+ description: Conditional order type (TakeProfit / StopLoss)
+ enum:
+ - tp
+ - sl
+ tr_scope:
+ type: string
+ description: >
+ How the conditional order sizes itself.
+
+ - `order` - child of a parent entry (bracket / OCO ladder). Quantity is
+ required.
+
+ - `position` - attached to an open position. v1 always closes the full
+ position (`qty` must be `"0"`).
+ enum:
+ - order
+ - position
+ trp:
+ type: string
+ description: Trigger price
+ example: '110.00'
+ parent_oid:
+ type: integer
+ description: >-
+ Parent entry order id. Optional — omit it (do not send `0`) when the
+ parent is created in the same request (inline `CreateOrder.tpsl` or
+ `CreateTpSlArgs.parent`); the gateway auto-wires the child to it. Set it
+ only to attach an order-scoped leg to an existing resting order. Inline
+ `CreateOrder.tpsl` rejects a non-zero value; position-scoped legs carry
+ no parent.
+ example: 1234567890
+ slip_bps:
+ type: integer
+ minimum: 0
+ maximum: 10000
+ description: >-
+ Per-order market-trigger slippage cap in basis points. 0 = use the
+ per-instrument default. Clamped to the instrument cap.
+ example: 1000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-orders.md b/PolymarketDocumentation-main/docs/api-reference/get-orders.md
new file mode 100644
index 0000000..e02d4c0
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-orders.md
@@ -0,0 +1,427 @@
+> ## 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 Orders
+
+> Get historical order snapshots for the authenticated account from the order history database.
+Returns the latest known state for each matching order, including accepted, open, partial,
+filled, and cancelled orders. For currently resting orders only, use Get Open Orders.
+Maximum of 100 entries returned per request.
+
+
+Request Weight:
+
+
+
+With order ID: **1**
+
+
+
+Without order ID: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/orders
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/orders:
+ get:
+ summary: Get Orders
+ description: >
+ Get historical order snapshots for the authenticated account from the
+ order history database.
+
+ Returns the latest known state for each matching order, including
+ accepted, open, partial,
+
+ filled, and cancelled orders. For currently resting orders only, use Get
+ Open Orders.
+
+ Maximum of 100 entries returned per request.
+ operationId: getOrders
+ parameters:
+ - name: order_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/order_id'
+ - name: client_order_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/coid'
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/iid'
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Orders response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/OrderData'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ order_id:
+ type: integer
+ description: Order ID
+ coid:
+ type: string
+ description: Client order ID
+ minLength: 32
+ maxLength: 32
+ pattern: ^[0-9a-f]{32}$
+ example: 550e8400e29b41d4a716446655440000
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ OrderData:
+ type: object
+ required:
+ - order_id
+ - instrument_id
+ - buy
+ - price
+ - quantity
+ - tif
+ - post_only
+ - ro
+ - status
+ - resting_quantity
+ - filled_quantity
+ - created_timestamp
+ - updated_timestamp
+ properties:
+ order_id:
+ $ref: '#/components/schemas/oid'
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ buy:
+ $ref: '#/components/schemas/buy'
+ price:
+ $ref: '#/components/schemas/p'
+ quantity:
+ $ref: '#/components/schemas/qty'
+ tif:
+ $ref: '#/components/schemas/tif'
+ post_only:
+ $ref: '#/components/schemas/po'
+ ro:
+ $ref: '#/components/schemas/ro'
+ resting_quantity:
+ $ref: '#/components/schemas/rest'
+ filled_quantity:
+ $ref: '#/components/schemas/fill'
+ status:
+ $ref: '#/components/schemas/st'
+ created_timestamp:
+ $ref: '#/components/schemas/cts'
+ updated_timestamp:
+ $ref: '#/components/schemas/uts'
+ client_order_id:
+ $ref: '#/components/schemas/coid'
+ tpsl:
+ $ref: '#/components/schemas/TpSlOrderFields'
+ description: >-
+ Conditional-order fields. Present only when the order is a TP/SL
+ conditional order — `null`/omitted for regular orders.
+ oid:
+ type: integer
+ description: Order ID
+ example: 1234567890
+ buy:
+ type: boolean
+ description: Is buy
+ example: true
+ p:
+ type: string
+ description: Price
+ example: '100.00'
+ qty:
+ type: string
+ description: Quantity in no. of contracts
+ example: '10.00'
+ tif:
+ type: string
+ description: Time in force
+ enum:
+ - gtc
+ - ioc
+ - fok
+ po:
+ type: boolean
+ description: Post only
+ default: false
+ example: false
+ ro:
+ type: boolean
+ description: Reduce only
+ example: false
+ default: false
+ rest:
+ type: string
+ description: Resting quantity
+ example: '9.00'
+ fill:
+ type: string
+ description: Filled quantity
+ example: '1.00'
+ st:
+ type: string
+ description: Order status
+ example: open
+ cts:
+ type: integer
+ description: Create timestamp in milliseconds
+ example: 1767225600000
+ uts:
+ type: integer
+ description: Update timestamp in milliseconds
+ example: 1767225600000
+ TpSlOrderFields:
+ type: object
+ description: TP/SL-specific fields surfaced alongside the regular order shape.
+ required:
+ - kind
+ - scope
+ - trp
+ properties:
+ kind:
+ $ref: '#/components/schemas/kind'
+ scope:
+ $ref: '#/components/schemas/tr_scope'
+ trp:
+ $ref: '#/components/schemas/trp'
+ parent_oid:
+ $ref: '#/components/schemas/parent_oid'
+ armed_qty:
+ $ref: '#/components/schemas/qty'
+ description: >-
+ Quantity armed at attach time (OCO) or `"0"` for position-based
+ (sized at trigger time).
+ slip_bps:
+ $ref: '#/components/schemas/slip_bps'
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ kind:
+ type: string
+ description: Conditional order type (TakeProfit / StopLoss)
+ enum:
+ - tp
+ - sl
+ tr_scope:
+ type: string
+ description: >
+ How the conditional order sizes itself.
+
+ - `order` - child of a parent entry (bracket / OCO ladder). Quantity is
+ required.
+
+ - `position` - attached to an open position. v1 always closes the full
+ position (`qty` must be `"0"`).
+ enum:
+ - order
+ - position
+ trp:
+ type: string
+ description: Trigger price
+ example: '110.00'
+ parent_oid:
+ type: integer
+ description: >-
+ Parent entry order id. Optional — omit it (do not send `0`) when the
+ parent is created in the same request (inline `CreateOrder.tpsl` or
+ `CreateTpSlArgs.parent`); the gateway auto-wires the child to it. Set it
+ only to attach an order-scoped leg to an existing resting order. Inline
+ `CreateOrder.tpsl` rejects a non-zero value; position-scoped legs carry
+ no parent.
+ example: 1234567890
+ slip_bps:
+ type: integer
+ minimum: 0
+ maximum: 10000
+ description: >-
+ Per-order market-trigger slippage cap in basis points. 0 = use the
+ per-instrument default. Clamped to the instrument cap.
+ example: 1000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-pnl.md b/PolymarketDocumentation-main/docs/api-reference/get-pnl.md
new file mode 100644
index 0000000..0d2dab3
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-pnl.md
@@ -0,0 +1,248 @@
+> ## 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 PnL
+
+> Get PnL history for the authenticated account.
+If no end time is provided, the current time will be used.
+Maximum of 1000 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/pnl
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/pnl:
+ get:
+ summary: Get PnL
+ description: |
+ Get PnL history for the authenticated account.
+ If no end time is provided, the current time will be used.
+ Maximum of 1000 entries returned per request.
+ operationId: getPnlHistory
+ parameters:
+ - name: interval
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/pnl_interval'
+ - name: start_timestamp
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: PnL history response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PnlHistory'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ pnl_interval:
+ type: string
+ description: PnL interval
+ enum:
+ - 1h
+ - 4h
+ - 1d
+ - 1w
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ PnlHistory:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ description: |
+ - `1767225600000` - Timestamp
+ - `"100.50"` - PnL
+ items:
+ type: array
+ example:
+ - 1767225600000
+ - '100.50'
+ maxItems: 1000
+ more:
+ $ref: '#/components/schemas/more'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-portfolio.md b/PolymarketDocumentation-main/docs/api-reference/get-portfolio.md
new file mode 100644
index 0000000..1558fc9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-portfolio.md
@@ -0,0 +1,350 @@
+> ## 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 Portfolio
+
+> Get current portfolio snapshot including open positions, margin summary, and withdrawable balance.
+
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/portfolio
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/portfolio:
+ get:
+ summary: Get Portfolio
+ description: >
+ Get current portfolio snapshot including open positions, margin summary,
+ and withdrawable balance.
+ operationId: getPortfolio
+ responses:
+ '200':
+ description: Portfolio response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Portfolio'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ Portfolio:
+ type: object
+ required:
+ - positions
+ - margin
+ - withdrawable
+ - in_liquidation
+ - timestamp
+ properties:
+ positions:
+ type: array
+ items:
+ $ref: '#/components/schemas/PortfolioPosition'
+ margin:
+ $ref: '#/components/schemas/MarginSummary'
+ withdrawable:
+ $ref: '#/components/schemas/withdrawable'
+ in_liquidation:
+ $ref: '#/components/schemas/in_liquidation'
+ timestamp:
+ $ref: '#/components/schemas/update_timestamp'
+ PortfolioPosition:
+ type: object
+ required:
+ - instrument_id
+ - symbol
+ - size
+ - entry_price
+ - leverage
+ - cross
+ - initial_margin
+ - maintenance_margin
+ - position_value
+ - liquidation_price
+ - unrealized_pnl
+ - return_on_equity
+ - cumulative_funding
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/instrument_id'
+ symbol:
+ $ref: '#/components/schemas/symbol'
+ size:
+ $ref: '#/components/schemas/size'
+ entry_price:
+ $ref: '#/components/schemas/entry_price'
+ leverage:
+ $ref: '#/components/schemas/leverage'
+ cross:
+ $ref: '#/components/schemas/cross'
+ initial_margin:
+ $ref: '#/components/schemas/initial_margin'
+ maintenance_margin:
+ $ref: '#/components/schemas/maintenance_margin_amount'
+ position_value:
+ $ref: '#/components/schemas/position_value'
+ liquidation_price:
+ $ref: '#/components/schemas/liquidation_price'
+ unrealized_pnl:
+ $ref: '#/components/schemas/unrealized_pnl'
+ return_on_equity:
+ $ref: '#/components/schemas/return_on_equity'
+ cumulative_funding:
+ $ref: '#/components/schemas/cumulative_funding'
+ MarginSummary:
+ type: object
+ required:
+ - total_account_value
+ - total_initial_margin
+ - total_maintenance_margin
+ - total_position_value
+ properties:
+ total_account_value:
+ $ref: '#/components/schemas/total_account_value'
+ total_initial_margin:
+ $ref: '#/components/schemas/total_initial_margin'
+ total_maintenance_margin:
+ $ref: '#/components/schemas/total_maintenance_margin'
+ total_position_value:
+ $ref: '#/components/schemas/total_position_value'
+ withdrawable:
+ type: string
+ description: Withdrawable balance in USD
+ example: '13104.51'
+ in_liquidation:
+ type: boolean
+ description: Whether the account is currently under liquidation
+ update_timestamp:
+ type: integer
+ description: Update timestamp in milliseconds
+ example: 1767225600000
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ symbol:
+ type: string
+ description: Instrument symbol
+ example: NVDA-USDC
+ size:
+ type: string
+ description: >-
+ Signed position size in no. of contracts (positive = long, negative =
+ short)
+ example: '10.00'
+ entry_price:
+ type: string
+ description: Average entry price
+ example: '2986.30'
+ leverage:
+ type: integer
+ description: Leverage
+ example: 10
+ cross:
+ type: boolean
+ description: Whether to use cross margin mode
+ initial_margin:
+ type: string
+ description: Initial margin in USD
+ example: '10.00'
+ maintenance_margin_amount:
+ type: string
+ description: Maintenance margin amount
+ example: '100.00'
+ position_value:
+ type: string
+ description: Notional position value in USD
+ example: '100.03'
+ liquidation_price:
+ type: string
+ description: Liquidation price
+ example: '2866.27'
+ unrealized_pnl:
+ type: string
+ description: Unrealized PnL in USD
+ example: '-0.01'
+ return_on_equity:
+ type: string
+ description: Return on equity as a decimal
+ example: '-0.0027'
+ cumulative_funding:
+ type: string
+ description: Cumulative funding paid/received in USD
+ example: '514.09'
+ total_account_value:
+ type: string
+ description: Total account value in USD (equity + unrealized PnL)
+ example: '13109.48'
+ total_initial_margin:
+ type: string
+ description: Total initial margin in use across all positions
+ example: '4.97'
+ total_maintenance_margin:
+ type: string
+ description: Total maintenance margin across all positions
+ example: '2.49'
+ total_position_value:
+ type: string
+ description: Total notional position value in USD
+ example: '100.03'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-public-portfolio.md b/PolymarketDocumentation-main/docs/api-reference/get-public-portfolio.md
new file mode 100644
index 0000000..bed1da3
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-public-portfolio.md
@@ -0,0 +1,232 @@
+> ## 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 Public Portfolio
+
+> Get public portfolio for an address including equity and open positions.
+
+
+Request Weight: **5**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/portfolio
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/portfolio:
+ get:
+ summary: Get Public Portfolio
+ description: |
+ Get public portfolio for an address including equity and open positions.
+ operationId: getPublicPortfolio
+ parameters:
+ - name: address
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/address'
+ responses:
+ '200':
+ description: Public portfolio response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PublicPortfolio'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ address:
+ type: string
+ description: Address
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ PublicPortfolio:
+ type: object
+ required:
+ - positions
+ - equity
+ - timestamp
+ properties:
+ positions:
+ type: array
+ items:
+ $ref: '#/components/schemas/PublicPortfolioPosition'
+ equity:
+ $ref: '#/components/schemas/equity'
+ timestamp:
+ $ref: '#/components/schemas/update_timestamp'
+ PublicPortfolioPosition:
+ type: object
+ required:
+ - instrument_id
+ - symbol
+ - size
+ - entry_price
+ - unrealized_pnl
+ - return_on_equity
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/instrument_id'
+ symbol:
+ $ref: '#/components/schemas/symbol'
+ size:
+ $ref: '#/components/schemas/size'
+ entry_price:
+ $ref: '#/components/schemas/entry_price'
+ unrealized_pnl:
+ $ref: '#/components/schemas/unrealized_pnl'
+ return_on_equity:
+ $ref: '#/components/schemas/return_on_equity'
+ equity:
+ type: string
+ description: Equity in USD
+ example: '10000.00'
+ update_timestamp:
+ type: integer
+ description: Update timestamp in milliseconds
+ example: 1767225600000
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ symbol:
+ type: string
+ description: Instrument symbol
+ example: NVDA-USDC
+ size:
+ type: string
+ description: >-
+ Signed position size in no. of contracts (positive = long, negative =
+ short)
+ example: '10.00'
+ entry_price:
+ type: string
+ description: Average entry price
+ example: '2986.30'
+ unrealized_pnl:
+ type: string
+ description: Unrealized PnL in USD
+ example: '-0.01'
+ return_on_equity:
+ type: string
+ description: Return on equity as a decimal
+ example: '-0.0027'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-recent-trades.md b/PolymarketDocumentation-main/docs/api-reference/get-recent-trades.md
new file mode 100644
index 0000000..737a2ea
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-recent-trades.md
@@ -0,0 +1,256 @@
+> ## 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 Recent Trades
+
+> Get public trades for an instrument.
+Maximum of 100 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/trades
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/trades:
+ get:
+ summary: Get Recent Trades
+ description: |
+ Get public trades for an instrument.
+ Maximum of 100 entries returned per request.
+ operationId: getTrades
+ parameters:
+ - name: instrument_id
+ in: query
+ required: true
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Trades response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Trades'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ Trades:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/TradeData'
+ description: Public trades for the instrument
+ more:
+ $ref: '#/components/schemas/more'
+ TradeData:
+ type: object
+ required:
+ - trade_id
+ - instrument_id
+ - side
+ - price
+ - quantity
+ - timestamp
+ - hash
+ properties:
+ trade_id:
+ $ref: '#/components/schemas/tid'
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ side:
+ $ref: '#/components/schemas/side'
+ price:
+ $ref: '#/components/schemas/p'
+ quantity:
+ $ref: '#/components/schemas/qty'
+ timestamp:
+ $ref: '#/components/schemas/ts'
+ hash:
+ $ref: '#/components/schemas/hash'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ tid:
+ type: integer
+ description: Trade ID
+ example: 1
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ side:
+ type: string
+ description: Side
+ enum:
+ - long
+ - short
+ p:
+ type: string
+ description: Price
+ example: '100.00'
+ qty:
+ type: string
+ description: Quantity in no. of contracts
+ example: '10.00'
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ hash:
+ type: string
+ description: On-chain transaction hash, "0x" if not yet mined
+ default: 0x
+ example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-server-time.md b/PolymarketDocumentation-main/docs/api-reference/get-server-time.md
new file mode 100644
index 0000000..9bd604b
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-server-time.md
@@ -0,0 +1,139 @@
+> ## 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 Server Time
+
+> Get server time.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/time
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/time:
+ get:
+ summary: Get Server Time
+ description: |
+ Get server time.
+ operationId: getTime
+ responses:
+ '200':
+ description: Successful time response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Time'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ Time:
+ type: object
+ required:
+ - time
+ properties:
+ time:
+ $ref: '#/components/schemas/time'
+ time:
+ type: integer
+ description: Timestamp in milliseconds
+ example: 1767225600000
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-statistics.md b/PolymarketDocumentation-main/docs/api-reference/get-statistics.md
new file mode 100644
index 0000000..0377284
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-statistics.md
@@ -0,0 +1,195 @@
+> ## 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 Statistics
+
+> Get last 24-hour statistics for all instruments.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/statistics
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/statistics:
+ get:
+ summary: Get Statistics
+ description: Get last 24-hour statistics for all instruments.
+ operationId: getStatistics
+ parameters:
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ responses:
+ '200':
+ description: Statistics response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Statistic'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ Statistic:
+ type: object
+ required:
+ - instrument_id
+ - symbol
+ - volume
+ - open_price
+ - klines
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ symbol:
+ $ref: '#/components/schemas/symbol'
+ volume:
+ $ref: '#/components/schemas/volume'
+ open_price:
+ $ref: '#/components/schemas/open_price'
+ klines:
+ $ref: '#/components/schemas/klines'
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ symbol:
+ type: string
+ description: Instrument symbol
+ example: NVDA-USDC
+ volume:
+ type: string
+ description: 24-hour trading volume in contracts
+ example: '1000.00'
+ open_price:
+ type: string
+ description: Opening price from 24 hours ago
+ example: '100.50'
+ klines:
+ type: array
+ items:
+ $ref: '#/components/schemas/kline'
+ description: Last 24-hour kline data
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ kline:
+ type: array
+ description: |
+ - `1767225600000` - Open time
+ - `"100.00"` - Open price
+ - `"105.00"` - High price
+ - `"99.00"` - Low price
+ - `"102.00"` - Close price
+ - `"500.00"` - Volume (base unit)
+ - `42` - Number of trades
+ example:
+ - 1767225600000
+ - '100.00'
+ - '105.00'
+ - '99.00'
+ - '102.00'
+ - '500.00'
+ - 42
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-tickers.md b/PolymarketDocumentation-main/docs/api-reference/get-tickers.md
new file mode 100644
index 0000000..56213db
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-tickers.md
@@ -0,0 +1,213 @@
+> ## 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 Tickers
+
+> Get all instrument tickers with live market data.
+
+Request Weight: **2**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/tickers
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/tickers:
+ get:
+ summary: Get Tickers
+ description: Get all instrument tickers with live market data.
+ operationId: getTickers
+ parameters:
+ - name: instrument_id
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/instrument_id'
+ responses:
+ '200':
+ description: Tickers response.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Ticker'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ instrument_id:
+ type: integer
+ description: Instrument ID
+ Ticker:
+ allOf:
+ - $ref: '#/components/schemas/TickerData'
+ - type: object
+ required:
+ - timestamp
+ properties:
+ timestamp:
+ $ref: '#/components/schemas/timestamp'
+ TickerData:
+ type: object
+ required:
+ - instrument_id
+ - symbol
+ - index_price
+ - mark_price
+ - last_price
+ - mid_price
+ - open_interest
+ - funding_rate
+ - next_funding
+ properties:
+ instrument_id:
+ $ref: '#/components/schemas/instrument_id'
+ symbol:
+ $ref: '#/components/schemas/symbol'
+ index_price:
+ $ref: '#/components/schemas/index_price'
+ mark_price:
+ $ref: '#/components/schemas/mark_price'
+ last_price:
+ $ref: '#/components/schemas/last_price'
+ mid_price:
+ $ref: '#/components/schemas/mid_price'
+ open_interest:
+ $ref: '#/components/schemas/open_interest'
+ funding_rate:
+ $ref: '#/components/schemas/funding_rate'
+ next_funding:
+ $ref: '#/components/schemas/next_funding'
+ timestamp:
+ type: integer
+ description: Timestamp in milliseconds
+ example: 1767225600000
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ symbol:
+ type: string
+ description: Instrument symbol
+ example: NVDA-USDC
+ index_price:
+ type: string
+ description: Index price
+ example: '100.00'
+ mark_price:
+ type: string
+ description: Mark price
+ example: '100.00'
+ last_price:
+ type: string
+ description: Last traded price
+ example: '100.00'
+ mid_price:
+ type: string
+ description: Mid price
+ example: '100.00'
+ open_interest:
+ type: string
+ description: Open interest in number of contracts
+ example: '10.00'
+ funding_rate:
+ type: string
+ description: Funding rate
+ example: '0.0001'
+ next_funding:
+ type: integer
+ description: Next funding timestamp in milliseconds
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/get-withdrawals.md b/PolymarketDocumentation-main/docs/api-reference/get-withdrawals.md
new file mode 100644
index 0000000..75d6657
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/get-withdrawals.md
@@ -0,0 +1,325 @@
+> ## 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 Withdrawals
+
+> Get withdrawal history for the authenticated account.
+If no end time is provided, the current time will be used.
+Maximum of 100 entries returned per request.
+
+
+Request Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/account/withdrawals
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/withdrawals:
+ get:
+ summary: Get Withdrawals
+ description: |
+ Get withdrawal history for the authenticated account.
+ If no end time is provided, the current time will be used.
+ Maximum of 100 entries returned per request.
+ operationId: getWithdrawals
+ parameters:
+ - name: withdrawal_status
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/withdrawal_status'
+ - name: hash
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/hash'
+ - name: start_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/start_timestamp'
+ - name: end_timestamp
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/end_timestamp'
+ responses:
+ '200':
+ description: Withdrawal history response.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Withdrawals'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '401':
+ $ref: '#/components/responses/Error401Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security:
+ - polymarket_proxy: []
+ polymarket_secret: []
+components:
+ schemas:
+ withdrawal_status:
+ type: string
+ description: Withdrawal status
+ enum:
+ - pending
+ - confirmed
+ - removed
+ - failed
+ hash:
+ type: string
+ description: On-chain transaction hash, "0x" if not yet mined
+ default: 0x
+ example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
+ start_timestamp:
+ type: integer
+ description: Start timestamp in milliseconds
+ example: 1767225600000
+ end_timestamp:
+ type: integer
+ description: End timestamp in milliseconds
+ example: 1767229200000
+ Withdrawals:
+ type: object
+ required:
+ - data
+ - more
+ properties:
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Withdrawal'
+ more:
+ $ref: '#/components/schemas/more'
+ Withdrawal:
+ type: object
+ required:
+ - withdraw_id
+ - asset
+ - amount
+ - fee
+ - status
+ - to
+ - hash
+ - confirmations
+ - required_confirmations
+ - created_timestamp
+ properties:
+ withdraw_id:
+ $ref: '#/components/schemas/withdraw_id'
+ asset:
+ $ref: '#/components/schemas/asset'
+ amount:
+ $ref: '#/components/schemas/amount'
+ to:
+ $ref: '#/components/schemas/to'
+ fee:
+ $ref: '#/components/schemas/withdrawal_fee'
+ status:
+ $ref: '#/components/schemas/withdrawal_status'
+ hash:
+ $ref: '#/components/schemas/hash'
+ confirmations:
+ $ref: '#/components/schemas/confirmations'
+ required_confirmations:
+ $ref: '#/components/schemas/required_confirmations'
+ created_timestamp:
+ $ref: '#/components/schemas/created_timestamp'
+ confirmed_timestamp:
+ $ref: '#/components/schemas/confirmed_timestamp'
+ more:
+ type: boolean
+ description: More data available
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error401:
+ title: Error401
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ withdraw_id:
+ type: integer
+ description: Withdraw ID
+ asset:
+ type: string
+ description: Asset name
+ example: USDC
+ amount:
+ type: string
+ description: >-
+ Raw token amount including decimals. For withdrawals this matches the
+ uint256 amount in the EIP-712 signature (e.g. "100000000" for 100 USDC
+ with 6 decimals).
+ example: '100000000'
+ to:
+ type: string
+ description: Destination address in hex format
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ withdrawal_fee:
+ type: string
+ description: Withdrawal transaction fee in decimalized asset units
+ example: '5.00'
+ confirmations:
+ type: integer
+ description: Number of block confirmations
+ example: 12
+ required_confirmations:
+ type: integer
+ description: Required number of block confirmations
+ example: 12
+ created_timestamp:
+ type: integer
+ description: Creation timestamp in milliseconds
+ example: 1767225600000
+ confirmed_timestamp:
+ type: integer
+ description: Confirmation timestamp in milliseconds
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error401Response:
+ description: >
+ Unauthorized — missing or invalid `POLYMARKET-PROXY` /
+ `POLYMARKET-SECRET`
+
+ credentials. `error` is `unauthorized`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error401'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ securitySchemes:
+ polymarket_proxy:
+ type: apiKey
+ name: POLYMARKET-PROXY
+ in: header
+ description: Proxy address
+ polymarket_secret:
+ type: apiKey
+ name: POLYMARKET-SECRET
+ in: header
+ description: Correponding proxy secret
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/internal-transfer.md b/PolymarketDocumentation-main/docs/api-reference/internal-transfer.md
new file mode 100644
index 0000000..4b0580b
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/internal-transfer.md
@@ -0,0 +1,304 @@
+> ## 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.
+
+# Internal Transfer
+
+> Submit a signed internal ledger transfer between two exchange accounts.
+Requires proxy signature using the standard signed-op flow.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json post /v1/account/internal-transfer
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/internal-transfer:
+ post:
+ summary: Internal Transfer
+ description: |
+ Submit a signed internal ledger transfer between two exchange accounts.
+ Requires proxy signature using the standard signed-op flow.
+ operationId: internalTransfer
+ requestBody:
+ description: Internal transfer request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InternalTransferRequest'
+ examples:
+ transfer:
+ summary: Transfer USDC to another account
+ value:
+ op:
+ type: internalTransfer
+ args:
+ account: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
+ token: '0xaf88d065e77c8cc2239327c5edb3a432268e5831'
+ amount: '100.00'
+ to: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ sig: >-
+ 0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c
+ salt: 555555555
+ ts: 1767000014000
+ label: ops-rebalance
+ responses:
+ '200':
+ description: The accepted transfer, carrying its `transfer_id`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InternalTransferAccepted'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '422':
+ description: |
+ The transfer was rejected on its merits (e.g. insufficient balance,
+ transfer to self). The body carries `transfer_id` and `error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InternalTransferRejected'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ InternalTransferRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpInternalTransfer'
+ - $ref: '#/components/schemas/BaseOp'
+ - type: object
+ properties:
+ label:
+ $ref: '#/components/schemas/label'
+ InternalTransferAccepted:
+ type: object
+ required:
+ - status
+ - transfer_id
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ transfer_id:
+ $ref: '#/components/schemas/transfer_id'
+ InternalTransferRejected:
+ type: object
+ required:
+ - status
+ - transfer_id
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ transfer_id:
+ $ref: '#/components/schemas/transfer_id'
+ error:
+ $ref: '#/components/schemas/error'
+ OpInternalTransfer:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - internalTransfer
+ args:
+ type: object
+ required:
+ - account
+ - token
+ - amount
+ - to
+ properties:
+ account:
+ $ref: '#/components/schemas/account'
+ token:
+ $ref: '#/components/schemas/token'
+ amount:
+ $ref: '#/components/schemas/amount'
+ to:
+ $ref: '#/components/schemas/to'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ label:
+ type: string
+ description: Human-readable label for a proxy key or internal transfer
+ example: trading-bot
+ transfer_id:
+ type: integer
+ description: Internal transfer ID
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ account:
+ type: string
+ description: Account address in hex format
+ example: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
+ token:
+ type: string
+ description: Token contract address in hex format
+ example: '0xaf88d065e77c8cc2239327c5edb3a432268e5831'
+ amount:
+ type: string
+ description: >-
+ Raw token amount including decimals. For withdrawals this matches the
+ uint256 amount in the EIP-712 signature (e.g. "100000000" for 100 USDC
+ with 6 decimals).
+ example: '100000000'
+ to:
+ type: string
+ description: Destination address in hex format
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/introduction.md b/PolymarketDocumentation-main/docs/api-reference/introduction.md
new file mode 100644
index 0000000..003f8c4
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/introduction.md
@@ -0,0 +1,59 @@
+> ## 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.
+
+# Introduction
+
+> Overview of the Polymarket APIs
+
+The Polymarket API provides programmatic access to the world's largest prediction market. The platform is served by three separate APIs, each handling a different domain.
+
+***
+
+## APIs
+
+
+
+ **`https://gamma-api.polymarket.com`**
+
+ Markets, events, tags, series, comments, sports, search, and public profiles. This is the primary API for discovering and browsing market data.
+
+
+
+ **`https://data-api.polymarket.com`**
+
+ User positions, trades, activity, holder data, open interest, leaderboards, and builder analytics.
+
+
+
+ **`https://clob.polymarket.com`**
+
+ Orderbook data, pricing, midpoints, spreads, and price history. Also handles order placement, cancellation, and other trading operations. Trading endpoints require [authentication](/api-reference/authentication).
+
+
+
+
+ A separate **Bridge API** (`https://bridge.polymarket.com`) handles deposits and withdrawals. Bridges are not handled by Polymarket, it is a proxy of fun.xyz service.
+
+
+***
+
+## Authentication
+
+The Gamma API and Data API are fully public — no authentication required.
+
+The CLOB API has both public endpoints (orderbook, prices) and authenticated endpoints (order management). See [Authentication](/api-reference/authentication) for details.
+
+***
+
+## Next Steps
+
+
+
+ Learn how to authenticate requests for trading endpoints.
+
+
+
+ Official TypeScript, Python, and Rust libraries.
+
+
diff --git a/PolymarketDocumentation-main/docs/api-reference/maker/cancel-a-quote.md b/PolymarketDocumentation-main/docs/api-reference/maker/cancel-a-quote.md
new file mode 100644
index 0000000..9ecc49b
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/maker/cancel-a-quote.md
@@ -0,0 +1,435 @@
+> ## 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.
+
+# Cancel a quote
+
+> Cancel an active maker quote before it is selected. Requires CLOB L2
+authentication for the maker role. `signer_address` and `maker_address`
+must match the authenticated identity.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/combos-rfq-openapi.yaml post /v1/maker/quotes/cancel
+openapi: 3.1.0
+info:
+ title: Polymarket Combinatorial RFQ API
+ description: >
+ REST API for the combinatorial RFQ (Request for Quote) system.
+
+
+ This spec covers the publicly documented endpoints used by quoters (market
+
+ makers): the combo-market catalog and the authenticated maker commands for
+
+ submitting, cancelling, and confirming quotes.
+
+
+ Conventions:
+
+ - All `*_e6` fields are six-decimal fixed-point values encoded as
+ **strings**
+ to avoid number precision issues.
+ - All timestamps are **Unix milliseconds** (integer); zero/omitted means
+ unset.
+
+ - Errors return an HTTP status code with a body of the form `{ "error":
+ "..." }`.
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://combos-rfq-api.polymarket.com
+ description: Production combinatorial RFQ API
+security: []
+tags:
+ - name: Combo Markets
+ description: Public catalog of markets that can be used as combo legs
+ - name: Maker
+ description: Authenticated quoter (maker) commands
+paths:
+ /v1/maker/quotes/cancel:
+ post:
+ tags:
+ - Maker
+ summary: Cancel a quote
+ description: |
+ Cancel an active maker quote before it is selected. Requires CLOB L2
+ authentication for the maker role. `signer_address` and `maker_address`
+ must match the authenticated identity.
+ operationId: cancelMakerQuote
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelQuoteRequest'
+ example:
+ rfq_id: rfq_
+ quote_id: quote_
+ signer_address: 0xYourSigner
+ maker_address: 0xYourQuoterWallet
+ signature_type: 0
+ responses:
+ '200':
+ description: Current RFQ snapshot after the cancellation was applied
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RFQSnapshot'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '429':
+ $ref: '#/components/responses/TooManyRequests'
+ '503':
+ $ref: '#/components/responses/ServiceUnavailable'
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ CancelQuoteRequest:
+ type: object
+ properties:
+ rfq_id:
+ type: string
+ example: rfq_
+ quote_id:
+ type: string
+ example: quote_
+ signer_address:
+ type: string
+ description: Must match the authenticated `signer_address`.
+ example: 0xYourSigner
+ maker_address:
+ type: string
+ description: Must match the authenticated `maker_address`.
+ example: 0xYourQuoterWallet
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ required:
+ - rfq_id
+ - quote_id
+ - signer_address
+ - maker_address
+ - signature_type
+ RFQSnapshot:
+ type: object
+ description: Point-in-time view of an RFQ and its competition/confirmation windows.
+ properties:
+ request:
+ $ref: '#/components/schemas/RFQRequest'
+ status:
+ $ref: '#/components/schemas/RFQStatus'
+ competition_started_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ competition_ends_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ confirmation_started_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ confirmation_ends_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ quote_id:
+ type: string
+ bundle:
+ $ref: '#/components/schemas/FillBundle'
+ maker_confirmations:
+ type: array
+ items:
+ $ref: '#/components/schemas/MakerConfirmationSnapshot'
+ required:
+ - request
+ - status
+ SignatureType:
+ type: integer
+ description: |
+ CLOB signature type:
+ - `0` EOA
+ - `1` POLY_PROXY
+ - `2` GNOSIS_SAFE
+ - `3` POLY_1271
+ enum:
+ - 0
+ - 1
+ - 2
+ - 3
+ example: 0
+ RFQRequest:
+ type: object
+ description: The RFQ request as stored by the engine.
+ properties:
+ rfq_id:
+ type: string
+ auth_address:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ requestor_public_id:
+ type: string
+ leg_position_ids:
+ type: array
+ items:
+ type: string
+ condition_id:
+ type: string
+ yes_position_id:
+ type: string
+ no_position_id:
+ type: string
+ direction:
+ $ref: '#/components/schemas/Direction'
+ side:
+ $ref: '#/components/schemas/Side'
+ requested_size:
+ $ref: '#/components/schemas/RequestedSize'
+ created_at:
+ type: integer
+ format: int64
+ description: Creation time in Unix milliseconds.
+ required:
+ - rfq_id
+ - leg_position_ids
+ - direction
+ - side
+ RFQStatus:
+ type: string
+ description: Lifecycle status of the RFQ
+ enum:
+ - CREATED
+ - COLLECTING_QUOTES
+ - AWAITING_REQUESTER_ACCEPTANCE
+ - AWAITING_MAKER_CONFIRMATION
+ - EXECUTING
+ - FILLED
+ - FAILED
+ - EXPIRED
+ - CANCELED
+ - REJECTED
+ FillBundle:
+ type: object
+ description: The selected executable bundle of maker allocations.
+ properties:
+ requested_shares_e6:
+ type: string
+ description: Requested share size in six-decimal fixed-point units.
+ requested_notional_e6:
+ type: string
+ description: Requested notional in six-decimal fixed-point units (BUY RFQs only).
+ blended_price_e6:
+ type: string
+ description: Blended bundle price in six-decimal fixed-point units.
+ allocations:
+ type: array
+ items:
+ $ref: '#/components/schemas/FillAllocation'
+ required:
+ - requested_shares_e6
+ - blended_price_e6
+ - allocations
+ MakerConfirmationSnapshot:
+ type: object
+ properties:
+ quote_id:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ decision:
+ type: string
+ enum:
+ - CONFIRM
+ - DECLINE
+ - TIMED_OUT
+ reason:
+ type: string
+ responded_at:
+ type: integer
+ format: int64
+ description: Response time in Unix milliseconds.
+ required:
+ - quote_id
+ - signer_address
+ - maker_address
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Human-readable error detail
+ required:
+ - error
+ Direction:
+ type: string
+ description: Requester trade direction
+ enum:
+ - BUY
+ - SELL
+ Side:
+ type: string
+ description: Combinatorial position side. Currently only `YES` is supported.
+ enum:
+ - 'YES'
+ - 'NO'
+ RequestedSize:
+ type: object
+ description: Requested RFQ size and unit
+ properties:
+ unit:
+ type: string
+ description: >
+ `notional` for requester BUY RFQs and `shares` for requester SELL
+ RFQs.
+ enum:
+ - notional
+ - shares
+ value_e6:
+ type: string
+ description: Six-decimal fixed-point value encoded as a string.
+ example: '1000000'
+ required:
+ - unit
+ - value_e6
+ FillAllocation:
+ type: object
+ properties:
+ maker_quote_id:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ size_e6:
+ type: string
+ description: >-
+ Accepted fill size for this maker quote, in six-decimal fixed-point
+ units.
+ price_e6:
+ type: string
+ description: Fill price in six-decimal fixed-point units.
+ received_at:
+ type: integer
+ format: int64
+ description: Receipt time in Unix milliseconds.
+ required:
+ - maker_quote_id
+ - signer_address
+ - maker_address
+ - size_e6
+ - price_e6
+ responses:
+ BadRequest:
+ description: >-
+ Invalid request (malformed JSON, invalid parameters, or failed
+ validation)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid quote
+ Unauthorized:
+ description: Missing or invalid CLOB L2 authentication
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: unauthenticated
+ Forbidden:
+ description: >-
+ Authenticated identity does not match the request, or role is not
+ allowed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: auth address mismatch
+ NotFound:
+ description: The referenced RFQ is not active or no longer exists
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: unknown rfq
+ Conflict:
+ description: The RFQ is not in a state that accepts this command
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: competition window closed
+ TooManyRequests:
+ description: Rate limited
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: rate limited
+ ServiceUnavailable:
+ description: An RFQ service dependency is temporarily unavailable
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: service unavailable
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: CLOB API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Wallet address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC-SHA256 signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: CLOB API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/maker/confirm-or-decline-last-look.md b/PolymarketDocumentation-main/docs/api-reference/maker/confirm-or-decline-last-look.md
new file mode 100644
index 0000000..613467c
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/maker/confirm-or-decline-last-look.md
@@ -0,0 +1,669 @@
+> ## 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.
+
+# Confirm or decline last look
+
+> Respond to a last-look confirmation request for a selected quote. Requires
+CLOB L2 authentication for the maker role. `decision` must be `CONFIRM` or
+`DECLINE`.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/combos-rfq-openapi.yaml post /v1/maker/confirmations
+openapi: 3.1.0
+info:
+ title: Polymarket Combinatorial RFQ API
+ description: >
+ REST API for the combinatorial RFQ (Request for Quote) system.
+
+
+ This spec covers the publicly documented endpoints used by quoters (market
+
+ makers): the combo-market catalog and the authenticated maker commands for
+
+ submitting, cancelling, and confirming quotes.
+
+
+ Conventions:
+
+ - All `*_e6` fields are six-decimal fixed-point values encoded as
+ **strings**
+ to avoid number precision issues.
+ - All timestamps are **Unix milliseconds** (integer); zero/omitted means
+ unset.
+
+ - Errors return an HTTP status code with a body of the form `{ "error":
+ "..." }`.
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://combos-rfq-api.polymarket.com
+ description: Production combinatorial RFQ API
+security: []
+tags:
+ - name: Combo Markets
+ description: Public catalog of markets that can be used as combo legs
+ - name: Maker
+ description: Authenticated quoter (maker) commands
+paths:
+ /v1/maker/confirmations:
+ post:
+ tags:
+ - Maker
+ summary: Confirm or decline last look
+ description: >
+ Respond to a last-look confirmation request for a selected quote.
+ Requires
+
+ CLOB L2 authentication for the maker role. `decision` must be `CONFIRM`
+ or
+
+ `DECLINE`.
+ operationId: submitMakerConfirmation
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MakerConfirmationRequest'
+ example:
+ rfq_id: rfq_
+ quote_id: quote_
+ signer_address: 0xYourSigner
+ maker_address: 0xYourQuoterWallet
+ signature_type: 0
+ decision: CONFIRM
+ responses:
+ '200':
+ description: Result of the confirmation — a snapshot and/or an execution handoff
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MakerConfirmationResult'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '429':
+ $ref: '#/components/responses/TooManyRequests'
+ '503':
+ $ref: '#/components/responses/ServiceUnavailable'
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ MakerConfirmationRequest:
+ type: object
+ description: Maker last-look confirmation response.
+ properties:
+ rfq_id:
+ type: string
+ example: rfq_
+ quote_id:
+ type: string
+ example: quote_
+ signer_address:
+ type: string
+ example: 0xYourSigner
+ maker_address:
+ type: string
+ example: 0xYourQuoterWallet
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ decision:
+ type: string
+ description: Confirmation decision.
+ enum:
+ - CONFIRM
+ - DECLINE
+ required:
+ - rfq_id
+ - quote_id
+ - signer_address
+ - maker_address
+ - signature_type
+ - decision
+ MakerConfirmationResult:
+ type: object
+ description: >
+ Result of a maker confirmation. Includes a snapshot, an execution
+ handoff,
+
+ or both, depending on whether the confirmation completed the bundle.
+ properties:
+ snapshot:
+ $ref: '#/components/schemas/RFQSnapshot'
+ execution:
+ $ref: '#/components/schemas/ExecutionHandoff'
+ SignatureType:
+ type: integer
+ description: |
+ CLOB signature type:
+ - `0` EOA
+ - `1` POLY_PROXY
+ - `2` GNOSIS_SAFE
+ - `3` POLY_1271
+ enum:
+ - 0
+ - 1
+ - 2
+ - 3
+ example: 0
+ RFQSnapshot:
+ type: object
+ description: Point-in-time view of an RFQ and its competition/confirmation windows.
+ properties:
+ request:
+ $ref: '#/components/schemas/RFQRequest'
+ status:
+ $ref: '#/components/schemas/RFQStatus'
+ competition_started_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ competition_ends_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ confirmation_started_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ confirmation_ends_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ quote_id:
+ type: string
+ bundle:
+ $ref: '#/components/schemas/FillBundle'
+ maker_confirmations:
+ type: array
+ items:
+ $ref: '#/components/schemas/MakerConfirmationSnapshot'
+ required:
+ - request
+ - status
+ ExecutionHandoff:
+ type: object
+ description: Handoff produced when a confirmed RFQ is ready for onchain execution.
+ properties:
+ execution_id:
+ type: string
+ request:
+ $ref: '#/components/schemas/RFQRequest'
+ quote_id:
+ type: string
+ bundle:
+ $ref: '#/components/schemas/FillBundle'
+ requester_acceptance:
+ $ref: '#/components/schemas/RequesterAcceptance'
+ maker_quotes:
+ type: array
+ items:
+ $ref: '#/components/schemas/Quote'
+ reservations:
+ type: array
+ items:
+ $ref: '#/components/schemas/WalletReservation'
+ ready_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ required:
+ - execution_id
+ - request
+ - quote_id
+ - bundle
+ - requester_acceptance
+ - maker_quotes
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Human-readable error detail
+ required:
+ - error
+ RFQRequest:
+ type: object
+ description: The RFQ request as stored by the engine.
+ properties:
+ rfq_id:
+ type: string
+ auth_address:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ requestor_public_id:
+ type: string
+ leg_position_ids:
+ type: array
+ items:
+ type: string
+ condition_id:
+ type: string
+ yes_position_id:
+ type: string
+ no_position_id:
+ type: string
+ direction:
+ $ref: '#/components/schemas/Direction'
+ side:
+ $ref: '#/components/schemas/Side'
+ requested_size:
+ $ref: '#/components/schemas/RequestedSize'
+ created_at:
+ type: integer
+ format: int64
+ description: Creation time in Unix milliseconds.
+ required:
+ - rfq_id
+ - leg_position_ids
+ - direction
+ - side
+ RFQStatus:
+ type: string
+ description: Lifecycle status of the RFQ
+ enum:
+ - CREATED
+ - COLLECTING_QUOTES
+ - AWAITING_REQUESTER_ACCEPTANCE
+ - AWAITING_MAKER_CONFIRMATION
+ - EXECUTING
+ - FILLED
+ - FAILED
+ - EXPIRED
+ - CANCELED
+ - REJECTED
+ FillBundle:
+ type: object
+ description: The selected executable bundle of maker allocations.
+ properties:
+ requested_shares_e6:
+ type: string
+ description: Requested share size in six-decimal fixed-point units.
+ requested_notional_e6:
+ type: string
+ description: Requested notional in six-decimal fixed-point units (BUY RFQs only).
+ blended_price_e6:
+ type: string
+ description: Blended bundle price in six-decimal fixed-point units.
+ allocations:
+ type: array
+ items:
+ $ref: '#/components/schemas/FillAllocation'
+ required:
+ - requested_shares_e6
+ - blended_price_e6
+ - allocations
+ MakerConfirmationSnapshot:
+ type: object
+ properties:
+ quote_id:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ decision:
+ type: string
+ enum:
+ - CONFIRM
+ - DECLINE
+ - TIMED_OUT
+ reason:
+ type: string
+ responded_at:
+ type: integer
+ format: int64
+ description: Response time in Unix milliseconds.
+ required:
+ - quote_id
+ - signer_address
+ - maker_address
+ RequesterAcceptance:
+ type: object
+ properties:
+ rfq_id:
+ type: string
+ quote_id:
+ type: string
+ auth_address:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ signed_order:
+ $ref: '#/components/schemas/ExchangeV3Order'
+ accepted_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ required:
+ - rfq_id
+ - quote_id
+ - signed_order
+ Quote:
+ type: object
+ description: A signed maker quote.
+ properties:
+ quote_id:
+ type: string
+ description: Maker-generated quote ID (required for REST submissions).
+ example: quote_
+ rfq_id:
+ type: string
+ description: RFQ ID from the `RFQ_REQUEST`.
+ example: rfq_
+ auth_address:
+ type: string
+ description: Derived from the authenticated session; ignored if provided.
+ readOnly: true
+ signer_address:
+ type: string
+ example: 0xYourSigner
+ maker_address:
+ type: string
+ example: 0xYourQuoterWallet
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ price_e6:
+ type: string
+ description: Quote price in six-decimal fixed-point units (must be positive).
+ example: '450000'
+ size_e6:
+ type: string
+ description: >
+ Fillable share count in six-decimal fixed-point units (must be
+ positive).
+
+ Note this differs from the request's size field, which may be
+ notional or shares.
+ example: '1000000'
+ valid_until:
+ type: integer
+ format: int64
+ description: Optional quote expiry in Unix milliseconds.
+ signed_order:
+ $ref: '#/components/schemas/ExchangeV3Order'
+ received_at:
+ type: integer
+ format: int64
+ description: Server-assigned receipt time in Unix milliseconds.
+ readOnly: true
+ required:
+ - quote_id
+ - rfq_id
+ - signer_address
+ - maker_address
+ - signature_type
+ - price_e6
+ - size_e6
+ - signed_order
+ WalletReservation:
+ type: object
+ properties:
+ action_id:
+ type: string
+ user:
+ type: string
+ wallet_nonce:
+ type: integer
+ format: int64
+ deltas:
+ type: array
+ items:
+ $ref: '#/components/schemas/WalletAssetDelta'
+ required:
+ - action_id
+ - user
+ - wallet_nonce
+ - deltas
+ Direction:
+ type: string
+ description: Requester trade direction
+ enum:
+ - BUY
+ - SELL
+ Side:
+ type: string
+ description: Combinatorial position side. Currently only `YES` is supported.
+ enum:
+ - 'YES'
+ - 'NO'
+ RequestedSize:
+ type: object
+ description: Requested RFQ size and unit
+ properties:
+ unit:
+ type: string
+ description: >
+ `notional` for requester BUY RFQs and `shares` for requester SELL
+ RFQs.
+ enum:
+ - notional
+ - shares
+ value_e6:
+ type: string
+ description: Six-decimal fixed-point value encoded as a string.
+ example: '1000000'
+ required:
+ - unit
+ - value_e6
+ FillAllocation:
+ type: object
+ properties:
+ maker_quote_id:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ size_e6:
+ type: string
+ description: >-
+ Accepted fill size for this maker quote, in six-decimal fixed-point
+ units.
+ price_e6:
+ type: string
+ description: Fill price in six-decimal fixed-point units.
+ received_at:
+ type: integer
+ format: int64
+ description: Receipt time in Unix milliseconds.
+ required:
+ - maker_quote_id
+ - signer_address
+ - maker_address
+ - size_e6
+ - price_e6
+ ExchangeV3Order:
+ type: object
+ description: >-
+ Signed Exchange v3 order. Combinatorial RFQ trades settle through
+ Exchange v3.
+ properties:
+ salt:
+ type: string
+ description: Order salt (uint256 as a decimal string)
+ maker:
+ type: string
+ description: Wallet that funds the order
+ example: 0xYourQuoterWallet
+ signer:
+ type: string
+ description: Address that signs the order
+ example: 0xYourSigner
+ tokenId:
+ type: string
+ description: YES or NO combo position ID (uint256 as a decimal string)
+ makerAmount:
+ type: string
+ description: >-
+ Amount the maker pays, in six-decimal base units (uint256 as a
+ string)
+ takerAmount:
+ type: string
+ description: >-
+ Amount the maker receives, in six-decimal base units (uint256 as a
+ string)
+ side:
+ type: integer
+ description: Order side — `0` BUY, `1` SELL
+ enum:
+ - 0
+ - 1
+ signatureType:
+ $ref: '#/components/schemas/SignatureType'
+ timestamp:
+ type: string
+ description: Order timestamp in Unix seconds (as a string)
+ metadata:
+ type: string
+ description: 32-byte hex field; defaults to the zero value
+ example: '0x0000000000000000000000000000000000000000000000000000000000000000'
+ builder:
+ type: string
+ description: 32-byte hex field; defaults to the zero value
+ example: '0x0000000000000000000000000000000000000000000000000000000000000000'
+ signature:
+ type: string
+ description: EIP-712 signature over the order
+ example: 0x...
+ required:
+ - salt
+ - maker
+ - signer
+ - tokenId
+ - makerAmount
+ - takerAmount
+ - side
+ - signatureType
+ - timestamp
+ - signature
+ WalletAssetDelta:
+ type: object
+ properties:
+ asset:
+ type: string
+ asset_id:
+ type: string
+ amount:
+ type: string
+ required:
+ - asset
+ - asset_id
+ - amount
+ responses:
+ BadRequest:
+ description: >-
+ Invalid request (malformed JSON, invalid parameters, or failed
+ validation)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid quote
+ Unauthorized:
+ description: Missing or invalid CLOB L2 authentication
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: unauthenticated
+ Forbidden:
+ description: >-
+ Authenticated identity does not match the request, or role is not
+ allowed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: auth address mismatch
+ NotFound:
+ description: The referenced RFQ is not active or no longer exists
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: unknown rfq
+ Conflict:
+ description: The RFQ is not in a state that accepts this command
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: competition window closed
+ TooManyRequests:
+ description: Rate limited
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: rate limited
+ ServiceUnavailable:
+ description: An RFQ service dependency is temporarily unavailable
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: service unavailable
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: CLOB API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Wallet address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC-SHA256 signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: CLOB API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/maker/submit-a-quote.md b/PolymarketDocumentation-main/docs/api-reference/maker/submit-a-quote.md
new file mode 100644
index 0000000..1c54104
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/maker/submit-a-quote.md
@@ -0,0 +1,550 @@
+> ## 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.
+
+# Submit a quote
+
+> Submit a signed maker quote for an active RFQ. Requires CLOB L2
+authentication for the maker role.
+
+REST does not assign a quote ID — generate `quote_id` client-side.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/combos-rfq-openapi.yaml post /v1/maker/quotes
+openapi: 3.1.0
+info:
+ title: Polymarket Combinatorial RFQ API
+ description: >
+ REST API for the combinatorial RFQ (Request for Quote) system.
+
+
+ This spec covers the publicly documented endpoints used by quoters (market
+
+ makers): the combo-market catalog and the authenticated maker commands for
+
+ submitting, cancelling, and confirming quotes.
+
+
+ Conventions:
+
+ - All `*_e6` fields are six-decimal fixed-point values encoded as
+ **strings**
+ to avoid number precision issues.
+ - All timestamps are **Unix milliseconds** (integer); zero/omitted means
+ unset.
+
+ - Errors return an HTTP status code with a body of the form `{ "error":
+ "..." }`.
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://combos-rfq-api.polymarket.com
+ description: Production combinatorial RFQ API
+security: []
+tags:
+ - name: Combo Markets
+ description: Public catalog of markets that can be used as combo legs
+ - name: Maker
+ description: Authenticated quoter (maker) commands
+paths:
+ /v1/maker/quotes:
+ post:
+ tags:
+ - Maker
+ summary: Submit a quote
+ description: |
+ Submit a signed maker quote for an active RFQ. Requires CLOB L2
+ authentication for the maker role.
+
+ REST does not assign a quote ID — generate `quote_id` client-side.
+ operationId: submitMakerQuote
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quote'
+ example:
+ quote_id: quote_
+ rfq_id: rfq_
+ signer_address: 0xYourSigner
+ maker_address: 0xYourQuoterWallet
+ signature_type: 0
+ price_e6: '450000'
+ size_e6: '1000000'
+ signed_order:
+ salt:
+ maker: 0xYourQuoterWallet
+ signer: 0xYourSigner
+ tokenId:
+ makerAmount:
+ takerAmount:
+ side: 0
+ signatureType: 0
+ timestamp:
+ metadata: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000000
+ builder: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000000
+ signature: 0x...
+ responses:
+ '200':
+ description: Current RFQ snapshot after the quote was accepted
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RFQSnapshot'
+ '400':
+ $ref: '#/components/responses/BadRequest'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '429':
+ $ref: '#/components/responses/TooManyRequests'
+ '503':
+ $ref: '#/components/responses/ServiceUnavailable'
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ Quote:
+ type: object
+ description: A signed maker quote.
+ properties:
+ quote_id:
+ type: string
+ description: Maker-generated quote ID (required for REST submissions).
+ example: quote_
+ rfq_id:
+ type: string
+ description: RFQ ID from the `RFQ_REQUEST`.
+ example: rfq_
+ auth_address:
+ type: string
+ description: Derived from the authenticated session; ignored if provided.
+ readOnly: true
+ signer_address:
+ type: string
+ example: 0xYourSigner
+ maker_address:
+ type: string
+ example: 0xYourQuoterWallet
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ price_e6:
+ type: string
+ description: Quote price in six-decimal fixed-point units (must be positive).
+ example: '450000'
+ size_e6:
+ type: string
+ description: >
+ Fillable share count in six-decimal fixed-point units (must be
+ positive).
+
+ Note this differs from the request's size field, which may be
+ notional or shares.
+ example: '1000000'
+ valid_until:
+ type: integer
+ format: int64
+ description: Optional quote expiry in Unix milliseconds.
+ signed_order:
+ $ref: '#/components/schemas/ExchangeV3Order'
+ received_at:
+ type: integer
+ format: int64
+ description: Server-assigned receipt time in Unix milliseconds.
+ readOnly: true
+ required:
+ - quote_id
+ - rfq_id
+ - signer_address
+ - maker_address
+ - signature_type
+ - price_e6
+ - size_e6
+ - signed_order
+ RFQSnapshot:
+ type: object
+ description: Point-in-time view of an RFQ and its competition/confirmation windows.
+ properties:
+ request:
+ $ref: '#/components/schemas/RFQRequest'
+ status:
+ $ref: '#/components/schemas/RFQStatus'
+ competition_started_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ competition_ends_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ confirmation_started_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ confirmation_ends_at:
+ type: integer
+ format: int64
+ description: Unix milliseconds.
+ quote_id:
+ type: string
+ bundle:
+ $ref: '#/components/schemas/FillBundle'
+ maker_confirmations:
+ type: array
+ items:
+ $ref: '#/components/schemas/MakerConfirmationSnapshot'
+ required:
+ - request
+ - status
+ SignatureType:
+ type: integer
+ description: |
+ CLOB signature type:
+ - `0` EOA
+ - `1` POLY_PROXY
+ - `2` GNOSIS_SAFE
+ - `3` POLY_1271
+ enum:
+ - 0
+ - 1
+ - 2
+ - 3
+ example: 0
+ ExchangeV3Order:
+ type: object
+ description: >-
+ Signed Exchange v3 order. Combinatorial RFQ trades settle through
+ Exchange v3.
+ properties:
+ salt:
+ type: string
+ description: Order salt (uint256 as a decimal string)
+ maker:
+ type: string
+ description: Wallet that funds the order
+ example: 0xYourQuoterWallet
+ signer:
+ type: string
+ description: Address that signs the order
+ example: 0xYourSigner
+ tokenId:
+ type: string
+ description: YES or NO combo position ID (uint256 as a decimal string)
+ makerAmount:
+ type: string
+ description: >-
+ Amount the maker pays, in six-decimal base units (uint256 as a
+ string)
+ takerAmount:
+ type: string
+ description: >-
+ Amount the maker receives, in six-decimal base units (uint256 as a
+ string)
+ side:
+ type: integer
+ description: Order side — `0` BUY, `1` SELL
+ enum:
+ - 0
+ - 1
+ signatureType:
+ $ref: '#/components/schemas/SignatureType'
+ timestamp:
+ type: string
+ description: Order timestamp in Unix seconds (as a string)
+ metadata:
+ type: string
+ description: 32-byte hex field; defaults to the zero value
+ example: '0x0000000000000000000000000000000000000000000000000000000000000000'
+ builder:
+ type: string
+ description: 32-byte hex field; defaults to the zero value
+ example: '0x0000000000000000000000000000000000000000000000000000000000000000'
+ signature:
+ type: string
+ description: EIP-712 signature over the order
+ example: 0x...
+ required:
+ - salt
+ - maker
+ - signer
+ - tokenId
+ - makerAmount
+ - takerAmount
+ - side
+ - signatureType
+ - timestamp
+ - signature
+ RFQRequest:
+ type: object
+ description: The RFQ request as stored by the engine.
+ properties:
+ rfq_id:
+ type: string
+ auth_address:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ signature_type:
+ $ref: '#/components/schemas/SignatureType'
+ requestor_public_id:
+ type: string
+ leg_position_ids:
+ type: array
+ items:
+ type: string
+ condition_id:
+ type: string
+ yes_position_id:
+ type: string
+ no_position_id:
+ type: string
+ direction:
+ $ref: '#/components/schemas/Direction'
+ side:
+ $ref: '#/components/schemas/Side'
+ requested_size:
+ $ref: '#/components/schemas/RequestedSize'
+ created_at:
+ type: integer
+ format: int64
+ description: Creation time in Unix milliseconds.
+ required:
+ - rfq_id
+ - leg_position_ids
+ - direction
+ - side
+ RFQStatus:
+ type: string
+ description: Lifecycle status of the RFQ
+ enum:
+ - CREATED
+ - COLLECTING_QUOTES
+ - AWAITING_REQUESTER_ACCEPTANCE
+ - AWAITING_MAKER_CONFIRMATION
+ - EXECUTING
+ - FILLED
+ - FAILED
+ - EXPIRED
+ - CANCELED
+ - REJECTED
+ FillBundle:
+ type: object
+ description: The selected executable bundle of maker allocations.
+ properties:
+ requested_shares_e6:
+ type: string
+ description: Requested share size in six-decimal fixed-point units.
+ requested_notional_e6:
+ type: string
+ description: Requested notional in six-decimal fixed-point units (BUY RFQs only).
+ blended_price_e6:
+ type: string
+ description: Blended bundle price in six-decimal fixed-point units.
+ allocations:
+ type: array
+ items:
+ $ref: '#/components/schemas/FillAllocation'
+ required:
+ - requested_shares_e6
+ - blended_price_e6
+ - allocations
+ MakerConfirmationSnapshot:
+ type: object
+ properties:
+ quote_id:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ decision:
+ type: string
+ enum:
+ - CONFIRM
+ - DECLINE
+ - TIMED_OUT
+ reason:
+ type: string
+ responded_at:
+ type: integer
+ format: int64
+ description: Response time in Unix milliseconds.
+ required:
+ - quote_id
+ - signer_address
+ - maker_address
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ description: Human-readable error detail
+ required:
+ - error
+ Direction:
+ type: string
+ description: Requester trade direction
+ enum:
+ - BUY
+ - SELL
+ Side:
+ type: string
+ description: Combinatorial position side. Currently only `YES` is supported.
+ enum:
+ - 'YES'
+ - 'NO'
+ RequestedSize:
+ type: object
+ description: Requested RFQ size and unit
+ properties:
+ unit:
+ type: string
+ description: >
+ `notional` for requester BUY RFQs and `shares` for requester SELL
+ RFQs.
+ enum:
+ - notional
+ - shares
+ value_e6:
+ type: string
+ description: Six-decimal fixed-point value encoded as a string.
+ example: '1000000'
+ required:
+ - unit
+ - value_e6
+ FillAllocation:
+ type: object
+ properties:
+ maker_quote_id:
+ type: string
+ signer_address:
+ type: string
+ maker_address:
+ type: string
+ size_e6:
+ type: string
+ description: >-
+ Accepted fill size for this maker quote, in six-decimal fixed-point
+ units.
+ price_e6:
+ type: string
+ description: Fill price in six-decimal fixed-point units.
+ received_at:
+ type: integer
+ format: int64
+ description: Receipt time in Unix milliseconds.
+ required:
+ - maker_quote_id
+ - signer_address
+ - maker_address
+ - size_e6
+ - price_e6
+ responses:
+ BadRequest:
+ description: >-
+ Invalid request (malformed JSON, invalid parameters, or failed
+ validation)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid quote
+ Unauthorized:
+ description: Missing or invalid CLOB L2 authentication
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: unauthenticated
+ Forbidden:
+ description: >-
+ Authenticated identity does not match the request, or role is not
+ allowed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: auth address mismatch
+ NotFound:
+ description: The referenced RFQ is not active or no longer exists
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: unknown rfq
+ Conflict:
+ description: The RFQ is not in a state that accepts this command
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: competition window closed
+ TooManyRequests:
+ description: Rate limited
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: rate limited
+ ServiceUnavailable:
+ description: An RFQ service dependency is temporarily unavailable
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: service unavailable
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: CLOB API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Wallet address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC-SHA256 signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: CLOB API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-fee-rate-by-path-parameter.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-fee-rate-by-path-parameter.md
new file mode 100644
index 0000000..637cf6d
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-fee-rate-by-path-parameter.md
@@ -0,0 +1,121 @@
+> ## 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 fee rate by path parameter
+
+> Retrieves the base fee rate for a specific token ID using the token ID as a path parameter.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /fee-rate/{token_id}
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /fee-rate/{token_id}:
+ get:
+ tags:
+ - Market Data
+ summary: Get fee rate by path parameter
+ description: >
+ Retrieves the base fee rate for a specific token ID using the token ID
+ as a path parameter.
+ operationId: getFeeRateByPath
+ parameters:
+ - name: token_id
+ in: path
+ description: Token ID (asset ID)
+ required: true
+ schema:
+ type: string
+ example: 0xabc123def456...
+ responses:
+ '200':
+ description: Successfully retrieved fee rate
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FeeRate'
+ example:
+ base_fee: 30
+ '400':
+ description: Bad request - Invalid token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid token id
+ '404':
+ description: Not found - Fee rate not found for market
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: fee rate not found for market
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ FeeRate:
+ type: object
+ required:
+ - base_fee
+ properties:
+ base_fee:
+ type: integer
+ format: int64
+ description: Base fee in basis points
+ example: 30
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-fee-rate.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-fee-rate.md
new file mode 100644
index 0000000..cdb25d5
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-fee-rate.md
@@ -0,0 +1,124 @@
+> ## 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 fee rate
+
+> Retrieves the base fee rate for a specific token ID.
+The fee rate can be provided either as a query parameter or as a path parameter.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /fee-rate
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /fee-rate:
+ get:
+ tags:
+ - Market Data
+ summary: Get fee rate
+ description: >
+ Retrieves the base fee rate for a specific token ID.
+
+ The fee rate can be provided either as a query parameter or as a path
+ parameter.
+ operationId: getFeeRate
+ parameters:
+ - name: token_id
+ in: query
+ description: Token ID (asset ID)
+ required: false
+ schema:
+ type: string
+ example: 0xabc123def456...
+ responses:
+ '200':
+ description: Successfully retrieved fee rate
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FeeRate'
+ example:
+ base_fee: 30
+ '400':
+ description: Bad request - Invalid token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid token id
+ '404':
+ description: Not found - Fee rate not found for market
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: fee rate not found for market
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ FeeRate:
+ type: object
+ required:
+ - base_fee
+ properties:
+ base_fee:
+ type: integer
+ format: int64
+ description: Base fee in basis points
+ example: 30
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-price.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-price.md
new file mode 100644
index 0000000..6800eb4
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-price.md
@@ -0,0 +1,120 @@
+> ## 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 last trade price
+
+> Retrieves the last trade price and side for a specific token ID.
+Returns default values of "0.5" for price and empty string for side if no trades found.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /last-trade-price
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /last-trade-price:
+ get:
+ tags:
+ - Market Data
+ summary: Get last trade price
+ description: >
+ Retrieves the last trade price and side for a specific token ID.
+
+ Returns default values of "0.5" for price and empty string for side if
+ no trades found.
+ operationId: getLastTradePrice
+ parameters:
+ - name: token_id
+ in: query
+ description: Token ID (asset ID)
+ required: true
+ schema:
+ type: string
+ example: 0xabc123def456...
+ responses:
+ '200':
+ description: Successfully retrieved last trade price
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - price
+ - side
+ properties:
+ price:
+ type: string
+ description: Last trade price
+ example: '0.45'
+ side:
+ type: string
+ description: Last trade side (BUY or SELL)
+ enum:
+ - BUY
+ - SELL
+ - ''
+ example: BUY
+ '400':
+ description: Bad request - Invalid token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid token id
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-prices-query-parameters.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-prices-query-parameters.md
new file mode 100644
index 0000000..b61cf09
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-prices-query-parameters.md
@@ -0,0 +1,140 @@
+> ## 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 last trade prices (query parameters)
+
+> Retrieves last trade prices for multiple token IDs using query parameters.
+Maximum 500 token IDs can be requested per call.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /last-trades-prices
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /last-trades-prices:
+ get:
+ tags:
+ - Market Data
+ summary: Get last trade prices (query parameters)
+ description: >
+ Retrieves last trade prices for multiple token IDs using query
+ parameters.
+
+ Maximum 500 token IDs can be requested per call.
+ operationId: getLastTradesPricesGet
+ parameters:
+ - name: token_ids
+ in: query
+ description: Comma-separated list of token IDs (max 500)
+ required: true
+ schema:
+ type: string
+ example: 0xabc123...,0xdef456...
+ responses:
+ '200':
+ description: Successfully retrieved last trade prices
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: object
+ required:
+ - token_id
+ - price
+ - side
+ properties:
+ token_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ price:
+ type: string
+ description: Last trade price
+ example: '0.45'
+ side:
+ type: string
+ description: Last trade side (BUY or SELL)
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ example:
+ - token_id: 0xabc123def456...
+ price: '0.45'
+ side: BUY
+ - token_id: 0xdef456abc123...
+ price: '0.52'
+ side: SELL
+ '400':
+ description: Bad request - Invalid payload or exceeds limit
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_payload:
+ summary: Invalid payload
+ value:
+ error: Invalid payload
+ exceeds_limit:
+ summary: Payload exceeds limit
+ value:
+ error: Payload exceeds the limit
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-prices-request-body.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-prices-request-body.md
new file mode 100644
index 0000000..98b3ad9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-last-trade-prices-request-body.md
@@ -0,0 +1,157 @@
+> ## 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 last trade prices (request body)
+
+> Retrieves last trade prices for multiple token IDs using a request body.
+Maximum 500 token IDs can be requested per call.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /last-trades-prices
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /last-trades-prices:
+ post:
+ tags:
+ - Market Data
+ summary: Get last trade prices (request body)
+ description: |
+ Retrieves last trade prices for multiple token IDs using a request body.
+ Maximum 500 token IDs can be requested per call.
+ operationId: getLastTradesPricesPost
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BookRequest'
+ example:
+ - token_id: 0xabc123def456...
+ - token_id: 0xdef456abc123...
+ responses:
+ '200':
+ description: Successfully retrieved last trade prices
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: object
+ required:
+ - token_id
+ - price
+ - side
+ properties:
+ token_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ price:
+ type: string
+ description: Last trade price
+ example: '0.45'
+ side:
+ type: string
+ description: Last trade side (BUY or SELL)
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ example:
+ - token_id: 0xabc123def456...
+ price: '0.45'
+ side: BUY
+ - token_id: 0xdef456abc123...
+ price: '0.52'
+ side: SELL
+ '400':
+ description: Bad request - Invalid payload or exceeds limit
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_payload:
+ summary: Invalid payload
+ value:
+ error: Invalid payload
+ exceeds_limit:
+ summary: Payload exceeds limit
+ value:
+ error: Payload exceeds the limit
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ BookRequest:
+ type: object
+ required:
+ - token_id
+ properties:
+ token_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ side:
+ type: string
+ description: Order side (optional, not used for midpoint calculation)
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-price.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-price.md
new file mode 100644
index 0000000..41b89a6
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-price.md
@@ -0,0 +1,139 @@
+> ## 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 market price
+
+> Retrieves the best market price for a specific token ID and side (bid or ask).
+Returns the best bid price for BUY side or best ask price for SELL side.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /price
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /price:
+ get:
+ tags:
+ - Market Data
+ summary: Get market price
+ description: >
+ Retrieves the best market price for a specific token ID and side (bid or
+ ask).
+
+ Returns the best bid price for BUY side or best ask price for SELL side.
+ operationId: getPrice
+ parameters:
+ - name: token_id
+ in: query
+ description: Token ID (asset ID)
+ required: true
+ schema:
+ type: string
+ example: 0xabc123def456...
+ - name: side
+ in: query
+ description: Order side
+ required: true
+ schema:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ responses:
+ '200':
+ description: Successfully retrieved market price
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - price
+ properties:
+ price:
+ type: number
+ format: double
+ description: Market price as a decimal number
+ example: 0.45
+ example:
+ price: 0.45
+ '400':
+ description: Bad request - Invalid token id or side
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_token_id:
+ summary: Invalid token id
+ value:
+ error: Invalid token id
+ invalid_side:
+ summary: Invalid side
+ value:
+ error: Invalid side
+ '404':
+ description: Not found - No orderbook exists for the requested token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: No orderbook exists for the requested token id
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-prices-query-parameters.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-prices-query-parameters.md
new file mode 100644
index 0000000..cb0f9a3
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-prices-query-parameters.md
@@ -0,0 +1,136 @@
+> ## 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 market prices (query parameters)
+
+> Retrieves market prices for multiple token IDs and sides using query parameters.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /prices
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /prices:
+ get:
+ tags:
+ - Market Data
+ summary: Get market prices (query parameters)
+ description: >
+ Retrieves market prices for multiple token IDs and sides using query
+ parameters.
+ operationId: getPricesGet
+ parameters:
+ - name: token_ids
+ in: query
+ description: Comma-separated list of token IDs
+ required: true
+ schema:
+ type: string
+ example: 0xabc123...,0xdef456...
+ - name: sides
+ in: query
+ description: >-
+ Comma-separated list of sides (BUY or SELL) corresponding to token
+ IDs
+ required: true
+ schema:
+ type: string
+ example: BUY,SELL
+ responses:
+ '200':
+ description: Successfully retrieved market prices
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ additionalProperties:
+ type: number
+ format: double
+ description: Map of token ID to map of side to price
+ example:
+ 0xabc123def456...:
+ BUY: 0.45
+ 0xdef456abc123...:
+ SELL: 0.52
+ '400':
+ description: Bad request - Invalid payload or side
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_payload:
+ summary: Invalid payload
+ value:
+ error: Invalid payload
+ invalid_side:
+ summary: Invalid side
+ value:
+ error: Invalid side
+ '404':
+ description: Not found - No orderbook exists for the requested token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: No orderbook exists for the requested token id
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-prices-request-body.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-prices-request-body.md
new file mode 100644
index 0000000..32c9559
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-market-prices-request-body.md
@@ -0,0 +1,151 @@
+> ## 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 market prices (request body)
+
+> Retrieves market prices for multiple token IDs and sides using a request body.
+Each request must include both token_id and side.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /prices
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /prices:
+ post:
+ tags:
+ - Market Data
+ summary: Get market prices (request body)
+ description: >
+ Retrieves market prices for multiple token IDs and sides using a request
+ body.
+
+ Each request must include both token_id and side.
+ operationId: getPricesPost
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BookRequest'
+ example:
+ - token_id: 0xabc123def456...
+ side: BUY
+ - token_id: 0xdef456abc123...
+ side: SELL
+ responses:
+ '200':
+ description: Successfully retrieved market prices
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ additionalProperties:
+ type: number
+ format: double
+ description: Map of token ID to map of side to price
+ example:
+ 0xabc123def456...:
+ BUY: 0.45
+ 0xdef456abc123...:
+ SELL: 0.52
+ '400':
+ description: Bad request - Invalid payload or side
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_payload:
+ summary: Invalid payload
+ value:
+ error: Invalid payload
+ invalid_side:
+ summary: Invalid side
+ value:
+ error: Invalid side
+ '404':
+ description: Not found - No orderbook exists for the requested token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: No orderbook exists for the requested token id
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ BookRequest:
+ type: object
+ required:
+ - token_id
+ properties:
+ token_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ side:
+ type: string
+ description: Order side (optional, not used for midpoint calculation)
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-midpoint-prices-query-parameters.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-midpoint-prices-query-parameters.md
new file mode 100644
index 0000000..d21b9e6
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-midpoint-prices-query-parameters.md
@@ -0,0 +1,110 @@
+> ## 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 midpoint prices (query parameters)
+
+> Retrieves midpoint prices for multiple token IDs using query parameters.
+The midpoint is calculated as the average of the best bid and best ask prices.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /midpoints
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /midpoints:
+ get:
+ tags:
+ - Market Data
+ summary: Get midpoint prices (query parameters)
+ description: >
+ Retrieves midpoint prices for multiple token IDs using query parameters.
+
+ The midpoint is calculated as the average of the best bid and best ask
+ prices.
+ operationId: getMidpointsGet
+ parameters:
+ - name: token_ids
+ in: query
+ description: Comma-separated list of token IDs
+ required: true
+ schema:
+ type: string
+ example: 0xabc123...,0xdef456...
+ responses:
+ '200':
+ description: Successfully retrieved midpoint prices
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ description: Map of token ID to midpoint price
+ example:
+ 0xabc123def456...: '0.45'
+ 0xdef456abc123...: '0.52'
+ '400':
+ description: Bad request - Invalid payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid payload
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: error getting the mid price
+ security: []
+components:
+ schemas:
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-midpoint-prices-request-body.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-midpoint-prices-request-body.md
new file mode 100644
index 0000000..b86c55a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-midpoint-prices-request-body.md
@@ -0,0 +1,129 @@
+> ## 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 midpoint prices (request body)
+
+> Retrieves midpoint prices for multiple token IDs using a request body.
+The midpoint is calculated as the average of the best bid and best ask prices.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /midpoints
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /midpoints:
+ post:
+ tags:
+ - Market Data
+ summary: Get midpoint prices (request body)
+ description: >
+ Retrieves midpoint prices for multiple token IDs using a request body.
+
+ The midpoint is calculated as the average of the best bid and best ask
+ prices.
+ operationId: getMidpointsPost
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BookRequest'
+ example:
+ - token_id: 0xabc123def456...
+ - token_id: 0xdef456abc123...
+ responses:
+ '200':
+ description: Successfully retrieved midpoint prices
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ description: Map of token ID to midpoint price
+ example:
+ 0xabc123def456...: '0.45'
+ 0xdef456abc123...: '0.52'
+ '400':
+ description: Bad request - Invalid payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid payload
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: error getting the mid price
+ security: []
+components:
+ schemas:
+ BookRequest:
+ type: object
+ required:
+ - token_id
+ properties:
+ token_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ side:
+ type: string
+ description: Order side (optional, not used for midpoint calculation)
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-order-book.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-order-book.md
new file mode 100644
index 0000000..383df69
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-order-book.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 order book
+
+> Retrieves the order book summary for a specific token ID.
+Includes bids, asks, market details, and last trade price.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /book
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /book:
+ get:
+ tags:
+ - Market Data
+ summary: Get order book
+ description: |
+ Retrieves the order book summary for a specific token ID.
+ Includes bids, asks, market details, and last trade price.
+ operationId: getBook
+ parameters:
+ - name: token_id
+ in: query
+ description: Token ID (asset ID)
+ required: true
+ schema:
+ type: string
+ example: 0xabc123def456...
+ responses:
+ '200':
+ description: Successfully retrieved order book
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrderBookSummary'
+ example:
+ market: '0x1234567890123456789012345678901234567890'
+ asset_id: 0xabc123def456...
+ timestamp: '1234567890'
+ hash: a1b2c3d4e5f6...
+ bids:
+ - price: '0.45'
+ size: '100'
+ - price: '0.44'
+ size: '200'
+ asks:
+ - price: '0.46'
+ size: '150'
+ - price: '0.47'
+ size: '250'
+ min_order_size: '1'
+ tick_size: '0.01'
+ neg_risk: false
+ last_trade_price: '0.45'
+ '400':
+ description: Bad request - Invalid token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid token id
+ '404':
+ description: Not found - No orderbook exists for the requested token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: No orderbook exists for the requested token id
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: error getting the orderbook
+ security: []
+components:
+ schemas:
+ OrderBookSummary:
+ type: object
+ required:
+ - market
+ - asset_id
+ - timestamp
+ - hash
+ - bids
+ - asks
+ - min_order_size
+ - tick_size
+ - neg_risk
+ - last_trade_price
+ properties:
+ market:
+ type: string
+ description: Market condition ID
+ example: '0x1234567890123456789012345678901234567890'
+ asset_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ timestamp:
+ type: string
+ description: Timestamp of the order book snapshot
+ example: '1234567890'
+ hash:
+ type: string
+ description: Hash of the order book summary
+ example: a1b2c3d4e5f6...
+ bids:
+ type: array
+ description: List of bid orders (sorted by price descending)
+ items:
+ $ref: '#/components/schemas/OrderSummary'
+ asks:
+ type: array
+ description: List of ask orders (sorted by price ascending)
+ items:
+ $ref: '#/components/schemas/OrderSummary'
+ min_order_size:
+ type: string
+ description: Minimum order size
+ example: '1'
+ tick_size:
+ type: string
+ description: Minimum price increment (tick size)
+ example: '0.01'
+ neg_risk:
+ type: boolean
+ description: Whether negative risk is enabled for this market
+ example: false
+ last_trade_price:
+ type: string
+ description: Last trade price
+ example: '0.45'
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ OrderSummary:
+ type: object
+ required:
+ - price
+ - size
+ properties:
+ price:
+ type: string
+ description: Order price
+ example: '0.45'
+ size:
+ type: string
+ description: Order size
+ example: '100'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-order-books-request-body.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-order-books-request-body.md
new file mode 100644
index 0000000..1c4a134
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-order-books-request-body.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 order books (request body)
+
+> Retrieves order book summaries for multiple token IDs using a request body.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /books
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /books:
+ post:
+ tags:
+ - Market Data
+ summary: Get order books (request body)
+ description: >
+ Retrieves order book summaries for multiple token IDs using a request
+ body.
+ operationId: getBooksPost
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BookRequest'
+ example:
+ - token_id: 0xabc123def456...
+ - token_id: 0xdef456abc123...
+ responses:
+ '200':
+ description: Successfully retrieved order books
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/OrderBookSummary'
+ example:
+ - market: '0x1234567890123456789012345678901234567890'
+ asset_id: 0xabc123def456...
+ timestamp: '1234567890'
+ hash: a1b2c3d4e5f6...
+ bids:
+ - price: '0.45'
+ size: '100'
+ asks:
+ - price: '0.46'
+ size: '150'
+ min_order_size: '1'
+ tick_size: '0.01'
+ neg_risk: false
+ last_trade_price: '0.45'
+ '400':
+ description: Bad request - Invalid payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid payload
+ security: []
+components:
+ schemas:
+ BookRequest:
+ type: object
+ required:
+ - token_id
+ properties:
+ token_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ side:
+ type: string
+ description: Order side (optional, not used for midpoint calculation)
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ OrderBookSummary:
+ type: object
+ required:
+ - market
+ - asset_id
+ - timestamp
+ - hash
+ - bids
+ - asks
+ - min_order_size
+ - tick_size
+ - neg_risk
+ - last_trade_price
+ properties:
+ market:
+ type: string
+ description: Market condition ID
+ example: '0x1234567890123456789012345678901234567890'
+ asset_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ timestamp:
+ type: string
+ description: Timestamp of the order book snapshot
+ example: '1234567890'
+ hash:
+ type: string
+ description: Hash of the order book summary
+ example: a1b2c3d4e5f6...
+ bids:
+ type: array
+ description: List of bid orders (sorted by price descending)
+ items:
+ $ref: '#/components/schemas/OrderSummary'
+ asks:
+ type: array
+ description: List of ask orders (sorted by price ascending)
+ items:
+ $ref: '#/components/schemas/OrderSummary'
+ min_order_size:
+ type: string
+ description: Minimum order size
+ example: '1'
+ tick_size:
+ type: string
+ description: Minimum price increment (tick size)
+ example: '0.01'
+ neg_risk:
+ type: boolean
+ description: Whether negative risk is enabled for this market
+ example: false
+ last_trade_price:
+ type: string
+ description: Last trade price
+ example: '0.45'
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ OrderSummary:
+ type: object
+ required:
+ - price
+ - size
+ properties:
+ price:
+ type: string
+ description: Order price
+ example: '0.45'
+ size:
+ type: string
+ description: Order size
+ example: '100'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-spread.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-spread.md
new file mode 100644
index 0000000..7bef021
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-spread.md
@@ -0,0 +1,109 @@
+> ## 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 spread
+
+> Retrieves the spread for a specific token ID.
+The spread is the difference between the best ask and best bid prices.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /spread
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /spread:
+ get:
+ tags:
+ - Market Data
+ summary: Get spread
+ description: |
+ Retrieves the spread for a specific token ID.
+ The spread is the difference between the best ask and best bid prices.
+ operationId: getSpread
+ parameters:
+ - name: token_id
+ in: query
+ description: Token ID (asset ID)
+ required: true
+ schema:
+ type: string
+ example: 0xabc123def456...
+ responses:
+ '200':
+ description: Successfully retrieved spread
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - spread
+ properties:
+ spread:
+ type: string
+ description: Spread as a string
+ example: '0.02'
+ '400':
+ description: Bad request - Invalid token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid token id
+ '404':
+ description: Not found - No orderbook exists for the requested token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: No orderbook exists for the requested token id
+ security: []
+components:
+ schemas:
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-spreads.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-spreads.md
new file mode 100644
index 0000000..f6b9733
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-spreads.md
@@ -0,0 +1,127 @@
+> ## 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 spreads
+
+> Retrieves spreads for multiple token IDs.
+The spread is the difference between the best ask and best bid prices.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /spreads
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /spreads:
+ post:
+ tags:
+ - Market Data
+ summary: Get spreads
+ description: |
+ Retrieves spreads for multiple token IDs.
+ The spread is the difference between the best ask and best bid prices.
+ operationId: getSpreads
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BookRequest'
+ example:
+ - token_id: 0xabc123def456...
+ - token_id: 0xdef456abc123...
+ responses:
+ '200':
+ description: Successfully retrieved spreads
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ description: Map of token ID to spread
+ example:
+ 0xabc123def456...: '0.02'
+ 0xdef456abc123...: '0.015'
+ '400':
+ description: Bad request - Invalid payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid payload
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: error getting the spread
+ security: []
+components:
+ schemas:
+ BookRequest:
+ type: object
+ required:
+ - token_id
+ properties:
+ token_id:
+ type: string
+ description: Token ID (asset ID)
+ example: 0xabc123def456...
+ side:
+ type: string
+ description: Order side (optional, not used for midpoint calculation)
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-tick-size-by-path-parameter.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-tick-size-by-path-parameter.md
new file mode 100644
index 0000000..76a11d0
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-tick-size-by-path-parameter.md
@@ -0,0 +1,121 @@
+> ## 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 tick size by path parameter
+
+> Retrieves the minimum tick size (price increment) for a specific token ID using the token ID as a path parameter.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /tick-size/{token_id}
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /tick-size/{token_id}:
+ get:
+ tags:
+ - Market Data
+ summary: Get tick size by path parameter
+ description: >
+ Retrieves the minimum tick size (price increment) for a specific token
+ ID using the token ID as a path parameter.
+ operationId: getTickSizeByPath
+ parameters:
+ - name: token_id
+ in: path
+ description: Token ID (asset ID)
+ required: true
+ schema:
+ type: string
+ example: 0xabc123def456...
+ responses:
+ '200':
+ description: Successfully retrieved tick size
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TickSize'
+ example:
+ minimum_tick_size: 0.01
+ '400':
+ description: Bad request - Invalid token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid token id
+ '404':
+ description: Not found - Market not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: market not found
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ TickSize:
+ type: object
+ required:
+ - minimum_tick_size
+ properties:
+ minimum_tick_size:
+ type: number
+ format: double
+ description: Minimum tick size (price increment)
+ example: 0.01
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/market-data/get-tick-size.md b/PolymarketDocumentation-main/docs/api-reference/market-data/get-tick-size.md
new file mode 100644
index 0000000..88553ee
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/market-data/get-tick-size.md
@@ -0,0 +1,125 @@
+> ## 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 tick size
+
+> Retrieves the minimum tick size (price increment) for a specific token ID.
+The tick size can be provided either as a query parameter or as a path parameter.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /tick-size
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /tick-size:
+ get:
+ tags:
+ - Market Data
+ summary: Get tick size
+ description: >
+ Retrieves the minimum tick size (price increment) for a specific token
+ ID.
+
+ The tick size can be provided either as a query parameter or as a path
+ parameter.
+ operationId: getTickSize
+ parameters:
+ - name: token_id
+ in: query
+ description: Token ID (asset ID)
+ required: false
+ schema:
+ type: string
+ example: 0xabc123def456...
+ responses:
+ '200':
+ description: Successfully retrieved tick size
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TickSize'
+ example:
+ minimum_tick_size: 0.01
+ '400':
+ description: Bad request - Invalid token id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid token id
+ '404':
+ description: Not found - Market not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: market not found
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security: []
+components:
+ schemas:
+ TickSize:
+ type: object
+ required:
+ - minimum_tick_size
+ properties:
+ minimum_tick_size:
+ type: number
+ format: double
+ description: Minimum tick size (price increment)
+ example: 0.01
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-batch-prices-history.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-batch-prices-history.md
new file mode 100644
index 0000000..7d92de2
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-batch-prices-history.md
@@ -0,0 +1,144 @@
+> ## 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 batch prices history
+
+> Retrieve historical price data for multiple markets in a single request.
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /batch-prices-history
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /batch-prices-history:
+ post:
+ tags:
+ - Markets
+ summary: Get batch prices history
+ description: Retrieve historical price data for multiple markets in a single request.
+ operationId: getBatchPricesHistory
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPricesHistoryRequest'
+ responses:
+ '200':
+ description: Successful response with price history for each market
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPricesHistoryResponse'
+ '400':
+ description: Bad Request - Missing or invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ security: []
+components:
+ schemas:
+ BatchPricesHistoryRequest:
+ type: object
+ required:
+ - markets
+ properties:
+ markets:
+ type: array
+ items:
+ type: string
+ description: List of market asset ids to query. Maximum 20.
+ maxItems: 20
+ start_ts:
+ type: number
+ format: double
+ description: Filter by items after this unix timestamp (seconds).
+ end_ts:
+ type: number
+ format: double
+ description: Filter by items before this unix timestamp (seconds).
+ interval:
+ type: string
+ enum:
+ - max
+ - all
+ - 1m
+ - 1w
+ - 1d
+ - 6h
+ - 1h
+ description: Time interval for data aggregation.
+ fidelity:
+ type: integer
+ description: Accuracy of the data expressed in minutes. Default is 1 minute.
+ BatchPricesHistoryResponse:
+ type: object
+ properties:
+ history:
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/MarketPrice'
+ description: Map of market asset id to array of price data points.
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ MarketPrice:
+ type: object
+ properties:
+ t:
+ type: integer
+ format: uint32
+ p:
+ type: number
+ format: float
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-clob-market-info.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-clob-market-info.md
new file mode 100644
index 0000000..43ef68e
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-clob-market-info.md
@@ -0,0 +1,192 @@
+> ## 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 CLOB market info
+
+> Returns all CLOB-level parameters for a market in a single call —
+tokens, tick size, base fees, rewards, RFQ status, and fee details.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /clob-markets/{condition_id}
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /clob-markets/{condition_id}:
+ get:
+ tags:
+ - Markets
+ summary: Get CLOB market info
+ description: |
+ Returns all CLOB-level parameters for a market in a single call —
+ tokens, tick size, base fees, rewards, RFQ status, and fee details.
+ operationId: getClobMarketInfo
+ parameters:
+ - name: condition_id
+ in: path
+ required: true
+ description: The condition ID of the market
+ schema:
+ type: string
+ example: '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af'
+ responses:
+ '200':
+ description: Successfully retrieved CLOB market info
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ClobMarketDetails'
+ '400':
+ description: Bad request - Invalid condition ID
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ ClobMarketDetails:
+ type: object
+ description: >-
+ CLOB-level parameters for a market — tokens, tick size, base fees,
+ rewards, RFQ status, and fee details.
+ properties:
+ gst:
+ type: string
+ format: date-time
+ nullable: true
+ description: >-
+ Game start time (used for sports markets), ISO 8601 timestamp or
+ null
+ r:
+ $ref: '#/components/schemas/ClobRewards'
+ t:
+ type: array
+ description: Tokens for this market
+ items:
+ $ref: '#/components/schemas/ClobToken'
+ mos:
+ type: number
+ format: float
+ description: Minimum order size
+ example: 5
+ mts:
+ type: number
+ format: float
+ description: Minimum tick size (price increment)
+ example: 0.01
+ mbf:
+ type: integer
+ format: int64
+ description: Maker base fee in basis points
+ example: 0
+ tbf:
+ type: integer
+ format: int64
+ description: Taker base fee in basis points
+ example: 0
+ rfqe:
+ type: boolean
+ description: Whether RFQ (Request for Quote) is enabled for this market
+ itode:
+ type: boolean
+ description: >-
+ Whether taker order delay is enabled for this market. When true,
+ marketable orders are held for the 250 ms taker-delay window before
+ synchronous processing. This field is omitted when false.
+ ibce:
+ type: boolean
+ description: Whether Blockaid check is enabled
+ fd:
+ $ref: '#/components/schemas/FeeDetails'
+ oas:
+ type: integer
+ description: Minimum order age in seconds
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ ClobRewards:
+ type: object
+ description: Rewards configuration for a market.
+ additionalProperties: true
+ ClobToken:
+ type: object
+ description: A token in a CLOB market with its ID and outcome label.
+ properties:
+ t:
+ type: string
+ description: The token ID
+ example: >-
+ 71321045679252212594626385532706912750332728571942532289631379312455583992563
+ o:
+ type: string
+ description: Outcome label for the token (e.g. "Yes", "No")
+ example: 'Yes'
+ FeeDetails:
+ type: object
+ description: Fee curve parameters for a market.
+ properties:
+ r:
+ type: number
+ format: float
+ nullable: true
+ description: Fee rate
+ example: 0.02
+ e:
+ type: number
+ format: float
+ nullable: true
+ description: Fee curve exponent
+ example: 2
+ to:
+ type: boolean
+ nullable: true
+ description: Whether fees apply to takers only
+ example: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-id.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-id.md
new file mode 100644
index 0000000..49d69a5
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-id.md
@@ -0,0 +1,1209 @@
+> ## 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 market by id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /markets/{id}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /markets/{id}:
+ get:
+ tags:
+ - Markets
+ summary: Get market by id
+ operationId: getMarket
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ - name: include_tag
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Market
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Market'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-slug.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-slug.md
new file mode 100644
index 0000000..538515f
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-slug.md
@@ -0,0 +1,1209 @@
+> ## 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 market by slug
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /markets/slug/{slug}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /markets/slug/{slug}:
+ get:
+ tags:
+ - Markets
+ summary: Get market by slug
+ operationId: getMarketBySlug
+ parameters:
+ - $ref: '#/components/parameters/pathSlug'
+ - name: include_tag
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Market
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Market'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathSlug:
+ name: slug
+ in: path
+ required: true
+ schema:
+ type: string
+ schemas:
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-token.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-token.md
new file mode 100644
index 0000000..3435883
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-by-token.md
@@ -0,0 +1,128 @@
+> ## 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 market by token
+
+> Returns the parent market for a given token ID. Useful when you have
+a token ID and need to resolve its parent market without knowing the
+condition ID in advance.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /markets-by-token/{token_id}
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /markets-by-token/{token_id}:
+ get:
+ tags:
+ - Markets
+ summary: Get market by token
+ description: |
+ Returns the parent market for a given token ID. Useful when you have
+ a token ID and need to resolve its parent market without knowing the
+ condition ID in advance.
+ operationId: getMarketByToken
+ parameters:
+ - name: token_id
+ in: path
+ required: true
+ description: The token ID to look up the parent market for
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Successfully retrieved market
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MarketByTokenResponse'
+ '400':
+ description: Invalid market - empty token_id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '404':
+ description: Market not found for token
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ MarketByTokenResponse:
+ type: object
+ description: >-
+ Response for GET /markets-by-token/{token_id} — condition ID and both
+ token IDs in the market.
+ required:
+ - condition_id
+ - primary_token_id
+ - secondary_token_id
+ properties:
+ condition_id:
+ type: string
+ description: The condition ID of the market containing the given token
+ example: '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af'
+ primary_token_id:
+ type: string
+ description: The primary (Yes) token ID
+ example: >-
+ 71321045679252212594626385532706912750332728571942532289631379312455583992563
+ secondary_token_id:
+ type: string
+ description: The secondary (No) token ID
+ example: >-
+ 52114319501245915516055106046884209969926127482827954674443846427813813222426
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-market-tags-by-id.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-tags-by-id.md
new file mode 100644
index 0000000..2b55488
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-market-tags-by-id.md
@@ -0,0 +1,108 @@
+> ## 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 market tags by id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /markets/{id}/tags
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /markets/{id}/tags:
+ get:
+ tags:
+ - Markets
+ - Tags
+ summary: Get market tags by id
+ operationId: getMarketTags
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ responses:
+ '200':
+ description: Tags attached to the market
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-prices-history.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-prices-history.md
new file mode 100644
index 0000000..d49f48b
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-prices-history.md
@@ -0,0 +1,143 @@
+> ## 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 prices history
+
+> Retrieve historical price data for a market.
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /prices-history
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /prices-history:
+ get:
+ tags:
+ - Markets
+ summary: Get prices history
+ description: Retrieve historical price data for a market.
+ operationId: getPricesHistory
+ parameters:
+ - name: market
+ in: query
+ required: true
+ description: The market (asset id) to query.
+ schema:
+ type: string
+ - name: startTs
+ in: query
+ required: false
+ description: Filter by items after this unix timestamp.
+ schema:
+ type: number
+ format: double
+ - name: endTs
+ in: query
+ required: false
+ description: Filter by items before this unix timestamp.
+ schema:
+ type: number
+ format: double
+ - name: interval
+ in: query
+ required: false
+ description: Time interval for data aggregation.
+ schema:
+ type: string
+ enum:
+ - max
+ - all
+ - 1m
+ - 1w
+ - 1d
+ - 6h
+ - 1h
+ - name: fidelity
+ in: query
+ required: false
+ description: Accuracy of the data expressed in minutes. Default is 1 minute.
+ schema:
+ type: integer
+ responses:
+ '200':
+ description: Successful response with price history
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PricesHistoryResponse'
+ '400':
+ description: Bad Request - Missing or invalid query parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ security: []
+components:
+ schemas:
+ PricesHistoryResponse:
+ type: object
+ properties:
+ history:
+ type: array
+ items:
+ $ref: '#/components/schemas/MarketPrice'
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ MarketPrice:
+ type: object
+ properties:
+ t:
+ type: integer
+ format: uint32
+ p:
+ type: number
+ format: float
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-sampling-markets.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-sampling-markets.md
new file mode 100644
index 0000000..4fc1372
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-sampling-markets.md
@@ -0,0 +1,183 @@
+> ## 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 sampling markets
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /sampling-markets
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /sampling-markets:
+ get:
+ tags:
+ - Markets
+ summary: Get sampling markets
+ operationId: getSamplingMarkets
+ parameters:
+ - name: next_cursor
+ in: query
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedMarkets'
+ '400':
+ description: Invalid request
+ '500':
+ description: Internal server error
+ security: []
+components:
+ schemas:
+ PaginatedMarkets:
+ type: object
+ properties:
+ limit:
+ type: integer
+ next_cursor:
+ type: string
+ count:
+ type: integer
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ Market:
+ type: object
+ properties:
+ enable_order_book:
+ type: boolean
+ active:
+ type: boolean
+ closed:
+ type: boolean
+ archived:
+ type: boolean
+ accepting_orders:
+ type: boolean
+ accepting_order_timestamp:
+ type: string
+ format: date-time
+ minimum_order_size:
+ type: number
+ format: double
+ minimum_tick_size:
+ type: number
+ format: double
+ condition_id:
+ type: string
+ question_id:
+ type: string
+ question:
+ type: string
+ description:
+ type: string
+ market_slug:
+ type: string
+ end_date_iso:
+ type: string
+ format: date-time
+ game_start_time:
+ type: string
+ format: date-time
+ seconds_delay:
+ type: integer
+ fpmm:
+ type: string
+ maker_base_fee:
+ type: integer
+ format: int64
+ taker_base_fee:
+ type: integer
+ format: int64
+ notifications_enabled:
+ type: boolean
+ neg_risk:
+ type: boolean
+ neg_risk_market_id:
+ type: string
+ neg_risk_request_id:
+ type: string
+ icon:
+ type: string
+ image:
+ type: string
+ rewards:
+ $ref: '#/components/schemas/Rewards'
+ is_50_50_outcome:
+ type: boolean
+ tokens:
+ type: array
+ items:
+ $ref: '#/components/schemas/Token'
+ tags:
+ type: array
+ items:
+ type: string
+ Rewards:
+ type: object
+ properties:
+ rates:
+ type: array
+ items:
+ type: object
+ properties:
+ asset_address:
+ type: string
+ rewards_daily_rate:
+ type: number
+ format: double
+ min_size:
+ type: number
+ format: double
+ max_spread:
+ type: number
+ format: double
+ Token:
+ type: object
+ properties:
+ token_id:
+ type: string
+ outcome:
+ type: string
+ price:
+ type: number
+ format: double
+ winner:
+ type: boolean
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-sampling-simplified-markets.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-sampling-simplified-markets.md
new file mode 100644
index 0000000..443d7f5
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-sampling-simplified-markets.md
@@ -0,0 +1,130 @@
+> ## 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 sampling simplified markets
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /sampling-simplified-markets
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /sampling-simplified-markets:
+ get:
+ tags:
+ - Markets
+ summary: Get sampling simplified markets
+ operationId: getSamplingSimplifiedMarkets
+ parameters:
+ - name: next_cursor
+ in: query
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedSimplifiedMarkets'
+ '400':
+ description: Invalid request
+ '500':
+ description: Internal server error
+ security: []
+components:
+ schemas:
+ PaginatedSimplifiedMarkets:
+ type: object
+ properties:
+ limit:
+ type: integer
+ next_cursor:
+ type: string
+ count:
+ type: integer
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimplifiedMarket'
+ SimplifiedMarket:
+ type: object
+ properties:
+ condition_id:
+ type: string
+ rewards:
+ $ref: '#/components/schemas/Rewards'
+ tokens:
+ type: array
+ items:
+ $ref: '#/components/schemas/Token'
+ active:
+ type: boolean
+ closed:
+ type: boolean
+ archived:
+ type: boolean
+ accepting_orders:
+ type: boolean
+ Rewards:
+ type: object
+ properties:
+ rates:
+ type: array
+ items:
+ type: object
+ properties:
+ asset_address:
+ type: string
+ rewards_daily_rate:
+ type: number
+ format: double
+ min_size:
+ type: number
+ format: double
+ max_spread:
+ type: number
+ format: double
+ Token:
+ type: object
+ properties:
+ token_id:
+ type: string
+ outcome:
+ type: string
+ price:
+ type: number
+ format: double
+ winner:
+ type: boolean
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/get-simplified-markets.md b/PolymarketDocumentation-main/docs/api-reference/markets/get-simplified-markets.md
new file mode 100644
index 0000000..73410e9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/get-simplified-markets.md
@@ -0,0 +1,130 @@
+> ## 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 simplified markets
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /simplified-markets
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /simplified-markets:
+ get:
+ tags:
+ - Markets
+ summary: Get simplified markets
+ operationId: getSimplifiedMarkets
+ parameters:
+ - name: next_cursor
+ in: query
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Successful response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedSimplifiedMarkets'
+ '400':
+ description: Invalid request
+ '500':
+ description: Internal server error
+ security: []
+components:
+ schemas:
+ PaginatedSimplifiedMarkets:
+ type: object
+ properties:
+ limit:
+ type: integer
+ next_cursor:
+ type: string
+ count:
+ type: integer
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimplifiedMarket'
+ SimplifiedMarket:
+ type: object
+ properties:
+ condition_id:
+ type: string
+ rewards:
+ $ref: '#/components/schemas/Rewards'
+ tokens:
+ type: array
+ items:
+ $ref: '#/components/schemas/Token'
+ active:
+ type: boolean
+ closed:
+ type: boolean
+ archived:
+ type: boolean
+ accepting_orders:
+ type: boolean
+ Rewards:
+ type: object
+ properties:
+ rates:
+ type: array
+ items:
+ type: object
+ properties:
+ asset_address:
+ type: string
+ rewards_daily_rate:
+ type: number
+ format: double
+ min_size:
+ type: number
+ format: double
+ max_spread:
+ type: number
+ format: double
+ Token:
+ type: object
+ properties:
+ token_id:
+ type: string
+ outcome:
+ type: string
+ price:
+ type: number
+ format: double
+ winner:
+ type: boolean
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/list-markets-keyset-pagination.md b/PolymarketDocumentation-main/docs/api-reference/markets/list-markets-keyset-pagination.md
new file mode 100644
index 0000000..728b320
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/list-markets-keyset-pagination.md
@@ -0,0 +1,1425 @@
+> ## 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.
+
+# List markets (keyset pagination)
+
+> Returns markets using cursor-based (keyset) pagination for stable, efficient paging through large result sets. Use `next_cursor` from each response as `after_cursor` in the next request. The `offset` parameter is explicitly rejected; use `after_cursor` instead.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /markets/keyset
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /markets/keyset:
+ get:
+ tags:
+ - Markets
+ summary: List markets (keyset pagination)
+ description: >
+ Returns markets using cursor-based (keyset) pagination for stable,
+ efficient paging through large result sets. Use `next_cursor` from each
+ response as `after_cursor` in the next request. The `offset` parameter
+ is explicitly rejected; use `after_cursor` instead.
+ operationId: listMarketsKeyset
+ parameters:
+ - name: limit
+ in: query
+ description: Maximum number of results to return (max 100)
+ schema:
+ type: integer
+ minimum: 1
+ maximum: 100
+ default: 20
+ - name: order
+ in: query
+ description: >-
+ Comma-separated list of JSON field names to order by, e.g.
+ volume_num,liquidity_num
+ schema:
+ type: string
+ - name: ascending
+ in: query
+ description: Sort direction. Only used when order is set.
+ schema:
+ type: boolean
+ default: true
+ - name: after_cursor
+ in: query
+ description: Opaque cursor token from a previous response's next_cursor
+ schema:
+ type: string
+ - name: offset
+ in: query
+ description: Not allowed. Returns 422 if provided.
+ schema:
+ type: integer
+ - name: id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: slug
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: closed
+ in: query
+ schema:
+ type: boolean
+ default: false
+ - name: decimalized
+ in: query
+ schema:
+ type: boolean
+ - name: clob_token_ids
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: condition_ids
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: question_ids
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: market_maker_address
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: liquidity_num_min
+ in: query
+ schema:
+ type: number
+ - name: liquidity_num_max
+ in: query
+ schema:
+ type: number
+ - name: volume_num_min
+ in: query
+ schema:
+ type: number
+ - name: volume_num_max
+ in: query
+ schema:
+ type: number
+ - name: start_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: start_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: tag_id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: related_tags
+ in: query
+ schema:
+ type: boolean
+ - name: tag_match
+ in: query
+ schema:
+ type: string
+ - name: cyom
+ in: query
+ schema:
+ type: boolean
+ - name: rfq_enabled
+ in: query
+ schema:
+ type: boolean
+ - name: uma_resolution_status
+ in: query
+ schema:
+ type: string
+ - name: game_id
+ in: query
+ schema:
+ type: string
+ - name: sports_market_types
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: include_tag
+ in: query
+ description: When true, includes Tags relation on each market
+ schema:
+ type: boolean
+ - name: locale
+ in: query
+ schema:
+ type: string
+ responses:
+ '200':
+ description: >
+ Paginated list of markets. Includes Events and Events.Series
+ relations. Tags included only when include_tag=true. Nested
+ clob_rewards and fee_schedule are populated on each market.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeysetMarketsResponse'
+ '422':
+ description: >
+ Validation error. Returned when offset is provided, cursor is
+ invalid, order fields are not valid, or other filter validation
+ fails.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ValidationError'
+ '500':
+ description: Internal server error (DB failures, cursor encode failures)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InternalError'
+ '503':
+ description: Service unavailable when keyset pagination is not configured
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ServiceUnavailableError'
+components:
+ schemas:
+ KeysetMarketsResponse:
+ type: object
+ properties:
+ markets:
+ type: array
+ description: Array of Market objects. Empty array if none found.
+ items:
+ $ref: '#/components/schemas/Market'
+ next_cursor:
+ type: string
+ description: >
+ Opaque cursor token for fetching the next page. Present only when
+ the number of returned markets equals the effective limit. Omitted
+ on the last page.
+ ValidationError:
+ type: object
+ properties:
+ type:
+ type: string
+ example: validation error
+ error:
+ type: string
+ example: offset is not allowed on keyset endpoints
+ InternalError:
+ type: object
+ properties:
+ type:
+ type: string
+ example: internal error
+ error:
+ type: string
+ example: cannot get the information
+ ServiceUnavailableError:
+ type: object
+ properties:
+ type:
+ type: string
+ example: service unavailable
+ error:
+ type: string
+ example: keyset pagination is not configured
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/markets/list-markets.md b/PolymarketDocumentation-main/docs/api-reference/markets/list-markets.md
new file mode 100644
index 0000000..cc7dd5c
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/markets/list-markets.md
@@ -0,0 +1,1336 @@
+> ## 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.
+
+# List markets
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /markets
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /markets:
+ get:
+ tags:
+ - Markets
+ summary: List markets
+ operationId: listMarkets
+ parameters:
+ - $ref: '#/components/parameters/limit'
+ - $ref: '#/components/parameters/offset'
+ - $ref: '#/components/parameters/order'
+ - $ref: '#/components/parameters/ascending'
+ - name: id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: slug
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: clob_token_ids
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: condition_ids
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: market_maker_address
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: liquidity_num_min
+ in: query
+ schema:
+ type: number
+ - name: liquidity_num_max
+ in: query
+ schema:
+ type: number
+ - name: volume_num_min
+ in: query
+ schema:
+ type: number
+ - name: volume_num_max
+ in: query
+ schema:
+ type: number
+ - name: start_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: start_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_min
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: end_date_max
+ in: query
+ schema:
+ type: string
+ format: date-time
+ - name: tag_id
+ in: query
+ schema:
+ type: integer
+ - name: related_tags
+ in: query
+ schema:
+ type: boolean
+ - name: cyom
+ in: query
+ schema:
+ type: boolean
+ - name: uma_resolution_status
+ in: query
+ schema:
+ type: string
+ - name: game_id
+ in: query
+ schema:
+ type: string
+ - name: sports_market_types
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: rewards_min_size
+ in: query
+ schema:
+ type: number
+ - name: question_ids
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: include_tag
+ in: query
+ schema:
+ type: boolean
+ - name: closed
+ in: query
+ schema:
+ type: boolean
+ default: false
+ responses:
+ '200':
+ description: List of markets
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+components:
+ parameters:
+ limit:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ offset:
+ name: offset
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ order:
+ name: order
+ in: query
+ schema:
+ type: string
+ description: Comma-separated list of fields to order by
+ ascending:
+ name: ascending
+ in: query
+ schema:
+ type: boolean
+ schemas:
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/misc/download-an-accounting-snapshot-zip-of-csvs.md b/PolymarketDocumentation-main/docs/api-reference/misc/download-an-accounting-snapshot-zip-of-csvs.md
new file mode 100644
index 0000000..9fe592c
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/misc/download-an-accounting-snapshot-zip-of-csvs.md
@@ -0,0 +1,77 @@
+> ## 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.
+
+# Download an accounting snapshot (ZIP of CSVs)
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /v1/accounting/snapshot
+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/accounting/snapshot:
+ get:
+ tags:
+ - Misc
+ summary: Download an accounting snapshot (ZIP of CSVs)
+ parameters:
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ description: User address (0x-prefixed)
+ responses:
+ '200':
+ description: ZIP file containing `positions.csv` and `equity.csv`.
+ content:
+ application/zip:
+ schema:
+ type: string
+ format: binary
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/misc/get-live-volume-for-an-event.md b/PolymarketDocumentation-main/docs/api-reference/misc/get-live-volume-for-an-event.md
new file mode 100644
index 0000000..7314bb5
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/misc/get-live-volume-for-an-event.md
@@ -0,0 +1,94 @@
+> ## 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 live volume for an event
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /live-volume
+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:
+ /live-volume:
+ get:
+ tags:
+ - Misc
+ summary: Get live volume for an event
+ parameters:
+ - in: query
+ name: id
+ required: true
+ schema:
+ type: integer
+ minimum: 1
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/LiveVolume'
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ LiveVolume:
+ type: object
+ properties:
+ total:
+ type: number
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/MarketVolume'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ MarketVolume:
+ type: object
+ properties:
+ market:
+ $ref: '#/components/schemas/Hash64'
+ value:
+ type: number
+ Hash64:
+ type: string
+ description: 0x-prefixed 64-hex string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/misc/get-open-interest.md b/PolymarketDocumentation-main/docs/api-reference/misc/get-open-interest.md
new file mode 100644
index 0000000..d82df3e
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/misc/get-open-interest.md
@@ -0,0 +1,87 @@
+> ## 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 open interest
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /oi
+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:
+ /oi:
+ get:
+ tags:
+ - Misc
+ summary: Get open interest
+ parameters:
+ - in: query
+ name: market
+ style: form
+ explode: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Hash64'
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/OpenInterest'
+ '400':
+ description: Bad Request
+ 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'
+ OpenInterest:
+ type: object
+ properties:
+ market:
+ $ref: '#/components/schemas/Hash64'
+ value:
+ type: number
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/misc/get-total-markets-a-user-has-traded.md b/PolymarketDocumentation-main/docs/api-reference/misc/get-total-markets-a-user-has-traded.md
new file mode 100644
index 0000000..ce57fdc
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/misc/get-total-markets-a-user-has-traded.md
@@ -0,0 +1,88 @@
+> ## 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 total markets a user has traded
+
+
+
+## OpenAPI
+
+````yaml /api-spec/data-openapi.yaml get /traded
+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:
+ /traded:
+ get:
+ tags:
+ - Misc
+ summary: Get total markets a user has traded
+ parameters:
+ - in: query
+ name: user
+ required: true
+ schema:
+ $ref: '#/components/schemas/Address'
+ responses:
+ '200':
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Traded'
+ '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:
+ Address:
+ type: string
+ description: User Profile Address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x56687bf447db6ffa42ffe2204a05edaa20f55839'
+ Traded:
+ type: object
+ properties:
+ user:
+ $ref: '#/components/schemas/Address'
+ traded:
+ type: integer
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/profiles/get-public-profile-by-wallet-address.md b/PolymarketDocumentation-main/docs/api-reference/profiles/get-public-profile-by-wallet-address.md
new file mode 100644
index 0000000..fc1a110
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/profiles/get-public-profile-by-wallet-address.md
@@ -0,0 +1,154 @@
+> ## 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 public profile by wallet address
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /public-profile
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /public-profile:
+ get:
+ tags:
+ - Profiles
+ summary: Get public profile by wallet address
+ operationId: getPublicProfile
+ parameters:
+ - name: address
+ in: query
+ required: true
+ description: The wallet address (proxy wallet or user address)
+ schema:
+ type: string
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x7c3db723f1d4d8cb9c550095203b686cb11e5c6b'
+ responses:
+ '200':
+ description: Public profile information
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PublicProfileResponse'
+ '400':
+ description: Invalid address format
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PublicProfileError'
+ example:
+ type: validation error
+ error: invalid address
+ '404':
+ description: Profile not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PublicProfileError'
+ example:
+ type: not found error
+ error: profile not found
+components:
+ schemas:
+ PublicProfileResponse:
+ type: object
+ properties:
+ createdAt:
+ type: string
+ format: date-time
+ description: ISO 8601 timestamp of when the profile was created
+ nullable: true
+ proxyWallet:
+ type: string
+ description: The proxy wallet address
+ nullable: true
+ profileImage:
+ type: string
+ format: uri
+ description: URL to the profile image
+ nullable: true
+ displayUsernamePublic:
+ type: boolean
+ description: Whether the username is displayed publicly
+ nullable: true
+ bio:
+ type: string
+ description: Profile bio
+ nullable: true
+ pseudonym:
+ type: string
+ description: Auto-generated pseudonym
+ nullable: true
+ name:
+ type: string
+ description: User-chosen display name
+ nullable: true
+ users:
+ type: array
+ description: Array of associated user objects
+ nullable: true
+ items:
+ $ref: '#/components/schemas/PublicProfileUser'
+ xUsername:
+ type: string
+ description: X (Twitter) username
+ nullable: true
+ verifiedBadge:
+ type: boolean
+ description: Whether the profile has a verified badge
+ nullable: true
+ PublicProfileError:
+ type: object
+ description: Error response for public profile endpoint
+ properties:
+ type:
+ type: string
+ description: Error type classification
+ error:
+ type: string
+ description: Error message
+ PublicProfileUser:
+ type: object
+ description: User object associated with a public profile
+ properties:
+ id:
+ type: string
+ description: User ID
+ creator:
+ type: boolean
+ description: Whether the user is a creator
+ mod:
+ type: boolean
+ description: Whether the user is a moderator
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rate-limits.md b/PolymarketDocumentation-main/docs/api-reference/rate-limits.md
new file mode 100644
index 0000000..7b39a0a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rate-limits.md
@@ -0,0 +1,136 @@
+> ## 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.
+
+# Rate Limits
+
+> API rate limits for all Polymarket endpoints
+
+All API rate limits are enforced using Cloudflare's throttling system. When you exceed the limit for any endpoint, requests are throttled (delayed/queued) rather than immediately rejected. Limits reset on sliding time windows.
+
+***
+
+## General
+
+| Endpoint | Limit |
+| --------------------- | ---------------- |
+| General rate limiting | 15,000 req / 10s |
+| Health check (`/ok`) | 100 req / 10s |
+
+***
+
+## Gamma API
+
+Base URL: `https://gamma-api.polymarket.com`
+
+| Endpoint | Limit |
+| ------------------------------ | --------------- |
+| General | 4,000 req / 10s |
+| `/events` | 500 req / 10s |
+| `/markets` | 300 req / 10s |
+| `/markets` + `/events` listing | 900 req / 10s |
+| `/comments` | 200 req / 10s |
+| `/tags` | 200 req / 10s |
+| `/public-search` | 350 req / 10s |
+
+***
+
+## Data API
+
+Base URL: `https://data-api.polymarket.com`
+
+| Endpoint | Limit |
+| -------------------- | --------------- |
+| General | 1,000 req / 10s |
+| `/trades` | 200 req / 10s |
+| `/positions` | 150 req / 10s |
+| `/closed-positions` | 150 req / 10s |
+| Health check (`/ok`) | 100 req / 10s |
+
+***
+
+## CLOB API
+
+Base URL: `https://clob.polymarket.com`
+
+### General
+
+| Endpoint | Limit |
+| -------------------------- | --------------- |
+| General | 9,000 req / 10s |
+| `GET` balance allowance | 200 req / 10s |
+| `UPDATE` balance allowance | 50 req / 10s |
+
+### Market Data
+
+| Endpoint | Limit |
+| ----------------- | --------------- |
+| `/book` | 1,500 req / 10s |
+| `/books` | 500 req / 10s |
+| `/price` | 1,500 req / 10s |
+| `/prices` | 500 req / 10s |
+| `/midpoint` | 1,500 req / 10s |
+| `/midpoints` | 500 req / 10s |
+| `/prices-history` | 1,000 req / 10s |
+| Market tick size | 200 req / 10s |
+
+### Ledger
+
+| Endpoint | Limit |
+| ------------------------------------------------ | ------------- |
+| `/trades`, `/orders`, `/notifications`, `/order` | 900 req / 10s |
+| `/data/orders` | 500 req / 10s |
+| `/data/trades` | 500 req / 10s |
+| `/notifications` | 125 req / 10s |
+
+### Authentication
+
+| Endpoint | Limit |
+| ----------------- | ------------- |
+| API key endpoints | 100 req / 10s |
+
+### Trading
+
+Trading endpoints have both **burst** limits (short spikes allowed) and **sustained** limits (longer-term average).
+
+| Endpoint | Burst Limit | Sustained Limit |
+| ------------------------------ | --------------- | -------------------- |
+| `POST /order` | 5,000 req / 10s | 120,000 req / 10 min |
+| `DELETE /order` | 5,000 req / 10s | 120,000 req / 10 min |
+| `POST /orders` | 2,000 req / 10s | 21,000 req / 10 min |
+| `DELETE /orders` | 2,000 req / 10s | 15,000 req / 10 min |
+| `DELETE /cancel-all` | 250 req / 10s | 6,000 req / 10 min |
+| `DELETE /cancel-market-orders` | 1,500 req / 10s | 21,000 req / 10 min |
+
+***
+
+## Bridge API
+
+Base URL: `https://bridge.polymarket.com`
+
+| Endpoint | Limit |
+| -------- | ------------ |
+| General | 50 req / 10s |
+
+***
+
+## Other
+
+| Endpoint | Limit |
+| ----------------- | -------------- |
+| Relayer `/submit` | 25 req / 1 min |
+| User PNL API | 200 req / 10s |
+
+***
+
+## Next Steps
+
+
+
+ Learn how to authenticate trading requests.
+
+
+
+ Official TypeScript, Python, and Rust libraries.
+
+
diff --git a/PolymarketDocumentation-main/docs/api-reference/rebates/get-current-rebated-fees-for-a-maker.md b/PolymarketDocumentation-main/docs/api-reference/rebates/get-current-rebated-fees-for-a-maker.md
new file mode 100644
index 0000000..44155a1
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rebates/get-current-rebated-fees-for-a-maker.md
@@ -0,0 +1,164 @@
+> ## 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 current rebated fees for a maker
+
+> Returns the current rebated fees for a maker address on a given date.
+
+Each entry includes the condition ID, asset address, and the USDC amount rebated.
+
+This endpoint does not require authentication.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rebates/current
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rebates/current:
+ get:
+ tags:
+ - Rebates
+ summary: Get current rebated fees for a maker
+ description: >
+ Returns the current rebated fees for a maker address on a given date.
+
+
+ Each entry includes the condition ID, asset address, and the USDC amount
+ rebated.
+
+
+ This endpoint does not require authentication.
+ operationId: getCurrentRebatedFees
+ parameters:
+ - name: date
+ in: query
+ description: Date in YYYY-MM-DD format
+ required: true
+ schema:
+ type: string
+ format: date
+ example: '2026-02-27'
+ - name: maker_address
+ in: query
+ description: Ethereum address of the maker
+ required: true
+ schema:
+ type: string
+ example: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ responses:
+ '200':
+ description: Successfully retrieved rebated fees
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RebatedFees'
+ example:
+ - date: '2026-02-27'
+ condition_id: >-
+ 0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af
+ asset_address: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ maker_address: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ rebated_fees_usdc: '0.237519'
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_date:
+ summary: Invalid date
+ value:
+ error: Invalid date
+ invalid_maker_address:
+ summary: Invalid maker address
+ value:
+ error: Invalid maker_address
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+components:
+ schemas:
+ RebatedFees:
+ type: object
+ description: Rebated fees for a maker on a specific market and date
+ required:
+ - date
+ - condition_id
+ - asset_address
+ - maker_address
+ - rebated_fees_usdc
+ properties:
+ date:
+ type: string
+ description: Date of the rebate (YYYY-MM-DD)
+ example: '2026-02-27'
+ condition_id:
+ type: string
+ description: Condition ID of the market
+ example: '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af'
+ asset_address:
+ type: string
+ description: Asset address (e.g. USDC contract)
+ example: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ maker_address:
+ type: string
+ description: Maker's Ethereum address
+ example: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ rebated_fees_usdc:
+ type: string
+ description: Rebated fee amount in USDC
+ example: '0.237519'
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer-api-keys/get-all-relayer-api-keys.md b/PolymarketDocumentation-main/docs/api-reference/relayer-api-keys/get-all-relayer-api-keys.md
new file mode 100644
index 0000000..e4549e6
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer-api-keys/get-all-relayer-api-keys.md
@@ -0,0 +1,139 @@
+> ## 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 all relayer API keys
+
+> Returns all relayer API keys for the authenticated address. Auth allowed: Gamma auth or Relayer API key auth (`RELAYER_API_KEY` + `RELAYER_API_KEY_ADDRESS`).
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml get /relayer/api/keys
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /relayer/api/keys:
+ get:
+ tags:
+ - Relayer API Keys
+ summary: Get all relayer API keys
+ description: >
+ Returns all relayer API keys for the authenticated address. Auth
+ allowed: Gamma auth or Relayer API key auth (`RELAYER_API_KEY` +
+ `RELAYER_API_KEY_ADDRESS`).
+ parameters:
+ - name: RELAYER_API_KEY
+ in: header
+ required: false
+ description: Relayer API key (when using relayer API key auth)
+ schema:
+ type: string
+ example: 01967c03-b8c8-7000-8f68-8b8eaec6fd3d
+ - name: RELAYER_API_KEY_ADDRESS
+ in: header
+ required: false
+ description: >-
+ Address that owns the key (when using relayer API key auth). Must
+ match the address that owns the key.
+ schema:
+ $ref: '#/components/schemas/Address'
+ example: 0xabc...
+ responses:
+ '200':
+ description: >-
+ API keys retrieved successfully. Returns an empty array if no keys
+ exist for the authenticated address.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RelayerApiKey'
+ example:
+ - apiKey: 01967c03-b8c8-7000-8f68-8b8eaec6fd3d
+ address: 0xabc...
+ createdAt: '2026-02-24T18:20:11.237485Z'
+ updatedAt: '2026-02-24T18:20:11.237485Z'
+ '401':
+ description: Unauthorized - Missing or invalid auth
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid authorization
+ '403':
+ description: Forbidden - Unsupported auth mechanism
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: not allowed
+components:
+ schemas:
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ RelayerApiKey:
+ type: object
+ properties:
+ apiKey:
+ type: string
+ description: The relayer API key
+ example: 01967c03-b8c8-7000-8f68-8b8eaec6fd3d
+ address:
+ $ref: '#/components/schemas/Address'
+ description: The address that owns the key
+ example: 0xabc...
+ createdAt:
+ type: string
+ format: date-time
+ description: Timestamp when the key was created
+ example: '2026-02-24T18:20:11.237485Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Timestamp when the key was last updated
+ example: '2026-02-24T18:20:11.237485Z'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer/check-if-a-safe-is-deployed.md b/PolymarketDocumentation-main/docs/api-reference/relayer/check-if-a-safe-is-deployed.md
new file mode 100644
index 0000000..ab83f17
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer/check-if-a-safe-is-deployed.md
@@ -0,0 +1,137 @@
+> ## 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.
+
+# Check if a wallet is deployed
+
+> Returns whether the wallet at the given address is deployed onchain.
+
+Use the `type` query parameter to choose which wallet type to check:
+
+- Pass user's Polymarket `SAFE` address (default): Gnosis Safe (SignatureType `2`).
+- Pass user's Polymarket `WALLET` Deposit Wallet address: Deposit Wallet (signatureType `3`). See the [Deposit Wallet Guide](/trading/deposit-wallets) for setup.
+
+Omitting `type` is equivalent to `type=SAFE`.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml get /deployed
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /deployed:
+ get:
+ tags:
+ - Relayer
+ summary: Check if a wallet is deployed
+ description: >
+ Returns whether the wallet at the given address is deployed onchain.
+
+
+ Use the `type` query parameter to choose which wallet type to check:
+
+
+ - Pass user's Polymarket `SAFE` address (default): Gnosis Safe
+ (SignatureType `2`).
+
+ - Pass user's Polymarket `WALLET` Deposit Wallet address: Deposit Wallet
+ (signatureType `3`). See the [Deposit Wallet
+ Guide](/trading/deposit-wallets) for setup.
+
+
+ Omitting `type` is equivalent to `type=SAFE`.
+ parameters:
+ - name: address
+ in: query
+ required: true
+ description: Address of the wallet to check
+ schema:
+ $ref: '#/components/schemas/Address'
+ example: '0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa'
+ - name: type
+ in: query
+ required: false
+ description: Wallet type to check. Defaults to `SAFE` when omitted.
+ schema:
+ type: string
+ enum:
+ - SAFE
+ - WALLET
+ default: SAFE
+ example: WALLET
+ responses:
+ '200':
+ description: Deployment status retrieved successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeployedResponse'
+ example:
+ deployed: true
+ '400':
+ description: Bad Request - Missing or invalid address
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid address
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ DeployedResponse:
+ type: object
+ properties:
+ deployed:
+ type: boolean
+ description: Whether the wallet is deployed
+ example: true
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer/check-if-a-wallet-is-deployed.md b/PolymarketDocumentation-main/docs/api-reference/relayer/check-if-a-wallet-is-deployed.md
new file mode 100644
index 0000000..ab83f17
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer/check-if-a-wallet-is-deployed.md
@@ -0,0 +1,137 @@
+> ## 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.
+
+# Check if a wallet is deployed
+
+> Returns whether the wallet at the given address is deployed onchain.
+
+Use the `type` query parameter to choose which wallet type to check:
+
+- Pass user's Polymarket `SAFE` address (default): Gnosis Safe (SignatureType `2`).
+- Pass user's Polymarket `WALLET` Deposit Wallet address: Deposit Wallet (signatureType `3`). See the [Deposit Wallet Guide](/trading/deposit-wallets) for setup.
+
+Omitting `type` is equivalent to `type=SAFE`.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml get /deployed
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /deployed:
+ get:
+ tags:
+ - Relayer
+ summary: Check if a wallet is deployed
+ description: >
+ Returns whether the wallet at the given address is deployed onchain.
+
+
+ Use the `type` query parameter to choose which wallet type to check:
+
+
+ - Pass user's Polymarket `SAFE` address (default): Gnosis Safe
+ (SignatureType `2`).
+
+ - Pass user's Polymarket `WALLET` Deposit Wallet address: Deposit Wallet
+ (signatureType `3`). See the [Deposit Wallet
+ Guide](/trading/deposit-wallets) for setup.
+
+
+ Omitting `type` is equivalent to `type=SAFE`.
+ parameters:
+ - name: address
+ in: query
+ required: true
+ description: Address of the wallet to check
+ schema:
+ $ref: '#/components/schemas/Address'
+ example: '0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa'
+ - name: type
+ in: query
+ required: false
+ description: Wallet type to check. Defaults to `SAFE` when omitted.
+ schema:
+ type: string
+ enum:
+ - SAFE
+ - WALLET
+ default: SAFE
+ example: WALLET
+ responses:
+ '200':
+ description: Deployment status retrieved successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeployedResponse'
+ example:
+ deployed: true
+ '400':
+ description: Bad Request - Missing or invalid address
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid address
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ DeployedResponse:
+ type: object
+ properties:
+ deployed:
+ type: boolean
+ description: Whether the wallet is deployed
+ example: true
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer/get-a-transaction-by-id.md b/PolymarketDocumentation-main/docs/api-reference/relayer/get-a-transaction-by-id.md
new file mode 100644
index 0000000..4ab7487
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer/get-a-transaction-by-id.md
@@ -0,0 +1,208 @@
+> ## 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 a transaction by ID
+
+> Gets a transaction submitted to the Relayer. Takes in a required transaction ID as a query parameter.
+
+Poll this endpoint with the `transactionID` returned from `POST /submit` to retrieve the onchain `transactionHash` once the transaction has been broadcast.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml get /transaction
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /transaction:
+ get:
+ tags:
+ - Relayer
+ summary: Get a transaction by ID
+ description: >
+ Gets a transaction submitted to the Relayer. Takes in a required
+ transaction ID as a query parameter.
+
+
+ Poll this endpoint with the `transactionID` returned from `POST /submit`
+ to retrieve the onchain `transactionHash` once the transaction has been
+ broadcast.
+ parameters:
+ - name: id
+ in: query
+ required: true
+ description: Transaction ID
+ schema:
+ type: string
+ example: 0190b317-a1d3-7bec-9b91-eeb6dcd3a620
+ responses:
+ '200':
+ description: Transaction retrieved successfully
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RelayerTransaction'
+ example:
+ - transactionID: 0190b317-a1d3-7bec-9b91-eeb6dcd3a620
+ transactionHash: >-
+ 0x38cbfbeae8fffa4e2b187ee5978d3ee9cafc53af0363ed90a35b7ea9016535d8
+ from: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ to: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174'
+ proxyAddress: '0x6d8c4e9adf5748af82dabe2c6225207770d6b4fa'
+ data: 0x...
+ nonce: '60'
+ value: ''
+ signature: >-
+ 0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20
+ state: STATE_CONFIRMED
+ type: SAFE
+ owner: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ metadata: ''
+ createdAt: '2024-07-14T21:13:08.819782Z'
+ updatedAt: '2024-07-14T21:13:46.576639Z'
+ '400':
+ description: Bad Request - Missing or invalid transaction ID
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid id
+ '404':
+ description: Transaction not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: transaction not found
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ RelayerTransaction:
+ type: object
+ properties:
+ transactionID:
+ type: string
+ description: Unique identifier for the transaction
+ example: 0190b317-a1d3-7bec-9b91-eeb6dcd3a620
+ transactionHash:
+ type: string
+ description: Onchain transaction hash (available once confirmed)
+ example: '0x38cbfbeae8fffa4e2b187ee5978d3ee9cafc53af0363ed90a35b7ea9016535d8'
+ from:
+ $ref: '#/components/schemas/Address'
+ description: Signer address
+ example: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ to:
+ $ref: '#/components/schemas/Address'
+ description: Target contract address
+ example: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174'
+ proxyAddress:
+ $ref: '#/components/schemas/Address'
+ description: User's Polymarket proxy wallet address
+ example: '0x6d8c4e9adf5748af82dabe2c6225207770d6b4fa'
+ data:
+ type: string
+ description: Encoded transaction data (0x-prefixed hex string)
+ example: 0x...
+ nonce:
+ type: string
+ description: Transaction nonce
+ example: '60'
+ value:
+ type: string
+ description: Transaction value
+ example: ''
+ signature:
+ type: string
+ description: Transaction signature (0x-prefixed hex string)
+ example: >-
+ 0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20
+ state:
+ type: string
+ description: Current state of the transaction
+ enum:
+ - STATE_NEW
+ - STATE_EXECUTED
+ - STATE_MINED
+ - STATE_CONFIRMED
+ - STATE_INVALID
+ - STATE_FAILED
+ example: STATE_CONFIRMED
+ type:
+ type: string
+ description: Transaction type
+ enum:
+ - SAFE
+ - PROXY
+ example: SAFE
+ owner:
+ $ref: '#/components/schemas/Address'
+ description: Owner address
+ example: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ metadata:
+ type: string
+ description: Transaction metadata
+ example: ''
+ createdAt:
+ type: string
+ format: date-time
+ description: Timestamp when the transaction was created
+ example: '2024-07-14T21:13:08.819782Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Timestamp when the transaction was last updated
+ example: '2024-07-14T21:13:46.576639Z'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer/get-current-nonce-for-a-user.md b/PolymarketDocumentation-main/docs/api-reference/relayer/get-current-nonce-for-a-user.md
new file mode 100644
index 0000000..f1de545
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer/get-current-nonce-for-a-user.md
@@ -0,0 +1,121 @@
+> ## 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 current nonce for a user
+
+> Gets the current Proxy or Safe nonce for a user. Takes in the user's signer address and the type of nonce to retrieve.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml get /nonce
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /nonce:
+ get:
+ tags:
+ - Relayer
+ summary: Get current nonce for a user
+ description: >
+ Gets the current Proxy or Safe nonce for a user. Takes in the user's
+ signer address and the type of nonce to retrieve.
+ parameters:
+ - name: address
+ in: query
+ required: true
+ description: User's signer address
+ schema:
+ $ref: '#/components/schemas/Address'
+ example: '0x77837466dd64fb52ECD00C737F060d0ff5CCB575'
+ - name: type
+ in: query
+ required: true
+ description: Type of nonce to retrieve
+ schema:
+ type: string
+ enum:
+ - PROXY
+ - SAFE
+ example: PROXY
+ responses:
+ '200':
+ description: Nonce retrieved successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NonceResponse'
+ example:
+ nonce: '31'
+ '400':
+ description: Bad Request - Missing or invalid query parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalidAddress:
+ value:
+ error: invalid address
+ invalidType:
+ value:
+ error: invalid type
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ NonceResponse:
+ type: object
+ properties:
+ nonce:
+ type: string
+ description: Current nonce value
+ example: '31'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer/get-recent-transactions-for-a-user.md b/PolymarketDocumentation-main/docs/api-reference/relayer/get-recent-transactions-for-a-user.md
new file mode 100644
index 0000000..1a0da10
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer/get-recent-transactions-for-a-user.md
@@ -0,0 +1,269 @@
+> ## 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 recent transactions for a user
+
+> Gets the most recent transactions submitted to the Relayer, owned by a specific user. Authenticated using Builder API Keys or Relayer API Keys.
+
+**Builder API Key auth headers:**
+- `POLY_BUILDER_API_KEY`
+- `POLY_BUILDER_TIMESTAMP`
+- `POLY_BUILDER_PASSPHRASE`
+- `POLY_BUILDER_SIGNATURE`
+
+**Relayer API Key auth headers:**
+- `RELAYER_API_KEY`
+- `RELAYER_API_KEY_ADDRESS`
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml get /transactions
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /transactions:
+ get:
+ tags:
+ - Relayer
+ summary: Get recent transactions for a user
+ description: >
+ Gets the most recent transactions submitted to the Relayer, owned by a
+ specific user. Authenticated using Builder API Keys or Relayer API Keys.
+
+
+ **Builder API Key auth headers:**
+
+ - `POLY_BUILDER_API_KEY`
+
+ - `POLY_BUILDER_TIMESTAMP`
+
+ - `POLY_BUILDER_PASSPHRASE`
+
+ - `POLY_BUILDER_SIGNATURE`
+
+
+ **Relayer API Key auth headers:**
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+ parameters:
+ - name: POLY_BUILDER_API_KEY
+ in: header
+ required: false
+ description: Builder API key (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: POLY_BUILDER_TIMESTAMP
+ in: header
+ required: false
+ description: Unix timestamp (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: POLY_BUILDER_PASSPHRASE
+ in: header
+ required: false
+ description: Builder passphrase (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: POLY_BUILDER_SIGNATURE
+ in: header
+ required: false
+ description: HMAC-SHA256 signature (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: RELAYER_API_KEY
+ in: header
+ required: false
+ description: Relayer API key (when using Relayer API Key auth)
+ schema:
+ type: string
+ - name: RELAYER_API_KEY_ADDRESS
+ in: header
+ required: false
+ description: Address that owns the key (when using Relayer API Key auth)
+ schema:
+ $ref: '#/components/schemas/Address'
+ responses:
+ '200':
+ description: Transactions retrieved successfully
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RelayerTransaction'
+ example:
+ - transactionID: 0190b317-a1d3-7bec-9b91-eeb6dcd3a620
+ transactionHash: >-
+ 0x38cbfbeae8fffa4e2b187ee5978d3ee9cafc53af0363ed90a35b7ea9016535d8
+ from: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ to: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174'
+ proxyAddress: '0x6d8c4e9adf5748af82dabe2c6225207770d6b4fa'
+ data: 0x...
+ nonce: '60'
+ value: ''
+ signature: >-
+ 0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20
+ state: STATE_CONFIRMED
+ type: SAFE
+ owner: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ metadata: ''
+ createdAt: '2024-07-14T21:13:08.819782Z'
+ updatedAt: '2024-07-14T21:13:46.576639Z'
+ - transactionID: 0190a792-b5be-7cad-9eae-9941f2b47ebf
+ transactionHash: >-
+ 0x0b2ff276b65382fc5593cdd965168c878006684a7fc8d2d011eddeddccd87335
+ from: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ to: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174'
+ proxyAddress: '0x6d8c4e9adf5748af82dabe2c6225207770d6b4fa'
+ data: 0x...
+ nonce: '58'
+ value: ''
+ signature: >-
+ 0x9d99a48b6552183dc44018dbbab0e196fa59511e5661b961416e93138870814f3c474367362524ccc6865a8558f2543cc8e1b2e7336e39e6cdb4ad6f09d0db6a20
+ state: STATE_CONFIRMED
+ type: SAFE
+ owner: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ metadata: ''
+ createdAt: '2024-07-12T15:32:08.254831Z'
+ updatedAt: '2024-07-12T15:32:45.265257Z'
+ '401':
+ description: Unauthorized - Invalid authentication
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid authorization
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: internal server error
+components:
+ schemas:
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ RelayerTransaction:
+ type: object
+ properties:
+ transactionID:
+ type: string
+ description: Unique identifier for the transaction
+ example: 0190b317-a1d3-7bec-9b91-eeb6dcd3a620
+ transactionHash:
+ type: string
+ description: Onchain transaction hash (available once confirmed)
+ example: '0x38cbfbeae8fffa4e2b187ee5978d3ee9cafc53af0363ed90a35b7ea9016535d8'
+ from:
+ $ref: '#/components/schemas/Address'
+ description: Signer address
+ example: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ to:
+ $ref: '#/components/schemas/Address'
+ description: Target contract address
+ example: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174'
+ proxyAddress:
+ $ref: '#/components/schemas/Address'
+ description: User's Polymarket proxy wallet address
+ example: '0x6d8c4e9adf5748af82dabe2c6225207770d6b4fa'
+ data:
+ type: string
+ description: Encoded transaction data (0x-prefixed hex string)
+ example: 0x...
+ nonce:
+ type: string
+ description: Transaction nonce
+ example: '60'
+ value:
+ type: string
+ description: Transaction value
+ example: ''
+ signature:
+ type: string
+ description: Transaction signature (0x-prefixed hex string)
+ example: >-
+ 0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20
+ state:
+ type: string
+ description: Current state of the transaction
+ enum:
+ - STATE_NEW
+ - STATE_EXECUTED
+ - STATE_MINED
+ - STATE_CONFIRMED
+ - STATE_INVALID
+ - STATE_FAILED
+ example: STATE_CONFIRMED
+ type:
+ type: string
+ description: Transaction type
+ enum:
+ - SAFE
+ - PROXY
+ example: SAFE
+ owner:
+ $ref: '#/components/schemas/Address'
+ description: Owner address
+ example: '0x6e0c80c90ea6c15917308f820eac91ce2724b5b5'
+ metadata:
+ type: string
+ description: Transaction metadata
+ example: ''
+ createdAt:
+ type: string
+ format: date-time
+ description: Timestamp when the transaction was created
+ example: '2024-07-14T21:13:08.819782Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Timestamp when the transaction was last updated
+ example: '2024-07-14T21:13:46.576639Z'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer/get-relayer-address-and-nonce.md b/PolymarketDocumentation-main/docs/api-reference/relayer/get-relayer-address-and-nonce.md
new file mode 100644
index 0000000..44b7e4b
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer/get-relayer-address-and-nonce.md
@@ -0,0 +1,126 @@
+> ## 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 relayer address and nonce
+
+> Fetches the relayer address and nonce for a specific user. Takes in the user's signer address and the type of nonce to retrieve.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml get /relay-payload
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /relay-payload:
+ get:
+ tags:
+ - Relayer
+ summary: Get relayer address and nonce
+ description: >
+ Fetches the relayer address and nonce for a specific user. Takes in the
+ user's signer address and the type of nonce to retrieve.
+ parameters:
+ - name: address
+ in: query
+ required: true
+ description: User's signer address
+ schema:
+ $ref: '#/components/schemas/Address'
+ example: '0x77837466dd64fb52ECD00C737F060d0ff5CCB575'
+ - name: type
+ in: query
+ required: true
+ description: Type of nonce to retrieve
+ schema:
+ type: string
+ enum:
+ - PROXY
+ - SAFE
+ example: PROXY
+ responses:
+ '200':
+ description: Relay payload retrieved successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RelayPayloadResponse'
+ example:
+ address: '0x4da9395388791c22684e03779c3de10934eb9cfb'
+ nonce: '31'
+ '400':
+ description: Bad Request - Missing or invalid query parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalidAddress:
+ value:
+ error: invalid address
+ invalidType:
+ value:
+ error: invalid type
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+components:
+ schemas:
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ RelayPayloadResponse:
+ type: object
+ properties:
+ address:
+ $ref: '#/components/schemas/Address'
+ description: Relayer address
+ example: '0x4da9395388791c22684e03779c3de10934eb9cfb'
+ nonce:
+ type: string
+ description: Current nonce value
+ example: '31'
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/relayer/submit-a-transaction.md b/PolymarketDocumentation-main/docs/api-reference/relayer/submit-a-transaction.md
new file mode 100644
index 0000000..a06a98d
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/relayer/submit-a-transaction.md
@@ -0,0 +1,296 @@
+> ## 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.
+
+# Submit a transaction
+
+> Submit a transaction request to the Relayer. Authenticated using Builder API Keys or Relayer API Keys.
+
+Returns immediately with the `transactionID` and a `state` of `STATE_NEW`. The onchain transaction hash is **not** included in this response — poll `GET /transaction` with the returned `transactionID` to retrieve the `transactionHash` once the transaction has been broadcast.
+
+**Builder API Key auth headers:**
+- `POLY_BUILDER_API_KEY`
+- `POLY_BUILDER_TIMESTAMP`
+- `POLY_BUILDER_PASSPHRASE`
+- `POLY_BUILDER_SIGNATURE`
+
+**Relayer API Key auth headers:**
+- `RELAYER_API_KEY`
+- `RELAYER_API_KEY_ADDRESS`
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/relayer-openapi.yaml post /submit
+openapi: 3.0.3
+info:
+ title: Polymarket Relayer API
+ version: 1.0.0
+ description: HTTP API for the Polymarket Relayer. Submit and track gasless transactions.
+servers:
+ - url: https://relayer-v2.polymarket.com
+ description: Polymarket Relayer API
+security: []
+tags:
+ - name: Relayer
+ description: Relayer transaction operations
+ - name: Relayer API Keys
+ description: >
+ Relayer API keys let a user authenticate requests to relayer endpoints
+ without Gamma auth.
+
+ However, Relayer API keys can only be created using Gamma auth. Every
+ address can create a maximum of 100 keys.
+
+
+ The API key auth headers are:
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+
+
+ `RELAYER_API_KEY_ADDRESS` must match the address that owns the key.
+paths:
+ /submit:
+ post:
+ tags:
+ - Relayer
+ summary: Submit a transaction
+ description: >
+ Submit a transaction request to the Relayer. Authenticated using Builder
+ API Keys or Relayer API Keys.
+
+
+ Returns immediately with the `transactionID` and a `state` of
+ `STATE_NEW`. The onchain transaction hash is **not** included in this
+ response — poll `GET /transaction` with the returned `transactionID` to
+ retrieve the `transactionHash` once the transaction has been broadcast.
+
+
+ **Builder API Key auth headers:**
+
+ - `POLY_BUILDER_API_KEY`
+
+ - `POLY_BUILDER_TIMESTAMP`
+
+ - `POLY_BUILDER_PASSPHRASE`
+
+ - `POLY_BUILDER_SIGNATURE`
+
+
+ **Relayer API Key auth headers:**
+
+ - `RELAYER_API_KEY`
+
+ - `RELAYER_API_KEY_ADDRESS`
+ parameters:
+ - name: POLY_BUILDER_API_KEY
+ in: header
+ required: false
+ description: Builder API key (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: POLY_BUILDER_TIMESTAMP
+ in: header
+ required: false
+ description: Unix timestamp (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: POLY_BUILDER_PASSPHRASE
+ in: header
+ required: false
+ description: Builder passphrase (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: POLY_BUILDER_SIGNATURE
+ in: header
+ required: false
+ description: HMAC-SHA256 signature (when using Builder API Key auth)
+ schema:
+ type: string
+ - name: RELAYER_API_KEY
+ in: header
+ required: false
+ description: Relayer API key (when using Relayer API Key auth)
+ schema:
+ type: string
+ - name: RELAYER_API_KEY_ADDRESS
+ in: header
+ required: false
+ description: Address that owns the key (when using Relayer API Key auth)
+ schema:
+ $ref: '#/components/schemas/Address'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubmitRequest'
+ example:
+ from: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ to: '0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB'
+ proxyWallet: '0x6d8c4e9aDF5748Af82Dabe2C6225207770d6B4fa'
+ data: 0x...
+ nonce: '60'
+ signature: >-
+ 0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20
+ signatureParams:
+ gasPrice: '0'
+ operation: '0'
+ safeTxnGas: '0'
+ baseGas: '0'
+ gasToken: '0x0000000000000000000000000000000000000000'
+ refundReceiver: '0x0000000000000000000000000000000000000000'
+ type: SAFE
+ responses:
+ '200':
+ description: Transaction submitted successfully
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubmitResponse'
+ example:
+ transactionID: 0190b317-a1d3-7bec-9b91-eeb6dcd3a620
+ state: STATE_NEW
+ '400':
+ description: Bad Request - Invalid transaction payload, fields, or signature
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalidPayload:
+ value:
+ error: invalid transaction request payload
+ validationError:
+ value:
+ error: bad request
+ '401':
+ description: Unauthorized - Invalid authentication
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid authorization
+ '429':
+ description: Too Many Requests - Quota exceeded
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: quota exceeded
+ '500':
+ description: Server Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ internalError:
+ value:
+ error: internal error
+ serverError:
+ value:
+ error: internal server error
+components:
+ schemas:
+ Address:
+ type: string
+ description: Ethereum address (0x-prefixed, 40 hex chars)
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x6e0c80c90ea6c15917308F820Eac91Ce2724B5b5'
+ SubmitRequest:
+ type: object
+ required:
+ - from
+ - to
+ - proxyWallet
+ - data
+ - nonce
+ - signature
+ - signatureParams
+ - type
+ properties:
+ from:
+ $ref: '#/components/schemas/Address'
+ description: Signer address
+ to:
+ $ref: '#/components/schemas/Address'
+ description: Target contract address
+ proxyWallet:
+ $ref: '#/components/schemas/Address'
+ description: User's Polymarket proxy wallet address
+ data:
+ type: string
+ description: Encoded transaction data (0x-prefixed hex string)
+ example: 0x...
+ nonce:
+ type: string
+ description: Transaction nonce
+ example: '60'
+ signature:
+ type: string
+ description: Transaction signature (0x-prefixed hex string)
+ example: >-
+ 0x01a060c734d7bdf4adde50c4a7e574036b1f8b12890911bdd1c1cfdcd77502381b89fa8a47c36f62a0b9f1cdfee7b260fd8108536db9f6b2089c02637e7de9fc20
+ signatureParams:
+ $ref: '#/components/schemas/SignatureParams'
+ type:
+ type: string
+ description: Transaction type
+ enum:
+ - SAFE
+ - PROXY
+ example: SAFE
+ SubmitResponse:
+ type: object
+ properties:
+ transactionID:
+ type: string
+ description: Unique identifier for the submitted transaction
+ example: 0190b317-a1d3-7bec-9b91-eeb6dcd3a620
+ state:
+ type: string
+ description: Current state of the transaction
+ example: STATE_NEW
+ ErrorResponse:
+ type: object
+ properties:
+ error:
+ type: string
+ required:
+ - error
+ SignatureParams:
+ type: object
+ properties:
+ gasPrice:
+ type: string
+ description: Gas price
+ example: '0'
+ operation:
+ type: string
+ description: Operation type
+ example: '0'
+ safeTxnGas:
+ type: string
+ description: Safe transaction gas
+ example: '0'
+ baseGas:
+ type: string
+ description: Base gas
+ example: '0'
+ gasToken:
+ $ref: '#/components/schemas/Address'
+ description: Gas token address
+ example: '0x0000000000000000000000000000000000000000'
+ refundReceiver:
+ $ref: '#/components/schemas/Address'
+ description: Refund receiver address
+ example: '0x0000000000000000000000000000000000000000'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rewards/get-current-active-rewards-configurations.md b/PolymarketDocumentation-main/docs/api-reference/rewards/get-current-active-rewards-configurations.md
new file mode 100644
index 0000000..3c9a315
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rewards/get-current-active-rewards-configurations.md
@@ -0,0 +1,233 @@
+> ## 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 current active rewards configurations
+
+> Returns all current active rewards configurations grouped by market.
+
+When `sponsored=true`, returns sponsored reward configurations instead.
+
+Results are paginated (500 items per page). Use next_cursor to fetch subsequent pages.
+A next_cursor value of "LTE=" indicates the last page.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rewards/markets/current
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rewards/markets/current:
+ get:
+ tags:
+ - Rewards
+ summary: Get current active rewards configurations
+ description: >
+ Returns all current active rewards configurations grouped by market.
+
+
+ When `sponsored=true`, returns sponsored reward configurations instead.
+
+
+ Results are paginated (500 items per page). Use next_cursor to fetch
+ subsequent pages.
+
+ A next_cursor value of "LTE=" indicates the last page.
+ operationId: getCurrentRewards
+ parameters:
+ - name: sponsored
+ in: query
+ description: >-
+ If true, returns sponsored reward configurations instead of standard
+ ones
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: next_cursor
+ in: query
+ description: Pagination cursor from previous response
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Successfully retrieved current rewards configurations
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedCurrentReward'
+ example:
+ limit: 500
+ count: 1
+ next_cursor: LTE=
+ data:
+ - condition_id: >-
+ 0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af
+ rewards_max_spread: 99
+ rewards_min_size: 10
+ rewards_config:
+ - id: 0
+ asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ start_date: '2024-03-01'
+ end_date: '2500-12-31'
+ rate_per_day: 2
+ total_rewards: 92
+ - id: 0
+ asset_address: '0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB'
+ start_date: '2024-03-01'
+ end_date: '2500-12-31'
+ rate_per_day: 1
+ total_rewards: 46
+ sponsored_daily_rate: 0.5
+ sponsors_count: 2
+ native_daily_rate: 2.5
+ total_daily_rate: 3
+ '400':
+ description: Bad request - Invalid next_cursor
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid next_cursor
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+components:
+ schemas:
+ PaginatedCurrentReward:
+ type: object
+ description: Paginated list of current reward configurations
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of items per page
+ count:
+ type: integer
+ description: Number of items in the current response
+ next_cursor:
+ type: string
+ description: Cursor for the next page. "LTE=" indicates the last page.
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/CurrentReward'
+ required:
+ - limit
+ - count
+ - next_cursor
+ - data
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ CurrentReward:
+ type: object
+ description: Current active reward configuration for a market
+ properties:
+ condition_id:
+ type: string
+ description: Condition ID of the market
+ rewards_max_spread:
+ type: number
+ description: Maximum spread for rewards eligibility
+ rewards_min_size:
+ type: number
+ description: Minimum order size for rewards eligibility
+ rewards_config:
+ type: array
+ items:
+ $ref: '#/components/schemas/CurrentRewardConfig'
+ sponsored_daily_rate:
+ type: number
+ format: double
+ description: Sponsored daily rate (omitted when zero)
+ sponsors_count:
+ type: integer
+ description: Number of sponsors (omitted when zero)
+ native_daily_rate:
+ type: number
+ format: double
+ description: Computed native daily rate excluding sponsors (omitted when zero)
+ total_daily_rate:
+ type: number
+ format: double
+ description: Computed total daily rate including sponsors (omitted when zero)
+ required:
+ - condition_id
+ CurrentRewardConfig:
+ type: object
+ description: Reward configuration entry for a current rewards market
+ properties:
+ id:
+ type: integer
+ description: Rewards config ID (always 0 on /rewards/markets/current)
+ asset_address:
+ type: string
+ description: Address of the reward asset
+ start_date:
+ type: string
+ format: date
+ description: Start date of the rewards period
+ end_date:
+ type: string
+ format: date
+ description: End date of the rewards period
+ rate_per_day:
+ type: number
+ format: double
+ description: Daily reward rate
+ total_rewards:
+ type: number
+ format: double
+ description: Total rewards amount
+ required:
+ - asset_address
+ - start_date
+ - rate_per_day
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rewards/get-earnings-for-user-by-date.md b/PolymarketDocumentation-main/docs/api-reference/rewards/get-earnings-for-user-by-date.md
new file mode 100644
index 0000000..3c53750
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rewards/get-earnings-for-user-by-date.md
@@ -0,0 +1,264 @@
+> ## 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 earnings for user by date
+
+> Returns an array of user earnings per market for a provided day.
+
+Requires CLOB L2 Auth headers.
+
+Results are paginated (100 items per page). Use next_cursor to fetch subsequent pages.
+A next_cursor value of "LTE=" indicates the last page.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rewards/user
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rewards/user:
+ get:
+ tags:
+ - Rewards
+ summary: Get earnings for user by date
+ description: >
+ Returns an array of user earnings per market for a provided day.
+
+
+ Requires CLOB L2 Auth headers.
+
+
+ Results are paginated (100 items per page). Use next_cursor to fetch
+ subsequent pages.
+
+ A next_cursor value of "LTE=" indicates the last page.
+ operationId: getEarningsForUserForDay
+ parameters:
+ - name: date
+ in: query
+ description: Date in YYYY-MM-DD format
+ required: true
+ schema:
+ type: string
+ format: date
+ example: '2024-03-26'
+ - name: signature_type
+ in: query
+ description: |
+ Signature type for address derivation (required for API KEY auth):
+ - 0: EOA
+ - 1: POLY_PROXY
+ - 2: POLY_GNOSIS_SAFE
+ required: false
+ schema:
+ type: integer
+ enum:
+ - 0
+ - 1
+ - 2
+ - name: maker_address
+ in: query
+ description: Maker address to query earnings for
+ required: false
+ schema:
+ type: string
+ example: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ - name: sponsored
+ in: query
+ description: If true, returns sponsored-only earnings
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: next_cursor
+ in: query
+ description: Pagination cursor from previous response
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Successfully retrieved user earnings
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedUserEarnings'
+ example:
+ limit: 100
+ count: 1
+ next_cursor: LTE=
+ data:
+ - date: '2024-03-26T00:00:00Z'
+ condition_id: >-
+ 0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af
+ asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ maker_address: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ earnings: 0.237519
+ asset_rate: 1
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_date:
+ summary: Invalid date format
+ value:
+ error: 'Invalid date (format: YYYY-MM-DD)'
+ invalid_signature_type:
+ summary: Invalid signature type
+ value:
+ error: Invalid signature_type
+ invalid_maker_address:
+ summary: Invalid maker address
+ value:
+ error: Invalid maker_address
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ PaginatedUserEarnings:
+ type: object
+ description: Paginated list of user earnings
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of items per page
+ count:
+ type: integer
+ description: Number of items in the current response
+ next_cursor:
+ type: string
+ description: Cursor for the next page. "LTE=" indicates the last page.
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/UserEarning'
+ required:
+ - limit
+ - count
+ - next_cursor
+ - data
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ UserEarning:
+ type: object
+ description: User earnings for a specific market on a given day
+ properties:
+ date:
+ type: string
+ format: date-time
+ description: Date of the earnings
+ condition_id:
+ type: string
+ description: Condition ID of the market
+ asset_address:
+ type: string
+ description: Address of the reward asset
+ maker_address:
+ type: string
+ description: Address of the maker
+ earnings:
+ type: number
+ format: double
+ description: Amount of earnings in the asset
+ asset_rate:
+ type: number
+ format: double
+ description: Exchange rate of the asset
+ required:
+ - date
+ - condition_id
+ - asset_address
+ - maker_address
+ - earnings
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rewards/get-multiple-markets-with-rewards.md b/PolymarketDocumentation-main/docs/api-reference/rewards/get-multiple-markets-with-rewards.md
new file mode 100644
index 0000000..572a0ce
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rewards/get-multiple-markets-with-rewards.md
@@ -0,0 +1,413 @@
+> ## 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 multiple markets with rewards
+
+> Returns a list of active markets with their reward configurations.
+Supports text search, tag filtering, numeric filters, and sorting.
+
+Results are paginated (100 items per page by default). Use next_cursor to fetch subsequent pages.
+A next_cursor value of "LTE=" indicates the last page.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rewards/markets/multi
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rewards/markets/multi:
+ get:
+ tags:
+ - Rewards
+ summary: Get multiple markets with rewards
+ description: >
+ Returns a list of active markets with their reward configurations.
+
+ Supports text search, tag filtering, numeric filters, and sorting.
+
+
+ Results are paginated (100 items per page by default). Use next_cursor
+ to fetch subsequent pages.
+
+ A next_cursor value of "LTE=" indicates the last page.
+ operationId: getMultiMarkets
+ parameters:
+ - name: q
+ in: query
+ description: Text search on market question/description
+ required: false
+ schema:
+ type: string
+ - name: tag_slug
+ in: query
+ description: >-
+ Filter by tag slug. Can be repeated for OR logic (e.g.,
+ ?tag_slug=sports&tag_slug=politics)
+ required: false
+ schema:
+ type: string
+ - name: event_id
+ in: query
+ description: >-
+ Filter by event ID. Can be repeated for multiple events (e.g.,
+ ?event_id=100&event_id=200)
+ required: false
+ schema:
+ type: string
+ - name: event_title
+ in: query
+ description: Search event titles using case-insensitive pattern matching
+ required: false
+ schema:
+ type: string
+ - name: order_by
+ in: query
+ description: Field to sort results by
+ required: false
+ schema:
+ type: string
+ enum:
+ - market_id
+ - created_at
+ - volume_24hr
+ - spread
+ - competitiveness
+ - max_spread
+ - min_size
+ - question
+ - one_day_price_change
+ - rate_per_day
+ - price
+ - end_date
+ - start_date
+ - reward_end_date
+ - name: position
+ in: query
+ description: Sort direction
+ required: false
+ schema:
+ type: string
+ enum:
+ - ASC
+ - DESC
+ - name: min_volume_24hr
+ in: query
+ description: Minimum 24-hour volume filter
+ required: false
+ schema:
+ type: number
+ format: double
+ - name: max_volume_24hr
+ in: query
+ description: Maximum 24-hour volume filter
+ required: false
+ schema:
+ type: number
+ format: double
+ - name: min_spread
+ in: query
+ description: Minimum spread filter
+ required: false
+ schema:
+ type: number
+ format: double
+ - name: max_spread
+ in: query
+ description: Maximum spread filter
+ required: false
+ schema:
+ type: number
+ format: double
+ - name: min_price
+ in: query
+ description: Minimum first token price filter
+ required: false
+ schema:
+ type: number
+ format: double
+ - name: max_price
+ in: query
+ description: Maximum first token price filter
+ required: false
+ schema:
+ type: number
+ format: double
+ - name: next_cursor
+ in: query
+ description: Pagination cursor from previous response
+ required: false
+ schema:
+ type: string
+ - name: page_size
+ in: query
+ description: Number of items per page (max 500, values above are capped)
+ required: false
+ schema:
+ type: integer
+ default: 100
+ maximum: 500
+ responses:
+ '200':
+ description: Successfully retrieved markets with rewards
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedMultiMarketInfo'
+ example:
+ limit: 50
+ count: 1
+ next_cursor: NQ==
+ data:
+ - condition_id: >-
+ 0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af
+ event_id: '12345'
+ event_slug: 2024-us-election
+ created_at: '2024-05-01T12:00:00Z'
+ group_item_title: ''
+ image: https://example.com/image.png
+ market_competitiveness: 0.42
+ market_id: '248849'
+ market_slug: will-trump-win-the-2024-iowa-caucus
+ one_day_price_change: 0.03
+ question: Will Trump win the 2024 Iowa Caucus?
+ rewards_max_spread: 99
+ rewards_min_size: 10
+ spread: 0.12
+ end_date: '2024-08-10 00:00:00'
+ tokens:
+ - token_id: >-
+ 1343197538147866997676250008839231694243646439454152539053893078719042421992
+ outcome: 'YES'
+ price: 0.8
+ - token_id: >-
+ 16678291189211314787145083999015737376658799626183230671758641503291735614088
+ outcome: 'NO'
+ price: 0.2
+ volume_24hr: 12345.67
+ rewards_config:
+ - id: 7
+ asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ start_date: '2024-03-01'
+ end_date: '2500-12-31'
+ rate_per_day: 2
+ total_rewards: 92
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_order_by:
+ summary: Invalid order_by value
+ value:
+ error: Invalid order_by
+ invalid_position:
+ summary: Invalid position value
+ value:
+ error: Invalid position
+ invalid_cursor:
+ summary: Invalid pagination cursor
+ value:
+ error: Invalid next_cursor
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+components:
+ schemas:
+ PaginatedMultiMarketInfo:
+ type: object
+ description: Paginated list of markets with rewards and trading metrics
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of items per page
+ count:
+ type: integer
+ description: Number of items in the current response
+ next_cursor:
+ type: string
+ description: Cursor for the next page. "LTE=" indicates the last page.
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/MultiMarketInfo'
+ required:
+ - limit
+ - count
+ - next_cursor
+ - data
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ MultiMarketInfo:
+ type: object
+ description: Market with rewards configuration and trading metrics
+ properties:
+ condition_id:
+ type: string
+ description: Condition ID of the market
+ event_id:
+ type: string
+ description: Event ID
+ event_slug:
+ type: string
+ description: URL slug for the event
+ created_at:
+ type: string
+ format: date-time
+ description: Market creation timestamp
+ group_item_title:
+ type: string
+ description: Title within an event group
+ image:
+ type: string
+ description: URL to market image
+ market_competitiveness:
+ type: number
+ format: double
+ description: Competitiveness score of the market
+ market_id:
+ type: string
+ description: Market ID
+ market_slug:
+ type: string
+ description: URL slug for the market
+ one_day_price_change:
+ type: number
+ format: double
+ description: Price change over the last 24 hours
+ question:
+ type: string
+ description: Market question
+ rewards_max_spread:
+ type: number
+ description: Maximum spread for rewards eligibility
+ rewards_min_size:
+ type: number
+ description: Minimum order size for rewards eligibility
+ spread:
+ type: number
+ format: double
+ description: Current spread
+ end_date:
+ type: string
+ description: Market end date
+ tokens:
+ type: array
+ items:
+ $ref: '#/components/schemas/RewardsToken'
+ volume_24hr:
+ type: number
+ format: double
+ description: 24-hour trading volume
+ rewards_config:
+ type: array
+ items:
+ $ref: '#/components/schemas/RewardsConfig'
+ required:
+ - condition_id
+ - market_id
+ - question
+ - tokens
+ RewardsToken:
+ type: object
+ description: Token information for rewards markets
+ properties:
+ token_id:
+ type: string
+ description: Token ID
+ outcome:
+ type: string
+ description: Outcome name (e.g., "YES", "NO")
+ price:
+ type: number
+ format: double
+ description: Current price of the token
+ required:
+ - token_id
+ - outcome
+ RewardsConfig:
+ type: object
+ description: Rewards configuration for a market
+ properties:
+ id:
+ type: integer
+ description: Rewards config ID
+ asset_address:
+ type: string
+ description: Address of the reward asset
+ start_date:
+ type: string
+ format: date
+ description: Start date of the rewards period
+ end_date:
+ type: string
+ format: date
+ description: End date of the rewards period
+ rate_per_day:
+ type: number
+ format: double
+ description: Daily reward rate
+ total_rewards:
+ type: number
+ format: double
+ description: Total rewards amount
+ remaining_reward_amount:
+ type: number
+ format: double
+ description: Remaining reward amount
+ total_days:
+ type: integer
+ description: Total number of days in the rewards period
+ required:
+ - asset_address
+ - start_date
+ - rate_per_day
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rewards/get-raw-rewards-for-a-specific-market.md b/PolymarketDocumentation-main/docs/api-reference/rewards/get-raw-rewards-for-a-specific-market.md
new file mode 100644
index 0000000..5b91a1a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rewards/get-raw-rewards-for-a-specific-market.md
@@ -0,0 +1,293 @@
+> ## 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 raw rewards for a specific market
+
+> Returns an array of present and future rewards configured on a market.
+
+When `sponsored=true`, sponsored daily rates are folded into each config's
+`rate_per_day` .
+
+Results are paginated (100 items per page). Use next_cursor to fetch subsequent pages.
+A next_cursor value of "LTE=" indicates the last page.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rewards/markets/{condition_id}
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rewards/markets/{condition_id}:
+ get:
+ tags:
+ - Rewards
+ summary: Get raw rewards for a specific market
+ description: >
+ Returns an array of present and future rewards configured on a market.
+
+
+ When `sponsored=true`, sponsored daily rates are folded into each
+ config's
+
+ `rate_per_day` .
+
+
+ Results are paginated (100 items per page). Use next_cursor to fetch
+ subsequent pages.
+
+ A next_cursor value of "LTE=" indicates the last page.
+ operationId: getRawRewardsForMarket
+ parameters:
+ - name: condition_id
+ in: path
+ required: true
+ description: The condition ID of the market
+ schema:
+ type: string
+ example: '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af'
+ - name: sponsored
+ in: query
+ description: If true, folds sponsored daily rates into each config's rate_per_day
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: next_cursor
+ in: query
+ description: Pagination cursor from previous response
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: Successfully retrieved rewards for market
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedMarketReward'
+ example:
+ limit: 100
+ count: 1
+ next_cursor: LTE=
+ data:
+ - condition_id: >-
+ 0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af
+ question: Will Trump win the 2024 Iowa Caucus?
+ market_slug: will-trump-win-the-2024-iowa-caucus
+ event_slug: will-trump-win-the-2024-iowa-caucus
+ image: >-
+ https://polymarket-upload.s3.us-east-2.amazonaws.com/trump1+copy.png
+ rewards_max_spread: 99
+ rewards_min_size: 10
+ market_competitiveness: 0.42
+ tokens:
+ - token_id: >-
+ 1343197538147866997676250008839231694243646439454152539053893078719042421992
+ outcome: 'YES'
+ price: 0.8
+ - token_id: >-
+ 16678291189211314787145083999015737376658799626183230671758641503291735614088
+ outcome: 'NO'
+ price: 0.2
+ rewards_config:
+ - id: 1
+ asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ start_date: '2024-03-01'
+ end_date: '2500-12-31'
+ rate_per_day: 0.25
+ total_rewards: 0
+ total_days: 174161
+ - id: 2
+ asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ start_date: '2024-03-01'
+ end_date: '2024-05-31'
+ rate_per_day: 1
+ total_rewards: 92
+ total_days: 92
+ '400':
+ description: Bad request - Invalid market or next_cursor
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_market:
+ summary: Empty condition ID
+ value:
+ error: Invalid market
+ invalid_cursor:
+ summary: Invalid pagination cursor
+ value:
+ error: Invalid next_cursor
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+components:
+ schemas:
+ PaginatedMarketReward:
+ type: object
+ description: Paginated list of market reward configurations
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of items per page
+ count:
+ type: integer
+ description: Number of items in the current response
+ next_cursor:
+ type: string
+ description: Cursor for the next page. "LTE=" indicates the last page.
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/MarketReward'
+ required:
+ - limit
+ - count
+ - next_cursor
+ - data
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ MarketReward:
+ type: object
+ description: Market with raw reward configurations
+ properties:
+ condition_id:
+ type: string
+ description: Condition ID of the market
+ question:
+ type: string
+ description: Market question
+ market_slug:
+ type: string
+ description: URL slug for the market
+ event_slug:
+ type: string
+ description: URL slug for the event
+ image:
+ type: string
+ description: URL to market image
+ rewards_max_spread:
+ type: number
+ description: Maximum spread for rewards eligibility
+ rewards_min_size:
+ type: number
+ description: Minimum order size for rewards eligibility
+ market_competitiveness:
+ type: number
+ format: double
+ description: Competitiveness score of the market
+ tokens:
+ type: array
+ items:
+ $ref: '#/components/schemas/RewardsToken'
+ rewards_config:
+ type: array
+ items:
+ $ref: '#/components/schemas/RewardsConfig'
+ required:
+ - condition_id
+ - question
+ - tokens
+ RewardsToken:
+ type: object
+ description: Token information for rewards markets
+ properties:
+ token_id:
+ type: string
+ description: Token ID
+ outcome:
+ type: string
+ description: Outcome name (e.g., "YES", "NO")
+ price:
+ type: number
+ format: double
+ description: Current price of the token
+ required:
+ - token_id
+ - outcome
+ RewardsConfig:
+ type: object
+ description: Rewards configuration for a market
+ properties:
+ id:
+ type: integer
+ description: Rewards config ID
+ asset_address:
+ type: string
+ description: Address of the reward asset
+ start_date:
+ type: string
+ format: date
+ description: Start date of the rewards period
+ end_date:
+ type: string
+ format: date
+ description: End date of the rewards period
+ rate_per_day:
+ type: number
+ format: double
+ description: Daily reward rate
+ total_rewards:
+ type: number
+ format: double
+ description: Total rewards amount
+ remaining_reward_amount:
+ type: number
+ format: double
+ description: Remaining reward amount
+ total_days:
+ type: integer
+ description: Total number of days in the rewards period
+ required:
+ - asset_address
+ - start_date
+ - rate_per_day
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rewards/get-reward-percentages-for-user.md b/PolymarketDocumentation-main/docs/api-reference/rewards/get-reward-percentages-for-user.md
new file mode 100644
index 0000000..cfb688d
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rewards/get-reward-percentages-for-user.md
@@ -0,0 +1,181 @@
+> ## 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 reward percentages for user
+
+> Returns the real-time percentages of rewards that a user is earning per market.
+
+The response is a map of condition_id to the percentage of total rewards
+the user is currently earning in that market.
+
+Requires CLOB L2 Auth headers.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rewards/user/percentages
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rewards/user/percentages:
+ get:
+ tags:
+ - Rewards
+ summary: Get reward percentages for user
+ description: >
+ Returns the real-time percentages of rewards that a user is earning per
+ market.
+
+
+ The response is a map of condition_id to the percentage of total rewards
+
+ the user is currently earning in that market.
+
+
+ Requires CLOB L2 Auth headers.
+ operationId: getRewardPercentagesForUser
+ parameters:
+ - name: signature_type
+ in: query
+ description: |
+ Signature type for address derivation (required for API KEY auth):
+ - 0: EOA
+ - 1: POLY_PROXY
+ - 2: POLY_GNOSIS_SAFE
+ required: false
+ schema:
+ type: integer
+ enum:
+ - 0
+ - 1
+ - 2
+ - name: maker_address
+ in: query
+ description: Maker address to query percentages for
+ required: false
+ schema:
+ type: string
+ example: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ responses:
+ '200':
+ description: Successfully retrieved reward percentages
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: number
+ format: double
+ description: Map of condition_id to reward percentage
+ example:
+ '0x296ea2f3ad438ce7ead77f40d0159bf3e5d8be146f6f615fa253b00e02243f5c': 20
+ '0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af': 20
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_signature_type:
+ summary: Invalid signature type
+ value:
+ error: Invalid signature_type
+ invalid_maker_address:
+ summary: Invalid maker address
+ value:
+ error: Invalid maker_address
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rewards/get-total-earnings-for-user-by-date.md b/PolymarketDocumentation-main/docs/api-reference/rewards/get-total-earnings-for-user-by-date.md
new file mode 100644
index 0000000..85498e9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rewards/get-total-earnings-for-user-by-date.md
@@ -0,0 +1,226 @@
+> ## 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 total earnings for user by date
+
+> Returns the summed total rewards earnings for a user on a provided day,
+grouped by asset address.
+
+Requires CLOB L2 Auth headers.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rewards/user/total
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rewards/user/total:
+ get:
+ tags:
+ - Rewards
+ summary: Get total earnings for user by date
+ description: |
+ Returns the summed total rewards earnings for a user on a provided day,
+ grouped by asset address.
+
+ Requires CLOB L2 Auth headers.
+ operationId: getTotalEarningsForUserForDay
+ parameters:
+ - name: date
+ in: query
+ description: Date in YYYY-MM-DD format
+ required: true
+ schema:
+ type: string
+ format: date
+ example: '2024-03-26'
+ - name: signature_type
+ in: query
+ description: |
+ Signature type for address derivation (required for API KEY auth):
+ - 0: EOA
+ - 1: POLY_PROXY
+ - 2: POLY_GNOSIS_SAFE
+ required: false
+ schema:
+ type: integer
+ enum:
+ - 0
+ - 1
+ - 2
+ - name: maker_address
+ in: query
+ description: Maker address to query earnings for
+ required: false
+ schema:
+ type: string
+ example: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ - name: sponsored
+ in: query
+ description: If true, aggregates both native and sponsored earnings
+ required: false
+ schema:
+ type: boolean
+ default: false
+ responses:
+ '200':
+ description: Successfully retrieved total user earnings
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TotalUserEarning'
+ example:
+ - date: '2024-04-09T00:00:00Z'
+ asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ maker_address: '0xD527CCdBEB6478488c848465F9947bDA3C2e6994'
+ earnings: 1.59984
+ asset_rate: 0.999357
+ - date: '2024-04-09T00:00:00Z'
+ asset_address: '0x69308FB512518e39F9b16112fA8d994F4e2Bf8bB'
+ maker_address: '0xD527CCdBEB6478488c848465F9947bDA3C2e6994'
+ earnings: 8.187219
+ asset_rate: 3.51
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_date:
+ summary: Invalid date format
+ value:
+ error: 'Invalid date (format: YYYY-MM-DD)'
+ invalid_signature_type:
+ summary: Invalid signature type
+ value:
+ error: Invalid signature_type
+ invalid_maker_address:
+ summary: Invalid maker address
+ value:
+ error: Invalid maker_address
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ TotalUserEarning:
+ type: object
+ description: Total user earnings for a given day grouped by asset
+ properties:
+ date:
+ type: string
+ format: date-time
+ description: Date of the earnings
+ asset_address:
+ type: string
+ description: Address of the reward asset
+ maker_address:
+ type: string
+ description: Address of the maker
+ earnings:
+ type: number
+ format: double
+ description: Total amount of earnings in the asset
+ asset_rate:
+ type: number
+ format: double
+ description: Exchange rate of the asset
+ required:
+ - date
+ - asset_address
+ - maker_address
+ - earnings
+ - asset_rate
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/rewards/get-user-earnings-and-markets-configuration.md b/PolymarketDocumentation-main/docs/api-reference/rewards/get-user-earnings-and-markets-configuration.md
new file mode 100644
index 0000000..e1de660
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/rewards/get-user-earnings-and-markets-configuration.md
@@ -0,0 +1,503 @@
+> ## 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 user earnings and markets configuration
+
+> Returns an array of current rewards including user earnings and live percentages
+per market for a provided day.
+
+Results are paginated (100 items per page by default, max 500). Use next_cursor to fetch subsequent pages.
+A next_cursor value of "LTE=" indicates the last page.
+
+Requires CLOB L2 Auth headers.
+
+Optional features:
+- Search by question/description using the `q` parameter
+- Filter by tag slugs using `tag_slug` parameter (multiple values are OR'ed)
+- Filter by favorite markets using `favorite_markets=true`
+- Sort by various fields using `order_by` and `position` parameters
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /rewards/user/markets
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /rewards/user/markets:
+ get:
+ tags:
+ - Rewards
+ summary: Get user earnings and markets configuration
+ description: >
+ Returns an array of current rewards including user earnings and live
+ percentages
+
+ per market for a provided day.
+
+
+ Results are paginated (100 items per page by default, max 500). Use
+ next_cursor to fetch subsequent pages.
+
+ A next_cursor value of "LTE=" indicates the last page.
+
+
+ Requires CLOB L2 Auth headers.
+
+
+ Optional features:
+
+ - Search by question/description using the `q` parameter
+
+ - Filter by tag slugs using `tag_slug` parameter (multiple values are
+ OR'ed)
+
+ - Filter by favorite markets using `favorite_markets=true`
+
+ - Sort by various fields using `order_by` and `position` parameters
+ operationId: getUserEarningsAndMarketsConfig
+ parameters:
+ - name: date
+ in: query
+ description: Date in YYYY-MM-DD format. Defaults to current date if not provided.
+ required: false
+ schema:
+ type: string
+ format: date
+ example: '2024-03-26'
+ - name: signature_type
+ in: query
+ description: |
+ Signature type for address derivation (required for API KEY auth):
+ - 0: EOA
+ - 1: POLY_PROXY
+ - 2: POLY_GNOSIS_SAFE
+ required: false
+ schema:
+ type: integer
+ enum:
+ - 0
+ - 1
+ - 2
+ - name: maker_address
+ in: query
+ description: Maker address to query data for
+ required: false
+ schema:
+ type: string
+ example: '0xFeA4cB3dD4ca7CefD3368653B7D6FF9BcDFca604'
+ - name: sponsored
+ in: query
+ description: If true, returns sponsored reward earnings
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: next_cursor
+ in: query
+ description: Pagination cursor from previous response
+ required: false
+ schema:
+ type: string
+ - name: page_size
+ in: query
+ description: Number of items per page (max 500, values above are capped)
+ required: false
+ schema:
+ type: integer
+ default: 100
+ maximum: 500
+ - name: q
+ in: query
+ description: Search query to filter markets by question/description
+ required: false
+ schema:
+ type: string
+ - name: tag_slug
+ in: query
+ description: Filter by tag slug (can be repeated for OR logic)
+ required: false
+ schema:
+ type: string
+ - name: favorite_markets
+ in: query
+ description: If true, only show markets favorited by the user (requires auth)
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: no_competition
+ in: query
+ description: Filter for markets with no competition
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: only_mergeable
+ in: query
+ description: Filter for only mergeable markets
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: only_open_orders
+ in: query
+ description: Filter for markets where user has open orders
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: only_open_positions
+ in: query
+ description: Filter for markets where user has open positions
+ required: false
+ schema:
+ type: boolean
+ default: false
+ - name: order_by
+ in: query
+ description: Field to sort by
+ required: false
+ schema:
+ type: string
+ enum:
+ - max_spread
+ - min_size
+ - end_date
+ - earning_percentage
+ - rate_per_day
+ - earnings
+ - spread
+ - competitiveness
+ - question
+ - price
+ - market
+ - volume_24hr
+ - name: position
+ in: query
+ description: Sort direction
+ required: false
+ schema:
+ type: string
+ enum:
+ - ASC
+ - DESC
+ responses:
+ '200':
+ description: Successfully retrieved user earnings and market configurations
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaginatedUserRewardsMarkets'
+ example:
+ limit: 100
+ count: 1
+ total_count: 42
+ next_cursor: LTE=
+ data:
+ - condition_id: >-
+ 0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af
+ market_id: '248849'
+ event_id: '12345'
+ question: Will Trump win the 2024 Iowa Caucus?
+ market_slug: will-trump-win-the-2024-iowa-caucus
+ event_slug: will-trump-win-the-2024-iowa-caucus
+ image: >-
+ https://polymarket-upload.s3.us-east-2.amazonaws.com/trump1+copy.png
+ rewards_max_spread: 99
+ rewards_min_size: 10
+ volume_24hr: 12345.67
+ spread: 0.12
+ market_competitiveness: 0.42
+ tokens:
+ - token_id: >-
+ 1343197538147866997676250008839231694243646439454152539053893078719042421992
+ outcome: 'YES'
+ price: 0.8
+ - token_id: >-
+ 16678291189211314787145083999015737376658799626183230671758641503291735614088
+ outcome: 'NO'
+ price: 0.2
+ rewards_config:
+ - id: 0
+ asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ start_date: '2024-03-01'
+ end_date: '2500-12-31'
+ rate_per_day: 2
+ total_rewards: 92
+ maker_address: '0xD527CCdBEB6478488c848465F9947bDA3C2e6994'
+ earning_percentage: 30
+ earnings:
+ - asset_address: '0x9c4E1703476E875070EE25b56A58B008CFb8FA78'
+ earnings: 0.585051
+ asset_rate: 1.001
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_date:
+ summary: Invalid date format
+ value:
+ error: 'Invalid date (format: YYYY-MM-DD)'
+ invalid_signature_type:
+ summary: Invalid signature type
+ value:
+ error: Invalid signature_type
+ favorite_requires_auth:
+ summary: Favorite markets requires auth
+ value:
+ error: favorite_markets query argument requires authentication
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ PaginatedUserRewardsMarkets:
+ type: object
+ description: Paginated list of user rewards markets
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of items per page
+ count:
+ type: integer
+ description: Number of items in the current response
+ total_count:
+ type: integer
+ description: Total number of items across all pages
+ next_cursor:
+ type: string
+ description: Cursor for the next page. "LTE=" indicates the last page.
+ data:
+ type: array
+ items:
+ $ref: '#/components/schemas/UserRewardsMarket'
+ required:
+ - limit
+ - count
+ - next_cursor
+ - data
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ UserRewardsMarket:
+ type: object
+ description: Market with user rewards earnings and configuration
+ properties:
+ condition_id:
+ type: string
+ description: Condition ID of the market
+ market_id:
+ type: string
+ description: Market ID
+ event_id:
+ type: string
+ description: Event ID
+ question:
+ type: string
+ description: Market question
+ market_slug:
+ type: string
+ description: URL slug for the market
+ event_slug:
+ type: string
+ description: URL slug for the event
+ image:
+ type: string
+ description: URL to market image
+ rewards_max_spread:
+ type: number
+ description: Maximum spread for rewards eligibility
+ rewards_min_size:
+ type: number
+ description: Minimum order size for rewards eligibility
+ volume_24hr:
+ type: number
+ format: double
+ description: 24-hour trading volume
+ spread:
+ type: number
+ format: double
+ description: Current spread
+ market_competitiveness:
+ type: number
+ format: double
+ description: Competitiveness score of the market
+ tokens:
+ type: array
+ items:
+ $ref: '#/components/schemas/RewardsToken'
+ rewards_config:
+ type: array
+ items:
+ $ref: '#/components/schemas/CurrentRewardConfig'
+ maker_address:
+ type: string
+ description: Maker address
+ earning_percentage:
+ type: number
+ format: double
+ description: Percentage of total rewards the user is earning
+ earnings:
+ type: array
+ items:
+ $ref: '#/components/schemas/AssetEarning'
+ required:
+ - condition_id
+ - market_id
+ - question
+ - tokens
+ RewardsToken:
+ type: object
+ description: Token information for rewards markets
+ properties:
+ token_id:
+ type: string
+ description: Token ID
+ outcome:
+ type: string
+ description: Outcome name (e.g., "YES", "NO")
+ price:
+ type: number
+ format: double
+ description: Current price of the token
+ required:
+ - token_id
+ - outcome
+ CurrentRewardConfig:
+ type: object
+ description: Reward configuration entry for a current rewards market
+ properties:
+ id:
+ type: integer
+ description: Rewards config ID (always 0 on /rewards/markets/current)
+ asset_address:
+ type: string
+ description: Address of the reward asset
+ start_date:
+ type: string
+ format: date
+ description: Start date of the rewards period
+ end_date:
+ type: string
+ format: date
+ description: End date of the rewards period
+ rate_per_day:
+ type: number
+ format: double
+ description: Daily reward rate
+ total_rewards:
+ type: number
+ format: double
+ description: Total rewards amount
+ required:
+ - asset_address
+ - start_date
+ - rate_per_day
+ AssetEarning:
+ type: object
+ description: Earnings for a specific asset
+ properties:
+ asset_address:
+ type: string
+ description: Address of the reward asset
+ earnings:
+ type: number
+ format: double
+ description: Amount of earnings
+ asset_rate:
+ type: number
+ format: double
+ description: Exchange rate of the asset
+ required:
+ - asset_address
+ - earnings
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/search/search-markets-events-and-profiles.md b/PolymarketDocumentation-main/docs/api-reference/search/search-markets-events-and-profiles.md
new file mode 100644
index 0000000..9089a2f
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/search/search-markets-events-and-profiles.md
@@ -0,0 +1,1367 @@
+> ## 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.
+
+# Search markets, events, and profiles
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /public-search
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /public-search:
+ get:
+ tags:
+ - Search
+ summary: Search markets, events, and profiles
+ operationId: publicSearch
+ parameters:
+ - name: q
+ in: query
+ required: true
+ schema:
+ type: string
+ - name: cache
+ in: query
+ schema:
+ type: boolean
+ - name: events_status
+ in: query
+ schema:
+ type: string
+ - name: limit_per_type
+ in: query
+ schema:
+ type: integer
+ - name: page
+ in: query
+ schema:
+ type: integer
+ - name: events_tag
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: keep_closed_markets
+ in: query
+ schema:
+ type: integer
+ - name: sort
+ in: query
+ schema:
+ type: string
+ - name: ascending
+ in: query
+ schema:
+ type: boolean
+ - name: search_tags
+ in: query
+ schema:
+ type: boolean
+ - name: search_profiles
+ in: query
+ schema:
+ type: boolean
+ - name: recurrence
+ in: query
+ schema:
+ type: string
+ - name: exclude_tag_id
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: optimized
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Search results
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Search'
+components:
+ schemas:
+ Search:
+ type: object
+ properties:
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ nullable: true
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/SearchTag'
+ nullable: true
+ profiles:
+ type: array
+ items:
+ $ref: '#/components/schemas/Profile'
+ nullable: true
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ SearchTag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ slug:
+ type: string
+ event_count:
+ type: integer
+ Profile:
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ nullable: true
+ user:
+ type: integer
+ nullable: true
+ referral:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ utmSource:
+ type: string
+ nullable: true
+ utmMedium:
+ type: string
+ nullable: true
+ utmCampaign:
+ type: string
+ nullable: true
+ utmContent:
+ type: string
+ nullable: true
+ utmTerm:
+ type: string
+ nullable: true
+ walletActivated:
+ type: boolean
+ nullable: true
+ pseudonym:
+ type: string
+ nullable: true
+ displayUsernamePublic:
+ type: boolean
+ nullable: true
+ profileImage:
+ type: string
+ nullable: true
+ bio:
+ type: string
+ nullable: true
+ proxyWallet:
+ type: string
+ nullable: true
+ profileImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ isCloseOnly:
+ type: boolean
+ nullable: true
+ isCertReq:
+ type: boolean
+ nullable: true
+ certReqDate:
+ type: string
+ format: date-time
+ nullable: true
+ Pagination:
+ type: object
+ properties:
+ hasMore:
+ type: boolean
+ totalResults:
+ type: integer
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/series/get-series-by-id.md b/PolymarketDocumentation-main/docs/api-reference/series/get-series-by-id.md
new file mode 100644
index 0000000..850b731
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/series/get-series-by-id.md
@@ -0,0 +1,1209 @@
+> ## 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 series by id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /series/{id}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /series/{id}:
+ get:
+ tags:
+ - Series
+ summary: Get series by id
+ operationId: getSeries
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ - name: include_chat
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Series
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Series'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/series/list-series.md b/PolymarketDocumentation-main/docs/api-reference/series/list-series.md
new file mode 100644
index 0000000..10b9f87
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/series/list-series.md
@@ -0,0 +1,1259 @@
+> ## 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.
+
+# List series
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /series
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /series:
+ get:
+ tags:
+ - Series
+ summary: List series
+ operationId: listSeries
+ parameters:
+ - $ref: '#/components/parameters/limit'
+ - $ref: '#/components/parameters/offset'
+ - $ref: '#/components/parameters/order'
+ - $ref: '#/components/parameters/ascending'
+ - name: slug
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: categories_ids
+ in: query
+ schema:
+ type: array
+ items:
+ type: integer
+ - name: categories_labels
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: closed
+ in: query
+ schema:
+ type: boolean
+ - name: include_chat
+ in: query
+ schema:
+ type: boolean
+ - name: recurrence
+ in: query
+ schema:
+ type: string
+ - name: exclude_events
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: List of series
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+components:
+ parameters:
+ limit:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ offset:
+ name: offset
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ order:
+ name: order
+ in: query
+ schema:
+ type: string
+ description: Comma-separated list of fields to order by
+ ascending:
+ name: ascending
+ in: query
+ schema:
+ type: boolean
+ schemas:
+ Series:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ seriesType:
+ type: string
+ nullable: true
+ recurrence:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: string
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ pythTokenID:
+ type: string
+ nullable: true
+ cgAssetName:
+ type: string
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ commentCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ Event:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ creationDate:
+ type: string
+ format: date-time
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ liquidity:
+ type: number
+ nullable: true
+ volume:
+ type: number
+ nullable: true
+ openInterest:
+ type: number
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ subcategory:
+ type: string
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ published_at:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ featuredImage:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ parentEvent:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ negRiskMarketID:
+ type: string
+ nullable: true
+ negRiskFeeBips:
+ type: integer
+ nullable: true
+ commentCount:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ featuredImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ subEvents:
+ type: array
+ items:
+ type: string
+ nullable: true
+ markets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Market'
+ series:
+ type: array
+ items:
+ $ref: '#/components/schemas/Series'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ collections:
+ type: array
+ items:
+ $ref: '#/components/schemas/Collection'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ cyom:
+ type: boolean
+ nullable: true
+ closedTime:
+ type: string
+ format: date-time
+ nullable: true
+ showAllOutcomes:
+ type: boolean
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ enableNegRisk:
+ type: boolean
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ eventDate:
+ type: string
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ eventWeek:
+ type: integer
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ score:
+ type: string
+ nullable: true
+ elapsed:
+ type: string
+ nullable: true
+ period:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ ended:
+ type: boolean
+ nullable: true
+ finishedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gmpChartMode:
+ type: string
+ nullable: true
+ eventCreators:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventCreator'
+ tweetCount:
+ type: integer
+ nullable: true
+ chats:
+ type: array
+ items:
+ $ref: '#/components/schemas/Chat'
+ featuredOrder:
+ type: integer
+ nullable: true
+ estimateValue:
+ type: boolean
+ nullable: true
+ cantEstimate:
+ type: boolean
+ nullable: true
+ estimatedValue:
+ type: string
+ nullable: true
+ templates:
+ type: array
+ items:
+ $ref: '#/components/schemas/Template'
+ spreadsMainLine:
+ type: number
+ nullable: true
+ totalsMainLine:
+ type: number
+ nullable: true
+ carouselMap:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ gameStatus:
+ type: string
+ nullable: true
+ Collection:
+ type: object
+ properties:
+ id:
+ type: string
+ ticker:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ title:
+ type: string
+ nullable: true
+ subtitle:
+ type: string
+ nullable: true
+ collectionType:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ tags:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ headerImage:
+ type: string
+ nullable: true
+ layout:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ isTemplate:
+ type: boolean
+ nullable: true
+ templateVariables:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ headerImageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ Category:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ parentCategory:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: string
+ nullable: true
+ updatedBy:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+ Chat:
+ type: object
+ properties:
+ id:
+ type: string
+ channelId:
+ type: string
+ nullable: true
+ channelName:
+ type: string
+ nullable: true
+ channelImage:
+ type: string
+ nullable: true
+ live:
+ type: boolean
+ nullable: true
+ startTime:
+ type: string
+ format: date-time
+ nullable: true
+ endTime:
+ type: string
+ format: date-time
+ nullable: true
+ ImageOptimization:
+ type: object
+ properties:
+ id:
+ type: string
+ imageUrlSource:
+ type: string
+ nullable: true
+ imageUrlOptimized:
+ type: string
+ nullable: true
+ imageSizeKbSource:
+ type: number
+ nullable: true
+ imageSizeKbOptimized:
+ type: number
+ nullable: true
+ imageOptimizedComplete:
+ type: boolean
+ nullable: true
+ imageOptimizedLastUpdated:
+ type: string
+ nullable: true
+ relID:
+ type: integer
+ nullable: true
+ field:
+ type: string
+ nullable: true
+ relname:
+ type: string
+ nullable: true
+ Market:
+ type: object
+ properties:
+ id:
+ type: string
+ question:
+ type: string
+ nullable: true
+ conditionId:
+ type: string
+ slug:
+ type: string
+ nullable: true
+ twitterCardImage:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ endDate:
+ type: string
+ format: date-time
+ nullable: true
+ category:
+ type: string
+ nullable: true
+ ammType:
+ type: string
+ nullable: true
+ liquidity:
+ type: string
+ nullable: true
+ sponsorName:
+ type: string
+ nullable: true
+ sponsorImage:
+ type: string
+ nullable: true
+ startDate:
+ type: string
+ format: date-time
+ nullable: true
+ xAxisValue:
+ type: string
+ nullable: true
+ yAxisValue:
+ type: string
+ nullable: true
+ denominationToken:
+ type: string
+ nullable: true
+ fee:
+ type: string
+ nullable: true
+ image:
+ type: string
+ nullable: true
+ icon:
+ type: string
+ nullable: true
+ lowerBound:
+ type: string
+ nullable: true
+ upperBound:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ outcomePrices:
+ type: string
+ nullable: true
+ volume:
+ type: string
+ nullable: true
+ active:
+ type: boolean
+ nullable: true
+ marketType:
+ type: string
+ nullable: true
+ formatType:
+ type: string
+ nullable: true
+ lowerBoundDate:
+ type: string
+ nullable: true
+ upperBoundDate:
+ type: string
+ nullable: true
+ closed:
+ type: boolean
+ nullable: true
+ marketMakerAddress:
+ type: string
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ closedTime:
+ type: string
+ nullable: true
+ wideFormat:
+ type: boolean
+ nullable: true
+ new:
+ type: boolean
+ nullable: true
+ mailchimpTag:
+ type: string
+ nullable: true
+ featured:
+ type: boolean
+ nullable: true
+ archived:
+ type: boolean
+ nullable: true
+ resolvedBy:
+ type: string
+ nullable: true
+ restricted:
+ type: boolean
+ nullable: true
+ marketGroup:
+ type: integer
+ nullable: true
+ groupItemTitle:
+ type: string
+ nullable: true
+ groupItemThreshold:
+ type: string
+ nullable: true
+ questionID:
+ type: string
+ nullable: true
+ umaEndDate:
+ type: string
+ nullable: true
+ enableOrderBook:
+ type: boolean
+ nullable: true
+ orderPriceMinTickSize:
+ type: number
+ nullable: true
+ orderMinSize:
+ type: number
+ nullable: true
+ umaResolutionStatus:
+ type: string
+ nullable: true
+ curationOrder:
+ type: integer
+ nullable: true
+ volumeNum:
+ type: number
+ nullable: true
+ liquidityNum:
+ type: number
+ nullable: true
+ endDateIso:
+ type: string
+ nullable: true
+ startDateIso:
+ type: string
+ nullable: true
+ umaEndDateIso:
+ type: string
+ nullable: true
+ hasReviewedDates:
+ type: boolean
+ nullable: true
+ readyForCron:
+ type: boolean
+ nullable: true
+ commentsEnabled:
+ type: boolean
+ nullable: true
+ volume24hr:
+ type: number
+ nullable: true
+ volume1wk:
+ type: number
+ nullable: true
+ volume1mo:
+ type: number
+ nullable: true
+ volume1yr:
+ type: number
+ nullable: true
+ gameStartTime:
+ type: string
+ nullable: true
+ secondsDelay:
+ type: integer
+ nullable: true
+ clobTokenIds:
+ type: string
+ nullable: true
+ disqusThread:
+ type: string
+ nullable: true
+ shortOutcomes:
+ type: string
+ nullable: true
+ teamAID:
+ type: string
+ nullable: true
+ teamBID:
+ type: string
+ nullable: true
+ umaBond:
+ type: string
+ nullable: true
+ umaReward:
+ type: string
+ nullable: true
+ fpmmLive:
+ type: boolean
+ nullable: true
+ volume24hrAmm:
+ type: number
+ nullable: true
+ volume1wkAmm:
+ type: number
+ nullable: true
+ volume1moAmm:
+ type: number
+ nullable: true
+ volume1yrAmm:
+ type: number
+ nullable: true
+ volume24hrClob:
+ type: number
+ nullable: true
+ volume1wkClob:
+ type: number
+ nullable: true
+ volume1moClob:
+ type: number
+ nullable: true
+ volume1yrClob:
+ type: number
+ nullable: true
+ volumeAmm:
+ type: number
+ nullable: true
+ volumeClob:
+ type: number
+ nullable: true
+ liquidityAmm:
+ type: number
+ nullable: true
+ liquidityClob:
+ type: number
+ nullable: true
+ makerBaseFee:
+ type: integer
+ nullable: true
+ takerBaseFee:
+ type: integer
+ nullable: true
+ customLiveness:
+ type: integer
+ nullable: true
+ acceptingOrders:
+ type: boolean
+ nullable: true
+ notificationsEnabled:
+ type: boolean
+ nullable: true
+ score:
+ type: integer
+ nullable: true
+ imageOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ iconOptimized:
+ $ref: '#/components/schemas/ImageOptimization'
+ events:
+ type: array
+ items:
+ $ref: '#/components/schemas/Event'
+ categories:
+ type: array
+ items:
+ $ref: '#/components/schemas/Category'
+ tags:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+ creator:
+ type: string
+ nullable: true
+ ready:
+ type: boolean
+ nullable: true
+ funded:
+ type: boolean
+ nullable: true
+ pastSlugs:
+ type: string
+ nullable: true
+ readyTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ fundedTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ acceptingOrdersTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ competitive:
+ type: number
+ nullable: true
+ rewardsMinSize:
+ type: number
+ nullable: true
+ rewardsMaxSpread:
+ type: number
+ nullable: true
+ spread:
+ type: number
+ nullable: true
+ automaticallyResolved:
+ type: boolean
+ nullable: true
+ oneDayPriceChange:
+ type: number
+ nullable: true
+ oneHourPriceChange:
+ type: number
+ nullable: true
+ oneWeekPriceChange:
+ type: number
+ nullable: true
+ oneMonthPriceChange:
+ type: number
+ nullable: true
+ oneYearPriceChange:
+ type: number
+ nullable: true
+ lastTradePrice:
+ type: number
+ nullable: true
+ bestBid:
+ type: number
+ nullable: true
+ bestAsk:
+ type: number
+ nullable: true
+ automaticallyActive:
+ type: boolean
+ nullable: true
+ clearBookOnStart:
+ type: boolean
+ nullable: true
+ chartColor:
+ type: string
+ nullable: true
+ seriesColor:
+ type: string
+ nullable: true
+ showGmpSeries:
+ type: boolean
+ nullable: true
+ showGmpOutcome:
+ type: boolean
+ nullable: true
+ manualActivation:
+ type: boolean
+ nullable: true
+ negRiskOther:
+ type: boolean
+ nullable: true
+ gameId:
+ type: string
+ nullable: true
+ groupItemRange:
+ type: string
+ nullable: true
+ sportsMarketType:
+ type: string
+ nullable: true
+ line:
+ type: number
+ nullable: true
+ umaResolutionStatuses:
+ type: string
+ nullable: true
+ pendingDeployment:
+ type: boolean
+ nullable: true
+ deploying:
+ type: boolean
+ nullable: true
+ deployingTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ scheduledDeploymentTimestamp:
+ type: string
+ format: date-time
+ nullable: true
+ rfqEnabled:
+ type: boolean
+ nullable: true
+ eventStartTime:
+ type: string
+ format: date-time
+ nullable: true
+ feesEnabled:
+ type: boolean
+ nullable: true
+ feeSchedule:
+ $ref: '#/components/schemas/FeeSchedule'
+ EventCreator:
+ type: object
+ properties:
+ id:
+ type: string
+ creatorName:
+ type: string
+ nullable: true
+ creatorHandle:
+ type: string
+ nullable: true
+ creatorUrl:
+ type: string
+ nullable: true
+ creatorImage:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ Template:
+ type: object
+ properties:
+ id:
+ type: string
+ eventTitle:
+ type: string
+ nullable: true
+ eventSlug:
+ type: string
+ nullable: true
+ eventImage:
+ type: string
+ nullable: true
+ marketTitle:
+ type: string
+ nullable: true
+ description:
+ type: string
+ nullable: true
+ resolutionSource:
+ type: string
+ nullable: true
+ negRisk:
+ type: boolean
+ nullable: true
+ sortBy:
+ type: string
+ nullable: true
+ showMarketImages:
+ type: boolean
+ nullable: true
+ seriesSlug:
+ type: string
+ nullable: true
+ outcomes:
+ type: string
+ nullable: true
+ FeeSchedule:
+ type: object
+ properties:
+ exponent:
+ type: number
+ nullable: true
+ rate:
+ type: number
+ nullable: true
+ takerOnly:
+ type: boolean
+ nullable: true
+ rebateRate:
+ type: number
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/set-auto-cancel.md b/PolymarketDocumentation-main/docs/api-reference/set-auto-cancel.md
new file mode 100644
index 0000000..b6f08b2
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/set-auto-cancel.md
@@ -0,0 +1,364 @@
+> ## 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.
+
+# Set Auto-Cancel
+
+> Set a dead man switch that will cancel all open orders at the specified time.
+Time must be at least 5 seconds in the future, or `0` to clear an active
+schedule without triggering it. Posting a new auto-cancel replaces the
+previous one.
+
+The switch is one-shot: once the deadline elapses and your open orders are
+cancelled, the schedule clears automatically. Orders you place after the
+fire are not affected by the expired deadline — re-arm to extend
+protection.
+
+Each account may trigger auto-cancel at most 10 times per UTC day. Once
+that limit is reached, further attempts to arm a schedule are rejected with
+`auto_cancel_daily_limit_reached` until the next UTC day; clearing an
+existing schedule (`time: 0`) is always allowed.
+
+Use `GET /v1/account/auto-cancel` to check the current deadline, today's
+trigger count, and when the daily counter resets.
+
+Requires proxy signature, see [proxy signing](/http/signing#2-proxy-signing).
+
+
+Request Weight: **1** Action Weight: **10**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json patch /v1/trade/auto-cancel
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/trade/auto-cancel:
+ patch:
+ summary: Set Auto-Cancel
+ description: >
+ Set a dead man switch that will cancel all open orders at the specified
+ time.
+
+ Time must be at least 5 seconds in the future, or `0` to clear an active
+
+ schedule without triggering it. Posting a new auto-cancel replaces the
+
+ previous one.
+
+
+ The switch is one-shot: once the deadline elapses and your open orders
+ are
+
+ cancelled, the schedule clears automatically. Orders you place after the
+
+ fire are not affected by the expired deadline — re-arm to extend
+
+ protection.
+
+
+ Each account may trigger auto-cancel at most 10 times per UTC day. Once
+
+ that limit is reached, further attempts to arm a schedule are rejected
+ with
+
+ `auto_cancel_daily_limit_reached` until the next UTC day; clearing an
+
+ existing schedule (`time: 0`) is always allowed.
+
+
+ Use `GET /v1/account/auto-cancel` to check the current deadline, today's
+
+ trigger count, and when the daily counter resets.
+
+
+ Requires proxy signature, see [proxy
+ signing](/http/signing#2-proxy-signing).
+ operationId: setAutoCancel
+ requestBody:
+ description: Auto-cancel request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AutoCancelRequest'
+ examples:
+ enable:
+ summary: Enable auto-cancel
+ value:
+ op:
+ type: autoCancel
+ args:
+ time: 1767000045000
+ sig: >-
+ 0x2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b1c
+ salt: 666666666
+ ts: 1767000015000
+ disable:
+ summary: Disable auto-cancel
+ value:
+ op:
+ type: autoCancel
+ args:
+ time: 0
+ sig: >-
+ 0x8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f1c
+ salt: 666666667
+ ts: 1767000016000
+ responses:
+ '200':
+ description: The effective auto-cancel schedule after the update.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AutoCancelResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '404':
+ $ref: '#/components/responses/Error404Response'
+ '422':
+ $ref: '#/components/responses/Error422Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ AutoCancelRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpAutoCancel'
+ - $ref: '#/components/schemas/BaseOp'
+ AutoCancelResponse:
+ description: >
+ The effective auto-cancel schedule after the update. `deadline` echoes
+ the
+
+ armed Unix-ms time, or `0` when the schedule was cleared (`time: 0`).
+ type: object
+ required:
+ - status
+ - deadline
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ deadline:
+ $ref: '#/components/schemas/auto_cancel_deadline'
+ OpAutoCancel:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - autoCancel
+ args:
+ type: object
+ required:
+ - time
+ properties:
+ time:
+ $ref: '#/components/schemas/time'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ auto_cancel_deadline:
+ type: integer
+ description: |
+ Unix-ms deadline for the per-account auto-cancel dead-man-switch.
+ Zero means no schedule is armed. When the deadline elapses, every
+ open order on the account is cancelled and the schedule clears.
+ example: 1767000045000
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error404:
+ title: Error404
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ GenericRejected:
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ time:
+ type: integer
+ description: Timestamp in milliseconds
+ example: 1767225600000
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error404Response:
+ description: |
+ Not found — the endpoint is disabled on this venue (e.g. auto-cancel) or
+ the route does not exist. `error` is `not_found`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error404'
+ Error422Response:
+ description: |
+ Unprocessable Entity — the request was well-formed but a domain rule
+ rejected it on its merits (insufficient balance, invalid leverage,
+ proxy already exists, …). The body is the discriminated rejection
+ (`status: err`) with the engine error identifier in `error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericRejected'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/sports/get-sports-metadata-information.md b/PolymarketDocumentation-main/docs/api-reference/sports/get-sports-metadata-information.md
new file mode 100644
index 0000000..006518d
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/sports/get-sports-metadata-information.md
@@ -0,0 +1,90 @@
+> ## 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 sports metadata information
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /sports
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /sports:
+ get:
+ tags:
+ - Sports
+ summary: Get sports metadata information
+ operationId: getSportsMetadata
+ responses:
+ '200':
+ description: >-
+ List of sports metadata objects containing sport configuration
+ details, visual assets, and related identifiers
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SportsMetadata'
+components:
+ schemas:
+ SportsMetadata:
+ type: object
+ properties:
+ sport:
+ type: string
+ description: The sport identifier or abbreviation
+ image:
+ type: string
+ format: uri
+ description: URL to the sport's logo or image asset
+ resolution:
+ type: string
+ format: uri
+ description: >-
+ URL to the official resolution source for the sport (e.g., league
+ website)
+ ordering:
+ type: string
+ description: Preferred ordering for sport display, typically "home" or "away"
+ tags:
+ type: string
+ description: >-
+ Comma-separated list of tag IDs associated with the sport for
+ categorization and filtering
+ series:
+ type: string
+ description: >-
+ Series identifier linking the sport to a specific tournament or
+ season series
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/sports/get-valid-sports-market-types.md b/PolymarketDocumentation-main/docs/api-reference/sports/get-valid-sports-market-types.md
new file mode 100644
index 0000000..b8fe38d
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/sports/get-valid-sports-market-types.md
@@ -0,0 +1,65 @@
+> ## 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 valid sports market types
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /sports/market-types
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /sports/market-types:
+ get:
+ tags:
+ - Sports
+ summary: Get valid sports market types
+ operationId: getSportsMarketTypes
+ responses:
+ '200':
+ description: List of valid sports market types
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SportsMarketTypesResponse'
+components:
+ schemas:
+ SportsMarketTypesResponse:
+ type: object
+ properties:
+ marketTypes:
+ type: array
+ description: List of all valid sports market types
+ items:
+ type: string
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/sports/list-teams.md b/PolymarketDocumentation-main/docs/api-reference/sports/list-teams.md
new file mode 100644
index 0000000..5bc69f6
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/sports/list-teams.md
@@ -0,0 +1,137 @@
+> ## 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.
+
+# List teams
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /teams
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /teams:
+ get:
+ tags:
+ - Sports
+ summary: List teams
+ operationId: listTeams
+ parameters:
+ - $ref: '#/components/parameters/limit'
+ - $ref: '#/components/parameters/offset'
+ - $ref: '#/components/parameters/order'
+ - $ref: '#/components/parameters/ascending'
+ - name: league
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: name
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ - name: abbreviation
+ in: query
+ schema:
+ type: array
+ items:
+ type: string
+ responses:
+ '200':
+ description: List of teams
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Team'
+components:
+ parameters:
+ limit:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ offset:
+ name: offset
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ order:
+ name: order
+ in: query
+ schema:
+ type: string
+ description: Comma-separated list of fields to order by
+ ascending:
+ name: ascending
+ in: query
+ schema:
+ type: boolean
+ schemas:
+ Team:
+ type: object
+ properties:
+ id:
+ type: integer
+ name:
+ type: string
+ nullable: true
+ league:
+ type: string
+ nullable: true
+ record:
+ type: string
+ nullable: true
+ logo:
+ type: string
+ nullable: true
+ abbreviation:
+ type: string
+ nullable: true
+ alias:
+ type: string
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/tags/get-related-tags-relationships-by-tag-id.md b/PolymarketDocumentation-main/docs/api-reference/tags/get-related-tags-relationships-by-tag-id.md
new file mode 100644
index 0000000..5b900ce
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/tags/get-related-tags-relationships-by-tag-id.md
@@ -0,0 +1,94 @@
+> ## 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 related tags (relationships) by tag id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /tags/{id}/related-tags
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /tags/{id}/related-tags:
+ get:
+ tags:
+ - Tags
+ summary: Get related tags (relationships) by tag id
+ operationId: getRelatedTagsById
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ - name: omit_empty
+ in: query
+ schema:
+ type: boolean
+ - name: status
+ in: query
+ schema:
+ type: string
+ enum:
+ - active
+ - closed
+ - all
+ responses:
+ '200':
+ description: Related tag relationships
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RelatedTag'
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ RelatedTag:
+ type: object
+ properties:
+ id:
+ type: string
+ tagID:
+ type: integer
+ nullable: true
+ relatedTagID:
+ type: integer
+ nullable: true
+ rank:
+ type: integer
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/tags/get-related-tags-relationships-by-tag-slug.md b/PolymarketDocumentation-main/docs/api-reference/tags/get-related-tags-relationships-by-tag-slug.md
new file mode 100644
index 0000000..861a1d8
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/tags/get-related-tags-relationships-by-tag-slug.md
@@ -0,0 +1,94 @@
+> ## 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 related tags (relationships) by tag slug
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /tags/slug/{slug}/related-tags
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /tags/slug/{slug}/related-tags:
+ get:
+ tags:
+ - Tags
+ summary: Get related tags (relationships) by tag slug
+ operationId: getRelatedTagsBySlug
+ parameters:
+ - $ref: '#/components/parameters/pathSlug'
+ - name: omit_empty
+ in: query
+ schema:
+ type: boolean
+ - name: status
+ in: query
+ schema:
+ type: string
+ enum:
+ - active
+ - closed
+ - all
+ responses:
+ '200':
+ description: Related tag relationships
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RelatedTag'
+components:
+ parameters:
+ pathSlug:
+ name: slug
+ in: path
+ required: true
+ schema:
+ type: string
+ schemas:
+ RelatedTag:
+ type: object
+ properties:
+ id:
+ type: string
+ tagID:
+ type: integer
+ nullable: true
+ relatedTagID:
+ type: integer
+ nullable: true
+ rank:
+ type: integer
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/tags/get-tag-by-id.md b/PolymarketDocumentation-main/docs/api-reference/tags/get-tag-by-id.md
new file mode 100644
index 0000000..f9c23ed
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/tags/get-tag-by-id.md
@@ -0,0 +1,109 @@
+> ## 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 tag by id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /tags/{id}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /tags/{id}:
+ get:
+ tags:
+ - Tags
+ summary: Get tag by id
+ operationId: getTag
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ - name: include_template
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Tag
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Tag'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/tags/get-tag-by-slug.md b/PolymarketDocumentation-main/docs/api-reference/tags/get-tag-by-slug.md
new file mode 100644
index 0000000..71ba142
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/tags/get-tag-by-slug.md
@@ -0,0 +1,109 @@
+> ## 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 tag by slug
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /tags/slug/{slug}
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /tags/slug/{slug}:
+ get:
+ tags:
+ - Tags
+ summary: Get tag by slug
+ operationId: getTagBySlug
+ parameters:
+ - $ref: '#/components/parameters/pathSlug'
+ - name: include_template
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: Tag
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Tag'
+ '404':
+ description: Not found
+components:
+ parameters:
+ pathSlug:
+ name: slug
+ in: path
+ required: true
+ schema:
+ type: string
+ schemas:
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/tags/get-tags-related-to-a-tag-id.md b/PolymarketDocumentation-main/docs/api-reference/tags/get-tags-related-to-a-tag-id.md
new file mode 100644
index 0000000..152a3e1
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/tags/get-tags-related-to-a-tag-id.md
@@ -0,0 +1,117 @@
+> ## 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 tags related to a tag id
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /tags/{id}/related-tags/tags
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /tags/{id}/related-tags/tags:
+ get:
+ tags:
+ - Tags
+ summary: Get tags related to a tag id
+ operationId: getTagsRelatedToATagById
+ parameters:
+ - $ref: '#/components/parameters/pathId'
+ - name: omit_empty
+ in: query
+ schema:
+ type: boolean
+ - name: status
+ in: query
+ schema:
+ type: string
+ enum:
+ - active
+ - closed
+ - all
+ responses:
+ '200':
+ description: Related tags
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+components:
+ parameters:
+ pathId:
+ name: id
+ in: path
+ required: true
+ schema:
+ type: integer
+ schemas:
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/tags/get-tags-related-to-a-tag-slug.md b/PolymarketDocumentation-main/docs/api-reference/tags/get-tags-related-to-a-tag-slug.md
new file mode 100644
index 0000000..2933669
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/tags/get-tags-related-to-a-tag-slug.md
@@ -0,0 +1,117 @@
+> ## 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 tags related to a tag slug
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /tags/slug/{slug}/related-tags/tags
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /tags/slug/{slug}/related-tags/tags:
+ get:
+ tags:
+ - Tags
+ summary: Get tags related to a tag slug
+ operationId: getTagsRelatedToATagBySlug
+ parameters:
+ - $ref: '#/components/parameters/pathSlug'
+ - name: omit_empty
+ in: query
+ schema:
+ type: boolean
+ - name: status
+ in: query
+ schema:
+ type: string
+ enum:
+ - active
+ - closed
+ - all
+ responses:
+ '200':
+ description: Related tags
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+components:
+ parameters:
+ pathSlug:
+ name: slug
+ in: path
+ required: true
+ schema:
+ type: string
+ schemas:
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/tags/list-tags.md b/PolymarketDocumentation-main/docs/api-reference/tags/list-tags.md
new file mode 100644
index 0000000..126f8b4
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/tags/list-tags.md
@@ -0,0 +1,133 @@
+> ## 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.
+
+# List tags
+
+
+
+## OpenAPI
+
+````yaml /api-spec/gamma-openapi.yaml get /tags
+openapi: 3.0.3
+info:
+ title: Markets API
+ version: 1.0.0
+ description: REST API specification for public endpoints used by the Markets service.
+servers:
+ - url: https://gamma-api.polymarket.com
+ description: Polymarket Gamma API Production Server
+security: []
+tags:
+ - name: Gamma Status
+ description: Gamma API status and health check
+ - name: Sports
+ description: Sports-related endpoints including teams and game data
+ - name: Tags
+ description: Tag management and related tag operations
+ - name: Events
+ description: Event management and event-related operations
+ - name: Markets
+ description: Market data and market-related operations
+ - name: Comments
+ description: Comment system and user interactions
+ - name: Series
+ description: Series management and related operations
+ - name: Profiles
+ description: User profile management
+ - name: Search
+ description: Search functionality across different entity types
+paths:
+ /tags:
+ get:
+ tags:
+ - Tags
+ summary: List tags
+ operationId: listTags
+ parameters:
+ - $ref: '#/components/parameters/limit'
+ - $ref: '#/components/parameters/offset'
+ - $ref: '#/components/parameters/order'
+ - $ref: '#/components/parameters/ascending'
+ - name: include_template
+ in: query
+ schema:
+ type: boolean
+ - name: is_carousel
+ in: query
+ schema:
+ type: boolean
+ responses:
+ '200':
+ description: List of tags
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Tag'
+components:
+ parameters:
+ limit:
+ name: limit
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ offset:
+ name: offset
+ in: query
+ schema:
+ type: integer
+ minimum: 0
+ order:
+ name: order
+ in: query
+ schema:
+ type: string
+ description: Comma-separated list of fields to order by
+ ascending:
+ name: ascending
+ in: query
+ schema:
+ type: boolean
+ schemas:
+ Tag:
+ type: object
+ properties:
+ id:
+ type: string
+ label:
+ type: string
+ nullable: true
+ slug:
+ type: string
+ nullable: true
+ forceShow:
+ type: boolean
+ nullable: true
+ publishedAt:
+ type: string
+ nullable: true
+ createdBy:
+ type: integer
+ nullable: true
+ updatedBy:
+ type: integer
+ nullable: true
+ createdAt:
+ type: string
+ format: date-time
+ nullable: true
+ updatedAt:
+ type: string
+ format: date-time
+ nullable: true
+ forceHide:
+ type: boolean
+ nullable: true
+ isCarousel:
+ type: boolean
+ nullable: true
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/test-connection.md b/PolymarketDocumentation-main/docs/api-reference/test-connection.md
new file mode 100644
index 0000000..a94604f
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/test-connection.md
@@ -0,0 +1,134 @@
+> ## 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.
+
+# Test Connection
+
+> Test connection to the server.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json get /v1/info/ping
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/info/ping:
+ get:
+ summary: Test Connection
+ description: |
+ Test connection to the server.
+ operationId: getPing
+ responses:
+ '200':
+ description: Successful ping response.
+ content:
+ application/json:
+ schema:
+ type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ example: ok
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ responses:
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+ schemas:
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/cancel-all-orders.md b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-all-orders.md
new file mode 100644
index 0000000..4d15004
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-all-orders.md
@@ -0,0 +1,176 @@
+> ## 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.
+
+# Cancel all orders
+
+> Cancels all open orders for the authenticated user. Works even in cancel-only mode.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml delete /cancel-all
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /cancel-all:
+ delete:
+ tags:
+ - Trade
+ summary: Cancel all orders
+ description: >
+ Cancels all open orders for the authenticated user. Works even in
+ cancel-only mode.
+ operationId: cancelAllOrders
+ responses:
+ '200':
+ description: Cancellation results for all orders
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelOrdersResponse'
+ examples:
+ canceled:
+ summary: All orders canceled
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ - '0xfedcba0987654321fedcba0987654321fedcba09'
+ not_canceled: {}
+ mixed:
+ summary: Some orders canceled, some not
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled:
+ '0xfedcba0987654321fedcba0987654321fedcba09': Order already matched
+ no_orders:
+ summary: No orders to cancel
+ value:
+ canceled: []
+ not_canceled: {}
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ '503':
+ description: >-
+ Service unavailable - Trading disabled (cancels still work in
+ cancel-only mode)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: >-
+ Trading is currently disabled. Check polymarket.com for
+ updates
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ CancelOrdersResponse:
+ type: object
+ required:
+ - canceled
+ - not_canceled
+ properties:
+ canceled:
+ type: array
+ description: Array of order IDs that were successfully canceled
+ items:
+ type: string
+ example:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled:
+ type: object
+ description: Map of order IDs that could not be canceled with error messages
+ additionalProperties:
+ type: string
+ example:
+ '0xabcdef1234567890abcdef1234567890abcdef12': Order not found or already canceled
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/cancel-multiple-orders.md b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-multiple-orders.md
new file mode 100644
index 0000000..b52b355
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-multiple-orders.md
@@ -0,0 +1,216 @@
+> ## 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.
+
+# Cancel multiple orders
+
+> Cancels multiple orders by their IDs. Maximum 1000 orders per request.
+Duplicate order IDs in the request are automatically ignored.
+Works even in cancel-only mode.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml delete /orders
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /orders:
+ delete:
+ tags:
+ - Trade
+ summary: Cancel multiple orders
+ description: |
+ Cancels multiple orders by their IDs. Maximum 1000 orders per request.
+ Duplicate order IDs in the request are automatically ignored.
+ Works even in cancel-only mode.
+ operationId: cancelOrders
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: string
+ maxItems: 1000
+ example:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ - '0xfedcba0987654321fedcba0987654321fedcba09'
+ - '0x1234567890abcdef1234567890abcdef12345678'
+ responses:
+ '200':
+ description: Cancellation results for all orders
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelOrdersResponse'
+ examples:
+ all_canceled:
+ summary: All orders canceled
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ - '0xfedcba0987654321fedcba0987654321fedcba09'
+ - '0x1234567890abcdef1234567890abcdef12345678'
+ not_canceled: {}
+ mixed:
+ summary: Some orders canceled, some not
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ - '0xfedcba0987654321fedcba0987654321fedcba09'
+ not_canceled:
+ '0x1234567890abcdef1234567890abcdef12345678': Order already matched
+ partial:
+ summary: Partial cancellation
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled:
+ '0xfedcba0987654321fedcba0987654321fedcba09': Order not found
+ '0x1234567890abcdef1234567890abcdef12345678': Order already canceled
+ '400':
+ description: Bad request - Invalid order IDs or payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_order_id:
+ summary: Invalid order ID
+ value:
+ error: Invalid orderID
+ invalid_payload:
+ summary: Invalid payload
+ value:
+ error: Invalid order payload
+ too_many_orders:
+ summary: Too many orders
+ value:
+ error: 'Too many orders in payload, max allowed: 1000'
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ '503':
+ description: >-
+ Service unavailable - Trading disabled (cancels still work in
+ cancel-only mode)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: >-
+ Trading is currently disabled. Check polymarket.com for
+ updates
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ CancelOrdersResponse:
+ type: object
+ required:
+ - canceled
+ - not_canceled
+ properties:
+ canceled:
+ type: array
+ description: Array of order IDs that were successfully canceled
+ items:
+ type: string
+ example:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled:
+ type: object
+ description: Map of order IDs that could not be canceled with error messages
+ additionalProperties:
+ type: string
+ example:
+ '0xabcdef1234567890abcdef1234567890abcdef12': Order not found or already canceled
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/cancel-orders-for-a-market.md b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-orders-for-a-market.md
new file mode 100644
index 0000000..b8e5e19
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-orders-for-a-market.md
@@ -0,0 +1,211 @@
+> ## 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.
+
+# Cancel orders for a market
+
+> Cancels all open orders for the authenticated user in a specific market (condition) and asset.
+Works even in cancel-only mode.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml delete /cancel-market-orders
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /cancel-market-orders:
+ delete:
+ tags:
+ - Trade
+ summary: Cancel orders for a market
+ description: >
+ Cancels all open orders for the authenticated user in a specific market
+ (condition) and asset.
+
+ Works even in cancel-only mode.
+ operationId: cancelMarketOrders
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrderMarketCancelParams'
+ example:
+ market: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000001
+ asset_id: 0xabc123def456...
+ responses:
+ '200':
+ description: Cancellation results for market orders
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelOrdersResponse'
+ examples:
+ canceled:
+ summary: All market orders canceled
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ - '0xfedcba0987654321fedcba0987654321fedcba09'
+ not_canceled: {}
+ mixed:
+ summary: Some orders canceled, some not
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled:
+ '0xfedcba0987654321fedcba0987654321fedcba09': Order already matched
+ no_orders:
+ summary: No orders found for this market
+ value:
+ canceled: []
+ not_canceled: {}
+ '400':
+ description: Bad request - Invalid payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid order payload
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ '503':
+ description: >-
+ Service unavailable - Trading disabled (cancels still work in
+ cancel-only mode)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: >-
+ Trading is currently disabled. Check polymarket.com for
+ updates
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ OrderMarketCancelParams:
+ type: object
+ required:
+ - market
+ - asset_id
+ properties:
+ market:
+ type: string
+ description: Market (condition ID)
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ asset_id:
+ type: string
+ description: Asset ID (token ID)
+ example: 0xabc123def456...
+ CancelOrdersResponse:
+ type: object
+ required:
+ - canceled
+ - not_canceled
+ properties:
+ canceled:
+ type: array
+ description: Array of order IDs that were successfully canceled
+ items:
+ type: string
+ example:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled:
+ type: object
+ description: Map of order IDs that could not be canceled with error messages
+ additionalProperties:
+ type: string
+ example:
+ '0xabcdef1234567890abcdef1234567890abcdef12': Order not found or already canceled
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/cancel-single-order.md b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-single-order.md
new file mode 100644
index 0000000..6f1b457
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/cancel-single-order.md
@@ -0,0 +1,200 @@
+> ## 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.
+
+# Cancel single order
+
+> Cancels a single order by its ID. Works even in cancel-only mode.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml delete /order
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /order:
+ delete:
+ tags:
+ - Trade
+ summary: Cancel single order
+ description: |
+ Cancels a single order by its ID. Works even in cancel-only mode.
+ operationId: cancelOrder
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelOrderPayload'
+ example:
+ orderID: '0xabcdef1234567890abcdef1234567890abcdef12'
+ responses:
+ '200':
+ description: Order cancellation result
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CancelOrdersResponse'
+ examples:
+ canceled:
+ summary: Order successfully canceled
+ value:
+ canceled:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled: {}
+ not_canceled:
+ summary: Order could not be canceled
+ value:
+ canceled: []
+ not_canceled:
+ '0xabcdef1234567890abcdef1234567890abcdef12': Order not found or already canceled
+ '400':
+ description: Bad request - Invalid order ID or payload
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_order_id:
+ summary: Invalid order ID
+ value:
+ error: Invalid orderID
+ invalid_payload:
+ summary: Invalid payload
+ value:
+ error: Invalid order payload
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ '503':
+ description: >-
+ Service unavailable - Trading disabled (cancels still work in
+ cancel-only mode)
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: >-
+ Trading is currently disabled. Check polymarket.com for
+ updates
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ CancelOrderPayload:
+ type: object
+ required:
+ - orderID
+ properties:
+ orderID:
+ type: string
+ description: Order ID (order hash) to cancel
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ CancelOrdersResponse:
+ type: object
+ required:
+ - canceled
+ - not_canceled
+ properties:
+ canceled:
+ type: array
+ description: Array of order IDs that were successfully canceled
+ items:
+ type: string
+ example:
+ - '0xabcdef1234567890abcdef1234567890abcdef12'
+ not_canceled:
+ type: object
+ description: Map of order IDs that could not be canceled with error messages
+ additionalProperties:
+ type: string
+ example:
+ '0xabcdef1234567890abcdef1234567890abcdef12': Order not found or already canceled
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/get-builder-trades.md b/PolymarketDocumentation-main/docs/api-reference/trade/get-builder-trades.md
new file mode 100644
index 0000000..c3e8c55
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/get-builder-trades.md
@@ -0,0 +1,337 @@
+> ## 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 builder trades
+
+> Retrieves trades attributed to a builder code.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /builder/trades
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /builder/trades:
+ get:
+ tags:
+ - Trade
+ summary: Get builder trades
+ description: |
+ Retrieves trades attributed to a builder code.
+ operationId: getBuilderTrades
+ parameters:
+ - name: builder_code
+ in: query
+ description: Builder code to fetch attributed trades for
+ required: true
+ schema:
+ type: string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ - name: id
+ in: query
+ description: Trade ID to filter by specific trade
+ required: false
+ schema:
+ type: string
+ example: trade-123
+ - name: market
+ in: query
+ description: Market (condition ID) to filter trades
+ required: false
+ schema:
+ type: string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ - name: asset_id
+ in: query
+ description: Asset ID (token ID) to filter trades
+ required: false
+ schema:
+ type: string
+ example: >-
+ 15871154585880608648532107628464183779895785213830018178010423617714102767076
+ - name: before
+ in: query
+ description: Filter trades before this Unix timestamp
+ required: false
+ schema:
+ type: string
+ pattern: ^\d+$
+ example: '1700000000'
+ - name: after
+ in: query
+ description: Filter trades after this Unix timestamp
+ required: false
+ schema:
+ type: string
+ pattern: ^\d+$
+ example: '1600000000'
+ - name: next_cursor
+ in: query
+ description: Cursor for pagination (base64 encoded offset)
+ required: false
+ schema:
+ type: string
+ example: MA==
+ responses:
+ '200':
+ description: Successfully retrieved builder trades
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BuilderTradesResponse'
+ examples:
+ example:
+ summary: Builder trades response
+ value:
+ limit: 300
+ next_cursor: MzAw
+ count: 2
+ data:
+ - id: trade-123
+ tradeType: TAKER
+ takerOrderHash: '0xabcdef1234567890abcdef1234567890abcdef12'
+ builder: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000001
+ market: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000001
+ assetId: >-
+ 15871154585880608648532107628464183779895785213830018178010423617714102767076
+ side: BUY
+ size: '100000000'
+ sizeUsdc: '50000000'
+ price: '0.5'
+ status: TRADE_STATUS_CONFIRMED
+ outcome: 'YES'
+ outcomeIndex: 0
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker: '0x1234567890123456789012345678901234567890'
+ transactionHash: >-
+ 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
+ matchTime: '1700000000'
+ bucketIndex: 0
+ fee: '300000'
+ feeUsdc: '150000'
+ createdAt: '2024-01-01T00:00:00Z'
+ updatedAt: '2024-01-01T00:00:00Z'
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid builder trade params
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: could not fetch builder trades
+components:
+ schemas:
+ BuilderTradesResponse:
+ type: object
+ description: Paginated builder trades response
+ required:
+ - limit
+ - next_cursor
+ - count
+ - data
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of items per page
+ example: 300
+ next_cursor:
+ type: string
+ description: >-
+ Cursor for next page (base64 encoded offset). "LTE=" indicates no
+ more pages
+ example: MzAw
+ count:
+ type: integer
+ description: Number of items in current response
+ example: 2
+ data:
+ type: array
+ description: Array of builder trades
+ items:
+ $ref: '#/components/schemas/BuilderTrade'
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ BuilderTrade:
+ type: object
+ description: Builder trade information
+ required:
+ - id
+ - tradeType
+ - takerOrderHash
+ - builder
+ - market
+ - assetId
+ - side
+ - size
+ - sizeUsdc
+ - price
+ - status
+ - outcome
+ - outcomeIndex
+ - owner
+ - maker
+ - transactionHash
+ - matchTime
+ - bucketIndex
+ - fee
+ - feeUsdc
+ properties:
+ id:
+ type: string
+ description: Trade ID
+ example: trade-123
+ tradeType:
+ type: string
+ description: Trade type
+ example: TAKER
+ takerOrderHash:
+ type: string
+ description: Taker order hash
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ builder:
+ type: string
+ description: Builder code attributed to the trade
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ market:
+ type: string
+ description: Market (condition ID)
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ assetId:
+ type: string
+ description: Asset ID (token ID)
+ example: >-
+ 15871154585880608648532107628464183779895785213830018178010423617714102767076
+ side:
+ type: string
+ description: Trade side
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ size:
+ type: string
+ description: Trade size
+ example: '100000000'
+ sizeUsdc:
+ type: string
+ description: Trade size in USDC
+ example: '50000000'
+ price:
+ type: string
+ description: Trade price
+ example: '0.5'
+ status:
+ type: string
+ description: Trade status
+ example: TRADE_STATUS_CONFIRMED
+ outcome:
+ type: string
+ description: Market outcome
+ example: 'YES'
+ outcomeIndex:
+ type: integer
+ description: Outcome index
+ example: 0
+ owner:
+ type: string
+ description: Owner UUID
+ example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker:
+ type: string
+ description: Maker address
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x1234567890123456789012345678901234567890'
+ transactionHash:
+ type: string
+ description: Transaction hash
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
+ matchTime:
+ type: string
+ description: Match time (Unix timestamp)
+ example: '1700000000'
+ bucketIndex:
+ type: integer
+ description: Bucket index
+ example: 0
+ fee:
+ type: string
+ description: Fee amount
+ example: '300000'
+ feeUsdc:
+ type: string
+ description: Fee amount in USDC
+ example: '150000'
+ err_msg:
+ type:
+ - string
+ - 'null'
+ description: Error message (if any)
+ example: null
+ createdAt:
+ type: string
+ format: date-time
+ description: Creation timestamp
+ example: '2024-01-01T00:00:00Z'
+ updatedAt:
+ type: string
+ format: date-time
+ description: Last update timestamp
+ example: '2024-01-01T00:00:00Z'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/get-order-scoring-status.md b/PolymarketDocumentation-main/docs/api-reference/trade/get-order-scoring-status.md
new file mode 100644
index 0000000..a61ceda
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/get-order-scoring-status.md
@@ -0,0 +1,194 @@
+> ## 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 order scoring status
+
+> Checks if a specific order is currently scoring for rewards.
+
+An order is considered "scoring" if it meets all the criteria for earning maker rewards:
+- The order is live on a rewards-eligible market
+- The order meets the minimum size requirements
+- The order is within the valid spread range
+- The order has been live for the required duration
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /order-scoring
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /order-scoring:
+ get:
+ tags:
+ - Trade
+ summary: Get order scoring status
+ description: >
+ Checks if a specific order is currently scoring for rewards.
+
+
+ An order is considered "scoring" if it meets all the criteria for
+ earning maker rewards:
+
+ - The order is live on a rewards-eligible market
+
+ - The order meets the minimum size requirements
+
+ - The order is within the valid spread range
+
+ - The order has been live for the required duration
+ operationId: getOrderScoring
+ parameters:
+ - name: order_id
+ in: query
+ description: The order ID (order hash) to check scoring status for
+ required: true
+ schema:
+ type: string
+ example: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890'
+ responses:
+ '200':
+ description: Successfully retrieved order scoring status
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrderScoringResponse'
+ examples:
+ scoring:
+ summary: Order is scoring
+ value:
+ scoring: true
+ not_scoring:
+ summary: Order is not scoring
+ value:
+ scoring: false
+ '400':
+ description: Bad request - Invalid order ID
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid order_id
+ '401':
+ description: Unauthorized - Invalid API key or order doesn't belong to user
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '404':
+ description: Market not found for the order
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: market not found
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ '503':
+ description: Service unavailable - Trading disabled
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: >-
+ Trading is currently disabled. Check polymarket.com for
+ updates
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ OrderScoringResponse:
+ type: object
+ description: Response indicating whether an order is currently scoring for rewards
+ required:
+ - scoring
+ properties:
+ scoring:
+ type: boolean
+ description: Whether the order is currently scoring for maker rewards
+ example: true
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/get-single-order-by-id.md b/PolymarketDocumentation-main/docs/api-reference/trade/get-single-order-by-id.md
new file mode 100644
index 0000000..d0cc05a
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/get-single-order-by-id.md
@@ -0,0 +1,263 @@
+> ## 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 single order by ID
+
+> Retrieves a specific order by its ID (order hash) for the authenticated user.
+Builder-authenticated clients can also use this endpoint to retrieve orders attributed to their builder account.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /data/order/{orderID}
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /data/order/{orderID}:
+ get:
+ tags:
+ - Trade
+ summary: Get single order by ID
+ description: >
+ Retrieves a specific order by its ID (order hash) for the authenticated
+ user.
+
+ Builder-authenticated clients can also use this endpoint to retrieve
+ orders attributed to their builder account.
+ operationId: getOrder
+ parameters:
+ - name: orderID
+ in: path
+ description: Order ID (order hash)
+ required: true
+ schema:
+ type: string
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ responses:
+ '200':
+ description: Successfully retrieved order
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OpenOrder'
+ example:
+ id: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status: ORDER_STATUS_LIVE
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker_address: '0x1234567890123456789012345678901234567890'
+ market: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000001
+ asset_id: 0xabc123def456...
+ side: BUY
+ original_size: '100000000'
+ size_matched: '0'
+ price: '0.5'
+ outcome: 'YES'
+ expiration: '1735689600'
+ order_type: GTC
+ associate_trades: []
+ created_at: 1700000000
+ '400':
+ description: Bad request - Invalid order ID
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid orderID
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '404':
+ description: Order not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Order not found
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ OpenOrder:
+ type: object
+ required:
+ - id
+ - status
+ - owner
+ - maker_address
+ - market
+ - asset_id
+ - side
+ - original_size
+ - size_matched
+ - price
+ - expiration
+ - order_type
+ - created_at
+ - outcome
+ properties:
+ id:
+ type: string
+ description: Order ID (order hash)
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status:
+ type: string
+ description: Order status
+ enum:
+ - ORDER_STATUS_LIVE
+ - ORDER_STATUS_INVALID
+ - ORDER_STATUS_CANCELED_MARKET_RESOLVED
+ - ORDER_STATUS_CANCELED
+ - ORDER_STATUS_MATCHED
+ owner:
+ type: string
+ description: UUID of the order owner
+ example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker_address:
+ type: string
+ description: Ethereum address of the maker
+ example: '0x1234567890123456789012345678901234567890'
+ market:
+ type: string
+ description: Market (condition ID)
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ asset_id:
+ type: string
+ description: Asset ID (token ID)
+ example: 0xabc123def456...
+ side:
+ type: string
+ description: Order side
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ original_size:
+ type: string
+ description: Original order size in fixed-math with 6 decimals
+ example: '100000000'
+ size_matched:
+ type: string
+ description: Size that has been matched in fixed-math with 6 decimals
+ example: '0'
+ price:
+ type: string
+ description: Order price
+ example: '0.5'
+ outcome:
+ type: string
+ description: Market outcome (YES/NO)
+ example: 'YES'
+ expiration:
+ type: string
+ description: Unix timestamp when the order expires
+ example: '1735689600'
+ order_type:
+ type: string
+ description: Order type
+ enum:
+ - GTC
+ - FOK
+ - GTD
+ - FAK
+ example: GTC
+ associate_trades:
+ type: array
+ description: Array of associated trade IDs
+ items:
+ type: string
+ example:
+ - trade-123
+ created_at:
+ type: integer
+ description: Unix timestamp when the order was created
+ example: 1700000000
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/get-trades.md b/PolymarketDocumentation-main/docs/api-reference/trade/get-trades.md
new file mode 100644
index 0000000..2892154
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/get-trades.md
@@ -0,0 +1,395 @@
+> ## 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 trades
+
+> Retrieves trades for the authenticated user. Returns paginated results.
+Requires readonly or level 2 API key authentication.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /data/trades
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /data/trades:
+ get:
+ tags:
+ - Trade
+ summary: Get trades
+ description: |
+ Retrieves trades for the authenticated user. Returns paginated results.
+ Requires readonly or level 2 API key authentication.
+ operationId: getTrades
+ parameters:
+ - name: id
+ in: query
+ description: Trade ID to filter by specific trade
+ required: false
+ schema:
+ type: string
+ example: trade-123
+ - name: maker_address
+ in: query
+ description: Maker address to filter trades
+ required: true
+ schema:
+ type: string
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x1234567890123456789012345678901234567890'
+ - name: market
+ in: query
+ description: Market (condition ID) to filter trades
+ required: false
+ schema:
+ type: string
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ - name: asset_id
+ in: query
+ description: Asset ID (token ID) to filter trades
+ required: false
+ schema:
+ type: string
+ example: >-
+ 15871154585880608648532107628464183779895785213830018178010423617714102767076
+ - name: before
+ in: query
+ description: Filter trades before this Unix timestamp
+ required: false
+ schema:
+ type: string
+ pattern: ^\d+$
+ example: '1700000000'
+ - name: after
+ in: query
+ description: Filter trades after this Unix timestamp
+ required: false
+ schema:
+ type: string
+ pattern: ^\d+$
+ example: '1600000000'
+ - name: next_cursor
+ in: query
+ description: Cursor for pagination (base64 encoded offset)
+ required: false
+ schema:
+ type: string
+ example: MA==
+ responses:
+ '200':
+ description: Successfully retrieved trades
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TradesResponse'
+ examples:
+ example:
+ summary: User trades response
+ value:
+ limit: 100
+ next_cursor: MTAw
+ count: 2
+ data:
+ - id: trade-123
+ taker_order_id: '0xabcdef1234567890abcdef1234567890abcdef12'
+ market: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000001
+ asset_id: >-
+ 15871154585880608648532107628464183779895785213830018178010423617714102767076
+ side: BUY
+ size: '100000000'
+ fee_rate_bps: '30'
+ price: '0.5'
+ status: TRADE_STATUS_CONFIRMED
+ match_time: '1700000000'
+ last_update: '1700000000'
+ outcome: 'YES'
+ bucket_index: 0
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker_address: '0x1234567890123456789012345678901234567890'
+ transaction_hash: >-
+ 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
+ trader_side: TAKER
+ maker_orders: []
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid trade params payload
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ TradesResponse:
+ type: object
+ description: Paginated trades response
+ required:
+ - limit
+ - next_cursor
+ - count
+ - data
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of items per page
+ example: 100
+ next_cursor:
+ type: string
+ description: >-
+ Cursor for next page (base64 encoded offset). "LTE=" indicates no
+ more pages
+ example: MTAw
+ count:
+ type: integer
+ description: Number of items in current response
+ example: 2
+ data:
+ type: array
+ description: Array of trades
+ items:
+ $ref: '#/components/schemas/Trade'
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ Trade:
+ type: object
+ description: Trade information
+ required:
+ - id
+ - taker_order_id
+ - market
+ - asset_id
+ - side
+ - size
+ - price
+ - status
+ - match_time
+ - last_update
+ - outcome
+ - bucket_index
+ - owner
+ - maker_address
+ - trader_side
+ properties:
+ id:
+ type: string
+ description: Trade ID
+ example: trade-123
+ taker_order_id:
+ type: string
+ description: Taker order ID (hash)
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ market:
+ type: string
+ description: Market (condition ID)
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ asset_id:
+ type: string
+ description: Asset ID (token ID)
+ example: >-
+ 15871154585880608648532107628464183779895785213830018178010423617714102767076
+ side:
+ type: string
+ description: Trade side
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ size:
+ type: string
+ description: Trade size
+ example: '100000000'
+ fee_rate_bps:
+ type: string
+ description: Fee rate in basis points
+ example: '30'
+ price:
+ type: string
+ description: Trade price
+ example: '0.5'
+ status:
+ type: string
+ description: Trade status
+ enum:
+ - TRADE_STATUS_CONFIRMED
+ - TRADE_STATUS_FAILED
+ - TRADE_STATUS_RETRYING
+ - TRADE_STATUS_MATCHED
+ - TRADE_STATUS_MINED
+ example: TRADE_STATUS_CONFIRMED
+ match_time:
+ type: string
+ description: Match time (Unix timestamp)
+ example: '1700000000'
+ match_time_nano:
+ type: string
+ description: Match time in nanoseconds
+ example: '1700000000000000000'
+ last_update:
+ type: string
+ description: Last update time (Unix timestamp)
+ example: '1700000000'
+ outcome:
+ type: string
+ description: Market outcome
+ example: 'YES'
+ bucket_index:
+ type: integer
+ description: Bucket index
+ example: 0
+ owner:
+ type: string
+ description: Owner UUID
+ example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker_address:
+ type: string
+ description: Maker address
+ pattern: ^0x[a-fA-F0-9]{40}$
+ example: '0x1234567890123456789012345678901234567890'
+ transaction_hash:
+ type: string
+ description: Transaction hash
+ pattern: ^0x[a-fA-F0-9]{64}$
+ example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
+ err_msg:
+ type:
+ - string
+ - 'null'
+ description: Error message (if any)
+ example: null
+ maker_orders:
+ type: array
+ description: Array of maker orders associated with this trade
+ items:
+ type: object
+ properties:
+ order_id:
+ type: string
+ description: Order ID (hash)
+ owner:
+ type: string
+ description: Owner UUID
+ maker_address:
+ type: string
+ description: Maker address
+ matched_amount:
+ type: string
+ description: Matched amount
+ price:
+ type: string
+ description: Price
+ fee_rate_bps:
+ type: string
+ description: Fee rate in basis points
+ asset_id:
+ type: string
+ description: Asset ID
+ outcome:
+ type: string
+ description: Outcome
+ side:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ example: []
+ trader_side:
+ type: string
+ description: Trader side (TAKER or MAKER)
+ enum:
+ - TAKER
+ - MAKER
+ example: TAKER
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/get-user-orders.md b/PolymarketDocumentation-main/docs/api-reference/trade/get-user-orders.md
new file mode 100644
index 0000000..bee4ce3
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/get-user-orders.md
@@ -0,0 +1,327 @@
+> ## 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 user orders
+
+> Retrieves open orders for the authenticated user. Returns paginated results.
+Builder-authenticated clients can also use this endpoint to retrieve orders attributed to their builder account.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml get /data/orders
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /data/orders:
+ get:
+ tags:
+ - Trade
+ summary: Get user orders
+ description: >
+ Retrieves open orders for the authenticated user. Returns paginated
+ results.
+
+ Builder-authenticated clients can also use this endpoint to retrieve
+ orders attributed to their builder account.
+ operationId: getOrders
+ parameters:
+ - name: id
+ in: query
+ description: Order ID (hash) to filter by specific order
+ required: false
+ schema:
+ type: string
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ - name: market
+ in: query
+ description: Market (condition ID) to filter orders
+ required: false
+ schema:
+ type: string
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ - name: asset_id
+ in: query
+ description: Asset ID (token ID) to filter orders
+ required: false
+ schema:
+ type: string
+ example: 0xabc123def456...
+ - name: next_cursor
+ in: query
+ description: Cursor for pagination (base64 encoded offset)
+ required: false
+ schema:
+ type: string
+ example: MA==
+ responses:
+ '200':
+ description: Successfully retrieved orders
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OrdersResponse'
+ examples:
+ example:
+ summary: User orders response
+ value:
+ limit: 100
+ next_cursor: MTAw
+ count: 2
+ data:
+ - id: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status: ORDER_STATUS_LIVE
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker_address: '0x1234567890123456789012345678901234567890'
+ market: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000001
+ asset_id: 0xabc123def456...
+ side: BUY
+ original_size: '100000000'
+ size_matched: '0'
+ price: '0.5'
+ outcome: 'YES'
+ expiration: '1735689600'
+ order_type: GTC
+ associate_trades: []
+ created_at: 1700000000
+ - id: '0xfedcba0987654321fedcba0987654321fedcba09'
+ status: ORDER_STATUS_LIVE
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker_address: '0x1234567890123456789012345678901234567890'
+ market: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000002
+ asset_id: 0xdef456abc789...
+ side: SELL
+ original_size: '200000000'
+ size_matched: '50000000'
+ price: '0.75'
+ outcome: 'NO'
+ expiration: '1735689600'
+ order_type: GTC
+ associate_trades:
+ - trade-123
+ created_at: 1700000001
+ '400':
+ description: Bad request - Invalid parameters
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: invalid order params payload
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ OrdersResponse:
+ type: object
+ required:
+ - limit
+ - next_cursor
+ - count
+ - data
+ properties:
+ limit:
+ type: integer
+ description: Maximum number of results per page
+ example: 100
+ next_cursor:
+ type: string
+ description: >-
+ Cursor for pagination (base64 encoded offset). Empty if no more
+ results.
+ example: MTAw
+ count:
+ type: integer
+ description: Number of orders in this response
+ example: 2
+ data:
+ type: array
+ description: Array of open orders
+ items:
+ $ref: '#/components/schemas/OpenOrder'
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ OpenOrder:
+ type: object
+ required:
+ - id
+ - status
+ - owner
+ - maker_address
+ - market
+ - asset_id
+ - side
+ - original_size
+ - size_matched
+ - price
+ - expiration
+ - order_type
+ - created_at
+ - outcome
+ properties:
+ id:
+ type: string
+ description: Order ID (order hash)
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status:
+ type: string
+ description: Order status
+ enum:
+ - ORDER_STATUS_LIVE
+ - ORDER_STATUS_INVALID
+ - ORDER_STATUS_CANCELED_MARKET_RESOLVED
+ - ORDER_STATUS_CANCELED
+ - ORDER_STATUS_MATCHED
+ owner:
+ type: string
+ description: UUID of the order owner
+ example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ maker_address:
+ type: string
+ description: Ethereum address of the maker
+ example: '0x1234567890123456789012345678901234567890'
+ market:
+ type: string
+ description: Market (condition ID)
+ example: '0x0000000000000000000000000000000000000000000000000000000000000001'
+ asset_id:
+ type: string
+ description: Asset ID (token ID)
+ example: 0xabc123def456...
+ side:
+ type: string
+ description: Order side
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ original_size:
+ type: string
+ description: Original order size in fixed-math with 6 decimals
+ example: '100000000'
+ size_matched:
+ type: string
+ description: Size that has been matched in fixed-math with 6 decimals
+ example: '0'
+ price:
+ type: string
+ description: Order price
+ example: '0.5'
+ outcome:
+ type: string
+ description: Market outcome (YES/NO)
+ example: 'YES'
+ expiration:
+ type: string
+ description: Unix timestamp when the order expires
+ example: '1735689600'
+ order_type:
+ type: string
+ description: Order type
+ enum:
+ - GTC
+ - FOK
+ - GTD
+ - FAK
+ example: GTC
+ associate_trades:
+ type: array
+ description: Array of associated trade IDs
+ items:
+ type: string
+ example:
+ - trade-123
+ created_at:
+ type: integer
+ description: Unix timestamp when the order was created
+ example: 1700000000
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/post-a-new-order.md b/PolymarketDocumentation-main/docs/api-reference/trade/post-a-new-order.md
new file mode 100644
index 0000000..703f462
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/post-a-new-order.md
@@ -0,0 +1,418 @@
+> ## 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.
+
+# Post a new order
+
+> Creates a new order in the order book
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /order
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /order:
+ post:
+ tags:
+ - Trade
+ summary: Post a new order
+ description: |
+ Creates a new order in the order book
+ operationId: postOrder
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SendOrder'
+ examples:
+ example:
+ summary: Send order example
+ value:
+ order:
+ maker: '0x1234567890123456789012345678901234567890'
+ signer: '0x1234567890123456789012345678901234567890'
+ tokenId: 0xabc123def456...
+ makerAmount: '100000000'
+ takerAmount: '200000000'
+ side: BUY
+ expiration: '1735689600'
+ timestamp: '1735689600000'
+ metadata: ''
+ builder: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000000
+ signature: 0x1234abcd...
+ salt: 1234567890
+ signatureType: 0
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ orderType: GTC
+ deferExec: false
+ postOnly: false
+ responses:
+ '200':
+ description: Order successfully processed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SendOrderResponse'
+ examples:
+ live_order:
+ summary: Order placed on book
+ value:
+ success: true
+ orderID: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status: live
+ makingAmount: '100000000'
+ takingAmount: '200000000'
+ errorMsg: ''
+ matched_order:
+ summary: Order immediately matched
+ value:
+ success: true
+ orderID: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status: matched
+ makingAmount: '100000000'
+ takingAmount: '200000000'
+ transactionsHashes:
+ - '0x1234567890abcdef1234567890abcdef12345678'
+ tradeIDs:
+ - trade-123
+ errorMsg: ''
+ delayed_order:
+ summary: Order delayed
+ value:
+ success: true
+ orderID: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status: delayed
+ makingAmount: '100000000'
+ takingAmount: '200000000'
+ errorMsg: ''
+ '400':
+ description: Bad request - Invalid order payload or validation error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_payload:
+ summary: Invalid order payload
+ value:
+ error: Invalid order payload
+ owner_mismatch:
+ summary: Owner mismatch
+ value:
+ error: the order owner has to be the owner of the API KEY
+ signer_mismatch:
+ summary: Signer mismatch
+ value:
+ error: >-
+ the order signer address has to be the address of the API
+ KEY
+ banned_address:
+ summary: Banned address
+ value:
+ error: '''0x1234...'' address banned'
+ closed_only_mode:
+ summary: Closed only mode violation
+ value:
+ error: '''0x1234...'' address in closed only mode'
+ invalid_order:
+ summary: Invalid order details
+ value:
+ error: >-
+ order 0xabc... is invalid. Price (100) breaks minimum tick
+ size rule: 0.1
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: could not insert order
+ '503':
+ description: Service unavailable - Trading disabled or cancel-only mode
+ headers:
+ Retry-After:
+ description: Seconds to wait before retrying when provided by post-only mode.
+ schema:
+ type: integer
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ trading_disabled:
+ summary: Trading disabled
+ value:
+ error: >-
+ Trading is currently disabled. Check polymarket.com for
+ updates
+ cancel_only:
+ summary: Cancel-only mode
+ value:
+ error: >-
+ Trading is currently cancel-only. New orders are not
+ accepted, but cancels are allowed.
+ post_only_mode:
+ summary: Post-only mode
+ value:
+ error: >-
+ post-only mode: only post-only orders and cancels are
+ allowed
+ code: post_only_mode
+ retry_after_seconds: 79
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ SendOrder:
+ type: object
+ required:
+ - order
+ - owner
+ properties:
+ order:
+ $ref: '#/components/schemas/Order'
+ owner:
+ type: string
+ description: UUID of the API key owner
+ example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ orderType:
+ type: string
+ description: Time in force
+ enum:
+ - GTC
+ - FOK
+ - GTD
+ - FAK
+ default: GTC
+ deferExec:
+ type: boolean
+ description: Whether to defer execution
+ default: false
+ postOnly:
+ type: boolean
+ description: >-
+ Whether the order must rest on the book and not match immediately.
+ Only supported for GTC and GTD orders.
+ default: false
+ SendOrderResponse:
+ type: object
+ required:
+ - success
+ - orderID
+ - status
+ properties:
+ success:
+ type: boolean
+ description: Whether the order was successfully processed
+ example: true
+ orderID:
+ type: string
+ description: Unique identifier for the order (order hash)
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status:
+ type: string
+ description: Status of the order after processing
+ enum:
+ - live
+ - matched
+ - delayed
+ makingAmount:
+ type: string
+ description: Amount the maker is providing in fixed-math with 6 decimals
+ example: '100000000'
+ takingAmount:
+ type: string
+ description: Amount the taker is providing in fixed-math with 6 decimals
+ example: '200000000'
+ transactionsHashes:
+ type: array
+ description: Array of transaction hashes (present when status is 'matched')
+ items:
+ type: string
+ example:
+ - '0x1234567890abcdef1234567890abcdef12345678'
+ tradeIDs:
+ type: array
+ description: Array of trade IDs (present when status is 'matched')
+ items:
+ type: string
+ errorMsg:
+ type: string
+ description: Error message (empty on success)
+ example: ''
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ Order:
+ type: object
+ description: >
+ Order payload submitted to the CLOB API. In CLOB V2, `expiration`
+ remains in
+
+ the POST /order wire body for GTD/order-expiry handling, but it is not
+ part
+
+ of the EIP-712 signed order struct.
+ required:
+ - maker
+ - signer
+ - tokenId
+ - makerAmount
+ - takerAmount
+ - side
+ - expiration
+ - timestamp
+ - builder
+ - signature
+ - salt
+ - signatureType
+ properties:
+ maker:
+ type: string
+ description: >-
+ Ethereum address of the maker (In the default case, this is your
+ proxy address)
+ example: '0x1234567890123456789012345678901234567890'
+ signer:
+ type: string
+ description: Ethereum address of the signer
+ example: '0x1234567890123456789012345678901234567890'
+ tokenId:
+ type: string
+ description: Token ID (asset ID) for the order
+ example: 0xabc123def456...
+ makerAmount:
+ type: string
+ description: Amount the maker is providing in fixed-math with 6 decimals
+ example: '100000000'
+ takerAmount:
+ type: string
+ description: Amount the taker is providing in fixed-math with 6 decimals
+ example: '200000000'
+ side:
+ type: string
+ description: Order side
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ expiration:
+ type: string
+ description: >-
+ Unix timestamp when the order expires. Present in the API wire body;
+ not part of the CLOB V2 EIP-712 signed order struct.
+ example: '1735689600'
+ timestamp:
+ type: string
+ description: >-
+ Unix timestamp in milliseconds when the order was created (used for
+ order uniqueness)
+ example: '1735689600000'
+ metadata:
+ type: string
+ description: Reserved for future use
+ example: ''
+ builder:
+ type: string
+ description: >-
+ Builder code (bytes32) for integrator attribution. `0x` + 64 hex
+ chars or empty.
+ example: '0x0000000000000000000000000000000000000000000000000000000000000000'
+ signature:
+ type: string
+ description: Cryptographic signature of the order
+ example: 0x1234abcd...
+ salt:
+ type: integer
+ description: Random salt for order uniqueness
+ example: 1234567890
+ signatureType:
+ type: integer
+ description: Type of signature (0 = EOA, 1 = POLY_PROXY, 2 = POLY_GNOSIS_SAFE)
+ enum:
+ - 0
+ - 1
+ - 2
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/post-multiple-orders.md b/PolymarketDocumentation-main/docs/api-reference/trade/post-multiple-orders.md
new file mode 100644
index 0000000..20c1af1
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/post-multiple-orders.md
@@ -0,0 +1,461 @@
+> ## 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.
+
+# Post multiple orders
+
+> Creates multiple new orders in the order book. Orders are processed in parallel.
+Maximum 15 orders per request.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /orders
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /orders:
+ post:
+ tags:
+ - Trade
+ summary: Post multiple orders
+ description: >
+ Creates multiple new orders in the order book. Orders are processed in
+ parallel.
+
+ Maximum 15 orders per request.
+ operationId: postOrders
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SendOrder'
+ maxItems: 15
+ examples:
+ example:
+ summary: Send multiple orders example
+ value:
+ - order:
+ maker: '0x1234567890123456789012345678901234567890'
+ signer: '0x1234567890123456789012345678901234567890'
+ tokenId: 0xabc123def456...
+ makerAmount: '100000000'
+ takerAmount: '200000000'
+ side: BUY
+ expiration: '1735689600'
+ timestamp: '1735689600000'
+ metadata: ''
+ builder: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000000
+ signature: 0x1234abcd...
+ salt: 1234567890
+ signatureType: 0
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ orderType: GTC
+ deferExec: false
+ postOnly: false
+ - order:
+ maker: '0x1234567890123456789012345678901234567890'
+ signer: '0x1234567890123456789012345678901234567890'
+ tokenId: 0xdef456abc789...
+ makerAmount: '200000000'
+ takerAmount: '100000000'
+ side: SELL
+ expiration: '1735689600'
+ timestamp: '1735689600000'
+ metadata: ''
+ builder: >-
+ 0x0000000000000000000000000000000000000000000000000000000000000000
+ signature: 0x5678efgh...
+ salt: 1234567891
+ signatureType: 0
+ owner: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ orderType: GTC
+ deferExec: false
+ postOnly: false
+ responses:
+ '200':
+ description: >-
+ Orders successfully processed. Returns an array of order responses,
+ one for each order in the request.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SendOrderResponse'
+ examples:
+ mixed_results:
+ summary: Mixed order results
+ value:
+ - success: true
+ orderID: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status: live
+ makingAmount: '100000000'
+ takingAmount: '200000000'
+ errorMsg: ''
+ - success: true
+ orderID: '0xfedcba0987654321fedcba0987654321fedcba09'
+ status: matched
+ makingAmount: '200000000'
+ takingAmount: '100000000'
+ transactionsHashes:
+ - '0x1234567890abcdef1234567890abcdef12345678'
+ tradeIDs:
+ - trade-123
+ errorMsg: ''
+ - success: false
+ orderID: ''
+ status: delayed
+ errorMsg: 'Rate limit exceeded for tokenId: 0xdef456abc789...'
+ post_only_mode:
+ summary: Post-only mode results
+ value:
+ - errorMsg: >-
+ post-only mode: only post-only orders and cancels are
+ allowed
+ orderID: ''
+ takingAmount: ''
+ makingAmount: ''
+ status: ''
+ success: true
+ - errorMsg: >-
+ post-only mode: only post-only orders and cancels are
+ allowed
+ orderID: ''
+ takingAmount: ''
+ makingAmount: ''
+ status: ''
+ success: true
+ '400':
+ description: Bad request - Invalid order payload or validation error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ invalid_payload:
+ summary: Invalid order payload
+ value:
+ error: Invalid order payload
+ empty_payload:
+ summary: Empty orders array
+ value:
+ error: Invalid order payload
+ too_many_orders:
+ summary: Too many orders
+ value:
+ error: 'Too many orders in payload: 20, max allowed: 15'
+ owner_mismatch:
+ summary: Owner mismatch
+ value:
+ error: the order owner has to be the owner of the API KEY
+ signer_mismatch:
+ summary: Signer mismatch
+ value:
+ error: >-
+ the order signer address has to be the address of the API
+ KEY
+ banned_address:
+ summary: Banned address
+ value:
+ error: '''0x1234...'' address banned'
+ closed_only_mode:
+ summary: Closed only mode violation
+ value:
+ error: '''0x1234...'' address in closed only mode'
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: could not insert order
+ '503':
+ description: Service unavailable - Trading disabled or cancel-only mode
+ headers:
+ Retry-After:
+ description: Seconds to wait before retrying when provided by post-only mode.
+ schema:
+ type: integer
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ examples:
+ trading_disabled:
+ summary: Trading disabled
+ value:
+ error: >-
+ Trading is currently disabled. Check polymarket.com for
+ updates
+ cancel_only:
+ summary: Cancel-only mode
+ value:
+ error: >-
+ Trading is currently cancel-only. New orders are not
+ accepted, but cancels are allowed.
+ post_only_mode:
+ summary: Post-only mode
+ value:
+ error: >-
+ post-only mode: only post-only orders and cancels are
+ allowed
+ code: post_only_mode
+ retry_after_seconds: 79
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ SendOrder:
+ type: object
+ required:
+ - order
+ - owner
+ properties:
+ order:
+ $ref: '#/components/schemas/Order'
+ owner:
+ type: string
+ description: UUID of the API key owner
+ example: f4f247b7-4ac7-ff29-a152-04fda0a8755a
+ orderType:
+ type: string
+ description: Time in force
+ enum:
+ - GTC
+ - FOK
+ - GTD
+ - FAK
+ default: GTC
+ deferExec:
+ type: boolean
+ description: Whether to defer execution
+ default: false
+ postOnly:
+ type: boolean
+ description: >-
+ Whether the order must rest on the book and not match immediately.
+ Only supported for GTC and GTD orders.
+ default: false
+ SendOrderResponse:
+ type: object
+ required:
+ - success
+ - orderID
+ - status
+ properties:
+ success:
+ type: boolean
+ description: Whether the order was successfully processed
+ example: true
+ orderID:
+ type: string
+ description: Unique identifier for the order (order hash)
+ example: '0xabcdef1234567890abcdef1234567890abcdef12'
+ status:
+ type: string
+ description: Status of the order after processing
+ enum:
+ - live
+ - matched
+ - delayed
+ makingAmount:
+ type: string
+ description: Amount the maker is providing in fixed-math with 6 decimals
+ example: '100000000'
+ takingAmount:
+ type: string
+ description: Amount the taker is providing in fixed-math with 6 decimals
+ example: '200000000'
+ transactionsHashes:
+ type: array
+ description: Array of transaction hashes (present when status is 'matched')
+ items:
+ type: string
+ example:
+ - '0x1234567890abcdef1234567890abcdef12345678'
+ tradeIDs:
+ type: array
+ description: Array of trade IDs (present when status is 'matched')
+ items:
+ type: string
+ errorMsg:
+ type: string
+ description: Error message (empty on success)
+ example: ''
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ Order:
+ type: object
+ description: >
+ Order payload submitted to the CLOB API. In CLOB V2, `expiration`
+ remains in
+
+ the POST /order wire body for GTD/order-expiry handling, but it is not
+ part
+
+ of the EIP-712 signed order struct.
+ required:
+ - maker
+ - signer
+ - tokenId
+ - makerAmount
+ - takerAmount
+ - side
+ - expiration
+ - timestamp
+ - builder
+ - signature
+ - salt
+ - signatureType
+ properties:
+ maker:
+ type: string
+ description: >-
+ Ethereum address of the maker (In the default case, this is your
+ proxy address)
+ example: '0x1234567890123456789012345678901234567890'
+ signer:
+ type: string
+ description: Ethereum address of the signer
+ example: '0x1234567890123456789012345678901234567890'
+ tokenId:
+ type: string
+ description: Token ID (asset ID) for the order
+ example: 0xabc123def456...
+ makerAmount:
+ type: string
+ description: Amount the maker is providing in fixed-math with 6 decimals
+ example: '100000000'
+ takerAmount:
+ type: string
+ description: Amount the taker is providing in fixed-math with 6 decimals
+ example: '200000000'
+ side:
+ type: string
+ description: Order side
+ enum:
+ - BUY
+ - SELL
+ example: BUY
+ expiration:
+ type: string
+ description: >-
+ Unix timestamp when the order expires. Present in the API wire body;
+ not part of the CLOB V2 EIP-712 signed order struct.
+ example: '1735689600'
+ timestamp:
+ type: string
+ description: >-
+ Unix timestamp in milliseconds when the order was created (used for
+ order uniqueness)
+ example: '1735689600000'
+ metadata:
+ type: string
+ description: Reserved for future use
+ example: ''
+ builder:
+ type: string
+ description: >-
+ Builder code (bytes32) for integrator attribution. `0x` + 64 hex
+ chars or empty.
+ example: '0x0000000000000000000000000000000000000000000000000000000000000000'
+ signature:
+ type: string
+ description: Cryptographic signature of the order
+ example: 0x1234abcd...
+ salt:
+ type: integer
+ description: Random salt for order uniqueness
+ example: 1234567890
+ signatureType:
+ type: integer
+ description: Type of signature (0 = EOA, 1 = POLY_PROXY, 2 = POLY_GNOSIS_SAFE)
+ enum:
+ - 0
+ - 1
+ - 2
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/trade/send-heartbeat.md b/PolymarketDocumentation-main/docs/api-reference/trade/send-heartbeat.md
new file mode 100644
index 0000000..1170819
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/trade/send-heartbeat.md
@@ -0,0 +1,146 @@
+> ## 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.
+
+# Send heartbeat
+
+> Sends a heartbeat signal to maintain active session status.
+If heartbeats are not sent regularly, all open orders for the user will be automatically canceled.
+This is useful for automated trading systems that need to ensure orders are canceled
+if the system becomes unresponsive.
+
+
+
+
+## OpenAPI
+
+````yaml /api-spec/clob-openapi.yaml post /heartbeats
+openapi: 3.1.0
+info:
+ title: Polymarket CLOB API
+ description: Polymarket CLOB API Reference
+ license:
+ name: MIT
+ identifier: MIT
+ version: 1.0.0
+servers:
+ - url: https://clob.polymarket.com
+ description: Production CLOB API
+ - url: https://clob-staging.polymarket.com
+ description: Staging CLOB API
+security: []
+tags:
+ - name: Trade
+ description: Trade endpoints
+ - name: Markets
+ description: Market data endpoints
+ - name: Account
+ description: Account and authentication endpoints
+ - name: Notifications
+ description: User notification endpoints
+ - name: Rewards
+ description: Rewards and earnings endpoints
+ - name: Rebates
+ description: Maker rebate endpoints
+paths:
+ /heartbeats:
+ post:
+ tags:
+ - Trade
+ summary: Send heartbeat
+ description: >
+ Sends a heartbeat signal to maintain active session status.
+
+ If heartbeats are not sent regularly, all open orders for the user will
+ be automatically canceled.
+
+ This is useful for automated trading systems that need to ensure orders
+ are canceled
+
+ if the system becomes unresponsive.
+ operationId: sendHeartbeat
+ responses:
+ '200':
+ description: Heartbeat acknowledged
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HeartbeatResponse'
+ example:
+ status: ok
+ '401':
+ description: Unauthorized - Invalid API key or authentication failed
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Invalid API key
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ example:
+ error: Internal server error
+ security:
+ - polyApiKey: []
+ polyAddress: []
+ polySignature: []
+ polyPassphrase: []
+ polyTimestamp: []
+components:
+ schemas:
+ HeartbeatResponse:
+ type: object
+ description: Response for heartbeat request
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ description: Status of the heartbeat acknowledgment
+ example: ok
+ ErrorResponse:
+ type: object
+ required:
+ - error
+ properties:
+ error:
+ type: string
+ description: Error message
+ code:
+ type: string
+ description: Machine-readable error code, when provided
+ retry_after_seconds:
+ type: integer
+ description: Number of seconds to wait before retrying, when provided
+ securitySchemes:
+ polyApiKey:
+ type: apiKey
+ in: header
+ name: POLY_API_KEY
+ description: Your API key
+ polyAddress:
+ type: apiKey
+ in: header
+ name: POLY_ADDRESS
+ description: Ethereum address associated with the API key
+ polySignature:
+ type: apiKey
+ in: header
+ name: POLY_SIGNATURE
+ description: HMAC signature of the request
+ polyPassphrase:
+ type: apiKey
+ in: header
+ name: POLY_PASSPHRASE
+ description: API key passphrase
+ polyTimestamp:
+ type: apiKey
+ in: header
+ name: POLY_TIMESTAMP
+ description: Unix timestamp of the request
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/update-leverage.md b/PolymarketDocumentation-main/docs/api-reference/update-leverage.md
new file mode 100644
index 0000000..16063b5
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/update-leverage.md
@@ -0,0 +1,290 @@
+> ## 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.
+
+# Update Leverage
+
+> Update leverage for an instrument.
+Requires proxy signature, see [proxy signing](/http/signing#2-proxy-signing).
+
+
+Request Weight: **1** Action Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json patch /v1/trade/leverage
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/trade/leverage:
+ patch:
+ summary: Update Leverage
+ description: >
+ Update leverage for an instrument.
+
+ Requires proxy signature, see [proxy
+ signing](/http/signing#2-proxy-signing).
+ operationId: updateLeverage
+ requestBody:
+ description: Leverage request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LeverageRequest'
+ examples:
+ updateLeverage:
+ summary: Update leverage for one instrument
+ value:
+ op:
+ type: updateLeverage
+ args:
+ iid: 1
+ lev: 5
+ cross: false
+ sig: >-
+ 0x59ed57f6dce8d15aa01e774ef53d9957c84801fb34ec655f6a2ea344af8a58843095314730a3f1bd8f0f4560f6dc6f8de69d3f2d0a6f3365fc877f7f4845d40b1c
+ salt: 333333333
+ ts: 1767000012000
+ responses:
+ '200':
+ description: The instrument's effective leverage configuration after the update.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LeverageResponse'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '422':
+ $ref: '#/components/responses/Error422Response'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ LeverageRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpUpdateLeverage'
+ - $ref: '#/components/schemas/BaseOp'
+ LeverageResponse:
+ description: The instrument's effective leverage configuration after the update.
+ type: object
+ required:
+ - status
+ - instrument_id
+ - leverage
+ - cross
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ instrument_id:
+ $ref: '#/components/schemas/iid'
+ leverage:
+ $ref: '#/components/schemas/lev'
+ cross:
+ $ref: '#/components/schemas/cross'
+ OpUpdateLeverage:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - updateLeverage
+ args:
+ type: object
+ required:
+ - iid
+ - lev
+ - cross
+ properties:
+ iid:
+ $ref: '#/components/schemas/iid'
+ lev:
+ $ref: '#/components/schemas/lev'
+ cross:
+ $ref: '#/components/schemas/cross'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ lev:
+ type: integer
+ description: Leverage
+ example: 10
+ cross:
+ type: boolean
+ description: Whether to use cross margin mode
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ GenericRejected:
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error422Response:
+ description: |
+ Unprocessable Entity — the request was well-formed but a domain rule
+ rejected it on its merits (insufficient balance, invalid leverage,
+ proxy already exists, …). The body is the discriminated rejection
+ (`status: err`) with the engine error identifier in `error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericRejected'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/withdraw.md b/PolymarketDocumentation-main/docs/api-reference/withdraw.md
new file mode 100644
index 0000000..a0cda59
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/withdraw.md
@@ -0,0 +1,318 @@
+> ## 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.
+
+# Withdraw
+
+> Submit a signed withdrawal request.
+Requires EOA signature, see [EOA signing](/http/signing#1-eoa-signing).
+
+The `amount` field is the raw token amount including decimals (e.g. `"100000000"` for 100 USDC).
+This must match the `uint256 amount` value used in the EIP-712 `Withdraw` signature.
+
+The `ts` field is Unix seconds (not milliseconds) because the on-chain contract validates it
+against `block.timestamp`. It must also match the `uint64 ts` in the signed EIP-712 struct.
+
+
+Request Weight: **1**
+
+
+## OpenAPI
+
+````yaml /api-spec/perps-openapi.json post /v1/account/withdraw
+openapi: 3.0.3
+info:
+ title: Polymarket Perps HTTP API
+ version: 1.0.0
+ description: HTTP API for Polymarket perpetual trading system.
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+servers:
+ - url: https://api.perpetuals.polymarket.com
+ description: Production Perps HTTP API
+security: []
+paths:
+ /v1/account/withdraw:
+ post:
+ summary: Withdraw
+ description: >
+ Submit a signed withdrawal request.
+
+ Requires EOA signature, see [EOA signing](/http/signing#1-eoa-signing).
+
+
+ The `amount` field is the raw token amount including decimals (e.g.
+ `"100000000"` for 100 USDC).
+
+ This must match the `uint256 amount` value used in the EIP-712
+ `Withdraw` signature.
+
+
+ The `ts` field is Unix seconds (not milliseconds) because the on-chain
+ contract validates it
+
+ against `block.timestamp`. It must also match the `uint64 ts` in the
+ signed EIP-712 struct.
+ operationId: withdraw
+ requestBody:
+ description: Withdraw request.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WithdrawRequest'
+ examples:
+ withdraw:
+ summary: Withdraw 100 USDC
+ value:
+ op:
+ type: withdraw
+ args:
+ account: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
+ token: '0xaf88d065e77c8cc2239327c5edb3a432268e5831'
+ amount: '100000000'
+ to: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ sig: >-
+ 0x5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a1c
+ salt: 555555555
+ ts: 1767000014
+ responses:
+ '200':
+ description: The accepted withdrawal, carrying its `withdraw_id`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WithdrawAccepted'
+ '400':
+ $ref: '#/components/responses/Error400Response'
+ '422':
+ description: >
+ The withdrawal was rejected on its merits (e.g. insufficient
+ balance).
+
+ The body carries `withdraw_id` and `error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WithdrawRejected'
+ '429':
+ $ref: '#/components/responses/Error429Response'
+ '500':
+ $ref: '#/components/responses/Error500Response'
+ security: []
+components:
+ schemas:
+ WithdrawRequest:
+ allOf:
+ - type: object
+ required:
+ - op
+ properties:
+ op:
+ $ref: '#/components/schemas/OpWithdraw'
+ - $ref: '#/components/schemas/BaseOp'
+ WithdrawAccepted:
+ type: object
+ required:
+ - status
+ - withdraw_id
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ withdraw_id:
+ $ref: '#/components/schemas/withdraw_id'
+ WithdrawRejected:
+ type: object
+ required:
+ - status
+ - withdraw_id
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ withdraw_id:
+ $ref: '#/components/schemas/withdraw_id'
+ error:
+ $ref: '#/components/schemas/error'
+ OpWithdraw:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - withdraw
+ args:
+ type: object
+ required:
+ - account
+ - token
+ - amount
+ - to
+ properties:
+ account:
+ $ref: '#/components/schemas/account'
+ token:
+ $ref: '#/components/schemas/token'
+ amount:
+ $ref: '#/components/schemas/amount'
+ to:
+ $ref: '#/components/schemas/to'
+ BaseOp:
+ type: object
+ required:
+ - sig
+ - salt
+ - ts
+ properties:
+ sig:
+ $ref: '#/components/schemas/sig'
+ salt:
+ $ref: '#/components/schemas/salt'
+ ts:
+ $ref: '#/components/schemas/ts'
+ withdraw_id:
+ type: integer
+ description: Withdraw ID
+ Error400:
+ title: Error400
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport errors
+ (`401`/`404`/`429`/`500`) this is a stable, machine-readable snake_case
+ identifier that is part of the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`, `order_not_found`,
+ `reduce_only_invalid`, `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may change. See the Error
+ handling guide for the domain identifiers. (Post-only / Fill-or-Kill
+ outcomes are order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ Error429:
+ title: Error429
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ Error500:
+ title: Error500
+ type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ error:
+ $ref: '#/components/schemas/error'
+ account:
+ type: string
+ description: Account address in hex format
+ example: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
+ token:
+ type: string
+ description: Token contract address in hex format
+ example: '0xaf88d065e77c8cc2239327c5edb3a432268e5831'
+ amount:
+ type: string
+ description: >-
+ Raw token amount including decimals. For withdrawals this matches the
+ uint256 amount in the EIP-712 signature (e.g. "100000000" for 100 USDC
+ with 6 decimals).
+ example: '100000000'
+ to:
+ type: string
+ description: Destination address in hex format
+ example: '0x1234567890abcdef1234567890abcdef12345678'
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix seconds
+ for withdrawals (must match the on-chain EIP-712 struct verified against
+ block.timestamp).
+ example: 1767225600000
+ responses:
+ Error400Response:
+ description: |
+ Bad request — the request was malformed or failed validation (bad query
+ parameters, unparseable body, invalid signature, or a domain pre-check).
+ The `error` field is a human-readable validation detail.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error400'
+ Error429Response:
+ description: >
+ Too Many Requests. `error` distinguishes the limit that was hit:
+
+ `ip_rate_limited` (per-IP token bucket), `action_rate_limited`
+ (per-account
+
+ action rate), or `open_orders_limit` (resting open-order cap).
+ headers:
+ Retry-After:
+ description: >
+ Whole seconds to wait before retrying. Present only on token-bucket
+
+ rate-limit rejections (`ip_rate_limited` and `action_rate_limited`);
+ a
+
+ conservative estimate of when enough capacity will have refilled to
+
+ admit the request. Absent on `open_orders_limit`, which is a
+ capacity
+
+ limit, not a rate limit — waiting does not free order slots; cancel
+
+ resting orders or wait for fills instead.
+ schema:
+ type: integer
+ example: 2
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error429'
+ Error500Response:
+ description: |
+ Internal server error. `error` is `internal_error`.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error500'
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/wss/market.md b/PolymarketDocumentation-main/docs/api-reference/wss/market.md
new file mode 100644
index 0000000..6010a44
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/wss/market.md
@@ -0,0 +1,1328 @@
+> ## 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.
+
+# Market Channel
+
+> Public WebSocket for real-time orderbook, price, and market lifecycle updates.
+
+
+
+## AsyncAPI
+
+````yaml asyncapi.json market
+id: market
+title: Market Channel
+description: >-
+ Public channel for real-time market data. Subscribe by providing asset IDs
+ (token IDs). Receive orderbook snapshots, price updates, trade executions, and
+ market lifecycle events.
+servers:
+ - id: production
+ protocol: wss
+ host: ws-subscriptions-clob.polymarket.com
+ bindings: []
+ variables: []
+address: /ws/market
+parameters: []
+bindings: []
+operations:
+ - &ref_3
+ id: subscribe
+ title: Subscribe
+ description: Send initial subscription request to receive market data
+ type: receive
+ messages:
+ - &ref_14
+ id: subscriptionRequest
+ contentType: application/json
+ payload:
+ - name: Subscription Request
+ description: Initial subscription message sent after connecting
+ type: object
+ properties:
+ - name: assets_ids
+ type: array
+ description: Asset IDs (token IDs) to subscribe to
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: type
+ type: string
+ description: Must be 'market'
+ required: true
+ - name: initial_dump
+ type: boolean
+ description: >-
+ Whether to send an initial orderbook snapshot on subscribe.
+ Defaults to true.
+ required: false
+ - name: level
+ type: integer
+ description: Subscription level. Defaults to 2.
+ enumValues:
+ - 1
+ - 2
+ - 3
+ required: false
+ - name: custom_feature_enabled
+ type: boolean
+ description: Enable best_bid_ask, new_market, and market_resolved events.
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: Initial subscription request payload
+ required:
+ - assets_ids
+ - type
+ properties:
+ assets_ids:
+ type: array
+ description: Asset IDs (token IDs) to subscribe to
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ type:
+ type: string
+ const: market
+ description: Must be 'market'
+ x-parser-schema-id:
+ initial_dump:
+ type: boolean
+ description: >-
+ Whether to send an initial orderbook snapshot on subscribe.
+ Defaults to true.
+ default: true
+ x-parser-schema-id:
+ level:
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ description: Subscription level. Defaults to 2.
+ default: 2
+ x-parser-schema-id:
+ custom_feature_enabled:
+ type: boolean
+ description: Enable best_bid_ask, new_market, and market_resolved events.
+ default: false
+ x-parser-schema-id:
+ x-parser-schema-id: SubscriptionRequest
+ title: Subscription Request
+ description: Initial subscription message sent after connecting
+ example: |-
+ {
+ "assets_ids": [
+ "65818619657568813474341868652308942079804919287380422192892211131408793125422",
+ "52114319501245915516055106046884209969926127482827954674443846427813813222426"
+ ],
+ "type": "market"
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: subscriptionRequest
+ bindings: []
+ extensions: &ref_0
+ - id: x-parser-unique-object-id
+ value: market
+ - &ref_4
+ id: updateSubscription
+ title: Update Subscription
+ description: Dynamically subscribe or unsubscribe from assets without reconnecting
+ type: receive
+ messages:
+ - &ref_15
+ id: subscriptionRequestUpdate
+ contentType: application/json
+ payload:
+ - name: Subscription Update
+ description: Subscribe or unsubscribe from assets without reconnecting
+ type: object
+ properties:
+ - name: operation
+ type: string
+ enumValues:
+ - subscribe
+ - unsubscribe
+ required: true
+ - name: assets_ids
+ type: array
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: level
+ type: integer
+ enumValues:
+ - 1
+ - 2
+ - 3
+ required: false
+ - name: custom_feature_enabled
+ type: boolean
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: Dynamically update asset subscriptions
+ required:
+ - operation
+ - assets_ids
+ properties:
+ operation:
+ type: string
+ enum:
+ - subscribe
+ - unsubscribe
+ x-parser-schema-id:
+ assets_ids:
+ type: array
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ level:
+ type: integer
+ enum:
+ - 1
+ - 2
+ - 3
+ x-parser-schema-id:
+ custom_feature_enabled:
+ type: boolean
+ x-parser-schema-id:
+ x-parser-schema-id: SubscriptionRequestUpdate
+ title: Subscription Update
+ description: Subscribe or unsubscribe from assets without reconnecting
+ example: |-
+ {
+ "operation": "subscribe",
+ "assets_ids": [
+ "71321045679252212594626385532706912750332728571942532289631379312455583992563"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: subscriptionRequestUpdate
+ bindings: []
+ extensions: *ref_0
+ - &ref_5
+ id: ping
+ title: Ping
+ description: Send PING every 10 seconds to keep the connection alive
+ type: receive
+ messages:
+ - &ref_16
+ id: ping
+ contentType: text/plain
+ payload:
+ - type: string
+ const: PING
+ x-parser-schema-id:
+ name: Ping
+ description: Client heartbeat — send every 10 seconds
+ headers: []
+ jsonPayloadSchema:
+ type: string
+ const: PING
+ x-parser-schema-id:
+ title: Ping
+ description: Client heartbeat — send every 10 seconds
+ example: '{}'
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: ping
+ bindings: []
+ extensions: *ref_0
+ - &ref_6
+ id: pong
+ title: Pong
+ description: Server responds to PING with PONG
+ type: send
+ messages:
+ - &ref_17
+ id: pong
+ contentType: text/plain
+ payload:
+ - type: string
+ const: PONG
+ x-parser-schema-id:
+ name: Pong
+ description: Server heartbeat response
+ headers: []
+ jsonPayloadSchema:
+ type: string
+ const: PONG
+ x-parser-schema-id:
+ title: Pong
+ description: Server heartbeat response
+ example: '{}'
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: pong
+ bindings: []
+ extensions: *ref_0
+ - &ref_7
+ id: receiveBook
+ title: Orderbook Snapshot
+ description: Full orderbook snapshot sent on subscribe or after a trade
+ type: send
+ messages:
+ - &ref_18
+ id: book
+ contentType: application/json
+ payload:
+ - name: Orderbook Snapshot
+ description: Full aggregated orderbook for an asset
+ type: object
+ properties:
+ - name: event_type
+ type: string
+ description: book
+ required: true
+ - name: asset_id
+ type: string
+ description: Asset ID (token ID)
+ required: true
+ - name: market
+ type: string
+ description: Condition ID of the market
+ required: true
+ - name: bids
+ type: array
+ description: Aggregated buy orders by price level
+ required: true
+ properties:
+ - name: price
+ type: string
+ description: Price level (e.g., '0.50')
+ required: true
+ - name: size
+ type: string
+ description: Total size at this price level
+ required: true
+ - name: asks
+ type: array
+ description: Aggregated sell orders by price level
+ required: true
+ properties:
+ - name: price
+ type: string
+ description: Price level (e.g., '0.50')
+ required: true
+ - name: size
+ type: string
+ description: Total size at this price level
+ required: true
+ - name: timestamp
+ type: string
+ description: Unix timestamp in milliseconds
+ required: true
+ - name: hash
+ type: string
+ description: Hash of the orderbook content
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: Full orderbook snapshot
+ required:
+ - event_type
+ - asset_id
+ - market
+ - bids
+ - asks
+ - timestamp
+ - hash
+ properties:
+ event_type:
+ type: string
+ const: book
+ x-parser-schema-id:
+ asset_id:
+ type: string
+ description: Asset ID (token ID)
+ x-parser-schema-id:
+ market:
+ type: string
+ description: Condition ID of the market
+ x-parser-schema-id:
+ bids:
+ type: array
+ description: Aggregated buy orders by price level
+ items: &ref_1
+ type: object
+ description: Aggregated order at a price level
+ required:
+ - price
+ - size
+ properties:
+ price:
+ type: string
+ description: Price level (e.g., '0.50')
+ x-parser-schema-id:
+ size:
+ type: string
+ description: Total size at this price level
+ x-parser-schema-id:
+ x-parser-schema-id: OrderSummary
+ x-parser-schema-id:
+ asks:
+ type: array
+ description: Aggregated sell orders by price level
+ items: *ref_1
+ x-parser-schema-id:
+ timestamp:
+ type: string
+ description: Unix timestamp in milliseconds
+ x-parser-schema-id:
+ hash:
+ type: string
+ description: Hash of the orderbook content
+ x-parser-schema-id:
+ x-parser-schema-id: BookEvent
+ title: Orderbook Snapshot
+ description: Full aggregated orderbook for an asset
+ example: |-
+ {
+ "event_type": "book",
+ "asset_id": "65818619657568813474341868652308942079804919287380422192892211131408793125422",
+ "market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
+ "bids": [
+ {
+ "price": "0.48",
+ "size": "30"
+ },
+ {
+ "price": "0.49",
+ "size": "20"
+ },
+ {
+ "price": "0.50",
+ "size": "15"
+ }
+ ],
+ "asks": [
+ {
+ "price": "0.52",
+ "size": "25"
+ },
+ {
+ "price": "0.53",
+ "size": "60"
+ },
+ {
+ "price": "0.54",
+ "size": "10"
+ }
+ ],
+ "timestamp": "1757908892351",
+ "hash": "0xabc123..."
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: book
+ bindings: []
+ extensions: *ref_0
+ - &ref_8
+ id: receivePriceChange
+ title: Price Change
+ description: >-
+ Delta update to orderbook price levels when an order is placed or
+ cancelled
+ type: send
+ messages:
+ - &ref_19
+ id: priceChange
+ contentType: application/json
+ payload:
+ - name: Price Change
+ description: Orderbook price level delta update
+ type: object
+ properties:
+ - name: event_type
+ type: string
+ description: price_change
+ required: true
+ - name: market
+ type: string
+ description: Condition ID of the market
+ required: true
+ - name: price_changes
+ type: array
+ required: true
+ properties:
+ - name: asset_id
+ type: string
+ required: true
+ - name: price
+ type: string
+ description: Price level affected
+ required: true
+ - name: size
+ type: string
+ description: New aggregate size (0 means level removed)
+ required: true
+ - name: side
+ type: string
+ enumValues:
+ - BUY
+ - SELL
+ required: true
+ - name: hash
+ type: string
+ description: Hash of the order that caused this change
+ required: true
+ - name: best_bid
+ type: string
+ required: false
+ - name: best_ask
+ type: string
+ required: false
+ - name: timestamp
+ type: string
+ description: Unix timestamp in milliseconds
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: One or more price level updates
+ required:
+ - event_type
+ - market
+ - price_changes
+ - timestamp
+ properties:
+ event_type:
+ type: string
+ const: price_change
+ x-parser-schema-id:
+ market:
+ type: string
+ description: Condition ID of the market
+ x-parser-schema-id:
+ price_changes:
+ type: array
+ items:
+ type: object
+ description: Individual price level change
+ required:
+ - asset_id
+ - price
+ - size
+ - side
+ - hash
+ properties:
+ asset_id:
+ type: string
+ x-parser-schema-id:
+ price:
+ type: string
+ description: Price level affected
+ x-parser-schema-id:
+ size:
+ type: string
+ description: New aggregate size (0 means level removed)
+ x-parser-schema-id:
+ side:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ x-parser-schema-id:
+ hash:
+ type: string
+ description: Hash of the order that caused this change
+ x-parser-schema-id:
+ best_bid:
+ type: string
+ x-parser-schema-id:
+ best_ask:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id: PriceChangeMessage
+ x-parser-schema-id:
+ timestamp:
+ type: string
+ description: Unix timestamp in milliseconds
+ x-parser-schema-id:
+ x-parser-schema-id: PriceChangeEvent
+ title: Price Change
+ description: Orderbook price level delta update
+ example: |-
+ {
+ "event_type": "price_change",
+ "market": "0x5f65177b394277fd294cd75650044e32ba009a95022d88a0c1d565897d72f8f1",
+ "price_changes": [
+ {
+ "asset_id": "71321045679252212594626385532706912750332728571942532289631379312455583992563",
+ "price": "0.5",
+ "size": "200",
+ "side": "BUY",
+ "hash": "56621a121a47ed9333273e21c83b660cff37ae50",
+ "best_bid": "0.5",
+ "best_ask": "1"
+ }
+ ],
+ "timestamp": "1757908892351"
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: priceChange
+ bindings: []
+ extensions: *ref_0
+ - &ref_9
+ id: receiveLastTradePrice
+ title: Last Trade Price
+ description: Trade execution notification
+ type: send
+ messages:
+ - &ref_20
+ id: lastTradePrice
+ contentType: application/json
+ payload:
+ - name: Last Trade Price
+ description: Trade execution event
+ type: object
+ properties:
+ - name: event_type
+ type: string
+ description: last_trade_price
+ required: true
+ - name: asset_id
+ type: string
+ required: true
+ - name: market
+ type: string
+ required: true
+ - name: price
+ type: string
+ description: Trade execution price
+ required: true
+ - name: size
+ type: string
+ description: Trade size
+ required: true
+ - name: fee_rate_bps
+ type: string
+ description: Fee rate in basis points
+ required: false
+ - name: side
+ type: string
+ description: From taker's perspective
+ enumValues:
+ - BUY
+ - SELL
+ required: true
+ - name: timestamp
+ type: string
+ description: Unix timestamp in milliseconds
+ required: true
+ - name: transaction_hash
+ type: string
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: Last trade price event
+ required:
+ - event_type
+ - asset_id
+ - market
+ - price
+ - size
+ - side
+ - timestamp
+ properties:
+ event_type:
+ type: string
+ const: last_trade_price
+ x-parser-schema-id:
+ asset_id:
+ type: string
+ x-parser-schema-id:
+ market:
+ type: string
+ x-parser-schema-id:
+ price:
+ type: string
+ description: Trade execution price
+ x-parser-schema-id:
+ size:
+ type: string
+ description: Trade size
+ x-parser-schema-id:
+ fee_rate_bps:
+ type: string
+ description: Fee rate in basis points
+ x-parser-schema-id:
+ side:
+ type: string
+ enum:
+ - BUY
+ - SELL
+ description: From taker's perspective
+ x-parser-schema-id:
+ timestamp:
+ type: string
+ description: Unix timestamp in milliseconds
+ x-parser-schema-id:
+ transaction_hash:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id: LastTradePriceEvent
+ title: Last Trade Price
+ description: Trade execution event
+ example: |-
+ {
+ "event_type": "last_trade_price",
+ "asset_id": "114122071509644379678018727908709560226618148003371446110114509806601493071694",
+ "market": "0x6a67b9d828d53862160e470329ffea5246f338ecfffdf2cab45211ec578b0347",
+ "price": "0.456",
+ "size": "219.217767",
+ "fee_rate_bps": "0",
+ "side": "BUY",
+ "timestamp": "1750428146322",
+ "transaction_hash": "0xeeefffggghhh"
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: lastTradePrice
+ bindings: []
+ extensions: *ref_0
+ - &ref_10
+ id: receiveTickSizeChange
+ title: Tick Size Change
+ description: Market tick size update when price approaches limits
+ type: send
+ messages:
+ - &ref_21
+ id: tickSizeChange
+ contentType: application/json
+ payload:
+ - name: Tick Size Change
+ description: Market tick size update event
+ type: object
+ properties:
+ - name: event_type
+ type: string
+ description: tick_size_change
+ required: true
+ - name: asset_id
+ type: string
+ required: true
+ - name: market
+ type: string
+ required: true
+ - name: old_tick_size
+ type: string
+ required: true
+ - name: new_tick_size
+ type: string
+ required: true
+ - name: timestamp
+ type: string
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: Tick size change event
+ required:
+ - event_type
+ - asset_id
+ - market
+ - old_tick_size
+ - new_tick_size
+ - timestamp
+ properties:
+ event_type:
+ type: string
+ const: tick_size_change
+ x-parser-schema-id:
+ asset_id:
+ type: string
+ x-parser-schema-id:
+ market:
+ type: string
+ x-parser-schema-id:
+ old_tick_size:
+ type: string
+ x-parser-schema-id:
+ new_tick_size:
+ type: string
+ x-parser-schema-id:
+ timestamp:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id: TickSizeChangeEvent
+ title: Tick Size Change
+ description: Market tick size update event
+ example: |-
+ {
+ "event_type": "tick_size_change",
+ "asset_id": "65818619657568813474341868652308942079804919287380422192892211131408793125422",
+ "market": "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af",
+ "old_tick_size": "0.01",
+ "new_tick_size": "0.001",
+ "timestamp": "1757908892351"
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: tickSizeChange
+ bindings: []
+ extensions: *ref_0
+ - &ref_11
+ id: receiveBestBidAsk
+ title: Best Bid/Ask
+ description: 'Best bid and ask update (requires custom_feature_enabled: true)'
+ type: send
+ messages:
+ - &ref_22
+ id: bestBidAsk
+ contentType: application/json
+ payload:
+ - name: Best Bid/Ask
+ description: >-
+ Best bid and ask price update — requires custom_feature_enabled:
+ true
+ type: object
+ properties:
+ - name: event_type
+ type: string
+ description: best_bid_ask
+ required: true
+ - name: asset_id
+ type: string
+ required: true
+ - name: market
+ type: string
+ required: true
+ - name: best_bid
+ type: string
+ required: true
+ - name: best_ask
+ type: string
+ required: true
+ - name: spread
+ type: string
+ required: true
+ - name: timestamp
+ type: string
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: Best bid/ask event — requires custom_feature_enabled
+ required:
+ - event_type
+ - asset_id
+ - market
+ - best_bid
+ - best_ask
+ - spread
+ - timestamp
+ properties:
+ event_type:
+ type: string
+ const: best_bid_ask
+ x-parser-schema-id:
+ asset_id:
+ type: string
+ x-parser-schema-id:
+ market:
+ type: string
+ x-parser-schema-id:
+ best_bid:
+ type: string
+ x-parser-schema-id:
+ best_ask:
+ type: string
+ x-parser-schema-id:
+ spread:
+ type: string
+ x-parser-schema-id:
+ timestamp:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id: BestBidAskEvent
+ title: Best Bid/Ask
+ description: 'Best bid and ask price update — requires custom_feature_enabled: true'
+ example: |-
+ {
+ "event_type": "best_bid_ask",
+ "market": "0x0005c0d312de0be897668695bae9f32b624b4a1ae8b140c49f08447fcc74f442",
+ "asset_id": "85354956062430465315924116860125388538595433819574542752031640332592237464430",
+ "best_bid": "0.73",
+ "best_ask": "0.77",
+ "spread": "0.04",
+ "timestamp": "1766789469958"
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: bestBidAsk
+ bindings: []
+ extensions: *ref_0
+ - &ref_12
+ id: receiveNewMarket
+ title: New Market
+ description: 'New market creation event (requires custom_feature_enabled: true)'
+ type: send
+ messages:
+ - &ref_23
+ id: newMarket
+ contentType: application/json
+ payload:
+ - name: New Market
+ description: 'New market creation event — requires custom_feature_enabled: true'
+ type: object
+ properties:
+ - name: event_type
+ type: string
+ description: new_market
+ required: true
+ - name: id
+ type: string
+ description: Market ID
+ required: true
+ - name: question
+ type: string
+ required: true
+ - name: market
+ type: string
+ description: Condition ID
+ required: true
+ - name: slug
+ type: string
+ required: true
+ - name: description
+ type: string
+ required: false
+ - name: assets_ids
+ type: array
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: outcomes
+ type: array
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: event_message
+ type: object
+ description: Parent event metadata for grouped markets
+ required: false
+ properties:
+ - name: id
+ type: string
+ required: false
+ - name: ticker
+ type: string
+ required: false
+ - name: slug
+ type: string
+ required: false
+ - name: title
+ type: string
+ required: false
+ - name: description
+ type: string
+ required: false
+ - name: timestamp
+ type: string
+ required: true
+ - name: tags
+ type: array
+ required: false
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: condition_id
+ type: string
+ description: Condition ID
+ required: false
+ - name: active
+ type: boolean
+ description: Whether the market is active
+ required: false
+ - name: clob_token_ids
+ type: array
+ description: CLOB token IDs for the market
+ required: false
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: sports_market_type
+ type: string
+ description: Sports market type such as spread or moneyline
+ required: false
+ - name: line
+ type: string
+ description: Betting line value, or an empty string when not applicable
+ required: false
+ - name: game_start_time
+ type: string
+ description: >-
+ Game start time in RFC3339 format, or an empty string when not
+ applicable
+ required: false
+ - name: order_price_min_tick_size
+ type: string
+ description: Minimum tick size for order prices
+ required: false
+ - name: group_item_title
+ type: string
+ description: Display title for the group item
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: New market creation event — requires custom_feature_enabled
+ required:
+ - event_type
+ - id
+ - question
+ - market
+ - slug
+ - assets_ids
+ - outcomes
+ - timestamp
+ properties:
+ event_type:
+ type: string
+ const: new_market
+ x-parser-schema-id:
+ id:
+ type: string
+ description: Market ID
+ x-parser-schema-id:
+ question:
+ type: string
+ x-parser-schema-id:
+ market:
+ type: string
+ description: Condition ID
+ x-parser-schema-id:
+ slug:
+ type: string
+ x-parser-schema-id:
+ description:
+ type: string
+ x-parser-schema-id:
+ assets_ids:
+ type: array
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ outcomes:
+ type: array
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ event_message: &ref_2
+ type: object
+ description: Parent event metadata for grouped markets
+ properties:
+ id:
+ type: string
+ x-parser-schema-id:
+ ticker:
+ type: string
+ x-parser-schema-id:
+ slug:
+ type: string
+ x-parser-schema-id:
+ title:
+ type: string
+ x-parser-schema-id:
+ description:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id: EventMessage
+ timestamp:
+ type: string
+ x-parser-schema-id:
+ tags:
+ type: array
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ condition_id:
+ type: string
+ description: Condition ID
+ x-parser-schema-id:
+ active:
+ type: boolean
+ description: Whether the market is active
+ x-parser-schema-id:
+ clob_token_ids:
+ type: array
+ description: CLOB token IDs for the market
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ sports_market_type:
+ type: string
+ description: Sports market type such as spread or moneyline
+ x-parser-schema-id:
+ line:
+ type: string
+ description: Betting line value, or an empty string when not applicable
+ x-parser-schema-id:
+ game_start_time:
+ type: string
+ description: >-
+ Game start time in RFC3339 format, or an empty string when not
+ applicable
+ x-parser-schema-id:
+ order_price_min_tick_size:
+ type: string
+ description: Minimum tick size for order prices
+ x-parser-schema-id:
+ group_item_title:
+ type: string
+ description: Display title for the group item
+ x-parser-schema-id:
+ x-parser-schema-id: NewMarketEvent
+ title: New Market
+ description: 'New market creation event — requires custom_feature_enabled: true'
+ example: |-
+ {
+ "event_type": "new_market",
+ "id": "1031769",
+ "question": "Will NVIDIA (NVDA) close above $240 end of January?",
+ "market": "0x311d0c4b6671ab54af4970c06fcf58662516f5168997bdda209ec3db5aa6b0c1",
+ "slug": "nvda-above-240-on-january-30-2026",
+ "description": "This market will resolve to \"Yes\" if the official closing price for NVIDIA (NVDA) on the final trading day of January 2026 is higher than the listed price. Otherwise, this market will resolve to \"No\".",
+ "assets_ids": [
+ "76043073756653678226373981964075571318267289248134717369284518995922789326425",
+ "31690934263385727664202099278545688007799199447969475608906331829650099442770"
+ ],
+ "outcomes": [
+ "Yes",
+ "No"
+ ],
+ "event_message": {
+ "id": "125819",
+ "ticker": "nvda-above-in-january-2026",
+ "slug": "nvda-above-in-january-2026",
+ "title": "Will NVIDIA (NVDA) close above ___ end of January?",
+ "description": "This market will resolve to \"Yes\" if the official closing price for NVIDIA (NVDA) on the final trading day of January 2026 is higher than the listed price. Otherwise, this market will resolve to \"No\"."
+ },
+ "timestamp": "1766790415550",
+ "tags": [
+ "stocks"
+ ],
+ "condition_id": "0x311d0c4b6671ab54af4970c06fcf58662516f5168997bdda209ec3db5aa6b0c1",
+ "active": true,
+ "clob_token_ids": [
+ "76043073756653678226373981964075571318267289248134717369284518995922789326425",
+ "31690934263385727664202099278545688007799199447969475608906331829650099442770"
+ ],
+ "sports_market_type": "",
+ "line": "",
+ "game_start_time": "",
+ "order_price_min_tick_size": "0.01",
+ "group_item_title": "NVDA above $240"
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: newMarket
+ bindings: []
+ extensions: *ref_0
+ - &ref_13
+ id: receiveMarketResolved
+ title: Market Resolved
+ description: 'Market resolution event (requires custom_feature_enabled: true)'
+ type: send
+ messages:
+ - &ref_24
+ id: marketResolved
+ contentType: application/json
+ payload:
+ - name: Market Resolved
+ description: 'Market resolution event — requires custom_feature_enabled: true'
+ type: object
+ properties:
+ - name: event_type
+ type: string
+ description: market_resolved
+ required: true
+ - name: id
+ type: string
+ required: true
+ - name: market
+ type: string
+ description: Condition ID
+ required: true
+ - name: assets_ids
+ type: array
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: winning_asset_id
+ type: string
+ required: true
+ - name: winning_outcome
+ type: string
+ required: true
+ - name: event_message
+ type: object
+ description: Parent event metadata for grouped markets
+ required: false
+ properties:
+ - name: id
+ type: string
+ required: false
+ - name: ticker
+ type: string
+ required: false
+ - name: slug
+ type: string
+ required: false
+ - name: title
+ type: string
+ required: false
+ - name: description
+ type: string
+ required: false
+ - name: timestamp
+ type: string
+ required: true
+ - name: tags
+ type: array
+ required: false
+ properties:
+ - name: item
+ type: string
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ description: Market resolution event — requires custom_feature_enabled
+ required:
+ - event_type
+ - id
+ - market
+ - assets_ids
+ - winning_asset_id
+ - winning_outcome
+ - timestamp
+ properties:
+ event_type:
+ type: string
+ const: market_resolved
+ x-parser-schema-id:
+ id:
+ type: string
+ x-parser-schema-id:
+ market:
+ type: string
+ description: Condition ID
+ x-parser-schema-id:
+ assets_ids:
+ type: array
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ winning_asset_id:
+ type: string
+ x-parser-schema-id:
+ winning_outcome:
+ type: string
+ x-parser-schema-id:
+ event_message: *ref_2
+ timestamp:
+ type: string
+ x-parser-schema-id:
+ tags:
+ type: array
+ items:
+ type: string
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id: MarketResolvedEvent
+ title: Market Resolved
+ description: 'Market resolution event — requires custom_feature_enabled: true'
+ example: |-
+ {
+ "event_type": "market_resolved",
+ "id": "1031769",
+ "market": "0x311d0c4b6671ab54af4970c06fcf58662516f5168997bdda209ec3db5aa6b0c1",
+ "assets_ids": [
+ "76043073756653678226373981964075571318267289248134717369284518995922789326425",
+ "31690934263385727664202099278545688007799199447969475608906331829650099442770"
+ ],
+ "winning_asset_id": "76043073756653678226373981964075571318267289248134717369284518995922789326425",
+ "winning_outcome": "Yes",
+ "timestamp": "1766790415550",
+ "tags": [
+ "stocks"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: marketResolved
+ bindings: []
+ extensions: *ref_0
+sendOperations:
+ - *ref_3
+ - *ref_4
+ - *ref_5
+receiveOperations:
+ - *ref_6
+ - *ref_7
+ - *ref_8
+ - *ref_9
+ - *ref_10
+ - *ref_11
+ - *ref_12
+ - *ref_13
+sendMessages:
+ - *ref_14
+ - *ref_15
+ - *ref_16
+receiveMessages:
+ - *ref_17
+ - *ref_18
+ - *ref_19
+ - *ref_20
+ - *ref_21
+ - *ref_22
+ - *ref_23
+ - *ref_24
+extensions:
+ - id: x-parser-unique-object-id
+ value: market
+securitySchemes: []
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/wss/perps-auth.md b/PolymarketDocumentation-main/docs/api-reference/wss/perps-auth.md
new file mode 100644
index 0000000..cdedcd2
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/wss/perps-auth.md
@@ -0,0 +1,274 @@
+> ## 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.
+
+# Auth
+
+> Perps WebSocket authentication.
+
+
+
+## AsyncAPI
+
+````yaml asyncapi-perps.json auth
+id: auth
+title: Auth
+description: Authentication to access private channels.
+servers:
+ - id: production
+ protocol: wss
+ host: ws.perpetuals.polymarket.com
+ bindings: []
+ variables: []
+address: /v1/ws
+parameters: []
+bindings: []
+operations:
+ - &ref_1
+ id: AuthSend
+ title: Auth send
+ description: Authenticate connection
+ type: receive
+ messages:
+ - &ref_3
+ id: Request
+ contentType: application/json
+ payload:
+ - name: Auth
+ description: Authenticate this WebSocket connection for private channels
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: op
+ type: object
+ required: true
+ properties:
+ - name: type
+ type: string
+ enumValues:
+ - auth
+ required: true
+ - name: args
+ type: object
+ required: true
+ properties:
+ - name: proxy
+ type: string
+ description: Proxy address in hex format
+ required: true
+ - name: secret
+ type: string
+ description: API secret
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ op:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - auth
+ x-parser-schema-id:
+ args:
+ type: object
+ required:
+ - proxy
+ - secret
+ properties:
+ proxy:
+ type: string
+ description: Proxy address in hex format
+ example: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8'
+ x-parser-schema-id:
+ secret:
+ type: string
+ description: API secret
+ example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - req
+ - op
+ x-parser-schema-id:
+ title: Auth
+ description: Authenticate this WebSocket connection for private channels
+ example: |-
+ {
+ "req": "post",
+ "op": {
+ "type": "auth",
+ "args": {
+ "proxy": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
+ "secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
+ }
+ }
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: Request
+ bindings: []
+ extensions: &ref_0
+ - id: x-parser-unique-object-id
+ value: auth
+ - &ref_2
+ id: AuthReceive
+ title: Auth receive
+ description: Auth response
+ type: send
+ messages:
+ - &ref_4
+ id: Response
+ contentType: application/json
+ payload:
+ - name: Auth Response
+ description: Authentication result
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: object
+ required: true
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of the
+ API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`, `unauthorized`,
+ `not_found`. For `400` it is a human-readable validation
+ detail whose wording may change. See the Error handling
+ guide for the domain identifiers. (Post-only /
+ Fill-or-Kill outcomes are order statuses such as
+ `post_only_rejected`, not rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Auth Response
+ description: Authentication result
+ example: |-
+ {
+ "id": 123,
+ "data": {
+ "status": "",
+ "error": ""
+ }
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: Response
+ bindings: []
+ extensions: *ref_0
+sendOperations:
+ - *ref_1
+receiveOperations:
+ - *ref_2
+sendMessages:
+ - *ref_3
+receiveMessages:
+ - *ref_4
+extensions:
+ - id: x-parser-unique-object-id
+ value: auth
+securitySchemes: []
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/wss/perps-auto-cancel.md b/PolymarketDocumentation-main/docs/api-reference/wss/perps-auto-cancel.md
new file mode 100644
index 0000000..a380148
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/wss/perps-auto-cancel.md
@@ -0,0 +1,305 @@
+> ## 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.
+
+# Auto Cancel
+
+> Perps WebSocket dead man's switch updates.
+
+
+
+## AsyncAPI
+
+````yaml asyncapi-perps.json autoCancel
+id: autoCancel
+title: Auto-Cancel
+description: |
+ Arm or clear the per-account auto-cancel schedule.
+ Requires proxy signature, see [proxy signing](/http/signing#2-proxy-signing).
+
+ Action Weight: **10**
+servers:
+ - id: production
+ protocol: wss
+ host: ws.perpetuals.polymarket.com
+ bindings: []
+ variables: []
+address: /v1/ws
+parameters: []
+bindings: []
+operations:
+ - &ref_1
+ id: AutoCancelSend
+ title: Auto cancel send
+ description: Set or clear auto-cancel
+ type: receive
+ messages:
+ - &ref_3
+ id: Request
+ contentType: application/json
+ payload:
+ - name: Auto-Cancel Request
+ description: Client submits a signed auto-cancel request
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: op
+ type: object
+ required: true
+ properties:
+ - name: type
+ type: string
+ enumValues:
+ - autoCancel
+ required: true
+ - name: args
+ type: object
+ required: true
+ properties:
+ - name: time
+ type: integer
+ description: Timestamp in milliseconds
+ required: true
+ - name: sig
+ type: string
+ description: Signature in hex format
+ required: true
+ - name: salt
+ type: integer
+ description: Salt
+ required: true
+ - name: ts
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712
+ struct verified against block.timestamp).
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ op:
+ type: object
+ required:
+ - type
+ - args
+ properties:
+ type:
+ type: string
+ enum:
+ - autoCancel
+ x-parser-schema-id:
+ args:
+ type: object
+ required:
+ - time
+ properties:
+ time:
+ type: integer
+ description: Timestamp in milliseconds
+ example: 1767225600000
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ sig:
+ type: string
+ description: Signature in hex format
+ example: 0x1234567890...
+ x-parser-schema-id:
+ salt:
+ type: integer
+ description: Salt
+ example: 1234567890
+ x-parser-schema-id:
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712 struct
+ verified against block.timestamp).
+ example: 1767225600000
+ x-parser-schema-id:
+ required:
+ - req
+ - op
+ - sig
+ - salt
+ - ts
+ x-parser-schema-id:
+ title: Auto-Cancel Request
+ description: Client submits a signed auto-cancel request
+ example: |-
+ {
+ "req": "post",
+ "op": {
+ "type": "autoCancel",
+ "args": {
+ "time": 1767225600000
+ }
+ },
+ "sig": "0x1234567890...",
+ "salt": 1234567890,
+ "ts": 1767225600000
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: Request
+ bindings: []
+ extensions: &ref_0
+ - id: x-parser-unique-object-id
+ value: autoCancel
+ - &ref_2
+ id: AutoCancelReceive
+ title: Auto cancel receive
+ description: Auto-cancel response
+ type: send
+ messages:
+ - &ref_4
+ id: Response
+ contentType: application/json
+ payload:
+ - name: Auto-Cancel Response
+ description: Server responds with auto-cancel result
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: object
+ required: true
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of the
+ API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`, `unauthorized`,
+ `not_found`. For `400` it is a human-readable validation
+ detail whose wording may change. See the Error handling
+ guide for the domain identifiers. (Post-only /
+ Fill-or-Kill outcomes are order statuses such as
+ `post_only_rejected`, not rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Auto-Cancel Response
+ description: Server responds with auto-cancel result
+ example: |-
+ {
+ "id": 5,
+ "data": {
+ "status": "ok"
+ }
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: Response
+ bindings: []
+ extensions: *ref_0
+sendOperations:
+ - *ref_1
+receiveOperations:
+ - *ref_2
+sendMessages:
+ - *ref_3
+receiveMessages:
+ - *ref_4
+extensions:
+ - id: x-parser-unique-object-id
+ value: autoCancel
+securitySchemes: []
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/wss/perps-balances.md b/PolymarketDocumentation-main/docs/api-reference/wss/perps-balances.md
new file mode 100644
index 0000000..95b5a91
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/wss/perps-balances.md
@@ -0,0 +1,586 @@
+> ## 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.
+
+# Balances
+
+> Perps WebSocket private balance updates.
+
+
+
+## AsyncAPI
+
+````yaml asyncapi-perps.json balances
+id: balances
+title: Balances
+description: >-
+ Real-time balance updates. Pushed every 5 seconds. Requires authentication,
+ see [Auth](/ws/auth).
+servers:
+ - id: production
+ protocol: wss
+ host: ws.perpetuals.polymarket.com
+ bindings: []
+ variables: []
+address: /v1/ws
+parameters: []
+bindings: []
+operations:
+ - &ref_1
+ id: BalancesSubscribe
+ title: Balances subscribe
+ description: Subscribe to balances
+ type: receive
+ messages:
+ - &ref_6
+ id: SubscribeRequest
+ contentType: application/json
+ payload:
+ - name: Subscribe
+ description: Subscribe to private balance updates (requires prior auth)
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: chs
+ type: array
+ description: 'Balances private channel: "balances"'
+ required: true
+ properties:
+ - name: item
+ type: string
+ enumValues:
+ - balances
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ chs:
+ type: array
+ description: 'Balances private channel: "balances"'
+ items:
+ type: string
+ enum:
+ - balances
+ x-parser-schema-id:
+ example:
+ - balances
+ x-parser-schema-id:
+ required:
+ - req
+ - chs
+ x-parser-schema-id:
+ title: Subscribe
+ description: Subscribe to private balance updates (requires prior auth)
+ example: |-
+ {
+ "req": "sub",
+ "chs": [
+ "balances"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: SubscribeRequest
+ bindings: []
+ extensions: &ref_0
+ - id: x-parser-unique-object-id
+ value: balances
+ - &ref_3
+ id: BalancesSubscribeResponse
+ title: Balances subscribe response
+ description: Balances subscribe response
+ type: send
+ messages:
+ - &ref_8
+ id: SubscribeResponse
+ contentType: application/json
+ payload:
+ - name: Subscribe Response
+ description: Response to balances subscribe request
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: array
+ title: Subscribe Response
+ required: true
+ properties:
+ - name: item
+ type: object
+ required: false
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ title: Subscribe Response
+ type: array
+ items:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Subscribe Response
+ description: Response to balances subscribe request
+ example: |-
+ {
+ "data": []
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: SubscribeResponse
+ bindings: []
+ extensions: *ref_0
+ - &ref_2
+ id: BalancesUnsubscribe
+ title: Balances unsubscribe
+ description: Unsubscribe from balances
+ type: receive
+ messages:
+ - &ref_7
+ id: UnsubscribeRequest
+ contentType: application/json
+ payload:
+ - name: Unsubscribe
+ description: Unsubscribe from private balance updates
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: chs
+ type: array
+ description: 'Balances private channel: "balances"'
+ required: true
+ properties:
+ - name: item
+ type: string
+ enumValues:
+ - balances
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ chs:
+ type: array
+ description: 'Balances private channel: "balances"'
+ items:
+ type: string
+ enum:
+ - balances
+ x-parser-schema-id:
+ example:
+ - balances
+ x-parser-schema-id:
+ required:
+ - req
+ - chs
+ x-parser-schema-id:
+ title: Unsubscribe
+ description: Unsubscribe from private balance updates
+ example: |-
+ {
+ "req": "unsub",
+ "chs": [
+ "balances"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: UnsubscribeRequest
+ bindings: []
+ extensions: *ref_0
+ - &ref_4
+ id: BalancesUnsubscribeResponse
+ title: Balances unsubscribe response
+ description: Balances unsubscribe response
+ type: send
+ messages:
+ - &ref_9
+ id: UnsubscribeResponse
+ contentType: application/json
+ payload:
+ - name: Unsubscribe Response
+ description: Response to balances unsubscribe request
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: array
+ title: Subscribe Response
+ required: true
+ properties:
+ - name: item
+ type: object
+ required: false
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ title: Subscribe Response
+ type: array
+ items:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Unsubscribe Response
+ description: Response to balances unsubscribe request
+ example: |-
+ {
+ "data": []
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: UnsubscribeResponse
+ bindings: []
+ extensions: *ref_0
+ - &ref_5
+ id: BalancesUpdate
+ title: Balances update
+ description: Receive balance updates
+ type: send
+ messages:
+ - &ref_10
+ id: Update
+ contentType: application/json
+ payload:
+ - name: Update
+ description: Balance updates pushed every 5 seconds
+ type: object
+ properties:
+ - name: ch
+ type: string
+ description: >-
+ Channel name for push data. Parameterized channels include the
+ instrument ID (e.g. "trades::1", "book::1", "klines::1::1m",
+ "tickers::all"). Private channels use plain names (e.g.
+ "fills", "orders").
+ required: true
+ - name: ts
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712
+ struct verified against block.timestamp).
+ required: true
+ - name: sq
+ type: integer
+ description: Sequence number
+ required: true
+ - name: data
+ type: object
+ description: Balance object
+ required: true
+ properties:
+ - name: asset
+ type: string
+ description: Asset name
+ required: true
+ - name: balance
+ type: string
+ description: Total balance
+ required: true
+ - name: value
+ type: string
+ description: USD value
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ title: Balances Update
+ type: object
+ properties:
+ ch:
+ type: string
+ description: >-
+ Channel name for push data. Parameterized channels include the
+ instrument ID (e.g. "trades::1", "book::1", "klines::1::1m",
+ "tickers::all"). Private channels use plain names (e.g. "fills",
+ "orders").
+ example: trades::1
+ x-parser-schema-id:
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712 struct
+ verified against block.timestamp).
+ example: 1767225600000
+ x-parser-schema-id:
+ sq:
+ type: integer
+ description: Sequence number
+ example: 1234567890
+ x-parser-schema-id:
+ data:
+ type: object
+ description: Balance object
+ properties:
+ asset:
+ type: string
+ description: Asset name
+ example: USDC
+ x-parser-schema-id:
+ balance:
+ type: string
+ description: Total balance
+ example: '10000.00'
+ x-parser-schema-id:
+ value:
+ type: string
+ description: USD value
+ example: '10000.00'
+ x-parser-schema-id:
+ required:
+ - asset
+ - balance
+ - value
+ x-parser-schema-id:
+ required:
+ - ch
+ - ts
+ - sq
+ - data
+ x-parser-schema-id:
+ title: Update
+ description: Balance updates pushed every 5 seconds
+ example: |-
+ {
+ "ch": "balances",
+ "ts": 1767225600000,
+ "sq": 1234567890,
+ "data": {
+ "asset": "USDC",
+ "balance": "10000.00",
+ "value": "10000.00"
+ }
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: Update
+ bindings: []
+ extensions: *ref_0
+sendOperations:
+ - *ref_1
+ - *ref_2
+receiveOperations:
+ - *ref_3
+ - *ref_4
+ - *ref_5
+sendMessages:
+ - *ref_6
+ - *ref_7
+receiveMessages:
+ - *ref_8
+ - *ref_9
+ - *ref_10
+extensions:
+ - id: x-parser-unique-object-id
+ value: balances
+securitySchemes: []
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/wss/perps-bbo.md b/PolymarketDocumentation-main/docs/api-reference/wss/perps-bbo.md
new file mode 100644
index 0000000..52221e9
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/wss/perps-bbo.md
@@ -0,0 +1,606 @@
+> ## 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.
+
+# BBO
+
+> Perps WebSocket best bid and offer updates.
+
+
+
+## AsyncAPI
+
+````yaml asyncapi-perps.json bbo
+id: bbo
+title: BBO
+description: Best bid and offer real-time updates.
+servers:
+ - id: production
+ protocol: wss
+ host: ws.perpetuals.polymarket.com
+ bindings: []
+ variables: []
+address: /v1/ws
+parameters: []
+bindings: []
+operations:
+ - &ref_1
+ id: BBOSubscribe
+ title: B b o subscribe
+ description: Subscribe to BBO
+ type: receive
+ messages:
+ - &ref_6
+ id: SubscribeRequest
+ contentType: application/json
+ payload:
+ - name: Subscribe
+ description: Subscribe to BBO updates for a specific instrument
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: chs
+ type: array
+ description: |
+ BBO subscription per instrument: `bbo::{iid}` (e.g. `bbo::1`).
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ chs:
+ type: array
+ description: |
+ BBO subscription per instrument: `bbo::{iid}` (e.g. `bbo::1`).
+ items:
+ type: string
+ pattern: ^bbo::\d+$
+ x-parser-schema-id:
+ example:
+ - bbo::1
+ x-parser-schema-id:
+ required:
+ - req
+ - chs
+ x-parser-schema-id:
+ title: Subscribe
+ description: Subscribe to BBO updates for a specific instrument
+ example: |-
+ {
+ "req": "sub",
+ "chs": [
+ "bbo::1"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: SubscribeRequest
+ bindings: []
+ extensions: &ref_0
+ - id: x-parser-unique-object-id
+ value: bbo
+ - &ref_3
+ id: BBOSubscribeResponse
+ title: B b o subscribe response
+ description: BBO subscribe response
+ type: send
+ messages:
+ - &ref_8
+ id: SubscribeResponse
+ contentType: application/json
+ payload:
+ - name: Subscribe Response
+ description: Response to BBO subscribe request
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: array
+ title: Subscribe Response
+ required: true
+ properties:
+ - name: item
+ type: object
+ required: false
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ title: Subscribe Response
+ type: array
+ items:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Subscribe Response
+ description: Response to BBO subscribe request
+ example: |-
+ {
+ "data": []
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: SubscribeResponse
+ bindings: []
+ extensions: *ref_0
+ - &ref_2
+ id: BBOUnsubscribe
+ title: B b o unsubscribe
+ description: Unsubscribe from BBO
+ type: receive
+ messages:
+ - &ref_7
+ id: UnsubscribeRequest
+ contentType: application/json
+ payload:
+ - name: Unsubscribe
+ description: Unsubscribe from BBO updates
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: chs
+ type: array
+ description: |
+ BBO subscription per instrument: `bbo::{iid}` (e.g. `bbo::1`).
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ chs:
+ type: array
+ description: |
+ BBO subscription per instrument: `bbo::{iid}` (e.g. `bbo::1`).
+ items:
+ type: string
+ pattern: ^bbo::\d+$
+ x-parser-schema-id:
+ example:
+ - bbo::1
+ x-parser-schema-id:
+ required:
+ - req
+ - chs
+ x-parser-schema-id:
+ title: Unsubscribe
+ description: Unsubscribe from BBO updates
+ example: |-
+ {
+ "req": "unsub",
+ "chs": [
+ "bbo::1"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: UnsubscribeRequest
+ bindings: []
+ extensions: *ref_0
+ - &ref_4
+ id: BBOUnsubscribeResponse
+ title: B b o unsubscribe response
+ description: BBO unsubscribe response
+ type: send
+ messages:
+ - &ref_9
+ id: UnsubscribeResponse
+ contentType: application/json
+ payload:
+ - name: Unsubscribe Response
+ description: Response to BBO unsubscribe request
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: array
+ title: Subscribe Response
+ required: true
+ properties:
+ - name: item
+ type: object
+ required: false
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ title: Subscribe Response
+ type: array
+ items:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Unsubscribe Response
+ description: Response to BBO unsubscribe request
+ example: |-
+ {
+ "data": []
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: UnsubscribeResponse
+ bindings: []
+ extensions: *ref_0
+ - &ref_5
+ id: BBOUpdate
+ title: B b o update
+ description: Receive BBO updates
+ type: send
+ messages:
+ - &ref_10
+ id: Update
+ contentType: application/json
+ payload:
+ - name: Update
+ description: Real-time BBO updates for subscribed instruments
+ type: object
+ properties:
+ - name: ch
+ type: string
+ description: >-
+ Channel name for push data. Parameterized channels include the
+ instrument ID (e.g. "trades::1", "book::1", "klines::1::1m",
+ "tickers::all"). Private channels use plain names (e.g.
+ "fills", "orders").
+ required: true
+ - name: ts
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712
+ struct verified against block.timestamp).
+ required: true
+ - name: sq
+ type: integer
+ description: Sequence number
+ required: true
+ - name: data
+ type: object
+ title: BBO Data
+ description: BBO object
+ required: true
+ properties:
+ - name: iid
+ type: integer
+ description: Instrument ID
+ required: true
+ - name: bp
+ type: string
+ description: Best bid price
+ required: true
+ - name: bq
+ type: string
+ description: Best bid quantity
+ required: true
+ - name: ap
+ type: string
+ description: Best ask price
+ required: true
+ - name: aq
+ type: string
+ description: Best ask quantity
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ title: BBO Update
+ type: object
+ properties:
+ ch:
+ type: string
+ description: >-
+ Channel name for push data. Parameterized channels include the
+ instrument ID (e.g. "trades::1", "book::1", "klines::1::1m",
+ "tickers::all"). Private channels use plain names (e.g. "fills",
+ "orders").
+ example: trades::1
+ x-parser-schema-id:
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712 struct
+ verified against block.timestamp).
+ example: 1767225600000
+ x-parser-schema-id:
+ sq:
+ type: integer
+ description: Sequence number
+ example: 1234567890
+ x-parser-schema-id:
+ data:
+ type: object
+ description: BBO object
+ title: BBO Data
+ properties:
+ iid:
+ type: integer
+ description: Instrument ID
+ example: 1
+ x-parser-schema-id:
+ bp:
+ type: string
+ description: Best bid price
+ example: '99.50'
+ x-parser-schema-id:
+ bq:
+ type: string
+ description: Best bid quantity
+ example: '10.00'
+ x-parser-schema-id:
+ ap:
+ type: string
+ description: Best ask price
+ example: '100.50'
+ x-parser-schema-id:
+ aq:
+ type: string
+ description: Best ask quantity
+ example: '10.00'
+ x-parser-schema-id:
+ required:
+ - iid
+ - bp
+ - bq
+ - ap
+ - aq
+ x-parser-schema-id:
+ required:
+ - ch
+ - ts
+ - sq
+ - data
+ x-parser-schema-id:
+ title: Update
+ description: Real-time BBO updates for subscribed instruments
+ example: |-
+ {
+ "ch": "bbo::1",
+ "ts": 1767225600000,
+ "sq": 1234567890,
+ "data": {
+ "iid": 1,
+ "bp": "99.50",
+ "bq": "10.00",
+ "ap": "100.50",
+ "aq": "10.00"
+ }
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: Update
+ bindings: []
+ extensions: *ref_0
+sendOperations:
+ - *ref_1
+ - *ref_2
+receiveOperations:
+ - *ref_3
+ - *ref_4
+ - *ref_5
+sendMessages:
+ - *ref_6
+ - *ref_7
+receiveMessages:
+ - *ref_8
+ - *ref_9
+ - *ref_10
+extensions:
+ - id: x-parser-unique-object-id
+ value: bbo
+securitySchemes: []
+
+````
\ No newline at end of file
diff --git a/PolymarketDocumentation-main/docs/api-reference/wss/perps-book.md b/PolymarketDocumentation-main/docs/api-reference/wss/perps-book.md
new file mode 100644
index 0000000..9388051
--- /dev/null
+++ b/PolymarketDocumentation-main/docs/api-reference/wss/perps-book.md
@@ -0,0 +1,621 @@
+> ## 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.
+
+# Book
+
+> Perps WebSocket order book updates.
+
+
+
+## AsyncAPI
+
+````yaml asyncapi-perps.json book
+id: book
+title: Book
+description: Order book snapshot updates. Pushed every 100ms.
+servers:
+ - id: production
+ protocol: wss
+ host: ws.perpetuals.polymarket.com
+ bindings: []
+ variables: []
+address: /v1/ws
+parameters: []
+bindings: []
+operations:
+ - &ref_1
+ id: BookSubscribe
+ title: Book subscribe
+ description: Subscribe to book
+ type: receive
+ messages:
+ - &ref_6
+ id: SubscribeRequest
+ contentType: application/json
+ payload:
+ - name: Subscribe
+ description: Subscribe to order book updates for an instrument
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: chs
+ type: array
+ description: Book subscription in format "book::{iid}" (e.g., "book::1")
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ chs:
+ type: array
+ description: Book subscription in format "book::{iid}" (e.g., "book::1")
+ items:
+ type: string
+ pattern: ^book::\d+$
+ x-parser-schema-id:
+ example:
+ - book::1
+ x-parser-schema-id:
+ required:
+ - req
+ - chs
+ x-parser-schema-id:
+ title: Subscribe
+ description: Subscribe to order book updates for an instrument
+ example: |-
+ {
+ "req": "sub",
+ "chs": [
+ "book::1"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: SubscribeRequest
+ bindings: []
+ extensions: &ref_0
+ - id: x-parser-unique-object-id
+ value: book
+ - &ref_3
+ id: BookSubscribeResponse
+ title: Book subscribe response
+ description: Book subscribe response
+ type: send
+ messages:
+ - &ref_8
+ id: SubscribeResponse
+ contentType: application/json
+ payload:
+ - name: Subscribe Response
+ description: Response to book subscribe request
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: array
+ title: Subscribe Response
+ required: true
+ properties:
+ - name: item
+ type: object
+ required: false
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ title: Subscribe Response
+ type: array
+ items:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Subscribe Response
+ description: Response to book subscribe request
+ example: |-
+ {
+ "data": []
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: SubscribeResponse
+ bindings: []
+ extensions: *ref_0
+ - &ref_2
+ id: BookUnsubscribe
+ title: Book unsubscribe
+ description: Unsubscribe from book
+ type: receive
+ messages:
+ - &ref_7
+ id: UnsubscribeRequest
+ contentType: application/json
+ payload:
+ - name: Unsubscribe
+ description: Unsubscribe from order book updates
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: req
+ type: string
+ description: Request type
+ enumValues:
+ - post
+ - sub
+ - unsub
+ required: true
+ - name: chs
+ type: array
+ description: Book subscription in format "book::{iid}" (e.g., "book::1")
+ required: true
+ properties:
+ - name: item
+ type: string
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Request
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ req:
+ type: string
+ description: Request type
+ enum:
+ - post
+ - sub
+ - unsub
+ x-parser-schema-id:
+ chs:
+ type: array
+ description: Book subscription in format "book::{iid}" (e.g., "book::1")
+ items:
+ type: string
+ pattern: ^book::\d+$
+ x-parser-schema-id:
+ example:
+ - book::1
+ x-parser-schema-id:
+ required:
+ - req
+ - chs
+ x-parser-schema-id:
+ title: Unsubscribe
+ description: Unsubscribe from order book updates
+ example: |-
+ {
+ "req": "unsub",
+ "chs": [
+ "book::1"
+ ]
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: UnsubscribeRequest
+ bindings: []
+ extensions: *ref_0
+ - &ref_4
+ id: BookUnsubscribeResponse
+ title: Book unsubscribe response
+ description: Book unsubscribe response
+ type: send
+ messages:
+ - &ref_9
+ id: UnsubscribeResponse
+ contentType: application/json
+ payload:
+ - name: Unsubscribe Response
+ description: Response to book unsubscribe request
+ type: object
+ properties:
+ - name: id
+ type: integer
+ description: Correlation ID for request-response matching
+ required: false
+ - name: data
+ type: array
+ title: Subscribe Response
+ required: true
+ properties:
+ - name: item
+ type: object
+ required: false
+ properties:
+ - name: status
+ type: string
+ enumValues:
+ - ok
+ required: true
+ - name: status
+ type: string
+ enumValues:
+ - err
+ required: true
+ - name: error
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ required: true
+ headers: []
+ jsonPayloadSchema:
+ type: object
+ title: Base Response
+ properties:
+ id:
+ type: integer
+ description: Correlation ID for request-response matching
+ x-parser-schema-id:
+ data:
+ title: Subscribe Response
+ type: array
+ items:
+ oneOf:
+ - type: object
+ required:
+ - status
+ properties:
+ status:
+ type: string
+ enum:
+ - ok
+ x-parser-schema-id:
+ x-parser-schema-id:
+ - type: object
+ required:
+ - status
+ - error
+ properties:
+ status:
+ type: string
+ enum:
+ - err
+ x-parser-schema-id:
+ error:
+ type: string
+ description: >-
+ Error identifier. For domain rejections and transport
+ errors (`401`/`404`/`429`/`500`) this is a stable,
+ machine-readable snake_case identifier that is part of
+ the API contract and safe to branch on, e.g.
+ `insufficient_margin`, `insufficient_balance`,
+ `order_not_found`, `reduce_only_invalid`,
+ `unauthorized`, `not_found`. For `400` it is a
+ human-readable validation detail whose wording may
+ change. See the Error handling guide for the domain
+ identifiers. (Post-only / Fill-or-Kill outcomes are
+ order statuses such as `post_only_rejected`, not
+ rejections.)
+ example: insufficient_margin
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ x-parser-schema-id:
+ required:
+ - data
+ x-parser-schema-id:
+ title: Unsubscribe Response
+ description: Response to book unsubscribe request
+ example: |-
+ {
+ "data": []
+ }
+ bindings: []
+ extensions:
+ - id: x-parser-unique-object-id
+ value: UnsubscribeResponse
+ bindings: []
+ extensions: *ref_0
+ - &ref_5
+ id: BookUpdate
+ title: Book update
+ description: Receive book updates
+ type: send
+ messages:
+ - &ref_10
+ id: Update
+ contentType: application/json
+ payload:
+ - name: Update
+ description: Real-time order book updates for subscribed instruments
+ type: object
+ properties:
+ - name: ch
+ type: string
+ description: >-
+ Channel name for push data. Parameterized channels include the
+ instrument ID (e.g. "trades::1", "book::1", "klines::1::1m",
+ "tickers::all"). Private channels use plain names (e.g.
+ "fills", "orders").
+ required: true
+ - name: ts
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712
+ struct verified against block.timestamp).
+ required: true
+ - name: sq
+ type: integer
+ description: Sequence number
+ required: true
+ - name: data
+ type: object
+ required: true
+ properties:
+ - name: b
+ type: array
+ description: Bid levels
+ required: true
+ properties:
+ - name: item
+ type: array
+ description: |
+ - `"100.00"` - Price
+ - `"10.00"` - Quantity
+ required: false
+ properties:
+ - name: item
+ type: string
+ required: false
+ - name: a
+ type: array
+ description: Ask levels
+ required: true
+ properties:
+ - name: item
+ type: array
+ description: |
+ - `"100.00"` - Price
+ - `"10.00"` - Quantity
+ required: false
+ properties:
+ - name: item
+ type: string
+ required: false
+ headers: []
+ jsonPayloadSchema:
+ title: Book Update
+ type: object
+ properties:
+ ch:
+ type: string
+ description: >-
+ Channel name for push data. Parameterized channels include the
+ instrument ID (e.g. "trades::1", "book::1", "klines::1::1m",
+ "tickers::all"). Private channels use plain names (e.g. "fills",
+ "orders").
+ example: trades::1
+ x-parser-schema-id:
+ ts:
+ type: integer
+ description: >-
+ Request timestamp. Unix milliseconds for most operations; Unix
+ seconds for withdrawals (must match the on-chain EIP-712 struct
+ verified against block.timestamp).
+ example: 1767225600000
+ x-parser-schema-id:
+ sq:
+ type: integer
+ description: Sequence number
+ example: 1234567890
+ x-parser-schema-id:
+ data:
+ type: object
+ required:
+ - b
+ - a
+ properties:
+ b:
+ type: array
+ items:
+ type: array
+ items:
+ type: string
+ x-parser-schema-id: