Skip to contents

Set or query API base URL

Usage

base_url(url = NULL)

Arguments

url

Base URL (with or without trailling slash).

Value

URL string.

Examples

base_url()
#> [1] "https://paper-api.alpaca.markets/v2/"
# The live API.
base_url("https://api.alpaca.markets")
#> [1] "https://api.alpaca.markets/"
# The paper-trading API.
base_url("https://paper-api.alpaca.markets/v2")
#> [1] "https://paper-api.alpaca.markets/v2/"