class BybitMarketDataService extends BybitMarketDataServiceRaw implements MarketDataService {

  public BybitMarketDataService(BybitExchange exchange) {
    super(exchange);
  }

  @Override
  public Ticker getTicker(Instrument instrument, Object... args) throws IOException {<FILL_FUNCTION_BODY>}

  @Override
  public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException {
    return getTicker((Instrument) currencyPair, args);
  }
}

    Assert.notNull(instrument, "Null instrument");

    BybitCategory category = BybitAdapters.getCategory(instrument);

    BybitResult<BybitTickers<BybitTicker>> response =
        getTicker24h(category, BybitAdapters.convertToBybitSymbol(instrument));

    if (response.getResult().getList().isEmpty()) {
      return new Ticker.Builder().build();
    } else {
      BybitTicker bybitTicker = response.getResult().getList().get(0);

      switch (category) {
        case SPOT:
          return BybitAdapters.adaptBybitSpotTicker(
              instrument, response.getTime(), (BybitSpotTicker) bybitTicker);
        case LINEAR:
        case INVERSE:
          return BybitAdapters.adaptBybitLinearInverseTicker(
              instrument, response.getTime(), (BybitLinearInverseTicker) bybitTicker);
        case OPTION:
          return BybitAdapters.adaptBybitOptionTicker(
              instrument, response.getTime(), (BybitOptionTicker) bybitTicker);
        default:
          throw new IllegalStateException("Unexpected value: " + category);
      }
    }
  
<methods>public void <init>(org.knowm.xchange.bybit.BybitExchange) ,public BybitResult<BybitInstrumentsInfo<org.knowm.xchange.bybit.dto.marketdata.instruments.BybitInstrumentInfo>> getInstrumentsInfo(org.knowm.xchange.bybit.dto.BybitCategory) throws java.io.IOException,public BybitResult<BybitTickers<org.knowm.xchange.bybit.dto.marketdata.tickers.BybitTicker>> getTicker24h(org.knowm.xchange.bybit.dto.BybitCategory, java.lang.String) throws java.io.IOException<variables>