python-okx 0.3.9__tar.gz → 0.4.0__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 (39) hide show
  1. {python_okx-0.3.9 → python_okx-0.4.0}/PKG-INFO +1 -3
  2. {python_okx-0.3.9 → python_okx-0.4.0}/README.md +0 -2
  3. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Account.py +2 -2
  4. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Finance/SolStaking.py +3 -0
  5. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Trade.py +5 -2
  6. {python_okx-0.3.9 → python_okx-0.4.0}/okx/__init__.py +1 -1
  7. {python_okx-0.3.9 → python_okx-0.4.0}/okx/consts.py +1 -0
  8. {python_okx-0.3.9 → python_okx-0.4.0}/okx/utils.py +1 -1
  9. {python_okx-0.3.9 → python_okx-0.4.0}/python_okx.egg-info/PKG-INFO +1 -3
  10. {python_okx-0.3.9 → python_okx-0.4.0}/okx/BlockTrading.py +0 -0
  11. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Convert.py +0 -0
  12. {python_okx-0.3.9 → python_okx-0.4.0}/okx/CopyTrading.py +0 -0
  13. {python_okx-0.3.9 → python_okx-0.4.0}/okx/FDBroker.py +0 -0
  14. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Finance/EthStaking.py +0 -0
  15. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Finance/FlexibleLoan.py +0 -0
  16. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Finance/Savings.py +0 -0
  17. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Finance/StakingDefi.py +0 -0
  18. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Finance/__init__.py +0 -0
  19. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Funding.py +0 -0
  20. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Grid.py +0 -0
  21. {python_okx-0.3.9 → python_okx-0.4.0}/okx/MarketData.py +0 -0
  22. {python_okx-0.3.9 → python_okx-0.4.0}/okx/PublicData.py +0 -0
  23. {python_okx-0.3.9 → python_okx-0.4.0}/okx/SpreadTrading.py +0 -0
  24. {python_okx-0.3.9 → python_okx-0.4.0}/okx/Status.py +0 -0
  25. {python_okx-0.3.9 → python_okx-0.4.0}/okx/SubAccount.py +0 -0
  26. {python_okx-0.3.9 → python_okx-0.4.0}/okx/TradingData.py +0 -0
  27. {python_okx-0.3.9 → python_okx-0.4.0}/okx/exceptions.py +0 -0
  28. {python_okx-0.3.9 → python_okx-0.4.0}/okx/okxclient.py +0 -0
  29. {python_okx-0.3.9 → python_okx-0.4.0}/okx/websocket/WebSocketFactory.py +0 -0
  30. {python_okx-0.3.9 → python_okx-0.4.0}/okx/websocket/WsPrivateAsync.py +0 -0
  31. {python_okx-0.3.9 → python_okx-0.4.0}/okx/websocket/WsPublicAsync.py +0 -0
  32. {python_okx-0.3.9 → python_okx-0.4.0}/okx/websocket/WsUtils.py +0 -0
  33. {python_okx-0.3.9 → python_okx-0.4.0}/okx/websocket/__init__.py +0 -0
  34. {python_okx-0.3.9 → python_okx-0.4.0}/python_okx.egg-info/SOURCES.txt +0 -0
  35. {python_okx-0.3.9 → python_okx-0.4.0}/python_okx.egg-info/dependency_links.txt +0 -0
  36. {python_okx-0.3.9 → python_okx-0.4.0}/python_okx.egg-info/requires.txt +0 -0
  37. {python_okx-0.3.9 → python_okx-0.4.0}/python_okx.egg-info/top_level.txt +0 -0
  38. {python_okx-0.3.9 → python_okx-0.4.0}/setup.cfg +0 -0
  39. {python_okx-0.3.9 → python_okx-0.4.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-okx
3
- Version: 0.3.9
3
+ Version: 0.4.0
4
4
  Summary: Python SDK for OKX
5
5
  Home-page: https://okx.com/docs-v5/
6
6
  Author: okxv5api
@@ -24,8 +24,6 @@ If you came here looking to purchase cryptocurrencies from the OKX exchange, ple
24
24
 
25
25
  #### Source code
26
26
  https://github.com/okxapi/python-okx
27
- #### OKX API Telegram
28
- https://t.me/OKXAPI
29
27
  #### API trading tutorials
30
28
  - Spot trading: https://www.okx.com/help/how-can-i-do-spot-trading-with-the-jupyter-notebook
31
29
  - Derivative trading: https://www.okx.com/help/how-can-i-do-derivatives-trading-with-the-jupyter-notebook
@@ -5,8 +5,6 @@ If you came here looking to purchase cryptocurrencies from the OKX exchange, ple
5
5
 
6
6
  #### Source code
7
7
  https://github.com/okxapi/python-okx
8
- #### OKX API Telegram
9
- https://t.me/OKXAPI
10
8
  #### API trading tutorials
11
9
  - Spot trading: https://www.okx.com/help/how-can-i-do-spot-trading-with-the-jupyter-notebook
12
10
  - Derivative trading: https://www.okx.com/help/how-can-i-do-derivatives-trading-with-the-jupyter-notebook
@@ -23,8 +23,8 @@ class AccountAPI(OkxClient):
23
23
  return self._request_with_params(GET, ACCOUNT_INFO, params)
24
24
 
25
25
  # Get Positions
26
- def get_positions(self, instType='', instId=''):
27
- params = {'instType': instType, 'instId': instId}
26
+ def get_positions(self, instType='', instId='', posId=''):
27
+ params = {'instType': instType, 'instId': instId, 'posId': posId}
28
28
  return self._request_with_params(GET, POSITION_INFO, params)
29
29
 
30
30
  def position_builder(self, acctLv=None,inclRealPosAndEq=False, lever=None, greeksType=None, simPos=None,
@@ -46,3 +46,6 @@ class SolStakingAPI(OkxClient):
46
46
  'days': days,
47
47
  }
48
48
  return self._request_with_params(GET, STACK_SOL_APY_HISTORY, params)
49
+
50
+ def sol_product_info(self):
51
+ return self._request_without_params(GET, STACK_SOL_PRODUCT_INFO)
@@ -95,7 +95,8 @@ class TradeAPI(OkxClient):
95
95
  pxSpread='',
96
96
  szLimit='', pxLimit='', timeInterval='', tpTriggerPxType='', slTriggerPxType='',
97
97
  callbackRatio='', callbackSpread='', activePx='', tag='', triggerPxType='', closeFraction=''
98
- , quickMgnType='', algoClOrdId=''):
98
+ , quickMgnType='', algoClOrdId='', tradeQuoteCcy='', tpOrdKind='', cxlOnClosePos=''
99
+ , chaseType='', chaseVal='', maxChaseType='', maxChaseVal='', attachAlgoOrds=[]):
99
100
  params = {'instId': instId, 'tdMode': tdMode, 'side': side, 'ordType': ordType, 'sz': sz, 'ccy': ccy,
100
101
  'posSide': posSide, 'reduceOnly': reduceOnly, 'tpTriggerPx': tpTriggerPx, 'tpOrdPx': tpOrdPx,
101
102
  'slTriggerPx': slTriggerPx, 'slOrdPx': slOrdPx, 'triggerPx': triggerPx, 'orderPx': orderPx,
@@ -104,7 +105,9 @@ class TradeAPI(OkxClient):
104
105
  'pxSpread': pxSpread, 'tpTriggerPxType': tpTriggerPxType, 'slTriggerPxType': slTriggerPxType,
105
106
  'callbackRatio': callbackRatio, 'callbackSpread': callbackSpread, 'activePx': activePx,
106
107
  'tag': tag, 'triggerPxType': triggerPxType, 'closeFraction': closeFraction,
107
- 'quickMgnType': quickMgnType, 'algoClOrdId': algoClOrdId}
108
+ 'quickMgnType': quickMgnType, 'algoClOrdId': algoClOrdId, 'tradeQuoteCcy': tradeQuoteCcy,
109
+ 'tpOrdKind': tpOrdKind, 'cxlOnClosePos': cxlOnClosePos, 'chaseType': chaseType, 'chaseVal': chaseVal,
110
+ 'maxChaseType': maxChaseType, 'maxChaseVal': maxChaseVal, 'attachAlgoOrds': attachAlgoOrds}
108
111
  return self._request_with_params(POST, PLACE_ALGO_ORDER, params)
