org.openfeed.client.api.impl.ExchangeId Maven / Gradle / Ivy
The newest version!
package org.openfeed.client.api.impl;
/**
*/
public enum ExchangeId {
/**
* Undefined.
*/
UNDEFINED((short) 0, 0),
/**
* Crypto
*/
CRYPTO((short) 1, 30, true),
/**
* Canada Aequitas.
*/
NEO((short) 2, 34),
/**
* Canadian Securities exchange.
*/
CNSX((short) 3, 34),
/**
* Globex CME.
*/
CME((short) 4, 1),
/**
* Globex CBOT.
*/
CBOT((short) 5, 2),
/**
* Globex NYMEX.
*/
NYMEX((short) 6, 5),
/**
* Globex COMEX.
*/
COMEX((short) 7, 4),
/**
* Globex MGEX.
*/
MGEX((short) 8, 5),
/**
* ICE. Generated by ICE US translator. Mostly Oil. Former ICE EUROPE.
*/
ICE((short) 9, 35),
/**
* ICE Canada. Generated by ICE US translator.
*/
WPG((short) 10, 35),
/**
* ICE NYBOT. Generated by ICE US translator.
*/
NYBOT((short) 11, 35),
/**
* ICE UK. Generated by ICE UK translator.
*/
LIFFE((short) 12, 8),
/**
* AMEX
*/
AMEX((short) 13, 31, true),
/**
* NYSE
*/
NYSE((short) 14, 29, true),
/**
* NASDAQ
*/
NASDAQ((short) 15, 16, true),
/**
* BATS
*/
BATS((short) 16, 9),
/**
* FX
*/
FX((short) 17, 13),
/**
* BMF
*/
BMF((short) 18, 7),
/**
* TSX
*/
TSX((short) 19, 14),
/**
* TSX Venture
*/
TSXV((short) 20, 14),
/**
* TSX Index
*/
TSX_INDEX((short) 21, 14),
/**
* Nasdaq MFDS
*/
MUTAL_FUNDS((short) 22, 19),
/**
* NASDAQ OTC
*/
OTC((short) 23, 20),
/**
* NYSE Index
*/
NYSE_INDEX((short) 24, 29),
/**
* AG Index
*/
AG_INDEX((short) 25, 32),
/**
* AG Bids
*/
AG_BIDS((short) 26, 32);
/**
* Get numeric type.
*
* @return numeric type.
*/
public short getId() {
return id;
}
/**
* Consolidated Exchange.
*
* @return true if exchanges supports consolidated instruments.
*/
public boolean isConsolidatedExchange() {
return consolidatedExchange;
}
public int getChannel() {
return this.channel;
}
private final short id;
// Openfeed Channel Id
private int channel;
// true if Exchange Supports Consolidated Instruments (NBBO).
private final boolean consolidatedExchange;
ExchangeId(final short id, int channel, boolean consolidatedExchange) {
this.id = id;
this.channel = channel;
this.consolidatedExchange = consolidatedExchange;
}
ExchangeId(final short id, int channel) {
this(id, channel, false);
}
private static ExchangeId[] cachedValues = buildCachedValues();
private static ExchangeId[] buildCachedValues() {
ExchangeId[] exchangeIds = new ExchangeId[Short.MAX_VALUE];
for (ExchangeId e : ExchangeId.values()) {
exchangeIds[e.id] = e;
}
return exchangeIds;
}
public static ExchangeId fromId(short id) {
return cachedValues[id];
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy