Package 'limexhub'

Title: R API for Limex DataHub
Description: Provides an interface to the Limex financial data platform, enabling users to retrieve real-time and historical financial data. Functions within the package allow access to instruments, candlestick charts, fundamentals, news, events, models, and trading signals. Authentication is managed through user-specific API tokens, which are securely handled via environment variables.
Authors: Vyacheslav Arbuzov[cph, cre, aut]
Maintainer: Vyacheslav Arbuzov <[email protected]>
License: GPL-3
Version: 0.1.3
Built: 2025-01-29 05:38:59 UTC
Source: https://github.com/limex-com/limexhub-r

Help Index


Get Alternative Candlestick Data

Description

Retrieves alternative candlestick data for a given stock symbol within the specified date range. The API token is retrieved from an environment variable 'LIMEX_API_TOKEN'.

Usage

altercandles(symbol = "BRX", from = "2023-11-27", to = "2023-11-28")

Arguments

symbol

Stock symbol to fetch candlestick data for.

from

Starting date for the candlestick data in 'YYYY-MM-DD' format.

to

Ending date for the candlestick data in 'YYYY-MM-DD' format.

Value

A data frame containing the candlestick data if the request was successful, NULL otherwise.

Examples

## Not run: 
  candles_data <- altercandles(symbol = "BRX", from = "2023-07-31", to = "2023-08-24")

## End(Not run)

Get Candlestick Data

Description

Retrieves historical candlestick data for a given stock symbol within the specified date range. The API token is retrieved from an environment variable 'LIMEX_API_TOKEN'.

Usage

candles(symbol = "AAPL", from = "2023-07-31", to = "2023-08-24")

Arguments

symbol

Stock symbol to fetch candlestick data for.

from

Starting date for the candlestick data in 'YYYY-MM-DD' format.

to

Ending date for the candlestick data in 'YYYY-MM-DD' format.

Value

A data frame containing the candlestick data if the request was successful, NULL otherwise.

Examples

## Not run: 
  candles_data <- candles(symbol = "BRX", from = "2023-07-31", to = "2023-08-24")

## End(Not run)

Get Instruments Events Data

Description

Retrieves events data for a specified stock symbol, filtered by event type and date range. Utilizes the API token set as an environment variable 'LIMEX_API_TOKEN'.

Usage

events(
  symbol = "AAPL",
  from = "2023-07-31",
  to = "2023-08-24",
  type = "dividends"
)

Arguments

symbol

The stock symbol for which events data is requested.

from

The start date for the data retrieval in 'YYYY-MM-DD' format.

to

The end date for the data retrieval in 'YYYY-MM-DD' format.

type

Type of the event to filter (e.g., 'dividends').

Value

A data frame containing the events data if the request is successful, NULL otherwise.

Examples

## Not run: 
  events_data <- events(symbol = "AAPL", from = "2023-01-01", to = "2024-01-01")

## End(Not run)

Get Fundamental Data

Description

Fetches fundamental data for a specified stock symbol and range of dates, and for specified accounting quarter(s), using the Limex API. Authentication is done via an API token stored in an environment variable 'LIMEX_API_TOKEN'.

Usage

fundamental(
  symbol = "AAPL",
  from = "2023-07-31",
  to = "2023-08-24",
  quarter = NULL,
  fields = NULL
)

Arguments

symbol

The stock symbol for which fundamental data is requested.

from

The start date for the data retrieval in 'YYYY-MM-DD' format.

to

The end date for the data retrieval in 'YYYY-MM-DD' format.

quarter

Optional; specify the quarter(s) 'q1', 'q2', 'q3', 'q4' for quarterly data.

fields

Optional; specify particular fields of interest like 'roe'.

Value

A data frame containing the requested fundamental data if successful, NULL otherwise.

Examples

## Not run: 
  fundamental_data <- fundamental(symbol = "AAPL")

## End(Not run)

Get Instruments Data

Description

Retrieves instruments data filtered by asset type. This function uses an API token stored in an environment variable named 'LIMEX_API_TOKEN'.

Usage

instruments(assets = "stocks")

Arguments

assets

Type of assets to query, by default 'stocks'.

Value

A data frame containing instrument data, or NULL if the request fails.

Examples

## Not run: 
  instruments_data <- instruments(assets = 'stocks')

## End(Not run)

Set API Token for Limex

Description

Sets the API token for the Limex service by storing it in an environment variable for the current R session. This token will be used by other functions in the package to authenticate API requests.

Usage

limex_token(token)

Arguments

token

API token for the Limex service.

Value

Invisible NULL, side-effect function setting an environment variable.

Examples

## Not run: 
  limex_token("your_personal_token_here")

## End(Not run)

Retrieve Models Data from Limex API

Description

Fetches data about models from the Limex API for a specified vendor. It uses an API token that is stored in the 'LIMEX_API_TOKEN' environment variable.

Usage

models(vendor = "boosted")

Arguments

vendor

The name of the vendor for which models data is requested.

Value

A data frame containing the models data if the request is successful; NULL otherwise.

Examples

## Not run: 
  models_data <- models(vendor = "boosted")

## End(Not run)

Get News Data

Description

Retrieves news data for a specific stock symbol from the Limex API. The API token is retrieved from an environment variable 'LIMEX_API_TOKEN'.

Usage

news(symbol = "AAPL", from = "2023-07-31", to = "2023-08-24")

Arguments

symbol

The stock symbol for which news data is requested.

from

The start date for the data retrieval in 'YYYY-MM-DD' format.

to

The end date for the data retrieval in 'YYYY-MM-DD' format.

Value

A data frame containing the news data if successful, NULL otherwise.

Examples

## Not run: 
  news_data <- news(symbol = "BRX", from = "2023-11-27", to = "2023-11-28")

## End(Not run)

Get Instruments Signals Data

Description

Retrieves signals data for a specified stock symbol and model from the Limex API. The function uses the API token that is stored in the 'LIMEX_API_TOKEN' environment variable.

Usage

signals(
  vendor = "boosted",
  model = "50678d2d-fd0f-4841-aaee-7feac83cb3a1",
  symbol = "AAPL",
  from = "2010-01-01",
  to = Sys.Date()
)

Arguments

vendor

The vendor name associated with the signals data.

model

The model identifier for which signals data is requested.

symbol

The stock symbol for which signals data is requested.

from

The start date for the signals data retrieval in 'YYYY-MM-DD' format.

to

The end date for the signals data retrieval in 'YYYY-MM-DD' format.

Value

A data frame containing the signals data if the request is successful; NULL otherwise.

Examples

## Not run: 
  signals_data <- signals(vendor = "boosted", symbol = "AAPL")

## End(Not run)