▶ Live demo: all 514 indicators over real Binance market data, computed live in your browser — live.wickra.org · zero backend, powered by
wickra-wasm.
One typed API. Ten exchanges. Eight languages — for R. install.packages("wickraexchange", repos = "https://wickra-lib.r-universe.dev") — over the C ABI via .Call, prebuilt library fetched on install.
R bindings for wickra-exchange
over the Wickra C ABI (.Call): one synchronous, pull-based API over the ten
largest crypto exchanges, plus offline paper and replay simulators that share the
same API.
From r-universe:
install.packages("wickraexchange", repos = "https://wickra-lib.r-universe.dev")
The package's configure downloads the prebuilt C ABI library for this exact
version from the GitHub release and bundles it, so an ordinary install needs
nothing but a C toolchain (Rtools on Windows) for the thin .Call glue layer. To
build against a local checkout instead, point it at the header and library with
the environment variables below.
In the browser (webR, r-universe's WebAssembly build) the package installs and loads, but it
cannot run: it is a network client, and webR has no sockets. Every call says so; the offline
paper and replay simulators run in the browser as the wickra-exchange-wasm npm package.
configure fetches the C ABI for your platform from the GitHub release matching
this package's version, stages it into src/, and install.libs.R bundles it
beside the compiled object — so the installed package carries its own native
library and needs nothing on LD_LIBRARY_PATH, DYLD_LIBRARY_PATH or PATH.
To build against a locally built C ABI instead — after
cargo build -p wickra-exchange-c --release — point WKEX_INC at the header
directory and WKEX_LIB at the library directory, and configure uses those
rather than downloading:
WKEX_INC=/path/to/bindings/c/include \
WKEX_LIB=/path/to/target/release \
R CMD INSTALL bindings/r
There is no WebAssembly build. This package is a network client, and
wasm32-unknown-emscripten has no sockets; configure says so and stops rather
than producing something that compiles and then cannot connect. The offline
paper and replay simulators are published separately as the
wickra-exchange-wasm npm package.
The same strategy runs paper, replay and live by swapping the constructor.
Licensed under MIT OR Apache-2.0.
library(wickraexchange)
ex <- wkex_paper(c(USDT = 100000), taker_bps = 5)
wkex_set_price(ex, "BTC/USDT", 20000)
order <- wkex_place_market(ex, "BTC/USDT", "buy", 1)
order$status # "filled"
wkex_balance(ex, "BTC") # 1
Every binding forwards to the same data-driven Rust core, so what this one adds is
the call overhead of R's native .Call interface over the C ABI, not a different result. The core's throughput is
measured by the repository's benchmark suite and the nightly bench.yml run; the
numbers, the machine and how to reproduce them are in the repository
BENCHMARKS.md.
The full guide, the spec reference and the API documentation live in the main repository and the documentation site:
examples/r/
Wickra Exchange ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any
C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the
same data-driven, unsafe-forbidden Rust core.
Found a security issue? Please don't open a public issue. Report it privately
via the repository's Security tab ("Report a vulnerability") or email
support@wickra.org with a subject line starting [wickra security]. Full
policy: https://github.com/wickra-lib/wickra-exchange/blob/main/SECURITY.md.
Not a trading system and not financial advice. This library connects to exchanges and can place real orders that risk real capital; any such use is entirely at your own risk. Authentication, order rounding, reconnect handling and rate limiting can fail in ways that lose money — test against testnets, use withdrawal-disabled keys, and review the code before trading. The software is provided as is, without warranty of any kind; see the license files for the full terms.
Licensed under either of Apache-2.0 or MIT at your option.