Tradologics SDK
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tradologics-0.0.14.tar.gz.
File metadata
- Download URL: tradologics-0.0.14.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41772db728c5e072ce2791b69501eebec1746669df85698033fe068c740ab523
|
|
| MD5 |
2e8a7b2de89a4d4d8120a0dd07fef1ba
|
|
| BLAKE2b-256 |
25adbe3bf1cb2d01caccdbe782b12420d58e4ac1e447b2932ed5e80dbf69626a
|
File details
Details for the file tradologics-0.0.14-py3-none-any.whl.
File metadata
- Download URL: tradologics-0.0.14-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2dd37afdb63802f30c20decfc9e9acea1acff3f17da3a7371b19e1d25fc7eb1
|
|
| MD5 |
f5e9a9c6614e570ca648ab73edd94213
|
|
| BLAKE2b-256 |
7205385055dd627a22729f9d0e3a5c1ca555795d22f145e27dd60411f5e638e8
|