Class: Bybit::RestApi::MarketService
- Inherits:
-
BaseService
- Object
- BaseService
- Bybit::RestApi::MarketService
- Defined in:
- lib/bybit/rest_api/market_service.rb
Instance Method Summary collapse
-
#get_adl_alert(**kwargs) ⇒ Hash
Get ADL alert information for the specified symbol.
-
#get_delivery_price(category:, **kwargs) ⇒ Hash
Get the delivery price for delivery contracts.
-
#get_fee_group_info(product_type:, **kwargs) ⇒ Hash
Get the fee group structure information.
-
#get_funding_rate_history(category:, symbol:, **kwargs) ⇒ Hash
Get the historical funding rate for a symbol.
-
#get_historical_volatility(category:, **kwargs) ⇒ Hash
Get the historical volatility for options.
-
#get_index_price_components(index_name:, **kwargs) ⇒ Hash
Get the components of the index price.
-
#get_index_price_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get index price kline data for a symbol.
-
#get_instruments_info(category:, **kwargs) ⇒ Hash
Get the specification of instruments.
-
#get_insurance_pool(**kwargs) ⇒ Hash
Get the insurance pool balance data.
-
#get_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get kline (candlestick) data for a symbol.
-
#get_long_short_ratio(category:, symbol:, period:, **kwargs) ⇒ Hash
Get the long/short account ratio for a symbol.
-
#get_mark_price_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get mark price kline data for a symbol.
-
#get_new_delivery_price(category:, base_coin:, **kwargs) ⇒ Hash
Get the new delivery price for delivery contracts.
-
#get_open_interest(category:, symbol:, interval_time:, **kwargs) ⇒ Hash
Get the open interest data for a symbol.
-
#get_order_price_limit(symbol:, **kwargs) ⇒ Hash
Get the order price limit for a symbol.
-
#get_orderbook(category:, symbol:, **kwargs) ⇒ Hash
Get orderbook data for a specified symbol and category.
-
#get_premium_index_price_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get premium index price kline data.
-
#get_recent_public_trades(category:, **kwargs) ⇒ Hash
Get recent public trades.
-
#get_risk_limit(category:, **kwargs) ⇒ Hash
Get risk limit information.
-
#get_rpi_orderbook(symbol:, limit:, **kwargs) ⇒ Hash
Get RPI (Retail Price Improvement) orderbook data.
-
#get_server_time ⇒ Object
Get Bybit server time.
-
#get_tickers(category:, **kwargs) ⇒ Hash
Get tickers information for a specified category.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Bybit::RestApi::BaseService
Instance Method Details
#get_adl_alert(**kwargs) ⇒ Hash
Get ADL alert information for the specified symbol.
GET /v5/market/adlalert
13 14 15 16 17 |
# File 'lib/bybit/rest_api/market_service.rb', line 13 def get_adl_alert(**kwargs) params = kwargs.dup params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/adlAlert', params: params) end |
#get_delivery_price(category:, **kwargs) ⇒ Hash
Get the delivery price for delivery contracts.
GET /v5/market/delivery-price
31 32 33 34 35 |
# File 'lib/bybit/rest_api/market_service.rb', line 31 def get_delivery_price(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/delivery-price', params: params) end |
#get_fee_group_info(product_type:, **kwargs) ⇒ Hash
Get the fee group structure information.
GET /v5/market/fee-group-info
45 46 47 48 49 |
# File 'lib/bybit/rest_api/market_service.rb', line 45 def get_fee_group_info(product_type:, **kwargs) params = kwargs.merge(product_type: product_type) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/fee-group-info', params: params) end |
#get_funding_rate_history(category:, symbol:, **kwargs) ⇒ Hash
Get the historical funding rate for a symbol.
GET /v5/market/funding/history
62 63 64 65 66 |
# File 'lib/bybit/rest_api/market_service.rb', line 62 def get_funding_rate_history(category:, symbol:, **kwargs) params = kwargs.merge(category: category, symbol: symbol) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/funding/history', params: params) end |
#get_historical_volatility(category:, **kwargs) ⇒ Hash
Get the historical volatility for options.
GET /v5/market/historical-volatility
80 81 82 83 84 |
# File 'lib/bybit/rest_api/market_service.rb', line 80 def get_historical_volatility(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/historical-volatility', params: params) end |
#get_index_price_components(index_name:, **kwargs) ⇒ Hash
Get the components of the index price.
GET /v5/market/index-price-components
92 93 94 95 96 |
# File 'lib/bybit/rest_api/market_service.rb', line 92 def get_index_price_components(index_name:, **kwargs) params = kwargs.merge(index_name: index_name) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/index-price-components', params: params) end |
#get_index_price_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get index price kline data for a symbol.
GET /v5/market/index-price-kline
110 111 112 113 114 |
# File 'lib/bybit/rest_api/market_service.rb', line 110 def get_index_price_kline(symbol:, interval:, **kwargs) params = kwargs.merge(symbol: symbol, interval: interval) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/index-price-kline', params: params) end |
#get_instruments_info(category:, **kwargs) ⇒ Hash
Get the specification of instruments.
GET /v5/market/instruments-info
128 129 130 131 132 |
# File 'lib/bybit/rest_api/market_service.rb', line 128 def get_instruments_info(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/instruments-info', params: params) end |
#get_insurance_pool(**kwargs) ⇒ Hash
Get the insurance pool balance data.
GET /v5/market/insurance
141 142 143 144 145 |
# File 'lib/bybit/rest_api/market_service.rb', line 141 def get_insurance_pool(**kwargs) params = kwargs.dup params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/insurance', params: params) end |
#get_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get kline (candlestick) data for a symbol.
GET /v5/market/kline
196 197 198 199 200 |
# File 'lib/bybit/rest_api/market_service.rb', line 196 def get_kline(symbol:, interval:, **kwargs) params = kwargs.merge(symbol: symbol, interval: interval) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/kline', params: params) end |
#get_long_short_ratio(category:, symbol:, period:, **kwargs) ⇒ Hash
Get the long/short account ratio for a symbol.
GET /v5/market/account-ratio
160 161 162 163 164 |
# File 'lib/bybit/rest_api/market_service.rb', line 160 def get_long_short_ratio(category:, symbol:, period:, **kwargs) params = kwargs.merge(category: category, symbol: symbol, period: period) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/account-ratio', params: params) end |
#get_mark_price_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get mark price kline data for a symbol.
GET /v5/market/mark-price-kline
178 179 180 181 182 |
# File 'lib/bybit/rest_api/market_service.rb', line 178 def get_mark_price_kline(symbol:, interval:, **kwargs) params = kwargs.merge(symbol: symbol, interval: interval) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/mark-price-kline', params: params) end |
#get_new_delivery_price(category:, base_coin:, **kwargs) ⇒ Hash
Get the new delivery price for delivery contracts.
GET /v5/market/new-delivery-price
211 212 213 214 215 |
# File 'lib/bybit/rest_api/market_service.rb', line 211 def get_new_delivery_price(category:, base_coin:, **kwargs) params = kwargs.merge(category: category, base_coin: base_coin) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/new-delivery-price', params: params) end |
#get_open_interest(category:, symbol:, interval_time:, **kwargs) ⇒ Hash
Get the open interest data for a symbol.
GET /v5/market/open-interest
230 231 232 233 234 |
# File 'lib/bybit/rest_api/market_service.rb', line 230 def get_open_interest(category:, symbol:, interval_time:, **kwargs) params = kwargs.merge(category: category, symbol: symbol, interval_time: interval_time) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/open-interest', params: params) end |
#get_order_price_limit(symbol:, **kwargs) ⇒ Hash
Get the order price limit for a symbol.
GET /v5/market/price-limit
243 244 245 246 247 |
# File 'lib/bybit/rest_api/market_service.rb', line 243 def get_order_price_limit(symbol:, **kwargs) params = kwargs.merge(symbol: symbol) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/price-limit', params: params) end |
#get_orderbook(category:, symbol:, **kwargs) ⇒ Hash
Get orderbook data for a specified symbol and category.
GET /v5/market/orderbook
258 259 260 261 262 |
# File 'lib/bybit/rest_api/market_service.rb', line 258 def get_orderbook(category:, symbol:, **kwargs) params = kwargs.merge(category: category, symbol: symbol) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/orderbook', params: params) end |
#get_premium_index_price_kline(symbol:, interval:, **kwargs) ⇒ Hash
Get premium index price kline data.
GET /v5/market/premium-index-price-kline
276 277 278 279 280 |
# File 'lib/bybit/rest_api/market_service.rb', line 276 def get_premium_index_price_kline(symbol:, interval:, **kwargs) params = kwargs.merge(symbol: symbol, interval: interval) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/premium-index-price-kline', params: params) end |
#get_recent_public_trades(category:, **kwargs) ⇒ Hash
Get recent public trades.
GET /v5/market/recent-trade
293 294 295 296 297 |
# File 'lib/bybit/rest_api/market_service.rb', line 293 def get_recent_public_trades(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/recent-trade', params: params) end |
#get_risk_limit(category:, **kwargs) ⇒ Hash
Get risk limit information.
GET /v5/market/risk-limit
308 309 310 311 312 |
# File 'lib/bybit/rest_api/market_service.rb', line 308 def get_risk_limit(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/risk-limit', params: params) end |
#get_rpi_orderbook(symbol:, limit:, **kwargs) ⇒ Hash
Get RPI (Retail Price Improvement) orderbook data.
GET /v5/market/rpi_orderbook
323 324 325 326 327 |
# File 'lib/bybit/rest_api/market_service.rb', line 323 def get_rpi_orderbook(symbol:, limit:, **kwargs) params = kwargs.merge(symbol: symbol, limit: limit) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/rpi_orderbook', params: params) end |
#get_server_time ⇒ Object
Get Bybit server time.
GET /v5/market/time
334 335 336 |
# File 'lib/bybit/rest_api/market_service.rb', line 334 def get_server_time @session.public_request(path: '/v5/market/time') end |
#get_tickers(category:, **kwargs) ⇒ Hash
Get tickers information for a specified category.
GET /v5/market/tickers
348 349 350 351 352 |
# File 'lib/bybit/rest_api/market_service.rb', line 348 def get_tickers(category:, **kwargs) params = kwargs.merge(category: category) params = Bybit::Utils::WireKeys.camelize(params) @session.public_request(path: '/v5/market/tickers', params: params) end |