Class: Bybit::RestApi::PreUpgradeService
- Inherits:
-
BaseService
- Object
- BaseService
- Bybit::RestApi::PreUpgradeService
- Defined in:
- lib/bybit/rest_api/pre_upgrade_service.rb
Overview
/v5/pre-upgrade/* — historical queries scoped to activity that occurred BEFORE a Classic → UTA account upgrade. These records live in the legacy partition and never merge into the UTA tables, so callers upgrading from older SDKs need a dedicated namespace to fetch them.
Instance Method Summary collapse
-
#get_closed_pnl(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Closed PnL.
-
#get_option_delivery_record(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Option Delivery Record.
-
#get_order_history(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Order History.
-
#get_trade_history(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Trade (Execution) History.
-
#get_transaction_log(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Transaction Log (USDC Derivatives wallet).
-
#get_usdc_session_settlement(category:, **kwargs) ⇒ Hash
Get Pre-upgrade USDC Session Settlement Record.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Bybit::RestApi::BaseService
Instance Method Details
#get_closed_pnl(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Closed PnL
GET /v5/pre-upgrade/position/closed-pnl
Bybit V5 only requires symbol when category is inverse; for
linear it's optional. Keep it as an optional kwarg here — callers
querying inverse pass it, callers on linear can omit it.
71 72 73 74 75 |
# File 'lib/bybit/rest_api/pre_upgrade_service.rb', line 71 def get_closed_pnl(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/pre-upgrade/position/closed-pnl', params: params) end |
#get_option_delivery_record(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Option Delivery Record
GET /v5/pre-upgrade/asset/delivery-record
107 108 109 110 111 |
# File 'lib/bybit/rest_api/pre_upgrade_service.rb', line 107 def get_option_delivery_record(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/pre-upgrade/asset/delivery-record', params: params) end |
#get_order_history(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Order History
GET /v5/pre-upgrade/order/history
27 28 29 30 31 |
# File 'lib/bybit/rest_api/pre_upgrade_service.rb', line 27 def get_order_history(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/pre-upgrade/order/history', params: params) end |
#get_trade_history(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Trade (Execution) History
GET /v5/pre-upgrade/execution/list
49 50 51 52 53 |
# File 'lib/bybit/rest_api/pre_upgrade_service.rb', line 49 def get_trade_history(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/pre-upgrade/execution/list', params: params) end |
#get_transaction_log(category:, **kwargs) ⇒ Hash
Get Pre-upgrade Transaction Log (USDC Derivatives wallet)
GET /v5/pre-upgrade/account/transaction-log
90 91 92 93 94 |
# File 'lib/bybit/rest_api/pre_upgrade_service.rb', line 90 def get_transaction_log(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/pre-upgrade/account/transaction-log', params: params) end |
#get_usdc_session_settlement(category:, **kwargs) ⇒ Hash
Get Pre-upgrade USDC Session Settlement Record
GET /v5/pre-upgrade/asset/settlement-record
123 124 125 126 127 |
# File 'lib/bybit/rest_api/pre_upgrade_service.rb', line 123 def get_usdc_session_settlement(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/pre-upgrade/asset/settlement-record', params: params) end |