# Sell Volume vs Buy Volume

Hi All,
Currently i am able to retrieve volume data from historicalBarRequest using below code .

\

I would like to understand, if there is a way to differentiate buy volume vs sell volume .

Thanks
Suren

With the total volume, the best you can do is make the assumption that if the price is going up then most of the volume is buying. If the price is going down then its more selling volume. Otherwise, you would need to look at the trade and/or quote bars to get a more precise representation.

A trade occurs when there is both a buyer and a seller. What is â€śbuy volumeâ€ť vs â€śsell volumeâ€ť?

Hi Dion, I am trying to understand if there is a way to capture what type of trade (Buy or Sell) is largely happening at a specific point of time . also looking at Clintons message i am assuming we cannot preciously go for it .

1 Like

unless itâ€™s a short sale

I donâ€™t follow. When you borrow shares from a broker and sell them short, who are you selling them to? Thereâ€™s still a buyer.

if someone sells a borrowed share , there is no buy side to that transactionâ€¦ how did they obtain the share they are selling? they borrowed it , they didnâ€™t buy it - buy side is missing.

The borrowing of the shares from the broker is not the trade. The trade occurs when you sell the shares short to some buyer in the market. Also, the borrowing itself does not count toward volume, itâ€™s the sell that happens to some other buyer that increments volume.

Note the steps mentioned here â€¦ EVERY trade has a buy and a sell side, even a short sale.

I mainly got into this question after looking at the Volume analysis data in Webull .

if you look at the attached screenshot it was showing more Buy vs Sell . I was trying to understand how they arrive at these numbers .

Not sure, but it could be they are counting trades that occur â€śon the bidâ€ť as sells and â€śon the askâ€ť as buys? Thereâ€™s always a bid/ask range. Iâ€™m curious how they come up with that too!

Thereâ€™s that little â€śiâ€ť next to it, if you hover over there they probably explain it?

yes, the borrowing happens from the broker side, so whatever account they got those shares from, that person (entity) still owns them - the person shorting a stock did not buy them, but they are disposing of them as if they did - i stand by my thesis that â€śbuyâ€ť side is missing from that transaction

The borrowing does not count as the â€śbuyâ€ť side. Letâ€™s put some names to it to help visualize. Say I, Dion, wants to short 10 shares of TSLA.

Investopedia says " When a trader wishes to take a short position, they borrow the shares from a broker without knowing where the shares come from or to whom they belong. The borrowed shares may be coming out of another traderâ€™s margin account, out of the shares held in the brokerâ€™s inventory, or even from another brokerage firm."

OK, so say my broker borrows the shares from Kathyâ€™s margin account. Thatâ€™s all fine and in line with your thesis so far. But in order to SHORT the stock I have to sell it to someone else in the marketplace. So my sell order winds up executing and Renaldo â€śbuysâ€ť the stock from me.

No matter how you look at it, a trade ALWAYS has a buyer and a seller. In your thesis, you forgot about Renaldo!!

Later on, when I want to cover, I may wind up buying the stock back from Albert, and then the broker can return it to Kathyâ€™s margin account.

Well, I guess we can go back and forth indefinitely. The way I see it is that the shorters are per-using shares that they do not own. They never bought them. I guess one could argue that they are acting on behalf of Kathy as if she herself were selling shares, but that also fails an edge case test since now both Kathy and Renaldo are proud owners of the same shares (where Renaldo himself can now lend them out for shorting). If only shares of a company were a tangible deliverables, I have a feeling, the whole shorting system would fall apart fast.