Skip to content

Commit 2fbf035

Browse files
committed
Merge branch 'dev' into 'master'
Dev See merge request server/openapi/openapi-python-sdk!168
2 parents 4ad4019 + 01e632b commit 2fbf035

File tree

15 files changed

+1014
-156
lines changed

15 files changed

+1014
-156
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 2.3.5 (2023-03-28)
2+
### New
3+
- TradeClient 新增不同品种(股票SEC/期货FUT/基金FUND)账户间资金划转接口
4+
`TradeClient.get_segment_fund_available` 获取可划转资金
5+
`TradeClient.transfer_segment_fund` 划转资金
6+
`TradeClient.cancel_segment_fund` 取消划转
7+
`TradeClient.get_segment_fund_history` 获取划转历史
8+
9+
- TradeClient 新增换汇下单接口
10+
`TradeClient.place_forex_order`
11+
12+
- `QuoteClient.get_option_bars` 期权k线接口新增参数 `period`, 支持获取分钟k线
13+
14+
115
## 2.3.4 (2023-03-20)
216
### New
317
- 支持AM/AL(盘前竞价单)

tigeropen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
55
@author: gaoan
66
"""
7-
__VERSION__ = '2.3.4'
7+
__VERSION__ = '2.3.5'

tigeropen/common/consts/service_types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
FILLED_ORDERS = "filled_orders" # 已成交订单
2727
ORDER_TRANSACTIONS = "order_transactions" # 订单成交记录
2828
ANALYTICS_ASSET = "analytics_asset"
29+
SEGMENT_FUND_HISTORY = "segment_fund_history"
30+
SEGMENT_FUND_AVAILABLE = "segment_fund_available"
31+
TRANSFER_SEGMENT_FUND = "transfer_segment_fund"
32+
CANCEL_SEGMENT_FUND = "cancel_segment_fund"
33+
PLACE_FOREX_ORDER = "place_forex_order"
2934

3035
USER_LICENSE = "user_license"
3136

tigeropen/common/util/web_utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,13 @@ def do_request(method, url, query_string=None, headers=None, params=None, timeou
7777
raise RequestException('[' + THREAD_LOCAL.uuid + ']' + method + ' request failed. url: ' + url
7878
+ ' headers: ' + str(headers)
7979
+ ' params: ' + str(params) + ' detail: ' + str(e))
80-
response = connection.getresponse()
81-
result = response.read()
82-
80+
try:
81+
response = connection.getresponse()
82+
result = response.read()
83+
except Exception as e:
84+
raise ResponseException('[' + THREAD_LOCAL.uuid + '] read response error ' +
85+
' headers: ' + str(headers) +
86+
' params: ' + str(params))
8387
if response.status != 200:
8488
if charset:
8589
result = result.decode(charset)

0 commit comments

Comments
 (0)