Skip to main content

Unofficial Fennel Invest API

This is an unofficial API for Fennel.com (now) built using the official Fennel API. This project is not affiliated with Fennel.com in any way.

While I try my best to ensure the API is working correctly, it is an ongoing work in progress, so it may have bugs and missing features. Please feel free to contribute!

Important!

Versions prior to 2.0.0 used an unofficial reverse-engineered API that mimicked the Fennel Invest mobile app. With the release of the official API, this library has been updated to use that instead and previous versions are no longer supported or recommended.

Installation

Install with uv:

uv add 'fennel-invest-api>=2.0.0'

Or with pip:

pip install 'fennel-invest-api>=2.0.0'

Usage: Logging In

Generate a new Personal Access Token (PAT) from the Fennel Dashboard.

Then, initialize the Fennel class with your PAT:

from fennel_invest_api import Fennel

fennel = Fennel(pat_token="your-personal-access-token")

Usage: Get Account Info

account_info = fennel.get_account_info()
for account in account_info:
    print(f"Name: {account.name}, Account ID: {account.id}, Type: {account.account_type}")

Usage: Get Account Summary

account_info = fennel.get_account_info()
for account in account_info:
    summary = fennel.get_portfolio_cash_summary(account.id)
    print(f"Account: {account.name}, Portfolio Value: ${summary.portfolio_value:.2f}, Buying Power: ${summary.buying_power:.2f}, Cash: ${summary.cash_available:.2f}")

Usage: Get Stock Holdings

account_info = fennel.get_account_info()
for account_id in account_info:
    positions = fennel.get_portfolio_positions(account_id.id)
    print(f"Positions for account {account_id.name}:")
    for position in positions:
        print(f"{position.symbol}: {position.shares} shares at ${position.value:.2f}")

Usage: Placing Orders

Market order (Default):

order = fennel.place_order(
    account_id=account_id,
    symbol="AAPL",
    shares=1,
    side="BUY"
)
print(order)

Limit order:

order = fennel.place_order(
    account_id=account_id,
    ticker="AAPL",
    quantity=1,
    side="BUY",
    order_type="LIMIT",
    limit_price=150.00,
)
print(order)

Contributing

Found or fixed a bug? Have a feature request? Feel free to open an issue or pull request!

Enjoying the project? Feel free to Sponsor me on GitHub or Ko-fi!

Sponsor ko-fi

DISCLAIMER

DISCLAIMER: I am not a financial advisor and not affiliated with Fennel.com. Use this tool at your own risk. I am not responsible for any losses or damages you may incur by using this project. This tool is provided as-is with no warranty.

Metadata

Release files for fennel_invest_api 2.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 fennel_invest_api 2.1.0
File Size Uploaded Provenance Actions
fennel_invest_api-2.1.0.tar.gz 20.3 kB Without provenance Details for fennel_invest_api-2.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 56.7 kB

Release files / fennel_invest_api-2.1.0.tar.gz

Download URL fennel_invest_api-2.1.0.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cfac1655f9406e6cec79d40bb0a8977157c415e26c58457bb448b3c428f3dcf2
BLAKE2b-256 checksum
How to use checksums
d6e32064929a9bc3959f2ba4efb2c900036a4ed71b839bef64c16d9a0e503373
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fennel_invest_api-2.1.0-py3-none-any.whl

Download URL fennel_invest_api-2.1.0-py3-none-any.whl
Size 36.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c19956092fb94848fd6c97f656146458ffbafa9f25fae80dcbd0ffc7d525d960
BLAKE2b-256 checksum
How to use checksums
ce87cb03a51fddaa0866a0a6d6649f0bb790dec86d66624247df7d1eab55ff03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fennel_invest_api 2.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.

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