Getting Help

tda-api is not perfect. Features are missing, documentation may be out of date, and it almost certainly contains bugs. If you think of a way in which tda-api can be improved, we’re more than happy to hear it.

This page outlines the process for getting help if you found a bug. If you need general help using tda-api, or just want to chat with other people interested in developing trading strategies, you can join our discord.

If you still want to submit an issue, we ask that you follow a few guidelines to make both our lives easier:

Enable Logging

Behind the scenes, tda-api performs diagnostic logging of its activity using Python’s logging module. You can enable this debug information by telling the root logger to print these messages:

import logging
logging.getLogger('').addHandler(logging.StreamHandler())

Sometimes, this additional logging is enough to help you debug. Before you ask for help, carefully read through your logs to see if there’s anything there that helps you.

Gather Logs For Your Bug Report

If you still can’t figure out what’s going wrong, tda-api has special functionality for gathering and preparing logs for filing issues. It works by capturing tda-api’s logs, anonymizing them, and then dumping them to the console when the program exits. You can enable this by calling this method before doing anything else in your application:

tda.debug.enable_bug_report_logging()

This method will redact the logs to scrub them of common secrets, like account IDs, tokens, access keys, etc. However, this redaction is not guaranteed to be perfect, and it is your responsibility to make sure they are clean before you ask for help.

When filing a issue, please upload the logs along with your description. If you do not include logs with your issue, your issue may be closed.

For completeness, here is this method’s documentation:

debug.enable_bug_report_logging()

Turns on bug report logging. Will collect all logged output, redact out anything that should be kept secret, and emit the result at program exit.

Notes:
  • This method does a best effort redaction. Never share its output without verifying that all secret information is properly redacted.
  • Because this function records all logged output, it has a performance penalty. It should not be called in production code.

Submit Your Ticket

You are now ready to write your bug. Before you do, be warned that your issue may be be closed if:

  • It does not include code. The first thing we do when we receive your issue is we try to reproduce your failure. We can’t do that if you don’t show us your code.
  • It does not include logs. It’s very difficult to debug problems without logs.
  • Logs are not adequately redacted. This is for your own protection.
  • Logs are copy-pasted into the issue message field. Please write them to a file and attach them to your issue.
  • You do not follow the issue template. We’re not super strict about this one, but you should at least include all the information it asks for.

You can file an issue on our GitHub page.