Skip to content

Commit

Permalink
[Mod] 优化代码和文档内容,更新版本号为1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vnpy committed Dec 17, 2021
1 parent 5cde0ae commit 7fc9e34
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2021 vn.py
Copyright (c) 2015-present, Xiaoyou Chen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
</p>

<p align="center">
<img src ="https://img.shields.io/badge/version-6.5.1.6-blueviolet.svg"/>
<img src ="https://img.shields.io/badge/platform-windows|linux-yellow.svg"/>
<img src ="https://img.shields.io/badge/version-1.0.0-blueviolet.svg"/>
<img src ="https://img.shields.io/badge/platform-windows-yellow.svg"/>
<img src ="https://img.shields.io/badge/python-3.7-blue.svg" />
<img src ="https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange"/>
</p>

## 说明

基于国泰君安的股票接口封装开发
基于国泰君安证券的统一接入网关API接口封装开发

## 安装

安装需要基于2.8.0版本以上的[VN Studio](https://www.vnpy.com)
安装需要基于2.9.0版本以上的[VN Studio](https://www.vnpy.com)

直接使用pip命令:

Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ url = https://www.vnpy.com
license = MIT
author = Xiaoyou Chen
author_email = [email protected]
description = GTJA gateway for vn.py quant trading framework.
description = Guotai Junan HFT gateway for vn.py quant trading framework.
long_description = file: README.md
long_description_content_type = text/markdown
keywords =
Expand All @@ -17,7 +17,6 @@ keywords =
classifiers =
Development Status :: 5 - Production/Stable
Operating System :: Microsoft :: Windows
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Topic :: Office/Business :: Financial :: Investment
Expand Down
4 changes: 2 additions & 2 deletions vnpy_hft/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
# The MIT License (MIT)
#
# Copyright (c) 2021 vn.py
# Copyright (c) 2015-present, Xiaoyou Chen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions vnpy_hft/gateway/hft_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytz
import json
from datetime import datetime
from typing import Dict, List, Tuple, Any
from typing import Dict, List, Any
from pathlib import Path

from vnpy.event import EventEngine
Expand Down Expand Up @@ -34,7 +34,7 @@
)
from vnpy.trader.constant import (
Direction,
Exchange,
Exchange,
OrderType,
Offset,
Product,
Expand Down Expand Up @@ -142,12 +142,12 @@

# 多空方向映射
SIDE_HFT2VT: Dict[int, Any] = {
PositionSide_Long:(Direction.LONG, Offset.NONE),
PositionSide_Long: (Direction.LONG, Offset.NONE),
PositionSide_Short: (Direction.SHORT, Offset.NONE),
OrderSide_Margin_Bid: (Direction.LONG, Offset.OPEN),
OrderSide_Margin_Ask: (Direction.SHORT, Offset.OPEN),
OrderSide_Margin_EnBuyBack:(Direction.LONG, Offset.CLOSE),
OrderSide_Margin_EnSellBack:(Direction.SHORT, Offset.CLOSE),
OrderSide_Margin_EnBuyBack: (Direction.LONG, Offset.CLOSE),
OrderSide_Margin_EnSellBack: (Direction.SHORT, Offset.CLOSE),
}
SIDE_VT2HFT: Dict[Any, int] = {
v: k for k, v in SIDE_HFT2VT.items()
Expand Down

0 comments on commit 7fc9e34

Please sign in to comment.