Skip to content

xchange-stream-binance - possibility to set BinanceStreamingExchange::orderBookUpdateFrequencyParameter #5073

Description

@felipeixoto

In class BinanceStreamingExchange there is a field orderBookUpdateFrequencyParameter.

I am trying to set another value other than empty String "" and "@100Ms" to orderBookUpdateFrequencyParameter

In initServices() orderBookUpdateFrequencyParameter can only be set if userHigherFrequency == true

  @Override
  protected void initServices() {
    super.initServices();
    this.onApiCall = Events.onApiCall(exchangeSpecification);
    boolean userHigherFrequency =
        Boolean.TRUE.equals(
            exchangeSpecification.getExchangeSpecificParametersItem(USE_HIGHER_UPDATE_FREQUENCY));
    realtimeOrderBookTicker =
        Boolean.TRUE.equals(
            exchangeSpecification.getExchangeSpecificParametersItem(USE_REALTIME_BOOK_TICKER));
    if (userHigherFrequency) {
      orderBookUpdateFrequencyParameter = "@100ms";
    }
    Object fetchOrderBookLimit =
        exchangeSpecification.getExchangeSpecificParametersItem(FETCH_ORDER_BOOK_LIMIT);
    if (fetchOrderBookLimit instanceof Integer) {
      oderBookFetchLimitParameter = (int) fetchOrderBookLimit;
    }
  }

But "@100Ms" is too fast, and "" is too slow. I would like to set a better value like "@10000ms".

Please consider this request. Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions