Loading...
Loading...
Comprehensive guide to the weather prediction market platform
PolyWeather is a weather prediction market platform that enables users to:
Analyze and predict weather with the community
Access weather data and prediction accuracy trends
Engaging and interactive weather information
GET /api/weather
Response:
{
"data": {
"cities": [
{
"name": "New York",
"temperature": 22,
"humidity": 65,
"wind_speed": 12,
"condition": "Clear",
"timestamp": "2025-12-07T12:45:00Z"
}
],
"source": "Open-Meteo",
"updated_at": "2025-12-07T12:45:00Z"
}
}Request:
{
"marketId": "uuid-string",
"voteType": "yes"
}
Response:
{
"success": true,
"data": {
"vote_count": 1250,
"yes_percentage": 68.5,
"no_percentage": 31.5
}
}Response:
{
"data": {
"markets": [
{
"id": "uuid-string",
"title": "Will temperature exceed 25C?",
"category": "Temperature",
"location": "New York",
"yes_votes": 847,
"no_votes": 403,
"status": "live"
}
]
}
}-- markets table CREATE TABLE markets ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), title TEXT NOT NULL, description TEXT, category TEXT NOT NULL, location TEXT NOT NULL, status TEXT DEFAULT 'live', yes_votes INTEGER DEFAULT 0, no_votes INTEGER DEFAULT 0, created_at TIMESTAMPTZ DEFAULT NOW(), end_time TIMESTAMPTZ ); -- votes table CREATE TABLE votes ( id SERIAL PRIMARY KEY, market_id UUID REFERENCES markets(id), user_id UUID REFERENCES auth.users(id), vote_type TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW(), UNIQUE(market_id, user_id) );
PolyWeather Documentation v2.0 - Last updated: December 2025
Weather data by Open-Meteo