[bisq-network/bisq] Add API 'gettrades' method (PR #5976)
Stan
notifications at github.com
Tue Jan 25 22:51:14 CET 2022
@ghubstan commented on this pull request.
> @@ -273,15 +289,33 @@ Trade getTrade(String tradeId) {
));
}
+ List<Trade> getOpenTrades() {
+ coreWalletsService.verifyWalletsAreAvailable();
+ coreWalletsService.verifyEncryptedWalletIsUnlocked();
+ return tradeManager.getTrades();
+ }
+
+ List<TradeModel> getTradeHistory(GetTradesRequest.Category category) {
+ coreWalletsService.verifyWalletsAreAvailable();
+ coreWalletsService.verifyEncryptedWalletIsUnlocked();
+ if (category.equals(CLOSED)) {
+ var closedTrades = closedTradableManager.getClosedTrades().stream()
+ .map(t -> (TradeModel) t)
+ .collect(Collectors.toList());
+ closedTrades.addAll(bsqSwapTradeManager.getBsqSwapTrades());
A bsq swap offer becomes an executed trade right after it is taken. It should show up in the trade history with 0 tx confirmations until the next block, but the swap has been made.
--
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5976#discussion_r792149064
You are receiving this because you are subscribed to this thread.
Message ID: <bisq-network/bisq/pull/5976/review/862904811 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20220125/23a74fff/attachment.htm>
More information about the bisq-github
mailing list