[bisq-network/bisq] Complete API support for BSQ/BTC trade pair (#5412)

Stan notifications at github.com
Thu Apr 15 19:57:38 CEST 2021


Here is an example BSQ trade using the CLI.

#### Alice getunusedbsqaddress
```
./bisq-cli --password=xyz --port=9998 getunusedbsqaddress
Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne
```


#### Alice createcryptopaymentacct
```
./bisq-cli --password=xyz --port=9998 createcryptopaymentacct --account-name="Alice Instant BSQ Account" --currency-code=bsq --address=Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne --trade-instant=true
payment account saved
Name                       Currency  Payment Method        ID                                                    
Alice Instant BSQ Account  BSQ       BLOCK_CHAINS_INSTANT  aa384589-d309-4aa4-9f14-7a5722227612
```      

#### Bob getunusedbsqaddress
```
./bisq-cli --password=xyz --port=9999 getunusedbsqaddress
BmzMJH8W4u6tvxzGDNLFdfsQsdSdnB4ERU5
```

#### Bob createcryptopaymentacct
```
./bisq-cli --password=xyz --port=9999 createcryptopaymentacct --account-name="Bob Instant BSQ Account" --currency-code=bsq --address=BmzMJH8W4u6tvxzGDNLFdfsQsdSdnB4ERU5 --trade-instant=true
payment account saved
Name                     Currency  Payment Method        ID                                                    
Bob Instant BSQ Account  BSQ       BLOCK_CHAINS_INSTANT  61297448-b49f-41c0-a0aa-c256148cb86b
```           

#### Alice createoffer to Sell BSQ
```
./bisq-cli --password=xyz --port=9998 createoffer --direction=sell --currency-code=bsq \
	--amount=0.1 \
	--fixed-price=0.00005 \
	--security-deposit=25.0 \
	--fee-currency=btc \
	--payment-account=aa384589-d309-4aa4-9f14-7a5722227612
Buy/Sell            Price in BTC for 1 BSQ  BTC(min - max)   BSQ(min - max)  Payment Method    Creation Date (UTC)   ID
Buy BSQ (Sell BTC)              0.00005000      0.10000000         2,000.00  Altcoins Instant  2021-04-15T16:58:54Z  qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
```   

#### Alice getmyoffer
```
./bisq-cli --password=xyz --port=9998 getmyoffer --offer-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
Buy/Sell            Price in BTC for 1 BSQ  BTC(min - max)   BSQ(min - max)  Payment Method    Creation Date (UTC)   ID
Buy BSQ (Sell BTC)              0.00005000      0.10000000         2,000.00  Altcoins Instant  2021-04-15T16:58:54Z  qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
```   


#### Bob getoffers
```
./bisq-cli --password=xyz --port=9999 getoffers --direction=sell --currency-code=bsq
Buy/Sell            Price in BTC for 1 BSQ  BTC(min - max)   BSQ(min - max)  Payment Method    Creation Date (UTC)   ID
Buy BSQ (Sell BTC)              0.00005000      0.10000000         2,000.00  Altcoins Instant  2021-04-15T16:58:54Z  qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
```   

#### Bob takeoffer
```
./bisq-cli --password=xyz --port=9999 takeoffer --offer-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162 --payment-account=61297448-b49f-41c0-a0aa-c256148cb86b
trade qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162 successfully taken
```

#### Bob gettrade
```
./bisq-cli --password=xyz --port=9999 gettrade --trade-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
ID        My Role              Price in BTC for 1 BSQ  Amount(BSQ)  Tx Fee(BTC)   Taker Fee(BTC)  Deposit Published  Deposit Confirmed  Buyer Cost(BTC)  BSQ Sent  BSQ Received  Payout Published  Withdrawn  BSQ Buyer Address
qkqUrpHp  BSQ seller as taker              0.00005000     2,000.00   0.00019928       0.00030000  YES                YES                     0.10000000  NO        NO            NO                NO         Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne
```

#### Alice gettrade
```
./bisq-cli --password=xyz --port=9998 gettrade --trade-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
ID        My Role             Price in BTC for 1 BSQ  Amount(BSQ)  Tx Fee(BTC)   Maker Fee(BTC)  Deposit Published  Deposit Confirmed  Buyer Cost(BTC)  BSQ Sent  BSQ Received  Payout Published  Withdrawn  
qkqUrpHp  BSQ buyer as maker              0.00005000     2,000.00   0.00024347       0.00010000  YES                YES                     0.10000000  NO        NO            NO                NO
```

#### Bob sendbsq (payment)
```
./bisq-cli --password=xyz --port=9999 sendbsq --amount=2000.00  --address=Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne
2000.00 bsq sent to Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne in tx 9caf88399cb2182dd3b5dc0614e8f2eaf8695ebf8f02298ad41b0fb3c64e460e
```

#### Bob confirmpaymentstarted
```
./bisq-cli --password=xyz --port=9999 confirmpaymentstarted --trade-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
trade qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162 payment started message sent
```


#### Alice check trade 'BSQ Sent' status
```
./bisq-cli --password=xyz --port=9998 gettrade --trade-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
ID        My Role             Price in BTC for 1 BSQ  Amount(BSQ)  Tx Fee(BTC)   Maker Fee(BTC)  Deposit Published  Deposit Confirmed  Buyer Cost(BTC)  BSQ Sent  BSQ Received  Payout Published  Withdrawn  
qkqUrpHp  BSQ buyer as maker              0.00005000     2,000.00   0.00024347       0.00010000  YES                YES                     0.10000000  YES       NO            NO                NO
```         

#### Alice verify 2K BSQ sent to payment acct receiving address Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne
```
./bisq-cli --password=xyz --port=9998 verifybsqsenttoaddress --address=Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne --amount=2000.00
2000.00 bsq has been sent to address Bn3PCQgRwhkrGnaMp1RYwt9tFwL51YELqne
```

#### Alice sends confirmpaymentreceived message
```
./bisq-cli --password=xyz --port=9998 confirmpaymentreceived --trade-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
trade qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162 payment received message sent
```

#### Bob closes trade with keepfunds (sets trade state to CLOSED)
```
./bisq-cli --password=xyz --port=9999 keepfunds --trade-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
funds from trade qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162 saved in bisq wallet
```

#### Alice closes trade with keepfunds (sets trade state to CLOSED)
```
./bisq-cli --password=xyz --port=9998 keepfunds --trade-id=qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162
funds from trade qkqUrpHp-56daa446-99bb-4ad4-ba18-e4fe2aa775f6-162 saved in bisq wallet
```

#### Alice getbalance
```
./bisq-cli --password=xyz --port=9998 getbalance
BTC
Available Balance  Reserved Balance  Total Available Balance  Locked Balance  
       9.89965653        0.00000000               9.89965653      0.00000000
BSQ
Available Confirmed Balance  Unverified Balance  Unconfirmed Change Balance  Locked For Voting Balance  Lockup Bonds Balance  Unlocking Bonds Balance  
               1,002,000.00                0.00                        0.00                       0.00                  0.00                     0.00
```

#### Bob getbalance
```
./bisq-cli --password=xyz --port=9999 getbalance
BTC
Available Balance  Reserved Balance  Total Available Balance  Locked Balance  
      10.09879854        0.00000000              10.09879854      0.00000000
BSQ
Available Confirmed Balance  Unverified Balance  Unconfirmed Change Balance  Locked For Voting Balance  Lockup Bonds Balance  Unlocking Bonds Balance  
               1,498,000.00                0.00                        0.00                       0.00                  0.00                     0.00
```


-- 
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/5412#issuecomment-820621903
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210415/799f55b9/attachment.htm>


More information about the bisq-github mailing list