Delphi 的 FIX 协议引擎?

发布于 2024-11-26 06:31:40 字数 80 浏览 2 评论 0原文

谁能推荐一个与 Delphi 一起使用的 FIX 引擎(商业或开源)?

是否可以将 QuickFIX 与 Delphi 一起使用?

Can anyone recommend a FIX Engine (commercial or open source) for use with Delphi?

Is it possible to use QuickFIX with Delphi?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

冰之心 2024-12-03 06:31:40

查看B2BITS FIX 天线。有两个可能的选项:

  • FIX Antenna C++ 有 ANSI C 接口,可以在 Delphi 中使用(包中有一个示例)

http://www.b2bits.com/trading_solutions/fix_engines/fix_engine_cpp.html

  • 固定天线.NET 可以在 Delphi .NET 中使用(包中还有一个示例;程序员指南也包含 Delphi.NET 示例)

http://www.b2bits.com/trading_solutions/fix_engines/fix_enginenet.html

如果您需要更多,请随时直接与我联系 细节。

Take a look at B2BITS FIX Antenna. There are two possible options:

  • FIX Antenna C++ has ANSI C interface that can be used in Delphi (there is a sample in the package)

http://www.b2bits.com/trading_solutions/fix_engines/fix_engine_cpp.html

  • FIX Antenna .NET can be used in Delphi .NET (there is again a sample in the package; also programmer's guide contains Delphi.NET samples)

http://www.b2bits.com/trading_solutions/fix_engines/fix_enginenet.html

Feel free to contact me directly if you need more details.

羁客 2024-12-03 06:31:40

QuickFix 是一个 C++ 项目。

Python 和 Ruby 都使用 SWIG 将 C++ 类公开为本机 Python 和 Ruby 类。

.NET 包装器听起来像是 C++ 和 C# 代码的混合体。

无法直接在 Delphi 中导入 C++ 类。您必须使用“平面 API”转换,将所有 C++ 方法公开为纯 C 声明,以便在 Delphi 单元中导入外部结构和函数。

据我所知,QuickFIX 没有这样的“平面 API”可用,也没有 SWIG 版本能够生成 Delphi 代码。您必须用 C++ 编写您自己的包装器,或者也许用 Delphi 编写您自己的 FIX 实现。

我所知道的 Delphi 唯一的 FIX 库是来自 http://www.b2bits.com 的库 - 它确实存在几年前,但我不确定它是否仍然出售/维护 - 他们似乎只维护 DotNet 版本。在所有情况下,都值得向他们询问定价和供货情况。

QuickFix is a C++ project.

Both Python and Ruby use SWIG to expose the C++ classes as native Python and Ruby classes.

The .NET wrapper sounds like a mix of C++ and C# code.

It's not possible to import C++ classes within Delphi directly. You'll have to use a "flat API" conversion, exposing all C++ methods as plain C declarations, in order to import external structures and functions in a Delphi unit.

To my knowledge, there is no such "flat API" of QuickFIX available, and no SWIG version able to generate Delphi code. You'll have to write your own wrapper in C++, or perhaps write your own FIX implementation in Delphi.

The only FIX library I know for Delphi is the one from http://www.b2bits.com - it did exist some years ago, but I'm not sure it's still sold/maintained - they seems to maintain only a DotNet version. Worth asking them for pricing and availability, in all cases.

楠木可依 2024-12-03 06:31:40

将协议与 Delphi 集成的一种方法是构建一个 .Net 或 Java 桥,例如:

  • 使用 .Net C# 实现构建一个小型应用程序以与 FIX 端通信
  • ,然后公开该应用程序的方法(甚至可能是对象) .Net 应用程序通过 SOAP Web 服务
  • 使用 Delphi 的 Web 服务客户端代码生成器导入 SOAP WSDL
  • 从 Delphi 端访问 Web 服务

One way to integrate the protocol with Delphi would be building a .Net or Java bridge, for example:

  • use the .Net C# implementation to build a small application to communicate with the FIX side
  • then expose methods (and maybe even the objects) of this .Net app over SOAP web services
  • use Delphi's web service client code generator to import the SOAP WSDL
  • access the web service from the Delphi side
白馒头 2024-12-03 06:31:40

这可能比其他任何东西都更像是一种黑客攻击,但是您可以通过 python4delphi。不过,这是很多层(Delphi 到 Python 到 C++)。

Python 是一种易于使用和学习的语言,并且可以轻松调用和创建 Python 对象(或伪装成 Python 对象的本机 C 包装器)并直接从 Python4Delphi API 调用它们。

除此之外,正如 ABouchez 所说,构建一个程序化(平面)API 可能只需要很少的工作。我不会编写一百万个函数,而是只编写我需要的函数,然后在 VC++ DLL 中实现这些简单的函数:

   QuickFixInit;
   QuickFixCleanup;
   handle := QuickFixLoadFile(filename)
   QuickFixSaveFile(handle)
   handle2 := QuickFixGetObjectHandle(handle,index,...); 
   QuickFixModifyObjectProperty(handle2, propertyname, propertyvalue );
   QuickFixExecuteSomeAction( handle2, actionname, param1,param2,param3 );

以上只是为了让您了解一下。我对内部 API 一无所知,但上面我向您展示的是您不需要 100% 符合 API 来编写包装器。您可能(如果您了解 C/C++)编写一个函数包装器来执行您需要的操作,然后导出它,将其链接到 DLL,然后将 QuickFix.dll 导入到 Python 中,只需很少的时间(专家需要花费 2-4 小时)如果您足够了解 Visual C++,能够编写一些简单的 C 风格(非 OOP)函数来实例化 C++ 类并调用 C++ 方法,那么时间)就可以工作。

可以通过包含 QuickFIx 的 C++Builder 包 (BPL) 将 C++ API 公开给 Delphi,但是 (a) 需要进行一些源修改,并且 (b) QuickFix 中的 C++ 代码或其依赖项可能会如果没有进行重大修改,则不能在 C++Builder 中构建。

This is probably more of a hack than anything else, but you could use the Python QuickFIX bindings in Delphi, via python4delphi. That's a lot of layers though (Delphi to Python to C++).

Python is an easy language to use, and learn, and it's easy to invoke and create python objects (or native C wrappers that pretend to be python objects) and invoke them directly from the Python4Delphi API.

Barring that, it might be very little work for you to build a procedural (flat) API as ABouchez said. Instead of writing a million functions I would write only the ones I needed, and then implement these simple functions inside a VC++ DLL:

   QuickFixInit;
   QuickFixCleanup;
   handle := QuickFixLoadFile(filename)
   QuickFixSaveFile(handle)
   handle2 := QuickFixGetObjectHandle(handle,index,...); 
   QuickFixModifyObjectProperty(handle2, propertyname, propertyvalue );
   QuickFixExecuteSomeAction( handle2, actionname, param1,param2,param3 );

The above are just to give you the flavor. I know nothing about the internal API, but what I'm showing you above is that you don't need to conform 100% to the API to write a wrapper. You could probably (if you know C/C++) write a functional wrapper that does what you need, and export it, link it into a DLL, and then import QuickFix.dll into Python with very little (2-4 hours of an expert's time) work, if you know Visual C++ well enough to write a few simple C-style (non OOP) functions that instantiate C++ classes, and invoke C++ methods.

It might be possible to expose the C++ APIs to Delphi via a C++Builder package (BPL) containing QuickFIx, but (a) some source modifications would be required, and (b) the C++ code in QuickFix, or its dependencies, might not build in C++Builder without significant modifications.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文