- changed milestone to 0.2.2 - Configurable Distribution
Implement the getOrderBook method wrapper
For all the supported exchanges, implement the getOrderBooks .
The method is already defined in the TradingInterface file.
- Define fields and methods of the nubot.models.OrderBook.java class
- Implement the getOrderBook(pair) wrapper in Peatio wrapper
- Review with other devs and suggest approaches
- Create one issue in bitbucket for each exchange supported
- resolve this issue
Comments (16)
-
reporter -
- edited description
-
started some work on this in (167 branch), but leaving it open for now. didn't get it quite to work.
-
- changed milestone to 0.2.1 - Liquidity distribution model
- marked as critical
-
- changed milestone to 0.2.2 - Configurable Distribution
-
reporter - changed milestone to 0.2.1 - Liquidity distribution model
-
picking this up.
Have made some tentative starts at defining a class skeleton for the OrderBook model but need to discuss what methods an order book requires and what uses are intended for it.
-
reporter - changed milestone to 0.3.1 - Liquidity distribution model
-
reporter - changed milestone to 0.2.1 - Price-feed streaming service implementation
-
reporter need to discuss what methods an order book requires and what uses are intended for it.
True. Beside the basic getters and setters here are some possible useful methods
getPair : returns the currency pair associated with the book
getBids : returns a list of all open bids (sorted by price)
getAsks : returns a list of all open asks (sorted by price)
getBids : (double fromPrice, double toPrice) : get a list of all bids in the defined price range
getAsks : (double fromPrice, double toPrice) : get a list of all asks in the defined price range
getAsks : (double upToPrice) : get a list of all asks in the defined price range
getBids : (double upToPrice) : get a list of all bids in the defined price range
getAsks : (int minVolume , int maxVolume) : get a list of all asks in the defined volume range
getBids : (int maxVolume, maxVolume) : get a list of all bids in the defined volume range
getBestBid : return the best bid(price and volume)
getBestAsk : return the best ask (price and volume)
getTotalLiquidity(String type) : return the total volume of the order book - type switches between bids and asks
getTotalLiquidity(double upToPrice, String type) : return the total volume of the order book up to upToPrice .
getTotalLiquidity(double fromPrice, double toPrice, String type) : return the total volume of the order book with a fromPrice < pricerange < toPrice
sortByPrice(ascending|descending) : sort the list by price - default
sortByVolume(ascending|descending)
sortByDate(newestFirst|oldestFirst) ...
That could be a very useful and flexible start
-
Thanks. I was on the right lines, just good to have a definitve list to work to.
I had started off with getTopBid and getTopAsk methods. I'll carry on in the vein and add the methods listed above. If any more occur to you, add them here and I'll implememtn them
-
reporter - changed milestone to 0.3.1 - Price-feed streaming service implementation
-
All mentioned methods have been implemented as well as the getOrderBook method in the Peatio wrapper for testing. I've done preliminary tests on peatio but waiting for test funds to clear in order to test orderbook filtering and ordering properly with more than 1 order.
-
reporter Excellent! Are you working on a branch? Ping me when I can test the orderBook and write an automated Test
-
reporter - changed status to resolved
Creating one issue in bitbucket for each exchange supported
-
reporter - changed milestone to 0.3.1 - Price-feed streaming service implementation&integration
- Log in to comment