mirror of
https://github.com/bisq-network/bisq-api-reference.git
synced 2026-01-26 17:33:33 +00:00
Print the day's BSQ swaps after each completed swap
This commit is contained in:
parent
03102125b5
commit
c5d0259833
@ -416,7 +416,6 @@ public class BotUtils {
|
||||
* @param trades list of trades
|
||||
*/
|
||||
public static void printTradesSummary(GetTradesRequest.Category category, List<TradeInfo> trades) {
|
||||
log.info("{} trades:", category.name());
|
||||
switch (category) {
|
||||
case CLOSED -> new TableBuilder(CLOSED_TRADES_TBL, trades).build().print(out);
|
||||
case FAILED -> new TableBuilder(FAILED_TRADES_TBL, trades).build().print(out);
|
||||
|
||||
@ -28,6 +28,7 @@ import java.util.function.BiPredicate;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import static bisq.bots.BotUtils.*;
|
||||
import static bisq.proto.grpc.GetTradesRequest.Category.CLOSED;
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.exit;
|
||||
import static java.math.RoundingMode.HALF_UP;
|
||||
@ -227,6 +228,9 @@ public class TakeBestPricedOfferToBuyBsq extends AbstractBot {
|
||||
* Lock the wallet, stop the API daemon, and terminate the bot.
|
||||
*/
|
||||
private void maybeShutdownAfterSuccessfulSwap() {
|
||||
log.info("Here are today's completed trades:");
|
||||
printTradesSummaryForToday(CLOSED);
|
||||
|
||||
if (!isDryRun) {
|
||||
try {
|
||||
lockWallet();
|
||||
|
||||
@ -28,6 +28,7 @@ import java.util.function.BiPredicate;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import static bisq.bots.BotUtils.*;
|
||||
import static bisq.proto.grpc.GetTradesRequest.Category.CLOSED;
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.exit;
|
||||
import static java.math.RoundingMode.HALF_UP;
|
||||
@ -227,6 +228,9 @@ public class TakeBestPricedOfferToSellBsq extends AbstractBot {
|
||||
* Lock the wallet, stop the API daemon, and terminate the bot.
|
||||
*/
|
||||
private void maybeShutdownAfterSuccessfulSwap() {
|
||||
log.info("Here are today's completed trades:");
|
||||
printTradesSummaryForToday(CLOSED);
|
||||
|
||||
if (!isDryRun) {
|
||||
try {
|
||||
lockWallet();
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
# Maximum # of offers to take during one bot session. When reached, bot will shut down (but not the API daemon).
|
||||
maxTakeOffers=1
|
||||
maxTakeOffers=50
|
||||
#
|
||||
# Minimum distance from 30-day average BSQ trade price.
|
||||
# Note: all BSQ Swap offers have a fixed-price, but the bot uses a margin (%) of the 30-day price for comparison.
|
||||
minMarketPriceMargin=0
|
||||
minMarketPriceMargin=0.00
|
||||
#
|
||||
# Hard coded 30-day average BSQ trade price, used for development over regtest.
|
||||
regtest30DayAvgBsqPrice=0.00005
|
||||
@ -12,7 +12,7 @@ regtest30DayAvgBsqPrice=0.00005
|
||||
minAmount=0.01
|
||||
#
|
||||
# Taker bot's max BTC amount to sell. The candidate SELL BTC offer's amount must be <= maxAmount BTC.
|
||||
maxAmount=0.50
|
||||
maxAmount=0.90
|
||||
#
|
||||
# Taker bot's max acceptable transaction fee rate (sats / byte).
|
||||
# Regtest fee rates are from https://price.bisq.wiz.biz/getFees
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Maximum # of offers to take during one bot session. When reached, bot will shut down (but not the API daemon).
|
||||
maxTakeOffers=100
|
||||
maxTakeOffers=50
|
||||
#
|
||||
# Maximum distance from 30-day average BSQ trade price.
|
||||
# Note: all BSQ Swap offers have a fixed-price, but the bot uses a margin (%) of the 30-day price for comparison.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user