Login Module¶
Classes:
Name | Description |
---|---|
Login |
Login method to authenticate the user with Quantsapp API and get the session context. |
Login
¶
Login method to authenticate the user with Quantsapp API and get the session context. This method will create a signature based on the user credentials and other details, then invoke the login API to get the JWT token for further communication.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_key
|
str
|
User Identifier retreived from Quantsapp |
required |
secret_key
|
str
|
Secret Key retreived from Quantsapp |
required |
Methods:
Name | Description |
---|---|
login |
Login to Quantsapp and get the session_context for further communication |
login()
¶
Login to Quantsapp and get the session_context for further communication
Raises:
Type | Description |
---|---|
InvalidLoginCredentials
|
If the provided login credentials are invalid |
APIConnectionError
|
If there is an issue with the API connection |
Returns:
Type | Description |
---|---|
SessionContext
|
The session context for further communication |
Example
Login to Quantsapp API
import quantsapp
session_context = quantsapp.Login(
api_key='<YOUR_API_KEY>', # (1)!
secret_key='<YOUR_SECRET_KEY>', # (2)!
).login()
- Get the API Key from Quantsapp Web App
- Get the Secret Key from Quantsapp Web App