-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
138c302
commit d58739b
Showing
15 changed files
with
92 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ CZCE 郑州商品交易所 | |
CFFEX 中国金融交易所 | ||
INE 上海能源中心(原油在这里) | ||
KQ 快期 (所有主连合约, 指数都归属在这里) | ||
KQD 快期外盘主连合约 | ||
SSWE 上期所仓单 | ||
SSE 上海证券交易所 | ||
SZSE 深圳证券交易所 | ||
|
@@ -52,6 +53,8 @@ GFEX 广州期货交易所 | |
[email protected] - 中金所IF品种主连合约 | ||
[email protected] - 上期所bu品种指数 | ||
|
||
[email protected] - 美黄豆主连 | ||
|
||
SSWE.CUH - 上期所仓单铜现货数据 | ||
|
||
SSE.600000 - 上交所浦发银行股票编码 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
setuptools.setup( | ||
name='tqsdk', | ||
version="3.4.11", | ||
version="3.5.0", | ||
description='TianQin SDK', | ||
author='TianQin', | ||
author_email='[email protected]', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '3.4.11' | ||
__version__ = '3.5.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!usr/bin/env python3 | ||
# -*- coding:utf-8 -*- | ||
__author__ = 'yanqiong' | ||
|
||
import hashlib | ||
|
||
from tqsdk.tradeable.otg.base_otg import BaseOtg | ||
from tqsdk.tradeable.mixin import FutureMixin | ||
|
||
|
||
class TqZq(BaseOtg, FutureMixin): | ||
"""众期账户类""" | ||
|
||
def __init__(self, account_id: str, password: str, td_url: str) -> None: | ||
""" | ||
创建众期账户实例 | ||
Args: | ||
account_id (str): 帐号 | ||
password (str): 密码 | ||
td_url (str): 众期交易服务器地址, eg: "ws://1.2.3.4:8765/" | ||
Example1:: | ||
from tqsdk import TqApi, TqZq | ||
account = TqZq(user_name="众期账户", password="众期密码", td_url="众期柜台地址") | ||
api = TqApi(account, auth=TqAuth("快期账户", "账户密码")) | ||
""" | ||
super(TqZq, self).__init__(broker_id="", account_id=account_id, password=password, td_url=td_url) | ||
|
||
def _get_account_key(self): | ||
s = self._account_id + self._td_url | ||
return hashlib.md5(s.encode('utf-8')).hexdigest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters