← Back to site | v1 · Beta ● Live

API Reference

The Quakenode API provides programmatic access to real-time event ingestion, AI signal scoring, strategy management, and multi-venue execution. All API access is over HTTPS; data is returned in JSON.

ℹ️ The API is currently in v1 beta. Endpoints marked stable are production-safe. Endpoints marked beta may have breaking changes with advance notice. Subscribe to the changelog to stay current.

Authentication

All requests must include your API key in the Authorization header as a Bearer token. API keys are scoped (read-only, strategy, execution) and can be managed from your dashboard.

HTTP Header
Authorization: Bearer qn_live_your_api_key_here

Keys are prefixed with qn_live_ for production and qn_test_ for sandbox. Never expose keys in client-side code.

Key Scopes

ScopePermissions
readSubscribe to event stream, query historical events, read strategies and positions
strategyAll read permissions + create, modify, and delete strategies
executionAll strategy permissions + place and cancel orders, modify risk limits

Base URL & Versioning

Base URL
https://api.quakenode.com/v1

The current version is v1. Breaking changes increment the major version; the previous major version remains accessible for 12 months after deprecation notice.

Errors

Quakenode uses standard HTTP status codes. All error responses include a JSON body with error, code, and optional details fields.

Error Response
{
  "error": "Strategy not found",
  "code": "STRATEGY_NOT_FOUND",
  "request_id": "req_8kLm4nP2qR"
}
StatusMeaning
200Success
400Bad Request — malformed parameters
401Unauthorized — missing or invalid API key
403Forbidden — key lacks required scope
404Not Found
422Unprocessable — failed validation (risk limits, insufficient funds)
429Rate Limited — see Retry-After header
500Internal Server Error

Rate Limits

Rate limits are applied per API key. The current limits apply to REST endpoints; the WebSocket stream has separate connection limits.

TierRequests / minuteEvent subscriptions
Sandbox601 stream
Growth6005 streams
InstitutionalUnlimitedUnlimited

Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Event API

The Event API is the core of Quakenode. It exposes a scored, classified stream of market-moving events drawn from 100+ global sources, updated in real time.

Event Types

TypeDescription
FED_RATE_DECISIONFederal Reserve FOMC rate decisions, meeting minutes, dot plot releases
CENTRAL_BANK_POLICYECB, Bank of England, Bank of Japan, SNB, PBOC policy statements and decisions
CPI_RELEASEConsumer price index prints across major economies (US, EU, UK, JP, etc.)
GDP_RELEASEGross domestic product data — advance, preliminary, and final readings
NFP_RELEASEUS non-farm payrolls and unemployment rate releases
MACRO_DATAPMI, retail sales, industrial production, trade balance, housing data
EARNINGS_RELEASEQuarterly earnings, guidance revisions, analyst estimate changes
MERGER_ACQUISITIONM&A announcements, hostile bids, regulatory approvals, deal collapses
REGULATORY_FILINGSEC (8-K, 13D/G, 13F), FCA, ESMA filings with parsed key fields
GEOPOLITICAL_EVENTSanctions, trade restrictions, conflicts with identified market impact
TRADE_POLICYTariff announcements, trade agreements, WTO rulings, export controls
IMF_WORLD_BANKEconomic outlooks, growth forecasts, credit facility announcements
BOND_MARKETSovereign rating changes, yield curve events, major auction results
CORPORATE_ACTIONSpin-offs, delistings, index inclusions/exclusions, share buybacks

The Event Object

JSON
{
  "id":           "evt_9mXk4pQ2rT8wLn",
  "type":         "FED_RATE_DECISION",
  "timestamp":    "2026-06-18T18:00:00.042Z",   // UTC, millisecond precision
  "source":       "federalreserve.gov",
  "headline":     "FOMC holds rates at 4.25–4.50%; signals two cuts in 2026",
  "body":         "Full parsed text of the announcement...",
  "score":        9.4,              // AI impact score 0–10
  "sentiment":    "DOVISH",          // BULLISH | BEARISH | DOVISH | HAWKISH | NEUTRAL
  "impact":       "HIGH",            // LOW | MEDIUM | HIGH | CRITICAL
  "confidence":   0.97,
  "tickers":      ["SPY", "TLT", "GLD", "DXY"],
  "regions":      ["US"],
  "asset_classes":["EQUITIES", "BONDS", "FX", "COMMODITIES"],
  "reasoning":    "Rate hold with dovish forward guidance typically positive for equities and bonds...",
  "latency_ms":   4.7,              // ms from source publication to API delivery
  "ingested_at":  "2026-06-18T18:00:00.046Z"
}