109
112
 
110
113
  # Cancel Algo Order
@@ -2,4 +2,4 @@
2
2
  Python SDK for the OKX API v5
3
3
 
4
4
  """
5
- __version__="0.3.9"
5
+ __version__="0.4.0"
@@ -261,6 +261,7 @@ STACK_SOL_REDEEM = '/api/v5/finance/staking-defi/sol/redeem'
261
261
  STACK_SOL_BALANCE = '/api/v5/finance/staking-defi/sol/balance'
262
262
  STACK_SOL_PURCHASE_REDEEM_HISTORY = '/api/v5/finance/staking-defi/sol/purchase-redeem-history'
263
263
  STACK_SOL_APY_HISTORY = '/api/v5/finance/staking-defi/sol/apy-history'
264
+ STACK_SOL_PRODUCT_INFO = '/api/v5/finance/staking-defi/sol/product-info'
264
265
 
265
266
  # Status
266
267
  STATUS = '/api/v5/system/status'
@@ -42,7 +42,7 @@ def get_header_no_sign(flag,debug = True):
42
42
  def parse_params_to_str(params):
43
43
  url = '?'
44
44
  for key, value in params.items():
45
- if(value != ''):
45
+ if value is not None and value != '':
46
46
  url = url + str(key) + '=' + str(value) + '&'
47
47
  url = url[0:-1]
48
48
  return url
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-okx
3
- Version: 0.3.9
3
+ Version: 0.4.0
4
4
  Summary: Python SDK for OKX
5
5
  Home-page: https://okx.com/docs-v5/
6
6
  Author: okxv5api
@@ -24,8 +24,6 @@ If you came here looking to purchase cryptocurrencies from the OKX exchange, ple
24
24
 
25
25
  #### Source code
26
26
  https://github.com/okxapi/python-okx
27
- #### OKX API Telegram
28
- https://t.me/OKXAPI
29
27
  #### API trading tutorials
30
28
  - Spot trading: https://www.okx.com/help/how-can-i-do-spot-trading-with-the-jupyter-notebook
31
29
  - Derivative trading: https://www.okx.com/help/how-can-i-do-derivatives-trading-with-the-jupyter-notebook
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