FOK/FAK som inte tas bort

Added by Björn over 4 years ago

Hej!

Jag försökte lägga en Fill-Or-Kill order idag (775799). Första meddelandet på privat feed kom (LOCAL, INS_PEND), men sen hände inget mer. Åtminstone inte under 10 minuter.
FOK- och FAK-order borde väl tas bort "omedelbart"? Varför blir det så här?


Replies (20)

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

Samma sak igen med 775800...

RE: FOK/FAK som inte tas bort - Added by Lars over 4 years ago

En FOK/FAK som läggs under marknadens öppettider brukar ge tre svar på private feed (om vi antar att den inte går igenom):

INS_PEND - Nordnet har tagit emot ordern
INS_CONF - ordern har gått till marknaden
DEL_CONF - ordern har tagits bort från marknaden

Dessa brukar komma inom några tiondelar av en sekund.

Om du bara får INS_PEND så tycks ordern aldrig ha gått till marknaden. La du ordern utanför marknadens öppettider?

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

Testsystemets "öppettider" är lite otydliga. :-) Några av gångerna var innan 9:30 på morgonen, men tid på dygnet verkar inte spela någon roll baserat på mina nu fem misslyckade försök de senaste dagarna.
Publika feeden rapporterar i alla fall trading status = C (Continuous trading) vid alla tillfällen. Jag tycker att det borde räcka...

RE: FOK/FAK som inte tas bort - Added by Lars over 4 years ago

Om du bara får INS_PEND på private feed så är grundproblemet att ordern aldrig når marknaden snarare än att den aldrig tas bort. Om marknaden är stängd så är det ju inte så konstigt att en order som antingen ska exekveras omedelbart eller inte alls inte utförs. Om marknaden är öppen så är det sannolikt en bugg hos Nordnet att en FOK-order inte går till marknaden.

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

Yes. Några av gångerna var klockan utanför 9:30-17:30, men systemet rapporterar som sagt Contiuous Trading vid alla tillfällen, så det ska väl vara ok tycker jag.
Kommentar från Nordnet?

RE: FOK/FAK som inte tas bort - Added by Nordnet Aleksandar over 4 years ago

Hi Björn,

Your orders were placed on a Saturday and the test market is down on weekends. This explains why your orders never went out to the market.

However if you did receive trading status = C during this time it could be a bug. We will look into this and examine how the feeds behave on weekends.

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

No... You're kidding me? :-) OK, I could have sworn the test system has worked on weekends before. Feeling a bit stupid here!

In that case, could you take a look at order 775832 instead. This time I did receive the DELETED/DEL_CONF response, but it took more than a minute from the initial LOCAL/INS_PEND.
Normally, these responses come more or less immediately. I have added a lot of checks to make sure that my system behaves as expected and don't run amok => don't loose all my money :-)
That orders are processed within a certain time is one of those checks. (I always use FAK or FOK.) Is it reasonable to assume such a behaviour or does this happen now and then, even in the production system?

And please look into the trading status, as you said. Thanks!

RE: FOK/FAK som inte tas bort - Added by Nordnet Aleksandar over 4 years ago

I checked order 775832 and it seems that it was placed while the instrument was in the middle of an auction.
If an order is placed during an auction, it cannot go through until the auction has ended.
FOK/FAK orders are removed after the first matching attempt in the market and they may not be matched during auctions.
This may take up to a couple of minutes in some cases.

This is controlled by the market and is not something we have control over.

As for production, it is possible for an auction to occur however it is very rare.
Since the test market has much fewer trades and users are experimenting with placing orders at larger price spreads these auctions are more common.

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

OK. So an auction can happen at any time during the day, not just when opening and closing the market?
Can I know when an auction is being performed? The trading status did not change as far as I know...

RE: FOK/FAK som inte tas bort - Added by Lars over 4 years ago

So, assuming that I understand this correctly, if I place a FOK order during an auction the order will be put on hold until the auction is finished, then processed? This is highly non-desirable behaviour. If I place a FOK order I expect it to either go through wihtin a fraction of a second or not at all. Shouldn't Nordnet reject the order if an auction is in progress (or if the order can not be placed on the market immediately for whathever reason)?

RE: FOK/FAK som inte tas bort - Added by Nordnet Aleksandar over 4 years ago

Björn:

Yes, an auction can occur in the middle of the day if there is a significant price difference from the last trade in the market (which is why it is highly unlikely in production).
You should however receive a trading status update on the feed to notify you that an instrument is in an auction phase. This seems to be a bug in the test environment which we will work on.

Lars:

Like i explained before, this is market defined behaviour and is nothing we have control over. For Nasdaq OMX, FOK/FAK orders go through after the auction if a match exists.
To avoid this you would have to listen to the feed for trading status messages to see when instruments are in auctions (There's a bug right now, sorry) and avoid placing orders at these times.

RE: FOK/FAK som inte tas bort - Added by Lars over 4 years ago

I do not understand the argument that "this is market defined behaviour and is nothing we have control over." If I should be able (without the bug) to keep track of the trading status and avoid placing an order during an auction then surely Nordnet should also be able to keep track of the trading status and reject FOK/FAK orders placed during an auction, if they wanted to...

RE: FOK/FAK som inte tas bort - Added by Nordnet Aleksandar over 4 years ago

The public feed now responds with correct trading status when an auction occurs:

[{"type",<<"trading_status">>},
{"data",
{obj,[{"i",<<"936">>},
{"m",11},
{"tick_timestamp",1416488855000},
{"status",<<"R">>},
{"source_status",<<"Trading">>},
{"halted",<<"Auction">>}]}}]

So now you get notified during auctions. When the auction ends a new trading status: 'C' is sent out again.

As for why the order goes through after auctions, the question should be: why would you place an order when you want it to get rejected?
If a user does not want FOK/FAK orders to get executed after auctions they should not have been placed them during auctions.
The public feed will notify you of the trading status of instruments and users can make a conscious choice of how they want implement their logic around this. If we reject all orders we make that choice for them.

RE: FOK/FAK som inte tas bort - Added by Lars over 4 years ago

OK, that all sounds reasonable. Is this behaviour the same for all markets or particular to Nasdaq OMX? Is it documented somewhere?

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

That was one quick bug fix! Thanks!
Did this also correct the reported trading status during weekends, or will that come later on?

RE: FOK/FAK som inte tas bort - Added by Nordnet Aleksandar over 4 years ago

Lars:

Sadly there isn't any documentation for this at this time.

Björn:

Glad to help:)
It might still be there. I will try and recreate it during the weekend.

RE: FOK/FAK som inte tas bort - Added by Lars over 4 years ago

"users can make a conscious choice of how they want implement their logic"

In principle this makes sense, but in reality it is difficult, to say the least, to implement logic that responds in a useful way to a system whose behaviour is undocumented...

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

As far as I can tell, the test system still reports "continuous trading" during the weekends.
1) Will this be corrected?
2) Does the production system behave in the same way?
3) Does this also affect weekdays without trading, e.g. new year's day?

RE: FOK/FAK som inte tas bort - Added by Nordnet Simon over 4 years ago

Björn wrote:

As far as I can tell, the test system still reports "continuous trading" during the weekends.
1) Will this be corrected?

Yes - hopefully. The problem is that we have a bit of a problem moving some parts of the system to the open testsystem.

2) Does the production system behave in the same way?

No - weekends are reported as closed in production.

3) Does this also affect weekdays without trading, e.g. new year's day?

Yes

RE: FOK/FAK som inte tas bort - Added by Björn over 4 years ago

OK. Thanks for the answer!

(1-20/20)