Giter VIP home page Giter VIP logo

docker-image-futuopend's Introduction

kaelz/futuopend

Docker image for FutuOpenD on Ubuntu.

The container will start

  • a FutuOpenD agent
  • a websocket server which could help to check the ready status of the FutuOpend agent and make it possible for you to provide SMS verfication code.
docker pull kaelz/futuopend:latest

Current FutuOpenD Image Version

7.3.3508_Ubuntu16.04

Environment Variables

  • FUTU_LOGIN_ACCOUNT required
  • FUTU_LOGIN_PWD_MD5 required
  • FUTU_LOGIN_REGION defaults to sh
  • FUTU_LANG defaults to chs
  • FUTU_LOG_LEVEL defaults to no
  • FUTU_PORT defaults to 11111
  • SERVER_PORT integer the port of the websocket server, defaults to 8000

How to start the container

docker run -it -p 11111:11111 \
-e "FUTU_LOGIN_ACCOUNT=$your_futu_id" \
-e "FUTU_LOGIN_PWD_MD5=$your_password_md5" kaelz/futuopend:latest

WebSocket Server

Incoming Message

  • type string the type of the messages, including following types:
    • REQUEST_VERIFY_CODE: which means the FutuOpenD agent requires you to provide an SMS verification code
    • CONNECTED: which means the FutuOpenD agent is connected
const {WebSocket} = require('ws')

const ws = new WebSocket('ws://localhost:8080')

ws.on('open', () => {
  ws.on('message', msg => {
    const data = JSON.parse(msg)

    if (data.type === 'REQUEST_VERIFY_CODE') {
      ws.send(JSON.stringify({
        type: 'VERIFY_CODE',
        code: '12345'
      }))
    }
  })
})

For Mac

It is not easy to connect to a container from MacOS, to run test.py from MacOS, see:

For contributors

How to build your own image

docker build -t $TAG:$VERSION --build-arg .

For example:

docker build -t kaelz/futuopend:2.8.700 .

docker-image-futuopend's People

Contributors

kaelzhang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.