Install
openclaw skills install polymarket-weather-bandsAutonomous Polymarket weather-market trading flow for AION Market agents. After the user provides AION API key and wallet private key, the agent should automatically derive wallet and CLOB credentials, register them, inspect the hottest active weather markets, choose a suitable market, check USDC balance, check Polygon gas, check allowances, auto-approve when allowance is missing, prefer a market order with a default 2 USDC spend, and verify the actual trade result from Polymarket after submission. Use when: an AI agent needs a smooth one-shot weather trading flow on AION Market / Polymarket without repeatedly asking for confirmation on steps the agent can safely complete itself.
openclaw skills install polymarket-weather-bandsThis skill defines a compact one-shot weather trading flow on top of aionmarket-trading.
It is intentionally upload-friendly: the file describes the required behavior without depending on a separate runner.py.
AIONMARKET_API_KEY and WALLET_PRIVATE_KEY2 USDC spend unless the user overrides size or requests a limit orderThis skill does not implement forecasting models or unattended recurring trading.
| Input | Required | Default |
|---|---|---|
AIONMARKET_API_KEY | yes | none |
WALLET_PRIVATE_KEY | yes | none |
orderMode | no | market |
orderSize | no | 2 USDC |
outcome | no | auto |
price | only for explicit limit order | auto |
The agent should not ask for additional confirmation on steps it can execute directly.
2 USDC.order object and walletAddress in the trade payload.Use Polymarket Gamma weather markets and rank candidates by:
volume24hr descendingliquidity descendingconditionId, clobTokenIds, and usable YES/NO prices0 or 1Choose the best candidate automatically unless the user requested a specific market.
Recommended endpoint:
GET https://gamma-api.polymarket.com/events/pagination?tag_slug=weather&active=true&closed=false&archived=false&order=volume24hr&ascending=false&limit=20&offset=0
The agent should follow this sequence:
WALLET_PRIVATE_KEYorderMode=market, orderSize=2, side=BUYclient.trade()| Field | Required |
|---|---|
marketConditionId | yes |
marketQuestion | yes |
outcome | yes |
orderSize | yes |
price | yes |
isLimitOrder | yes |
orderType | yes |
order | yes |
walletAddress | yes |
reasoning | yes |
Important:
marketConditionId must be the sub-market conditionId, not the event idorder must be the full signed object from py-clob-clientFAK or FOK semanticsget_market_context() fails in sandbox, continue using direct market data and CLOB read-only validation as fallbacktradeResult: null or INTERNAL_ERROR, verify recent trades and open orders before reporting failurefrom aionmarket_sdk import AionMarketClient
from py_clob_client.client import ClobClient
client = AionMarketClient(api_key=AIONMARKET_API_KEY)
bootstrap = ClobClient("https://clob.polymarket.com", key=WALLET_PRIVATE_KEY, chain_id=137)
wallet_address = bootstrap.get_address()
creds = bootstrap.create_or_derive_api_creds()
check = client.check_wallet_credentials(wallet_address)
if not check.get("hasCredentials"):
client.register_wallet_credentials(
wallet_address=wallet_address,
api_key=creds.api_key,
api_secret=creds.api_secret,
api_passphrase=creds.api_passphrase,
)
# Then: auto-check balance/gas/allowance -> fetch hot weather markets ->
# auto-pick candidate -> build signed market order -> client.trade(payload) ->
# verify with Polymarket trades if needed.
This skill file is self-contained and intended to be uploaded on its own.