这是indexloc提供的服务,不要输入任何密码
Skip to content

[FR]. OKX integration into OpenBB #7098

@chandrasaripaka

Description

@chandrasaripaka

🚫 What's the problem of not having this feature?

OpenBB Desktop currently does not support integration with the OKX v5 API/WebSocket, which creates a significant gap for users who actively trade or manage portfolios on the OKX exchange. This limits real-time portfolio tracking, live trading, and automated strategy execution directly from the OpenBB platform.

As a result, users are forced to:

  • Manually export data from OKX and import it into OpenBB.
  • Run separate scripts or tools for order management and live data.
  • Miss out on real-time insights and alerts from OKX market movements.

This lack of native support diminishes the efficiency and usability of OpenBB for crypto traders who rely on OKX.


Describe the solution you would like

I propose a full integration of the OKX v5 API and WebSocket feed into OpenBB Desktop, providing seamless support for both real-time data and account operations. Key capabilities would include:

🔹 Market Data (via WebSocket)

  • Live ticker prices, trades, and depth (order book) for spot and derivatives.
  • Subscription-based WebSocket channels with reconnect and heartbeat handling.

🔹 Portfolio & Account

  • Fetch balances, positions, and order history via REST API.
  • Live account updates (balances, PnL, position changes) via WebSocket.

🔹 Trading Features

  • Place, update, and cancel spot/futures orders directly from OpenBB.
  • Access to margin, perpetual, and options trading where supported.

🔹 User Experience

  • Add OKX as an exchange in the "Brokerage" or "Crypto" tab.
  • Secure API key management through encrypted storage or OS-level secrets.
  • WebSocket status UI with auto-reconnect and debug logging.

🔄 Describe alternatives you've considered

  • CCXT Integration: CCXT provides partial OKX REST support but lacks WebSocket capabilities and doesn’t expose advanced OKX-specific features (e.g., account stream events).
  • Manual CSV uploads: This is time-consuming and lacks real-time updates, defeating the purpose of an interactive platform like OpenBB.
  • External bots/tools: These create fragmented workflows, requiring users to jump between platforms for monitoring and execution.

📝 Additional information

  • OKX v5 is their latest API standard with full WebSocket and REST coverage:
  • This integration aligns with OpenBB’s goal of providing multi-asset, broker-agnostic capabilities for retail and professional investors.
  • A successful implementation could also open the door to further integrations with other major crypto exchanges and DeFi protocols.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions