Connect Your OpenAI Account
BotiTrader uses ChatGPT to help code your strategy. To use this feature in BotiTrader, you need to connect BotiTrader to your OpenAI account. This tutorial will guide you through the essential steps to connect BotiTrader to your OpenAI account.
1. Register for an OpenAI Account
If you already have an OpenAI account, you can skip the steps below. Otherwise, follow these steps to register for one:
- Visit the OpenAI official website.
- Click on "Sign Up" at the top right corner of the homepage.
- Follow the prompts on the page to complete the registration process.
- Once registered, log in to your OpenAI account.
2. Obtain Your OpenAI API Key
- Once logged in to your OpenAI account, click on "Dashboard" at the top right corner of the page, then select "API keys" from the navigation menu on the left side.
- In the API Keys section, click on the "Create New Secret Key" button at the top right corner.
- Enter a name for your API Key, and then click "Create secret key".
- A new API Key will be generated for you.
- Copy and securely store your API Key. This key will be used to authenticate your requests to the OpenAI API.
Important: Keep your API Key secure. Do not share it publicly. Anyone with access to your API Key can use it to make requests on your behalf.
3. Configure BotiTrader with Your OpenAI API Key
- Open BotiTrader after installation.
- Sign in using your registered email and password, then click "Sign In".
- In the Main window, click on "Settings" in the main menu, and select "ChatGPT Settings".
- The ChatGPT Settings window will appear.
- In the ChatGPT Settings window, enter your OpenAI Secret Key:
- OpenAI Secret Key: Paste the API Key you obtained from the OpenAI API Dashboard.
- Click the "Connect and Fetch Models" button. If the Secret Key is correct, a success message will appear.
4. Select a Model
Once the connection is established and models are fetched successfully, choose a model from the dropdown list to proceed, for example, "gpt-4o-latest."
- Important: Make sure to select a model with programming capabilities to ensure optimal performance for coding-related tasks. For more details about model capabilities, please refer to OpenAI's model documentation.
The list of available models will update automatically each time you log in to BotiTrader.
5. Configure Other Settings
After selecting a model, configure the following additional settings to optimize your experience with ChatGPT in BotiTrader:
Model Settings
-
Enable System Role:
Choose whether to enable the System Role and set a corresponding Prompt to enhance the model's coding capability.- When enabled, the System Role Prompt allows you to specify instructions for the AI, such as:
You are a helpful assistant specialized in coding.
- Click the "Default Prompt" button to enable the System Role and reset the prompt to the recommended default setting.
- If disabled, the model will operate without a predefined system role.
- When enabled, the System Role Prompt allows you to specify instructions for the AI, such as:
-
Enable Temperature:
Choose whether to enable the Temperature and set the Temperature value to control the randomness of responses.- Lower values (
0.2 - 0.5
): More deterministic and precise responses. - Higher values (
0.8 - 1.2
): More creative and diverse responses. - Recommended range for coding tasks:
0.2 - 0.7
- Click the "Default Temperature" button to enable the Temperature and reset the temperature value to the recommended default value.
- Lower values (
Memory Settings
- Messages to Remember:
Set the number of previous messages retained in memory during a conversation.- More messages: Allows for better context retention but consumes more tokens.
- For AI Automation Assistant: Every interaction is stateless to minimize token usage.
Once you have configured these settings, click "Save". BotiTrader will store your preferences for future use.
6. Set Up Payment Method for Your OpenAI Account
Once your free tier credits are used up, you'll need to make a payment to OpenAI for its API usage. You can check out the pricing information on the OpenAI Pricing page.
Follow these steps to set up your payment method:
- Log in to your OpenAI account.
- Click the "Settings" icon at the top right corner, then click on "Billing" in the navigation menu on the left side.
- Select "Payment Methods" to add or update your payment method.