if (FALSE) {
# Authenticate and get accounts
auth <- ig_auth(
username = "your_username",
password = "your_password",
api_key = "your_api_key",
acc_type = "DEMO",
acc_number = "ABC123"
)
accounts <- ig_get_accounts(auth)
print(accounts)
# Using mock response for testing
mock_response <- data.frame(
accountId = "ABC123",
accountName = "Demo Account",
balance.balance = 10000,
currency = "SEK"
)
accounts <- ig_get_accounts(auth, mock_response = mock_response)
}
Run the code above in your browser using DataLab