Hey,
Others will absolutely find this thread helpful, since the whole api doc is 1-page.
Well, I'm looking to split a portion of project fund to obtain Oanda API for 2 months. You can find further discussion on this at
"Have you successfully analysed any broker api protocol?" thread.
Quote:
|
I take it this means that both the 2-minute connection limit and the 5-second limitation on GetTrades are bogus? Does your program actually call it on every UPDATE_BIDASK message, as you suggested?
|
Yes, those functions are called on every UPDATE_BIDASK without any problem. You'll find further discussion about 5-second limitation from page 1 (this thread).
Quote:
|
That makes sense. So you do both--reconnect if no ticks arrive for the interval, or whenever you get END_PUMPING?
|
I do both, as mentioned.
Quote:
|
I do get an UPDATE_TRADES after closing a position, but as the purpose of GetTradeRecords is to list the current open positions, all this message tells me is that the trade has closed (since it's no longer in the list.) At that point, I don't know what the actual closing price was, so I must fetch it manually by calling GetTradeHistory so that my local database is accurate.
|
To get a list of recently closed trades, my bot compares the list of open trades before UPDATE_TRADES with the list after UPDATE_TRADES. The missing trades must be closed.
Ok, have a sweet wet chocolate dream!
