ig_close_session: Close session

View source: R/igfetchr.R

ig_close_sessionR Documentation

Close session

Description

Closes the authenticated IG API session.

Alias for 'ig_close_session()'.

Usage

ig_close_session(auth, mock_response = NULL)

ig_logout(auth, mock_response = NULL)

Arguments

auth

List. Authentication details from 'ig_auth()', including 'cst', 'security', 'base_url', 'api_key', and 'acc_number'.

mock_response

Logical. Optional mock response for testing (returns 'TRUE' if provided). Defaults to 'NULL'.

Value

Logical 'TRUE' if the session was closed successfully.

Examples

## Not run: 
# Authenticate and close session
auth <- ig_auth(
  username = "your_username",
  password = "your_password",
  api_key = "your_api_key",
  acc_type = "DEMO",
  acc_number = "ABC123"
)
ig_close_session(auth)

# Using mock response for testing
ig_close_session(auth, mock_response = TRUE)

## End(Not run)


igfetchr documentation built on Nov. 21, 2025, 5:07 p.m.