Sahi
Sahi is an Indian online stock trading platform. Its Direct API lets you place and manage orders, read your positions, holdings and funds, and stream live market data, which makes it a good fit for algorithmic trading through OpenAlgo.
Sahi signs you in with an API key and secret, not an OAuth login. There is no redirect URL to register with Sahi, no TOTP and nothing to type when you log in: OpenAlgo exchanges your saved key and secret for the day's access token.

Generating API Key and API Secret
Open Sahi web, click your profile avatar (bottom left) and choose API Dashboard.

Click Create API key. Complete two-factor verification if asked.
Enter a Name you will recognise later, for example
OpenAlgo.Choose the Access: pick Full access (orders and market data) and key type TOTP. A Market data key cannot place orders.


Click Create API key.
Copy the API key (starts with
pk_) and the API secret (starts withsahi_sk_). The secret is shown only once.Tick I have saved my credentials and click Done.
Then store the key and secret in your .env file, and add sahi to VALID_BROKERS if it is not already listed. The REDIRECT_URL is not registered anywhere at Sahi; OpenAlgo uses it only to know which broker you use.
Last updated