Git Product home page Git Product logo

iqfeed's Introduction

Dockerized IQFeed client

Details

This image runs an IQFeed client (version 5.1.1.0) using Ubuntu 14.04 and wine.

It exposes IQFeed ports 5009 and 9100 as 5010 and 9101 correspondingly. Port change is because IQFeed listens on localhost and proxy embeded into container translates those ports to 5010 and 9101.

Image accepts following environment variables:

  • LOGIN - IQFeed account login (not the one for http://iqfeed.net site, by for IQFeed client)
  • PASSWORD - IQFeed account password
  • APP_NAME - application name that is passed to the IQFeed server (if you don't have one, or don't know it, it will still work with IQFEED_DEMO app name)
  • APP_VERSION - application version that is passed to IQFeed (defaults to 1.0.0.0)

Building docker image

If you want to build your own image, probably with modification, follow the steps below.

I recommend doing it on Ubuntu 14.04 machine so that it is similar to what is within container and Wine application installed on host machine will work well within container. You can set up one in 5 minutes using, for example, http://digitalocean.com.

Idea and Makefile are borrowed from https://github.com/macdice/iqfeed-debian.

  1. Install wine
apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-wine/ppa
apt-get update
apt-get -y install wine1.8
  1. You need a GUI for this to work, so if you're doing it on server, install vncserver. Alternatively, if sshing into VM, download Xquartz and continue below.

  2. Run make fetch in this folder to download IQFeed Client installation file. You can change IQFeed Client version at the top of Makefile.

  3. Launch GUI (launches automatically in step 6 if using XQuartz).

  4. Run make install. Don't change default settings.

  5. Run make launch. Enter your username and password, check "Save Login And Password" and "Automatically Connect" checkboxes.

  6. You can exit GUI now.

  7. Edit iqfeed.conf and enter your desired iqfeed version and product name.

  8. Install docker, if you haven't before: curl -sSL https://get.docker.io/ubuntu/ | sudo sh.

  9. In the current folder, run docker build -t iqfeed ..

  10. Your image is ready and named iqfeed.

You can run it now: docker run -e LOGIN=login -e PASSWORD=password iqfeed.

Running Container on a Different Machine

For transferring images without using docker registry:

Build and export the image

  1. docker build -t ncllc/iqfeed

  2. docker export ncllc/iqfeed > /desired-path-to-file/ncllc_iqfeed.tar

  3. navigate to your desired path on target machine and run rsync -avz --partial --progress machinelogin@hostname:/tmp/ncllc_iqfeed.tar .

Load the image and run the container

  1. docker load < /path-to-file/ncllc_iqfeed.tar

  2. Image should appear in registry docker images

  3. docker run -d --name feed -p 5009:5010 -p 9100:9101 ncllc/iqfeed.

  4. Listen on the correct port telnet localhost 9100.

For transferring image between machines using public registry: you can use http://hub.docker.com. For example, if your account on Docker Hub is "ncllc", you should run docker build -t ncllc/iqfeed ., then docker push ncllc/iqfeed. Then on the target machine, run docker pull ncllc/iqfeed and docker run --net="host" ncllc/iqfeed.

Usage

docker run -e LOGIN=<your iqfeed login> -e PASSWORD=<your iqfeed password> -p 5009:5010 -p 9100:9101 ncllc/iqfeed

You should see out put like this:

Connecting to port  9300
Disconnected. Reconnecting in 1 second.
Connecting to port  9300
Disconnected. Reconnecting in 1 second.
fixme:thread:GetThreadPreferredUILanguages 52, 0x32fac4, 0x32fb34 0x32facc
fixme:heap:HeapSetInformation (nil) 1 (nil) 0
fixme:thread:GetThreadPreferredUILanguages 52, 0x32f880, 0x32f8f0 0x32f888

That's totally ok.

Wait until you start seeing log lines that have word "Connected" in them. They should look like this:

S,STATS,66.112.148.223,60002,500,0,1,0,5,0,Aug 20 2:42PM,Aug 20 2:42PM,Connected,5.1.1.0,416828,0.55,0.02,0.03,3.94,0.11,0.18,

Here you go, now you should be able to connect to ports 5009 or 9100 to the current machine as if you're connecting to an IQFeed client.

If you don't start seeing "Connected" lines in about 1 minute, then you probably entered login or password incorrectly. Unfortunately, IQFeed doesn't say anything about it, just doesn't connect.

iqfeed's People

Contributors

shuaib88 avatar zefyrr avatar

Watchers

James Cloos 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.