Hi,
Is it possible to get an Order ID for each Ask and Bid that come into the Order Book? Can you show me an example?
Thank you in advance
Order ID (12digits numbert)
-
- Posts: 548
- Joined: Mon Jul 09, 2018 11:18 am
- Has thanked: 25 times
- Been thanked: 85 times
Re: Order ID (12digits numbert)
Hi jupiter13,
an example of printing all ids accepted by an exchange to log:
an example of printing all ids accepted by an exchange to log:
Code: Select all
package velox.api.layer1.simplified.demo;
import velox.api.layer1.annotations.Layer1ApiVersion;
import velox.api.layer1.annotations.Layer1ApiVersionValue;
import velox.api.layer1.annotations.Layer1SimpleAttachable;
import velox.api.layer1.annotations.Layer1StrategyName;
import velox.api.layer1.common.Log;
import velox.api.layer1.data.InstrumentInfo;
import velox.api.layer1.simplified.Api;
import velox.api.layer1.simplified.CustomModule;
import velox.api.layer1.simplified.InitialState;
import velox.api.layer1.simplified.MarketByOrderDepthDataAdapter;
@Layer1SimpleAttachable
@Layer1StrategyName("MboIds")
@Layer1ApiVersion(Layer1ApiVersionValue.VERSION2)
public class MboIds extends MarketByOrderDepthDataAdapter implements CustomModule
{
@Override
public void initialize(String alias, InstrumentInfo info, Api api, InitialState initialState) {
}
@Override
public void stop() {
}
@Override
public void send(String orderId, boolean isBid, int price, int size) {
Log.info(isBid + " " + orderId);
}
}