The method 'getoffer' should support looking up a user's open-offers, and other users' available offers.
- Adjust api-beta-test-guide.md to use only 'getoffer'.
- Adjust trade simulation scripts to use only 'getoffer'.
- Adjust api testcases to use 'getoffer' in place of 'getmyoffer'.
- Mark appropriate methods and protobuf msgs as deprecated.
The test harness is compatible with bitcoin-core 0.19, 0.20, 0.21.
Also removed some unnecessary comments about registering dispute
agents in the test harness because it now happens by default.
Two regtest trading simulation scripts are contained in this change:
- trade-simulation.sh goes through the steps of creating F2F payment
accounts for Bob & Alice, and each step of a trade from createoffer to
completion.
- limit-order-simulation.sh shows one way to trigger creation of an offer
when a limit price is reached.
Each script prints CLI commands just before they are run.
Both scripts depend on functions contained in supporting bash and python3
scripts.
Examples:
trade-simulation.sh
Simulate the entire trade protocol between Bob (taker) & Alice (maker),
where Alice buys 0.1 BTC from Bob, paying in Renminbi (CYN).
Note the script takes a country code (CN) not a currency code, so the
script can create the appropriate country based face to face payment accounts.
$ apitest/scripts/trade-simulation.sh -d buy -c cn -m 0.0 -a 0.1
limit-order.sh
Create a CAD/BUY 0.1 BTC order at mkt price margin of 0.0% if price falls to
or below 47900 CAD.
Note the script takes a country code (CA) not a currency code, so the script
can create the appropriate country based face to face payment accounts.
$ apitest/scripts/limit-order-simulation.sh -l 47900 -d buy -c CA -m 0.0 -a 0.1
Create a USD/SELL 0.1 BTC order at mkt price margin of 0.0% if price rises to
or above 37200 USD.
$ apitest/scripts/limit-order-simulation.sh -l 37200 -d sell -c US -m 0.0 -a 0.1