OKX Crypto Trading Plugin for Kungfu Quant Software

ยท

Overview

Installation Guide

  1. Download Required Files:

    • Kungfu Client (Latest stable release; ZIP version recommended)
    • OKX plugin package (Download from "Release" section on this page)
  2. Locate Installation Directory:

    • EXE version: Run Kungfu > "File" > "Open Installation Directory"
    • ZIP version: Navigate to resources folder in decompressed Kungfu directory
  3. Install Plugin:

    • Copy the okx folder to:
      {Kungfu Directory}/app/kungfu-extensions
    • Restart client after installation.

Usage Instructions

API Creation

To enable algorithmic trading, create API keys via OKX:

  1. Click "Create API" on OKX API Portal
  2. Select trading account with "API Trading" purpose and "Trade" permissions
  3. Set a secure passphrase (required for API management)
  4. Submit and retrieve API key/secret under "View" section

๐Ÿ‘‰ Get started with OKX API

Login Process

  1. Market Data Source:

    • Client > "Trading Accounts" panel > Add > "OKX-Digital Currency"
  2. Trading Account:

    • Enter:

      • Custom account name
      • API passphrase
      • API key and secret
      • Toggle "Simulated Trading" if needed

Supported Features

FeatureSupport Status
Spot TradingFull
Futures TradingCross Margin Only
Options TradingNot Supported
Position Sync60s Interval/Real-time

Key Notes:

Compilation Guide (Windows)

Prerequisites

Build Steps

  1. Install Kungfu-trader (e.g., D:\Kungfu-trader)
  2. Clone kfx-broker-okx repository
  3. From VS2022 x64 Native Tools Command Prompt:

    D:\Kungfu-trader\resources\kfc\kfs.exe extension build
  4. Copy generated okx folder from dist to:
    D:\Kungfu-trader\resources\app\kungfu-extensions

FAQ Section

Q: Why can't I see leverage trading options?
A: The plugin currently only supports cross-margin mode without multiplier functionality.

Q: How often are account balances updated?
A: Balances sync every 60 seconds or immediately after order execution.

Q: Where do I find demo strategies?
A: Check the README's appendix for included sample strategies.

๐Ÿ‘‰ Explore OKX trading features

Final Notes

For optimal performance: