Class: Bybit::RestApi::SpotMarginService
- Inherits:
-
BaseService
- Object
- BaseService
- Bybit::RestApi::SpotMarginService
- Defined in:
- lib/bybit/rest_api/spot_margin_service.rb
Instance Method Summary collapse
-
#get_historical_interest_rate(currency:, **kwargs) ⇒ Hash
Get historical interest rate for spot margin trading.
-
#get_position_tiers(**kwargs) ⇒ Hash
Get spot margin position tiers.
-
#get_tiered_collateral_ratio(**kwargs) ⇒ Hash
Get tiered collateral ratio for spot margin trading.
-
#get_vip_margin_data(**kwargs) ⇒ Hash
Get VIP margin data for spot margin trading.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Bybit::RestApi::BaseService
Instance Method Details
#get_historical_interest_rate(currency:, **kwargs) ⇒ Hash
Get historical interest rate for spot margin trading.
GET /v5/spot-margin-trade/interest-rate-history
16 17 18 19 20 |
# File 'lib/bybit/rest_api/spot_margin_service.rb', line 16 def get_historical_interest_rate(currency:, **kwargs) params = kwargs.merge(currency: currency) params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/spot-margin-trade/interest-rate-history', params: params) end |
#get_position_tiers(**kwargs) ⇒ Hash
Get spot margin position tiers.
GET /v5/spot-margin-trade/position-tiers
29 30 31 32 33 |
# File 'lib/bybit/rest_api/spot_margin_service.rb', line 29 def get_position_tiers(**kwargs) params = kwargs.dup params = Bybit::Utils::WireKeys.camelize(params) @session.sign_request(method: :get, path: '/v5/spot-margin-trade/position-tiers', params: params) end |
#get_tiered_collateral_ratio(**kwargs) ⇒ Hash
Get tiered collateral ratio for spot margin trading.
GET /v5/spot-margin-trade/collateral
41 42 43 44 45 |
# File 'lib/bybit/rest_api/spot_margin_service.rb', line 41 def get_tiered_collateral_ratio(**kwargs) params = kwargs.dup params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/spot-margin-trade/collateral', params: params) end |
#get_vip_margin_data(**kwargs) ⇒ Hash
Get VIP margin data for spot margin trading.
GET /v5/spot-margin-trade/data
55 56 57 58 59 |
# File 'lib/bybit/rest_api/spot_margin_service.rb', line 55 def get_vip_margin_data(**kwargs) params = kwargs.dup params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/spot-margin-trade/data', params: params) end |