0bps

Strategy vault / Tools & templates

Switch OKEx V5 Simulated Trading Terminal Plugin

When the OKEX V5 exchange object is configured (using OKEX V5's simulated disk API KEY configuration), since the simulated disk environment is not switched, the following error will be reported: Can use this plugin…

Author
发明者量化-小小梦
Complexity
Starter · 4 lines
Parameters
0

Trading terminal OKEX_V5 simulation disk switching plug-in

When the OKEX V5 exchange object is configured (using OKEX V5's simulated disk API KEY configuration), since the simulated disk environment is not switched, the following error will be reported:

{"msg":"Broker id of APIKey does not match current environment.","code":"50101"}

Can use this plugin to switch, as shown in the figure:

  • Click the add button:

    IMG

  • Select plugin:

    IMG

  • Execute plugin

    IMG

  • Execute immediately

    IMG

  • The simulated account assets are then read out

    IMG

If you want to switch back to the real disk environment, just uncheck the option and execute it again.

Source JavaScript

function main() {    
    exchange.IO("simulate", true)
    return "Switched toOKEX V5Simulation Account"
}

Published by 发明者量化-小小梦 on the FMZ strategy square · last modified 2021-06-08. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.

Build this with AgenKit

A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a tested, production-ready module from strategies/Switch-OKEx-V5-Simulated-Trading-Terminal-Plugin.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. Get tests, backtest, risk controls and a paper-trading switch

Understand it first

Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.

Related specs

esc

Try , , or .

↑↓ move↵ open