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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: stsdk-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a03aaa308a5b5add7f66b8c181ff097615ac5ecadc06f2a86b4f1a826b199cec
MD5 14a83b06903f6e0b65cbb3dfde592495
BLAKE2b-256 50dd2f4227e39ee96a6840a15fa6633ec2a851056430d7db9ea4e3c154f716f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stsdk-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e61f008c92810d5a3f6c81032f270e4283df1b6ed94a2f7b0dc2bf6e7aa2f4d
MD5 8be1e6d3ef3001cf59f4a04f7bc1cc3f
BLAKE2b-256 14d7d68e04007c41f31dcc6bcdbec51d8afb05e3eb863a35a607ad3a61ee9c8c

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