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.2.1.tar.gz (23.2 kB view hashes)

Uploaded Source

Built Distribution

stsdk-0.2.1-py3-none-any.whl (42.8 kB view hashes)

Uploaded Python 3

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