Bitcoin Real Time News API

Version 0.1 (Alpha)

API Key

To use the API you need to request an API key from Trading Strategist. For the beta trial you can use the API key used in the samples for free and up until 30th September. During September we will provide API registration details.

News Item

The API endpoints return JSON NewsItem objects as shown below in C#.


			public class NewsItem
			{
			    public string Title { get; set; }
			    public string Summary { get; set; }
			    public string Url { get; set; }
			    public string ImageUrl { get; set; }
			    public string Timestamp { get; set; }
			}
			

HTTP GET API

The HTTP GET endpoint provides a simple way to pull the latest news articles by using one of the following methods.

  1. User initiated refresh via a button
  2. Meta-refresh tag
  3. JavaScript window timer

HTTP GET example

The Get request syntax is as follows:

Base URL https://tradingstrategists.com/bitcoin-news/api/v1.0/NewsFeed/news
/Since Return news items newer than N minutes ago
/Max Maximum number of news items to return
?API Key Your API key
EXAMPLE Get a maximum of 5 news items from the past 10 minutes
/10/5?apiKey=6FD31FA0A57129CF

A fully working version of this sample can be found at:
https://tradingstrategists.com/bitcoin-news/getapi.html

Websocket API

The websocket endpoint provides periodic updates of the latest news items via a JavaScript library.

Websocket example

Add the following line to the HEAD of your HTML page:

<script src="https://tradingstrategists.com/bitcoin-news/scripts/v1/ts-news-feed.js" type="text/javascript"></script>

In the body of your HTML page add a script section with two handler functions and the code to initialize the news feed:


			function resultsHandler(newsItems) {
				//handle the array of JSON news items objects
			}
			
			function errorHandler(error) {
				//handle any errors            
			}
			
			//initialize the API
			var API_KEY = '6FD31FA0A57129CF';
			var nItems = 10;

			console.info("Initializing TS.news: apiKey=" + API_KEY);

			TS.news.init(API_KEY, nItems, resultsHandler, errorHandler);
			

A fully working version of this sample can be found at:
https://tradingstrategists.com/bitcoin-news/wsapi.html

About Us

We are an independent, UK based, FinTech, SAAS company comprising of professionals spread across Europe and USA. As a team we have in excess of 150-years commercial expertise, including with some of the world’s leading technology, finance and government organisations.

Our solutions are designed to significantly improve your customers’ experience and be quick and easy to deploy. For example, our initial ‘ChatBot As A Service’ takes 1-line of code to deploy.

Companies We Have Worked For

Vision

Build world class SAAS solutions that help data centric businesses significantly improve their customers’ experience and better monetise their existing data.

Purpose

We are enterprise systems and data experts with a proven methodology for transforming data centric businesses that have been built during a time when ‘presenting static information’ and then ‘stickiness’ were measures of success. In today’s world the users’ expectations are (i) a simple, convenient user interface within their favourite messaging app and (ii) an experience that delivers immediate results.

Partners logos
Braintree Logo