0
votes

I'm trying to return results from the chain.so blockchain API. When I make an API call with the URL https://chain.so/api/v2/get_tx_received/BTC/3Mk6mNxzXJQegkc276N2pCMRwWHMpMjgbP

The results show correctly in a web browser.

I get the following error in PHP:

Warning: file_get_contents(https://chain.so/api/v2/get_tx_received/BTC/3Mk6mNxzXJQegkc276N2pCMRwWHMpMjgbP): failed to open stream: HTTP request failed! HTTP/1.1 503 Service Temporarily Unavailable in /Applications/XAMPP/xamppfiles/htdocs/test/chainso-api.php on line 8

Code I'm using:

$url = "https://chain.so/api/v2/get_tx_received/BTC/3Mk6mNxzXJQegkc276N2pCMRwWHMpMjgbP";

$content = file_get_contents($url);        
echo $content;

I have also tried using cURL, but can't get results to return using it either. I have noticed cloudflare is used on the API, could that be preventing the results from being returned?

1
The administrator of that site must open API to the public. Otherwise, you cannot do anything.Nemanja Jeremic
You can check the trafic with fiddler and you will find there have some check redict.LF00

1 Answers

0
votes

The chain.so API was put offline for a couple off months due to spam attacks as founder of SoChain.com statet on reddit:

https://www.reddit.com/r/dogecoin/comments/cqttm7/chainso_api_and_python_cryptos_module/

However it is online again today, without any visible changes to their API or any new notifications.