Pergunta

I have implemented my own FIX client, something like QuickFIX. Now I need to test it. Is there a fake FIX exchange somewhere that I can use? Has anyone ever implemented a FIX server that I can use to validate my client? Is there a real exchange from which I can use their test connection to test and validate my fix client?

Any help here will be greatly appreciated!

Foi útil?

Solução

Have you tried FIXimulator? http://code.google.com/p/fiximulator/ It doesn't exactly work as an exchange, but you can establish sessions, receive orders and execute (auto execution as well possible) them. Check it out.

Outras dicas

Mini-FIX can be used for GUI based

QuickFix example application programs "executor" and "ordermatch" should be helpful. Code is simple, you can even enhance it to suit your needs for the exchange functionality. Good thing about these solutions is that different versions of FIX are supported thought FIX 4.2 is the most widely accepted.

check the quickFIX distribution. here: http://www.quickfixengine.org/quickfix/doc/html/examples.html you can find the "executor".

Is a sample server that simply fills every limit order that it receives.

Also you can find "ordermatch", which is a c++ server that will match and execute limit orders.

A few years ago I couldn't find a testing platform that I didn't have to sign a contract with large license fees, so I created one. Sorry for the shameless plug here, but I ended up turning it into a product/service offering hosted at www.fixsim.com with a free trial. Banzai that comes with QuickFIX is a good free start, but if you need different asset classes, cancel/correct, allocations, or other message types you either have to build or buy.

CoralFIX comes with a ready-to-use server implementation that you can fire and start accepting connections from your FIX clients. It will handle all the FIX session level details like logon, heartbeats, sequence reset, resend request, etc. To implement a simple server for your tests all you have to do is:

import com.coralblocks.coralfix.FixMessage;
import com.coralblocks.coralreactor.client.Client;
import com.coralblocks.coralreactor.nio.NioReactor;
import com.coralblocks.coralreactor.util.Configuration;
import com.coralblocks.coralreactor.util.MapConfiguration;

public class SimpleFixApplicationServer extends FixApplicationServer {

    public SimpleFixApplicationServer(NioReactor nio, int port, Configuration config) {
        super(nio, port, config);
    }

    @Override
    protected void handleFixApplicationMessage(Client client, FixMessage fixMsg, boolean possDupe) {
        // do whatever you want to do with the application message received from this client...
    }

    public static void main(String[] args) {

        NioReactor nio = NioReactor.create();

        MapConfiguration config = new MapConfiguration();

        // print all messages received and sent to STDOUT for debugging purposes
        // (default is false)
        config.add("debugMessages", "true");

        // accept as the client inbound sequence whatever 
        // sequence I receive in the first message coming from the client
        // (default is false)
        config.add("acceptInboundSeqFromClient", "false");

        Server server = new SimpleFixApplicationServer(nio, 45451, config);

        server.open();
        nio.start();
    }
}

A full explanation of the code above can be found here.

Disclaimer: I am one of the developers of CoralFIX.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top