feat(data): expose CandleReader (CSV) natively in all 10 languages (#311)
Add the data-layer CSV candle reader to every binding so loading OHLCV candles from a CSV no longer needs a per-language CSV/dataframe dependency. - C ABI: wickra_candle_reader_new(bytes, len) / _count / _read / _free over an opaque CandleReader handle (parse the whole buffer up front, then drain). - Native: Node/WASM CandleReader.read() -> Candle[], Python read() -> list[tuple]. - C-ABI languages: Go Read() []Candle, C# Candle[] Read(), Java Candle[] read(), R read() S3 generic (n x 6 matrix); C / C++ call the C ABI directly. - Cross-language golden testdata/golden/data_csv*.csv pins the parsed candles bit-for-bit across every binding. Verified locally across Rust (test+clippy+fmt), Node, WASM, Python, C#, Go, Java, R, and the C/C++ cmake parity suite.
This commit is contained in:
@@ -128,6 +128,8 @@ typedef struct CalmarRatio CalmarRatio;
|
||||
|
||||
typedef struct Camarilla Camarilla;
|
||||
|
||||
typedef struct CandleReader CandleReader;
|
||||
|
||||
typedef struct CandleVolume CandleVolume;
|
||||
|
||||
typedef struct Cci Cci;
|
||||
@@ -13736,6 +13738,16 @@ bool wickra_resampler_flush(struct Resampler *handle, struct WickraCandle *out);
|
||||
|
||||
void wickra_resampler_free(struct Resampler *handle);
|
||||
|
||||
struct CandleReader *wickra_candle_reader_new(const uint8_t *data, uintptr_t len);
|
||||
|
||||
uintptr_t wickra_candle_reader_count(const struct CandleReader *handle);
|
||||
|
||||
uintptr_t wickra_candle_reader_read(struct CandleReader *handle,
|
||||
struct WickraCandle *out,
|
||||
uintptr_t cap);
|
||||
|
||||
void wickra_candle_reader_free(struct CandleReader *handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user