
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
zinvest-trade-api-python
尊嘉证券行情API,用户可以订阅港股、美股实时行情,包含买卖10档盘口与最新价。说明文档:(https://www.zvsts.com/api).
同时尊嘉证券提供免费实时的RESTful交易API。编程语言不限于Python/JS/JAVA/C++/Go等。说明文档:(https://www.zvsts.com/api).
Python 环境:python>=3.6 and python <= 3.9
pip install zinvest-trade-api
一键安装以下依赖包:pip install -r requirements.txt
python-dateutil==2.8.1
msgpack==1.0.2
websockets==8.0
下载zinvest-trade-api-python代码后,进入根目录运行steam_example.py可以查看订阅结果。
python ./stream_example.py
如果自定义开发客户端订阅,把zinvest_trade_api目录引入工程里,可以自行开发。
应用市场搜索下载'尊嘉金融'APP,注册登录获取实时行情订阅权限。
Environment | default | Description |
---|---|---|
ZVST_API_KEY_ID=<key_id> | 尊嘉金融APP用户名 | |
ZVST_API_SECRET_KEY=<secret_key> | 尊嘉金融APP登录密码 |
import logging
from zinvest_trade_api.stream import Stream
log = logging.getLogger(__name__)
async def print_quote(q):
print('quote', q)
async def print_snapshots(s):
print('snapshots', s)
def main():
logging.basicConfig(level=logging.INFO)
stream = Stream(key_id='test', secret_key='test')
stream.subscribe_quotes(print_quote, 'HKEX_00700', 'HKEX_03690')
stream.subscribe_snapshots(print_snapshots, 'HKEX_00700')
stream.run()
if __name__ == "__main__":
main()
FAQs
Zinvest API python client
We found that zinvest-trade-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.