# Refract Funding Trader API > Refract Funding sells instant funded simulated prediction-market trading accounts. The external Trader API lets funded traders (and their bots or AI agents) trade Kalshi and Polymarket binary markets programmatically: request-for-quote pricing, idempotent orders, and equity/drawdown reads. All trading is simulated against live venue order books; no user order is sent to a venue. Base URL: https://refractfunding.com/v1 OpenAPI spec: https://refractfunding.com/v1/openapi.json Full endpoint reference for agents: https://refractfunding.com/llms-full.txt Human docs and quickstart: https://refractfunding.com/developers ## Essentials - Auth: `Authorization: Bearer rf_live_...` — create keys in the dashboard (Settings, API Keys). Keys bind to one funded account at creation and never follow dashboard account switches. - Money: integer micro-USD everywhere (`*Micros` fields; 1 USD = 1,000,000). Prices are probability decimals in [0,1]. Timestamps are ISO 8601 UTC. - Orders are immediate (taker-only, nothing rests) against live venue depth. Optional `limitPriceProb` (binary markets, probability in (0,1)) adds IOC price protection: a BUY consumes only ask levels ≤ your limit, a SELL only bids ≥ it; what fits fills (possibly PARTIAL), a best level outside it rejects `LIMIT_NOT_MARKETABLE`. `clientOrderId` is required and idempotent: retrying the same id replays the original result. - A rejected order is HTTP 200 with `status: "REJECTED"` and a stable `reason` code (`INSUFFICIENT_FUNDS`, `NOT_ELIGIBLE`, `SHARE_CAP`, `PRICE_BAND`, ...). HTTP 4xx is reserved for auth, validation, and rate limits (`RATE_LIMITED` is 429 with Retry-After). - No order-book streaming. Quote before you trade: `POST /v1/quote` runs the exact execution path as a dry run, so a quote's fill, fees, and slippage match what the same order would do. - Rate limits per key: 300 reads/min, 300 quotes/min, 60 orders/min. - Markets are referenced by the id this API returns, or by the venues' own predictable names: `kalshi:`, `kalshi_perp:`, `polymarket:`, `polymarket:`. A 15-minute BTC window is `polymarket:btc-updown-15m-` (next window = +900); GET /v1/series lists every rolling series with the current and upcoming window names. - Perpetuals (venue=PERP, dollar-priced, fee-free) trade through the same quote/order calls with `direction` (LONG|SHORT) and `leverage`. Combos (multi-leg parlays) have their own RFQ quote → accept → cashout flow. ## Endpoints - GET /v1/markets — search/list markets (q, venue ALL|KALSHI|POLYMARKET|PERP|UPDOWN, category, page, limit) - GET /v1/markets/{market} — top-of-book, per-side buyability, fee model - GET /v1/series — rolling Up/Down series: current + next windows with venue-native names - POST /v1/quote — firm RFQ dry run (market, outcome YES|NO, side BUY|SELL, sizeShares or notionalMicros, optional limitPriceProb; perps add direction/leverage) - POST /v1/orders — place an order (same body plus required clientOrderId) - POST /v1/combo/quote — live venue RFQ for a 2-10 leg parlay - POST /v1/combo/orders — accept a combo quote (quoteId = idempotency key) - POST /v1/combo/cashout/quote + /v1/combo/cashout — close an open combo - GET /v1/combos — open and settled combos with live marks - GET /v1/account — equity, cash, unrealized P&L, buying power - GET /v1/risk — drawdown floor, headroom, peak, withdrawable profit - GET /v1/positions — open positions with live marks and settlement state - GET /v1/fills — trade and settlement history