weltiq

Log in Start free

API & MCP documentation

One order interface. Today it runs against the weltiq paper engine with honest fills; when broker connectors ship, the same request routes to your broker — with the same policy checks attached. REST for bots and scripts, MCP for your own Claude.
PrinciplesQuickstartAuth & scopes RESTOrder flowMCPErrorsLimits📘 사용 매뉴얼·튜토리얼 (한글)

What is exposed — and what is not

Public interfaceKept inside the service
Account, positions, orders, fills, envelopes, bars, journal — the unified trading interface. Strategies are referenced by template id or your instance hash; you can run, backtest and stop them. Strategy rule documents and parameters, the block DSL, the AI guidance memos, the review rules, reality profiles and the policy engine internals. The engineer AI explains and tunes a strategy for you inside the app — the rules themselves never leave the server, regardless of plan or login.
The missing tools are the contract: there is no endpoint or MCP tool to write policies, raise limits, promote to live or reset a kill switch. Those are human step-ups in the app.

Quickstart

  1. Sign in with Google (free) and issue an API key under Settings → API keys. Choose its scopes at creation.
  2. Call the API with the key as a bearer token, or plug the key into the MCP server for your Claude.
curl https://weltiq.ai/v1/markets -H "Authorization: Bearer $WELTIQ_API_KEY" # backtest a catalog template on recent bars — same fill rules as paper curl -X POST https://weltiq.ai/v1/backtest -H "Authorization: Bearer $WELTIQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{"template_id":"TPL-002","venue":"binance-spot","symbol":"BTCUSDT","tf":"1m","hours":24}'
Base URL https://weltiq.ai · JSON in, JSON out · send a real User-Agent (default Python/urllib agents are blocked at the edge) · OpenAPI explorer at /api-docs.

Authentication & scopes

Every key carries a subset of three scopes. Sessions (browser) hold all three; API keys hold exactly what you granted.
ScopeGrants
read-dataMarkets, bars, watchlist, briefing, account, fills, orders, templates (public card), instances, backtest history, journal, AI analyst & review
run-backtestRun backtests, instantiate templates, engineer AI (explain / tune / variants), formalize ideas (Pro)
operate-simEnvelopes, one-off paper orders, cancel, resident slots (run / stop), promotion requests
Firewall rule for MCP: the analyst server only accepts keys whose sole scope is read-data. Issue two keys if you want both analysis and execution in your agent — they stay separate tokens on purpose.

REST reference

Market data

EndpointScopeDescription
GET /v1/marketsread-dataVenues with data freshness (live / stale): binance-spot, binance-usdm, bybit-spot, bybit-linear, us-equity, krx
GET /v1/bars?venue&symbol&tf=1m|1h|1d&hours≤720read-dataClosed OHLCV bars (max 5,000 per call)
GET /v1/watchlist · POST /v1/watchlist/refreshread-data · refresh: sessionSignal-driven watchlist with technique, invalidation and 48h expiry
POST /v1/signal-package {venue, symbol}read-dataDirection bias, techniques and template candidates for a symbol
GET /v1/briefingread-dataDaily briefing

Strategies & backtests

EndpointScopeDescription
GET /v1/templates?q&category&status · GET /v1/templates/{id}read-dataTemplate catalog (100). Public card only: name, targets, entry/exit one-liner, tags, status (ready / gated / out_of_scope), fit, forecast_load
POST /v1/templates/{id}/instantiaterun-backtestYour instance of a template → doc_hash (Pro templates need Pro)
POST /v1/backtest {template_id | doc_hash, venue, symbol, tf, hours, compare_lookahead?}run-backtestReplay on stored bars with the paper engine's fill rules. hours cap by tf: 1m 720 · 1h 8,760 · 1d 43,800. Returns bars, fills, pnl, fees, data_mode; recorded in history
GET /v1/backtests?symbol · GET /v1/instancesread-dataHistory and your instances — each labelled with template name or "custom" plus a one-line rules summary
POST /v1/ai/engineer {template_id, symbol, messages[]}run-backtestEngineer AI: explains, reviews settings, applies explicit changes. Returns reply, changes[] (server-computed diff) and doc_hash
POST /v1/ai/engineer/variantsrun-backtest2–3 nearby parameter variants, backtested together (Pro); rows carry changes vs base, never the rules
POST /v1/ai/formalize {idea, symbols[], base_template_id?}run-backtestPlain-language idea → instance (doc_hash + summary) or clarifying questions (Pro)

