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.7.0.tar.gz
(10.2 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.7.0.tar.gz.
File metadata
- Download URL: xtrading_models-0.7.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13119bf22a5925dcd98cbbab24845cbf486ccb6c5cc60c61756f151c4cf8e122
|
|
| MD5 |
ab2da9ab123d9c54a0efa82e1121e7d7
|
|
| BLAKE2b-256 |
7415dba49601a71cf034a6864b4c70578da09cb445483049f7576fedebdcf9e8
|
File details
Details for the file xtrading_models-0.7.0-py3-none-any.whl.
File metadata
- Download URL: xtrading_models-0.7.0-py3-none-any.whl
- Upload date:
- Size: 6.7 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 |
35af5e4132248ea1aaafaa7c595f32f227cf78c0149c6ee9c656a3c94e6ab106
|
|
| MD5 |
df1b771c71c7a6f658210870e2dd77df
|
|
| BLAKE2b-256 |
a51708ee476705e22b2d7ea123e55a1623174faecac7a48156c406c2f0facf6e
|