|
OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
|
Abstract base class for supplying candlestick data and symbol metadata to the VM. More...
#include <instance.hpp>
Public Member Functions | |
| virtual | ~DataProvider ()=default |
| virtual PartialSymbolInfo | symbolInfo (std::string_view symbol)=0 |
| Returns symbol metadata. Throw on failure. | |
| virtual ffi::CandlestickStream * | candlesticksOpen (std::string_view symbol, std::string_view timeframe, int64_t from_time)=0 |
| Opens a candlestick stream. | |
Abstract base class for supplying candlestick data and symbol metadata to the VM.
Implement this class and pass a pointer to CreateInstanceOptions::setDataProvider(). The C++ wrapper bridges to ffi::DataProvider internally.
Both symbolInfo and candlesticksOpen are called from the VM's execution thread. candlesticksOpen must return a ffi::CandlestickStream* created via CandlestickStream::release(). Bars may be pushed from any thread.
Definition at line 154 of file instance.hpp.
|
virtualdefault |
|
pure virtual |
Opens a candlestick stream.
Create a CandlestickStream, push data (synchronously or from another thread), call finish(), and return the raw handle via release().
The VM takes ownership of the returned pointer.
|
pure virtual |
Returns symbol metadata. Throw on failure.
| symbol | Symbol string (e.g. "NASDAQ:AAPL"). |