Skip to main content

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.

Authentication

To be able to receive data or execute trades, an API key is needed, which will be provided to you by EETC. Although this library is open-sourced, nobody who isn't a client of EETC will be able to use the services that this library uses without the API key.

To become a client and obtain your API key, please contact us at: eastempiretradingcompany2019@gmail.com

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

Development

Licence

This project is licensed under GNU Public License.

Release files for eetc-algo-trading-lib 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eetc-algo-trading-lib 0.2.1
File Size Uploaded
eetc-algo-trading-lib-0.2.1.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eetc-algo-trading-lib 0.2.1
File Interpreter ABI Platform
eetc_algo_trading_lib-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / eetc-algo-trading-lib-0.2.1.tar.gz

Download URL eetc-algo-trading-lib-0.2.1.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a6eaa0e95dac714219396068e03794ae8c33c4d7c3dd11c589a41ba772abf195
BLAKE2b-256 checksum
How to use checksums
051b5e6fdf38562c353cfa8e218f2267fb31094fcea80b58effaea3ce520ee08
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / eetc_algo_trading_lib-0.2.1-py3-none-any.whl

Download URL eetc_algo_trading_lib-0.2.1-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a8c3bb8c30c6e4a77f2a41168270035dec0dc9c92a9bebb4177063e96b17734
BLAKE2b-256 checksum
How to use checksums
ec63389c5f8d2ace2c1b42b9dc75e03e9d4a77b10f6af6eef9c7819cf808c16e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page