Resolve outcome tokens to CLOB markets and expose their execution parameters
This commit is contained in:
@@ -33,3 +33,9 @@ GET http://127.0.0.1:9002/tick-size?token_id=eb%3AYES%3Ademo
|
||||
|
||||
### Fetch the same market grid with the other outcome in the path
|
||||
GET http://127.0.0.1:9002/tick-size/eb%3ANO%3Ademo
|
||||
|
||||
### Find the market and both outcome IDs from the NO token
|
||||
GET http://127.0.0.1:9002/markets-by-token/eb%3ANO%3Ademo
|
||||
|
||||
### Load both outcome labels and their shared trading parameters
|
||||
GET http://127.0.0.1:9002/clob-markets/demo
|
||||
|
||||
@@ -345,3 +345,9 @@ Polymarket 的单资产最近成交接口规定,无成交时返回价格字符
|
||||
同一市场的两个结果使用同一套报价步长。HTTP 参数和路径两种读法都返回数值字段 minimum_tick_size;旧市场未登记显式步长时使用本地既有的一美分报价单位。路径和查询参数均支持转义后的资产 ID。按本地标识格式解析失败返回 400,合法本地标识对应的市场不存在返回 404。[查询参数接口](https://docs.polymarket.com/api-reference/market-data/get-tick-size) · [路径参数接口](https://docs.polymarket.com/api-reference/market-data/get-tick-size-by-path-parameter)
|
||||
|
||||
固定版本的 Python SDK 在全新客户端且资产尚无已知 condition 映射时,以查询参数发起 GET,接着将返回值转成字符串并缓存在客户端。缓存命中时重复调用不会发起 HTTP 请求。若客户端已取得 condition 映射,它还有一条读取 CLOB 市场详情的路径。本文样例验证查询端点及本地已提交的调价;生产端自动切换的触发时点和 SDK 其他交易参数路径仍需单独对照。[SDK 实现](https://github.com/Polymarket/py-clob-client-v2/blob/9c7c9e89cbbc11528daae90dc66ef65c9380cbdf/py_clob_client_v2/client.py) · [调价样例](examples/tick-changes.jsonl)
|
||||
|
||||
## 从资产定位市场并读取交易规格
|
||||
|
||||
以 NO 资产开头,先调用 `GET /markets-by-token/{token_id}` 取得 condition_id 和两侧 token ID,再调用 `GET /clob-markets/{condition_id}`。固定版 Python SDK 据此为两个结果缓存步长、互斥组标记和费用曲线。Eventbook 从相同的本地市场记录取数:t 中的两个标签来自目录,mts 是当前步长,mos 是配置的最小份额(旧盘默认一个交易手,即 0.01 份),gst 是体育赛事的 UTC 开赛时间。每次 HTTP 查询读取当时已提交的数据;客户端已有缓存有自己的生命周期。[资产反查](https://docs.polymarket.com/api-reference/markets/get-market-by-token) · [市场参数](https://docs.polymarket.com/api-reference/markets/get-clob-market-info)
|
||||
|
||||
本地有费用的市场返回 fd.r(实际费率)、fd.e=1、fd.to=true,与模拟吃单费的价格曲线一致;零费市场省略 fd。Eventbook 未实现奖励、独立的 maker/taker base fee 或实际场所签名,当前省略 r、mbf、tbf。rfqe 和 ibce 返回 false,oas 为 0,表示本地执行没有 RFQ、Blockaid 检查或最短订单年龄。ID 沿用本地市场和结果资产标识。含斜杠、问号或井号的本地 ID 用于 URL 路径时须编码为单个路径段;直接拼接未编码 ID 的 SDK 调用目前只验证了常规 ID。生产错误包、链上标识和其他费用曲线仍待现场对照。[官方费用公式](https://docs.polymarket.com/trading/fees) · [本地请求样例](examples/clob-http.http)
|
||||
|
||||
Reference in New Issue
Block a user