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,StopOrder,StopLimitOrder,TrailingStopMarket,TrailingStopLimit - Trade lifecycle:
Trade,OrderStatus,TradeLogEntry - Bar data:
BarData- OHLCV candlestick representation - 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.8.0.tar.gz
(10.1 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.8.0.tar.gz.
File metadata
- Download URL: xtrading_models-0.8.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9285fcd12e796a2adf9725207b828ccf4f36a8ecd60871bee2386300930ba2db
|
|
| MD5 |
65176c183241a6552994eecabd736f0f
|
|
| BLAKE2b-256 |
d40addddefd90aaaef66849a109b809f7c3e7a9a659be5cbeb048944e48ea39f
|
File details
Details for the file xtrading_models-0.8.0-py3-none-any.whl.
File metadata
- Download URL: xtrading_models-0.8.0-py3-none-any.whl
- Upload date:
- Size: 6.6 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 |
4dfbf44a25067505a28f13c33d58c3ebccb4d75bc9ddbd9d8be85d565ee4789d
|
|
| MD5 |
222c1819f40e1e39133b82fa2ac3a492
|
|
| BLAKE2b-256 |
35e99f38fd33200565487e8ce970720fbbe817222b3fadd776b84a2817d38c21
|