Oanda & using their API

JTrader

Guest
Messages
5,741
Likes
507
Hello again all fellow traders - I hope you are all happy campers!

I've been away for quite a while, as I've been busy 'working for a living', and have had a couple of holidays etc. as well ;) .

In order to stay up-to-date on a few issues, here's just a few questions about using Oanda's API for forex trading...........

Oanda website -
The API provides the ability to submit trade requests, set and modify stop-loss/take-profit/entry orders, obtain historical transactions and both current and historical FXTrade market rates and candlesticks.
A library is dynamically linked to the customer systems, and implements the FXTrade protocol, communicating directly with OANDA's FXTrade servers over secure and authenticated Internet sessions. It does not require that the FXTrade User Interface be running at the same time, but the customer may use the Interface to monitor in real time any actions taken by the customer systems using the API.
Features
· Simple to understand; easy to work with
· Secure, authenticated sessions over fully encrypted communication channels
· Available in both Java and C++
· Unlimited risk-free testing on FXGame systems


Is anyone using it? If so, how have you found it, and have there been many problems etc.? misplaced trades, open positions that should have been closed or never opened in the first place, undue slippage etc.?

using the API, can I have my strategy/ies monitor the market, enter and exit trades 24/5 on an automated basis?

Is Oandas API used simply to implement strategies to enter and exit trades automatically based on technical analysis criteria?

What TA charting package/s can be linked through the API to fxtrade? (tradestation, metastock, esignal?) How does it work?

Can these trades be placed using trailing stop loss orders, limit orders etc.?

Does my computer, API and fxtrade need to be switched on, open and running all the time in order to enter and exit trades for me on a 24/5 basis? How does it work?

How long does the license fee of USD $600 for the Library last? a life-time, one year?

How many automated mechanical trading strategies can I client link to and have running on the API at any one time?

Many thanks.
 
Last edited:
Oanda v's good spreadbetting services for intraday forex trading

Hi

I'm also wondering what fellow traders think would be the best method for trading forex on an intraday (5-60 minute charts) basis...........using a decent spot forex dealer like Oanda, where all trades are fully automated, the service is transparent, you cannot lose more than your initial account opening balance, and the spreads are usually narrower (1.5-2 pips for EUR/USD).
Or, using one of the better spreadbetting services like Capital Spreads, where the service is NOT fully automated, specialised, transparent, the spreads are slightly wider, you can lose more than your initial account opening balance etc. BUT, the profits are free from income tax. It does seem a bit of a dilemna :confused: ........

Perhaps you have traded forex with the likes of Capital Spreads on an intraday basis, but decided that due to some problems experienced, you were better off paying tax on your profits and trading with a specialist spot forex dealer like Oanda, because the services and facilities on offer are more refined and may be more dependable?

What has been your experience, what if any problems did you encounter, and what did you decide about who you were best off trading with?

Thanks again

JT.
 
Last edited:
I have long-term experience with Oanda (among others) and I think they are very good. They are transparent and FAIR, which is most valuable asset in FX retail industry (and their leadership certainly have respect among customers). On a couple ocasions (2 years ago, because of program malfunction) artifical spikes triggered stop-losses, and they reversed all executed stops, returning acc. balance to before-spike situation. Very fair.

There is strong sense of community between trader members, and Oanda leadership, very helpful to each other.

Another, I realised many times price coming to my stop level by 1 pip, only to be turning in my favor without triggering stop. Again very fair and neutral.

You cannot lose more than on deposit, also valuable option. This alone is enough to sleep well.

My only complain may be, sometimes I cannot log-in due to server problem (once in two month or so). And yes, no more than 1:50 leverage :)

Re. API, Dr. Stumm said it may be dangerous situation, because if you have minor bug hidden in your application connected to API, it can trigger order by mistake (for example max leveraged buy order without stop) and it can cost you dearly. It all depends on quality of your written code, so be careful with API implementation.
 
Last edited:
I agree about being very careful with the API. It reminds me when I first started writing code for IBs API and my code decided it would be nice to keep buying FTSE futures.

Luckilly for me my account didn't have much dosh in it and IBs servers rejected most of my trades because of insufficient margin.

That said I would recommend using an API if you want custom features and/or to automate your trading.

JonnyT
 
Also ask for a test environment, if they provide dummy accounts for traders you'll probably find the API will also talk to those type of accounts. Otherwise I guess it'll be extensive debugging.

It's not a bug, it's a feature
 
Actually reading with my eyes open they do seem to provide a test platform, as for the likes of tradestation I doubt they'd be able to consume the API - I have no experience in using them so it's only a guess.

using the API, can I have my strategy/ies monitor the market, enter and exit trades 24/5 on an automated basis?

Yup, but you'll need a failsafe - when it comes down to these types of transactions it's best to have process making the decisions and another executing them - the second with some hard criteria making sure the first doesn't deliver a order that will threaten your principle.

Is Oandas API used simply to implement strategies to enter and exit trades automatically based on technical analysis criteria?

Generally you could use the API to build your own trading station, or a trading process as you described earlier, Oanda just execute the orders what's on the client end they have no idea.

What TA charting package/s can be linked through the API to fxtrade? (tradestation, metastock, esignal?) How does it work?

I don't have any experience in those, I doubt they'd be able to do it - you might consider posting that question in the Mechanical trading forum or speaking to the software developers.

Can these trades be placed using trailing stop loss orders, limit orders etc.?

Your process would be able to monitor the price and create it's own trailing stop based on criteria you specify, I believe the API does support limit orders.

Does my computer, API and fxtrade need to be switched on, open and running all the time in order to enter and exit trades for me on a 24/5 basis? How does it work?

A tool, process or whatever you call it will have your strategy rules coded, your pc will need to be on all the time and the software running. Automated trading systems should be approached with caution when placing live trades - they can clear out your account when your asleep!

Your strategy should consist of logical steps for trade assessment, risk factors, capital allocation then finally entry and exit. You could get your application to save the trades rather then executing them (like a trading log) perform the necessary due diligence and asses if it's following your rules bug free.

How many automated mechanical trading strategies can I client link to and have running on the API at any one time?

The API will only be able to accept one request at a time, your transactions will need to be queued, though it will be fast.

HTH
 
jtrader said:
using the API, can I have my strategy/ies monitor the market, enter and exit trades 24/5 on an automated basis?
24/7 if you want to pay the spread.

Is Oandas API used simply to implement strategies to enter and exit trades automatically based on technical analysis criteria?
Its an api to acess the order and quote system. No indicators are provided afaik

What TA charting package/s can be linked through the API to fxtrade? (tradestation, metastock, esignal?) How does it work?
Non unless you write it.

Can these trades be placed using trailing stop loss orders, limit orders etc.?

Does my computer, API and fxtrade need to be switched on, open and running all the time in order to enter and exit trades for me on a 24/5 basis? How does it work?
Yes and yes

How long does the license fee of USD $600 for the Library last? a life-time, one year?
2 months to allow you to develop your system :rolleyes: after that its free if you do $12 million volume a month or discounted $50 for every million else its $600 per month :eek:
They say it is to "discourage" casual dabblers
 
Thanks guys.

I also see that forex.com offer API for free to their clients. Then theres I.B. etc.

Perhaps I do not have a very full understanding of what API trading involves. I thought it was possible to link charting packages like tradestation, esignal, metastock etc, to the brokers platform/quote system, via an API so that I could have my tradestation easy languge strategies, esignal formula script strategies, or metastock formula language strategies, interact with the brokers quote system and place trades as and when my charting packages TA based mechanical strategies indicate. Is this possible?

If it is not possible to link tradestation, metastock, esignal etc. to an API, then how do you run mechanical trading strategies based upon technical analysis (indicators) criteria with an API?
Do you have to develop your own charting program?

Or, can an API only handle Technical analysis information that is not indicator based? such as the high and low prices within a 1-hour period, breakouts from such highs and lows etc?

What exactly can an API be used for?

Thanks again

jtrader.
 
jtrader said:
Thanks guys.

I also see that forex.com offer API for free to their clients. Then theres I.B. etc.

Perhaps I do not have a very full understanding of what API trading involves. I thought it was possible to link charting packages like tradestation, esignal, metastock etc, to the brokers platform/quote system, via an API so that I could have my tradestation easy languge strategies, esignal formula script strategies, or metastock formula language strategies, interact with the brokers quote system and place trades as and when my charting packages TA based mechanical strategies indicate. Is this possible?

If it is not possible to link tradestation, metastock, esignal etc. to an API, then how do you run mechanical trading strategies based upon technical analysis (indicators) criteria with an API?
Do you have to develop your own charting program?

Or, can an API only handle Technical analysis information that is not indicator based? such as the high and low prices within a 1-hour period, breakouts from such highs and lows etc?

What exactly can an API be used for?

Thanks again

jtrader.

Some members have succesfully linked Tradestation to the API. Also note the 12mill vol works out as 6mill as both pairs vol is taken into account. Best if you asked your questions on the Oanda forum, and also browse older posts as there is quite a bit of info there on the API
 
You can do pretty much anything with it, depending on what the particular API provides in the way of data and functionality, and limited by your (programming) ability to create an application to autotrade/plot charts/calculate special numbers etc etc. For example the API may be limited to a simple flow of quotes for specific instruments, but without the ability to do much with them eg place buy/sell orders. Or else it may have the ability to execute very complex order types, it all depends on what is being offered by the company in question. You will also be able to find third party tools that can be bolted onto your application, to save re-inventing the wheel, although usually you will have to pay for these, understandably. Whatever, there will be quite a lot of work involved to get it up and running, as each companys API may be quite different in functionality, programming langauge, syntax etc. Not recommended for non-programmers IMO.

GL
rog1111

jtrader said:
............What exactly can an API be used for ?.......................
 
Thanks chaps

so judging from rog1111's comments, a large part of the depth of functionality available when using any brokers API, is dependent upon the how sophisticated the actual API is to start with. For example, I.B.'s API may be more sophisticated than Oanda's or forex.coms?

Going back to Oanda. A trader would make use of their API in order to build trading functionality into their own software systems. They would gain access to Oanda's prices/quotes, and perhaps be able to base trade entries and exits on technical analysis (indicator) criteria as determined by oandas charting application (?).

It would be helpful IF Oanda actually answered my questions about trading with the API, whcih they haven't yet done in the 7 days since I submitted (on 3 occassions) my questions.

The oanda website also states -

Description
The API provides the ability to submit trade requests, set and modify stop-loss/take-profit/entry orders, obtain historical transactions and both current and historical FXTrade market rates and candlesticks.

A library is dynamically linked to the customer systems, and implements the FXTrade protocol, communicating directly with OANDA's FXTrade servers over secure and authenticated Internet sessions. It does not require that the FXTrade User Interface be running at the same time, but the customer may use the Interface to monitor in real time any actions taken by the customer systems using the API.

So I wonder if this means that the user does not need to have their computer, fxtrade, API software up and running 24/7, once everything is in place in order to auto-trade through the API?

Thanks again

jtrader.
 
http://www.tradebolt.com/tradebolt.htm -

What Is TradeBolt?



TradeBolt is a powerful trading tool for traders of every experience level. It allows for fully automatic trading and order execution for any system, and in any programming language! TradeBolt takes the signal from a system and sends it to your broker for execution at lightning speed.


* Now As low as $0.10 per contract/$0.0005 per share *
* Multiple/Managed accounts now supported *



TradeStation Support:

Seamlessly integrates into TradeStation 2000, 6, 7, 8. NO MODIFICATIONS to your existing strategies necessary. Lightning fast, accurate, executions.

eSignal, MetaStock, WealthBuilder Support:

Virtually "Hands-Free" fully automatic order execution is easy to add to any system or indicator
using the TradeBolt Universal Link.

Hi rog1111

I suppose tradebolt is a prime example of software that ensures that clients do not have to re-invent the wheel.

I suppose the one way to avoid having to consider API's and third party software would be simply to autotrade using tradestation charts and easy language strategies, linked to the tradestation brokerage service, then at least if things do go wrong, you know that it is definately either yourself or tradestation who is to blame!
 
Last edited:
jtrader

