Releases: bybit-exchange/pybit
Releases · bybit-exchange/pybit
5.7.0
[5.7.0] - 2024-04-11
Added
- Demo Trading support
- Add methods for the Institutional Loan endpoints
- Add Account methods
repay_liability()
,set_collateral_coin()
,batch_set_collateral_coin()
tld
arg for users in The Netherlands and Hong Kong forHTTP
sessions
Fixed
- Options WebSocket failing to maintain connection (#164)
5.6.1
5.6.0
[5.6.0] - 2023-09-28
Added
- Add RSA authentication for HTTP and WebSocket (choose "Self-generated API Keys" when creating an API key) (#157)
- Add the
HTTP
methodget_server_time()
- Add
HTTP
methods for spot margin trading - Add
HTTP
methodget_long_short_ratio()
- Add optional
private_auth_expire
arg for WebSocket (#154)
Deprecated
- The
HTTP
methodenable_universal_transfer_for_sub_uid()
Fixed
- Improve
close_position()
logic
[5.5.0] - 2023-07-17
Added
helpers.py
which includes theHelpers
class and theclose_position()
method, which can be imported and employed like so:
from pybit.helpers import Helpers
my_helper = Helpers(session) # your HTTP session object (eg, from pybit.unified_trading import HTTP)
print(my_helper.close_position(category="linear", symbol="BTCUSDT"))
[5.4.0] - 2023-06-23
Added
- The following new endpoints to
unified_trading
:get_broker_earnings
get_announcement
get_pre_upgrade_order_history
get_pre_upgrade_trade_history
get_pre_upgrade_closed_pnl
get_pre_upgrade_transaction_log
get_pre_upgrade_option_delivery_record
get_pre_upgrade_usdc_session_settlement
get_affiliate_user_info
get_uid_wallet_type
5.3.0
[5.3.0] - 2023-05-19
Added
- Multiple symbol support for WebSocket topics (pass
symbol
as a list) - Extra logging (log response headers) when passing
log_requests=True
- Argument
return_response_headers
forHTTP
to allow returning the response headers to the user
Modified
- Add response headers to exceptions
Fixed
- Update PyPI package's python version so that only =>3.9 is supported to prevent the error:
TypeError: 'type' object is not subscriptable
- Fix API rate limit handling
- Remove unnecessary
print
statements in two methods
5.2.0
[5.2.0] - 2023-04-18
Added
- New asset endpoints:
set_deposit_account()
,get_internal_deposit_records()
,get_withdrawable_amount()
Fixed
- Ensure that
legacy
submodule is packaged bysetup.py
- Fix non-UTA (normal account) spot margin trading endpoints
- Fix wrong request method for
set_dcp()
5.1.1
[5.1.1] - 2023-04-06
Added
- HTTP endpoints to the
copy_trading
module
Modified
- Docstrings in the
copy_trading
module to make it easier to find the API documentation for reference - Example files
Fixed
ticker_stream
method in theunified_trading
module, which was subscribing to the wrong WebSocket topic
5.0.0
[5.0.0] - 2023-04-03
This version upgrades pybit to Bybit's version 5 (v5) APIs. It supports both Unified Trading Accounts (UTA) and non-UTA accounts. Bybit is not expected to develop any more major API versions in the future, so Bybit's v5 API (and subsequently, pybit's 5.0.0) is expected to be supported in the long-term.
See the examples folder for examples on how to interact with the latest modules.
Added
- Bybit's v5 HTTP and WebSocket APIs in the
unified_trading
module. See what markets All-In-One V5 API supports in the upgrade guide.
Modified
- Non-v5 modules like
copy_trading
,usdc_options
, andusdc_perpetuals
to continue to work from alegacy
subpackage. Import like so:from pybit.legacy.copy_trading import HTTP
. These modules are maintained because they are currently not supported by the v5 API; see the upgrade guide.
Removed
- Various legacy modules which have been superseded by the v5 API via the
unified_trading
module
Fixed
- Tests for V5 endpoints
2.4.1
[2.4.1] - 2022-10-07
- See below release candidates for further changes.
Fixed
- Wrong endpoint path in
usdc_perpetual.py
- Wrong endpoint path in
account_asset.py
[2.4.0rc1] - 2022-09-20
Fixed
- USDC API's timestamp parameter
[2.4.0rc0] - 2022-09-15
Modified
- The way in which the WebSocket handles errors, improving general usage and debugging (tracebacks) as well as clearly defining under which errors should the WebSocket attempt reconnection.
Fixed
- USDC API's timestamp parameter to avoid the occasional ret_msg: error sign!
2.4.0
[2.4.0] - 2022-07-26
Added
HTTP
methods for account asset's universal transfer API
Fixed
- USDC API to use the user's set
recv_window
Modified
- Did some internal code reorganisation