Skip to content

Commit 63f637a

Browse files
author
方佳
committed
Merge branch 'main_merge_251215' into 'main'
feat: Optimize samples See merge request webull/webull-openapi-python-sdk!10
2 parents f687e17 + 8823495 commit 63f637a

7 files changed

Lines changed: 22 additions & 7 deletions

File tree

‎samples/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.5"
1+
__version__ = '1.0.6'

‎samples/data/data_client.py‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@
3535
if res.status_code == 200:
3636
print('get_instrument:', res.json())
3737

38+
res = data_client.instrument.get_crypto_instrument()
39+
if res.status_code == 200:
40+
print('get_crypto_instrument(all):', res.json())
41+
42+
res = data_client.instrument.get_crypto_instrument("BTCUSD")
43+
if res.status_code == 200:
44+
print('get_crypto_instrument:', res.json())
45+
46+
res = data_client.crypto_market_data.get_crypto_snapshot("BTCUSD")
47+
if res.status_code == 200:
48+
print('get_crypto_snapshot:', res.json())
49+
50+
res = data_client.crypto_market_data.get_crypto_history_bar("BTCUSD", Category.US_CRYPTO.name, Timespan.M1.name)
51+
if res.status_code == 200:
52+
print('get_crypto_history_bar:', res.json())
53+
3854
res = data_client.market_data.get_snapshot('AAPL', Category.US_STOCK.name, extend_hour_required=True, overnight_required=True)
3955
if res.status_code == 200:
4056
print('get_snapshot:', res.json())

‎webull/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.5"
1+
__version__ = '1.0.6'

‎webull/core/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.0.5"
1+
__version__ = '1.0.6'
22

33
import logging
44

‎webull/data/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# coding=utf-8
22

3-
__version__ = '1.0.5'
3+
__version__ = '1.0.6'

‎webull/data/request/get_futures_historical_bars_request.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class GetFuturesHistoricalBarsRequest(ApiRequest):
1919
def __init__(self):
20-
ApiRequest.__init__(self, "/openapi/market-data/futures/bars", version='v2', method="GET", body_params={})
20+
ApiRequest.__init__(self, "/openapi/market-data/futures/bars", version='v2', method="GET", query_params={})
2121

2222
def set_symbols(self, symbol):
2323
self.add_query_param("symbols", symbol)

‎webull/trade/__init__.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
__version__ = "1.0.5"
2-
1+
__version__ = '1.0.6'

0 commit comments

Comments
 (0)