It depends what you are doing with it. If you are placing automated orders, then you'll obviously need to be online, maybe not 24 x 7, but at least during market hours and you may have to make careful allowance (in your code) for disconnections. If you are placing orders with stops and/or limits, then you may possibly have more peace of mind, as long as the stop/limit is held on the broker's servers. In short you really need to know what you are doing to get involved with API autotrading, or pay for someone that does. Even then, the thought of switching the autotrader on then merrily going out to work for the day gives me the shivers ! NIce dream though :cheesy:

I get the impression that many FX brokers don't really want their smaller clients using their API, they seem to be aimed more at the institutional level, presumably because the API customer support overhead is potentially quite high.

I suppose that your other option might be to let the FX broker trade your strategy (some will do this), but as you well know, this is merely inviting trouble

rog1111

jtrader said:
So I wonder if this means that the user does not need to have their computer, fxtrade, API software up and running 24/7, once everything is in place in order to auto-trade through the API?

Thanks again

jtrader.
 
...yes those are two more options, I can't comment though as I have no direct experience of either

rog1111

jtrader said:
Hi rog1111

I suppose tradebolt is a prime example of software that ensures that clients do not have to re-invent the wheel.

I suppose the one way to avoid having to consider API's and third party software would be simply to autotrade using tradestation charts and easy language strategies, linked to the tradestation brokerage service, then at least if things do go wrong, you know that it is definately either yourself or tradestation who is to blame!
 
If anyone is adept at computer programming he could use Oanda to make a market with another Exchange. Intrade used to have spot currency trades, no longer now.
 
Spreadbet dealer or specialist spot forex broker for intraday forex trading?

I must say.............

from all the spot forex dealers/brokers I have emailed with questions in the past and who's websites I have studied, Oanda do seem to be MUCH better than their competitores - in terms of their spreads, transparent service, honesty (open and unedited forums etc. for customers).

Going back to the main question of my second post, would you rather intraday trade (maybe around 5 round turns a day) say EURUSD with a 3 pip spread with CMC spreadbet or Capital Spreads, knowing that profits are tax-free (in the UK), or would you prefer to trade EURUSD on an intraday basis with a 'good' specialist like Oanda, who may offer a more professional and refined forex trading experience, with offer tighter spreads, but you would have to pay income tax on your profits?

So do you think it is worth giving away around 20-40% of your profits in income tax by trading with Oanda, for the sake of tighter spreads and a more specialist all round forex trading experience?

Or are you happy to stay with the spreadbet dealer, until the point that they give you a serious reason to switch to the specialist spot forex broker?

Thanks again

jtrader.
 
This all depends on timescales.

If you are looking for 30+ pip winners etc then an extra pip or two on the spread won't make much difference so personally I would spreadbet.

If you are looking for 5 or 6 pips then I'd use the futures on Globex with a 1 pip spread and suffer the tax consequences and not Oanda.

JonnyT
 
http://www2.oanda.com/cgi-bin/msgboard/ultimatebb.cgi?ubb=get_topic;f=17;t=001855#000000

contributors to this thread in Oandas open forum do make it clear that it is possible to link TS8 and TS2000i to Oandas API. At least now I know its possible. It does all seem above and beyond my present capabilities.

I would probably start by trading using TS8 mechanical strategies, and then manually execute trade entry and exit signals with Oanda. Alternatively, once the tradestation spot forex broker (Gain Capital - who's subsidiaryy is forex.com) enable full automation of mechanical trading strategies with TS8 - I could fully automate this way.

Cheers,
jtrader.
 
Why the obsession with Oanda?

You can trade TS8 with IB and trade the Globex future in a real market with a 1 pip spread rather than an artificial market with a spread upto 2 or 3

JonnyT
 
Globex isn't the only one which has a 1 pip spread. The recognized Exchanges don't have the monopoly as far as FX is concerned. Currently there are about 5 Level -2 style trading platforms, effectively same effect as a trading Exchange, execution as fast if not faster than the Exchanges.

If the bid-ask is tight, market making on the same exchange becomes difficult, in terms of buying at the bid and immediately selling at the ask, even if the fees are small.

Using something like Oanda at 1.5 pips and reselling it somewhere else, in a less sophisticated market or exchange at say, 3 pips, gives a higher certainty of winning.
 
Top