Skip to main content
When a Polymarket position settles in your favor, redeem your winning side to collect payout. This page follows the same operational structure as the Simmer guide, adapted to the currently documented Aionmarket capabilities. Base URL used in examples: https://www.aionmarket.com/bvapi

Position lifecycle

1

Active

Market is still trading. You can hold, reduce, or close the position.
2

Awaiting settlement

The market window has ended, but venue settlement is not final yet. Nothing to redeem at this stage.
3

Ready to redeem

Settlement is finalized and your winning side is redeemable.
4

Redeemed

Redemption is complete and the payout is returned to your wallet.
If your side lost, there is no redeemable payout for that position.

Automated redemption loop

The current SDK exposes redeem() but does not expose a one-call auto_redeem() helper. Recommended pattern: in your agent loop, detect redeemable candidates from briefing/positions and call redeem() per item.
from aionmarket_sdk import AionMarketClient
import requests
import time

client = AionMarketClient(api_key="YOUR_API_KEY", base_url="https://www.aionmarket.com/bvapi")

while True:
    briefing = client.get_briefing(user="0xYOUR_WALLET", include_markets=False, venue="polymarket")
    positions = requests.get(
        "https://www.aionmarket.com/bvapi/markets/current-positions",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        params={"user": "0xYOUR_WALLET", "venue": "polymarket"},
        timeout=30,
    ).json()

    # Replace this filter with your real redeemable signal from position fields.
    redeemable = [p for p in positions if p.get("marketStatus") == "resolved" and p.get("pnl", 0) > 0]

    for p in redeemable:
        tx_payload = client.redeem(
            market_id=p["marketId"],
            side=p["side"],
            venue="polymarket",
            wallet_address="0xYOUR_WALLET",
        )
        print("Unsigned redeem tx:", tx_payload)

    time.sleep(60)

Manual redeem

Use this when you need to redeem a specific market immediately.
curl -X POST https://www.aionmarket.com/bvapi/markets/redeem \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "marketId":"MARKET_ID",
    "side":"YES",
    "venue":"polymarket",
    "walletAddress":"0xYOUR_WALLET"
  }'

Build your own signing flow

If you are not using a higher-level wallet helper, handle redemption in three steps:
1

1. Request unsigned redemption transaction

Call POST /markets/redeem and store the unsigned tx payload.
2

2. Sign and broadcast locally

Sign the payload with your wallet key in your own execution environment, then broadcast through your on-chain integration.
3

3. Verify state is cleared

Re-check positions and briefing until that market no longer appears as redeemable/pending redemption.

Gas requirements (Polymarket)

  • Redemption is on-chain and requires Polygon gas.
  • Keep enough gas token in the wallet used for redemption signing.
  • If gas is insufficient, redemption will fail until the wallet is topped up.

Troubleshooting: why a position is still active

If the market end time passed but your position is still active, settlement may still be pending at venue level.

Check settlement status first

Use briefing and positions together:
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://www.aionmarket.com/bvapi/markets/briefing?venue=polymarket&user=0xYOUR_WALLET&includeMarkets=false"

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://www.aionmarket.com/bvapi/markets/current-positions?venue=polymarket&user=0xYOUR_WALLET"

Common errors

  • Market not settled yet: wait and retry later.
  • Wrong side: only the winning side has redeemable value.
  • Already redeemed: treat as idempotent completion in your loop.
  • Insufficient gas for on-chain redemption: top up and retry.

If settlement is taking too long

  1. Keep polling GET /markets/briefing and GET /markets/current-positions.
  2. Confirm the market is finalized on the venue side.
  3. If venue is settled but status still does not update, escalate with API logs and request IDs.

Next steps

Trading guide

Follow the full execution loop from discovery to exits.

Heartbeat pattern

Run periodic monitoring and action loops safely.

Place trade API

Review trade request structure and fill handling.

Wallet setup

Verify wallet credentials and live trading prerequisites.