LiveBlocking::Stop

Stops the session with the gateway by closing the connection. Once stopped, the session cannot be restarted; however, a new session can be started by calling Reconnect.

API method
1
void Stop();
Example usage
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <databento/live.hpp>
#include <iostream>

using namespace databento;

auto client = LiveBlocking::Builder()
                  .SetKey("$YOUR_API_KEY")
                  .SetDataset("EQUS.MINI")
                  .BuildBlocking();
client.Subscribe({"SPY"}, Schema::Definition, SType::RawSymbol);
auto metadata = client.Start();
[[maybe_unused]] auto record = client.NextRecord();
client.Stop();