rluno is a lightweight R package for interacting with the Luno cryptocurrency exchange REST API.
It provides simple, explicit functions for both authenticated and unauthenticated endpoints, with minimal abstractions and predictable behaviour.
The package is designed for:
- programmatic account management (fetching balances, transaction histories)
- programmatic placement, execution and cancellation of orders
- market data retrieval
- use in scripts, Shiny apps, and analytical pipelines
You can install the development version directly from GitHub:
# install.packages("devtools")
devtools::install_github("AlexIvanHoward/rluno")Protected endpoints (such as account-related endpoints and trading endpoints) require an API key and secret, which you can generate here once you have a Luno account.
It is strongly recommended to store credentials as environment variables:
Sys.setenv(
LUNO_API_KEY_ID = "your_api_key_id",
LUNO_API_KEY_SECRET = "your_api_key_secret"
)balances <- getAccountBalances(
un = Sys.getenv("LUNO_API_KEY_ID"),
pw = Sys.getenv("LUNO_API_KEY_SECRET"))
balancesOptionally restrict the query to specific assets:
balances <- getAccountBalances(
assets = c("BTC", "ETH", "XRP"),
un = Sys.getenv("LUNO_API_KEY_ID"),
pw = Sys.getenv("LUNO_API_KEY_SECRET"))
balancesExample: retrieve ticker information for a trading pair:
ticker <- getTicker("XRPZAR")
ticker- Thin wrapper around the official Luno REST API
- No hidden state or persistent connections
- Minimal dependencies
- Friendly to scripting and automation
The package does not attempt to abstract trading strategies or portfolio logic — it focuses on reliable API access.
The package currently supports a subset of Luno’s REST API, with a focus on commonly used endpoints.
Additional endpoints can be added incrementally; contributions are welcome.
- API secrets are never stored on disk by the package
- Credentials should be provided via environment variables
- Network requests use HTTPS with standard SSL verification
This package is not affiliated with or endorsed by Luno.
Cryptocurrency trading involves risk.
This software is provided as is, without warranty of any kind.
MIT License © AlexIvanHoward