Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
Aloha,

I currently have a simple dashboard made in couch where I track some crypto holdings. It's all based on manual entry at the moment, but I would like to integrate some automation that pulls the latest prices for each coin and saves it to couch rather than a manual update of the current price. I then want couch to multiply holding of x coin with the current price. The price doesn't need to be live, ie. an api call every time I update the page. Some kind of cron job that fetches new data from a list of current coin pairs held every now and then would do :)
I must admit I'm not very versed in PHP or API calls, what would be the easiest solution for me?

Here is a possible site I can get API access to and fetch data( maybe some other site is better Im not sure?)
https://www.livecoinwatch.com/tools/api

Thanks in advance :)
I take it you can get the data, but want to store it in a Couch 'page'?

I suggest having a look at the db_persist tag - see https://www.couchcms.com/forum/viewtopic.php?f=2&t=8301.
Thank you for your reply, I guess i'm to incompetent to pull this off :D
I have managed to do a api request and get a reply, but I don't know how to save the response and then update it into the couch database :roll:
Perhaps you can use the capture-Tag in conjunction with php-Tag and file_get_contents:

https://simonwpt.github.io/CouchDocs/ta ... e/php.html
https://simonwpt.github.io/CouchDocs/ta ... pture.html
4 posts Page 1 of 1