Green or red DATA

Hi to all.
On binance spot there are trades that are greenish(basically buy) and trades that are reddish(sell).
How can i understand whether the trade is green or red from this data:
{“id”: 2847204146, “price”: “23851.06000000”, “qty”: “6.15108000”, “quoteQty”: “146709.77814480”, “time”: 1677682220517, “isBuyerMaker”: “True”, “isBestMatch”: “True”}??

The trade colors on UI’s Market Trades section have this meaning:
Red represents a price decrease, while green represents an increase over a selected time period

So, from your json response example, you can’t detect the “colors”, but you could accomplish the same using and comparing the last price with the previous one.

In UI, trades are color-coded from the taker perspective.

  • Green buy – someone placed a BUY order that traded against a resting sell order
  • Red sell – someome placed a SELL that traded against a resting buy order

You can get this information from "isBuyerMaker" field returned by /api/v3/aggTrades API endpoint. In WebSocket streams <symbol>@aggTrade it’s the "m" field.

Trade color Meaning “isBuyerMaker”`
green taker is buyer – maker is seller false
red taker is seller – maker is buyer true

So, is it true that if buyernaker is true someone is buying and vice verca?

There are two parties to each trade. In order for someone to buy, someone else has to sell. One of the parties is called “maker” (think, shopkeeper) while the other one is “taker” (think, customer).

See What are Market Makers and Takers for details.

@ilammy this is not correct. Maker and taker have to do with either order goes to the book or not. Please research the same very document you attached to your comment.

I have made a parser here is some data:

:brown_square: :arrow_up:: 1591621.2
BTC PRICE: 30000.0

I was using your first suggestion. So can you treat this sentence like it was green on the spot?