Skip to main content

Algomax-CLI

A command line tools for working with EMAX API.

install the package with bellow command:

-> pip install algomax

use bellow command for working with the package:

-> algomax algorithm.py config.json -p params.json -m schedule.json

Example

Here is a simple example of using algomax

algorithm.py

import os
import sys
import json
import math
from order import Order
import utils


def run_algorithm():
    config = utils.get_settings()
    trader_order = Order(config['broker_url'])

    params = utils.get_params()

    # algorithm
    data = fibonacci_algorithm(params['data'])

    # trade
    trader_order.create(data)


def isPerfectSquare(number: int): 
    squrare_number = int(math.sqrt(number)) 
    return squrare_number * squrare_number == number 


def isFibonacci(number): 
    return isPerfectSquare(5 * number * number + 4) or isPerfectSquare(5 * number * number - 4) 


def fibonacci_algorithm(data: dict):
    qunatity = data['quantity']
    if isFibonacci(qunatity):
        qunatity += 3
    else:
        qunatity -= 3

    data['quantity'] = qunatity
    return data

if __name__ == '__main__':

    run_algorithm()

config.json

{
    "broker_url": "http://your-broker.server",
    "access_token": "YoUr-ToKeN",
    "account_id": "your-account-id"
}

params.json (your algorithm data)

{
    "data": {
        "agent_id": "2",
        "side_id": "1",
        "instrument_id": "instrument-id",
        "price": 1234.0,
        "quantity": 1934,
        "validity_type_id": "1",
        "validity_date": ""
    }
}

mode.json (scheduling)

{
    "mode": "interval",
    "schedule": {
        "start_date": "2019-09-22",
        "end_date": "2019-10-23",
        "minutes_interval": 1,
        "start_time": "8:30",
        "end_time": "13:00"
    }
}

Caution: utils.py, order.py -> use algomax-engine package, but it's not ready yet ;)

Metadata

Release files for algomax 0.3.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 algomax 0.3.1
File Size Uploaded Provenance Actions
algomax-0.3.1.tar.gz 6.1 kB Without provenance Details for algomax-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for algomax 0.3.1
File Interpreter ABI Platform Actions
algomax-0.3.1-py3-none-any.whl Python 3 none any Details for algomax-0.3.1-py3-none-any.whl

Total release size: 13.8 kB

Release files / algomax-0.3.1.tar.gz

Download URL algomax-0.3.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
efa553be44fc2f626fa90791b32a1f2f2cae0b3ec57c577dc2874d92bee4a45b
BLAKE2b-256 checksum
How to use checksums
0db1679036afb5ef9d802660d4c7b3751609b720f027be6f79e074eaed6c4ba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / algomax-0.3.1-py3-none-any.whl

Download URL algomax-0.3.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b46c527e7a45990ea41f2c02a56503a76cd2d2420a885a7a42537c098cf4bfd4
BLAKE2b-256 checksum
How to use checksums
5918d43121378a87cea931ab4033a187c9690adb956a5586755314930c528014
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Security for algomax 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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