java 如何测试我的 FIX 客户端?是否有我可以使用的假 FIX 交换?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11435174/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 05:07:05  来源:igfitidea点击:

How to test my FIX client? Is there a fake FIX exchange out there that I can use?

javac++quickfixfix-protocolalgorithmic-trading

提问by chrisapotek

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?

我已经实现了我自己的 FIX 客户端,比如 QuickFIX。现在我需要测试它。我可以在某处使用假的 FIX 交换吗?有没有人实现过可以用来验证我的客户端的 FIX 服务器?是否有真正的交换,我可以使用他们的测试连接来测试和验证我的修复客户端?

Any help here will be greatly appreciated!

这里的任何帮助将不胜感激!

采纳答案by Sudhir Krishnan

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.

你试过 FIXimulator 吗?http://code.google.com/p/fiximulator/它不能完全用作交换,但您可以建立会话、接收订单并执行(尽可能自动执行)它们。看看这个。

回答by Groovy

Mini-FIXcan be used for GUI based

Mini-FIX可用于基于 GUI

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.

QuickFix 示例应用程序“executor”和“ordermatch”应该会有所帮助。代码很简单,您甚至可以对其进行增强以满足您对交换功能的需求。这些解决方案的好处是支持不同版本的 FIX,因为 FIX 4.2 是最被广泛接受的。

回答by TheFIXGuy

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.comwith 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.

几年前,我找不到一个不需要签订大量许可费用合同的测试平台,所以我创建了一个。很抱歉这里的无耻插件,但我最终将它变成了托管在www.fixsim.com上的产品/服务产品,并提供免费试用。QuickFIX 附带的 Banzai 是一个很好的免费开始,但如果您需要不同的资产类别、取消/更正、分配或其他消息类型,您必须构建或购买。

回答by rdalmeida

CoralFIXcomes 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:

CoralFIX带有一个随时可用的服务器实现,您可以启动并开始接受来自 FIX 客户端的连接。它将处理所有 FIX 会话级别的详细信息,例如登录、心跳、序列重置、重新发送请求等。要为您的测试实现一个简单的服务器,您只需:

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.

免责声明:我是 CoralFIX 的开发人员之一。

回答by stexcec

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

检查 quickFIX 分发。在这里:http: //www.quickfixengine.org/quickfix/doc/html/examples.html您可以找到“执行程序”。

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.

您还可以找到“ ordermatch”,这是一个将匹配和执行限价订单的 C++ 服务器。