Commit Graph

264 Commits

Author SHA1 Message Date
ghubstan
82a0f0060c
Adjust to grpc.proto TradeInfo field name changes
See commit b9b66b4826.
2022-02-27 18:13:54 -03:00
ghubstan
5acef133ab
Delete dead code 2022-02-20 19:01:50 -03:00
ghubstan
fade8bc0d9
Show CLI gettrades' Deviation col-value with precision=2 (do something) 2022-02-20 18:52:56 -03:00
ghubstan
23303187be
Change mktPriceMarginOpt name to mktPriceMarginPctOpt
And validate the opt value.
2022-02-20 18:14:47 -03:00
ghubstan
8f93c27deb
Fix CLI gettrades' Deviation column value format (do nothing) 2022-02-20 18:11:24 -03:00
ghubstan
d2ba39b28c
Adjust cli module to new .proto *Pct field names 2022-02-20 15:21:13 -03:00
ghubstan
e49ab16a7a
Adjust cli to TradeInfo .proto's price & volume type change
Quite a bit of refactoring.  A lot of number-string formatting was removed.
2022-02-19 15:16:32 -03:00
ghubstan
31c8fbb679
Remove some dead code 2022-02-18 16:48:32 -03:00
ghubstan
2056e26384
Adjust cli module to grpc.proto::volume field type change (string) 2022-02-18 16:45:37 -03:00
ghubstan
68450c455f
Adjust to string triggerPrice change in API cli classes 2022-02-18 11:24:23 -03:00
ghubstan
3405dbf5c3
Adjust cli module to OfferInfo.price field change to string type 2022-02-17 17:57:45 -03:00
ghubstan
135a42ba45
Delete deprecated CLI console output formatting classes
The new console output formatting (tbl) api is working, and the
deprecated classes just add maintenance work.

Update affected test cases.
2022-02-17 15:00:52 -03:00
ghubstan
ef00a2cc0f
Remove unused class 2022-01-25 18:14:58 -03:00
ghubstan
d902e77710
Add Bisq license banners 2022-01-25 11:44:42 -03:00
ghubstan
89c4ab3c61
Use toTradeFeeBtc, not toTradeFeeBsq 2022-01-23 17:13:52 -03:00
ghubstan
fdd91a8293
Fix displayed bsq-swap's optional trade & tx fees 2022-01-23 17:06:48 -03:00
ghubstan
2a3a2988ec
Fix maker/taker fee column headers & value func defs 2022-01-20 16:57:45 -03:00
ghubstan
b10cb119f2
Display trade.txFee for BSQ swap trades 2022-01-20 15:54:50 -03:00
ghubstan
3cd1e05a9f
Try to display accurate status of closed trades, or "Pending" if still open 2022-01-18 13:01:42 -03:00
ghubstan
ffa31b0af7
Support gRPC gettrades call in CLI 2022-01-16 16:51:28 -03:00
ghubstan
4c7ae49e18
Format gettrades CLI outout 2022-01-16 16:48:58 -03:00
ghubstan
7690ffd953
Add API methods 'failtrade', 'unfailtrade'
Prerequisite for next PR: Add API method 'gettrades'

The `gettrades` method will show 'open', 'closed', and 'failed' trades.
Users already needed to be able to fail and unfail trades for the
same reasons they do in the UI.  API test cases will need to be able to
fail and unfail trades to check correct behavior of 'gettrades' method.

Based on branch `rename-keepfunds2closetrade`.
2022-01-07 19:11:34 -03:00
ghubstan
a9aaba87fa
Rename API method keepfunds -> closetrade
Trade proceeds and deposits have already been transfered to Bisq wallets
before the `keepfunds` command is (was) executed;  `keepfunds` merely moves
open trades to closed trades lists and persistence files.  Renaming `keepfunds`
as `closetrade` makes its purpose clear to API users.

The commit modifies only method names and comments in api server+cli classes,
apitest cases, and api trade simulation scripts.

