Skip to main content

paca

Check asset status using Alpaca Broker API

paca example screenshot

Requirements

Setup

  1. Install paca using pip:
    pip install paca
  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. paca can be used with Alpaca paper accounts by setting APCA_API_BASE_URL=https://paper-api.alpaca.markets. Refer to Alpaca Environment Variables.

Usage

usage: paca [-h] [-a] [-e] [-ex] [-f] [-i] [-m] [-n] [-s] [-st] [-sy] [-t] [-v] ASSET

Check asset status using Alpaca Broker API

positional arguments:
  ASSET                 Ticker of asset to check

optional arguments:
  -h, --help            show this help message and exit
  -a, --asset-class     Class of asset: us_equity or crypto
  -e, --easy-to-borrow  Easy-to-Borrow or Hard-to-Borrow status
  -ex, --exchange       Exchange asset is available on
  -f, --fractionable    Fractionable status
  -i, --id              ID of asset
  -m, --marginable      Marginable status
  -n, --name            Full name of asset
  -s, --shortable       Shortable status
  -st, --status         Status of asset: active or inactive
  -sy, --symbol         Symbol/ticker
  -t, --tradable        Tradable status
  -v, --version         show program's version number and exit

Examples

> paca AAPL
Class: us_equity
Easy-to-Borrow: True
Exchange: NASDAQ
Fractionable: True
ID: b0b6dd9d-8b9b-48a9-ba46-b9d54906e415
Marginable: True
Name: Apple Inc. Common Stock
Shortable: True
Status: active
Symbol: AAPL
Tradable: True

> paca -est DNUT
Easy-to-Borrow: False
Shortable: False
Tradable: True

Related

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

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/paca

License

MIT

Metadata

Release files for paca 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 paca 0.1.0
File Size Uploaded
paca-0.1.0.tar.gz 4.4 kB Details

Built distribution (wheel)

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

Total release size: 9.7 kB

Release files / paca-0.1.0.tar.gz

Download URL paca-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
021c4dd0b35502f888b486f7ae102822e1dd1504a5611f1c3b34a6b4e64cc8ae
BLAKE2b-256 checksum
How to use checksums
5c3d2a28fecd7ec87dc4852e3e407f54f3bee0f8b9a14ef67cbdc931240dcabd
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 / paca-0.1.0-py3-none-any.whl

Download URL paca-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c079f86334c8fa2f3226aaaf163c8a1164151db1c740ea0a0cbf39478eddeb3
BLAKE2b-256 checksum
How to use checksums
373fd96350e2553b9881a2280747021a6e9a301ba86ebc5191868b4c35209340
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 history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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