OIOption API Reference

OIOption 鹰眼系统 API 文档

面向生产环境的 REST API 参考:覆盖行情数据、信号情报、风控状态、交易执行、账户配置与系统监控。

System API
https://oioption.com/app/api

Dashboard, market data, risk, trading and monitoring.

Landing API
https://oioption.com/api/v1

Account, payment, user API-key configuration and RFQ.

Browser same-origin
/app/api/* or /api/v1/*

Recommended for frontend clients.

官网、系统前端和 API Gateway 是分层部署的。浏览器侧调用应优先使用同源路径,避免跨域直连后端服务。

认证方式

API 仅对已购买且授权有效的套餐用户开放。公开流程只包含登录/会话建立和基础服务检查;行情数据、信号、风控状态、交易执行都必须具备有效套餐授权。

套餐授权访问

未购买套餐、套餐过期或权限不足时,受保护 API 会拒绝访问。交易类 API 还必须具备对应的量化交易权限。

Cookie session

Default browser session for website and dashboard users.

Bearer token

Authorization: Bearer <access_token>

接口分组

Public System Flows

Only login/session bootstrap and lightweight health checks are public flows. They do not grant market, signal, risk or trading data access.

6 endpoints
MethodEndpointAuthDescription
GET/api/ping公开流程Lightweight service health check.
POST/api/auth/login公开流程Create a browser session after account authentication.
POST/api/auth/exchange-sso公开流程Exchange a one-time SSO code for a system session.
POST/api/auth/refresh公开流程Refresh an existing access session.
GET/api/auth/session用户Return current authenticated user and plan scope.
POST/api/auth/logout用户Clear browser session cookies.

Market Data

Options, VIX, OHLCV, net-position, visualization and news data used by the dashboard and research workflow.

11 endpoints
MethodEndpointAuthDescription
GET/api/data/options/recent用户Recent normalized options rows.
GET/api/data/options/statistics用户Options statistics and summary metrics.
GET/api/data/options/table-counts用户Data table counts for operational visibility.
GET/api/data/kline/ohlcv用户OHLCV candles for supported underlyings.
GET/api/data/net-positions/snapshot用户Latest net-position snapshot.
GET/api/data/net-positions/grid用户Net-position grid for strike/expiry structure.
GET/api/data/visualization/anomalies用户Anomaly visualization data.
GET/api/data/visualization/vol-surface用户Volatility surface data.
GET/api/data/trading/vix/history用户VIX history records.
GET/api/data/trading/vix/signal/latest用户Latest VIX-derived signal.
GET/api/data/news/recent用户Recent macro and market news context.

Signals & Decisions

Signal history, doomsday options evaluation, Eagle fusion decision output, and strategy signal records.

9 endpoints
MethodEndpointAuthDescription
GET/api/data/signals/recent用户Recent signal events.
GET/api/data/signals/history用户Signal history series.
GET/api/data/signals/doomsday/evaluate用户Doomsday options signal evaluation.
GET/api/data/signals/doomsday/history用户Historical doomsday signal rows.
GET/api/data/eagle-decision/fusion用户Eagle decision fusion output.
GET/api/data/trading/portfolio交易权限Trading portfolio data view.
GET/api/data/trading/strategy-signals交易权限Strategy signal records by strategy/underlying.
GET/api/strategy/status交易权限Strategy runtime status.
GET/api/strategy/signals交易权限Recent strategy-level signals.

Trading Execution

Live execution endpoints. These require quant trading entitlement and are protected by user scoping, risk controls, and audit logging.

14 endpoints
MethodEndpointAuthDescription
GET/api/trading/realtime-price交易权限Realtime underlying price.
GET/api/trading/sr-levels交易权限Support/resistance levels.
GET/api/trading/positions交易权限Scoped open positions.
GET/api/trading/orders/active交易权限Scoped active orders.
GET/api/trading/orders/recent交易权限Recent order history.
POST/api/trading/execute/buy-option交易权限Option buy IOC/taker execution.
POST/api/trading/execute/buy-from-support交易权限SR support-side execution.
POST/api/trading/execute/sell-from-resistance交易权限SR resistance-side execution.
POST/api/trading/positions/close-long交易权限Close scoped long exposure.
POST/api/trading/positions/close-short交易权限Close scoped short exposure.
POST/api/trading/positions/reduce交易权限Reduce scoped position by percentage.
GET/api/trading/order-events交易权限Order execution audit events.
GET/api/trading/option-scan交易权限Automated option candidate scan.
GET/api/trading/signal-gate/history交易权限Signal gate decision history.

Risk & Controls

Risk control state, circuit breakers, tactical controls, global hedge status, and emergency shutdown.

13 endpoints
MethodEndpointAuthDescription
GET/api/risk/strategy-controller/status用户Per-user strategy controller status.
POST/api/risk/strategy-controller/toggle用户Enable/disable user strategy controller.
GET/api/risk/controls/status用户Risk control status.
POST/api/risk/controls/toggle管理员Toggle global risk controls.
GET/api/risk/circuit-breaker/status用户Circuit breaker state.
POST/api/risk/circuit-breaker/reset用户Reset user circuit breaker state.
GET/api/risk/tactical-cb/status用户Tactical circuit breaker state.
GET/api/risk/vix/status用户VIX factor status.
GET/api/risk/systemic/status用户Systemic risk state.
GET/api/risk/global-hedge/status用户Global hedge status.
GET/api/risk/emergency/status用户Emergency shutdown status.
POST/api/risk/emergency/trigger管理员Trigger emergency shutdown.
POST/api/risk/emergency/reset管理员Reset emergency shutdown.

System & Configuration

System status, monitoring, scheduler visibility, configuration and credential metadata.

12 endpoints
MethodEndpointAuthDescription
GET/api/system/health用户System health view with role-based redaction.
GET/api/system/stats用户System statistics.
GET/api/system/control-plane用户Control-plane snapshot.
GET/api/system/exchange-status用户Exchange connection and freshness status.
POST/api/system/cache/clear管理员Clear cache by feature.
GET/api/monitor/scheduler/status用户Scheduler status.
GET/api/monitor/scheduler/tasks用户Scheduler task list.
GET/api/monitor/signal-modules/status用户Signal module health.
GET/api/config/me/credentials用户Current user credential metadata, never raw secrets.
GET/api/config/strategies管理员Strategy configuration summary.
GET/api/config/signals管理员Signal configuration.
POST/api/config/signals管理员Update signal configuration.

Landing Account API

Account and license surfaces used to enter the Eagle Eye system and manage exchange API-key metadata.

6 endpoints
MethodEndpointAuthDescription
POST/api/v1/auth/login公开流程Landing account login.
POST/api/v1/auth/generate-sso-code用户Generate one-time SSO code for system entry.
GET/api/v1/user/dashboard用户Dashboard account/license status.
POST/api/v1/user/api-settings用户Save encrypted exchange API credentials.
GET/api/v1/user/api-settings用户List masked exchange API settings.
POST/api/v1/user/test-connection用户Test exchange API credentials.

请求示例

Login and create browser session

curl -X POST https://oioption.com/app/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"desk@example.com","password":"********"}'

Read recent signal events

curl https://oioption.com/app/api/data/signals/recent?limit=50 \
  -H "Authorization: Bearer <access_token>"

Buy option through IOC/taker execution

curl -X POST https://oioption.com/app/api/trading/execute/buy-option \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{"inst_id":"BTC-20260529-70000-C","side":"buy","n_contracts":0.1,"tolerance_pct":0.05}'

交易所 API Key 配置

OIOption 通过交易所官方 API 接入行情、账户和交易能力。API Key 应按照已购买产品层级使用最小必要权限。

OKX

Read + Trade only when auto trading is enabled. Never enable Withdraw.

Deribit

Read for analytics; read_write only for trading workflows.

Binance

Read info by default; trading permission only if explicitly needed.

限频与错误

所有 API 都有限频保护。超过限频后接口会自动返回错误,请降低请求频率后再访问。

Production note

Trading APIs are live-money surfaces. Human operators should control global switches and strategy switches; strategy execution itself is automated and must be governed by risk controls, audit logs and exchange-side API permissions.