Search markets by text query. Returns a tibble of matching markets from the IG API.
Value
A tibble with market information, including columns like `epic`, `instrumentName`, `marketStatus`, and others as returned by the IG API `/markets` endpoint.
Examples
if (FALSE) { # \dontrun{
# Authenticate and search markets
auth <- ig_auth(
username = "your_username",
password = "your_password",
api_key = "your_api_key",
acc_type = "DEMO",
acc_number = "ABC123"
)
markets <- ig_search_markets("USD/CHF", auth)
print(markets)
# Using mock response for testing
mock_response <- data.frame(
epic = "CS.D.USDCHF.MINI.IP",
instrumentName = "USD/CHF Mini",
marketStatus = "OPEN"
)
markets <- ig_search_markets("USD/CHF", auth, mock_response = mock_response)
} # }