isaiahbjork / Auto-GPT-MetaTrader-Plugin

The AutoGPT MetaTrader Plugin is a software tool that enables traders to connect their MetaTrader 4 or 5 trading account to Auto-GPT.
https://github.com/isaiahbjork/Auto-GPT-MetaTrader-Plugin
MIT License
464 stars 82 forks source link

SYSTEM: Command fetch_candlesticks returned: Failed to get candlesticks #8

Closed Rmeulstee closed 1 year ago

Rmeulstee commented 1 year ago

Error after using the test commands: image

It does pull account information, so only the Market data is not working: image

GameWorldsLLC commented 1 year ago

you have to have metatrader open and then i had to also tell my agent/ AutoGPt that i had metatrader open and the internet was ok. after i did that everything started working

harryjmg commented 1 year ago

Same problem here. Any ideas ?

harryjmg commented 1 year ago

I run just a part of the code for debugging purpose, here is the response returned by Meta API :

python3 auto_gpt_workspace/get_market_datas.py
Fetching candlesticks...
Timeframe matched!
full response:  {'id': 970, 'error': 'ValidationError', 'message': 'Candle historical market data is not supported for MT5 G2 accounts'}

This is clear : Candle historical market data is not supported for MT5 G2 accounts

The info can also be found on the meta docs : https://metaapi.cloud/docs/client/

"historical market data is available for G1 and MT4 G2 only"

I created an MT4 account and it works like a charm 🎉

I hope it will help others :)

Cruentus1978 commented 1 year ago

I run just a part of the code for debugging purpose, here is the response returned by Meta API :

python3 auto_gpt_workspace/get_market_datas.py
Fetching candlesticks...
Timeframe matched!
full response:  {'id': 970, 'error': 'ValidationError', 'message': 'Candle historical market data is not supported for MT5 G2 accounts'}

This is clear : Candle historical market data is not supported for MT5 G2 accounts

The info can also be found on the meta docs : https://metaapi.cloud/docs/client/

"historical market data is available for G1 and MT4 G2 only"

I created an MT4 account and it works like a charm 🎉

I hope it will help others :)

I keep getting this message: "Error: The following AI output couldn't be converted to a JSON:" and notes about how it cant fetch candlesticks. I changed my MetaAPI region to New-York from london on the env., but I feel like there is something I am missing. If you got yours working, I would appreciate some help. Thanks in advance.