Skip to content

docs: fix generate_session argument naming in examples#217

Open
Adithya-bs wants to merge 1 commit intozerodha:masterfrom
Adithya-bs:fix/example-arg-naming
Open

docs: fix generate_session argument naming in examples#217
Adithya-bs wants to merge 1 commit intozerodha:masterfrom
Adithya-bs:fix/example-arg-naming

Conversation

@Adithya-bs
Copy link
Copy Markdown

Fixes #216

Overview

This PR fixes a naming discrepancy in the examples/ directory. The generate_session method was being called with the incorrect keyword argument secret=, which results in a TypeError.

In the actual library implementation (kiteconnect/connect.py), the parameter is defined as api_secret.

Changes

The argument name has been updated from secret to api_secret in the following example scripts to ensure they are functional for users:

  • examples/simple.py
  • examples/gtt_order.py
  • examples/order_margins.py

Verification

Checked the method signature in connect.py:
def generate_session(self, request_token, api_secret):

The examples now correctly align with the library's method signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Incorrect argument 'secret' used in multiple example files

1 participant