Code Monkey home page Code Monkey logo

finx-reports-ib's Introduction

Tests Docs

Finx Reports - IB

Python package to generate reports from Interactive Brokers.

Installing

Install the module from github,

pip install git+https://https://github.com/westonplatter/finx-reports-ib.git@main

Or add it to your requirements.txt file,

finx_reports_ib @ git+https://https://github.com/westonplatter/finx-reports-ib.git@main

Getting Started

  1. Create a Flex Report in the Interactive Broker website (see this link)

    1. Query Name = AllAccounts-AnnualReport
    2. Sections to include in the report. In each, select all Options and all Fields/Columns except: Serial Number, Delivery Type, Commodity Type, Fineness, Weight.
      1. Account Information
      2. Change in NAV
      3. Complex Positions
      4. Mark-to-Market Performance Summary in Base
      5. Month & Year to Date Performance Summary in Base
      6. Open Positions
      7. Option Exercises, Assignments, and Expirations
      8. Realized and Unrealized Performance Summary in Base
    3. Accounts = select all desired accounts (python code is able to handle single or multiple accounts)
    4. Models = Optional
    5. Format = XML
    6. Period = Last 365 Days
    7. Date Format = yyy-MM-dd
    8. Time Format = HH:mm:ss
    9. Date/Time Separator = ;semicolon
    10. ProfitLoss = Default
    11. Include Canceled Trades = No
    12. Include Base Currency = No
    13. Include All Audit Fields = No
    14. Display Account Alias in Place of Account ID = No
    15. Breakout by Day = No
  2. Clone the repo and install it

    git clone [email protected]:westonplatter/finx-reports-ib.git
    cd finx-reports-ib
    pip install --edit .
    
  3. Create your own .env file

    Copy the sample env file,

    cp .env.example .env
    

    Edit it with your own values,

    IB_JSON='{"accounts": [{"name": "account1", "flex_token": "123", "annual": <ibkr_query_id>}]}'
    
  4. Run the download command

    # note that `report-name` matches up with annual key in the .env file
    python cli.py download --report-name=annual --cache
    
    # see the python import/methods in cli.py
    
  5. See files in the data directory

finx-reports-ib's People

Contributors

westonplatter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

finx-reports-ib's Issues

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.