Documentation Index
Fetch the complete documentation index at: https://polymarketcn.com/llms.txt
Use this file to discover all available pages before exploring further.
法律合規提醒:在使用 Polymarket 服務或 API 前,請確認您所在地區的法律規定。Polymarket 目前不支援比利時、法國、新加坡、泰國、中國大陸等地區,政策可能隨時變化。
評論端點允許獲取和發布市場評論。
GET https://gamma-api.polymarket.com/comments
POST https://gamma-api.polymarket.com/comments
獲取評論
請求參數
| 參數 | 類型 | 描述 |
|---|
market_id | string | 市場 ID |
limit | number | 返回數量 |
offset | number | 偏移量 |
請求示例
import requests
market_id = "12345"
response = requests.get(
'https://gamma-api.polymarket.com/comments',
params={
'market_id': market_id,
'limit': 20
}
)
comments = response.json()
for comment in comments:
print(f"用戶: {comment['user']}")
print(f"評論: {comment['content']}")
print(f"時間: {comment['created_at']}")
print("---")
響應示例
[
{
"id": "789",
"user": {
"address": "0x1234...",
"username": "trader123"
},
"content": "這是我的分析...",
"created_at": "2024-01-15T10:30:00Z",
"likes": 15
}
]
發布評論
需要認證。
# 需要用戶認證
headers = {
'Authorization': 'Bearer YOUR_TOKEN'
}
response = requests.post(
'https://gamma-api.polymarket.com/comments',
headers=headers,
json={
'market_id': market_id,
'content': '我的評論內容'
}
)