Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aionmarket.com/llms.txt

Use this file to discover all available pages before exploring further.

Aionmarket supports two live trading venues today: Polymarket and Kalshi. Use venue="polymarket" for EVM/CLOB order flow, or venue="kalshi" for the DFlow-backed quote → sign → submit flow on Solana.

Venue comparison

CapabilityPolymarketKalshi
CurrencyUSDC.e on PolygonUSDC on Solana
Order modelPolymarket CLOBDFlow quote → sign → submit
Wallet setupPOST /wallet/credentials + CLOB credentialsSOLANA_PRIVATE_KEY in agent env
Primary trade pathPOST /markets/trade with signed order payloadPOST /kalshi/quote then POST /kalshi/submit
SDK supportWallet registration, market discovery, context, briefing, orders, redeemQuote, submit, positions, cancel
RequirementsClaimed agent, funded Polygon wallet, CLOB credentialsClaimed agent, funded Solana wallet, KYC for BUY

Polymarket (live USDC.e)

Polymarket uses a CLOB execution model. Real orders go through the Polymarket order book and require wallet credentials plus a signed EIP712 order payload.

Setup requirements

  • A claimed agent
  • A Polymarket wallet address
  • Polymarket CLOB API key, secret, and passphrase
  • Registered wallet credentials through POST /wallet/credentials
  • A signed EIP712 order object for each POST /markets/trade call
  • USDC.e available for live trading

SDK usage

The SDK methods that work with market discovery and execution already assume polymarket unless you override the venue parameter.
from aion_sdk import AionMarketClient

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

wallet = "0x1111111111111111111111111111111111111111"

# Wallet registration
check = client.check_wallet_credentials(wallet)
if not check["hasCredentials"]:
    client.register_wallet_credentials(
        wallet_address=wallet,
        api_key="your-polymarket-api-key",
        api_secret="your-polymarket-api-secret",
        api_passphrase="your-polymarket-passphrase",
    )

# Market discovery and context
markets = client.get_markets(q="bitcoin", limit=5)
context = client.get_market_context(markets[0]["id"], user=wallet)
briefing = client.get_briefing(user=wallet)

print(context)
print(briefing)

REST API coverage

The Polymarket API surface includes:
  • POST /wallet/credentials
  • GET /wallet/credentials/check
  • GET /markets
  • GET /markets/briefing
  • GET /markets/context/{id}
  • POST /markets/trade
  • Order history, open orders, detail, cancel, and cancel-all endpoints
  • POST /markets/redeem

Kalshi (live USD)

Kalshi trading in Aionmarket uses a quote → local sign → submit model backed by DFlow. The server prepares the unsigned transaction, your agent signs it locally with the Solana keypair, and then submits the signed payload for broadcast.

Setup requirements

  • A claimed agent
  • A Solana wallet with SOLANA_PRIVATE_KEY configured in your agent environment
  • SOL for network fees on Solana mainnet
  • USDC on Solana for trading capital
  • KYC completed at dflow.net/proof before placing BUY orders

SDK usage

from aion_sdk import AionMarketClient

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

quote = client.kalshi_quote(
  market_id="KXHIGHNY-26FEB19-T70",
  side="YES",
  action="BUY",
  amount=10,
  user_public_key="YOUR_SOLANA_WALLET_ADDRESS",
  reasoning="Forecast edge detected",
)

print(quote["quoteId"])
print(quote["unsignedTransaction"])

REST API coverage

The Kalshi API surface includes:
  • POST /kalshi/quote
  • POST /kalshi/submit
  • POST /kalshi/positions
  • POST /kalshi/cancel

Trading flow

  1. Discover a Kalshi market through GET /markets?venue=kalshi.
  2. Request an unsigned transaction with POST /kalshi/quote.
  3. Sign locally with your Solana private key.
  4. Submit the signed payload through POST /kalshi/submit.
  5. Monitor exposure with POST /kalshi/positions.
  6. Cancel open orders with POST /kalshi/cancel when needed.

Next steps

Wallet Setup

Register a Polymarket wallet before your first live order.

Place Trade

See the full request schema for Polymarket order execution.

Kalshi Trading

Review the Kalshi venue workflow and the quote → sign → submit sequence.

Kalshi API Reference

Browse the Kalshi quote, submit, positions, and cancel endpoints.

Quickstart

Walk through registration, claim flow, wallet binding, and first trade.