From 6b8925458818dbd8ffd6e53646e33283655639ce Mon Sep 17 00:00:00 2001 From: ghubstan <36207203+ghubstan@users.noreply.github.com> Date: Mon, 29 Nov 2021 11:29:42 -0300 Subject: [PATCH] Adjust core api method help docs for bsq swaps --- .../main/resources/help/createoffer-help.txt | 70 ++++++++++++------- .../main/resources/help/takeoffer-help.txt | 18 ++++- 2 files changed, 62 insertions(+), 26 deletions(-) diff --git a/core/src/main/resources/help/createoffer-help.txt b/core/src/main/resources/help/createoffer-help.txt index 38ec0fd8da..3dfd2b1eae 100644 --- a/core/src/main/resources/help/createoffer-help.txt +++ b/core/src/main/resources/help/createoffer-help.txt @@ -7,38 +7,34 @@ createoffer - create offer to buy or sell BTC SYNOPSIS -------- createoffer - --payment-account= - --direction= - --currency-code= - --market-price-margin= | --fixed-price= --amount= --min-amount= + --currency-code= + --direction= + --fixed-price= | --market-price-margin= + --payment-account= --security-deposit= + --swap= [--fee-currency=] DESCRIPTION ----------- -Create and place an offer to buy or sell BTC using a fiat account. +Create and place an offer to buy or sell BTC. There are two types of offers. + + BSQ swap offers + + The createoffer command requires the swap, amount [, optional min-amount], direction, + and fixed-price parameters, where --swap=true and the user's wallet contains sufficient + BTC and/or BSQ to cover the trade amount and maker fee. + + Version 1 protocol fiat and BSQ offers + + The createoffer command requires the payment-account, amount [,optional min-amount], + currency-code, direction, fixed-price or market-price-margin, and security-deposit parameters. + The fee-currency parameter can be optionally used to pay the taker fee in BSQ. OPTIONS ------- ---payment-account - The ID of the fiat payment account used to send or receive funds during the trade. - ---direction - The direction of the trade (BUY or SELL). - ---currency-code - The three letter code for the fiat used to buy or sell BTC, e.g., EUR, USD, BRL, ... - ---market-price-margin - The % above or below market BTC price, e.g., 1.00 (1%). - If --market-price-margin is not present, --fixed-price must be. - ---fixed-price - The fixed BTC price in fiat used to buy or sell BTC, e.g., 34000 (USD). - If --fixed-price is not present, --market-price-margin must be. - --amount The amount of BTC to buy or sell, e.g., 0.125. @@ -46,15 +42,41 @@ OPTIONS The minimum amount of BTC to buy or sell, e.g., 0.006. If --min-amount is not present, it defaults to the --amount value. ---security-deposit - The percentage of the BTC amount being traded for the security deposit, e.g., 60.0 (60%). +--currency-code + The three-letter code for the currency used to buy or sell BTC, e.g., BSQ, EUR, USD, BRL, ... + +--direction + The direction of the trade (BUY or SELL). --fee-currency The wallet currency used to pay the Bisq trade maker fee (BSQ|BTC). Default is BTC +--fixed-price + The fixed BTC price in fiat used to buy or sell BTC, e.g., 34000 (USD). + If --fixed-price is not present, --market-price-margin must be. + +--market-price-margin + The % above or below market BTC price, e.g., 1.00 (1%). + If --market-price-margin is not present, --fixed-price must be. + +--payment-account + The ID of the fiat payment account used to send or receive funds during the trade. + +--security-deposit + The percentage of the BTC amount being traded for the security deposit, e.g., 60.0 (60%). + +--swap + Flag determining whether the offer is a BSQ swap or version 1 protocol offer. Default is false. + EXAMPLES -------- +To create a BUY 0.25 BTC with BSQ swap offer at a fixed BSQ price of 0.00005 BSQ per 1 BTC: +$ ./bisq-cli --password=xyz --port=9998 createoffer --swap=true \ + --direction=buy \ + --amount=0.25 \ + --fixed-price=0.00005 + To create a BUY 0.125 BTC with EUR offer at the current market price, using a payment account with ID 7413d263-225a-4f1b-837a-1e3094dc0d77, diff --git a/core/src/main/resources/help/takeoffer-help.txt b/core/src/main/resources/help/takeoffer-help.txt index 1290a00839..f0ecd6f46e 100644 --- a/core/src/main/resources/help/takeoffer-help.txt +++ b/core/src/main/resources/help/takeoffer-help.txt @@ -9,11 +9,22 @@ SYNOPSIS takeoffer --offer-id= --payment-account= - --fee-currency= + [--fee-currency=] DESCRIPTION ----------- -Take an existing offer using a matching payment method. The Bisq trade fee can be paid in BSQ or BTC. +Take an existing offer. There are currently two types offers and trade protocols. + + BSQ swap offers + + The takeoffer command only requires an offer-id parameter, and sufficient BSQ and BTC + to cover the trade amount and the taker fee. The trade (swap) will be executed immediately + after being successfully taken. + + Version 1 protocol fiat and BSQ offers + + The offer-id and payment-account parameters are required. The fee-currency parameter can + be optionally used to pay the taker fee in BSQ. OPTIONS ------- @@ -29,6 +40,9 @@ OPTIONS EXAMPLES -------- +To take a BSQ swap offer with ID y3a8b2e2-51b6-4f39-b6c1-3ebd52c22aea; +$ ./bisq-cli --password=xyz --port=9998 takeoffer --offer-id=y3a8b2e2-51b6-4f39-b6c1-3ebd52c22aea + To take an offer with ID 83e8b2e2-51b6-4f39-a748-3ebd29c22aea using a payment account with ID fe20cdbd-22be-4b8a-a4b6-d2608ff09d6e, and paying the Bisq trading fee in BSQ: