I just opened a stream to listen for transactions. I'd like to know, how to close it, once I get what I am looking for. I can't find the close method in channel, or any of the objects for setting the channel to null, that would close it.

Sample code:

var channel = server.transactions()
    .stream({ stuff });

Any ideas?

3 Answers 3


Call the returned object itself.

In your case: channel();


As described in the docs, TransactionCallBuilder.stream returns a function you can call to close a stream:


Type: function

Close function. Run to close the connection and stop listening for new events.


I am just trying to make it more clear for the future visitors,

TransactionCallBuilder.stream returns the function to close the connection.

// Opens the stream channel
var streamChannel = server.transactions()
    .stream({ stuff });

// Close the channel 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.