Finance Pypeline
A Python framework for managing and executing trading operations across multiple platforms with a focus on reliability and consistency.
Overview
financepype is a modular trading framework designed to:
- Handle multi-platform trading operations
- Manage trading pairs and balances
- Track operations and their states
- Enforce trading rules and validations
- Support both spot and perpetual trading
It is inspired by some of the concepts used in hummingbot, but with a focus on simplicity and flexibility.
Features
- Multi-Platform Support: Seamlessly integrate with both centralized and decentralized exchanges
- Advanced Order Management:
- Support for various order types (Market, Limit)
- Order modifiers (Post-Only, Reduce-Only, IOC, FOK)
- Position management for derivatives trading
- Asset Management:
- Spot trading support
- Perpetual futures trading
- Options trading support
- Blockchain asset integration
- Balance Tracking:
- Real-time balance updates
- Multi-currency support
- PnL tracking
- Trading Rules Engine:
- Customizable trading rules
- Risk management constraints
- Position sizing rules
- Operation Tracking:
- Order state management
- Transaction tracking
- Fee calculation and tracking
Installation
The package requires Python 3.13 or later. You can install it using Poetry:
poetry add financepype
Or with pip:
pip install financepype
Quick Start
Here's a simple example of how to use financepype:
from financepype.assets.factory import AssetFactory
from financepype.platforms.platform import Platform
from financepype.markets.trading_pair import TradingPair
# Initialize platform
platform = Platform(identifier="binance")
# Get assets
btc = AssetFactory.get_asset(platform, "BTC")
usdt = AssetFactory.get_asset(platform, "USDT")
# Create trading pair
trading_pair = TradingPair(name="BTC-USDT")
Development
Setup
- Clone the repository:
git clone https://github.com/gianlucapagliara/financepype.git
cd financepype
- Install dependencies with Poetry:
poetry install
- Set up pre-commit hooks:
poetry run pre-commit install
Testing
Run the test suite:
poetry run pytest
Code Quality
The project uses several tools to maintain code quality:
- Black for code formatting
- isort for import sorting
- mypy for static type checking
- ruff for linting
- pre-commit hooks for automated checks
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for financepype 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| financepype-0.3.5.tar.gz | 268.2 kB | Without provenance | Details for financepype-0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| financepype-0.3.5-py3-none-any.whl | Python 3 | none | any | Details for financepype-0.3.5-py3-none-any.whl |
Total release size: 406.1 kB
Release files / financepype-0.3.5.tar.gz
| Download URL | financepype-0.3.5.tar.gz |
|---|---|
| Size | 268.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8c5ca78bd890980219ed6a991a53db8ee5a9938fc40970a706f2ec6a460b88d
|
|
BLAKE2b-256 checksum How to use checksums |
8d98a1b48b00f8f64633a01108be7037e7e4beac83cb6382621b821a9c6c7197
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / financepype-0.3.5-py3-none-any.whl
| Download URL | financepype-0.3.5-py3-none-any.whl |
|---|---|
| Size | 137.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce401dd8666fb8068773e4b36a808bd3dc332bf0a0ded919dcfe04ae03b6e70a
|
|
BLAKE2b-256 checksum How to use checksums |
052c8d87159e9de64df61d62f3b3da7a32b1638b2888cab72aae13554dc2af33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for financepype 0.3.5
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.