Socket
Socket
Sign inDemoInstall

shortable

Package Overview
Dependencies
2
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    shortable

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


Maintainers
1

Readme

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

  • Python 3
  • winotify
  • alpaca-trade-api

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

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc