Coder Social home page Coder Social logo

bigmig's Introduction

bigmig

Robotic Trading App using AWS and IG Markets API

This is very early on and I am not going to write a massively detailed set of instructions - just yet - but I will and it will be fun!

What do I need -:

  1. An account with IG.
  2. An AWS account.
  3. Node Installed.
  4. Serverless installed.
  5. A command prompt.

To provision your AWS account you will need to follow these steps -: https://docs.aws.amazon.com/polly/latest/dg/setup-aws-cli.html

  1. You will need to update the cloud formation script with your IG Username, Password and API Key.
  2. I have had to make some 'tweaks' to the brilliant node package 'node-ig-api' (https://www.npmjs.com/package/node-ig-api) written by Giuseppe Fiocco. Follow these instructions -:
  • npm install
  • Find node-ig-api folder.
  • Open index.js - replace its contents with the contents of .api-re-write.js
  • Open cloudformation.yml and update the values in lines 31-33 with you IG Trading Credentials.
  1. Deploy the stack -: aws cloudformation deploy --template-file cloudformation.yml --stack-name bigmig --capabilities CAPABILITY_IAM

  2. Create the Serverless deployment -: sls package

  3. Deploy the Lambda ( go into the .serverless folder) -:

    • aws lambda update -function-code --function-name BigMig --zip-file fileb://bigmig.zip

To destroy the BOT from your account -:

- aws cloudformation delete-stack --stack-name bigmig

You should now be trading!

Things to remember -:

  • I TAKE NO RESPONSIBILITY FOR WHAT YOU DO WITH THIS SOFTWARE. YOU USE THIS SOFTWARE AT YOUR OWN PERIL!!!
  • This 'bot' trades every minute , Monday to Friday 8.30 - 5pm. If you want to change the frequency then tweak the cron setting in serverles.yml
  • It will only close positions if you are in profit. There are stops in place and you will need to adjust the markets array to suite your requirements.
  • It is configured to trade in 4 markets - you can change this however you want by changing the array located at the top of the file (index.js - markets)
  • There is a two step process when the lambda is invoked - it checks to see if it should close any open positions then it checks the markets that do not have any positions and tries to place one. It is the latter part in which you can try out any trading ideas.

bigmig's People

Contributors

richardhill avatar

Stargazers

 avatar Alex Wilton avatar

Watchers

 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.