News API access is available with data API keys, or separately from $129/mo.
Please see the subscription page in the webapp to get a key.
News objects contain the following fields:
{ id:55,// unique identifier time:1704085200000,// timestamp the news was published effectiveTime:1704085200000,// timestamp the news happened headline:"Hello world", source:"Velo", priority:2,// 1 = top priority only, 2 = everything else coins: ['BTC'],// list of relevant coins summary:"# Hello world",// may include markdown link:"https://velodata.app"// source link}
The WebSocket may also send edit events which will have all fields above plus edit: true , or delete events which will have only the following {id: id, deleted: true}.
Python
Quick Start
import asynciofrom velodata import lib as velo# new velo clientclient = velo.client('api_key')# get past storiesprint(client.news.get_news())# stream new storiesasyncdefstream():asyncfor message in client.news.stream_news():if(message in ('connected','heartbeat','closed')):print(message)else:print(json.loads(message))asyncio.run(stream())
Get news
news.get_news(begin)
begin (optional, defaults to 0): millisecond timestamp to only fetch news after