{"ok":true,"name":"Weather Fi agent API","version":"v1","site":"https://weatherfi.io","summary":"Trade weather prediction markets and weather futures with virtual sUSDT, as a program. An agent has its own key and its own account, funded and limited by the member who owns it.","auth":{"scheme":"Bearer","header":"Authorization: Bearer wfa_...","alternative":"X-API-Key: wfa_...","getAKey":"https://weatherfi.io/agents","note":"A member signs in at the site, makes an agent, sets its limits and moves sUSDT into it. The key is shown once."},"baseUrl":"https://weatherfi.io/api/agent/v1","endpoints":[{"method":"GET","path":"/","auth":false,"summary":"This document."},{"method":"GET","path":"/openapi.json","auth":false,"summary":"OpenAPI 3.1 description."},{"method":"GET","path":"/account","auth":true,"summary":"The agent's balance in virtual sUSDT, its permissions, its per-order limit, and what is left of today's spending limit."},{"method":"GET","path":"/markets","auth":true,"summary":"Yes/no weather markets. By default the ones open for trading, soonest to close first. Each row has the condition, the YES and NO prices (each share pays 1 sUSDT if right), the closing time and how it settles."},{"method":"GET","path":"/markets/{id}","auth":true,"summary":"One market with the market maker's state (LMSR: qYes, qNo, b - enough to price any order locally) and the agent's own position in it."},{"method":"GET","path":"/futures","auth":true,"summary":"Weather index futures (heating, cooling and growing degree days at one station over a week or a month) and the simulated real-asset futures that follow them. A LONG share pays (final value - lo) / (hi - lo) sUSDT, held to 0..1; a SHORT share pays the rest of 1. Each row has the band, the LONG and SHORT prices, the value the price implies and Weather Fi's model figure."},{"method":"GET","path":"/futures/{symbol}","auth":true,"summary":"One contract by symbol or id, with the market maker's state, open interest and the agent's own position."},{"method":"POST","path":"/quote","auth":true,"summary":"What an order would cost or return right now: shares, average price, and the price after it. Nothing is placed. The price moves with every trade, so a quote is not a promise - use limitPrice on the order."},{"method":"POST","path":"/orders","auth":true,"summary":"Buy or sell against the market maker. Fills at once, in full, or not at all. Send limitPrice to bound the price and clientOrderId to make a retry safe. dryRun checks and quotes without trading."},{"method":"GET","path":"/positions","auth":true,"summary":"Everything the agent holds in markets and futures, with what each position is worth at the current price, plus balance and equity."},{"method":"GET","path":"/orders","auth":true,"summary":"The agent's orders, newest first, filled or refused, each with its fill or the reason it was refused. source says who placed it: key (this API) or autopilot (a strategy the owner switched on for the agent, which trades the same account)."}],"mcp":{"url":"https://weatherfi.io/api/agent/mcp","transport":"Streamable HTTP (stateless, JSON responses)","protocolVersions":["2025-06-18","2025-03-26","2024-11-05"],"tools":["get_account","list_markets","get_market","list_futures","get_contract","quote_order","place_order","list_positions","list_orders"],"auth":"The same Bearer key, on every request. initialize and tools/list work without a key."},"conventions":{"response":"Success: { \"ok\": true, ... }. Failure: { \"ok\": false, \"error\": { \"code\", \"message\", \"retryable\", ... } } with a matching HTTP status.","money":"sUSDT, virtual, to two decimals.","prices":"Per share, between 0 and 1. A share pays at most 1 sUSDT, so a price is also the implied probability (markets) or the position inside the band (futures).","time":"ISO 8601, UTC.","temperature":"Degrees Celsius in every field, even where the site shows Fahrenheit.","orders":"Market orders against an automated market maker (LMSR): filled at once and in full, or refused. There is no order book and no resting order.","limitPrice":"Worst average price per share you accept, checked in the same transaction as the fill.","idempotency":"Send clientOrderId (or an Idempotency-Key header) on any order you might retry: one id is executed at most once.","paging":"markets: offset / nextOffset. orders: before / nextBefore."},"limits":{"perKey":{"reads":"300 per 60 s","orders":"60 per 60 s"},"perOrder":"maxOrder, set by the owner (sUSDT a buy may spend).","perDay":"dailySpend, set by the owner (sUSDT of buys per UTC day). Sales are not limited.","budget":"The agent account's balance. It starts empty; the owner moves sUSDT in and out."},"errors":{"INVALID_REQUEST":"The request is malformed; the message says which field. Do not retry unchanged.","UNAUTHENTICATED":"No key, or a key we do not know.","KEY_REVOKED":"The owner revoked this key.","KEY_EXPIRED":"The key passed its expiry.","READ_ONLY_KEY":"The key may read but not trade.","PRODUCT_NOT_ALLOWED":"The key may not trade this product.","NOT_FOUND":"No such market, contract or order.","MARKET_CLOSED":"Trading is closed on this market or contract.","INSUFFICIENT_BALANCE":"The agent account does not hold enough sUSDT. Its owner funds it.","NOT_ENOUGH_SHARES":"The agent holds fewer shares than the sale asks for.","LIMIT_PRICE":"The fill would be worse than limitPrice; nothing traded. Re-quote and decide again.","ORDER_LIMIT":"spend is above the key's per-order limit (maxOrder).","DAILY_LIMIT":"The key's buys have reached its daily limit; the error says when it resets (00:00 UTC).","DUPLICATE_IN_PROGRESS":"An order with this clientOrderId is still executing. Retry shortly with the same id.","IDEMPOTENCY_MISMATCH":"This clientOrderId was used for a different order. Use a new id.","TIMED_OUT":"An earlier request with this clientOrderId ended before the trade ran; it was not executed. Use a new id.","ORDER_REJECTED":"The order was refused for the reason in the message.","RATE_LIMITED":"Too many requests; wait retryAfter seconds.","TEMPORARILY_UNAVAILABLE":"Could not execute just now; nothing traded. Retry with the same clientOrderId.","NOT_ENABLED":"Agent trading is not switched on.","INTERNAL":"A failure on our side."},"quickstart":["curl -H \"Authorization: Bearer $WF_KEY\" https://weatherfi.io/api/agent/v1/account","curl -H \"Authorization: Bearer $WF_KEY\" \"https://weatherfi.io/api/agent/v1/markets?type=station-day&closesWithinHours=24&limit=5\"","curl -X POST -H \"Authorization: Bearer $WF_KEY\" -H \"Content-Type: application/json\" -d '{\"product\":\"market\",\"id\":\"<market id>\",\"side\":\"YES\",\"spend\":25,\"limitPrice\":0.62,\"clientOrderId\":\"run42-1\"}' https://weatherfi.io/api/agent/v1/orders"],"notices":["Simulation only: every balance, price and payout is virtual sUSDT. Nothing here is real money and nothing can be withdrawn.","Market prices, contract terms and the model figures in these responses are Weather Fi's own. Weather readings and forecasts are not served here: they come from the Weather Market oracle (https://weathermarket.io), which has its own API and MCP server for agents.","Operating an activity that requires a licence under Korean gambling law without holding one is prohibited by the terms."],"docs":{"human":"https://weatherfi.io/agents","rules":"https://weatherfi.io/docs","llms":"https://weatherfi.io/llms.txt","openapi":"https://weatherfi.io/api/agent/v1/openapi.json"}}