跳轉到

FutuOpenD

Run FutuOpenD in Ubuntu 22.04

December 9, 2022


To use Futu OpenAPI in Ubuntu, you need to run FutuOpenD first. It is acutally an agent between your trading software and Futu platform. It performs login authentication and handle protocol requests.

To connect FutuOpenD, either use GUI or command line approaches.

GUI

  1. Download FutuOpenD from the offical site: https://www.futunn.com/en/download/OpenAPI

  2. Decompress the file and you should see two folders. One is GUI and another is command line folder.

    FutuOpenD login

  3. In GUI folder, there is an AppImage executable file. Doublic-click or Right click->Run to start FutuOpenD.

    FutuOpenD login before

  4. Type in your Futu account and password info, you should be able to connect to Futu system.

    FutuOpenD login after

Command line

  1. Go to command line folder, you should find a XML file. If you provide login and password information in XML file, you can simply type

    ./FutuOpenD
    
  2. Or you can provide the login and password info in command line:

    ./FutuOpenD -login_account=XXXXXX -login_pwd=YYYYYY -lang=en
    
    FutuOpenD version: 6.05.3018(20221124103000)                                                                                          
    Start Time: 2022-12-08 14:05:28                                                                                                       
    FutuOpenD is running                                                                                                                  
    Load configuration file successfully                                                                                                  
    Server startup                                                                                                                        
    API Listening Address: 127.0.0.1:11111                                                                                                
    API RSA Enable: No                                                                                                                    
    Login Method: Account password login                                                                                                  
    Logging in                                                                                                                            
    Quote Connection: Conn06-HK                                                                                                           
    Login successful                                                                                                                      
    Login Account: xxxxxxxx
    Trade Connection1: Conn06-HK                                                                                                          
    User Quota: Subscription Quota: 1000, Historical Candlestick Quota: 1000                                                              
    HK Securities: Bmp, Permission Status: Normal                                                                                         
    HK Options: Bmp, Permission Status: Normal                                                                                            
    HK Futures: Bmp, Permission Status: Normal                                                                                            
    US Securities: No Authority, Permission Status: Normal                                                                                
    US Options: LV1, Permission Status: Normal                                                                                            
    CME Futures: No Authority, Permission Status: Normal                                                                                  
    CBOT Futures: No Authority, Permission Status: Normal                                                                                 
    NYMEX Futures: No Authority, Permission Status: Normal                                                                                
    COMEX Futures: No Authority, Permission Status: Normal                                                                                
    CBOE Futures: No Authority, Permission Status: Normal                                                                                 
    US Index: No Authority, Permission Status: Normal                                                                                     
    US OTC: No Authority, Permission Status: Normal                                                                                       
    A-shares Market: No Authority, Permission Status: Normal                                                                              
    SG Futures: No Authority, Permission Status: Normal                                                                                   
    JP Futures: No Authority, Permission Status: Normal                                                                                   
    In order to meet regulatory requirements, API users need to conduct relevant questionnaire evaluation and agreement confirmation, please go to completion: https://www.futunn.com/about/api-disclaimer?lang=en-US
    FutuOpenD exited  
    
  3. I was kicked out at the first time login in using command line. It asked me to answer an questionnaire before proceeding. Simply go to the link provided in the console message and fill in the questionaire, you should be able to connect FutuOpenD without disconnection.

  4. To exit FutuOpenD, just type 'exit'.

  5. Other commands of FutuOpenD:

    >>>help
    Command list:                                                     
            relogin
            exit
            version
            req_phone_verify_code
            input_phone_verify_code
            req_pic_verify_code
            input_pic_verify_code
            ping
            set_log_level
            show_delay_report
            close_api_conn
            show_sub_info
            request_highest_quote_right
            update
            check_update
    For detailed commands, please add the corresponding command name to query, example: help -cmd=version
    

p.s. I am not affiliated with Futu in the above information about FutuOpenD. It is just my study note during the course of alogrithm trading. Get offical info from Futu website:

https://openapi.futunn.com/futu-api-doc/en/

https://www.futunn.com/en/download/OpenAPI

Back to top