Skip to content
All library documents

Batch Subscriptions for Multiple Market Data Instruments in VeighNa

Article vn.py community

Summary

The document describes changing a VeighNa CTP market-data interface so that subscription and unsubscription calls accept a list of instrument symbols instead of one symbol per call. It outlines modifications to the C++ wrapper declarations and implementation, then describes rebuilding the extension module and adjusting Python gateway methods so lists can pass through the subscription flow. The stated motivation is reducing the overhead of making separate requests for multiple instruments.

The example shows the intended interface with two futures symbols. The post is an implementation recipe, not a benchmark: it provides no measured speed improvement, compatibility testing, or guidance for handling subscription errors. Its sample C++ pointer construction also warrants careful review before use, since incorrect memory layout or string handling at the API boundary can cause failures. The changes are specific to the described VeighNa and CTP setup and may need adaptation for other versions.

Key ideas

  • The described wrapper originally accepts one instrument per market-data subscription call.
  • The proposed interface passes a list of symbols to subscribe or unsubscribe in a batch.
  • The C++ wrapper declarations and Python gateway subscription flow both need changes.
  • The stated goal is to reduce the overhead of separate requests for multiple instruments.
  • The post gives no benchmark and its sample C++ string handling should be reviewed carefully.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.