Getting Help

Even the most experienced developer needs help on occasion. This page describes how you can get help and make progress.

Asking for Help on Discord

tda-api has a vibrant community that hangs out in our discord server. If you’re having any sort of trouble, this server should be your first stop. Just make sure you follow a few rules to ask for help.

Provide Adequate Information

Nothing makes it easier to help you than information. The more information you provide, the easier it’ll be to help you. If you are asking for advice on how to do something, share whatever code you’ve written or research you’ve performed. If you’re asking for help about an error, make sure you provide at least the following information:

  1. Your OS (Windows? Mac OS? Linux?) and execution environment (VSCode? A raw terminal? A docker container in the cloud?)

  2. Your tda-api version. You can see this by executing print(tda.__version__) in a python shell. Make sure you’re using the most recent version before asking for help. You can ensure this using pip install --upgrade tda-api.

  3. The full stack trace and error message. Descriptions of errors will be met with requests to provide more information.

  4. Code that reproduces the error. If you’re shy about your code, write a small script that reproduces the error when run.

Optionally, you may want to share diagnostic logs generated by tda-api. Not only does this provide even more information to the community, reading through the logs might also help you solve the problem yourself. You can read about enabling logging here.

Format Your Request Properly

Take advantage of Discord’s wonderful support for code blocks and format your error, stack traces, and code using triple backticks. To do this, put ``` before and after your message. Failing to do this will be met with a request to edit your message to be better formatted.

Reporting a Bug

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 section 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 everyone’s 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.