Skip to main content

this is for at trade strategy module

Project description

st-sdk

提供给Strategy Module使用的python sdk。

设计架构

  1. utils:是最底层的一些封装,对于http,websocket做一些集成性的封装,包括intercept之类的拦截器实现。
  2. api: 基于封装的request代码,对接oms,dms对应的接口和websocket封装
  3. model:设计strategy module,order manager,position manager等对策略曝光的最上层模块
  4. config:一些常用的配置项
  5. common:主要存放constant和error等常量
  6. test:python测试文件目录

开发配置

开发流程

设计细节

cache设计

每一个key会对应一个map,map中的cache是用户订阅参数产生的topic,然后创建出来的自定义数据。

举个例子:

  1. BBO MAP数据:是一个以bbo_cache作为key的map。

当我们订阅一个topic: BBO.EXCHANGE_BINANCE.ETH-USDT.SECURITY_TYPE_PERP.CONTRACT_TYPE_LINEAR.USDT.UNSPECIFIED的数据,那么这个时候这个topic就是新的map的一个key,这个里面会存放最近10条数据(默认配置10条数据)

指令设计

  • 仅支持placeOrder和cancelOrder两个指令

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stsdk-0.1.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

stsdk-0.1.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file stsdk-0.1.0.tar.gz.

File metadata

  • Download URL: stsdk-0.1.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/5.15.0-71-generic

File hashes

Hashes for stsdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4095ad9ca80e842b9ab8083c06bc1cc6d1d5d4b701581376808774d37b7dd116
MD5 d560f555b53f49096569d43febe43086
BLAKE2b-256 1ef23c232d16f0c5eb91aaa3f73204f1e9614cdc78865e4f2bd2eb76912f8355

See more details on using hashes here.

File details

Details for the file stsdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stsdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.10.12 Linux/5.15.0-71-generic

File hashes

Hashes for stsdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ded9004b6620f61fdaf24eb74b136e20a538f9406c52f2a97ca602539ab9b838
MD5 f58614fc5b690af93b12e95a796b74b1
BLAKE2b-256 0bc34d0d8169fae77fa315271e917d474d2de981eafca4a178ee9025d71e054a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page