Giter Site home page Giter Site logo

tdcli's Introduction

tdcli lets you export transactions from your TD Direct Investing account.

Issues

  • fixup stock symbols properly (not just wholesale prepending of LON:)
  • requires a 100x as TD exports pounds, Google finance imports pence
  • prompt for password

Pre-flight

tdcli requires Perl 5.14 or higher and the following libraries:

Start off by fetching the source which requires you to have git installed on your workstation:

git clone https://github.com/jimdigriz/tdcli.git
cd tdcli

Debian

sudo apt-get update
sudo apt-get install -yy --no-install-recommends perl libconfig-tiny-perl libwww-mechanize-perl liburi-perl libjson-perl libdate-calc-perl libtext-csv-perl libhtml-parser-perl

Configuration

You need to create a configuration file with your account details in it:

mkdir ~/.tdcli
chmod 0700 ~/.tdcli

cp example.config ~/.tdcli/config
chmod 0600 ~/.tdcli/config

Now edit the file ~/.tdcli/config:

  • debug [optional]: if set to anything (not commented out) then the HTTP requests will be printed to STDERR
  • from [optional]: include your e-mail address in the HTTP requests made
  • user: your login
  • pass: your password
  • stepup section: your memorable word, year and place goes here which is used to authenticate you from a new workstation

N.B. after running this tool, you will find acct is added, you should not edit this

Usage

Just running the tool with no parameters will list your accounts:

$ ./tdcli
Accounts (01234567890):
 * 1234567 {ISA}: isa
 * 0987654 {TRADING}: trading

To download a copy of your transactions you can use (this can take minutes to complete!):

$ ./tdcli -a 1234567 -T -f 2013-01-01 -t 2015-04-01 | tee transactions.csv

N.B. periods longer than 18 months are supported

The tool has some basic built in help to show and explain its functionality:

$ ./tdcli --help
./tdcli version 0.1 calling Getopt::Std::getopts (version 1.06),
running under Perl version 5.14.2.
Usage: ./tdcli [ -h | -v | -a 1234 [ -P | -T [ -f YYYY-MM-DD ] [ -t YYYY-MM-DD ] ] ]
Export transactions from your TD Direct Investing account.

  -a ID                    select account number

  -P                       output CSV of portfolio

  -T                       output CSV of transactions
  -f YYYY-MM-DD            transactions from date (default: first of current month)
  -t YYYY-MM-DD            transactions until date (default: today)

  --help                   display this help and exit
  --version                output version information and exit

tdcli's People

Contributors

jimdigriz avatar

Watchers

 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.