Skip to main content
GET
/
api
/
v1
/
settlements
/
market
/
{market_id}
Get Market Settlement
curl --request GET \
  --url https://api.example.com/api/v1/settlements/market/{market_id}
{
  "status": "<string>"
}

Usage

status = client.get_market_settlement(market_id="0x1234...abcd")

Parameters

market_id
string
required
The market ID to check.

Response

status
string
Settlement status:
  • SETTLED - Market has been settled
  • PENDING_SETTLEMENT - Market closed, awaiting settlement
  • ACTIVE - Market still active
  • NOT_FOUND - No position in this market
Additional fields vary based on status.

Example

from polyhush import PolyhushClient

client = PolyhushClient(api_key="your-api-key")

status = client.get_market_settlement(market_id="0x1234...abcd")

if status['status'] == 'SETTLED':
    print(f"✅ Market settled")
    print(f"   Your winnings: ${status.get('user_winnings', 0):.2f}")
    
elif status['status'] == 'PENDING_SETTLEMENT':
    print(f"⏳ Awaiting settlement")
    print(f"   Winning outcome: {status.get('winning_outcome', 'TBD')}")
    
elif status['status'] == 'ACTIVE':
    print(f"📈 Market still active")
    
else:
    print(f"❓ No position found in this market")

Response (Settled)

{
  "status": "SETTLED",
  "market_id": "0x1234...abcd",
  "winning_outcome": "Yes",
  "user_winnings": 100.00,
  "settled_at": "2024-12-31T23:59:00Z"
}

Response (Pending)

{
  "status": "PENDING_SETTLEMENT",
  "market_id": "0x1234...abcd",
  "winning_outcome": "Yes",
  "closed_at": "2024-12-31T12:00:00Z"
}

Response (Active)

{
  "status": "ACTIVE",
  "market_id": "0x1234...abcd"
}
For more detailed settlement information including on-chain redemption status, use get_settlement_status().