Skip to main content

simple_metrics for Robinhood

Simple, humble, and direct metrics applied to Robinhood trades.

example

from simple_metrics import fetch, export

account = {
        'username': 'my username',
        'password': 'my password'}

#
# export stock trades to -> stock_orders.csv
#
stock_orders = fetch.stock_trades(account, {})
export.stock_orders(stock_orders, {})

#
# export -> option_orders.csv
#
option_orders = fetch.option_orders(account, {})
export.option_orders(option_orders, {})

install

pip install simple_metrics --process-dependency-links

The package uses a forked version of Robinhood, hence the need for --process-dependency-links.

package api

Functionality includes:

  • Fetch Stock order history
  • Fetch Option order history
  • Export Stock order history
  • Export Option order history

command line usage

config

in an account.ini file, provide username and password

['account']
username = my_username
password = my_password

cli commands

export

# stocks
sm export_history --trades stock
# options
sm export_history --trades option

local development

Git clone this repo and run,

pip install . --process-dependency-links --editable

Adding --editable allows you to pull in code changes without having to run pip install.

Metadata

Release files for simple-metrics 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for simple-metrics 0.1.7
File Interpreter ABI Platform
simple_metrics-0.1.7-py3-none-any.whl Python 3 none any Details

Release files / simple_metrics-0.1.7-py3-none-any.whl

Download URL simple_metrics-0.1.7-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5a77014dd70ea1a6e4eb666a8ba38756c0f36e5bb69de2402e7d80d434c12a6
BLAKE2b-256 checksum
How to use checksums
c40fb4db995f5711ecd993a6f7d65491ea868f28d453f2af241fb2e99492c8da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.1

Release history Release notifications | RSS feed

This release

0.1.7 This release

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page