Based on `master`
2022-01-05 12:10:46 -03:00
ghubstan
cb4df2b1c3
Rename CLI opt '--payment-account' -> '--payment-account-id'
Adjust related docs and scripts.
2021-12-27 13:10:16 -03:00
ghubstan
5f571cccca
Deprecate API 'getmyoffer'
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.
2021-12-27 12:05:17 -03:00
ghubstan
98b41cb56c
Use string in BigDecimal ctor, and make codacy happy too 2021-12-03 13:33:20 -03:00
ghubstan
0f32fe2fc3
Merge branch '5-api-bsqswap-simulation-n-docs-update' into 6-api-xmr-trading 2021-12-03 13:16:26 -03:00
ghubstan
f195b76637
Tell user bsqswap offer cannot be edited, but can be canceled at no charge
Resolves issue described in https://github.com/bisq-network/bisq/pull/5876#pullrequestreview-822692137
2021-12-03 12:47:03 -03:00
ghubstan
65fb8e8225
Add CliMain.main(args) tests
There are no asserts, but helpful for looking at affects of CLI commands
from terminal because apitest cases use gRPC service stubs instead of terminal.
2021-12-02 19:17:03 -03:00
ghubstan
a45c5fa61f
Adjust CLI opts parsers & opt parsing test for XMR support 2021-12-02 19:09:54 -03:00
ghubstan
03b57916a5
Make altcoin offer sorting method names more generic 2021-12-02 19:07:49 -03:00
ghubstan
54f815eb4f
Adjust API cli-side CryptoCurrencyUtil & OffersServiceRequest for XMR support 2021-12-02 19:04:28 -03:00
ghubstan
b1dd20572c
Allow unrecognized options in OfferIdOptionParser where appropriate
The OfferIdOptionParser superclass reduces duplication for parsing
offer-id parameters, but it needs to let subclass parsers' other
options pass validation.
2021-11-29 12:30:13 -03:00
ghubstan
66115f3d81
Revert "There is no --swap opt in editoffer command"
This reverts commit b5981b5b71.

This was a mistake.  There is a swap opt in the createoffer command.
2021-11-28 14:56:57 -03:00
ghubstan
b5981b5b71
There is no --swap opt in editoffer command
BSQ swap offers cannot be edited
2021-11-27 14:17:52 -03:00
ghubstan
b95e4b37b6
Block attempts to edit BsqSwap offers from CLI 2021-11-27 14:01:38 -03:00
ghubstan
05d1916ae9
Fix help text typo 2021-11-26 10:54:28 -03:00
ghubstan
0aa0852407
Add CLI createoffer smoketest (for bsq swaps)
NEVER RUN ON MAINNET!
2021-11-25 18:21:06 -03:00
ghubstan
132ecc9ac3
Adjust CliMain's createoffer for BSQ swaps 2021-11-25 18:20:04 -03:00
ghubstan
eff10842b9
Tighten createoffer param validation (only bsq swaps supported) 2021-11-25 17:31:54 -03:00
ghubstan
35aeb61338
Adjust createoffer opt parser for bsq swaps 2021-11-25 17:10:19 -03:00
ghubstan
b1c872c515
Adjust createoffer opt parser/test for bsq swaps 2021-11-25 17:08:07 -03:00
ghubstan
3077be54f0
Remove API createoffer's paymentAcctId request param (BSQ swap) 2021-11-25 16:12:05 -03:00
ghubstan
0c5c343fe0
Adjust CLI to support getting/taking BSQ swaps
Also refactored some of the opt parsers.
2021-11-24 13:10:34 -03:00
ghubstan
d8f1e446ea
Try to hide from pesky codacy 2021-11-14 14:30:41 -03:00
ghubstan
4ca878a8e1
Adjust API 'gettrade' for Bsq swaps
- Made several adjustments to CLI's 'gettrade' output related code
  so it can show single trade details for either Bisq v1 trades, or
  BSQ swap trades.

- Did minor refactoring of API's core to retrieve # tx confirmations
  for an addresses and transactions.

- Show # of tx confirmations in bsq swap trade detail.
2021-11-14 13:48:12 -03:00
ghubstan
fc53ca48c1
Add CLI output IntegerColumn 2021-11-14 13:40:59 -03:00
ghubstan
564303ac20
Normalize API gRPC bsq-swap related protos & wrappers
This commit refactors the first cut of the BsqSwapTradeInfo and
TradeInfo gRPC proto defs and wrappers.  The change avoids duplication
of fields between BsqSwapTradeInfo and TradeInfo, and adds a
bsqSwapTradeInfo field to the old TradeInfo proto & wrapper.

The immediate goal is moving towards getting the API's 'gettrade'
method to work for both Bisq v1 trades and BSQ swap trades:  the TradeInfo
proto sent to the CLI should represent either a Bisq v1 trade or a BSQ
swap trade.  A mid-term term goal is to also make a new 'gettrades' method
return a List<TradeInfo> to the CLI, where items in the List<TradeInfo>
can be either v1 trades or bsq-swap trades.
2021-11-12 18:48:35 -03:00
ghubstan
16be35790b
Paritally adjust bsq-swap-offer related gRPC CLI side classes
- Adjust to removal of BsqSwapOfferInfo proto, use ammended OfferInfo instead.

- Remove currency-code param from all get(My)BsqSwapOffer(s) requests.

- Add new OfferCategory getAvailableOfferCategory(String offerId) service.
  CLI uses this to determine which kind of gRPC request object should be
  sent with a 'takeoffer' request.

- Adjust GetOffersSmokeTest to help see offer/swap-offer CLI output.
2021-11-11 13:20:58 -03:00
ghubstan
3f61375622
Remove white space 2021-11-07 14:19:38 -03:00