diff --git a/cli/src/main/java/bisq/cli/CliMain.java b/cli/src/main/java/bisq/cli/CliMain.java index 9fc3acbb477..6df23f9b730 100644 --- a/cli/src/main/java/bisq/cli/CliMain.java +++ b/cli/src/main/java/bisq/cli/CliMain.java @@ -78,6 +78,7 @@ import static bisq.cli.CurrencyFormat.formatTxFeeRateInfo; import static bisq.cli.CurrencyFormat.toSatoshis; +import static bisq.cli.CurrencyFormat.toSecurityDepositAsPct; import static bisq.cli.NegativeNumberOptions.hasNegativeNumberOptions; import static bisq.cli.TableFormat.*; import static java.lang.String.format; @@ -376,7 +377,7 @@ public static void run(String[] args) { else fixedPrice = nonOptionArgs.get(7); - var securityDeposit = new BigDecimal(nonOptionArgs.get(8)); + var securityDeposit = toSecurityDepositAsPct(nonOptionArgs.get(8)); var makerFeeCurrencyCode = nonOptionArgs.size() == 10 ? nonOptionArgs.get(9) : "btc"; @@ -389,7 +390,7 @@ public static void run(String[] args) { .setUseMarketBasedPrice(useMarketBasedPrice) .setPrice(fixedPrice) .setMarketPriceMargin(marketPriceMargin.doubleValue()) - .setBuyerSecurityDeposit(securityDeposit.doubleValue()) + .setBuyerSecurityDeposit(securityDeposit) .setPaymentAccountId(paymentAcctId) .setMakerFeeCurrencyCode(makerFeeCurrencyCode) .build(); diff --git a/cli/src/main/java/bisq/cli/CurrencyFormat.java b/cli/src/main/java/bisq/cli/CurrencyFormat.java index 515c5fba127..c5ea5a497b0 100644 --- a/cli/src/main/java/bisq/cli/CurrencyFormat.java +++ b/cli/src/main/java/bisq/cli/CurrencyFormat.java @@ -43,6 +43,8 @@ public class CurrencyFormat { static final BigDecimal BSQ_SATOSHI_DIVISOR = new BigDecimal(100); static final DecimalFormat BSQ_FORMAT = new DecimalFormat("###,###,###,##0.00"); + static final BigDecimal SECURITY_DEPOSIT_MULTIPLICAND = new BigDecimal("0.01"); + @SuppressWarnings("BigDecimalMethodWithoutRoundingCalled") public static String formatSatoshis(long sats) { return BTC_FORMAT.format(BigDecimal.valueOf(sats).divide(SATOSHI_DIVISOR)); @@ -99,6 +101,15 @@ static long toSatoshis(String btc) { } } + static double toSecurityDepositAsPct(String securityDepositInput) { + try { + return new BigDecimal(securityDepositInput) + .multiply(SECURITY_DEPOSIT_MULTIPLICAND).doubleValue(); + } catch (NumberFormatException e) { + throw new IllegalArgumentException(format("'%s' is not a number", securityDepositInput)); + } + } + @SuppressWarnings("BigDecimalMethodWithoutRoundingCalled") private static String formatFeeSatoshis(long sats) { return BTC_TX_FEE_FORMAT.format(BigDecimal.valueOf(sats).divide(SATOSHI_DIVISOR)); diff --git a/cli/src/main/java/bisq/cli/NegativeNumberOptions.java b/cli/src/main/java/bisq/cli/NegativeNumberOptions.java index a152b6e327e..6623f9ad150 100644 --- a/cli/src/main/java/bisq/cli/NegativeNumberOptions.java +++ b/cli/src/main/java/bisq/cli/NegativeNumberOptions.java @@ -27,6 +27,7 @@ import java.util.function.Predicate; import static java.util.Arrays.stream; +import static java.util.stream.IntStream.range; class NegativeNumberOptions { @@ -35,13 +36,13 @@ class NegativeNumberOptions { String[] removeNegativeNumberOptions(String[] args) { // Cache any negative number params that will be rejected by the parser. // This should be called before command line parsing. - for (int i = 1; i < args.length; i++) { - // Start at i=1; args[0] is the method name. + int skipped = getIndexOfMethodInArgs(args); + for (int i = skipped; i < args.length; i++) { if (isNegativeNumber.test(args[i])) { String param = args[i]; - negativeNumberParams.put(i - 1, new BigDecimal(param).toString()); + negativeNumberParams.put(i - skipped, new BigDecimal(param).toString()); // Substitute a zero placeholder at the index containing the - // negative number option value. + // negative number positional option value. args[i] = "0"; } } @@ -80,4 +81,17 @@ static boolean hasNegativeNumberOptions(String[] args) { } return false; }; + + private int getIndexOfMethodInArgs(String[] args) { + // The first argument that does not start with '-' or '--' is the method name. + // Skip over the --password=xyz [--host=s --port=n] options. + int skipped = range(0, args.length) + .filter(i -> !args[i].startsWith("-")) + .findFirst() + .orElse(-1); + if (skipped >= 0) + return skipped; + else + throw new IllegalArgumentException("required --password option not found"); + } } diff --git a/cli/src/main/java/bisq/cli/TableFormat.java b/cli/src/main/java/bisq/cli/TableFormat.java index a23b7a022d8..1323bf2dc20 100644 --- a/cli/src/main/java/bisq/cli/TableFormat.java +++ b/cli/src/main/java/bisq/cli/TableFormat.java @@ -125,7 +125,7 @@ static String formatOfferTable(List offerInfo, String fiatCurrency) { + padEnd(COL_HEADER_PAYMENT_METHOD, paymentMethodColWidth, ' ') + COL_HEADER_DELIMITER + COL_HEADER_CREATION_DATE + COL_HEADER_DELIMITER + COL_HEADER_UUID.trim() + "%n"; - String headerLine = format(headersFormat, fiatCurrency, fiatCurrency); + String headerLine = format(headersFormat, fiatCurrency.toUpperCase(), fiatCurrency.toUpperCase()); String colDataFormat = "%-" + (COL_HEADER_DIRECTION.length() + COL_HEADER_DELIMITER.length()) + "s" // left + "%" + (COL_HEADER_PRICE.length() - 1) + "s" // rt justify to end of hdr diff --git a/core/src/main/java/bisq/core/api/CoreApi.java b/core/src/main/java/bisq/core/api/CoreApi.java index 6c57f20c7f1..bbd12b7ccbd 100644 --- a/core/src/main/java/bisq/core/api/CoreApi.java +++ b/core/src/main/java/bisq/core/api/CoreApi.java @@ -24,6 +24,7 @@ import bisq.core.monetary.Price; import bisq.core.offer.Offer; import bisq.core.offer.OfferPayload; +import bisq.core.offer.OpenOffer; import bisq.core.payment.PaymentAccount; import bisq.core.payment.payload.PaymentMethod; import bisq.core.trade.Trade; @@ -120,6 +121,10 @@ public List getMyOffers(String direction, String currencyCode) { return coreOffersService.getMyOffers(direction, currencyCode); } + public OpenOffer getMyOpenOffer(String id) { + return coreOffersService.getMyOpenOffer(id); + } + public void createAnPlaceOffer(String currencyCode, String directionAsString, String priceAsString, @@ -128,6 +133,7 @@ public void createAnPlaceOffer(String currencyCode, long amountAsLong, long minAmountAsLong, double buyerSecurityDeposit, + long triggerPrice, String paymentAccountId, String makerFeeCurrencyCode, Consumer resultHandler) { @@ -139,6 +145,7 @@ public void createAnPlaceOffer(String currencyCode, amountAsLong, minAmountAsLong, buyerSecurityDeposit, + triggerPrice, paymentAccountId, makerFeeCurrencyCode, resultHandler); diff --git a/core/src/main/java/bisq/core/api/CoreContext.java b/core/src/main/java/bisq/core/api/CoreContext.java new file mode 100644 index 00000000000..dece76bc063 --- /dev/null +++ b/core/src/main/java/bisq/core/api/CoreContext.java @@ -0,0 +1,38 @@ +/* + * This file is part of Bisq. + * + * Bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bisq. If not, see . + */ + +package bisq.core.api; + +import javax.inject.Inject; +import javax.inject.Singleton; + +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; + +@Singleton +@Slf4j +public class CoreContext { + + @Getter + @Setter + private boolean isApiUser; + + @Inject + public CoreContext() { + } +} diff --git a/core/src/main/java/bisq/core/api/CoreDisputeAgentsService.java b/core/src/main/java/bisq/core/api/CoreDisputeAgentsService.java index 725044c21e7..7b060834a93 100644 --- a/core/src/main/java/bisq/core/api/CoreDisputeAgentsService.java +++ b/core/src/main/java/bisq/core/api/CoreDisputeAgentsService.java @@ -32,6 +32,7 @@ import org.bitcoinj.core.ECKey; import javax.inject.Inject; +import javax.inject.Singleton; import java.util.Date; import java.util.List; @@ -49,6 +50,7 @@ import static java.net.InetAddress.getLoopbackAddress; import static java.util.Arrays.asList; +@Singleton @Slf4j class CoreDisputeAgentsService { diff --git a/core/src/main/java/bisq/core/api/CoreOffersService.java b/core/src/main/java/bisq/core/api/CoreOffersService.java index cba594362db..455cb398c86 100644 --- a/core/src/main/java/bisq/core/api/CoreOffersService.java +++ b/core/src/main/java/bisq/core/api/CoreOffersService.java @@ -22,7 +22,9 @@ import bisq.core.offer.CreateOfferService; import bisq.core.offer.Offer; import bisq.core.offer.OfferBookService; +import bisq.core.offer.OfferFilter; import bisq.core.offer.OfferUtil; +import bisq.core.offer.OpenOffer; import bisq.core.offer.OpenOfferManager; import bisq.core.payment.PaymentAccount; import bisq.core.user.User; @@ -34,6 +36,7 @@ import org.bitcoinj.utils.Fiat; import javax.inject.Inject; +import javax.inject.Singleton; import java.math.BigDecimal; @@ -54,6 +57,7 @@ import static java.lang.String.format; import static java.util.Comparator.comparing; +@Singleton @Slf4j class CoreOffersService { @@ -63,28 +67,35 @@ class CoreOffersService { private final KeyRing keyRing; private final CreateOfferService createOfferService; private final OfferBookService offerBookService; + private final OfferFilter offerFilter; private final OpenOfferManager openOfferManager; private final OfferUtil offerUtil; private final User user; + private final boolean isApiUser; @Inject - public CoreOffersService(KeyRing keyRing, + public CoreOffersService(CoreContext coreContext, + KeyRing keyRing, CreateOfferService createOfferService, OfferBookService offerBookService, + OfferFilter offerFilter, OpenOfferManager openOfferManager, OfferUtil offerUtil, User user) { this.keyRing = keyRing; this.createOfferService = createOfferService; this.offerBookService = offerBookService; + this.offerFilter = offerFilter; this.openOfferManager = openOfferManager; this.offerUtil = offerUtil; this.user = user; + this.isApiUser = coreContext.isApiUser(); } Offer getOffer(String id) { return offerBookService.getOffers().stream() .filter(o -> o.getId().equals(id)) + .filter(o -> offerFilter.canTakeOffer(o, isApiUser).isValid()) .findAny().orElseThrow(() -> new IllegalStateException(format("offer with id '%s' not found", id))); } @@ -100,6 +111,7 @@ Offer getMyOffer(String id) { List getOffers(String direction, String currencyCode) { return offerBookService.getOffers().stream() .filter(o -> offerMatchesDirectionAndCurrency(o, direction, currencyCode)) + .filter(o -> offerFilter.canTakeOffer(o, isApiUser).isValid()) .sorted(priceComparator(direction)) .collect(Collectors.toList()); } @@ -112,6 +124,13 @@ List getMyOffers(String direction, String currencyCode) { .collect(Collectors.toList()); } + OpenOffer getMyOpenOffer(String id) { + return openOfferManager.getOpenOfferById(id) + .filter(open -> open.getOffer().isMyOffer(keyRing)) + .orElseThrow(() -> + new IllegalStateException(format("openoffer with id '%s' not found", id))); + } + // Create and place new offer. void createAndPlaceOffer(String currencyCode, String directionAsString, @@ -121,6 +140,7 @@ void createAndPlaceOffer(String currencyCode, long amountAsLong, long minAmountAsLong, double buyerSecurityDeposit, + long triggerPrice, String paymentAccountId, String makerFeeCurrencyCode, Consumer resultHandler) { @@ -152,6 +172,7 @@ void createAndPlaceOffer(String currencyCode, //noinspection ConstantConditions placeOffer(offer, buyerSecurityDeposit, + triggerPrice, useSavingsWallet, transaction -> resultHandler.accept(offer)); } @@ -193,13 +214,13 @@ void cancelOffer(String id) { private void placeOffer(Offer offer, double buyerSecurityDeposit, + long triggerPrice, boolean useSavingsWallet, Consumer resultHandler) { - // TODO add support for triggerPrice parameter. If value is 0 it is interpreted as not used. Its an optional value openOfferManager.placeOffer(offer, buyerSecurityDeposit, useSavingsWallet, - 0, + triggerPrice, resultHandler::accept, log::error); diff --git a/core/src/main/java/bisq/core/api/CorePaymentAccountsService.java b/core/src/main/java/bisq/core/api/CorePaymentAccountsService.java index d3084363de9..095bf2d1f2d 100644 --- a/core/src/main/java/bisq/core/api/CorePaymentAccountsService.java +++ b/core/src/main/java/bisq/core/api/CorePaymentAccountsService.java @@ -24,6 +24,7 @@ import bisq.core.user.User; import javax.inject.Inject; +import javax.inject.Singleton; import java.io.File; @@ -34,6 +35,7 @@ import lombok.extern.slf4j.Slf4j; +@Singleton @Slf4j class CorePaymentAccountsService { diff --git a/core/src/main/java/bisq/core/api/CorePriceService.java b/core/src/main/java/bisq/core/api/CorePriceService.java index b8a32e73596..9eb4069dfe9 100644 --- a/core/src/main/java/bisq/core/api/CorePriceService.java +++ b/core/src/main/java/bisq/core/api/CorePriceService.java @@ -21,6 +21,7 @@ import bisq.core.provider.price.PriceFeedService; import javax.inject.Inject; +import javax.inject.Singleton; import lombok.extern.slf4j.Slf4j; @@ -28,7 +29,7 @@ import static java.lang.String.format; import static java.util.Objects.requireNonNull; - +@Singleton @Slf4j class CorePriceService { diff --git a/core/src/main/java/bisq/core/api/CoreTradesService.java b/core/src/main/java/bisq/core/api/CoreTradesService.java index b15ad6f48b8..83fc421bbf6 100644 --- a/core/src/main/java/bisq/core/api/CoreTradesService.java +++ b/core/src/main/java/bisq/core/api/CoreTradesService.java @@ -35,6 +35,7 @@ import org.bitcoinj.core.Coin; import javax.inject.Inject; +import javax.inject.Singleton; import java.util.Optional; import java.util.function.Consumer; @@ -44,6 +45,7 @@ import static bisq.core.btc.model.AddressEntry.Context.TRADE_PAYOUT; import static java.lang.String.format; +@Singleton @Slf4j class CoreTradesService { @@ -59,9 +61,11 @@ class CoreTradesService { private final TradeManager tradeManager; private final TradeUtil tradeUtil; private final User user; + private final boolean isApiUser; @Inject - public CoreTradesService(CoreWalletsService coreWalletsService, + public CoreTradesService(CoreContext coreContext, + CoreWalletsService coreWalletsService, BtcWalletService btcWalletService, OfferUtil offerUtil, ClosedTradableManager closedTradableManager, @@ -77,6 +81,7 @@ public CoreTradesService(CoreWalletsService coreWalletsService, this.tradeManager = tradeManager; this.tradeUtil = tradeUtil; this.user = user; + this.isApiUser = coreContext.isApiUser(); } void takeOffer(Offer offer, @@ -108,7 +113,7 @@ void takeOffer(Offer offer, offer, paymentAccountId, useSavingsWallet, - true, + isApiUser, resultHandler::accept, errorMessage -> { log.error(errorMessage); diff --git a/core/src/main/java/bisq/core/api/CoreWalletsService.java b/core/src/main/java/bisq/core/api/CoreWalletsService.java index c107259ff98..0ef5a22d2fd 100644 --- a/core/src/main/java/bisq/core/api/CoreWalletsService.java +++ b/core/src/main/java/bisq/core/api/CoreWalletsService.java @@ -56,6 +56,7 @@ import javax.inject.Inject; import javax.inject.Named; +import javax.inject.Singleton; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; @@ -83,6 +84,7 @@ import static java.lang.String.format; import static java.util.concurrent.TimeUnit.SECONDS; +@Singleton @Slf4j class CoreWalletsService { diff --git a/core/src/main/java/bisq/core/api/model/OfferInfo.java b/core/src/main/java/bisq/core/api/model/OfferInfo.java index dd3b4859ddd..2314cb43086 100644 --- a/core/src/main/java/bisq/core/api/model/OfferInfo.java +++ b/core/src/main/java/bisq/core/api/model/OfferInfo.java @@ -46,8 +46,9 @@ public class OfferInfo implements Payload { private final long volume; private final long minVolume; private final long buyerSecurityDeposit; + private final long triggerPrice; private final boolean isCurrencyForMakerFeeBtc; - private final String paymentAccountId; // only used when creating offer + private final String paymentAccountId; private final String paymentMethodId; private final String paymentMethodShortName; // For fiat offer the baseCurrencyCode is BTC and the counterCurrencyCode is the fiat currency @@ -68,6 +69,7 @@ public OfferInfo(OfferInfoBuilder builder) { this.volume = builder.volume; this.minVolume = builder.minVolume; this.buyerSecurityDeposit = builder.buyerSecurityDeposit; + this.triggerPrice = builder.triggerPrice; this.isCurrencyForMakerFeeBtc = builder.isCurrencyForMakerFeeBtc; this.paymentAccountId = builder.paymentAccountId; this.paymentMethodId = builder.paymentMethodId; @@ -79,6 +81,16 @@ public OfferInfo(OfferInfoBuilder builder) { } public static OfferInfo toOfferInfo(Offer offer) { + return getOfferInfoBuilder(offer).build(); + } + + public static OfferInfo toOfferInfo(Offer offer, long triggerPrice) { + // The Offer does not have a triggerPrice attribute, so we get + // the base OfferInfoBuilder, then add the OpenOffer's triggerPrice. + return getOfferInfoBuilder(offer).withTriggerPrice(triggerPrice).build(); + } + + private static OfferInfo.OfferInfoBuilder getOfferInfoBuilder(Offer offer) { return new OfferInfo.OfferInfoBuilder() .withId(offer.getId()) .withDirection(offer.getDirection().name()) @@ -97,8 +109,7 @@ public static OfferInfo toOfferInfo(Offer offer) { .withBaseCurrencyCode(offer.getOfferPayload().getBaseCurrencyCode()) .withCounterCurrencyCode(offer.getOfferPayload().getCounterCurrencyCode()) .withDate(offer.getDate().getTime()) - .withState(offer.getState().name()) - .build(); + .withState(offer.getState().name()); } /////////////////////////////////////////////////////////////////////////////////////////// @@ -118,6 +129,7 @@ public bisq.proto.grpc.OfferInfo toProtoMessage() { .setVolume(volume) .setMinVolume(minVolume) .setBuyerSecurityDeposit(buyerSecurityDeposit) + .setTriggerPrice(triggerPrice) .setIsCurrencyForMakerFeeBtc(isCurrencyForMakerFeeBtc) .setPaymentAccountId(paymentAccountId) .setPaymentMethodId(paymentMethodId) @@ -142,6 +154,7 @@ public static OfferInfo fromProto(bisq.proto.grpc.OfferInfo proto) { .withVolume(proto.getVolume()) .withMinVolume(proto.getMinVolume()) .withBuyerSecurityDeposit(proto.getBuyerSecurityDeposit()) + .withTriggerPrice(proto.getTriggerPrice()) .withIsCurrencyForMakerFeeBtc(proto.getIsCurrencyForMakerFeeBtc()) .withPaymentAccountId(proto.getPaymentAccountId()) .withPaymentMethodId(proto.getPaymentMethodId()) @@ -170,6 +183,7 @@ public static class OfferInfoBuilder { private long volume; private long minVolume; private long buyerSecurityDeposit; + private long triggerPrice; private boolean isCurrencyForMakerFeeBtc; private String paymentAccountId; private String paymentMethodId; @@ -229,6 +243,11 @@ public OfferInfoBuilder withBuyerSecurityDeposit(long buyerSecurityDeposit) { return this; } + public OfferInfoBuilder withTriggerPrice(long triggerPrice) { + this.triggerPrice = triggerPrice; + return this; + } + public OfferInfoBuilder withIsCurrencyForMakerFeeBtc(boolean isCurrencyForMakerFeeBtc) { this.isCurrencyForMakerFeeBtc = isCurrencyForMakerFeeBtc; return this; diff --git a/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java index e92d05863f1..a0bef9ee3b3 100644 --- a/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java +++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java @@ -20,6 +20,7 @@ import bisq.core.api.CoreApi; import bisq.core.api.model.OfferInfo; import bisq.core.offer.Offer; +import bisq.core.offer.OpenOffer; import bisq.proto.grpc.CancelOfferReply; import bisq.proto.grpc.CancelOfferRequest; @@ -78,8 +79,9 @@ public void getMyOffer(GetMyOfferRequest req, StreamObserver responseObserver) { try { Offer offer = coreApi.getMyOffer(req.getId()); + OpenOffer openOffer = coreApi.getMyOpenOffer(req.getId()); var reply = GetMyOfferReply.newBuilder() - .setOffer(toOfferInfo(offer).toProtoMessage()) + .setOffer(toOfferInfo(offer, openOffer.getTriggerPrice()).toProtoMessage()) .build(); responseObserver.onNext(reply); responseObserver.onCompleted(); @@ -139,6 +141,7 @@ public void createOffer(CreateOfferRequest req, req.getAmount(), req.getMinAmount(), req.getBuyerSecurityDeposit(), + req.getTriggerPrice(), req.getPaymentAccountId(), req.getMakerFeeCurrencyCode(), offer -> { diff --git a/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java index b72f0eafe08..589645d77dd 100644 --- a/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java +++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java @@ -17,6 +17,8 @@ package bisq.daemon.grpc; +import bisq.core.api.CoreContext; + import bisq.common.UserThread; import bisq.common.config.Config; @@ -44,7 +46,8 @@ public class GrpcServer { private final Server server; @Inject - public GrpcServer(Config config, + public GrpcServer(CoreContext coreContext, + Config config, PasswordAuthInterceptor passwordAuthInterceptor, GrpcDisputeAgentsService disputeAgentsService, GrpcOffersService offersService, @@ -66,6 +69,7 @@ public GrpcServer(Config config, .addService(walletsService) .intercept(passwordAuthInterceptor) .build(); + coreContext.setApiUser(true); } public void start() { diff --git a/proto/src/main/proto/grpc.proto b/proto/src/main/proto/grpc.proto index b2532d8b48a..3ac2ea4bf61 100644 --- a/proto/src/main/proto/grpc.proto +++ b/proto/src/main/proto/grpc.proto @@ -102,8 +102,9 @@ message CreateOfferRequest { uint64 amount = 6; uint64 minAmount = 7; double buyerSecurityDeposit = 8; - string paymentAccountId = 9; - string makerFeeCurrencyCode = 10; + uint64 triggerPrice = 9; + string paymentAccountId = 10; + string makerFeeCurrencyCode = 11; } message CreateOfferReply { @@ -128,14 +129,15 @@ message OfferInfo { uint64 volume = 8; uint64 minVolume = 9; uint64 buyerSecurityDeposit = 10; - bool isCurrencyForMakerFeeBtc = 11; - string paymentAccountId = 12; - string paymentMethodId = 13; - string paymentMethodShortName = 14; - string baseCurrencyCode = 15; - string counterCurrencyCode = 16; - uint64 date = 17; - string state = 18; + uint64 triggerPrice = 11; + bool isCurrencyForMakerFeeBtc = 12; + string paymentAccountId = 13; + string paymentMethodId = 14; + string paymentMethodShortName = 15; + string baseCurrencyCode = 16; + string counterCurrencyCode = 17; + uint64 date = 18; + string state = 19; } ///////////////////////////////////////////////////////////////////////////////////////////