Skip to content

C / C++

The C ABI hub. A single wickra_screener.h header + prebuilt library links from C, C++, or any C-capable language. Drive a screener with the JSON command protocol.

bash
# prebuilt wickra_screener.h + library per platform:
# github.com/wickra-lib/wickra-screener/releases
c
#include "wickra_screener.h"

const char *spec = "{\"universe\":[\"AAA\",\"BBB\"],"
                   "\"condition\":{\"type\":\"cmp\","
                   "\"left\":{\"kind\":\"price\",\"field\":\"close\"},"
                   "\"op\":\"gt\",\"right\":{\"kind\":\"const\",\"value\":10.0}}}";

WickraScreener *s = wickra_screener_new(spec);
const char *cmd = "{\"cmd\":\"scan\",\"data\":{ /* symbol -> candles */ }}";
char *report = wickra_screener_command(s, cmd);   // JSON response

printf("%s\n", report);
wickra_screener_free(s);

The header is generated by cbindgen and is the same ABI the C#, Go, Java and R bindings link against.

More