Foresea · Schema

TradeRunCreateRequest

Create a durable, human-reviewable live-trade run without executing it.

Prediction-MarketIntelligenceForecastingData AnalyticsBusiness

Properties

Name Type Description
platform string `kalshi` or `polymarket`.
action string `buy` or `sell`.
outcome string Outcome side: `yes` or `no`.
order_type string `limit` or `market`.
price object Limit price, or worst acceptable price for market/IOC-style orders.
quantity number Contracts/shares. For Polymarket market-buy, max_cost may define spend.
max_cost object Polymarket market-buy spend cap in USD.
ticker object Kalshi market ticker.
token_id object Polymarket CLOB outcome token id.
slug object Polymarket market slug for token resolution.
market_id object Polymarket market id for token resolution.
time_in_force object Venue-specific TIF, e.g. GTC/FOK or good_till_canceled.
post_only boolean Reject rather than cross the book when supported.
reduce_only boolean Kalshi reduce-only flag.
tick_size object Polymarket tick size override.
neg_risk object Polymarket negative-risk market flag.
client_order_id object Caller-provided idempotency/order id.
cancel_order_on_pause boolean Kalshi cancel-on-pause flag.
subaccount object Kalshi subaccount number.
exchange_index integer Kalshi exchange shard index; currently 0.
execute boolean Must be true on `/trading/orders` for live execution.
confirmation object Must equal the server confirmation phrase.
venue_credentials object Deprecated and rejected for public trading requests. Connect the account through /trading/connections first.
title string Short operator-facing name for this run.
thesis string Optional research rationale retained with the trade run.
source_conversation_id object Optional chat thread that produced the trade idea.
expected_edge object Optional model-minus-market probability edge.
sources array Optional source URLs or identifiers supporting the thesis.
View JSON Schema on GitHub

JSON Schema

foresea-ink-trade-run-create-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foresea-ink/json-schema/foresea-ink-trade-run-create-request-schema.json",
  "title": "TradeRunCreateRequest",
  "description": "Create a durable, human-reviewable live-trade run without executing it.",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/foresea-ink-openapi.json#/components/schemas/TradeRunCreateRequest",
  "properties": {
    "platform": {
      "type": "string",
      "maxLength": 20,
      "title": "Platform",
      "description": "`kalshi` or `polymarket`."
    },
    "action": {
      "type": "string",
      "maxLength": 10,
      "title": "Action",
      "description": "`buy` or `sell`.",
      "default": "buy"
    },
    "outcome": {
      "type": "string",
      "maxLength": 10,
      "title": "Outcome",
      "description": "Outcome side: `yes` or `no`.",
      "default": "yes"
    },
    "order_type": {
      "type": "string",
      "maxLength": 20,
      "title": "Order Type",
      "description": "`limit` or `market`.",
      "default": "limit"
    },
    "price": {
      "anyOf": [
        {
          "type": "number",
          "exclusiveMaximum": 1.0,
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Price",
      "description": "Limit price, or worst acceptable price for market/IOC-style orders."
    },
    "quantity": {
      "type": "number",
      "exclusiveMinimum": 0.0,
      "title": "Quantity",
      "description": "Contracts/shares. For Polymarket market-buy, max_cost may define spend."
    },
    "max_cost": {
      "anyOf": [
        {
          "type": "number",
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Cost",
      "description": "Polymarket market-buy spend cap in USD."
    },
    "ticker": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ],
      "title": "Ticker",
      "description": "Kalshi market ticker."
    },
    "token_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Token Id",
      "description": "Polymarket CLOB outcome token id."
    },
    "slug": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Slug",
      "description": "Polymarket market slug for token resolution."
    },
    "market_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "title": "Market Id",
      "description": "Polymarket market id for token resolution."
    },
    "time_in_force": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ],
      "title": "Time In Force",
      "description": "Venue-specific TIF, e.g. GTC/FOK or good_till_canceled."
    },
    "post_only": {
      "type": "boolean",
      "title": "Post Only",
      "description": "Reject rather than cross the book when supported.",
      "default": false
    },
    "reduce_only": {
      "type": "boolean",
      "title": "Reduce Only",
      "description": "Kalshi reduce-only flag.",
      "default": false
    },
    "tick_size": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ],
      "title": "Tick Size",
      "description": "Polymarket tick size override."
    },
    "neg_risk": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Neg Risk",
      "description": "Polymarket negative-risk market flag."
    },
    "client_order_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Order Id",
      "description": "Caller-provided idempotency/order id."
    },
    "cancel_order_on_pause": {
      "type": "boolean",
      "title": "Cancel Order On Pause",
      "description": "Kalshi cancel-on-pause flag.",
      "default": false
    },
    "subaccount": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 32.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Subaccount",
      "description": "Kalshi subaccount number."
    },
    "exchange_index": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Exchange Index",
      "description": "Kalshi exchange shard index; currently 0.",
      "default": 0
    },
    "execute": {
      "type": "boolean",
      "title": "Execute",
      "description": "Must be true on `/trading/orders` for live execution.",
      "default": false
    },
    "confirmation": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "title": "Confirmation",
      "description": "Must equal the server confirmation phrase."
    },
    "venue_credentials": {
      "anyOf": [
        {
          "$ref": "#/$defs/VenueCredentials"
        },
        {
          "type": "null"
        }
      ],
      "description": "Deprecated and rejected for public trading requests. Connect the account through /trading/connections first."
    },
    "title": {
      "type": "string",
      "maxLength": 160,
      "title": "Title",
      "description": "Short operator-facing name for this run.",
      "default": ""
    },
    "thesis": {
      "type": "string",
      "maxLength": 4000,
      "title": "Thesis",
      "description": "Optional research rationale retained with the trade run.",
      "default": ""
    },
    "source_conversation_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Conversation Id",
      "description": "Optional chat thread that produced the trade idea."
    },
    "expected_edge": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Expected Edge",
      "description": "Optional model-minus-market probability edge."
    },
    "sources": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 20,
      "title": "Sources",
      "description": "Optional source URLs or identifiers supporting the thesis."
    }
  },
  "type": "object",
  "required": [
    "platform",
    "quantity"
  ],
  "$defs": {
    "VenueCredentials": {
      "properties": {
        "kalshi_api_key_id": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ],
          "title": "Kalshi Api Key Id"
        },
        "kalshi_private_key": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 8000
            },
            {
              "type": "null"
            }
          ],
          "title": "Kalshi Private Key",
          "description": "RSA private key PEM."
        },
        "kalshi_base_url": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 300
            },
            {
              "type": "null"
            }
          ],
          "title": "Kalshi Base Url"
        },
        "polymarket_private_key": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 400
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Private Key",
          "description": "Wallet private key."
        },
        "polymarket_api_key": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Api Key"
        },
        "polymarket_api_secret": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 400
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Api Secret"
        },
        "polymarket_api_passphrase": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Api Passphrase"
        },
        "polymarket_clob_host": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 300
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Clob Host"
        },
        "polymarket_chain_id": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 1000000000.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Chain Id"
        },
        "polymarket_signature_type": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 10.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Signature Type"
        },
        "polymarket_funder_address": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100
            },
            {
              "type": "null"
            }
          ],
          "title": "Polymarket Funder Address"
        }
      },
      "type": "object",
      "title": "VenueCredentials",
      "description": "Credentials received only by the authenticated connection endpoint.\n\nThese values are accepted once over TLS, encrypted server-side, and never\nreturned to the browser. They are intentionally rejected on order-preview\nand order-submission requests so the public UI cannot fall back to a\nbrowser-held secret flow."
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/foresea-ink-trade-run-create-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.