how to unsubscribe some symbols?

dongman
dongman Newcomer

at the begin, i subscribed some symbols, but now i want to unsubscibe part of them, what I should do. details is better, thx (ps, i do not want to login again)

Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    Hi @dongman,

    When you subscribe to data using RFA, you execute the command registerClient(). When you want to unsubscribe to an open subscription, you unregisterClient(). Refer to the RFA documentation for more details. Specifically:

    image

    It's worth noting that if you request for non-streaming data, the subscription will automatically unsubscribe once you receive the initial image. Thus, no need to explicitly close the subscription. However, if you are requesting for streaming data, the unregisterClient() call will close the subscription.

    With all that, if you are starting new development I would encourage you to use the Elektron SDKs I mentioned in my previous post. The RFA APIs are feature-complete and there are no plans to add anything to this API going forward. Not only are the Elektron SDKs significantly easier to use, they are our strategic APIs going forward.

Answers