I'm working on a project that involves identifying sales and purchases in the Blockchain. Is there any way to do this with the blockchain.com API?
2 Answers
The blockchain only records transfers of Bitcoin, and there is no reason to believe that every payment is linked to trading activity. The blockchain does not record reasons why funds were transferred, and it most certainly doesn't record trading activity. How could it, when trading inherently involves the exchange for another good, service, or currency which per definition is not recorded on the Bitcoin network. It's not clear to me why you'd expect to be able to extract this information whatsoever.
This is partially possible via anonymity analysis via heuristics like clustering. There are websites like wallet explorer which have list of known exchange addresses inferred by a mix of clustering analysis and manual user tagging. Similar analysis is done by blockchain forensic firms like elliptic
If most of inputs have been identified as belonging to an exchange, then it is typically a sell. Sell transactions would also normally contain lots of outputs as exchanges batch their sends to minimize fee.
For buy transaction some outputs would belong to an exchange and it would typically be small transaction (2-4 outputs).