Debugging tools for live disks

Author: The Little Dream, Created: 2018-04-08 11:19:15, Updated: 2018-04-08 12:37:16

Debugging tools for live disks

  • Debugging tool: Mainly used for API access testing of exchanges (supported only on physical disks)

    This is a free test on a real disk. Time limit, program running time limited to 3 minutes. Most API function tests are supported, but a few are not, such as: * WeChat push (i.e., the API function of the output log ends with an "@" character to push WeChat) * WeChat, * WeChat chart function, etc. Supports structures such as defining subfunctions, loops, conditional branches and so on. The program runs the input function as the main ((() function. After the program is run, the log will display the output. Currently, only JavaScript is supported. Testing Commodity Futures Code Time The operating mechanism is different.

    # 注意:
    # 测试时 需确认 您的托管者 是否能访问到 交易所。
    # 可以使用 SS5 (详见API文档 SetProxy 函数) ,或者 把托管者部署在 其它地区的 服务器上。
    
  • Go to the plugin page of the plugin debugger and run the unit test.

    img

    img

    img

  • Here are some examples of test code:

    function test(){                                     // 测试 自定义函数
        Log("ticker:", exchange.GetTicker())
    }
    
    function main() {                                    // 入口函数,程序从这里开始执行。
        Log(exchange.GetCurrency(), "USDCNY:", exchange.GetUSDCNY());
        Log(exchange.GetName())
        exchange.SetContractType("BTC-27APR18")
        var i = 0 
        while(1){
            test()
            Sleep(1000)
            i++
            if(i > 5){
                break
            }
        }
        return exchange.GetPosition()                    // 函数返回值 会显示在 下方 “函数结果” 中。
    }
    

    img

  • Special mechanisms for testing commodity futures

    When using Debugging Tools Testing Commodity Futures Code, since commodity futures use the CTP protocol, the host creates a connection at the bottom to avoid creating a connection at each test code, the host optimizes the bottom to keep the connection created during the test for a period of time, without the new test repeating the connection operation. The program increases a certain speed.


More

South Korea's small woodpeckerIs this real-life robot charging normally?

shenglinqianIf the while loop is used in the debug, is there a way to force the interrupt besides shutting down the host machine?

shenglinqianIs it possible to debug in Python?

The Little DreamThe debug tool is free.

The Little DreamThe most effective way is to stop the administrator.

The Little DreamCurrently, only JavaScript is supported.