# Package User Zone
Give this package a star if you like it!
## Installation
```bash
pip install python-ftx
```
## Sample Code
### Restful Api
> API and SECRET should be assgin with your api key and secret key.
```python
from ftx import Client
import os
API = os.getenv("API")
SECRET = os.getenv("SECRET")
client = Client(API, SECRET)
info = client.get_markets()
print(info)
```
### Websocket
> API and SECRET should be assgin with your api key and secret key.
```python
from ftx import ThreadedWebsocketManager
def on_read(payload):
print(payload)
API = os.getenv("API")
SECRET = os.getenv("SECRET")
wsm = ThreadedWebsocketManager(API, SECRET)
wsm.start()
# Un-auth subscribe
name = 'market_connection'
wsm.start_socket(on_read, socket_name=name)
wsm.subscribe(name, channel="ticker", op="subscribe", market="BTC/USDT")
# Auth subscribe
name = 'private_connection'
wsm.start_socket(on_read, socket_name=name)
wsm.login(socket_name=name)
wsm.subscribe(
name,
channel="fills",
op="subscribe",
)
```
### Subaccount create
```
clinet = Client(API, SECRET, "Subaacount_name")
wsm = ThreadedWebsocketManager(API, SECRET, "Subaccount_name")
```
# Developer Zone
## Lint
```bash
$ make lint
```
## Donation
**I put dontaion address here because all open source Crypto API did. It seems unprofessional if I don't**
ETH:0xB32A3CbEaD5667e026CCEC7118b132DCA349A8e6
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共18个文件
py:9个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:python-ftx-0.1.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
python-ftx-0.1.0.tar.gz (18个子文件)
python-ftx-0.1.0
PKG-INFO 384B
ftx
threaded_stream.py 2KB
authentication.py 574B
enums.py 737B
timer.py 447B
client.py 7KB
streams.py 11KB
__init__.py 271B
exceptions.py 539B
setup.cfg 79B
python_ftx.egg-info
PKG-INFO 384B
requires.txt 35B
SOURCES.txt 360B
top_level.txt 4B
dependency_links.txt 1B
zip-safe 1B
setup.py 630B
README.md 1KB
共 18 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功