0

I am having problems with oauth. Let me start by saying that I have only been studying C++ for about a month. I am working on a Etrade API application. I have been struggling with this for a few weeks. Ok Etrade has provided the header, DLL and library files. I am having trouble just calling a simple function. Etrade list examples on how to call a Function for Java, and PHP but no C++. I just need a example for one function and I can pretty much go from there. here is a link to the API help https://us.etrade.com/ctnt/dev-portal/getContent?contentUri=V0_Code-SDKGuides-VC

the arguments for the first function are

m_environment IN Optional. Possible values are SANDBOX (default) and LIVE. 
m_strConsumerKey IN OAuth consumer key provided by E*TRADE 
m_strConsumerSecret IN OAuth consumer secret provided by E*TRADE 
m_strToken OUT Returned by the function if successful
m_strTokenSecret OUT Returned by the function if successful 
m_strCallback IN Optional; default value is "oob"

Here is my code first function (oauth)

int main(int argc, char **argv) 
{
}
bool COAuthSDK::GetRequestToken(CClientDetails &objClientDetails)
{
  return GetRequestToken;
}
MSalters
  • 173,980
  • 10
  • 155
  • 350

2 Answers2

0

You're missing the point. ETrade provides you with COAuthSDK::GetRequestToken; You're supposed to call it, not re-implement it yourself. The m_ arguments are members of the CClientDetails object that you, as the client, have to provide.

MSalters
  • 173,980
  • 10
  • 155
  • 350
0

Just a heads up. The Authorize URL in the docs(v0) is wrong! Doh! If you are having problems with that step, try the following URL.

Here is the correct URL: https://us.etrade.com/e/t/etws/authorize

Notice there is an additional 't' in the URL

BTW, I wrote a simple Node app called Trading Robo Monkey. If you have never used OAuth before, you can try to see if that was your problem by looking at the JS code

https://github.com/shikhirsingh/ETrade-API-Robo-Trading-Monkey-4-NodeJS

Quackquack
  • 31
  • 3