Query Events (REST)

GET /v1/events Query recent or historical events with filters
ParameterTypeRequiredDescription
typesstring[]optionalComma-separated event types. Omit for all types.
min_scorenumberoptionalMinimum AI impact score (0–10). Default: 0.
tickersstring[]optionalFilter by affected tickers (e.g. SPY,TLT).
regionsstring[]optionalUS, EU, UK, JP, CN, GLOBAL
sinceISO 8601optionalReturn events after this timestamp. Default: 1 hour ago.
untilISO 8601optionalReturn events before this timestamp.
limitintegeroptionalMax results (1–1000). Default: 100.
cursorstringoptionalPagination cursor from previous response.
Example Request
GET /v1/events?types=FED_RATE_DECISION,CPI_RELEASE&min_score=7.0®ions=US&limit=50
Authorization: Bearer qn_live_...
Response
{
  "data": [ /* array of Event objects */ ],
  "meta": {
    "total": 238,
    "count": 50,
    "next_cursor": "cur_a8Bz2kMpQx",
    "has_more": true
  }
}
GET /v1/events/{id} Retrieve a single event by ID

Returns a single Event object. Useful for webhooks that deliver event IDs rather than full payloads.

Example
GET /v1/events/evt_9mXk4pQ2rT8wLn

WebSocket Stream

The WebSocket stream delivers scored events in real time with sub-5ms average latency from source publication. This is the primary interface for automated strategy execution.

Connection URL
wss://stream.quakenode.com/v1/events?api_key=qn_live_...

Subscription Message

After connecting, send a subscription message to filter the stream. Without a subscription message you receive all events.

JSON
{
  "action":    "subscribe",
  "types":     ["FED_RATE_DECISION", "CPI_RELEASE", "GEOPOLITICAL_EVENT"],
  "min_score": 7.5,
  "regions":   ["US", "EU"],
  "strategy_id": "str_Km4Px9Rq2T"   // optional: auto-trigger a strategy on match
}

Python Example

Python (websockets)
import asyncio, json, websockets

API_KEY = "qn_live_your_key"

async def stream():
    uri = f"wss://stream.quakenode.com/v1/events?api_key={API_KEY}"
    async with websockets.connect(uri) as ws:
        # Subscribe to high-impact macro events
        await ws.send(json.dumps({
            "action": "subscribe",
            "types": ["FED_RATE_DECISION", "CPI_RELEASE",
                      "GEOPOLITICAL_EVENT", "MERGER_ACQUISITION"],
            "min_score": 8.0
        }))
        async for msg in ws:
            event = json.loads(msg)
            print(f"[{event['type']}] {event['headline']}")
            print(f"  Score: {event['score']} | Latency: {event['latency_ms']}ms")

asyncio.run(stream())

Strategy API

Strategies define the rules by which Quakenode responds to incoming events. When an event matches a strategy's filters and score threshold, the strategy's action set is triggered automatically.

⚠️ Strategies with execution: true place real orders. Always validate strategies in sandbox (qn_test_ key) before enabling execution in production.

The Strategy Object

JSON
{
  "id":          "str_Km4Px9Rq2T",
  "name":        "FED Dovish — Long SPY",
  "status":      "ACTIVE",         // ACTIVE | PAUSED | ARCHIVED
  "trigger": {
    "event_types": ["FED_RATE_DECISION"],
    "sentiment":   ["DOVISH"],
    "min_score":   8.5,
    "regions":     ["US"]
  },
  "actions": [
    {
      "type":        "MARKET_ORDER",
      "direction":  "BUY",
      "ticker":     "SPY",
      "quantity":   500,
      "venues":     ["CBOE", "NYSE", "NASDAQ"]
    }
  ],
  "risk": {
    "max_position_usd": 500000,
    "stop_loss_pct":   2.0,
    "daily_loss_limit":25000
  },
  "execution":   true,
  "created_at":  "2026-05-10T09:22:11Z",
  "updated_at":  "2026-06-01T14:07:33Z"
}
POST/v1/strategiesCreate a new strategy

Creates a strategy. Set execution: false to create a signal-only strategy (no orders placed). Requires strategy scope; execution: true also requires execution scope.

GET/v1/strategiesList all strategies

Returns all strategies for the account. Supports status filter: ACTIVE, PAUSED, ARCHIVED.

GET/v1/strategies/{id}Get a strategy

