Skip to content

Commit

Permalink
MAKE,DOC,C: Make release recipe, added generated c files, update read…
Browse files Browse the repository at this point in the history
…me with build instructions
  • Loading branch information
Essenceia committed Sep 19, 2023
1 parent e535399 commit 9fb6827
Show file tree
Hide file tree
Showing 22 changed files with 2,022 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.o
*.a
gen_flag
gen/*.h
gen/*.c
test
release
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ The python script and generated content can be found in the `gen` directory.
`xml` format file can found in the `doc` directory.


## Build library

To build the static library `libouch.a` :

```
make lib
```

## Build release

To build a release and have it packaged in the `release` directory :

```
make release
```


## Build test

To test the build:

```
make test
```

## Sources

Reference OUCH 5.0 specification : http://nasdaqtrader.com/content/technicalsupport/specifications/TradingProducts/Ouch5.0.pdf
Expand Down
218 changes: 218 additions & 0 deletions gen/ouch_enum.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
typedef enum {
IMBALANCE_ONLY = 'I',
RETAIL_ORDER_TYPE_1 = 'O',
RETAIL_ORDER_TYPE_2 = 'T',
RETAIL_PRICE_IMPROVEMENT = 'Q',
EXTENDED_LIFE_CONTINUOUS = 'B',
DIRECT_LISTING_CAPITAL_RAISE = 'D',
RETAIL_PRICE_IMPROVEMENT_HIDDEN = 'R',
NO_INSTRUCTIONS = ' '
} eHandleInst;

typedef enum {
ZERO_ZERO_DOT_TWO = '0',
ZERO_DOT_TWO_ONE = '1',
ONE_TWO = '2',
GREATER_THAN_TWO = '3',
UNSPECIFIED = ' ',
SETS_QBBO = 'S',
IMPROVES_NBBO = 'N'
} eBBOWeightIndicator;

typedef enum {
YES = 'Y',
NO = 'N'
} eYesNo;

typedef enum {
POST_ONLY = 'P',
POST_NO = 'N'
} ePostOnly;

typedef enum {
CUSTOMER_RETAIL = 'R',
CUSTOMER_NOT_RETAIL = 'N'
} eCustomerType;

typedef enum {
DISCRETION_PRICE_TYPE_LIMIT = 'L',
DISCRETION_PRICE_TYPE_MARKET_PEG = 'P',
DISCRETION_PRICE_TYPE_MIDPOINT_PEG = 'M',
DISCRETION_PRICE_TYPE_PRIMARY_PEG = 'R'
} eDiscretionPriceType;

typedef enum {
PRICE_TYPE_LIMIT = 'L',
PRICE_TYPE_MARKET_PEG = 'P',
PRICE_TYPE_MIDPOINT_PEG = 'M',
PRICE_TYPE_PRIMARY_PEG = 'R',
PRICE_TYPE_MARKET_MAKER_PEG = 'Q',
PRICE_TYPE_MIDPOINT = 'm'
} ePriceType;

typedef enum {
BUY = 'B',
SELL = 'S',
SELL_SHORT = 'T',
SELL_SHORT_EXEMPT = 'E'
} eSide;

typedef enum {
DAY = '0',
IOC = '3',
GTX = '5',
GTT = '6',
AFTER_HOURS = 'E'
} eTimeInForce;

typedef enum {
VISIBLE = 'Y',
HIDDEN = 'N',
ATTRIBUTABLE = 'A'
} eDisplay;

typedef enum {
AGENCY = 'A',
PRINCIPAL = 'P',
RISKLESS = 'R',
OTHER = 'O'
} eCapacity;

typedef enum {
CONTINUOUS_MARKET = 'N',
OPENING_CROSS = 'O',
CLOSING_CROSS = 'C',
HALT_IPO = 'H',
SUPPLEMENTAL = 'S',
RETAIL = 'R',
EXTENDED_LIFE = 'E',
AFTER_HOURS_CLOSE = 'A'
} eCrossType;

typedef enum {
ELIGIBLE = 'Y',
NOT_ELIGIBLE = 'N'
} eEligibility;

typedef enum {
ORDER_LIVE = 'L',
ORDER_DEAD = 'D'
} eOrderState;

typedef enum {
CANCEL_REGULATORY_RESTRICTION = 'D',
CANCEL_CLOSING_CROSS = 'E',
CANCEL_POST_ONLY_PRICE_SLID = 'F',
CANCEL_POST_ONLY_CONTRA_SIDE = 'G',
CANCEL_HALTED = 'H',
CANCEL_IMMEDIATE_OR_CANCEL = 'I',
CANCEL_MARKET_COLLARS = 'K',
CANCEL_SELF_MATCH_PREVENTION = 'Q',
CANCEL_SUPERVISORY = 'S',
CANCEL_TIMEOUT = 'T',
CANCEL_USER_REQUESTED_CANCEL = 'U',
CANCEL_OPEN_PROTECTION = 'X',
CANCEL_SYSTEM_CANCEL = 'Z',
CANCEL_COMPANY_DIRECT_LISTING = 'e'
} eOrderCancelReason;

typedef enum {
START_OF_DAY = 'S',
END_OF_DAY = 'E'
} eEventCode;

typedef enum {
LIQUIDITY_ADDED = 'A',
LIQUIDITY_CLOSING_CROSS = 'C',
LIQUIDITY_RETAIL_DESIGNATED_ADDING = 'e',
LIQUIDITY_HALT_IPO_CROSS = 'H',
LIQUIDITY_AFTER_HOURS_CLOSING_CROSS = 'i',
LIQUIDITY_NON_DISPLAYED_ADDING = 'J',
LIQUIDITY_RPI_ORDER_PROVIDES_LIQUIDITY = 'j',
LIQUIDITY_ADDED_LIQUIDITY_MIDPOINT = 'k',
LIQUIDITY_HALT_CROSS = 'K',
LIQUIDITY_CLOSING_CROSS_IMBALANCE = 'L',
LIQUIDITY_OPENING_CROSS_IMBALANCE = 'M',
LIQUIDITY_REMOVED_LIQUIDITY_MIDPOINT = 'm',
LIQUIDITY_PASSIVE_MIDPOINT_EXECUTION = 'N',
LIQUIDITY_MIDPOINT_EXTENDED_LIFE_ORDER_EXECUTION = 'n',
LIQUIDITY_OPENING_CROSS = 'O',
LIQUIDITY_REMOVED_PRICE_IMPROVING_NON_DISPLAYED = 'p',
LIQUIDITY_RMO_RETAIL_ORDER_REMOVES_NON_RPI_MIDPOINT = 'q',
LIQUIDITY_REMOVED = 'R',
LIQUIDITY_RETAIL_ORDER_REMOVES_RPI_LIQUIDITY = 'r',
LIQUIDITY_RETAIL_ORDER_REMOVES_NON_RPI_MIDPOINT_OTHER = 't',
LIQUIDITY_SUPPLEMENTAL_ORDER_EXECUTION = '0',
LIQUIDITY_DISPLAYED_ADDING_ORDER_IMPROVES_NBBO = '7',
LIQUIDITY_DISPLAYED_ADDING_ORDER_SETS_QBBO = '8',
LIQUIDITY_RPI_ORDER_PROVIDES_LIQUIDITY_NO_RPII = '1'
} eLiquidityFlags;

typedef enum {
MPID_CANCEL_OLDEST = 'O',
MPID_CANCEL_NEWEST = 'W',
MPID_DECREMENT_BOTH = 'D',
MPID_DECREMENT_BOTH_NO_DETAILS = 'Y',
ORG_ID_CANCEL_OLDEST = 'o',
ORG_ID_CANCEL_NEWEST = 'w',
ORG_ID_DECREMENT_BOTH = 'd',
ORG_ID_DECREMENT_BOTH_NO_DETAILS = 'y'
} eAIQStrategy;

typedef enum {
BROKEN_ERRONEOUS = 'E',
BROKEN_CONSENT = 'C',
BROKEN_SUPERVISOR = 'S',
BROKEN_EXTERNAL = 'X'
} eBrokenTradeReason;

typedef enum {
REJECT_QUOTE_UNAVAILABLE = 0x0001,
REJECT_DESTINATION_CLOSED = 0x0002,
REJECT_INVALID_DISPLAY = 0x0003,
REJECT_INVALID_MAX_FLOOR = 0x0004,
REJECT_INVALID_PEG_TYPE = 0x0005,
REJECT_FAT_FINGER = 0x0006,
REJECT_HALTED = 0x0007,
REJECT_ISO_NOT_ALLOWED = 0x0008,
REJECT_INVALID_SIDE = 0x0009,
REJECT_PROCESSING_ERROR = 0x000A,
REJECT_CANCEL_PENDING = 0x000B,
REJECT_FIRM_NOT_AUTHORIZED = 0x000C,
REJECT_INVALID_MIN_QUANTITY = 0x000D,
REJECT_NO_CLOSING_REFERENCE_PRICE = 0x000E,
REJECT_OTHER = 0x000F,
REJECT_CANCEL_NOT_ALLOWED = 0x0010,
REJECT_PEGGING_NOT_ALLOWED = 0x0011,
REJECT_CROSSED_MARKET = 0x0012,
REJECT_INVALID_QUANTITY = 0x0013,
REJECT_INVALID_CROSS_ORDER = 0x0014,
REJECT_REPLACE_NOT_ALLOWED = 0x0015,
REJECT_ROUTING_NOT_ALLOWED = 0x0016,
REJECT_INVALID_SYMBOL = 0x0017,
REJECT_TEST = 0x0018,
REJECT_LATE_LOC_TOO_AGGRESSIVE = 0x0019,
REJECT_RETAIL_NOT_ALLOWED = 0x001A,
REJECT_INVALID_MIDPOINT_POST_ONLY_PRICE = 0x001B,
REJECT_INVALID_DESTINATION = 0x001C,
REJECT_INVALID_PRICE = 0x001D,
REJECT_SHARES_EXCEED_THRESHOLD = 0x001E,
REJECT_EXCEEDS_MAXIMUM_ALLOWED_NOTIONAL_VALUE = 0x001F,
REJECT_RISK_AGGREGATE_EXPOSURE_EXCEEDED = 0x0020,
REJECT_RISK_MARKET_IMPACT = 0x0021,
REJECT_RISK_RESTRICTED_STOCK = 0x0022,
REJECT_RISK_SHORT_SELL_RESTRICTED = 0x0023,
REJECT_RISK_ORDER_TYPE_RESTRICTED = 0x0024,
REJECT_RISK_EXCEEDS_ADV_LIMIT = 0x0025,
REJECT_RISK_FAT_FINGER = 0x0026,
REJECT_RISK_LOCATE_REQUIRED = 0x0027,
REJECT_RISK_SYMBOL_MESSAGE_RATE_RESTRICTION = 0x0028,
REJECT_RISK_PORT_MESSAGE_RATE_RESTRICTION = 0x0029,
REJECT_RISK_DUPLICATE_MESSAGE_RATE_RESTRICTION = 0x002A
} eOrderRejectReason;

typedef enum {
REFRESH_OF_DISPLAY = 'R',
UPDATE_OF_DISPLAY = 'P'
} eOrderRestartReason;

Loading

0 comments on commit 9fb6827

Please sign in to comment.