<p>Two regtest trading simulation scripts are contained in this change:</p>
<ul>
<li>
<p><code>trade-simulation.sh</code> goes through the steps of creating country based F2F payment accounts for Bob & Alice, plus each step of a trade from <code>createoffer</code> to completion.</p>
</li>
<li>
<p><code>limit-order-simulation.sh</code> shows a way to trigger creation of an offer when a limit price is reached.</p>
</li>
</ul>
<p>Each script prints CLI commands and output as they are run, providing a basic tutorial for some of the api's features.</p>
<p>Examples:</p>
<ul>
<li>
<p><code>trade-simulation.sh</code></p>
<p>Simulate the entire trade protocol between Bob (taker) & Alice (maker),<br>
where Alice buys 0.1 BTC from Bob, paying in Renminbi (CYN).</p>
<p>Note the script takes a country code (CN) not a currency code, so the<br>
script can create the appropriate country based face to face payment accounts.</p>
<p><code>$ apitest/scripts/trade-simulation.sh -d buy -c cn -m 0.0 -a 0.1</code></p>
</li>
<li>
<p><code>limit-order.sh</code></p>
<p>Create a CAD/BUY 0.1 BTC order at mkt price margin of 0.0% if price falls to<br>
or below 47900 CAD.</p>
<p>Note the script takes a country code (CA) not a currency code, so the script<br>
can create the appropriate country based face to face  payment accounts.</p>
<p><code>$ apitest/scripts/limit-order-simulation.sh -l 47900 -d buy -c CA -m 0.0 -a 0.1</code></p>
<p>Create a USD/SELL 0.1 BTC order at mkt price margin of 0.0% if price rises to<br>
or above 37200 USD.</p>
<p><code>$ apitest/scripts/limit-order-simulation.sh -l 37200 -d sell -c US -m 0.0 -a 0.1 </code></p>
</li>
</ul>
<p>Both scripts depend on functions contained in supporting <code>bash</code> and <code>python3</code> scripts.</p>
<p><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="787528881" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/5084" data-hovercard-type="pull_request" data-hovercard-url="/bisq-network/bisq/pull/5084/hovercard" href="https://github.com/bisq-network/bisq/pull/5084">#5084</a> should be merged before this one.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/5093'>https://github.com/bisq-network/bisq/pull/5093</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Add line break</li>
  <li>Make opt description generic</li>
  <li>Add method help docs</li>
  <li>Add method help docs</li>
  <li>Fix help text typos</li>
  <li>Add --memo opt to help text</li>
  <li>Add method help docs</li>
  <li>Fix typo</li>
  <li>Add method help doc</li>
  <li>Explain example</li>
  <li>Add method help doc</li>
  <li>Add method help docs</li>
  <li>Explain example</li>
  <li>Keep CLI method enum members in alphabetical order</li>
  <li>Merge branch 'master' into 01-add-method-help-docs</li>
  <li>Add api trade simulation scripts</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-134c3614ae98d8c295fef88f53aa9a7a34ee81ffaa859b12e01a02f32c038686">apitest/scripts/editf2faccountform.py</a>
    (28)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-4118d54eb0abd7e3e79f38d6ec6bbf9a2057cccb1cdafeaae754d97ba3dccf5e">apitest/scripts/getmktprice.py</a>
    (22)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-b73c46b8aad2e367110e527d193887c67bf0cc98b400b6173016140e9573f5f5">apitest/scripts/limit-order-simulation.sh</a>
    (115)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-4d23d51a2575fce849e0b395356e232b6bddacfc455928b72cb2713a7c400e50">apitest/scripts/trade-simulation-env.sh</a>
    (205)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-f6cfdc7bbb86d68e3a6ca8527e7132148dbb49a7158f5780df3bf9209bf5a690">apitest/scripts/trade-simulation-utils.sh</a>
    (174)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-bf66826ae6c033a94c8bb7f85bb7371d546246b086d9b8f8c2a9300cae7c75a6">apitest/scripts/trade-simulation.sh</a>
    (189)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-afc5db1c8acb08dec253ee87a3e0e677c932d6826a2ab4c31ba816a4dcfb1386">cli/src/main/java/bisq/cli/CliMain.java</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-330baed45084180eea99af5e846a1c064bb8cebde98bcc24ad1c04d00efcb5b8">cli/src/main/java/bisq/cli/Method.java</a>
    (44)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-c9f2281237755625f91f1c6165af75906aa455b2cad3bcd11d3fbc50d79a9783">cli/src/main/java/bisq/cli/opts/WithdrawFundsOptionParser.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-fb5876d3b212d239a14d78529ac498b30a2dbb8e3f184ba9bd711a5d4901fb62">core/src/main/java/bisq/core/api/CoreApi.java</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-0bc82a6c2f06b7cb14ad7876032a8a08b07124342a4784691cda68e659908d12">core/src/main/resources/help/canceloffer-help.txt</a>
    (25)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-752d88e04b23b46427b32e1a89609f27b596b1858df6e7d4206996b271033e84">core/src/main/resources/help/confirmpaymentreceived-help.txt</a>
    (27)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-ccec1b0abeb398e743aacc579b46fbdda58fcaeb0e7428f71cd3be95d19e55bf">core/src/main/resources/help/confirmpaymentstarted-help.txt</a>
    (26)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-2f331d23b8f00c3ae33d10d16364e550a4da96326ef10fb8153779b75c4494a6">core/src/main/resources/help/createpaymentacct-help.txt</a>
    (46)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-2a165315f5927749e2c091b226eb29732619a25d8146363beaae71d32cfb3e66">core/src/main/resources/help/getaddressbalance-help.txt</a>
    (23)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-8d96556bc75c2285888bea5cb3c8957e820b4bf55623518eeb461caa62fd34bc">core/src/main/resources/help/getbalance-help.txt</a>
    (30)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-1ae6e9378e09d2eced655dae766e397919cda61e5381fe2a5b7941ef85a73d8c">core/src/main/resources/help/getmyoffer-help.txt</a>
    (25)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-21ebc078a29388afb7750ff18d39e2f61df05f7cf1632b9bad85acc07a7fe6cb">core/src/main/resources/help/getmyoffers-help.txt</a>
    (33)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-88a7b1cf0591a14ac081731ca8335cfe957dd71d22e4bdd2e5c5b040d3ca9994">core/src/main/resources/help/getoffer-help.txt</a>
    (26)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-0dd41bd23d6e4fa2ce24e3feba3e0e0ac834b4c29820f03b7eef27777fb3657a">core/src/main/resources/help/getoffers-help.txt</a>
    (39)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-f4136e22400b7c86db6aedcb19b1dd6b586510f5ebc63784e42e0d9e4e54cbae">core/src/main/resources/help/getpaymentacctform-help.txt</a>
    (44)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-6f81600cec402dc2d89567a96812f1d73ece1805ff2044b81c35db96f410363c">core/src/main/resources/help/gettrade-help.txt</a>
    (32)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-4c4f956de433bed8b456818dddd6c930cdb8527fe790267d9d7f608b8047b788">core/src/main/resources/help/gettransaction-help.txt</a>
    (27)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-9a40bea18ee6c028e62e1d319601af9a53c6b2ab3daf828ede8d723de8d587f6">core/src/main/resources/help/keepfunds-help.txt</a>
    (31)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-2170c4487155bcfb15b3c9ab1b22136ff6712147770ae8e42bf5d9d3c43b2bb2">core/src/main/resources/help/lockwallet-help.txt</a>
    (1)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-86efa094e8b87f3facf9e31664b2efc0997d00b06cd9ab29249ec55ec0d17398">core/src/main/resources/help/removewalletpassword-help.txt</a>
    (19)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-ed64f191b04469bd89a72169003754575362f4fa7ecb648fcf6454777d0e2f44">core/src/main/resources/help/sendbsq-help.txt</a>
    (38)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-0cce145a0d97656eb484b78989317e391ecf92fca29b540055ca35dea0b6ec9d">core/src/main/resources/help/sendbtc-help.txt</a>
    (51)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-25faf8ca99671db2af3344bc63f98c2aa6e52e38cf6a0ddb569cf3ff0410f153">core/src/main/resources/help/settxfeerate-help.txt</a>
    (19)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-2da5122e54c70eb8125f58c6d0d5705e17b2759a2f3db7e282c3de850981c34f">core/src/main/resources/help/setwalletpassword-help.txt</a>
    (25)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-b51edf8c137b7b1cdab8b1c6c3660b4604a5b43532324f77ac434b891ec261e9">core/src/main/resources/help/unlockwallet-help.txt</a>
    (21)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-b1e9a74f8609a9ad929893094fb8999dfc6346e670188ff17d7c7d2db9baa789">core/src/main/resources/help/unsettxfeerate-help.txt</a>
    (1)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5093/files#diff-509081c6b27b60e635fed8d4a37020c48bf7e13fc44bbd7d8ca9a4205efe031d">core/src/main/resources/help/withdrawfunds-help.txt</a>
    (50)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/5093.patch'>https://github.com/bisq-network/bisq/pull/5093.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/5093.diff'>https://github.com/bisq-network/bisq/pull/5093.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5093">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNTO2APMTYIYZMZXJMTS2W2WXANCNFSM4WJCEAOQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNVBAEPKCQJ4M4QCUFLS2W2WXA5CNFSM4WJCEAO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LYKD2CA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5093",
"url": "https://github.com/bisq-network/bisq/pull/5093",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>