Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xtrading_models-0.6.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

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

Hashes for xtrading_models-0.6.0.tar.gz
Algorithm Hash digest
SHA256 4aadc7d203020c5bb98aa53d12fe6754167188233225b913920f7ca8e24beb01
MD5 f35c8877ae3a8b3c2763a0845e5a1b2f
BLAKE2b-256 779c6e1764c261bb8d94f2868c0e15f72922b0ce96015f926d2e4036db6f3850

See more details on using hashes here.

File details

Details for the file xtrading_models-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xtrading_models-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efd2caea8482b28c8d04058147d8097f2c21278d1ffe6414d602bc600d4940bb
MD5 f0f1bf3e41a15f8c6c915808efe2bdae
BLAKE2b-256 21df9c6ff4c468d1dcd0d155e8922037f15d63be231ddefb34cab6ab2315759b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page