Returns a single strategy object including its full trigger, action, and risk configuration.

PUT/v1/strategies/{id}Update a strategy

Partial updates are supported. Changing status to PAUSED stops execution immediately without deleting the strategy. In-flight orders are not affected.

DELETE/v1/strategies/{id}Archive a strategy

Strategies are soft-deleted (status set to ARCHIVED). All historical execution logs are preserved. Hard deletion is not supported.

Orders API

Orders can be created manually via the REST API or automatically by active strategies. All orders are routed across the configured venues and confirmed with full execution details.

POST/v1/ordersPlace an order
Request Body
{
  "ticker":      "SPY",
  "direction":  "BUY",              // BUY | SELL | SHORT | COVER
  "type":        "MARKET",            // MARKET | LIMIT | STOP | STOP_LIMIT
  "quantity":   200,
  "venues":     ["NYSE", "CBOE"],    // optional: auto-route if omitted
  "time_in_force": "DAY",           // DAY | GTC | IOC | FOK
  "event_id":   "evt_9mXk4pQ2rT8wLn"  // optional: link order to triggering event
}
Response
{
  "id":          "ord_7pLm2nK9xB",
  "status":      "FILLED",
  "fills": [
    { "venue": "NYSE",  "qty": 120, "price": 548.23, "latency_ms": 3.8 },
    { "venue": "CBOE",  "qty": 80,  "price": 548.25, "latency_ms": 4.2 }
  ],
  "avg_price":   548.24,
  "total_qty":   200,
  "created_at":  "2026-06-18T18:00:00.061Z"
}
GET/v1/ordersList orders

Returns orders with optional filters: status (PENDING, FILLED, CANCELLED, REJECTED), ticker, strategy_id, since, until.

GET/v1/orders/{id}Get order status

Returns full order details including individual fills per venue, latency per venue, and the triggering event ID if applicable.

DELETE/v1/orders/{id}Cancel a pending order

Cancels an order with status PENDING. Returns 422 if the order is already filled or cancelled.

Positions API

GET/v1/positionsList current positions
Response (single position)
{
  "ticker":       "SPY",
  "quantity":    700,
  "direction":   "LONG",
  "avg_cost":    546.18,
  "market_value":384326.00,
  "unrealized_pnl":1435.00,
  "exposure_pct": 18.4,
  "opened_at":   "2026-06-17T09:31:02Z"
}
GET/v1/positions/{ticker}Get position for a ticker

Returns the current position for a specific instrument. Returns 404 if no position exists.

Risk Controls API

Risk limits are enforced at order submission time. Breaching a limit returns 422 and the order is rejected. Limits can be read and updated via API.

GET/v1/risk/exposureCurrent portfolio exposure metrics
Response
{
  "gross_exposure_usd":    2084500,
  "net_exposure_usd":      1230400,
  "largest_position_pct":  18.4,
  "realized_pnl_today":    4218.50,
  "unrealized_pnl":        7632.00,
  "drawdown_today_pct":    -0.34
}
GET/v1/risk/limitsRead defined risk limits

Returns all currently configured risk limits for the account including per-strategy overrides.

PUT/v1/risk/limitsUpdate risk limits
Request Body
{
  "max_position_usd":    500000,
  "max_gross_exposure":  3000000,
  "daily_loss_limit":    50000,
  "max_orders_per_min":  20,
  "circuit_breaker_pct": 3.0   // halt all execution if daily loss hits this %
}

SDKs & Libraries

LanguagePackageStatus
Pythonpip install quakenodeStable
JavaScript / Nodenpm install @quakenode/sdkStable
Gogo get github.com/quakenode/go-sdkBeta
JavaMaven: io.quakenode:sdkBeta
REST / cURLDirect HTTP — no SDK requiredStable

Changelog

June 2026 · v1.4
Risk Controls API, new event types
  • Added TRADE_POLICY and IMF_WORLD_BANK event types
  • Risk Controls API (/v1/risk) promoted to stable
  • WebSocket now supports strategy_id auto-trigger parameter
April 2026 · v1.3
Positions API, multi-venue fills
  • Added /v1/positions endpoints
  • Order fills now include per-venue latency and price
  • Go SDK released in beta
February 2026 · v1.0
Initial public release
  • Event Stream API, WebSocket, Strategy API
  • Python and JavaScript SDKs
  • Sandbox environment available on all accounts

Questions about the API?

Our team responds within one business day. Include your use case and we'll recommend the right approach.

Contact Us →