Skip to main content

Tradologics Python SDK

This is the initial version of Tradologics’ Python SDK.

At the moment, it only supports a wrapper for the awesome requests library that will automatically:

  • prepend the full endpoint url to your calls

  • attach your token to the request headers

  • add datetime to your order when in backtesting mode

Install using PyPi

$ pip3 install -U tradologics

Using the library:

In your requirements.txt:

tradologics

In your code:

# import Tradologics' requests
import tradologics.requests as requests

# set your token (once)
requests.set_token("MY TOKEN")

# from this point - use is just like you would have used `reqeuests`:
requests.post("/orders", json={
    ...
})

Running your own server:

Assuming that strategy.py (your strategy file) is located in the same directory as your server.py file (your Tradehook’s handler file), and that strategy.py has a main function called strategy:

# server.py

from tradologics import server

#-------------------------------
# ↓ this should be a file with your strategy code
from . import strategy
#-------------------------------

server.start(strategy, endpoint="/my-strategy",
             host="0.0.0.0", port=5000, debug=False)

Metadata

Release files for tradologics 0.0.22

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

Source distribution (sdist)

Source distribution for tradologics 0.0.22
File Size Uploaded Provenance Actions
tradologics-0.0.22.tar.gz 10.4 kB Without provenance Details for tradologics-0.0.22.tar.gz

Built distribution (wheel)

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

Total release size: 23.3 kB

Release files / tradologics-0.0.22.tar.gz

Download URL tradologics-0.0.22.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6dc94b756356556c1f5140fa429047f06d4253a8615294bb79202965b27ca875
BLAKE2b-256 checksum
How to use checksums
70574b4928f9575b075d611a042ec51e9f247c05f67c24dae37f56489440c82e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / tradologics-0.0.22-py3-none-any.whl

Download URL tradologics-0.0.22-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2276da1f0f84aa571d22fd311da39f8d16b65e920bd879f9863d83624905f0ca
BLAKE2b-256 checksum
How to use checksums
d37bd8d6c950011e1b94e32cb7f661116f68067ef04e17c071f471b3fcc7cf84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Security for tradologics 0.0.22

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