GithubHelp home page GithubHelp logo

fix's Introduction

fix

fix is a toolbox for the Financial Information eXchange protocol.

Bootsrap configuration

fix configuration allows you to define initiators, acceptors and sessions. Those are wrapped in contexts that allow you to switch from one initiator/acceptor to another with the --context option.

# Create a default configuration in $HOME/.fix/
fix config init

An initiator describes the network properties needed to connect to a FIX acceptor. An acceptor describes the network properties needed to launch a server which will accept connection from FIX initiators. A session describes the properties of a FIX session.

โš ๏ธ An acceptor can have several sessions but an initiator can only have one.

You can use the current-context property to define the context to use if none is provided as an option.

Boostrap databases

The FIX protocol requires a message sequence number which should be incremented for each messages sent on the wire. In order to keep track of the sequence number fix uses databases. Note that you can share a database for different initiators and another for the acceptors but you can't share a database between initiators and acceptors.

Currently only the sqlite3 driver is supported but we plan to support for other database types such as mysql & postgresql.

You can select the driver using SQLStoreDriver and you can give a connection string using the SQLStoreDataSourceName configuration in the initiators and acceptors.

If you don't provide SQLStoreDataSourceName for the sqlite3 driver it will default to $HOME/.fix/initiator.db & $HOME/.fix/acceptor.db. If you want to use a different path or custom options refer to the following documentation.

# Create databases for the different initiators and acceptors
fix database init

Acceptor

The acceptor bundled in fix is a FIX5.0SP2 server that takes NewSingleOrder messages, forward them to a embeded NATS server and send an ExecutionReportStatus message with and OrdStatus set to 0 (New).

Build from sources

fix requires a go toolchain >= 1.18 to be built from sources. You'll also require libsqlite3.

# Build locally in the dist/ folder
make build
# Cross build for different os/arch in the dist/ folder
make crossbuild
# Build and install the fix binary into your $GOPATH/bin/ folder
make install

Configuration

Default configuration is located at $HOME/.fix/config. You can specify a custom location by using the --config option.

# vim: syntax=yaml :
---
current-context: localhost
contexts:
- name: localhost
  initiator: localhost
  sessions: [localhost]
- name: server
  acceptor: server
  sessions: [server]
acceptors:
- name: server
  SocketAcceptHost: 127.0.0.1
  SocketAcceptPort: 5005
  SQLStoreDriver: sqlite3
initiators:
- name: localhost
  SocketConnectHost: 127.0.0.1
  SocketConnectPort: 5005
  SocketServerName: localhost
  SocketUseSSL: false
  SocketInsecureSkipVerify: false
  SocketTimeout: 5s
  SQLStoreDriver: sqlite3
sessions:
- name: server
  HeartBtInt: 5
  SenderCompID: BIGCORP
  TargetCompID: smallcorp
  TargetSubID: john
  BeginString: FIXT.1.1
  DefaultApplVerID: FIX.5.0SP2
  TransportDataDictionary: $HOME/.fix/FIXT11.xml
  AppDataDictionary: $HOME/.fix/FIXT11.xml
- name: localhost
  HeartBtInt: 5
  SenderCompID: smallcorp
  SenderSubID: john
  TargetCompID: BIGCORP
  BeginString: FIXT.1.1
  DefaultApplVerID: FIX.5.0SP2
  TransportDataDictionary: $HOME/.fix/FIXT11.xml
  AppDataDictionary: $HOME/.fix/FIX50SP2.xml

fix's People

Contributors

alexm126 avatar alexppxela avatar ffreville avatar sylr avatar yasinenifa avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.