GithubHelp home page GithubHelp logo

michael-ullrich-1010 / trading-ib-capsule Goto Github PK

View Code? Open in Web Editor NEW

This project forked from th3sys/capsule

0.0 0.0 0.0 58.05 MB

TWS Market Data Adapter

License: MIT License

Shell 0.71% Python 99.29%

trading-ib-capsule's Introduction

CAPSULE - MARKET DATA ADAPTER

This is an implementation of the TWS Market Data Adapter.

https://api.travis-ci.org/th3sys/capsule.svg?branch=master

Features

TWS Market Data Adapter is implemented using Interactive Brokers API.

  • Dockerfile for headless environment setup
  • Interactive Brokers Gateway
  • Amazon EC2 Container Service setup
  • AWS DynamoDB tables

Usage

Follow these steps the run IB gateway in a docker container on AWS EC2 Container Services platform. Subscribe to the securities from the Securities table and push the quotes back to the Quotes table in DynamoDB.

  1. To use Capsule create Securities and Quotes tables in DynamoDB using the scripts create_tables.py and python push_items.py.
  2. Create AWS CloudWatch Log Group /aws/docker/Capsule
  3. Rename config.default.aws to config.aws and provide your role, access id, etc.
  4. Rename credentials.default.aws to credentials.aws and provide your role, access id, etc.
  5. Build docker image using the dockerfile provided, create capsule repository in your EC2 Container Services AWS account
#Build image
docker build -t capsule .

#Create repo
aws ecr create-repository --repository-name capsule
  1. Tag and push the image in the repo
#Tag repo
docker tag capsule accountid.dkr.ecr.us-east-1.amazonaws.com/capsule

#Get login and push
aws ecr get-login --no-include-email --region us-east-1
docker push accountid.dkr.ecr.us-east-1.amazonaws.com/capsule
  1. In AWS EC2 Container Services create a task definition from the DockerTask.json file
  2. In AWS EC2 Container Services create a Cluster and Container service to run the task definition on a Container instance
  3. Deploy the nightwatch.py script in AWS Lambda function to monitor and start EC2 Container instance

This product includes software developed by Interactive Brokers (https://www.interactivebrokers.com/). The steps in the Dockerfile have been lifted from http://www.algoeye.com/blog/running-ib-gateway-on-vps/.

trading-ib-capsule's People

Contributors

a-shelest 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.