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 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=100.00,
high=105.00,
low=99.00,
close=104.00,
volume=1000000
)
Models
- Order classes:
Order,LimitOrder,MarketOrder,MarketOnCloseOrder,StopOrder,StopLimitOrder,TrailingStopMarket,TrailingStopLimit - Trade lifecycle:
Trade,OrderStatus,TradeLogEntry - Bar data:
BarData- OHLCV candlestick representation;is_close_bar: boolmarks the last bar of a trading session (used by MOC order execution) - Execution:
Execution,CommissionReport,Fill - 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.10.0.tar.gz
(10.5 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.10.0.tar.gz.
File metadata
- Download URL: xtrading_models-0.10.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da6d89fa4cd46e06441214aa3abbb90cadbaf541436dcf28e2fb84516ba0805
|
|
| MD5 |
49f1401074e0c345dfa7f41ee9cf68e1
|
|
| BLAKE2b-256 |
b31185593828505aa1cb58ef9ca9a0b60e462a4d369366634f9ec2dea088170f
|
File details
Details for the file xtrading_models-0.10.0-py3-none-any.whl.
File metadata
- Download URL: xtrading_models-0.10.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aac7e6ddb55daf839e94b7dba2a24727d1177ed4dd9e6ba12d02cc43231771b
|
|
| MD5 |
b8c245aeb4f0a3124117b72bccf7c839
|
|
| BLAKE2b-256 |
d5d73a486665cf8bf9f6625e9c418ec6268569726f2bf09655f013b7860d0995
|