0

How to get data stream for using Apache Camel XCHANGE? There is an example at Apache Camel XCHANGE. In this sample, we find the current Bitcoin market price in USDT:

from("direct:ticker")
    .to("xchange:binance?service=market&method=ticker&currencyPair=BTC/USDT")

There is an error - it should be

from("direct:ticker")
    .to("xchange:binance?service=marketdata&method=ticker&currencyPair=BTC/USDT")

but still have no data stream.

hk6279
  • 1,881
  • 2
  • 22
  • 32
janek
  • 1
  • 1

1 Answers1

0

As far as I see you're using a direct endpoint as beginning of the route. To use the route you're proposing you need to send a message to direct:ticker. If you want to fire the route automatically you can use a timer endpoint instead of direct.

The xchange endpoint is correct.

Oscerd
  • 1,616
  • 11
  • 14