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.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

stsdk-0.1.2-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stsdk-0.1.2.tar.gz
  • Upload date:
  • Size: 15.7 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.2.tar.gz
Algorithm Hash digest
SHA256 fee8c08c5c5980cccbf458066b8c47055ca4765d3d5169cb05e2b9788ba34052
MD5 a8ba0568083562f7d43e807e1b1610d0
BLAKE2b-256 9d919df3f2f004e295e8525891e67b737f85ef5a1bf2b5ac00dd6d09205098d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stsdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 25.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bcce5298d738f41ce35876eecd0b6f76a711d9b03ad06095a797d3eaebd16c04
MD5 8c4e0eb12b8ad3f59f7fce7eccf321ac
BLAKE2b-256 b32fb88331b3340f46e2323d1fc056cdc740684f63c1ac92ad420c541ef0ae3b

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