Steps to Set Up OpenAI and Grok APIs for trading bot MT5
Initial step is to go into MT5, ensure your MT5 terminal is running, then configure the setting as follows.
Step 1: Create an OpenAI account from the link below.
If you already have an account, you can skip this step.![]()
You can create and delete multiple API keys here. However, note that if you close the page after creating a key once, you will not be able to view the same key again.
You can issue new keys as many times as you like for free, so if you lose your key, you can recreate it. Next, click on the "Create new secret key" button.
Step 6: Paste the key into the input field of trading MT5 labeled "OpenAI API Key". This will allow the EA to communicate with OpenAI's API.
Step 1: Visit the link below. https://x.ai/api

Step 1: Go to the following link: https://ai.google.dev/gemini-api/docs/api-key
Step 2: Click on the "Get a Gemini API Key in Google AI Studio" button.
Step 3: Log in to your Google account.
Step 4: Click the "Create API Key" button.
Step 5: Click the "Copy" button.
Step 6: Paste the API key into the input field of trading bot MT5.
Step 1: Go to the following link: https://ai.google.dev/gemini-api/docs/api-key
Step 2: Select "Billing info".
Step 3: Click the "Upgrade to the Gemini API paid tier" button.
Step 4: Click "Set up Billing".
Step 5: Click "Manage billing accounts".
Step 6: Click "Create account".
Step 7: Fill in the information and click the "Continue" button.
Step 8: Click the "Change" button to fill in your Payments profile information. Then, enter your payment card details.
However, you need to monitor your usage at https://console.cloud.google.com/
Step 1: Access https://www.anthropic.com/api
Step 2: Press the Start building button
Step 3: Register for an account or log in (if you already have one)
Step 4: Press Individual
Step 5: Press Buy credits
Step 6: Enter your payment method and complete payment
Step 7: Press Get API keys
Step 8: Paste the API key into EA in the corresponding Claude API Key field (same as with other AIs)
Remember to keep your API key secure and do not share it publicly.
- Purchasing the Grok and OpenAI APIs is like renting a powerful service on demand. You pay to use its capabilities each time you need them, and the cost will depend on the amount of resources you consume (number of requests, number of tokens, etc.). This cost is separate from the paid plans of Grok or OpenAI.
- You can check the usage status of the OpenAI API here: https://platform.openai.com/settings/organization/usage
- You can check the usage status of the Grok API here: https://console.x.ai/team/default/billing/credits
If you have any questions, please contact the community and support.