pybit 5.17.2__tar.gz → 5.18.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 (100) hide show
  1. {pybit-5.17.2 → pybit-5.18.0}/CHANGELOG.md +128 -0
  2. {pybit-5.17.2/pybit.egg-info → pybit-5.18.0}/PKG-INFO +1 -1
  3. pybit-5.18.0/pybit/__init__.py +1 -0
  4. {pybit-5.17.2 → pybit-5.18.0}/pybit/_http_manager.py +4 -1
  5. pybit-5.18.0/pybit/_v5_alpha.py +788 -0
  6. pybit-5.18.0/pybit/_v5_event.py +234 -0
  7. pybit-5.18.0/pybit/_v5_referral.py +85 -0
  8. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_spot_margin_trade.py +33 -0
  9. pybit-5.18.0/pybit/_v5_spot_x.py +169 -0
  10. pybit-5.18.0/pybit/alpha.py +42 -0
  11. pybit-5.18.0/pybit/event.py +17 -0
  12. pybit-5.18.0/pybit/referral.py +11 -0
  13. {pybit-5.17.2 → pybit-5.18.0}/pybit/spot_margin_trade.py +3 -0
  14. pybit-5.18.0/pybit/spot_x.py +14 -0
  15. {pybit-5.17.2 → pybit-5.18.0}/pybit/unified_trading.py +8 -2
  16. {pybit-5.17.2 → pybit-5.18.0/pybit.egg-info}/PKG-INFO +1 -1
  17. {pybit-5.17.2 → pybit-5.18.0}/pybit.egg-info/SOURCES.txt +8 -2
  18. pybit-5.18.0/tests/test_generated_openapi_endpoints.py +637 -0
  19. {pybit-5.17.2 → pybit-5.18.0}/tests/test_pybit.py +6 -0
  20. pybit-5.17.2/pybit/__init__.py +0 -1
  21. pybit-5.17.2/pybit/_v5_rwa.py +0 -174
  22. pybit-5.17.2/pybit/rwa.py +0 -16
  23. pybit-5.17.2/tests/test_generated_openapi_endpoints.py +0 -290
  24. {pybit-5.17.2 → pybit-5.18.0}/LICENSE +0 -0
  25. {pybit-5.17.2 → pybit-5.18.0}/MANIFEST.in +0 -0
  26. {pybit-5.17.2 → pybit-5.18.0}/README.md +0 -0
  27. {pybit-5.17.2 → pybit-5.18.0}/examples/direct_session.py +0 -0
  28. {pybit-5.17.2 → pybit-5.18.0}/examples/http_example_explanatory.py +0 -0
  29. {pybit-5.17.2 → pybit-5.18.0}/examples/http_example_quickstart.py +0 -0
  30. {pybit-5.17.2 → pybit-5.18.0}/examples/http_example_rsa_authentication.py +0 -0
  31. {pybit-5.17.2 → pybit-5.18.0}/examples/p2p_example_explanatory.py +0 -0
  32. {pybit-5.17.2 → pybit-5.18.0}/examples/p2p_example_quickstart.py +0 -0
  33. {pybit-5.17.2 → pybit-5.18.0}/examples/websocket_example_explanatory.py +0 -0
  34. {pybit-5.17.2 → pybit-5.18.0}/examples/websocket_example_quickstart.py +0 -0
  35. {pybit-5.17.2 → pybit-5.18.0}/examples/websocket_example_rsa_authentication.py +0 -0
  36. {pybit-5.17.2 → pybit-5.18.0}/examples/websocket_http_example_spread_trading_quickstart.py +0 -0
  37. {pybit-5.17.2 → pybit-5.18.0}/examples/websocket_trading_example_quickstart.py +0 -0
  38. {pybit-5.17.2 → pybit-5.18.0}/examples/websocket_unsubscribe_example.py +0 -0
  39. {pybit-5.17.2 → pybit-5.18.0}/examples/wrapper_class.py +0 -0
  40. {pybit-5.17.2 → pybit-5.18.0}/pybit/_helpers.py +0 -0
  41. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_account.py +0 -0
  42. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_asset.py +0 -0
  43. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_broker.py +0 -0
  44. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_crypto_loan.py +0 -0
  45. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_dca.py +0 -0
  46. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_earn.py +0 -0
  47. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_fcombobot.py +0 -0
  48. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_fgridbot.py +0 -0
  49. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_fht.py +0 -0
  50. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_fiat.py +0 -0
  51. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_fmartingalebot.py +0 -0
  52. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_grid.py +0 -0
  53. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_institutional_loan.py +0 -0
  54. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_market.py +0 -0
  55. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_misc.py +0 -0
  56. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_p2p.py +0 -0
  57. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_position.py +0 -0
  58. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_pre_upgrade.py +0 -0
  59. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_rate_limit.py +0 -0
  60. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_rfq.py +0 -0
  61. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_spot_leverage_token.py +0 -0
  62. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_spread.py +0 -0
  63. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_strategy.py +0 -0
  64. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_trade.py +0 -0
  65. {pybit-5.17.2 → pybit-5.18.0}/pybit/_v5_user.py +0 -0
  66. {pybit-5.17.2 → pybit-5.18.0}/pybit/_websocket_stream.py +0 -0
  67. {pybit-5.17.2 → pybit-5.18.0}/pybit/_websocket_trading.py +0 -0
  68. {pybit-5.17.2 → pybit-5.18.0}/pybit/account.py +0 -0
  69. {pybit-5.17.2 → pybit-5.18.0}/pybit/asset.py +0 -0
  70. {pybit-5.17.2 → pybit-5.18.0}/pybit/broker.py +0 -0
  71. {pybit-5.17.2 → pybit-5.18.0}/pybit/crypto_loan.py +0 -0
  72. {pybit-5.17.2 → pybit-5.18.0}/pybit/dca.py +0 -0
  73. {pybit-5.17.2 → pybit-5.18.0}/pybit/earn.py +0 -0
  74. {pybit-5.17.2 → pybit-5.18.0}/pybit/exceptions.py +0 -0
  75. {pybit-5.17.2 → pybit-5.18.0}/pybit/fcombobot.py +0 -0
  76. {pybit-5.17.2 → pybit-5.18.0}/pybit/fgridbot.py +0 -0
  77. {pybit-5.17.2 → pybit-5.18.0}/pybit/fht.py +0 -0
  78. {pybit-5.17.2 → pybit-5.18.0}/pybit/fiat.py +0 -0
  79. {pybit-5.17.2 → pybit-5.18.0}/pybit/fmartingalebot.py +0 -0
  80. {pybit-5.17.2 → pybit-5.18.0}/pybit/grid.py +0 -0
  81. {pybit-5.17.2 → pybit-5.18.0}/pybit/helpers.py +0 -0
  82. {pybit-5.17.2 → pybit-5.18.0}/pybit/institutional_loan.py +0 -0
  83. {pybit-5.17.2 → pybit-5.18.0}/pybit/market.py +0 -0
  84. {pybit-5.17.2 → pybit-5.18.0}/pybit/misc.py +0 -0
  85. {pybit-5.17.2 → pybit-5.18.0}/pybit/p2p.py +0 -0
  86. {pybit-5.17.2 → pybit-5.18.0}/pybit/position.py +0 -0
  87. {pybit-5.17.2 → pybit-5.18.0}/pybit/pre_upgrade.py +0 -0
  88. {pybit-5.17.2 → pybit-5.18.0}/pybit/rate_limit.py +0 -0
  89. {pybit-5.17.2 → pybit-5.18.0}/pybit/rfq.py +0 -0
  90. {pybit-5.17.2 → pybit-5.18.0}/pybit/spot_leverage_token.py +0 -0
  91. {pybit-5.17.2 → pybit-5.18.0}/pybit/spread.py +0 -0
  92. {pybit-5.17.2 → pybit-5.18.0}/pybit/strategy.py +0 -0
  93. {pybit-5.17.2 → pybit-5.18.0}/pybit/trade.py +0 -0
  94. {pybit-5.17.2 → pybit-5.18.0}/pybit/user.py +0 -0
  95. {pybit-5.17.2 → pybit-5.18.0}/pybit.egg-info/dependency_links.txt +0 -0
  96. {pybit-5.17.2 → pybit-5.18.0}/pybit.egg-info/not-zip-safe +0 -0
  97. {pybit-5.17.2 → pybit-5.18.0}/pybit.egg-info/requires.txt +0 -0
  98. {pybit-5.17.2 → pybit-5.18.0}/pybit.egg-info/top_level.txt +0 -0
  99. {pybit-5.17.2 → pybit-5.18.0}/setup.cfg +0 -0
  100. {pybit-5.17.2 → pybit-5.18.0}/setup.py +0 -0
