Please refer to our API developer site developer.oanda.com for all REST API information.
oanda / apidocs Goto Github PK
View Code? Open in Web Editor NEWOANDA REST API Documentation
OANDA REST API Documentation
Please refer to our API developer site developer.oanda.com for all REST API information.
This would be consistent with orders and make more sense
Also shouldn't it be sent as rfc3339 rather than unix time?
category code could be:
1 - Bond
8 - Commodity
2 - Currency
4 - Index
Historical pricing data before year 2010 is missing.
Found a few problems with the documentation
I was frustrated /v1/instruments/price wasn't working, but I didn't realize it needed a parameter and I could "drill down" on the overview for more details.
This could save a lot of bandwidth
Is there a way that this call can return accountIds with additional infos like accountType, home currency etc...
Right now it is only returning a comma separated account ids.
Please make the keys for the transactions ids the same. Currently the response from opening a trade is "opened" and 'id" for modifying and closing a trade. Instead, change everything to "transactionId".
This is the response when a trade is opened
{
closed = ();
instrument = "EUR_USD";
interest =();
marginUsed = "6.11";
opened = 176203144;
price = "1.2598";
side = buy;
time = "2013-05-28T15:59:18Z";
units = 97;
updated = 0;
}
This is the response when a trade is modified
{
id = 176203144;
instrument = "EUR_USD";
price = "1.2598";
side = buy;
stopLoss = 0;
takeProfit = 0;
time = "2013-05-28T15:59:18Z";
trailingStop = 0;
units = 97;
}
This is the response when a trade is closed
{
id = 176203144;
instrument = "EUR_USD";
price = "1.2598";
side = buy;
stopLoss = 0;
takeProfit = 0;
time = "2013-05-28T15:59:18Z";
trailingStop = 0;
units = 97;
}
The Create a Test User section in Getting started is no longer valid.
The /users api has been removed and the following link to create an account no longer works.
http://developer.oanda.com/gen-account.html
The following pages need to be updated.
https://github.com/oanda/apidocs/blob/master/sections/getting_started.md
https://github.com/oanda/apidocs/blob/master/sections/trading_quick_start.md
Is there a reason why the time format is different for instruments and trades?
Instrument uses UTC millisecond time and trades/orders uses UTC RFC3339 formatted time.
Can we be consistent and use the same time format everywhere?
Streaming rates is great! However it currently seems to use instrument display names rather than the instrument names returned by /v1/instruments. Maybe it (and other parts of the API) could accept "EUR_USD" as well as "EUR/USD", for example.
When http://api-sandbox.oanda.com/v1/accounts/1179804/trades?count=4&instrument=EUR_USD&tradeId=176201454,176201356 url is request, it should return two trades but it's not returning anything.
At the moment streaming rates are only available through FIX and Java API. Would be great to have similar functionality through REST API, simple socket or MQ.
Clicking on http://api-sandbox.oanda.com/v1/quote?instruments=EUR_USD, returns
{
"code" : 38,
"message" : "No matching handler for the request is found",
"moreInfo" : "http://developer.oanda.com/docs/v1/troubleshooting/#errors"
}
v1/instruments does not return all data fields mentioned in the documentation.
http://api-sandbox.oanda.com/ratestream/socket.io.js returns a 404 error.
http://api-sandbox.oanda.com/v1/accounts/5172550/transactions?count=100
Returns only the most recent 50 transaction records.
Paging has no effect, once the latest 50 transactions are returned.
http://api-sandbox.oanda.com/v1/accounts/5172550/transactions?count=40&maxTransId=178692345
Please add precision
and symbol id
fields
GET /v1/accounts/:account_id/orders
GET /v1/accounts/:account_id/trades
GET /v1/accounts/:account_id/transactions
Each of these is currently including "nextPage" even when there are no further items to retrieve. "nextPage" is only omitted from a response with zero items
This results in having to do a redundant query to get a final page with no items.
Despite being documented the "nav" value is currently missing from server responses:
GET /v1/accounts/8139117
{
"accountId" : 8139117,
"accountName" : "Primary",
"balance" : 100000,
"unrealizedPl" : 0,
"realizedPl" : 0,
"marginUsed" : 0,
"marginAvail" : 100000,
"openTrades" : 0,
"openOrders" : 0,
"marginRate" : 0.05,
"homecurr" : "GBP"
}
Also, shouldn't "homecurr" be "homeCurr"?
If there are 26 open trades any additional attempts to open another trade generates a 403 error:
HTTP error code : 403 Msg: Forbidden Request
This trading limit is not present on the current Oanda API.
Hello,
this is the server response to a trade (POST /v1/accounts/:account_id/trades):
{
"ids" : [
178471630
],
"instrument" : "EUR_USD",
"units" : 654127,
"price" : 1.31661,
"marginUsed" : 43061.5075,
"direction" : "short"
}
The following fields are missing:
"time" : ,
"takeProfit" : ,
"stopLoss" : ,
"trailingStop" : ,
thanks
If you visit http://api-sandbox.oanda.com/v1/instruments/EUR_USD/price right now, it returns:
{
"instrument": "EUR_USD",
"time": 1371124431.220175,
"bid": 1.25971,
"ask": 1.2598
}
However, the current spot rate is definitely not that. It is around ~1.332 currently.
In orders, trades and transactions these are variously named "highLimit", "highPrice" and "highOrderLimit" and "lowLimit", "lowPrice" and "lowOrderLimit". Some consistency might be helpful to a developer.
This should return an error, but it does not
http://api-sandbox.oanda.com/v1/accounts/1179804/orders?instruments=EUR_USD&sdfsdf
Instead it returns this
{
"orders":[
]
}
1 EUR/USD
2 EUR/GBP
3 EUR/JPY
4 EUR/CHF
5 USD/JPY
6 USD/CHF
7 USD/CAD
8 GBP/USD
9 GBP/JPY
10 GBP/CHF
11 AUD/USD
12 AUD/CZK
13 AUD/DKK
14 AUD/HKD
15 AUD/HUF
16 AUD/JPY
17 AUD/MXN
18 AUD/NOK
19 AUD/NZD
20 AUD/PLN
... and etc.
In V20 REST API, quoteHomeConversionFactors is an important figure for trader to decide how many unit to trade in their account currency. I hope this will not be deprecated.
source: http://developer.oanda.com/rest-live-v20/pricing-df/#Price
It is very odd to submit trade direction in a separate field like 'direction'. Please add support for signed units.
This may be an oversight but time based retrieval is supported by the website but not here. While minTransId and maxTransId are useful for pagination most operations on transaction history are based on time - today, yesterday, last week, this week, etc. The proposed implementation without minTime and maxTime requires a developer to maintain a local database of transaction history for typical analyses and is not much use for ad hoc queries.
Creating a new account via
POST http://api-sandbox.oanda.com/v1/accounts
Returns a 502 Bad Gateway error.
Also, the new method of creating an account does not allow the ability to set the currency The Account controller no longer has a Currency parameter as there was previously with:
-#### Request
Streaming rates is one of the core functions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.