Polymarket Edge Trader
Setup
Install the AION SDK:
pip install aion-sdk
This is a template. The default signal is a user-supplied fair YES probability for markets matching
MARKET_QUERY. Remix the query, the probability model, or the candidate selection logic. The skill already handles market discovery, dry-run safety, pre-trade context checks, position sizing, operator summaries, and AION trade tagging.
What It Does
- Scans active AION Polymarket markets matching
MARKET_QUERY - Scores each candidate against
MODEL_PROBABILITY - Picks the market with the largest absolute edge
- Skips trades when edge is too small, slippage is too high, briefing risk alerts are active, or AION warns about flip-flopping
- Sizes the position with a Kelly-style bankroll model
- Prints an operator summary with risk state, decisions, and order updates
- Executes through
AionMarketClient.trade()when you explicitly provide--liveand a signed order payload
Defaults
MARKET_QUERY=bitcoinMODEL_PROBABILITY=0.60TARGET_VENUE=polymarketMAX_MARKETS=25MAX_STAKE_USD=50MIN_EDGE=0.03MAX_SLIPPAGE_PCT=0.15STARTING_BALANCE_USD=1000AION_BASE_URL=https://pm-t1.bxingupdate.com/bvapiAION_KELLY_MULTIPLIER=0.25AION_MIN_EV=0.03WALLET_ADDRESS=AION_SIGNED_ORDER_JSON=
How To Run
Dry-run is the default:
python edge_trader.py
Trade a different query with a custom fair probability:
python edge_trader.py --query "fed" --probability 0.64
Live trading requires an explicit live flag, a wallet address, and a pre-signed order payload:
WALLET_ADDRESS=0xYourWallet \
AION_SIGNED_ORDER_JSON='{"maker":"...","signer":"...","taker":"0x0000000000000000000000000000000000000000","tokenId":"...","makerAmount":"...","takerAmount":"...","side":"BUY","expiration":"...","signature":"...","salt":"...","signatureType":0,"nonce":"...","feeRateBps":"0"}' \
python edge_trader.py --query "bitcoin" --probability 0.58 --live
Required Credentials
AION_API_KEYis always requiredWALLET_PRIVATE_KEYis optional and only needed for self-custody Polymarket tradingWALLET_ADDRESSis required for user-scoped briefing and live order submissionAION_SIGNED_ORDER_JSONis only required for live order submission, because the AION SDK expects a complete signed order payload
Remix Ideas
- Replace
MODEL_PROBABILITYwith your own model output or external API - Swap
discover_markets()forbriefing.opportunityMarketsor another shortlist source - Generate the signed order JSON from your own order builder or wallet flow before calling
--live - Add sell logic or rebalance logic around existing positions
- Tighten or relax the context filters for a higher-frequency strategy