Hi every one,
Kindly i would like to clarify what could cause the below mentioned exception, while using onada demo account on lean desktop i have encountered this exception but dont how it arised or how to avoid thanks in advance
System.ArgumentNullException
HResult=0x80004003
Message=Value cannot be null.
Parameter name: value
Source=Newtonsoft.Json
StackTrace:
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at QuantConnect.Brokerages.Oanda.OandaRestApiV20.OnPricingDataReceived(String json) in C:\Users\Coding\Documents\GitHub\Lean\Brokerages\Oanda\OandaRestApiV20.cs:line 390
at Oanda.RestV20.Session.StreamSession.<StartSession>b__8_0() in C:\Users\Coding\Documents\GitHub\Lean\Brokerages\Oanda\RestV20\Session\StreamSession.cs:line 65
at System.Threading.Tasks.Task.Execute()
Alexandre Catarino
Hi Essam Saed ,
Did you set up the "oanda-access-token" and "oanda-account-id" in the config.json file?
I am using the latest version of Lean and have just created a new token and account. It looks like:
"environment": "live-oanda", // oanda configuration "oanda-environment": "Practice", "oanda-access-token": "96bad561d7e08bbae140aee21b3c5902-d4793375813acb3bthispartissecret", "oanda-account-id": "101-004-13727058-001",
Essam Saed
Hi Alexandre Catarino
Thanks for your reply, actually i have adjusted this data, but my problem was arising from running lean on debug mode, later i figured out that i should run it in release mode, which made it work perfectly.
Thanks
Alexandre Catarino
Hi Essam Saed ,
You should be able to run Lean in both Release and Debug modes.
Essam Saed
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!