Skip to content

An R package for interacting with the Luno exchange REST API.

License

Notifications You must be signed in to change notification settings

AlexIvanHoward/rluno

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rluno

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

Installation

You can install the development version directly from GitHub:

# install.packages("devtools")
devtools::install_github("AlexIvanHoward/rluno")

Authentication

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"
)

Basic usage

Get account balances

balances <- getAccountBalances(
  un = Sys.getenv("LUNO_API_KEY_ID"), 
  pw = Sys.getenv("LUNO_API_KEY_SECRET"))
balances

Optionally 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"))
balances

Public market data

Example: retrieve ticker information for a trading pair:

ticker <- getTicker("XRPZAR")
ticker

Design philosophy

  • 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.


API coverage

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.


Security notes

  • 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

Disclaimer

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.


License

MIT License © AlexIvanHoward

About

An R package for interacting with the Luno exchange REST API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages