Skip to main content

Algorithmic Trading Library by East Empire Trading Company.

Project description

EETC Algo Trading

Description

Algorithmic Trading Python Library by EETC.

This library simplifies writing and running algorithmic trading bots. It integrates EETC services for placing orders and receiving live data, allowing the developer to focus solely on implementing the trading algorithm.

How it works

This library connects to EETC Data Feed and receives live data via ZeroMQ. To place orders for Stocks, Options, Crypto, etc. this library communicates with EETC Order Manager via ZeroMQ.

Example code:

from eetc_algo_trading import EETCTradingBot


def algorithm(bot_instance, topic=None, manual_trigger_details=None):
    bot_instance.algorithm_lock = True  # kinda "obtain" lock
    if topic:
        print("Executing Strategy for Topic: {}".format(topic))
        # whatever logic
    elif manual_trigger_details:
        print("Executing Strategy Manually...")
        print("Request data:", manual_trigger_details)
        # whatever logic
    else:
        print("Executing Strategy...")
        # whatever logic

    bot_instance.algorithm_lock = False  # kinda "release" lock


bot = EETCTradingBot(
    algorithm=algorithm,
    eetc_api_key="rAnDoMaPiKeyProvidedbyEETC",
    data_feed_topics=["candles:BTC/USD:1m"],
    trigger_on_topics=["candles:BTC/USD:1m"],
    allow_remote_triggering=False,
)

bot.start()

The only thing a developer needs to do is write the "algorithm" function and pass it to the EETCTradingBot during initialization.

Order management

It is entirely up to the developer to implement their own order management logic. EETC Order Manager provides various APIs where clients can get order information and receive real-time updates.

The most common tactic is to write a helper function for managing orders which will be executed within the algorithm function.

This approach may not be the most user-friendly, but it was chosen because it gives the developer absolute freedom for writing their strategy, which includes order management.

Manual execution via ZeroMQ

Strategies can be triggered either manually via ZeroMQ by sending a request via REQ-REP sockets. What information you put inside this request and how you process it is entirely up to you. One simple use case for this might be when one algorithm is not sure about a trading decision, it can call another algorithm which may be able to do that.

Event-based execution

Strategies can also be triggered whenever a certain kind of data signal comes in (topic). For example on each "candles:BTC/USD:1m" signal, execute the strategy.

Scheduled execution

Coming soon...

System Requirements

Installation

Licence

This project is licensed under GNU Public License.

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

eetc-algo-trading-lib-0.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

eetc_algo_trading_lib-0.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file eetc-algo-trading-lib-0.2.tar.gz.

File metadata

  • Download URL: eetc-algo-trading-lib-0.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for eetc-algo-trading-lib-0.2.tar.gz
Algorithm Hash digest
SHA256 bc2aeea51743cc9b667d6b817f23b15b48e770c4f2cd426f42b2a43603c2bf66
MD5 8a5a731afa75f10620fbbf57b7dc280a
BLAKE2b-256 f7c75269e938f1a66d4a87917f9a7ab7efc6a1fb5fbd56c01e1407397c4215bc

See more details on using hashes here.

File details

Details for the file eetc_algo_trading_lib-0.2-py3-none-any.whl.

File metadata

  • Download URL: eetc_algo_trading_lib-0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for eetc_algo_trading_lib-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04636ff828209c333a8c8593f3269c54e5b7e6682688ef5724d6b86087ca5b05
MD5 ca2ca03995d22ad2b671790c9c5e2d7a
BLAKE2b-256 31c4963adca534c8ca233c1ad62ff05e83f5fb51f310721a13348826860299f0

See more details on using hashes here.

Supported by

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