bowhead icon indicating copy to clipboard operation
bowhead copied to clipboard

What to put into OANDA_ACCOUNT=

Open hoverlord opened this issue 8 years ago • 10 comments

Hi,

I opened up an Acc at Oanda and got the api key. But what value is supposed to be put in at OANDA_ACCOUNT=?

hoverlord avatar Jun 21 '17 07:06 hoverlord

You will need to get the Oanda API tokens from Oanda

rxmg-joeldg avatar Jun 23 '17 07:06 rxmg-joeldg

I got that solved: OANDA_ACCOUNT means your accountID, you will get it in the e-mail when you open a "real" trading account

hoverlord avatar Jun 23 '17 19:06 hoverlord

I keep getting this following error when running the streaming.py script

{
	"code" : 1,
	"message" : "Invalid or malformed argument: accountId",
	"moreInfo" : "http:\/\/developer.oanda.com\/docs\/v1\/troubleshooting\/#errors"
}

I'm using the demo environment and the Account ID I received for my "real" trading account. I can't sign into my "real" account until it's checked, I think. Is there a different Account ID for the demo account? I've tried all combinations of API key & account ID, but still no luck...

avanderbergh avatar Jul 10 '17 17:07 avanderbergh

I had the same issue but used account number in my demo account under the fxpractice account as the account ID but I get oanda failed state error, the account token I generated

On Jul 10, 2017, at 1:32 PM, Adriaan van der Bergh [email protected] wrote:

I keep getting this following error when running the streaming.py script

{ "code" : 1, "message" : "Invalid or malformed argument: accountId", "moreInfo" : "http://developer.oanda.com/docs/v1/troubleshooting/#errors" } I'm using the demo environment and the Account ID I received for my "real" trading account. I can't sign into my "real" account until it's checked, I think. Is there a different Account ID for the demo account? I've tried all combinations of API key & account ID, but still no luck...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

ak9250 avatar Jul 10 '17 18:07 ak9250

I just signed up today and it looks like they are no longer allowing v1 accounts to be added.

You can get v2 accounts like this

curl -H "Authorization: Bearer XXXX-XXXX" https://api-fxpractice.oanda.com/v3/accounts

mingfang avatar Aug 20 '17 06:08 mingfang

For the missing account ID on Demo accounts. Log into your demo account, click on "My Account" in the top right (if you're not already on your My Account page). There should be something for Add Sub-Accounts. Click on it. You should then be looking at a screen to add a new sub account. On the left side there should be a list for exiting sub accounts. You should have one there already with a balance. Mine had $100,000.00. Click on that and then you should see the account ID in the Account Summary section on the right. It should look something like "101-001-5249467-001". If you use an account with no balance you may get a new error. Good luck!

ghost avatar Jan 13 '18 03:01 ghost

For the missing account ID on Demo accounts. Log into your demo account, click on "My Account" in the top right (if you're not already on your My Account page). There should be something for Add Sub-Accounts. Click on it. You should then be looking at a screen to add a new sub account. On the left side there should be a list for exiting sub accounts. You should have one there already with a balance. Mine had $100,000.00. Click on that and then you should see the account ID in the Account Summary section on the right. It should look something like "101-001-5249467-001". If you use an account with no balance you may get a new error. Good luck!

I don't know if I've ever seen a worse User Experience than Oanda's...

geni94 avatar Nov 25 '18 17:11 geni94

For the missing account ID on Demo accounts. Log into your demo account, click on "My Account" in the top right (if you're not already on your My Account page). There should be something for Add Sub-Accounts. Click on it. You should then be looking at a screen to add a new sub account. On the left side there should be a list for exiting sub accounts. You should have one there already with a balance. Mine had $100,000.00. Click on that and then you should see the account ID in the Account Summary section on the right. It should look something like "101-001-5249467-001". If you use an account with no balance you may get a new error. Good luck!

I got my account ID using that method but I still get an exception "pyoanda.exceptions.BadRequest: OCode-400: Invalid or malformed resource identifier: accountId"

suryakanigolla avatar May 02 '20 16:05 suryakanigolla

For the missing account ID on Demo accounts. Log into your demo account, click on "My Account" in the top right (if you're not already on your My Account page). There should be something for Add Sub-Accounts. Click on it. You should then be looking at a screen to add a new sub account. On the left side there should be a list for exiting sub accounts. You should have one there already with a balance. Mine had $100,000.00. Click on that and then you should see the account ID in the Account Summary section on the right. It should look something like "101-001-5249467-001". If you use an account with no balance you may get a new error. Good luck!

I got my account ID using that method but I still get an exception "pyoanda.exceptions.BadRequest: OCode-400: Invalid or malformed resource identifier: accountId"

I had this issue when using the pyoanda library, but it worked for me when I switched to oandapyV20.

aknayar avatar May 14 '20 02:05 aknayar

Go to https://www.oanda.com/demo-account/funding/ and you find accound id "v20 Account Number XXX-XXX-XXXXXXX-XXX"

valentasm1 avatar Sep 23 '20 08:09 valentasm1