Git Product home page Git Product logo

quickfixutils's Introduction

QuickFixUtils

QuickFix/J utility library contains:

  • Hamcrest matchers

Hamcrest Matchers

This utility provides hamcrest matchers for FIX message matching. Usage is as follows:

...
import static com.qfu.matcher.FIXMatchers.isFIXMessage;
import static com.qfu.matcher.Group.group;
import static com.qfu.matcher.Header.header;
...

        // use field id and value
        assertThat(message, isFIXMessage()
                .ofType(NewOrderList.class)
                .with(header().with(SenderSubID.FIELD, "senderSubId-123"))
                .with(ListID.FIELD, "listId-123")
                .with(BidType.FIELD, BidType.NON_DISCLOSED)
                .with(TotNoOrders.FIELD, 1)
                .with(group(1, NoOrders.FIELD)
                        .with(ClOrdID.FIELD, "clOrdId-123")
                        .with(Side.FIELD, Side.SELL)
                        .with(Price.FIELD, new BigDecimal("1.25"))
                        .with(TransactTime.FIELD, new Date())
                        .with(OrdType.FIELD, OrdType.FOREX_MARKET)
                )
        );

        // or field object with value
        assertThat(message, isFIXMessage()
                .ofType(NewOrderList.class)
                .with(header().with(new SenderSubID("senderSubId-123")))
                .with(new ListID("listId-123"))
                .with(new BidType(BidType.NON_DISCLOSED))
                .with(new TotNoOrders(1))
                .with(group(1, NoOrders.FIELD)
                        .with(new ClOrdID("clOrdId-123"))
                        .with(new Side(Side.SELL))
                        .with(new Price(new BigDecimal("1.25")))
                        .with(new TransactTime(new Date()))
                        .with(new OrdType(OrdType.FOREX_MARKET))
                )
        );

quickfixutils's People

Contributors

matejtymes avatar adamshone avatar

Watchers

James Cloos 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.