Resident slots (24/7 strategy runs)

EndpointScopeDescription
GET /v1/slotsread-dataRunning slots with live state (position, daily pnl, last bar) and auto-stop status
POST /v1/slots {doc_hash, symbol, tf, stop_max_loss, stop_after_hours, signal_kind?}operate-simStart a slot. Stop conditions are mandatory (loss cap in quote currency, 1–720 h). signal_kind links an external signal gate for gated templates. Free: 1 slot · Pro: 3
DELETE /v1/slots/{deployment_id}operate-simStop (closes the position)
POST /v1/promotionsoperate-simRequest promotion review from paper evidence

Account & orders

EndpointScopeDescription
GET /v1/accountread-dataDouble-entry ledger balances: cash, position_value, fees (they sum to zero at every fill)
GET /v1/fills?mode=paper|testnet · GET /v1/ordersread-dataExecutions with fees; open orders with the full state machine
GET /v1/fees/compare?mode&days&venuesread-dataYour fills re-priced with each venue's fee schedule (spot vs spot, perp vs perp by default); delta vs actual and all-maker scenario
GET /v1/envelopes · POST /v1/envelopes · DELETE /v1/envelopes/{id}operate-sim (read) · session (create/revoke — browser only)Discretionary envelopes: symbols, max order notional, max daily notional, validity days
GET/POST/DELETE /v1/connectorssessionYour own broker API keys, encrypted per user — brokers: binance (USDⓈ-M futures; paper = demo/testnet), bybit (USDT perpetual; paper = demo trading), kis (soon). Verified on registration (balance read); withdrawal-enabled keys refused. Orders pick a connector with target=cred_id
POST /v1/orders/oneoff · GET /v1/orders/oneoffoperate-simOne-off order inside an envelope (see order flow). target: paper (internal engine, default) or a connector cred_id — testnet/demo keys fill on the exchange's demo book, live keys need thesis.live_ack. Queue shows status and rejection code
DELETE /v1/orders/{intent_id}operate-simCancel — remaining qty counts as risk until confirmed
GET /v1/journalread-dataDelegation journal: who / what / on whose behalf, for every action

AI analyst, keys & billing

EndpointScopeDescription
POST /v1/ai/analyze · POST /v1/ai/chatread-dataSymbol analysis from deterministic stats + signals; chat on the same grounding. Observations and risks — never recommendations
POST /v1/ai/review?days&lang=ko|enread-dataFormal review of your own trades and account: metrics, rule-based findings, discipline state (good / watch / alert), fixed sections
GET/PUT /v1/notificationssessionEmail notification preferences per kind (order fills/rejections, auto disposal, slot stops, credits, weekly review, notices). Security notices cannot be turned off
GET/POST/DELETE /v1/keyssessionManage API keys (browser session only — a key cannot mint keys)
GET /v1/billing · GET /v1/usageread-dataCredits and the open usage ledger

Order flow — the same for paper today and brokers later

  1. Envelope — pre-authorize what a discretionary order may do: symbols, per-order and daily notional, validity.
  2. One-off orderPOST /v1/orders/oneoff with thesis.why and a disposal rule for the position: px_below and/or px_above (stop or target; the engine closes when either level is hit). No thesis or no level on an opening order → refused.
  3. Closing — an order against a held position is treated as a close (reduce-only, capped at the held qty, no levels needed, not counted against envelope notional). Without levels the position is simply held until you close it.
  4. Policy gate — the engine checks envelope, direction lease (no opposite-direction stacking on one symbol), self-trade, notional and data freshness. Rejections carry a code so you know exactly why.
  5. Fill & ledger — executed against live quotes with venue-real fees and slippage; posted to the double-entry ledger. Poll GET /v1/orders/oneoff (usually within 5 s).
