python-okx 0.3.3__py3-none-any.whl → 0.3.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
okx/Account.py CHANGED
@@ -88,8 +88,8 @@ class AccountAPI(OkxClient):
88
88
  return self._request_with_params(POST, ADJUSTMENT_MARGIN, params)
89
89
 
90
90
  # Get Leverage
91
- def get_leverage(self, instId, mgnMode):
92
- params = {'instId': instId, 'mgnMode': mgnMode}
91
+ def get_leverage(self, mgnMode, ccy='', instId=''):
92
+ params = {'instId': instId, 'mgnMode': mgnMode, 'ccy': ccy}
93
93
  return self._request_with_params(GET, GET_LEVERAGE, params)
94
94
 
95
95
  # Get instruments
@@ -294,3 +294,23 @@ class AccountAPI(OkxClient):
294
294
  if limit is not None:
295
295
  params['limit'] = limit
296
296
  return self._request_with_params(GET, BORROWING_ORDERS_LIST, params)
297
+
298
+ def spot_manual_borrow_repay(self, ccy=None, side=None, amt=None):
299
+ params = {}
300
+ if ccy is not None:
301
+ params['ccy'] = ccy
302
+ if side is not None:
303
+ params['side'] = side
304
+ if amt is not None:
305
+ params['amt'] = amt
306
+ return self._request_with_params(POST, MANUAL_REBORROW_REPAY, params)
307
+
308
+ def set_auto_repay(self, autoRepay=False):
309
+ params = {}
310
+ if autoRepay is not None:
311
+ params['autoRepay'] = autoRepay
312
+ return self._request_with_params(POST, SET_AUTO_REPAY, params)
313
+
314
+ def spot_borrow_repay_history(self, ccy='', type='', after='', before='', limit=''):
315
+ params = {'ccy': ccy, 'type': type, 'after': after, 'before': before, 'limit': limit}
316
+ return self._request_with_params(GET, GET_BORROW_REPAY_HISTORY, params)
okx/Funding.py CHANGED
@@ -35,8 +35,8 @@ class FundingAPI(OkxClient):
35
35
  return self._request_with_params(POST, FUNDS_TRANSFER, params)
36
36
 
37
37
  # Withdrawal
