QMT trading SDK with WebSocket (Centrifugo) integration
Project description
Stock Platform SDK
QMT trading SDK with WebSocket (Centrifugo) integration.
Installation
pip install stock-platform-sdk
Usage
from stock_platform_sdk import configure, init
# Step 1: Configure connection
configure(
access_key="your_access_key",
secret_key="your_secret_key",
strategy_name="my_strategy",
backend_url="http://localhost:8888", # optional
centrifugo_url="http://localhost:8000" # optional
)
# Step 2: Initialize in QMT strategy
def init(C):
from stock_platform_sdk import init as sdk_init
sdk_init(C)
API
configure(access_key, secret_key, strategy_name, ...)- Set connection parametersinit(C)- Initialize SDK with QMT ContextInfoget_config()- Get current configurationcreate_websocket_handler(access_key, secret_key, strategy_name)- Create WebSocket handler
Constants
from stock_platform_sdk import constants
constants.OrderStatus.FILLED # 56
constants.TradeConfig.BUY_PRICE_MULTIPLIER # 1.012
constants.ChannelPrefix.make_trade_channel("my_strategy") # "trade:my_strategy"
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
stock_platform_sdk-0.1.0.tar.gz
(21.1 kB
view details)
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 stock_platform_sdk-0.1.0.tar.gz.
File metadata
- Download URL: stock_platform_sdk-0.1.0.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4585b86e7b2dc56768ed40cdfe9b572950f55e569bef367b743e941533206b3c
|
|
| MD5 |
3f22d597e14c25b53e69ecae33d360e9
|
|
| BLAKE2b-256 |
8f3a69d30013df8153d8f9a6bce0037bd3e5b6321c8eef8a7b7e2d6bad52103e
|
File details
Details for the file stock_platform_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stock_platform_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b075dabfb13c69cc376e573fe3df1d6cfb3b951a2e71690e2a343f090ae4e51
|
|
| MD5 |
eafbf9743bd807908cbb1cb43516ec9d
|
|
| BLAKE2b-256 |
da4f7f82ab2bd411ea0fe17d189d2642c4c792cabb7dbdae47b92b371f2e25d1
|