Shared trading models for XTrading ecosystem
Project description
xtrading-models
Shared trading models for the XTrading ecosystem.
Installation
pip install xtrading-models
Usage
from datetime import datetime
from decimal import Decimal
from xtrading_models import MarketOrder, LimitOrder, BarData
# Create a market order
order = MarketOrder(action='BUY', totalQuantity=100)
# Create bar data
bar = BarData(
date=datetime.now(),
open=Decimal('100.00'),
high=Decimal('105.00'),
low=Decimal('99.00'),
close=Decimal('104.00'),
volume=1000000
)
Models
- Order classes:
Order,LimitOrder,MarketOrder,StopOrder,StopLimitOrder,TrailingStopMarket,TrailingStopLimit - Bar data:
BarData- OHLCV candlestick representation - Execution:
Execution,CommissionReport,Fill - Results:
ExecutionResult - Sentinels:
UNSET_DOUBLE,UNSET_INTEGER
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xtrading_models-0.6.0.tar.gz
(9.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xtrading_models-0.6.0.tar.gz.
File metadata
- Download URL: xtrading_models-0.6.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aadc7d203020c5bb98aa53d12fe6754167188233225b913920f7ca8e24beb01
|
|
| MD5 |
f35c8877ae3a8b3c2763a0845e5a1b2f
|
|
| BLAKE2b-256 |
779c6e1764c261bb8d94f2868c0e15f72922b0ce96015f926d2e4036db6f3850
|
File details
Details for the file xtrading_models-0.6.0-py3-none-any.whl.
File metadata
- Download URL: xtrading_models-0.6.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efd2caea8482b28c8d04058147d8097f2c21278d1ffe6414d602bc600d4940bb
|
|
| MD5 |
f0f1bf3e41a15f8c6c915808efe2bdae
|
|
| BLAKE2b-256 |
21df9c6ff4c468d1dcd0d155e8922037f15d63be231ddefb34cab6ab2315759b
|