LiveBlocking::SubscribeWithSnapshot
Add a new snapshot subscription to the session. This is only supported for the MBO schema.
Subscriptions end when the client disconnects in its destructor, by calling LiveBlocking::Stop, or when their symbols are removed with LiveBlocking::Unsubscribe.
Parameters
| Parameter | Type | Description |
|---|---|---|
symbols | std::vector<std::string> | The product symbols to subscribe to. Takes up to 2,000 symbols per request. |
schema | databento::Schema | The data record schema. Only Mbo is supported. |
stype_in | databento::SType | The symbology type of input symbols. |
API method
void SubscribeWithSnapshot(
const std::vector<std::string>& symbols, Schema schema,
SType stype_in); Example usage
1 2 3 4 5 6 7 8 9 10
#include <databento/live.hpp>
using namespace databento;
auto client = LiveBlocking::Builder()
.SetKey("$YOUR_API_KEY")
.SetDataset("GLBX.MDP3")
.BuildBlocking();
client.SubscribeWithSnapshot({"ES.c.0"}, Schema::Mbo,
SType::Continuous);