What defines a Buy vs a Sell record in the trading time series of an exchange? In any trade there is always someone selling and someone buying... So what defines a particular trade as Buy or Sell?
It is from the perspective of the other person (not yours).
When you see Sell, or Sell Orders or Selling or Asks is people willing to sell to you. Thus you look at these entries if you are buying.
When you see Buy, or Buy Orders or Buying or Bids is people willing to buy from you. Thus you look at these entries if you are selling.
Orders are either Buy or Sell orders indicating the wish of the person putting those orders into the exchange.
A trade is what happens when 2 orders are (partially) matched. By itself (without further context) a trade is neutral and encompasses both the buy and sell side.
Adding a bit of context, a person could say "I did a buy trade yesterday".
What defines a Buy vs a Sell record in the trading time series of an exchange?
A buy is an attempt to acquire a particular thing. A sell is attempt to get rid of a particular thing. The distinction is in which side is specified.
Say the going price for apples is around $1 apiece. If I try to sell 10 apples, I'll wind up with 10 apples less and roughly $1 more. If I try to buy $1, I'll wind up with $1 more and roughly 10 apples less.
An offer always has an implicit "do better if you can" on the end of it. So "sell 1 apple for $1" means to sell exactly 1 apple but get $1 or more. Similarly "buy $1 for 1 apples" means to buy exactly $1 but give up 1 apple or less. If the rate is precisely $1 for 1 apple, then they're the same, but if either offer does better, the results will be different.
For example, say someone is willing to pay $1.50 for an apple.
Now, say I place an offer to sell 2 apples for $2. I'll obviously sell 1 apple for $1.50, but I still need to sell one more (for $1).
But say instead I placed an offer to buy $2 for 2 apples. I'll obviously buy $1.50 for one apple. But now I only need to buy $.50 more (for 1/2 an apple).
So both a buy and a sell execute the same against existing offers, but they can place different offers on the books. One apple for one dollar in one case, half and apple for half a dollar in the other case.
In any trade there is always someone selling and someone buying... So what defines a particular trade as Buy or Sell?
No. A buy can match a buy and a sell can match a sell. If I'm selling Bitcoins for dollars and someone else is selling dollars for Bitcoins, we can match each other. So long as one offer can satisfy the other, they match.