Skip to content

Commit

Permalink
chore: update kiteconnect login URL (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjanrak authored Dec 7, 2022
1 parent 08b25bd commit 4f5b2b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const (
version string = "4.0.2"
requestTimeout time.Duration = 7000 * time.Millisecond
baseURI string = "https://api.kite.trade"
loginURI string = "https://kite.trade/connect/login?api_key=%s&v=3"
kiteBaseURI string = "https://kite.zerodha.com"
// Kite connect header version
kiteHeaderVersion string = "3"
Expand Down Expand Up @@ -190,7 +189,7 @@ func (c *Client) SetAccessToken(accessToken string) {

// GetLoginURL gets Kite Connect login endpoint.
func (c *Client) GetLoginURL() string {
return fmt.Sprintf(loginURI, c.apiKey)
return fmt.Sprintf("%s/connect/login?api_key=%s&v=%s", kiteBaseURI, c.apiKey, kiteHeaderVersion)
}

func (c *Client) doEnvelope(method, uri string, params url.Values, headers http.Header, v interface{}) error {
Expand Down

0 comments on commit 4f5b2b3

Please sign in to comment.