Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp pulling Google Finance Data
Message
From
05/10/2020 12:44:46
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
26/09/2020 18:42:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01676267
Message ID:
01676474
Views:
56
>Howdy all,
>
>Is there any sample applications or known coding to pull stock data via a vfp application (desktop ) from google finance ?

Check their API (which I didn't do in the case of the google for quite a while but) - most of such services operate via simple https. The general scenario goes like this:
- you prepare a https call with the url consisting of whatever they say. The parameters thereof usually indicate the action/function you want to call, the ID of the entity on which you query, other case specific parameters, your user ID, timestamp (usually an unix timestamp number, which is datetime()-{^1970-01-01 0:0:0}) and then you save the whole thing into a variable
- you calculate a checksum of that variable plus your password, usually an MD5 checksum, but I've seen others
- the query you send may be completely in the url, or you may need to send it as data, usually xml or json
- you do a httpGetEx() with it, and it returns a string
- the string may be xml or json, containing your data. Use something to unpack that into some format you can use in VFP. I'm using nfjsonread by Marco Plaza for what little I do (get my website stats from StatCounter).
For hash/checksum, where MD5 was needed I found code on the old fox wiki; for SHA, at http://www.sweetpotatosoftware.com/blog/index.php/2005/09/01/visual-foxpro-encrypt-and-decrypt-files/

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform