Skip to content

Commit

Permalink
v0.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinxue committed Dec 19, 2023
1 parent 32b95b9 commit 2a5790d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyxt/perp.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def get_agg_tiker(self, symbol):
url = self.host + "/future/market" + '/v1/public/q/agg-ticker'
code, success, error = self._fetch(method="GET", url=url, params=params, timeout=self.timeout)
return code, success, error

def get_book_ticker(self, symbol):
"""
:return:book ticker
Expand Down
7 changes: 5 additions & 2 deletions pyxt/spot.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,13 @@ def order(self, symbol, side, type, biz_type='SPOT', time_in_force='GTC', client
params['clientOrderId'] = client_order_id
if price:
params['price'] = price
if quantity:
params['quantity'] = quantity
if quote_qty:
params['quoteQty'] = quote_qty
if quantity:
if type == "MARKET" and side == "BUY" and quote_qty is None:
params['quote_qty'] = quantity * price
else:
params['quantity'] = quantity
res = self.req_post("/v4/order", params)
return res['result']

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

setup(
name='pyxt',
version='0.6.5',
version='0.6.6',
description='Python3 XT.COM HTTP API Connector',
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/kelvinxue/pyxt",
download_url='https://github.com/kelvinxue/pyxt/archive/refs/tags/v0.6.5.tar.gz',
download_url='https://github.com/kelvinxue/pyxt/archive/refs/tags/v0.6.6.tar.gz',
license="MIT License",
author="xt",
author_email="xt@xt.com",
Expand Down

0 comments on commit 2a5790d

Please sign in to comment.