python-okx 0.3.8__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.8 → python_okx-0.4.0}/PKG-INFO +1 -3
  2. {python_okx-0.3.8 → python_okx-0.4.0}/README.md +0 -2
  3. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Account.py +2 -2
  4. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Finance/SolStaking.py +3 -0
  5. {python_okx-0.3.8 → python_okx-0.4.0}/okx/SubAccount.py +0 -7
  6. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Trade.py +7 -5
  7. {python_okx-0.3.8 → python_okx-0.4.0}/okx/__init__.py +1 -1
  8. {python_okx-0.3.8 → python_okx-0.4.0}/okx/consts.py +1 -1
  9. {python_okx-0.3.8 → python_okx-0.4.0}/okx/utils.py +1 -1
  10. {python_okx-0.3.8 → python_okx-0.4.0}/python_okx.egg-info/PKG-INFO +1 -3
  11. {python_okx-0.3.8 → python_okx-0.4.0}/okx/BlockTrading.py +0 -0
  12. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Convert.py +0 -0
  13. {python_okx-0.3.8 → python_okx-0.4.0}/okx/CopyTrading.py +0 -0
  14. {python_okx-0.3.8 → python_okx-0.4.0}/okx/FDBroker.py +0 -0
  15. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Finance/EthStaking.py +0 -0
  16. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Finance/FlexibleLoan.py +0 -0
  17. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Finance/Savings.py +0 -0
  18. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Finance/StakingDefi.py +0 -0
  19. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Finance/__init__.py +0 -0
  20. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Funding.py +0 -0
  21. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Grid.py +0 -0
  22. {python_okx-0.3.8 → python_okx-0.4.0}/okx/MarketData.py +0 -0
  23. {python_okx-0.3.8 → python_okx-0.4.0}/okx/PublicData.py +0 -0
  24. {python_okx-0.3.8 → python_okx-0.4.0}/okx/SpreadTrading.py +0 -0
  25. {python_okx-0.3.8 → python_okx-0.4.0}/okx/Status.py +0 -0
  26. {python_okx-0.3.8 → python_okx-0.4.0}/okx/TradingData.py +0 -0
  27. {python_okx-0.3.8 → python_okx-0.4.0}/okx/exceptions.py +0 -0
  28. {python_okx-0.3.8 → python_okx-0.4.0}/okx/okxclient.py +0 -0
  29. {python_okx-0.3.8 → python_okx-0.4.0}/okx/websocket/WebSocketFactory.py +0 -0
  30. {python_okx-0.3.8 → python_okx-0.4.0}/okx/websocket/WsPrivateAsync.py +0 -0
  31. {python_okx-0.3.8 → python_okx-0.4.0}/okx/websocket/WsPublicAsync.py +0 -0
  32. {python_okx-0.3.8 → python_okx-0.4.0}/okx/websocket/WsUtils.py +0 -0
  33. {python_okx-0.3.8 → python_okx-0.4.0}/okx/websocket/__init__.py +0 -0
  34. {python_okx-0.3.8 → python_okx-0.4.0}/python_okx.egg-info/SOURCES.txt +0 -0
  35. {python_okx-0.3.8 → python_okx-0.4.0}/python_okx.egg-info/dependency_links.txt +0 -0
  36. {python_okx-0.3.8 → python_okx-0.4.0}/python_okx.egg-info/requires.txt +0 -0
  37. {python_okx-0.3.8 → python_okx-0.4.0}/python_okx.egg-info/top_level.txt +0 -0
  38. {python_okx-0.3.8 → python_okx-0.4.0}/setup.cfg +0 -0
  39. {python_okx-0.3.8 → 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.8
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)
@@ -59,13 +59,6 @@ class SubAccountAPI(OkxClient):
59
59
  }
60
60
  return self._request_with_params(GET, GET_ASSET_SUBACCOUNT_BALANCE, params)
61
61
 
62
- # - Get the user's affiliate rebate information
63
- def get_the_user_affiliate_rebate_information(self, apiKey=''):
64
- params = {
65
- 'apiKey': apiKey
66
- }
67
- return self._request_with_params(GET, GET_THE_USER_AFFILIATE_REBATE, params)
68
-
69
62
  # - Set sub_accounts VIP loan%
70
63
  def set_sub_accounts_VIP_loan(self, enable='', alloc=[]):
71
64
  params = {
@@ -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
@@ -112,10 +115,9 @@ class TradeAPI(OkxClient):
112
115
  return self._request_with_params(POST, CANCEL_ALGOS, params)
113
116
 
114
117
  # Get Algo Order List
115
- def order_algos_list(self, ordType='', algoId='', instType='', instId='', after='', before='', limit='',
116
- algoClOrdId=''):
118
+ def order_algos_list(self, ordType='', algoId='', instType='', instId='', after='', before='', limit=''):
117
119
  params = {'ordType': ordType, 'algoId': algoId, 'instType': instType, 'instId': instId, 'after': after,
118
- 'before': before, 'limit': limit, 'algoClOrdId': algoClOrdId}
120
+ 'before': before, 'limit': limit}
119
121
  return self._request_with_params(GET, ORDERS_ALGO_PENDING, params)
120
122
 
121
123
  # Get Algo Order History
@@ -2,4 +2,4 @@
2
2
  Python SDK for the OKX API v5
3
3
 
4
4
  """
5
- __version__="0.3.8"
5
+ __version__="0.4.0"
@@ -183,7 +183,6 @@ SUBACCOUNT_TRANSFER = '/api/v5/asset/subaccount/transfer'
183
183
  ENTRUST_SUBACCOUNT_LIST = '/api/v5/users/entrust-subaccount-list'
184
184
  SET_TRSNSFER_OUT = '/api/v5/users/subaccount/set-transfer-out'
185
185
  GET_ASSET_SUBACCOUNT_BALANCE = '/api/v5/asset/subaccount/balances'
186
- GET_THE_USER_AFFILIATE_REBATE = '/api/v5/users/partner/if-rebate'
187
186
  SET_SUB_ACCOUNTS_VIP_LOAN = '/api/v5/account/subaccount/set-loan-allocation'
188
187
  GET_SUB_ACCOUNT_BORROW_INTEREST_AND_LIMIT = '/api/v5/account/subaccount/interest-limits'
189
188
 
@@ -262,6 +261,7 @@ STACK_SOL_REDEEM = '/api/v5/finance/staking-defi/sol/redeem'
262
261
  STACK_SOL_BALANCE = '/api/v5/finance/staking-defi/sol/balance'
263
262
  STACK_SOL_PURCHASE_REDEEM_HISTORY = '/api/v5/finance/staking-defi/sol/purchase-redeem-history'
264
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'
265
265
 
266
266
  # Status
267
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.8
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