Skip to content

Releases: bybit-exchange/pybit

5.7.0

11 Apr 17:56
867ee0f
Compare
Choose a tag to compare

[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 for HTTP sessions

Fixed

  • Options WebSocket failing to maintain connection (#164)

5.6.1

09 Oct 19:59
1983fba
Compare
Choose a tag to compare

[5.6.1] - 2023-10-09

Changed

  • Improved the IP rate limit error message to indicate that an HTTP status code 403 may also mean that the IP address was identified as being from the USA – all requests from USA IPs are banned by Bybit.

5.6.0

28 Sep 17:48
852a3f5
Compare
Choose a tag to compare

[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)
    • To use it, pass rsa_authentication=True along with your api_key and api_secret
      • Your api_key is given to you after inputting your public key (RSA) into Bybit's API management system
      • Your api_secret is the private key (RSA) you generate
    • Learn more here
    • See examples files: HTTP and WebSocket
  • Add the HTTP method get_server_time()
  • Add HTTP methods for spot margin trading
  • Add HTTP method get_long_short_ratio()
  • Add optional private_auth_expire arg for WebSocket (#154)

Deprecated

  • The HTTP method enable_universal_transfer_for_sub_uid()

Fixed

  • Improve close_position() logic

[5.5.0] - 2023-07-17

Added

  • helpers.py which includes the Helpers class and the close_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

19 May 19:15
2ffeb7d
Compare
Choose a tag to compare

[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 for HTTP 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

18 Apr 19:12
6c50a98
Compare
Choose a tag to compare

[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 by setup.py
  • Fix non-UTA (normal account) spot margin trading endpoints
  • Fix wrong request method for set_dcp()

5.1.1

06 Apr 11:22
c684969
Compare
Choose a tag to compare

[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 the unified_trading module, which was subscribing to the wrong WebSocket topic

5.0.0

03 Apr 15:39
1b7162b
Compare
Choose a tag to compare

[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, and usdc_perpetuals to continue to work from a legacy 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

07 Oct 17:10
4682469
Compare
Choose a tag to compare

[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

26 Jul 17:04
42557f4
Compare
Choose a tag to compare

[2.4.0] - 2022-07-26

Added

Fixed

  • USDC API to use the user's set recv_window

Modified

  • Did some internal code reorganisation

2.3.1

20 Jul 09:16
bdb38c1
Compare
Choose a tag to compare

[2.3.1] - 2022-07-20

Modified

  • The ping_interval to 20 seconds to ensure WSS connection stability