Liberal Alpha Python SDK for interacting with gRPC-based backend
Project description
📖 Usage Example (English) 1️⃣ Initialize the SDK You can initialize the SDK using default parameters:
from liberal_alpha import initialize, liberal
initialize() Or customize the parameters:
initialize(host="127.0.0.1", port=8128) 2️⃣ Send Data
JSON_Object = { "Price": 100000, "Volume": 50, "Volume_USD": 5000000, }
liberal.send_data("BTC_SOURCE1", JSON_Object, record_id="1") 3️⃣ Send Alpha Signal
alpha_data = { "signal": "buy", "confidence": 0.85 }
liberal.send_alpha("Alpha_ID", alpha_data, record_id="1") 4️⃣ Subscribe to Data If you need to subscribe to real-time data, use the subscribe_data method. Make sure you have subscribed to the desired records via the website's Subscribe Channel.
liberal.subscribe_data( api_key="YOUR_API_KEY", base_url="http://your-backend-url", private_key="YOUR_PRIVATE_KEY", # Optional, used for decrypting messages record_id=1, # Subscribe to a specific record; omit to subscribe to all subscribed records max_reconnect=5 ) Ensure that your API Key and private key are correct, and that you have subscribed to the data you wish to receive in the website's subscribe channel.
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 liberal_alpha-0.1.5.tar.gz.
File metadata
- Download URL: liberal_alpha-0.1.5.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1932898a111a18189ed3334eb5da1964b6c6538075e589ccb90bad3cadc5fdce
|
|
| MD5 |
6682b6fea2c56834de58ea0a29b6063c
|
|
| BLAKE2b-256 |
7158a410ef79222d4c3711ffb70b8c04838468a8da4e4266e5103053d5bea589
|
File details
Details for the file liberal_alpha-0.1.5-py3-none-any.whl.
File metadata
- Download URL: liberal_alpha-0.1.5-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0925bcb53cf87ac474dc25fc4e2bf3785f7875e64d19219a84de4af611961d48
|
|
| MD5 |
ed11adbef33e23ca5bd4c46190adc3bb
|
|
| BLAKE2b-256 |
978091d6d37af975d540b2f2617f8083b3cb4bb12cced1611fe498bb7545c4f8
|