POST /v1/envelopes {"symbols":["BTCUSDT"],"max_order_notional":"1000","max_daily_notional":"2000","days":7} POST /v1/orders/oneoff {"venue":"binance-spot","symbol":"BTCUSDT","side":"buy","type":"market","qty":"0.01", "thesis":{"why":"support held on 4h"},"invalidation":{"px_below":"70000"}}
Connector roadmap: when a broker connector is attached to your account, the same request is translated to the broker's order and account calls (KIS, Binance, Bybit, IBKR) — envelope, thesis and invalidation travel with it. Nothing in your integration changes.

MCP — connect your own Claude

Two remote MCP servers (streamable HTTP), thin adapters over the same REST API — scopes, rate limits and journaling apply unchanged. Authenticate with your API key as a bearer header.
ServerURLAccepts
weltiq (execution)https://weltiq.ai/mcpany key; tools follow the key's scopes
weltiq-analyst (information)https://weltiq.ai/mcp/analystkeys with read-data only

Claude Code

claude mcp add --transport http weltiq https://weltiq.ai/mcp \ --header "Authorization: Bearer $WELTIQ_API_KEY" claude mcp add --transport http weltiq-analyst https://weltiq.ai/mcp/analyst \ --header "Authorization: Bearer $WELTIQ_READONLY_KEY"

Claude Desktop / any MCP client

{"mcpServers": { "weltiq": {"url": "https://weltiq.ai/mcp", "headers": {"Authorization": "Bearer wq_..."}}}}

Tools — weltiq (execution)

ToolScopeDescription
markets · barsread-dataVenue freshness; closed bars
templates · templateread-dataCatalog search and public card (rules one-liner, fit, forecast_load)
instantiate · backtest · backtests · instancesrun-backtestOwn instance; backtest by template_id or doc_hash; history
slots · slot_run · slot_stopoperate-simResident runs; stop conditions mandatory; optional signal gate
account · fills · orders · journalread-dataLedger, executions, open orders, delegation journal
fees_compareread-dataFee comparison across venues for your fills
envelopes · order_oneoff · oneoff_orders · order_cancel · connectorsoperate-simEnvelopes (read — created in the browser only), one-off order (thesis + invalidation required; target = paper or your connector cred_id, listed by connectors), queue, cancel

Tools — weltiq-analyst (information)

ToolScopeDescription
watchlist · signal_packageread-dataSignals and per-symbol package
analyze_symbol · review_accountread-dataSymbol analysis; formal review of your own trading (credit-metered)
fees_compare_analystread-dataFee comparison across venues for your fills
Local stdio alternative for self-hosters: WELTIQ_API_KEY=wq_... python -m weltiq.api.mcp_server [analyst]. Either way there are no tools for policies, limits, live promotion or kill-switch reset.

Errors

Errors are JSON with a code. Order rejections use venue-real reasons so your integration learns the same lessons a live venue would teach.
codeMeaning
401 invalid token · scope_deniedMissing / revoked key; key lacks the required scope
rate_limited (429)Per-minute window exceeded — see limits
plan_required (403) · insufficient_credits (402)Pro feature; credit balance exhausted
thesis_required · invalidation_not_declarativeOpening orders need a thesis and a machine-checkable invalidation level
envelope_gone · order_notional_exceeded · portfolio_budgetNo valid envelope; order or daily notional above envelope; portfolio budget
direction_conflict · stp_self_cross · policy_deniedOpposite direction already leased on the symbol; would self-cross; policy rule hits (listed)
data_staleMarket data not fresh — the engine retries on the next cycle instead of executing blind
slot_limit · invalid_stop · not_executablePlan slot cap; stop conditions invalid; template has no executable document (options)
llm_key_missing · llm_upstreamAI endpoints: no model key configured; upstream model error

Metering & limits

Bucket (per minute, per user)FreePro
Default endpoints120600
Backtests1060
AI endpoints20120
Credits: 100 on signup; draft rates 1,000 LLM tokens = 1 · 10,000 backtest bars = 1 · 100 API orders = 1 — fixed only after measurement, never retroactively (pricing). Backtest attempts are budgeted per strategy lineage, so parameter sweeps cannot buy promotion. Bars are for in-platform use; bulk extraction is throttled.