python-okx 0.3.2__tar.gz → 0.3.4__tar.gz

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.
Files changed (36) hide show
  1. {python-okx-0.3.2 → python_okx-0.3.4}/PKG-INFO +1 -1
  2. {python-okx-0.3.2 → python_okx-0.3.4}/okx/Account.py +23 -3
  3. {python-okx-0.3.2 → python_okx-0.3.4}/okx/Funding.py +2 -2
  4. {python-okx-0.3.2 → python_okx-0.3.4}/okx/__init__.py +1 -1
  5. {python-okx-0.3.2 → python_okx-0.3.4}/okx/consts.py +3 -0
  6. {python-okx-0.3.2 → python_okx-0.3.4}/python_okx.egg-info/PKG-INFO +1 -1
  7. {python-okx-0.3.2 → python_okx-0.3.4}/README.md +0 -0
  8. {python-okx-0.3.2 → python_okx-0.3.4}/okx/BlockTrading.py +0 -0
  9. {python-okx-0.3.2 → python_okx-0.3.4}/okx/Convert.py +0 -0
  10. {python-okx-0.3.2 → python_okx-0.3.4}/okx/CopyTrading.py +0 -0
  11. {python-okx-0.3.2 → python_okx-0.3.4}/okx/Earning.py +0 -0
  12. {python-okx-0.3.2 → python_okx-0.3.4}/okx/FDBroker.py +0 -0
  13. {python-okx-0.3.2 → python_okx-0.3.4}/okx/Grid.py +0 -0
  14. {python-okx-0.3.2 → python_okx-0.3.4}/okx/MarketData.py +0 -0
  15. {python-okx-0.3.2 → python_okx-0.3.4}/okx/NDBroker.py +0 -0
  16. {python-okx-0.3.2 → python_okx-0.3.4}/okx/PublicData.py +0 -0
  17. {python-okx-0.3.2 → python_okx-0.3.4}/okx/SimpleEarnFixed.py +0 -0
  18. {python-okx-0.3.2 → python_okx-0.3.4}/okx/SpreadTrading.py +0 -0
  19. {python-okx-0.3.2 → python_okx-0.3.4}/okx/Status.py +0 -0
  20. {python-okx-0.3.2 → python_okx-0.3.4}/okx/SubAccount.py +0 -0
  21. {python-okx-0.3.2 → python_okx-0.3.4}/okx/Trade.py +0 -0
  22. {python-okx-0.3.2 → python_okx-0.3.4}/okx/TradingData.py +0 -0
  23. {python-okx-0.3.2 → python_okx-0.3.4}/okx/exceptions.py +0 -0
  24. {python-okx-0.3.2 → python_okx-0.3.4}/okx/okxclient.py +0 -0
  25. {python-okx-0.3.2 → python_okx-0.3.4}/okx/utils.py +0 -0
  26. {python-okx-0.3.2 → python_okx-0.3.4}/okx/websocket/WebSocketFactory.py +0 -0
  27. {python-okx-0.3.2 → python_okx-0.3.4}/okx/websocket/WsPrivateAsync.py +0 -0
  28. {python-okx-0.3.2 → python_okx-0.3.4}/okx/websocket/WsPublicAsync.py +0 -0
  29. {python-okx-0.3.2 → python_okx-0.3.4}/okx/websocket/WsUtils.py +0 -0
  30. {python-okx-0.3.2 → python_okx-0.3.4}/okx/websocket/__init__.py +0 -0
  31. {python-okx-0.3.2 → python_okx-0.3.4}/python_okx.egg-info/SOURCES.txt +0 -0
  32. {python-okx-0.3.2 → python_okx-0.3.4}/python_okx.egg-info/dependency_links.txt +0 -0
  33. {python-okx-0.3.2 → python_okx-0.3.4}/python_okx.egg-info/requires.txt +0 -0
  34. {python-okx-0.3.2 → python_okx-0.3.4}/python_okx.egg-info/top_level.txt +0 -0
  35. {python-okx-0.3.2 → python_okx-0.3.4}/setup.cfg +0 -0
  36. {python-okx-0.3.2 → python_okx-0.3.4}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-okx
3
- Version: 0.3.2
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
@@ -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
@@ -98,7 +98,7 @@ class AccountAPI(OkxClient):
98
98
  return self._request_with_params(GET, GET_INSTRUMENTS, params)
99
99
 
100
100
  # Get the maximum loan of isolated MARGIN
101
- def get_max_loan(self, instId, mgnMode, mgnCcy):
101
+ def get_max_loan(self, instId, mgnMode, mgnCcy=''):
102
102
  params = {'instId': instId, 'mgnMode': mgnMode, 'mgnCcy': mgnCcy}
103
103
  return self._request_with_params(GET, MAX_LOAN, params)
104
104
 
@@ -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)
@@ -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
 
@@ -2,4 +2,4 @@
2
2
  Python SDK for the OKX API v5
3
3
 
4
4
  """
5
- __version__="0.3.2"
5
+ __version__="0.3.4"
@@ -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.2
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes