Skip to content

[Bug] OKX模拟盘API被误识别为实盘,导致策略启动瞬间出现-707%巨额亏损 #364

Closed

Description

@qingtian88444

Describe the bug

在QuantDinger中配置OKX模拟盘(Demo Trading)API后,策略启动瞬间出现巨额负收益(-707.92%),且前端策略标签错误显示为红色的“实盘”,而非模拟盘应有的标识。

Steps to reproduce

  1. 在OKX创建仅含“读取”和“交易”权限的模拟盘API,并将服务器IP加入白名单。
  2. 在QuantDinger中绑定该API,账户环境选择“模拟盘”。
  3. 新建ETH/USDT合约网格策略,启动后净值瞬间从1000 USDT变为-6079.20 USDT,收益率-707.92%。
  4. 策略标签显示为“实盘”,且后台日志持续报错 51169(无持仓可平),进入死循环。

期望行为:
模拟盘策略应正常启动,净值从1000 USDT开始按网格逻辑运行,前端正确显示“模拟盘”标签。

实际行为:
策略启动即出现巨额负净值,前端标签错误,且触发 51169 无持仓循环报错,导致策略无法停止或删除。

Expected behavior

模拟盘策略应正常启动,净值从1000 USDT开始按网格逻辑运行,前端正确显示“模拟盘”标签。

d03fedcfd925dec3d9a0ae3ab1c3c878 d452d0556549f785ffe760399a7bb309

Deployment method

Docker Compose

Relevant logs

[ERROR] Grid limit failed long_exit: OKX Websocket order rejected: {'sCode': '51169', 'sMsg': "Order failed because you don't have any positions in this direction for this contract to reduce or close."}
[WARN] 策略前端显示存在虚假敞口 150,000+ USDT,待处理订单累积 19 笔。

Activity

  1. added
    bug
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions