Finki

Afternoon,

Something that might help you guys out (but is currently a work in progress) is the API I’m currently building. It should (hopefully) take the pain out of monitoring your Freetrade assets.

I only started building it this morning so it’s super early days but here’s a brief overview.

https://finki.io/callAPI.php?isin=[ISIN]&function=[FUNCTION]

I built it using ISIN as symbol/ticker could turn out not to be specific enough (ie. XXX on London and XXX on NYSE). I’ll do a conversion tool shortly for those that prefer to work with symbols but for now it’s ISIN only. Sorry.

FUNCTIONS currently:

ukBid
ukAsk
ukCurrency
ukSymbol
ukDividendYield
ukDividendExDate
ukDividendPayDate
ukDividendAmount
ukDividendCurrency
usDividendExDate
usDividendPayDate
usDividendAmount
usDividendFrequency
usDividendCurrency
usBid
usAsk
usLatest
usOpen
usClose
ukOCF (just added)

So, for example, want to know the next ex dividend for Vodafone (VOD) [ISIN:GB00BH4HKS39]

https://finki.io/callAPI.php?isin=GB00BH4HKS39&function=ukDividendExDate

or for the pay rate

https://finki.io/callAPI.php?isin=GB00BH4HKS39&function=ukDividendAmount

for a US stock you’ll need to (for now) flick to the usDividendAmount or usDividendExDate functions.

so, for the latest Apple. AAPL. US0378331005 dividend amount

https://finki.io/callAPI.php?isin=US0378331005&function=usDividendAmount

You get the idea.

This is in response to Freetraders crashing my website when a link to my dynamic dividend calendar got posted on message board and crashed my servers. Thanks! Nice to be popular. I think. What would I know?

Please. Enjoy.

Excel and G Sheet templates coming soon on the website but for now I need to get a life as I’ve been working on this since 6am today.

Please use, enjoy, report any bugs and suggest improvements. It’s been designed in such a way that new data fields can be added in pretty quickly.

Here’s a link to the Freetrade securities universe so you can run it against your selected ISINs.

21 Likes

Where the hell you getting the data from :face_with_monocle:

1 Like

Great work, thanks for sharing. Looks like this will be a great fit for integration in to things like spreadsheets.

But for other use-cases, there would be less round trips and less load on your server if you had a function that just returned everything you know about a particular ISIN, eg. as JSON. Maybe even a function for all ISINs. I assume you cache the data from your source, so if your source APIs only return 1 value at a time, this should still not present a problem.

Free sources. iex. Quandl. Etc

I will reverify that and remove any I’m dubious about.

The data is out there. This is just a way of bringing all together using a common syntax (sort of - after I kill the UK/US division)

As well as ‘removing’ I can also ‘add’ pretty quickly so message any new data points you want. From the discussions on here I’m presuming PE and dividend cover. Also please point out errors as this is early days and very much a work in progress.

2 Likes

Agreed. But this was a conscious choice (hungover at 6am) as it’s designed to be simple (for all, not just techies), and very much version 0.1. Most of the heavy lifting is split between numerous ‘free’ servers and shouldn’t cause issues for me. For the user - yeah it’s a little slow - but that’s also considered as speed and depth of data would be a semi commercial operation - this is free and meant to be a ‘here you go hope this helps’ kinda thing. If by any miracle people want to pay for commercial data and a faster more complete api then I’d have to charge a fee so it become zero cost to me and I just pass on data vendor licensing fees etc. I suspect that’s Not needed by most but you never know.

4 Likes

OCFs quickly added

Only those within the Freetrade universe.

Callable via the ukOCF function

eg…

https://finki.io/callAPI.php?isin=IE00B4WXJK79&function=ukOCF

or

https://finki.io/callAPI.php?isin=GB0001740025&function=ukOCF

1 Like

if you call it for a fund/security/etf that is not in the Freetrade universe you’ll get a nonsense OCF returned… usually 0.87 … ONLY those in the Freetrade universe will return genuine results.

1 Like

Bug found in some US data when markets are closed (like today!!!) - sometimes returns incorrect data - I’m on it!

3 Likes

Enough for today! I need a life!

Bugs fixed and API detail expanded on.

https://finki.io/finkiAPI.html

Have fun all.

3 Likes

Something which would be nice is if i could retrieve a dividend payment for a certain time period.

Ie - AAPL dividends from 3/1/2019 to 3/31/2019

Gotcha. I’ll start building it tomorrow. It will blow the current structure of the URL as I’ll have to give you a start and end date parameter… but no problem…leave it with me

Actually… more likely Tuesday. Sorry for the delay.

1 Like

Hi finki, much appreciation for what you are doing :+1:

Just to help with some of the bug squashing, some isin codes are incorrectly (I believe) retrieving 0 as the dividend yield.

Symbol ISIN Bid Ask DivYield CorrectedYield
CLG GB00BMMV6B79 240.5 243.5 0 3.5
CCH CH0198251305 2910 2912 0 1.66
FORT GB00BYYW3C20 284 287 0 3.38
MGP GB00BYV24996 141 152.5 0 1.53
PCGH GB00B6832P16 209 210 0 1.62
RGL GG00BYV2ZQ34 107.8 108.4 0 7.4
RIV GB00BLZH7X42 256 260 0 4.96
STCK GB00BF5SDZ96 232.5 235 0 3.21
THRL JE00B95CGW71 117.4 117.6 0 5.48
XPS GB00BDDN1T20 151 158 0 4.08

Corrected yield is a figure I semi-manually process, so it is not 100% accurate, but I believe it to be close.

Also, if I may make a request. I think ukDividendExDate only pulls ExDates prior to the current date. Is there any way to get this data shortly after Declaration Date?

Yep. I could either introduction something like ukExLatest and/or ukExDeclared for future dates.

Requests are piling up and my diary is jammed so lookout for this making an appearance mid week(ish) hopefully.

But are those securities Freetrade listed?? On first glance I’m not sure. But, sure. No worries. Wasn’t my intent for this to be for securities outside of Freetrade but I’ll play ball.

I’ve not tested exhaustively, but ukDividendExDate for BT (GB0030913577) shows ex div date of 2019-08-08 and Royal Mail (GB00BDVZYZ77) shows 2019-07-25 as expected …

I can imagine you have become very busy!

And sorry I didn’t check, they are probably not on FreeTrade.

But thank you, whenever you able to deliver the Latest/Declared update I will be grateful. So no worries if you have a lot to do already .

@caribo I think you are right.

@finki apologies,I think you can drop my request. I think when I merged my manual data with yours, I assumed mine was incomplete and so I was expecting a difference. Lack of testing on my part.

OK, quick fix in place. Various data vendors calculate yield in differing ways (12m rolling, some include “special” dividends, some don’t, it’s a mine field). So, quick, non-perfect 7am Monday morning fix.

Call ukDividendYieldv2

it will work for equities and invest trusts only. ETFs will return the same yield as ukDividendYield (version 1)

Have a play. Let me know. I expect some oddities. #workinprogress

Interesting, I couldn’t ever find any free data for UK Equities on Quandl & their terms of use are pretty strict too. I did subscribe to UK fundamental and pricing data for a year but I didn’t find it cost efficient.

IEX is solid though, I’ve been using that for a few months now & it works great with a very generous free tier too

ok, this is done. The construct of the output is a little funky, but I infer you’re competent to logically parse the return. If not I’ll rethink the output.

I built it on my mobile whilst sitting in a (dull? No, sorry, very exciting!) meeting - which is why it’s pretty scrappy. It should however meet your needs.

That’s 2 of a now 27 to-do list done!

You guys are unstoppable!!!

I’ll push it out to the server later tonight and give you the function and API syntax

2 Likes

I not using this yet but you are a :star2:

3 Likes