Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
獲取和發布市場評論
GET https://gamma-api.polymarket.com/comments POST https://gamma-api.polymarket.com/comments
market_id
limit
offset
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': '我的評論內容' } )