Java Code Examples for com.paritytrading.foundation.ASCII#get()
The following examples show how to use
com.paritytrading.foundation.ASCII#get() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ITCHClientEvents.java From juncture with Apache License 2.0 | 5 votes |
@Override public void sequencedData(ITCHClient session, ITCH.SequencedData header, ByteBuffer payload) { String time = ASCII.get(header.time); byte[] bytes = new byte[payload.remaining()]; payload.get(bytes); events.add(new SequencedData(time, bytes)); }
Example 2
Source File: Event.java From parity with Apache License 2.0 | 5 votes |
public OrderExecuted(POE.OrderExecuted message) { this.timestamp = message.timestamp; this.orderId = ASCII.get(message.orderId); this.quantity = message.quantity; this.price = message.price; this.liquidityFlag = message.liquidityFlag; this.matchNumber = message.matchNumber; }
Example 3
Source File: Event.java From parity with Apache License 2.0 | 5 votes |
public OrderAccepted(POE.OrderAccepted message) { this.timestamp = message.timestamp; this.orderId = ASCII.get(message.orderId); this.side = message.side; this.instrument = message.instrument; this.quantity = message.quantity; this.price = message.price; this.orderNumber = message.orderNumber; }
Example 4
Source File: ITCHServerEvents.java From juncture with Apache License 2.0 | 5 votes |
@Override public void loginRequest(ITCHServer session, ITCH.LoginRequest packet) { String loginName = ASCII.get(packet.loginName); String password = ASCII.get(packet.password); byte marketDataUnsubscribe = packet.marketDataUnsubscribe; long reserved = ASCII.getLong(packet.reserved); events.add(new LoginRequest(loginName, password, marketDataUnsubscribe, reserved)); }
Example 5
Source File: CboeFXBookEvents.java From juncture with Apache License 2.0 | 5 votes |
@Override public void ticker(CboeFXBook.Ticker message) { byte aggressorBuyOrSellIndicator = message.aggressorBuyOrSellIndicator; String currencyPair = ASCII.get(message.currencyPair); long price = ASCII.getFixed(message.price, PRICE_DECIMALS); long transactionDate = ASCII.getLong(message.transactionDate); long transactionTime = ASCII.getLong(message.transactionTime); events.add(new Ticker(aggressorBuyOrSellIndicator, currencyPair, price, transactionDate, transactionTime)); }
Example 6
Source File: CboeFXBookEvents.java From juncture with Apache License 2.0 | 5 votes |
@Override public void marketSnapshotEntry(CboeFXBook.MarketSnapshotEntry entry) { String currencyPair = ASCII.get(entry.currencyPair); byte buyOrSellIndicator = entry.buyOrSellIndicator; long price = ASCII.getFixed(entry.price, PRICE_DECIMALS); long amount = ASCII.getLong(entry.amount); long minqty = ASCII.getLong(entry.minqty); long lotsize = ASCII.getLong(entry.lotsize); String orderId = ASCII.get(entry.orderId); events.add(new MarketSnapshotEntry(currencyPair, buyOrSellIndicator, price, amount, minqty, lotsize, orderId)); }
Example 7
Source File: CboeFXBookEvents.java From juncture with Apache License 2.0 | 5 votes |
@Override public void cancelOrder(CboeFXBook.CancelOrder message) { String currencyPair = ASCII.get(message.currencyPair); String orderId = ASCII.get(message.orderId); events.add(new CancelOrder(currencyPair, orderId)); }
Example 8
Source File: CboeFXBookEvents.java From juncture with Apache License 2.0 | 5 votes |
@Override public void modifyOrder(CboeFXBook.ModifyOrder message) { String currencyPair = ASCII.get(message.currencyPair); String orderId = ASCII.get(message.orderId); long amount = ASCII.getLong(message.amount); long minqty = ASCII.getLong(message.minqty); long lotsize = ASCII.getLong(message.lotsize); events.add(new ModifyOrder(currencyPair, orderId, amount, minqty, lotsize)); }
Example 9
Source File: CboeFXBookEvents.java From juncture with Apache License 2.0 | 5 votes |
@Override public void newOrder(CboeFXBook.NewOrder message) { byte buyOrSellIndicator = message.buyOrSellIndicator; String currencyPair = ASCII.get(message.currencyPair); String orderId = ASCII.get(message.orderId); long price = ASCII.getFixed(message.price, PRICE_DECIMALS); long amount = ASCII.getLong(message.amount); long minqty = ASCII.getLong(message.minqty); long lotsize = ASCII.getLong(message.lotsize); events.add(new NewOrder(buyOrSellIndicator, currencyPair, orderId, price, amount, minqty, lotsize)); }
Example 10
Source File: ITCHServerEvents.java From juncture with Apache License 2.0 | 4 votes |
@Override public void marketSnapshotRequest(ITCHServer session, ITCH.MarketSnapshotRequest packet) { String currencyPair = ASCII.get(packet.currencyPair); events.add(new MarketSnapshotRequest(currencyPair)); }
Example 11
Source File: ITCHServerEvents.java From juncture with Apache License 2.0 | 4 votes |
@Override public void tickerSubscribeRequest(ITCHServer session, ITCH.TickerSubscribeRequest packet) { String currencyPair = ASCII.get(packet.currencyPair); events.add(new TickerSubscribeRequest(currencyPair)); }
Example 12
Source File: ITCHServerEvents.java From juncture with Apache License 2.0 | 4 votes |
@Override public void tickerUnsubscribeRequest(ITCHServer session, ITCH.TickerUnsubscribeRequest packet) { String currencyPair = ASCII.get(packet.currencyPair); events.add(new TickerUnsubscribeRequest(currencyPair)); }
Example 13
Source File: ITCHServerEvents.java From juncture with Apache License 2.0 | 4 votes |
@Override public void marketDataSubscribeRequest(ITCHServer session, ITCH.MarketDataSubscribeRequest packet) { String currencyPair = ASCII.get(packet.currencyPair); events.add(new MarketDataSubscribeRequest(currencyPair)); }
Example 14
Source File: ITCHServerEvents.java From juncture with Apache License 2.0 | 4 votes |
@Override public void marketDataUnsubscribeRequest(ITCHServer session, ITCH.MarketDataUnsubscribeRequest packet) { String currencyPair = ASCII.get(packet.currencyPair); events.add(new MarketDataUnsubscribeRequest(currencyPair)); }
Example 15
Source File: ITCHClientEvents.java From juncture with Apache License 2.0 | 4 votes |
@Override public void errorNotification(ITCHClient session, ITCH.ErrorNotification packet) { String errorExplanation = ASCII.get(packet.errorExplanation); events.add(new ErrorNotification(errorExplanation)); }
Example 16
Source File: Event.java From parity with Apache License 2.0 | 4 votes |
public OrderRejected(POE.OrderRejected message) { this.timestamp = message.timestamp; this.orderId = ASCII.get(message.orderId); this.reason = message.reason; }
Example 17
Source File: ITCHClientEvents.java From juncture with Apache License 2.0 | 4 votes |
@Override public void loginRejected(ITCHClient session, ITCH.LoginRejected packet) { String reason = ASCII.get(packet.reason); events.add(new LoginRejected(reason)); }
Example 18
Source File: Event.java From parity with Apache License 2.0 | 4 votes |
public OrderCanceled(POE.OrderCanceled message) { this.timestamp = message.timestamp; this.orderId = ASCII.get(message.orderId); this.canceledQuantity = message.canceledQuantity; this.reason = message.reason; }
Example 19
Source File: CboeFXBookTest.java From juncture with Apache License 2.0 | 3 votes |
private String remaining(ByteBuffer buffer) { byte[] bytes = new byte[buffer.remaining()]; buffer.get(bytes); return ASCII.get(bytes); }