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 xtrading_models import MarketOrder, LimitOrder, BarData, UNSET_DOUBLE

# 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.5.0.tar.gz (9.8 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.5.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file xtrading_models-0.5.0.tar.gz.

File metadata

  • Download URL: xtrading_models-0.5.0.tar.gz
  • Upload date:
  • Size: 9.8 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.5.0.tar.gz
Algorithm Hash digest
SHA256 335deaa6604c32987af31de9b38a2e285e7e08244b3d76c4527d4322f5cfbc3a
MD5 5c24f415d7e6b4d12fafd124eff33979
BLAKE2b-256 fcc4bbc1fc796b6c347d4e2f50816177ed335bcfd28827cf5272069b3f5b2704

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xtrading_models-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a75c9d933036aff6fc32eda5af04a9d4b3cf39d53886e5d249c76b8131df78c
MD5 d420f684334e4b65a28dc5bd453d52ad
BLAKE2b-256 d7d84b9a166587cac6fa2c740c20fcb6b55ec6ad2f2306356a815037f2be49f2

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