GithubHelp home page GithubHelp logo

mithunmanohar / fxcm-api-stock-price-app Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 5.0 53 KB

store and update data from fxcm api to a mysql database

License: GNU General Public License v3.0

Python 100.00%
fxcm fxcm-api

fxcm-api-stock-price-app's Introduction

fxcm-api-stock-price-app

FXCM, also known as Forex Capital Markets, is a retail foreign exchange broker. This a python fxcm api wrapper that connects to fxcm api and stores data in a local mysql data base. This database can be used connect to excel using excel-MySql connector to do further analysis.

Environment setup

After installing Mysql Database, run the database_setup.py file. This creates the required tables in database for the tool to run. The API credentials can be updated in fxcm.cfg file

#Usage of the command line options

  • TO show all the currency pairs in the database

    python.exe data_manager.py -show_currency_pairs -

  • To show all the timeframes in the database

    python.exe data_manager.pt -show_time_frames

  • Reset database, all the tables, data and resets to default state. Sets everything to default state!

    python.exe data_manager.py -reset_all

Re-run detabase_setup.py file to recreate the database and tables

  • To add a new currency to the database

    python.exe data_manager.py --add_currency_pair {currency pair name}

  • To add a new time frame to database

    python.exe data_managerpy --add_time_frame {time_frame_name}

  • Update all data for all time frames and currency pairs

    python.exe data_manager.py --update_all_data

Custom updates:
Use these methods to update individual timeframe and currency pair

  • To update one time frame one time frame :

    python.exe data_manager.py --update --t_f "m15" --c_p "EUR/USD" --s_d "2018-02-25" --e_d "2018-03-25"

  • To update one time frame, multiple currecy pair:

    python.exe data_manager.py --update --t_f "m15" --c_p "EUR/USD,XAG/USD" --s_d "2018-02-25" --e_d "2018-03-25"

  • To update multiple time frame, one currecy pair:

    python.exe data_manager.py --update --t_f "m15,H4" --c_p "EUR/USD" --s_d "2018-02-25" --e_d "2018-03-25"

  • To update multiple time frame, multiple currency:

    python.exe data_manager.py --update --t_f "m15,H4" --c_p "NZD/USD,GBP/USD" --s_d "2018-02-25" --e_d "2018-03-25"

Requirements:

  • Python version : 3.x (tested on python3.5)

  • fxcm api : pip install fxcmpy

  • MySql python connector : pip install MySQL-python

fxcm-api-stock-price-app's People

Contributors

mithunmanohar avatar

Stargazers

 avatar  avatar  avatar  avatar  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.