API Documentation
Description
Basic Information
Base URL
https://polyfore.com/api/v1
Data Format
All endpoints return JSON format data
HTTP Method
Most endpoints use GET method, some use POST method (e.g., translation endpoint)
Response Format
{
"data": [...],
"meta": {
"current_page": 1,
"last_page": 10,
"per_page": 20,
"total": 200
}
}
API Directory
Topics API
Get topic list, details, price history, etc.
Categories API
Get market category information
Platforms API
Get platform information and statistics
Statistics API
Get platform statistics
Search API
Search markets and topics
Translations API
Get multilingual translation data
News API
Get news list and details
Home Stats API
Get homepage statistics
Topics API
Get Topics List
Get all active topics list with filtering, sorting and pagination support
Endpoint
https://polyfore.com/api/v1/topics
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
category |
string | No | 分类标识(slug) |
platform |
string | No | 平台标识(slug),如:polymarket, kalshi |
status |
string | No | 状态:open(进行中)、resolved(已结算)、closed(已关闭) |
search |
string | No | 搜索关键词(标题) |
sort_by |
string | No | 排序字段:volume_24h, current_price, price_change_24h, created_at(默认:volume_24h) |
sort_order |
string | No | 排序方向:asc, desc(默认:desc) |
page |
integer | No | 页码(默认:1) |
per_page |
integer | No | 每页数量(默认:20,最大:100) |
Request Example
GET https://polyfore.com/api/v1/topics?category=cryptocurrency&platform=polymarket&sort_by=volume_24h&sort_order=desc&page=1&per_page=20
Response Example
{
"data": [
{
"id": 1,
"title": "Will Bitcoin reach $100,000 by 2025?",
"slug": "will-bitcoin-reach-100000-by-2025",
"description": "...",
"current_price": 0.65,
"price_change_24h": 5.2,
"volume_24h": 1500000,
"open_interest": 500000,
"status": "open",
"category": {
"id": 1,
"name": "加密货币",
"slug": "cryptocurrency"
},
"platform": {
"id": 1,
"name": "Polymarket",
"slug": "polymarket",
"color": "#9333EA"
},
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
],
"meta": {
"current_page": 1,
"last_page": 10,
"per_page": 20,
"total": 200
}
}
Get Fast Feed Topics
高性能话题流接口:筛选进行中话题,支持按结束时间、最小交易量过滤,并使用 cursor 分页。
Endpoint
https://polyfore.com/api/v1/topics/fast-feed
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
end_after |
string | No | 结束时间下限(默认:2026-06-30 23:59:59) |
min_volume |
number | No | 最小 24h 交易量(默认:100) |
platform |
string | No | 平台 slug,可选 |
category |
string | No | 分类 slug,可选 |
limit |
integer | No | 每页数量(默认:100,最大:500) |
cursor |
string | No | 游标字符串(使用上一页返回的 meta.next_cursor) |
Request Example
GET https://polyfore.com/api/v1/topics/fast-feed?end_after=2026-06-30%2023:59:59&min_volume=100&platform=polymarket&limit=100
Response Example
{
"data": [
{
"id": 123,
"title": "Will X happen after 2026?",
"slug": "will-x-happen-after-2026",
"status": "open",
"volume_24h": 1823.55,
"resolution_date": "2026-09-01T00:00:00.000000Z"
}
],
"filters": {
"status": "open",
"end_after": "2026-06-30 23:59:59",
"min_volume": 100,
"platform": "polymarket",
"category": null
},
"meta": {
"limit": 100,
"has_more": true,
"next_cursor": "eyJyZXNvbHV0aW9uX2RhdGUiOiIyMDI2LTA5LTAxIDAwOjAwOjAwIiwidm9sdW1lXzI0aCI6MTgyMy41NSwiaWQiOjEyM30="
}
}
Get Topic Detail
Get detailed information by topic identifier (slug)
Endpoint
https://polyfore.com/api/v1/topics/{slug}
Path Parameters
| Parameter Name | Type | Description |
|---|---|---|
slug |
string | Unique identifier of the topic |
Request Example
GET https://polyfore.com/api/v1/topics/will-bitcoin-reach-100000-by-2025
Response Example
{
"id": 1,
"title": "Will Bitcoin reach $100,000 by 2025?",
"slug": "will-bitcoin-reach-100000-by-2025",
"description": "预测比特币是否会在2025年达到10万美元",
"current_price": 0.65,
"price_change_24h": 5.2,
"volume_24h": 1500000,
"open_interest": 500000,
"status": "open",
"market_id": "0x123...",
"metadata": {
"outcomes": ["Yes", "No"],
"outcomePrices": [0.65, 0.35],
"clobTokenIds": ["0xabc...", "0xdef..."]
},
"category": {
"id": 1,
"name": "加密货币",
"slug": "cryptocurrency"
},
"platform": {
"id": 1,
"name": "Polymarket",
"slug": "polymarket",
"color": "#9333EA"
},
"prices": [...],
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
Get Topic Outcomes
Get all possible outcomes of a topic (binary or multi-outcome markets)
Endpoint
https://polyfore.com/api/v1/topics/{slug}/outcomes
Response Example
{
"topic_id": 1,
"topic_slug": "will-bitcoin-reach-100000-by-2025",
"topic_title": "Will Bitcoin reach $100,000 by 2025?",
"market_id": "0x123...",
"outcomes": [
{
"name": "Yes",
"index": 0,
"price": 0.65,
"token_id": "0xabc..."
},
{
"name": "No",
"index": 1,
"price": 0.35,
"token_id": "0xdef..."
}
],
"is_binary": true,
"platform": "polymarket"
}
Get Realtime Price
Get real-time price data for a topic (fetched from platform API)
Endpoint
https://polyfore.com/api/v1/topics/{slug}/realtime-prices
Response Example
{
"topic_id": 1,
"topic_slug": "will-bitcoin-reach-100000-by-2025",
"topic_title": "Will Bitcoin reach $100,000 by 2025?",
"market_id": "0x123...",
"platform": "polymarket",
"updated_at": "2024-01-01T00:00:00.000000Z",
"prices": [
{
"outcome": "Yes",
"index": 0,
"token_id": "0xabc...",
"bid_price": 0.64,
"ask_price": 0.66,
"last_price": 0.65,
"volume": 100000
}
]
}
Get Price History
Get price history data for a topic, supporting multiple time intervals
Endpoint
https://polyfore.com/api/v1/topics/{slug}/price-history
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
interval |
string | No | 时间间隔:1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w(默认:1h) |
start_date |
string | No | 开始日期(格式:Y-m-d H:i:s 或时间戳) |
end_date |
string | No | 结束日期(格式:Y-m-d H:i:s 或时间戳) |
limit |
integer | No | 返回数据点数量(默认:100,最大:1000) |
Response Example
{
"data": [
{
"timestamp": 1704067200,
"price": 0.62,
"volume": 50000
},
{
"timestamp": 1704070800,
"price": 0.64,
"volume": 75000
}
]
}
Get Market Depth
Get market depth (order book) data for a topic
Endpoint
https://polyfore.com/api/v1/topics/{slug}/market-depth
Response Example
{
"bids": [
{"price": 0.64, "size": 1000},
{"price": 0.63, "size": 2000}
],
"asks": [
{"price": 0.66, "size": 1500},
{"price": 0.67, "size": 2500}
],
"spread": 0.02
}
Get Best Price
Get the best bid and ask prices for a topic
Endpoint
https://polyfore.com/api/v1/topics/{slug}/best-price
Response Example
{
"best_bid": 0.64,
"best_ask": 0.66,
"spread": 0.02,
"mid_price": 0.65
}
Categories API
Get Categories List
Get all active market categories
Endpoint
https://polyfore.com/api/v1/categories
Response Example
[
{
"id": 1,
"name": "加密货币",
"slug": "cryptocurrency",
"description": "加密货币相关市场",
"is_active": true,
"sort_order": 1
},
{
"id": 2,
"name": "体育",
"slug": "sports",
"description": "体育赛事相关市场",
"is_active": true,
"sort_order": 2
}
]
Get Market Categories List
Get market categories list for a specific platform (fetched from platform API)
Endpoint
https://polyfore.com/api/v1/market-categories
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
platform |
string | No | 平台标识(slug),如:polymarket(默认:polymarket) |
Response Example
{
"platform": "polymarket",
"categories": [
{
"name": "Politics",
"slug": "politics"
},
{
"name": "Sports",
"slug": "sports"
}
]
}
Platforms API
Get Platforms List
Get all active prediction market platforms
Endpoint
https://polyfore.com/api/v1/platforms
Response Example
[
{
"id": 1,
"name": "Polymarket",
"slug": "polymarket",
"description": "Polymarket 预测市场平台",
"color": "#9333EA",
"is_active": true
},
{
"id": 2,
"name": "Kalshi",
"slug": "kalshi",
"description": "Kalshi 预测市场平台",
"color": "#10B981",
"is_active": true
}
]
Get Platform Statistics
Get statistics for a specific platform
Endpoint
https://polyfore.com/api/v1/platform-stats
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
platform |
string | No | 平台标识(slug),如:polymarket, kalshi。不传则返回所有平台 |
Statistics API
Get Global Statistics
Get global statistics for the platform
Endpoint
https://polyfore.com/api/v1/stats
Response Example
{
"total_value": 50000000,
"open_interest": 10000000,
"total_volume": 50000000,
"total_topics": 500,
"topics_by_status": {
"open": 300,
"resolved": 150,
"closed": 50
},
"topics_by_platform": [
{
"name": "Polymarket",
"slug": "polymarket",
"count": 350
},
{
"name": "Kalshi",
"slug": "kalshi",
"count": 150
}
]
}
Search API
Search Topics
Search topics by keywords
Endpoint
https://polyfore.com/api/v1/search
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
q |
string | Yes | 搜索关键词 |
platform |
string | No | 平台标识(slug),如:polymarket, kalshi |
limit |
integer | No | 返回结果数量(默认:20,最大:100) |
Request Example
GET https://polyfore.com/api/v1/search?q=bitcoin&platform=polymarket&limit=10
Translations API
Get Desktop Translations
Get multilingual translation data for desktop
Endpoint
https://polyfore.com/api/v1/translations/desktop
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
locale |
string | No | 语言代码,如:zh_CN, en_US(默认:系统当前语言) |
Response Example
{
"home": "首页",
"topics": "话题",
"data": "数据",
"search": "搜索",
...
}
Get Mobile Translations
Get multilingual translation data for mobile
Endpoint
https://polyfore.com/api/v1/translations/mobile
Get Languages List
Get list of all enabled languages
Endpoint
https://polyfore.com/api/v1/languages
Translate Text
Translate text using Google Translate
Endpoint
https://polyfore.com/api/v1/translate
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | 要翻译的文本(最大长度:5000字符) |
source_language |
string | Yes | 源语言代码,如:zh_CN, en_US |
target_language |
string | Yes | 目标语言代码,如:zh_CN, en_US |
Response Example
{
"translated_text": "翻译后的文本"
}
News API
Get News List
Get news list with category, topic filtering and search support
Endpoint
https://polyfore.com/api/v1/news
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
category |
integer | No | 新闻分类ID |
topic |
integer | No | 关联话题ID |
search |
string | No | 搜索关键词(标题、摘要、内容) |
page |
integer | No | 页码(默认:1) |
per_page |
integer | No | 每页数量(默认:20,最大:100) |
Response Example
{
"data": [
{
"id": 1,
"title": "新闻标题",
"slug": "news-slug",
"summary": "新闻摘要",
"published_at": "2024-01-01T00:00:00.000000Z",
"category": {
"id": 1,
"name": "分类名称"
},
"topic": {
"id": 1,
"title": "关联话题标题"
}
}
],
"meta": {
"current_page": 1,
"last_page": 10,
"per_page": 20,
"total": 200
}
}
Home Statistics API
Get Home Statistics
Get statistics displayed on homepage (cached for 60 seconds)
Endpoint
https://polyfore.com/api/v1/home/stats
Response Example
{
"total_volume": 50000000,
"open_interest": 10000000,
"total_topics": 500,
"total_users": 10000,
"weekly_volume": 350000000,
"weekly_trades": 18495329,
"topics_by_status": {
"open": 300,
"resolved": 150,
"closed": 50
}
}
Get Home Platform Statistics
Get platform statistics displayed on homepage (cached for 300 seconds)
Endpoint
https://polyfore.com/api/v1/home/platform-stats
Response Example
[
{
"id": 1,
"name": "Polymarket",
"slug": "polymarket",
"color": "#9333EA",
"description": "Polymarket 预测市场平台",
"stats": {
"volume_24h": 25000000,
"volume_change": 5.2,
"active_markets": 200
}
}
]
错误码说明
| HTTP Status Code | Description |
|---|---|
200 |
Request successful |
400 |
Bad request parameters |
404 |
Resource not found |
500 |
Internal server error |
Error Response Format
{
"error": "Error description",
"message": "Detailed error message"
}
Usage Examples
JavaScript (Fetch API)
// 获取话题列表
fetch('https://polyfore.com/api/v1/topics?platform=polymarket&sort_by=volume_24h&sort_order=desc')
.then(response => response.json())
.then(data => {
console.log('话题列表:', data.data);
console.log('分页信息:', data.meta);
})
.catch(error => {
console.error('请求失败:', error);
});
// 获取话题详情
fetch('https://polyfore.com/api/v1/topics/will-bitcoin-reach-100000-by-2025')
.then(response => response.json())
.then(data => {
console.log('话题详情:', data);
});
// 搜索话题
fetch('https://polyfore.com/api/v1/search?q=bitcoin&limit=10')
.then(response => response.json())
.then(data => {
console.log('搜索结果:', data);
});
// Fast Feed(游标分页)
fetch('https://polyfore.com/api/v1/topics/fast-feed?end_after=2026-06-30%2023:59:59&min_volume=100&limit=100')
.then(response => response.json())
.then(data => {
console.log('fast feed 第一页:', data.data);
if (data.meta?.next_cursor) {
return fetch(`https://polyfore.com/api/v1/topics/fast-feed?cursor=${encodeURIComponent(data.meta.next_cursor)}`)
.then(res => res.json())
.then(nextPage => {
console.log('fast feed 第二页:', nextPage.data);
});
}
});
cURL
# 获取话题列表
curl "https://polyfore.com/api/v1/topics?platform=polymarket&sort_by=volume_24h"
# 获取话题详情
curl "https://polyfore.com/api/v1/topics/will-bitcoin-reach-100000-by-2025"
# 搜索话题
curl "https://polyfore.com/api/v1/search?q=bitcoin"
# Fast Feed(第一页)
curl "https://polyfore.com/api/v1/topics/fast-feed?end_after=2026-06-30%2023:59:59&min_volume=100&platform=polymarket&limit=100"
# Fast Feed(下一页,替换为上一页返回的 next_cursor)
curl "https://polyfore.com/api/v1/topics/fast-feed?cursor=YOUR_NEXT_CURSOR"
Python
import requests
# 获取话题列表
response = requests.get('https://polyfore.com/api/v1/topics', params={
'platform': 'polymarket',
'sort_by': 'volume_24h',
'sort_order': 'desc',
'page': 1,
'per_page': 20
})
data = response.json()
print('话题列表:', data['data'])
print('分页信息:', data['meta'])
# 获取话题详情
response = requests.get('https://polyfore.com/api/v1/topics/will-bitcoin-reach-100000-by-2025')
topic = response.json()
print('话题详情:', topic)
# Fast Feed(游标分页)
first = requests.get('https://polyfore.com/api/v1/topics/fast-feed', params={
'end_after': '2026-06-30 23:59:59',
'min_volume': 100,
'platform': 'polymarket',
'limit': 100,
}).json()
print('fast feed 第一页数量:', len(first.get('data', [])))
next_cursor = first.get('meta', {}).get('next_cursor')
if next_cursor:
second = requests.get('https://polyfore.com/api/v1/topics/fast-feed', params={
'cursor': next_cursor,
}).json()
print('fast feed 第二页数量:', len(second.get('data', [])))
Notes
Important Notes
- All endpoints currently require no authentication and can be accessed directly
- It is recommended to control request frequency reasonably to avoid putting pressure on the server
- Data is updated in real-time, it is recommended to set appropriate caching strategies according to business needs
- The pagination parameter per_page has a maximum value of 100, exceeding which will be automatically adjusted to 100
- Price data is real-time data and may have delays
技术支持
If you have any questions or suggestions, please contact us through the following methods:
- 📧 Email:support@example.com
- 💬 Online Customer Service:Weekdays 9:00-18:00