Skip to main content
GET
/
api
/
v1
/
settlements
/
pending
Get Pending Settlements
curl --request GET \
  --url https://api.example.com/api/v1/settlements/pending \
  --header 'Content-Type: application/json' \
  --data '{
  "limit": 123
}'
{
  "pending": [
    {
      "market_id": "<string>",
      "token_id": "<string>",
      "market_question": "<string>",
      "your_outcome": "<string>",
      "your_position_size": 123,
      "closed_at": "<string>",
      "can_settle": true,
      "winning_outcome": "<string>",
      "you_won": true,
      "potential_payout": 123,
      "status": "<string>"
    }
  ]
}

Usage

pending = client.get_pending_settlements(limit=20)

Parameters

limit
integer
default:20
Maximum markets to return (max 50).

Response

Returns a list of markets with positions ready to settle.
pending
array

Example

from polyhush import PolyhushClient

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

pending = client.get_pending_settlements()

if not pending:
    print("No pending settlements")
else:
    print(f"📋 {len(pending)} markets to settle\n")
    
    for market in pending:
        status_icon = "🟢" if market['can_settle'] else "⏳"
        win_icon = "🎉" if market.get('you_won') else "📉"
        
        print(f"{status_icon} {market['market_question'][:50]}...")
        print(f"   Your bet: {market['your_outcome']} ({market['your_position_size']} shares)")
        
        if market['can_settle']:
            print(f"   {win_icon} Outcome: {market['winning_outcome']}")
            print(f"   💰 Potential payout: ${market['potential_payout']:.2f}")
        else:
            print(f"   Status: {market['status']}")
        print()

Response

[
  {
    "market_id": "0x1234...abcd",
    "token_id": "12345678901234567890",
    "market_question": "Will BTC exceed $100k by end of 2024?",
    "your_outcome": "Yes",
    "your_position_size": 100,
    "closed_at": "2024-12-31T23:59:00Z",
    "can_settle": true,
    "winning_outcome": "Yes",
    "you_won": true,
    "potential_payout": 100.00,
    "status": "Ready to settle!"
  },
  {
    "market_id": "0x5678...efgh",
    "token_id": "09876543210987654321",
    "market_question": "Will ETH reach $5k in Q1 2025?",
    "your_outcome": "Yes",
    "your_position_size": 50,
    "closed_at": "2025-01-15T00:00:00Z",
    "can_settle": false,
    "winning_outcome": null,
    "you_won": null,
    "potential_payout": null,
    "status": "Awaiting resolution..."
  }
]

Settlement Workflow

# Complete settlement workflow
pending = client.get_pending_settlements()

ready_to_settle = [m for m in pending if m['can_settle']]
awaiting = [m for m in pending if not m['can_settle']]

print(f"Ready to settle: {len(ready_to_settle)}")
print(f"Awaiting resolution: {len(awaiting)}")

# Settle all ready markets
for market in ready_to_settle:
    result = client.settle_position(market['market_id'], market['token_id'])
    print(f"Settled {market['market_question'][:30]}... - ${result['payout']:.2f}")
Use this method to find markets that need attention, then use settle_position() or settle_all_positions() to claim your funds.