get_url: Return the Alpaca URL

View source: R/internal.R

get_urlR Documentation

Return the Alpaca URL

Description

Get the correct URL for the Server Request that is sent to interact with the API. If the user is on a paper account, then the paper account URL will be returned. See parse_url & build_url for details.

Usage

get_url(
  path = NULL,
  query,
  ...,
  live = get_live(),
  v = 2,
  data = FALSE,
  poly = FALSE,
  api = c("api", "ws")[1]
)

Arguments

path

(character) of values to append to the url path ie c("p1","p2") become url/p1/p2

query

(named list) of values to add as query parameters

...

(named arguments) to be added as query parameters

live

(logical) TRUE to use the live account, FALSE for paper.

v

(numeric) The API version used for Alpaca

data

(logical) Whether to use the Alpaca Data API or the standard API.

api

(character) The API to call: api or ws (for websockets).

Value

The formatted URL.


jagg19/AlpacaforR documentation built on July 3, 2023, 12:14 p.m.