package org.jvirtanen.parity.file.taq;

/**
 * Common definitions.
 */
public class TAQ {

    static final char FIELD_SEPARATOR  = '\t';
    static final char RECORD_SEPARATOR = '\n';

    static final char RECORD_TYPE_QUOTE = 'Q';
    static final char RECORD_TYPE_TRADE = 'T';

    public static final char BUY     = 'B';
    public static final char SELL    = 'S';
    public static final char UNKNOWN = ' ';

    private TAQ() {
    }

    /**
     * A Quote record.
     */
    public static class Quote {

        /**
         * The date.
         */
        public String date;

        /**
         * The timestamp in milliseconds.
         */
        public long timestampMillis;

        /**
         * The instrument.
         */
        public String instrument;

        /**
         * The bid price or zero if no bid price is available.
         */
        public long bidPrice;

        /**
         * The bid size or zero if no bid size is available.
         */
        public long bidSize;

        /**
         * The ask price or zero if no ask price is available.
         */
        public long askPrice;

        /**
         * The ask size or zero if no ask size is available.
         */
        public long askSize;
    }

    /**
     * A Trade record.
     */
    public static class Trade {

        /**
         * The date.
         */
        public String date;

        /**
         * The timestamp in milliseconds.
         */
        public long timestampMillis;

        /**
         * The instrument.
         */
        public String instrument;

        /**
         * The trade price.
         */
        public long price;

        /**
         * The trade size.
         */
        public long size;

        /**
         * The side of the resting order or `UNKNOWN` if the side of the
         * resting order is not available.
         */
        public char side;
    }

}

@@ -1796,17 +1796,28 @@
  or 
-%60
+%3Ccode%3E
 UNKNOWN
-%60
+%3C/code%3E
  if 
@@ -1824,23 +1824,16 @@
 the side
- of the
 %0A       
@@ -1835,16 +1835,23 @@
        *
+ of the
  resting

Fix Javadoc markup