# TCore Python API 快速安装说明

## **步骤 :**&#x20;

1. 执行安装 python-3.6.7-amd64.exe 及 pywin32-224.win-amd64-py3.6.exe&#x20;
2. 安装所需的其他套件 以系统管理员开启命令提示字元执行以下-- 切换至Package所在路径 ,\
   输入 pip install --upgrade tcoreapi\_mq 安裝

## [**pytho**n**安装文件(**&#x6309;此下载)](http://dl.icetech.com.cn/download/python_install.7z)

| **文件名**                         | **文件描述**           |
| ------------------------------- | ------------------ |
| python-3.6.7-amd64.exe          | python install exe |
| pywin32-224.win-amd64-py3.6.exe | python install exe |
| requirements.txt                | 其他套件               |

## [范例**文件(**&#x6309;此下载)](https://algomaster.gitbook.io/tcore-api/python-api2.0-shi-yong-fan-li#zmqpython2.0_sample-4.0.7.7z)

| [tcoreapi\_mq.pyc](https://algomaster.gitbook.io/tcore-api/tcore-python-api-xin-ban/python-api2.0-shi-yong-fan-li)      | TCore Python API 行情与交易函数库 |
| ----------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| [main\_sample完整demo.py](https://algomaster.gitbook.io/tcore-api/tcore-python-api-xin-ban/python-api2.0-shi-yong-fan-li) | 行情交易连接与使用范例               |

## Initial & 连线 API物件

```python
import tcoreapi_mq

TCoreAPI= TCoreZMQ(APPID="XXX",SKey="XXXXXXX",quote_port="XXXXX",trade_port="XXXXX")
```

APPID填入 ZMQ、SKey 填入8076c9867a372d2a9a814ae710c256e2

| **参数**      | 说明         |
| ----------- | ---------- |
| APPID       | TCore系统名称  |
| SKey        | 连线TCore ID |
| quote\_port | 行情连线port   |
| trade\_port | 交易连线port   |

## 结束 & 离线 API物件

```python
del TCoreAPI
```