38
- def withdrawal(self, ccy, amt, dest, toAddr, fee, chain='', areaCode='', clientId=''):
39
- params = {'ccy': ccy, 'amt': amt, 'dest': dest, 'toAddr': toAddr, 'fee': fee, 'chain': chain,
38
+ def withdrawal(self, ccy, amt, dest, toAddr, chain='', areaCode='', clientId=''):
39
+ params = {'ccy': ccy, 'amt': amt, 'dest': dest, 'toAddr': toAddr, 'chain': chain,
40
40
  'areaCode': areaCode, 'clientId': clientId}
41
41
  return self._request_with_params(POST, WITHDRAWAL_COIN, params)
42
42
 
okx/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
  Python SDK for the OKX API v5
3
3
 
4
4
  """
5
- __version__="0.3.3"
5
+ __version__="0.3.4"
okx/consts.py CHANGED
@@ -62,6 +62,9 @@ AMEND_BORROWING_ORDER='/api/v5/account/fixed-loan/amend-borrowing-order'
62
62
  MANUAL_REBORROW = '/api/v5/account/fixed-loan/manual-reborrow'
63
63
  REPAY_BORROWING_ORDER='/api/v5/account/fixed-loan/repay-borrowing-order'
64
64
  BORROWING_ORDERS_LIST='/api/v5/account/fixed-loan/borrowing-orders-list'
65
+ MANUAL_REBORROW_REPAY = '/api/v5/account/spot-manual-borrow-repay'
66
+ SET_AUTO_REPAY='/api/v5/account/set-auto-repay'
67
+ GET_BORROW_REPAY_HISTORY='/api/v5/account/spot-borrow-repay-history'
65
68
 
66
69
  # funding-complete-testcomplete
67
70
  NON_TRADABLE_ASSETS = '/api/v5/asset/non-tradable-assets'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-okx
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Python SDK for OKX
5
5
  Home-page: https://okx.com/docs-v5/
6
6
  Author: okxv5api
@@ -1,10 +1,10 @@
1
- okx/Account.py,sha256=pXh-3PEYrESeCEmp4JngZv4jT0ItXcJfS2-CF2yCRpc,13026
1
+ okx/Account.py,sha256=zScfpbfld0iq65QtWI5yeeYhWAK3wFJlo_2pTZ9tJLo,13883
2
2
  okx/BlockTrading.py,sha256=LC44PIxd5-S2coHxCmYjG7WqAuwrMdfO644eui2Ixvc,4127
3
3
  okx/Convert.py,sha256=StJqUTODvycEtPyBmvl2Cao7ElzGWQW-95vREkvkhPo,1574
4
4
  okx/CopyTrading.py,sha256=6vrJFKqzRhRf5t279XsLNamdo06-L1ORjlX60nMwgw8,2750
5
5
  okx/Earning.py,sha256=_H7_a466naKaEt3-SD_ZUbi-swnm8VwYZ357xF4q2rM,3852
6
6
  okx/FDBroker.py,sha256=7nEWawZ3sVHRT-9beZ95KADtXf2eyNsL91Wchr7kLtQ,787
7
- okx/Funding.py,sha256=lSbgBNIsv45LhZbvyHBAOSFeU63nWU-y81FkI73ogyk,6277
7
+ okx/Funding.py,sha256=gjXqMMfbnexuYckDaspMRulAlG35aowliOj7NmxseUQ,6260
8
8
  okx/Grid.py,sha256=EYTZwf5-pWN75kdiukOfkEp20R2kttxj8d5HPNsdwWE,6690
9
9
  okx/MarketData.py,sha256=TsVXdH-wOUZQMQPG70BTIiaBhWG-dknwNbVJHjFgpFE,4927
10
10
  okx/NDBroker.py,sha256=u-PDdCePOEJowLCB5GyJXRQXsiTG1tWUznQX5qngkaQ,5062
@@ -15,8 +15,8 @@ okx/Status.py,sha256=Nm2qRviE-40AVo_ndDtPludvObnWZ1OqP7qRZokTYuw,494
15
15
  okx/SubAccount.py,sha256=z8ZBVIHu4XW4bqTj97sifBiodgxbVgXOQ2Ndf2KycSo,3527
16
16
  okx/Trade.py,sha256=T1HQB9-Wo5MWlhrPahGub9hBXzQDe9QkkSShMpvyYIo,10838
17
17
  okx/TradingData.py,sha256=SMc5C3sQk5rwn08AsDDcbN6zQm_wy4S2JO0jQHAKVhU,2330
18
- okx/__init__.py,sha256=eq6SltLpIFvlso3dAsIVcWcgIC6xKfsTUKjM22ViQt0,58
19
- okx/consts.py,sha256=rxScpgjvR7vjd_XZp9o09UMD8GexWXSf4xPi63ATyV8,15410
18
+ okx/__init__.py,sha256=kTsebx0VGpzwNou5pyQXFzIDG-R383qlUQ_qH1lyLXQ,58
19
+ okx/consts.py,sha256=h94U14Pw_wxSOe5Aej5hHYH4fYitCSi4a5p8c7_f2ew,15594
20
20
  okx/exceptions.py,sha256=ERuCnvnudJNBNACh3LNE3km5GJy0BGC5C3OKjgHXFaU,1182
21
21
  okx/okxclient.py,sha256=RepnkJnstxtNGyFmlPh_9b6SFUooxKk-fM7d6z0Dvvc,2598
22
22
  okx/utils.py,sha256=FTXSW73yXV6Hc4-9O22WFmkhayASYo7WQHIc_bTyc6g,1858
@@ -25,7 +25,7 @@ okx/websocket/WsPrivateAsync.py,sha256=CYmZDRV16BxkrFhf7yeT7L4JyK2IZBlOIziaUOk3Q
25
25
  okx/websocket/WsPublicAsync.py,sha256=sOV-IUmgybOQI1snCoyPxD4hzIoiQLHjUVRWrS2_2cM,1561
26
26
  okx/websocket/WsUtils.py,sha256=ynkCtfvkrwBUiCi-_yqp1xTn3hhVd_o5ITIhD1xLdBo,2199
27
27
  okx/websocket/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- python_okx-0.3.3.dist-info/METADATA,sha256=LkLJv7J4rpqCcTKmUmHDy4qqdVmiRCH8oUlz26gRt14,3145
29
- python_okx-0.3.3.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
30
- python_okx-0.3.3.dist-info/top_level.txt,sha256=rrbhHZwiw4YlhG1LWWaAODvRxyZr3onxFnqwsHdikDc,4
31
- python_okx-0.3.3.dist-info/RECORD,,
28
+ python_okx-0.3.4.dist-info/METADATA,sha256=XbN-TtjGohjydZ6nDdOMg8UfA8IVImGLUsLLbfcitfw,3145
29
+ python_okx-0.3.4.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
30
+ python_okx-0.3.4.dist-info/top_level.txt,sha256=rrbhHZwiw4YlhG1LWWaAODvRxyZr3onxFnqwsHdikDc,4
31
+ python_okx-0.3.4.dist-info/RECORD,,