[bisq-network/bisq] Add api trade simulation scripts (#5093)

sqrrm notifications at github.com
Wed Jan 20 13:03:32 CET 2021


@sqrrm requested changes on this pull request.

Some minor changes.

I ran the scripts and I find the resulting orders strange, the price doesn't seem to correlate to the price feed, would like to understand what's happening there.

> +RCVD_MSG=$($CMD)
+commandalert $? "Could not send confirmpaymentreceived message."
+printdate "${RCVD_MSG}"
+printbreak
+sleeptraced 4
+
+# Generate some btc blocks
+printdate "Generating btc blocks after fiat transfer."
+genbtcblocks 3 5
+printbreak
+sleeptraced 3
+
+# Complete the trade on the seller side.
+if [ "${DIRECTION}" = "BUY" ]
+then
+	printdate "BOB ${BOB_ROLE}:  Closing trade by keeping funds in Bisq wallet."

Indent

> +sleeptraced 4
+
+# Generate some btc blocks
+printdate "Generating btc blocks after fiat transfer."
+genbtcblocks 3 5
+printbreak
+sleeptraced 3
+
+# Complete the trade on the seller side.
+if [ "${DIRECTION}" = "BUY" ]
+then
+	printdate "BOB ${BOB_ROLE}:  Closing trade by keeping funds in Bisq wallet."
+    CMD="$CLI_BASE --port=${BOB_PORT} keepfunds --trade-id=${OFFER_ID}"
+    printdate "BOB CLI: ${CMD}"
+else
+	printdate "ALICE (taker):  Closing trade by keeping funds in Bisq wallet."

Indent

> @@ -0,0 +1,25 @@
+canceloffer
+
+NAME
+----
+canceloffer - cancel an existing offer to buy or sell BTC
+
+SYNOPSIS
+--------
+canceloffer
+		--offer-id=<offer-id>
+
+DESCRIPTION
+-----------
+Cancel an existing offer.  The offer will be removed from other Bisq users' offer views.

Might be nice to add that fees paid will be forfeited.

> @@ -0,0 +1,25 @@
+getmyoffer
+
+NAME
+----
+getmyoffer - get your offer to buy or sell BTC
+
+SYNOPSIS
+--------
+getmyoffer
+		--offer-id=<offer-id>
+
+DESCRIPTION
+-----------
+List one of your existing offer's details.

```suggestion
List one of your existing offers' details.
```

> +List an existing offer's details.  The offer cannot be one of your own, and be
+available for the taking, or it will not be viewable.

This wording is a bit confusing. Better separate to something like "Must not be your own. Must be available for taking."

> +NAME
+----
+keepfunds - keep BTC received during a trade in Bisq wallet
+
+SYNOPSIS
+--------
+keepfunds
+		--trade-id=<trade-id>
+
+DESCRIPTION
+-----------
+A BTC buyer completes the final step in the trade protocol by keeping received BTC in his
+Bisq wallet.  This step may not seem necessary from the buyer's perspective, but it is
+necessary for correct transition of a trade's state to CLOSED, within the Bisq server.
+
+The alternative way to close out the trade is to sen the received BTC to an external

```suggestion
The alternative way to close out the trade is to send the received BTC to an external
```

> +DESCRIPTION
+-----------
+Send BSQ from your Bisq wallet to an external BSQ address.
+
+OPTIONS
+-------
+--address
+        The destination BSQ address for the send transaction.
+
+--amount
+		The amount of BSQ to send.
+
+--tx-fee-rate
+        An optional transaction fee rate (sats/byte) for the transaction.  The user is
+        responsible for choosing a fee rate that will be accepted by the network in a
+        reasonable amount of time, and the fee rate must be greater than 0.

```suggestion
        reasonable amount of time, and the fee rate must be greater than 1.
```

> +DESCRIPTION
+-----------
+Send BTC from your Bisq wallet to an external BTC address.
+
+OPTIONS
+-------
+--address
+        The destination BTC address for the send transaction.
+
+--amount
+		The amount of BTC to send.
+
+--tx-fee-rate
+        An optional transaction fee rate (sats/byte) for the transaction.  The user is
+        responsible for choosing a fee rate that will be accepted by the network in a
+        reasonable amount of time, and the fee rate must be greater than 0.

```suggestion
        reasonable amount of time, and the fee rate must be greater than 1.
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5093#pullrequestreview-572140416
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210120/964c6228/attachment.htm>


More information about the bisq-github mailing list