Skip to main content

shortable

Receive an alert if an asset becomes shortable, e.g. from HTB to ETB, or vice versa

shortable notification

shortable action center

Summary

shortable is a Python script for tracking the short selling availability of assets. The script works by maintaining a database of assets and their shorting availability (either true, shortable, easy-to-borrow (ETB) or false, non-shortable, hard-to-borrow (HTB)). When the script notices the asset shortable condition has changed since the last run, it notifies the user with a Windows 10 toast notification. This may be helpful in quickly acting on ETB or HTB changes of assets or gauging market sentiment. The script currently only supports the Alpaca Securities broker but could be expanded to other brokers that have API access.

Requirements

Setup

  1. Install shortable using pip:
    pip install shortable
  1. Create API keys using the Alpaca dashboard. Refer to Alpaca's API v2 and API Documentation for more details.
  2. Set environment variables APCA_API_KEY_ID and APCA_API_SECRET_KEY for the Windows user account. shortable can be used with Alpaca paper accounts by setting APCA_API_BASE_URL=https://paper-api.alpaca.markets. Refer to Alpaca Environment Variables.

Usage

  1. Define assets to track in shortable.json e.g. {"AMZN": true, "MSFT": true, "TSLA": false}.
  2. Run shortable from the same directory as shortable.json. When there are no asset shortable changes there is no output or notification. Check shortable.log to verify operation.
  3. Optionally schedule shortable to run routinely using Windows Task Scheduler.

Files

shortable.json

Dictionary database for recording asset shortable status. Save in the directory you intend to run shortable from. Use JSON format such as follows:

{"AMZN": true, "MSFT": true, "TSLA": false}

shortable.log

Log file indicating checks for shortable status, changes to shortable status, and when toast notifications are fired. Automatically created in the same directory from which shortable is run from.

Support

If you find an issue or have any feedback please submit an issue on GitHub.

If you would like to show your support donations are greatly appeciated via:

Author

Robert Gomez, Jr.

Source code

https://github.com/rgomezjnr/shortable

License

MIT

Metadata

Release files for shortable 0.1.0

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

Source distribution (sdist)

Source distribution for shortable 0.1.0
File Size Uploaded Provenance Actions
shortable-0.1.0.tar.gz 5.3 kB Without provenance Details for shortable-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shortable 0.1.0
File Interpreter ABI Platform Actions
shortable-0.1.0-py3-none-any.whl Python 3 none any Details for shortable-0.1.0-py3-none-any.whl

Total release size: 12.2 kB

Release files / shortable-0.1.0.tar.gz

Download URL shortable-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
255bdbe1b61d8b77eab5c0e092530daa5033d6b445f7575011512c66e5ed3649
BLAKE2b-256 checksum
How to use checksums
0ceaf93bf0c5ea85a5885d5d50914af8bb47baf4296ed7625af120b7fa64cbd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.7

Release files / shortable-0.1.0-py3-none-any.whl

Download URL shortable-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69e10bb88be0de10d30aabb8aeddf190a61fb384539f9290794939c1440c29a1
BLAKE2b-256 checksum
How to use checksums
22fd1a2ada80eecce7c44e6457731b1a92e5f3d604179bec9520aac8973316aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.7

Security for shortable 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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