<p></p>
<p><b>@ghubstan</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4701#discussion_r515148393">core/src/main/java/bisq/core/trade/TradeUtil.java</a>:</p>
<pre style='color:#555'>> +     * @return String describing a trader's role for a given trade
+     */
+    public String getRole(Trade trade) {
+        Contract contract = trade.getContract();
+        if (contract == null)
+            throw new IllegalStateException(format("could not get role because no contract was found for trade '%s'",
+                    trade.getShortId()));
+
+        Offer offer = trade.getOffer();
+        if (offer == null)
+            throw new IllegalStateException(format("could not get role because no offer was found for trade '%s'",
+                    trade.getShortId()));
+
+        return getRole(contract.isBuyerMakerAndSellerTaker(),
+                offer.isMyOffer(keyRing),
+                offer.getCurrencyCode());
</pre>
<p>Below is an example of the console output for a CLI's <code>gettrade id</code> command, where the role = <code>BTC buyer as taker</code>, showing what is being bought or sold.</p>
<pre><code>ID      My Role             Price in USD for 1 BTC  Amount(BTC)  Tx Fee(BTC)  Taker Fee(BTC)  Deposit Published  Deposit Confirmed  Fiat Sent  Fiat Received  Payout Published  Withdrawn  
AGnSOw  BTC buyer as taker             13,263.6578   0.12500000   0.00068800      0.00037500  YES                NO                 NO         NO             NO                NO        
</code></pre>

<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/4701#discussion_r515148393">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQPBWSQRG3CEUDD4YLSNLGL7ANCNFSM4S6RFF2A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNRAG3YBYLNKASZWZZTSNLGL7A5CNFSM4S6RFF2KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOD4E42BQ.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/4701#discussion_r515148393",
"url": "https://github.com/bisq-network/bisq/pull/4701#discussion_r515148393",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>