SDKs & Libraries
Choose REST for direct HTTP integration or use an official SDK for language-native development. To make it easier to use the FYERS API in different programming languages, we provide dedicated libraries/packages that handle the API calls for you. These libraries/packages abstract away the complexities of raw HTTP calls, allowing you to focus on integrating the API seamlessly into your applications. The table below lists each SDK with its supported versions, official package link and tutorial playlist.
| SDK | Supported versions | Official link | Tutorial link |
|---|---|---|---|
| REST | Up to latest | Current API documentation | Watch tutorial |
| Python SDK | Python 3.8 to latest | PyPI: fyers-apiv3 | Watch tutorial |
| Node.js SDK | Node.js 12 to latest | npm: fyers-api-v3 | Watch tutorial |
| Web JavaScript SDK | Node.js 16 to latest | npm: fyers-web-sdk-v3 | Watch tutorial |
| C# SDK | .NET 8.0.4 to latest | NuGet: fyers-api-v3 | Watch tutorial |
| Java SDK | Java 8 to latest | GitHub: fyers-java-sdk | Watch tutorial |
| Go SDK | Go 1.18 to latest | GitHub: fyers-go-sdk | Coming soon |
| C SDK | C11 to latest | GitHub: fyers-c-sdk | Coming soon |
Python SDK: FyersModel class
FyersModel needs client_id and your access token (passed as token) for authentication. It runs synchronously by default (is_async=False). You can write logs to a file with log_path. The default log level is ERROR; set it to DEBUG for more detailed logs.
| Argument | Data Type | Description |
|---|---|---|
client_id | string | For authentication. |
token | string | Your access token, for authentication (pass as token=access_token). |
is_async (optional) | boolean | Defaults to False for synchronous flow. Set to True for asynchronous flow. |
log_path (optional) | string | File path where logs are stored. |
log_level (optional) | string | Defaults to ERROR. Set to DEBUG for more detailed logs. |
from fyers_apiv3 import fyersModel
client_id = "XC4XXXXM-100"
access_token = "eyJ0eXXXXXXXX2c5-Y3RgS8wR14g"
fyers = fyersModel.FyersModel(
client_id=client_id,
token=access_token,
is_async=False,
log_path="",
)
response = fyers.get_profile()
print(response)Web SDK CDN
Sample scripts: fyers-api-sample-code . See also Sample Code and the Postman Collection.