@@ -1,5 +1,133 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.18.0] - 2026-11-24
4
+
5
+ ### New Methods (58)
6
+
7
+ - `query_fixed_borrow_penalty_interest`
8
+ - `cancel_fixed_borrow_order`
9
+ - `get_lp_order_list`
10
+ - `get_lp_pay_token_list`
11
+ - `get_lp_pay_token_price`
12
+ - `get_lp_pool_info`
13
+ - `get_lp_pool_list`
14
+ - `get_lp_position_list`
15
+ - `execute_lp_redeem`
16
+ - `execute_lp_stake`
17
+ - `execute_prediction_buy`
18
+ - `get_prediction_engine_status`
19
+ - `get_prediction_event_detail`
20
+ - `get_prediction_order_book`
21
+ - `get_prediction_order_estimate`
22
+ - `get_prediction_order_list`
23
+ - `get_prediction_pay_token_list`
24
+ - `get_prediction_portfolio_summary`
25
+ - `get_prediction_position_history`
26
+ - `get_prediction_position_list`
27
+ - `get_prediction_price_history`
28
+ - `execute_prediction_sell`
29
+ - `get_prediction_side_market_list`
30
+ - `get_prediction_group_stage_detail`
31
+ - `get_prediction_match_list`
32
+ - `get_prediction_timeline_stages`
33
+ - `get_prediction_token_price`
34
+ - `get_asset_detail`
35
+ - `get_alpha_asset_list`
36
+ - `get_biz_token_details`
37
+ - `get_biz_token_list`
38
+ - `get_biz_token_price_list`
39
+ - `get_alpha_order_list`
40
+ - `get_pay_token_list`
41
+ - `execute_purchase`
42
+ - `get_trade_quote`
43
+ - `execute_alpha_redeem`
44
+ - `get_ec_order_history`
45
+ - `get_ec_active_orders`
46
+ - `get_ec_position_info`
47
+ - `get_ec_settlements`
48
+ - `get_ec_trade_history`
49
+ - `get_ec_instruments_info`
50
+ - `get_ec_orderbook`
51
+ - `submit_ec_quote`
52
+ - `cancel_ec_quote`
53
+ - `cancel_all_ec_quotes`
54
+ - `get_referral_campaign_rewards`
55
+ - `get_referral_commission_records`
56
+ - `get_referral_user_identity_profile`
57
+ - `get_referral_user_invitations`
58
+ - `get_launchpool_project_list`
59
+ - `get_launchpool_user_activity_log`
60
+ - `get_launchpool_user_current_staking`
61
+ - `get_launchpool_user_history`
62
+ - `get_puzzle_project_list`
63
+ - `get_token_splash_project_list`
64
+ - `get_token_splash_user_activity_params`
65
+
66
+ ### New Endpoint Keys (58)
67
+
68
+ - `SpotMarginTrade.QUERY_FIXED_BORROW_PENALTY_INTEREST`
69
+ - `SpotMarginTrade.CANCEL_FIXED_BORROW_ORDER`
70
+ - `Alpha.GET_LP_ORDER_LIST`
71
+ - `Alpha.GET_LP_PAY_TOKEN_LIST`
72
+ - `Alpha.GET_LP_PAY_TOKEN_PRICE`
73
+ - `Alpha.GET_LP_POOL_INFO`
74
+ - `Alpha.GET_LP_POOL_LIST`
75
+ - `Alpha.GET_LP_POSITION_LIST`
76
+ - `Alpha.EXECUTE_LP_REDEEM`
77
+ - `Alpha.EXECUTE_LP_STAKE`
78
+ - `Alpha.EXECUTE_PREDICTION_BUY`
79
+ - `Alpha.GET_PREDICTION_ENGINE_STATUS`
80
+ - `Alpha.GET_PREDICTION_EVENT_DETAIL`
81
+ - `Alpha.GET_PREDICTION_ORDER_BOOK`
82
+ - `Alpha.GET_PREDICTION_ORDER_ESTIMATE`
83
+ - `Alpha.GET_PREDICTION_ORDER_LIST`
84
+ - `Alpha.GET_PREDICTION_PAY_TOKEN_LIST`
85
+ - `Alpha.GET_PREDICTION_PORTFOLIO_SUMMARY`
86
+ - `Alpha.GET_PREDICTION_POSITION_HISTORY`
87
+ - `Alpha.GET_PREDICTION_POSITION_LIST`
88
+ - `Alpha.GET_PREDICTION_PRICE_HISTORY`
89
+ - `Alpha.EXECUTE_PREDICTION_SELL`
90
+ - `Alpha.GET_PREDICTION_SIDE_MARKET_LIST`
91
+ - `Alpha.GET_PREDICTION_GROUP_STAGE_DETAIL`
92
+ - `Alpha.GET_PREDICTION_MATCH_LIST`
93
+ - `Alpha.GET_PREDICTION_TIMELINE_STAGES`
94
+ - `Alpha.GET_PREDICTION_TOKEN_PRICE`
95
+ - `Alpha.GET_ASSET_DETAIL`
96
+ - `Alpha.GET_ASSET_LIST`
97
+ - `Alpha.GET_BIZ_TOKEN_DETAILS`
98
+ - `Alpha.GET_BIZ_TOKEN_LIST`
99
+ - `Alpha.GET_BIZ_TOKEN_PRICE_LIST`
100
+ - `Alpha.GET_ORDER_LIST`
101
+ - `Alpha.GET_PAY_TOKEN_LIST`
102
+ - `Alpha.EXECUTE_PURCHASE`
103
+ - `Alpha.GET_TRADE_QUOTE`
104
+ - `Alpha.EXECUTE_REDEEM`
105
+ - `Event.GET_EC_ORDER_HISTORY`
106
+ - `Event.GET_EC_ACTIVE_ORDERS`
107
+ - `Event.GET_EC_POSITION_INFO`
108
+ - `Event.GET_EC_SETTLEMENTS`
109
+ - `Event.GET_EC_TRADE_HISTORY`
110
+ - `Event.GET_EC_INSTRUMENTS_INFO`
111
+ - `Event.GET_EC_ORDERBOOK`
112
+ - `Event.SUBMIT_EC_QUOTE`
113
+ - `Event.CANCEL_EC_QUOTE`
114
+ - `Event.CANCEL_ALL_EC_QUOTES`
115
+ - `Referral.GET_REFERRAL_CAMPAIGN_REWARDS`
116
+ - `Referral.GET_REFERRAL_COMMISSION_RECORDS`
117
+ - `Referral.GET_REFERRAL_USER_IDENTITY_PROFILE`
118
+ - `Referral.GET_REFERRAL_USER_INVITATIONS`
119
+ - `SpotX.GET_LAUNCHPOOL_PROJECT_LIST`
120
+ - `SpotX.GET_LAUNCHPOOL_USER_ACTIVITY_LOG`
121
+ - `SpotX.GET_LAUNCHPOOL_USER_CURRENT_STAKING`
122
+ - `SpotX.GET_LAUNCHPOOL_USER_HISTORY`
123
+ - `SpotX.GET_PUZZLE_PROJECT_LIST`
124
+ - `SpotX.GET_TOKEN_SPLASH_PROJECT_LIST`
125
+ - `SpotX.GET_TOKEN_SPLASH_USER_ACTIVITY_PARAMS`
126
+
127
+ ### Removed
128
+
129
+ - **Breaking change:** Removed the `RWAHTTP` and `RWA` SDK interfaces for
130
+ `/v5/rwa/stocks/*`, which are temporarily not supported.
3
131
 
4
132
  ## [5.17.2] - 2026-10-13
5
133
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pybit
3
- Version: 5.17.2
3
+ Version: 5.18.0
4
4
  Summary: Python3 Bybit HTTP/WebSocket API Connector
5
5
  Home-page: https://github.com/bybit-exchange/pybit
6
6
  Author: Dexter Dickinson
@@ -0,0 +1 @@
1
+ VERSION = "5.18.0"
@@ -108,13 +108,16 @@ class _V5HTTPManager:
108
108
  force_retry: bool = field(default=False)
109
109
  retry_codes: defaultdict[dict] = field(default_factory=dict)
110
110
  ignore_codes: set = field(default_factory=set)
111
- max_retries: bool = field(default=3)
111
+ max_retries: int = field(default=3)
112
112
  retry_delay: bool = field(default=3)
113
113
  referral_id: str = field(default=None)
114
114
  record_request_time: bool = field(default=False)
115
115
  return_response_headers: bool = field(default=False)
116
116
 
117
117
  def __post_init__(self):
118
+ if self.max_retries < 1:
119
+ raise ValueError("max_retries must be at least 1")
120
+
118
121
  subdomain = SUBDOMAIN_TESTNET if self.testnet else SUBDOMAIN_MAINNET
119
122
  domain = DOMAIN_MAIN if not self.domain else self.domain
120
123
  if self.demo: