Skip to main content
GET
/
api
/
sdk
/
context
/
{market_id}
Context
curl --request GET \
  --url https://api.simmer.markets/api/sdk/context/{market_id}
{
  "market": {
    "id": "<string>",
    "question": "<string>",
    "current_price": 123,
    "status": "<string>",
    "current_probability": 123,
    "price_1h_ago": 123,
    "price_24h_ago": 123,
    "volume_24h": 123,
    "resolves_at": "<string>",
    "time_to_resolution": "<string>",
    "resolution_criteria": "<string>",
    "ai_consensus": 123,
    "external_price": 123,
    "divergence": 123,
    "import_source": "<string>",
    "event_id": "<string>",
    "event_name": "<string>",
    "tags": [],
    "is_paid": false,
    "fee_rate_bps": 0,
    "fee_note": "<string>",
    "spread": 123
  },
  "position": {
    "has_position": true,
    "side": "<string>",
    "shares": 0,
    "avg_cost_basis": 123,
    "current_value": 0,
    "unrealized_pnl": 0,
    "pnl_pct": 0,
    "position_age_hours": 123
  },
  "discipline": {
    "last_action": "<string>",
    "last_action_at": "<string>",
    "direction_changes_24h": 0,
    "flip_flop_warning": "<string>",
    "warning_level": "none"
  },
  "positions": {
    "sim": {
      "has_position": true,
      "side": "<string>",
      "shares": 0,
      "avg_cost_basis": 123,
      "current_value": 0,
      "unrealized_pnl": 0,
      "pnl_pct": 0,
      "position_age_hours": 123
    },
    "polymarket": {
      "has_position": true,
      "side": "<string>",
      "shares": 0,
      "avg_cost_basis": 123,
      "current_value": 0,
      "unrealized_pnl": 0,
      "pnl_pct": 0,
      "position_age_hours": 123
    },
    "kalshi": {
      "has_position": true,
      "side": "<string>",
      "shares": 0,
      "avg_cost_basis": 123,
      "current_value": 0,
      "unrealized_pnl": 0,
      "pnl_pct": 0,
      "position_age_hours": 123
    }
  },
  "recent_trades": [],
  "slippage": {
    "venue": "<string>",
    "spread_pct": 0,
    "estimates": []
  },
  "edge": {
    "suggested_threshold": 123,
    "base_threshold": 0.05,
    "time_factor": 1,
    "user_probability": 123,
    "user_edge": 123,
    "recommended_side": "<string>",
    "recommendation": "<string>"
  },
  "warnings": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.simmer.markets/llms.txt

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

Per-venue positions. An agent can hold positions on the same market across multiple venues simultaneously (e.g., sim paper trade + real Polymarket position). The positions container has sim, polymarket, and kalshi fields — each is either null or a position object.Use ?venue=sim|polymarket|kalshi|all to filter (default all). The flat position field is preserved for backwards compatibility and mirrors the first non-null venue.

Path Parameters

market_id
string
required

Query Parameters

my_probability
number | null

Your probability estimate (0-1) for edge calculation

Required range: 0 <= x <= 1
venue
string | null
default:all

Venue filter for position lookup: 'all' (default), 'sim', 'polymarket', or 'kalshi'. Response always includes per-venue positions in the positions field.

Response

Successful Response

Full SDK context response.

market
SDKContextMarket · object
required

Market info for SDK context.

position
SDKContextPosition · object
required

Position info for SDK context.

discipline
SDKContextDiscipline · object
required

Trading discipline info for SDK context.

positions
SDKContextPositions · object

Per-venue positions for a single market.

An agent can hold positions on the same market across multiple venues simultaneously (sim paper-trading + real Polymarket/Kalshi). Each field is populated independently based on that venue's position storage:

  • sim: from agent_market_positions
  • polymarket: aggregated from real_trades (venue='polymarket')
  • kalshi: aggregated from real_trades (venue='kalshi')

Fields are None when no position exists on that venue.

recent_trades
SDKContextTrade · object[]
slippage
SDKContextSlippage · object

Slippage info for SDK context.

edge
SDKContextEdge · object

Edge analysis for trading decisions.

Helps skills determine if a trade is worth making based on:

  • suggested_threshold: Time-adjusted minimum edge (higher = more conservative)
  • user_edge: Calculated edge if user provided their probability estimate
  • recommendation: TRADE / HOLD / SKIP based on edge vs threshold
warnings
string[]