python-okx 0.4.2__tar.gz → 0.4.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 (66) hide show
  1. {python_okx-0.4.2 → python_okx-0.4.4}/PKG-INFO +2 -10
  2. {python_okx-0.4.2 → python_okx-0.4.4}/README.md +1 -2
  3. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Account.py +16 -1
  4. python_okx-0.4.4/okx/Affiliate.py +84 -0
  5. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Finance/EthStaking.py +7 -0
  6. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Finance/FlexibleLoan.py +25 -0
  7. python_okx-0.4.4/okx/Finance/Okusd.py +61 -0
  8. python_okx-0.4.4/okx/Finance/__init__.py +1 -0
  9. {python_okx-0.4.2 → python_okx-0.4.4}/okx/MarketData.py +5 -0
  10. {python_okx-0.4.2 → python_okx-0.4.4}/okx/__init__.py +1 -1
  11. {python_okx-0.4.2 → python_okx-0.4.4}/okx/consts.py +25 -1
  12. {python_okx-0.4.2 → python_okx-0.4.4}/python_okx.egg-info/PKG-INFO +2 -10
  13. {python_okx-0.4.2 → python_okx-0.4.4}/python_okx.egg-info/SOURCES.txt +2 -0
  14. python_okx-0.4.4/python_okx.egg-info/requires.txt +5 -0
  15. python_okx-0.4.4/requirements.txt +6 -0
  16. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_eth_staking.py +3 -0
  17. python_okx-0.4.2/okx/websocket/__init__.py +0 -0
  18. python_okx-0.4.2/python_okx.egg-info/requires.txt +0 -12
  19. python_okx-0.4.2/requirements.txt +0 -15
  20. {python_okx-0.4.2 → python_okx-0.4.4}/MANIFEST.in +0 -0
  21. {python_okx-0.4.2 → python_okx-0.4.4}/okx/BlockTrading.py +0 -0
  22. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Convert.py +0 -0
  23. {python_okx-0.4.2 → python_okx-0.4.4}/okx/CopyTrading.py +0 -0
  24. {python_okx-0.4.2 → python_okx-0.4.4}/okx/DualInvest.py +0 -0
  25. {python_okx-0.4.2 → python_okx-0.4.4}/okx/FDBroker.py +0 -0
  26. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Finance/Savings.py +0 -0
  27. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Finance/SolStaking.py +0 -0
  28. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Finance/StakingDefi.py +0 -0
  29. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Funding.py +0 -0
  30. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Grid.py +0 -0
  31. {python_okx-0.4.2 → python_okx-0.4.4}/okx/PublicData.py +0 -0
  32. {python_okx-0.4.2 → python_okx-0.4.4}/okx/SpreadTrading.py +0 -0
  33. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Status.py +0 -0
  34. {python_okx-0.4.2 → python_okx-0.4.4}/okx/SubAccount.py +0 -0
  35. {python_okx-0.4.2 → python_okx-0.4.4}/okx/Trade.py +0 -0
  36. {python_okx-0.4.2 → python_okx-0.4.4}/okx/TradingData.py +0 -0
  37. {python_okx-0.4.2 → python_okx-0.4.4}/okx/exceptions.py +0 -0
  38. {python_okx-0.4.2 → python_okx-0.4.4}/okx/okxclient.py +0 -0
  39. {python_okx-0.4.2 → python_okx-0.4.4}/okx/utils.py +0 -0
  40. {python_okx-0.4.2 → python_okx-0.4.4}/okx/websocket/WebSocketFactory.py +0 -0
  41. {python_okx-0.4.2 → python_okx-0.4.4}/okx/websocket/WsPrivateAsync.py +0 -0
  42. {python_okx-0.4.2 → python_okx-0.4.4}/okx/websocket/WsPublicAsync.py +0 -0
  43. {python_okx-0.4.2 → python_okx-0.4.4}/okx/websocket/WsUtils.py +0 -0
  44. {python_okx-0.4.2/okx/Finance → python_okx-0.4.4/okx/websocket}/__init__.py +0 -0
  45. {python_okx-0.4.2 → python_okx-0.4.4}/python_okx.egg-info/dependency_links.txt +0 -0
  46. {python_okx-0.4.2 → python_okx-0.4.4}/python_okx.egg-info/top_level.txt +0 -0
  47. {python_okx-0.4.2 → python_okx-0.4.4}/setup.cfg +0 -0
  48. {python_okx-0.4.2 → python_okx-0.4.4}/setup.py +0 -0
  49. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_account.py +0 -0
  50. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_block_trading.py +0 -0
  51. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_convert.py +0 -0
  52. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_copy_trading.py +0 -0
  53. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_flexible_loan.py +0 -0
  54. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_funding.py +0 -0
  55. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_grid.py +0 -0
  56. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_market.py +0 -0
  57. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_public_data.py +0 -0
  58. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_savings.py +0 -0
  59. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_sol_staking.py +0 -0
  60. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_spread.py +0 -0
  61. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_staking_defi.py +0 -0
  62. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_sub_account.py +0 -0
  63. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_trade.py +0 -0
  64. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_trading_data.py +0 -0
  65. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_ws_private_async.py +0 -0
  66. {python_okx-0.4.2 → python_okx-0.4.4}/test/test_ws_public_async.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-okx
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Python SDK for OKX
5
5
  Home-page: https://okx.com/docs-v5/
6
6
  Author: okxv5api
@@ -21,13 +21,6 @@ Requires-Dist: requests>=2.25.0
21
21
  Requires-Dist: websockets>=10.0
22
22
  Requires-Dist: certifi>=2021.0.0
23
23
  Requires-Dist: loguru>=0.7.0
24
- Requires-Dist: python-dotenv>=1.0.0
25
- Requires-Dist: pytest>=7.0.0
26
- Requires-Dist: pytest-asyncio>=0.21.0
27
- Requires-Dist: pytest-cov>=4.0.0
28
- Requires-Dist: ruff>=0.1.0
29
- Requires-Dist: build>=1.0.0
30
- Requires-Dist: twine>=4.0.0
31
24
  Dynamic: author
32
25
  Dynamic: author-email
33
26
  Dynamic: classifier
@@ -58,7 +51,6 @@ Make sure you update often and check the [Changelog](https://www.okx.com/docs-v5
58
51
  - Websocket handling with reconnection and multiplexed connections
59
52
 
60
53
  ### Quick start
61
-
62
54
  #### Prerequisites
63
55
 
64
56
  `python version:>=3.7`
@@ -128,7 +120,7 @@ git clone https://github.com/okxapi/python-okx.git
128
120
  cd python-okx
129
121
 
130
122
  # Install dependencies
131
- pip install -r requirements.txt
123
+ pip install -r dev_requirements.txt
132
124
  pip install -e .
133
125
 
134
126
  # Run tests
@@ -18,7 +18,6 @@ Make sure you update often and check the [Changelog](https://www.okx.com/docs-v5
18
18
  - Websocket handling with reconnection and multiplexed connections
19
19
 
20
20
  ### Quick start
21
-
22
21
  #### Prerequisites
23
22
 
24
23
  `python version:>=3.7`
@@ -88,7 +87,7 @@ git clone https://github.com/okxapi/python-okx.git
88
87
  cd python-okx
89
88
 
90
89
  # Install dependencies
91
- pip install -r requirements.txt
90
+ pip install -r dev_requirements.txt
92
91
  pip install -e .
93
92
 
94
93
  # Run tests
@@ -229,7 +229,7 @@ class AccountAPI(OkxClient):
229
229
  }
230
230
  return self._request_with_params(POST, SET_AUTO_LOAN, params)
231
231
 
232
- # - Set auto loan
232
+ # - Set account level
233
233
  def set_account_level(self, acctLv):
234
234
  params = {
235
235
  'acctLv': acctLv
@@ -366,3 +366,18 @@ class AccountAPI(OkxClient):
366
366
  if type != '':
367
367
  params['type'] = type
368
368
  return self._request_with_params(POST, BILLS_APPLY, params)
369
+
370
+ # Get GLP daily performance history for a program
371
+ def get_glp_historical_performance(self, program, begin='', end='', limit=''):
372
+ params = {'program': program}
373
+ if begin != '':
374
+ params['begin'] = begin
375
+ if end != '':
376
+ params['end'] = end
377
+ if limit != '':
378
+ params['limit'] = limit
379
+ return self._request_with_params(GET, GLP_HISTORICAL_PERFORMANCE, params)
380
+
381
+ # Get current-day + MTD GLP snapshot for all enrolled programs
382
+ def get_glp_today_performance(self):
383
+ return self._request_without_params(GET, GLP_TODAY_PERFORMANCE)
@@ -0,0 +1,84 @@
1
+ from okx.okxclient import OkxClient
2
+ from okx.consts import (
3
+ GET,
4
+ _NO_CREDENTIAL,
5
+ AFFILIATE_TVB_INVITEE_DETAIL,
6
+ AFFILIATE_TVB_INVITEE_LIST,
7
+ AFFILIATE_TVB_LINK_LIST,
8
+ AFFILIATE_TVB_PERFORMANCE_SUMMARY,
9
+ AFFILIATE_TVB_TIER_BREAKDOWN,
10
+ )
11
+
12
+
13
+ class AffiliateAPI(OkxClient):
14
+ def __init__(self, api_key=_NO_CREDENTIAL, api_secret_key=_NO_CREDENTIAL, passphrase=_NO_CREDENTIAL, use_server_time=None, flag='1',
15
+ domain='https://www.okx.com', debug=False, proxy=None):
16
+ OkxClient.__init__(self, api_key, api_secret_key, passphrase, use_server_time, flag, domain, debug, proxy)
17
+
18
+ def get_tvb_invitee_detail(self, uid):
19
+ params = {'uid': uid}
20
+ return self._request_with_params(GET, AFFILIATE_TVB_INVITEE_DETAIL, params)
21
+
22
+ def get_tvb_invitee_list(self, periodType='', begin='', end='', feeTier=None, tradeType='',
23
+ keyword='', orderBy='', orderDir='', page='', limit=''):
24
+ params = {}
25
+ if periodType != '':
26
+ params['periodType'] = periodType
27
+ if begin != '':
28
+ params['begin'] = begin
29
+ if end != '':
30
+ params['end'] = end
31
+ if feeTier is not None:
32
+ params['feeTier'] = feeTier
33
+ if tradeType != '':
34
+ params['tradeType'] = tradeType
35
+ if keyword != '':
36
+ params['keyword'] = keyword
37
+ if orderBy != '':
38
+ params['orderBy'] = orderBy
39
+ if orderDir != '':
40
+ params['orderDir'] = orderDir
41
+ if page != '':
42
+ params['page'] = page
43
+ if limit != '':
44
+ params['limit'] = limit
45
+ return self._request_with_params(GET, AFFILIATE_TVB_INVITEE_LIST, params)
46
+
47
+ def get_tvb_link_list(self, periodType='', begin='', end='', page='', limit='',
48
+ linkType='', linkStatus=''):
49
+ params = {}
50
+ if periodType != '':
51
+ params['periodType'] = periodType
52
+ if begin != '':
53
+ params['begin'] = begin
54
+ if end != '':
55
+ params['end'] = end
56
+ if page != '':
57
+ params['page'] = page
58
+ if limit != '':
59
+ params['limit'] = limit
60
+ if linkType != '':
61
+ params['linkType'] = linkType
62
+ if linkStatus != '':
63
+ params['linkStatus'] = linkStatus
64
+ return self._request_with_params(GET, AFFILIATE_TVB_LINK_LIST, params)
65
+
66
+ def get_tvb_performance_summary(self, periodType='', begin='', end=''):
67
+ params = {}
68
+ if periodType != '':
69
+ params['periodType'] = periodType
70
+ if begin != '':
71
+ params['begin'] = begin
72
+ if end != '':
73
+ params['end'] = end
74
+ return self._request_with_params(GET, AFFILIATE_TVB_PERFORMANCE_SUMMARY, params)
75
+
76
+ def get_tvb_tier_breakdown(self, periodType='', begin='', end=''):
77
+ params = {}
78
+ if periodType != '':
79
+ params['periodType'] = periodType
80
+ if begin != '':
81
+ params['begin'] = begin
82
+ if end != '':
83
+ params['end'] = end
84
+ return self._request_with_params(GET, AFFILIATE_TVB_TIER_BREAKDOWN, params)
@@ -24,6 +24,13 @@ class EthStakingAPI(OkxClient):
24
24
  }
25
25
  return self._request_with_params(POST, STACK_ETH_REDEEM, params)
26
26
 
27
+ def eth_cancel_redeem(self, ordId=''):
28
+
29
+ params = {
30
+ 'ordId': ordId,
31
+ }
32
+ return self._request_with_params(POST, STACK_ETH_CANCEL_REDEEM, params)
33
+
27
34
  def eth_balance(self):
28
35
 
29
36
  params = {}
@@ -63,3 +63,28 @@ class FlexibleLoanAPI(OkxClient):
63
63
  if limit != '':
64
64
  params['limit'] = limit
65
65
  return self._request_with_params(GET, FINANCE_INTEREST_ACCRUED, params)
66
+
67
+ def borrow(self, loanData, clOrdId, ordId='', collateralData=None, eMode=''):
68
+ params = {
69
+ 'loanData': loanData,
70
+ 'clOrdId': clOrdId,
71
+ }
72
+ if ordId != '':
73
+ params['ordId'] = ordId
74
+ if collateralData is not None:
75
+ params['collateralData'] = collateralData
76
+ if eMode != '':
77
+ params['eMode'] = eMode
78
+ return self._request_with_params(POST, FINANCE_FLEXIBLE_LOAN_BORROW, params)
79
+
80
+ def repay(self, ordId, ccy, amt, clOrdId):
81
+ params = {
82
+ 'ordId': ordId,
83
+ 'ccy': ccy,
84
+ 'amt': amt,
85
+ 'clOrdId': clOrdId,
86
+ }
87
+ return self._request_with_params(POST, FINANCE_FLEXIBLE_LOAN_REPAY, params)
88
+
89
+ def emode_info(self):
90
+ return self._request_without_params(GET, FINANCE_FLEXIBLE_LOAN_EMODE_INFO)
@@ -0,0 +1,61 @@
1
+ from okx.okxclient import OkxClient
2
+ from okx.consts import (
3
+ GET,
4
+ _NO_CREDENTIAL,
5
+ OKUSD_ACCOUNT,
6
+ OKUSD_RATE_HISTORY,
7
+ OKUSD_SUBSCRIBE_HISTORY,
8
+ OKUSD_REDEEM_HISTORY,
9
+ OKUSD_REWARDS_HISTORY,
10
+ )
11
+
12
+
13
+ class OkusdAPI(OkxClient):
14
+ def __init__(self, api_key=_NO_CREDENTIAL, api_secret_key=_NO_CREDENTIAL, passphrase=_NO_CREDENTIAL, use_server_time=None, flag='1',
15
+ domain='https://www.okx.com', debug=False, proxy=None):
16
+ OkxClient.__init__(self, api_key, api_secret_key, passphrase, use_server_time, flag, domain, debug, proxy)
17
+
18
+ def get_account(self):
19
+ return self._request_without_params(GET, OKUSD_ACCOUNT)
20
+
21
+ def get_rate_history(self, limit='', begin='', end=''):
22
+ params = {}
23
+ if limit != '':
24
+ params['limit'] = limit
25
+ if begin != '':
26
+ params['begin'] = begin
27
+ if end != '':
28
+ params['end'] = end
29
+ return self._request_with_params(GET, OKUSD_RATE_HISTORY, params)
30
+
31
+ def get_subscribe_history(self, limit='', begin='', end=''):
32
+ params = {}
33
+ if limit != '':
34
+ params['limit'] = limit
35
+ if begin != '':
36
+ params['begin'] = begin
37
+ if end != '':
38
+ params['end'] = end
39
+ return self._request_with_params(GET, OKUSD_SUBSCRIBE_HISTORY, params)
40
+
41
+ def get_redeem_history(self, limit='', begin='', end='', type=''):
42
+ params = {}
43
+ if limit != '':
44
+ params['limit'] = limit
45
+ if begin != '':
46
+ params['begin'] = begin
47
+ if end != '':
48
+ params['end'] = end
49
+ if type != '':
50
+ params['type'] = type
51
+ return self._request_with_params(GET, OKUSD_REDEEM_HISTORY, params)
52
+
53
+ def get_rewards_history(self, limit='', begin='', end=''):
54
+ params = {}
55
+ if limit != '':
56
+ params['limit'] = limit
57
+ if begin != '':
58
+ params['begin'] = begin
59
+ if end != '':
60
+ params['end'] = end
61
+ return self._request_with_params(GET, OKUSD_REWARDS_HISTORY, params)
@@ -0,0 +1 @@
1
+ from okx.Finance import Okusd # noqa: F401
@@ -31,6 +31,11 @@ class MarketAPI(OkxClient):
31
31
  params = {'instId': instId, 'sz': sz}
32
32
  return self._request_with_params(GET, ORDER_BOOKS, params)
33
33
 
34
+ # Get RPI Order Book
35
+ def get_rpi_orderbook(self, instId, sz=''):
36
+ params = {'instId': instId, 'sz': sz}
37
+ return self._request_with_params(GET, MARKET_BOOKS_RPI, params)
38
+
34
39
  # Get Candlesticks
35
40
  def get_candlesticks(self, instId, after='', before='', bar='', limit=''):
36
41
  params = {'instId': instId, 'after': after, 'before': before, 'bar': bar, 'limit': limit}
@@ -2,4 +2,4 @@
2
2
  Python SDK for the OKX API v5
3
3
 
4
4
  """
5
- __version__="0.4.2"
5
+ __version__="0.4.4"
@@ -16,6 +16,10 @@ APPLICATION_JSON = 'application/json'
16
16
  GET = "GET"
17
17
  POST = "POST"
18
18
 
19
+ # Unset sentinel for credential args — lets public endpoints work without keys.
20
+ # Never signed or transmitted as a real key/secret/passphrase.
21
+ _NO_CREDENTIAL = '-1'
22
+
19
23
  SERVER_TIMESTAMP_URL = '/api/v5/public/time'
20
24
 
21
25
  # Account
@@ -112,6 +116,7 @@ BLOCK_TICKER = '/api/v5/market/block-ticker'
112
116
  BLOCK_TRADES = '/api/v5/market/block-trades'
113
117
  GET_ORDER_LITE_BOOK = '/api/v5/market/books-lite'
114
118
  GET_OPTION_TRADES = '/api/v5/market/option/instrument-family-trades'
119
+ MARKET_BOOKS_RPI = '/api/v5/market/books-rpi'
115
120
 
116
121
  # Public Data
117
122
  INSTRUMENT_INFO = '/api/v5/public/instruments'
@@ -193,6 +198,10 @@ GET_ASSET_SUBACCOUNT_BALANCE = '/api/v5/asset/subaccount/balances'
193
198
  SET_SUB_ACCOUNTS_VIP_LOAN = '/api/v5/account/subaccount/set-loan-allocation'
194
199
  GET_SUB_ACCOUNT_BORROW_INTEREST_AND_LIMIT = '/api/v5/account/subaccount/interest-limits'
195
200
 
201
+ # GLP performance
202
+ GLP_HISTORICAL_PERFORMANCE = '/api/v5/users/glp/historicalperformance'
203
+ GLP_TODAY_PERFORMANCE = '/api/v5/users/glp/todayperformance'
204
+
196
205
  # Convert
197
206
  GET_CURRENCIES = '/api/v5/asset/convert/currencies'
198
207
  GET_CURRENCY_PAIR = '/api/v5/asset/convert/currency-pair'
@@ -260,6 +269,7 @@ GET_PUBLIC_BORROW_HISTORY = '/api/v5/finance/savings/lending-rate-history'
260
269
  STACK_ETH_PRODUCT_INFO = '/api/v5/finance/staking-defi/eth/product-info'
261
270
  STACK_ETH_PURCHASE = '/api/v5/finance/staking-defi/eth/purchase'
262
271
  STACK_ETH_REDEEM = '/api/v5/finance/staking-defi/eth/redeem'
272
+ STACK_ETH_CANCEL_REDEEM = '/api/v5/finance/staking-defi/eth/cancel-redeem'
263
273
  STACK_ETH_BALANCE = '/api/v5/finance/staking-defi/eth/balance'
264
274
  STACK_ETH_PURCHASE_REDEEM_HISTORY = '/api/v5/finance/staking-defi/eth/purchase-redeem-history'
265
275
  STACK_ETH_APY_HISTORY = '/api/v5/finance/staking-defi/eth/apy-history'
@@ -306,6 +316,9 @@ FINANCE_ADJUST_COLLATERAL = '/api/v5/finance/flexible-loan/adjust-collateral'
306
316
  FINANCE_LOAN_INFO = '/api/v5/finance/flexible-loan/loan-info'
307
317
  FINANCE_LOAN_HISTORY = '/api/v5/finance/flexible-loan/loan-history'
308
318
  FINANCE_INTEREST_ACCRUED = '/api/v5/finance/flexible-loan/interest-accrued'
319
+ FINANCE_FLEXIBLE_LOAN_BORROW = '/api/v5/finance/flexible-loan/borrow'
320
+ FINANCE_FLEXIBLE_LOAN_REPAY = '/api/v5/finance/flexible-loan/repay'
321
+ FINANCE_FLEXIBLE_LOAN_EMODE_INFO = '/api/v5/finance/flexible-loan/emode-info'
309
322
 
310
323
  # Dual Investment (DCD) — under /api/v5/finance/sfp/dcd/
311
324
  DUAL_INVEST_CURRENCY_PAIRS = '/api/v5/finance/sfp/dcd/currency-pair'
@@ -317,5 +330,16 @@ DUAL_INVEST_REDEEM = '/api/v5/finance/sfp/dcd/redeem'
317
330
  DUAL_INVEST_ORDER_STATE = '/api/v5/finance/sfp/dcd/order-status'
318
331
  DUAL_INVEST_ORDER_HISTORY = '/api/v5/finance/sfp/dcd/order-history'
319
332
 
333
+ # OKUSD
334
+ OKUSD_ACCOUNT = '/api/v5/finance/okusd/account'
335
+ OKUSD_RATE_HISTORY = '/api/v5/finance/okusd/rate/history'
336
+ OKUSD_SUBSCRIBE_HISTORY = '/api/v5/finance/okusd/subscribe/history'
337
+ OKUSD_REDEEM_HISTORY = '/api/v5/finance/okusd/redeem/history'
338
+ OKUSD_REWARDS_HISTORY = '/api/v5/finance/okusd/rewards/history'
320
339
 
321
-
340
+ # Affiliate TVB
341
+ AFFILIATE_TVB_INVITEE_DETAIL = '/api/v5/affiliate/tvb/invitee/detail'
342
+ AFFILIATE_TVB_INVITEE_LIST = '/api/v5/affiliate/tvb/invitee/list'
343
+ AFFILIATE_TVB_LINK_LIST = '/api/v5/affiliate/tvb/link/list'
344
+ AFFILIATE_TVB_PERFORMANCE_SUMMARY = '/api/v5/affiliate/tvb/performance/summary'
345
+ AFFILIATE_TVB_TIER_BREAKDOWN = '/api/v5/affiliate/tvb/tier-breakdown'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-okx
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Python SDK for OKX
5
5
  Home-page: https://okx.com/docs-v5/
6
6
  Author: okxv5api
@@ -21,13 +21,6 @@ Requires-Dist: requests>=2.25.0
21
21
  Requires-Dist: websockets>=10.0
22
22
  Requires-Dist: certifi>=2021.0.0
23
23
  Requires-Dist: loguru>=0.7.0
24
- Requires-Dist: python-dotenv>=1.0.0
25
- Requires-Dist: pytest>=7.0.0
26
- Requires-Dist: pytest-asyncio>=0.21.0
27
- Requires-Dist: pytest-cov>=4.0.0
28
- Requires-Dist: ruff>=0.1.0
29
- Requires-Dist: build>=1.0.0
30
- Requires-Dist: twine>=4.0.0
31
24
  Dynamic: author
32
25
  Dynamic: author-email
33
26
  Dynamic: classifier
@@ -58,7 +51,6 @@ Make sure you update often and check the [Changelog](https://www.okx.com/docs-v5
58
51
  - Websocket handling with reconnection and multiplexed connections
59
52
 
60
53
  ### Quick start
61
-
62
54
  #### Prerequisites
63
55
 
64
56
  `python version:>=3.7`
@@ -128,7 +120,7 @@ git clone https://github.com/okxapi/python-okx.git
128
120
  cd python-okx
129
121
 
130
122
  # Install dependencies
131
- pip install -r requirements.txt
123
+ pip install -r dev_requirements.txt
132
124
  pip install -e .
133
125
 
134
126
  # Run tests
@@ -3,6 +3,7 @@ README.md
3
3
  requirements.txt
4
4
  setup.py
5
5
  okx/Account.py
6
+ okx/Affiliate.py
6
7
  okx/BlockTrading.py
7
8
  okx/Convert.py
8
9
  okx/CopyTrading.py
@@ -24,6 +25,7 @@ okx/okxclient.py
24
25
  okx/utils.py
25
26
  okx/Finance/EthStaking.py
26
27
  okx/Finance/FlexibleLoan.py
28
+ okx/Finance/Okusd.py
27
29
  okx/Finance/Savings.py
28
30
  okx/Finance/SolStaking.py
29
31
  okx/Finance/StakingDefi.py
@@ -0,0 +1,5 @@
1
+ httpx[http2]>=0.24.0
2
+ requests>=2.25.0
3
+ websockets>=10.0
4
+ certifi>=2021.0.0
5
+ loguru>=0.7.0
@@ -0,0 +1,6 @@
1
+ # Runtime dependencies for python-okx
2
+ httpx[http2]>=0.24.0
3
+ requests>=2.25.0
4
+ websockets>=10.0
5
+ certifi>=2021.0.0
6
+ loguru>=0.7.0
@@ -17,6 +17,9 @@ class EthStakingTest(unittest.TestCase):
17
17
  def test_eth_redeem(self):
18
18
  print(self.StackingAPI.eth_redeem(amt="1"))
19
19
 
20
+ def test_eth_cancel_redeem(self):
21
+ print(self.StackingAPI.eth_cancel_redeem(ordId="1234567890"))
22
+
20
23
  def test_eth_balance(self):
21
24
  print(self.StackingAPI.eth_balance())
22
25
 
File without changes
@@ -1,12 +0,0 @@
1
- httpx[http2]>=0.24.0
2
- requests>=2.25.0
3
- websockets>=10.0
4
- certifi>=2021.0.0
5
- loguru>=0.7.0
6
- python-dotenv>=1.0.0
7
- pytest>=7.0.0
8
- pytest-asyncio>=0.21.0
9
- pytest-cov>=4.0.0
10
- ruff>=0.1.0
11
- build>=1.0.0
12
- twine>=4.0.0
@@ -1,15 +0,0 @@
1
- # Dependencies for python-okx
2
- httpx[http2]>=0.24.0
3
- requests>=2.25.0
4
- websockets>=10.0
5
- certifi>=2021.0.0
6
- loguru>=0.7.0
7
- python-dotenv>=1.0.0
8
-
9
- # Development & Testing
10
- pytest>=7.0.0
11
- pytest-asyncio>=0.21.0
12
- pytest-cov>=4.0.0
13
- ruff>=0.1.0
14
- build>=1.0.0
15
- twine>=4.0.0
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