Java Simplified API: Question regarding accessing Orderbook data
Posted: Tue Apr 02, 2024 5:46 pm
Hello all,
I am currently trying to figure out how I can access orderbook data from within the Java API. Here's what I have so far:
If you see in my debugger, I can view the orderbook object if I insert a breakpoint in my overridden onBar function. I can view Bar data with the built in Bar object no problem. For example:
bar.getClose(); if I want to access the last closing price of said bar.
However, anytime I try to access any kind of orderbook information, for instance:orderBook.getBestAskPriceOrNone();I get the following error in my Bookmap.jar instance when I reload my addon:
java.lang.NullPointerException: Cannot invoke "velox.api.layer1.layers.utils.OrderBook.getBestAskPriceOrNone()" because "orderBook" is null
Obviously, as you can see from the screenshot included, that orderBook is not null. I am assuming this is because I am using the free version of Bookmap for development right now and I have not purchased an MBO data package.
I would like to know if this is something I need to do, and if so, is there anyway to access COB data without having an MBO data subscription?
Thank you for your help in advance. Have a good day!
I am currently trying to figure out how I can access orderbook data from within the Java API. Here's what I have so far:
If you see in my debugger, I can view the orderbook object if I insert a breakpoint in my overridden onBar function. I can view Bar data with the built in Bar object no problem. For example:
bar.getClose(); if I want to access the last closing price of said bar.
However, anytime I try to access any kind of orderbook information, for instance:orderBook.getBestAskPriceOrNone();I get the following error in my Bookmap.jar instance when I reload my addon:
java.lang.NullPointerException: Cannot invoke "velox.api.layer1.layers.utils.OrderBook.getBestAskPriceOrNone()" because "orderBook" is null
Obviously, as you can see from the screenshot included, that orderBook is not null. I am assuming this is because I am using the free version of Bookmap for development right now and I have not purchased an MBO data package.
I would like to know if this is something I need to do, and if so, is there anyway to access COB data without having an MBO data subscription?
Thank you for your help in advance. Have a good day!