Getting AgX scheduled jobs ready

in utopian-io •  7 years ago  (edited)

image.png

On my previous posts about AgX, I have first extracte STEEM/SBD data to calculate their 200 days moving average (AgX factor), and then used this data to draw a chart of the evolution of the price ratio and of the AgX factor itself.

The task was then run manually with npm run start

New Features

  • In order to automatize the whole thing I have integrated Express.js framework and set the main route to start fetching data and drawing the chart.
  • The call to the the job is secured by a secret token
  • If a chart has already been drawn that day, the process aborts
  • If a chart has already been drawn that day but the admin wants to override, he can add the parameter force=true to the URL

The new flow is as follow:

  • API is called
  • Authentication is checked thanks to the token
  • If Authentication succeeds, check if the chart has already been drawn
  • If the chart has not been drawn yet or if the admin forced it, get data from Bittrex API
  • Calculate 400 days STEEM/SBD ratio and 200 days AgX factor
  • Draw chart
  • Store it in public folder

The chart has been improved to follow @aggroed suggestions:

2018-02-05.jpg

  • Factor renamed to AgX
  • Tooltip shows today values for AgX and Steem/SBD ratio

Next steps

Next step will probably be the final one and will integrate Steem.js to allow the backend to publish posts containing the AgX information.

Release coming soon!

@stoodkev



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

After a long time I have seen someone write Jade!(My preffered EJS & Handlebars)

You can contact us on Discord.

[utopian-moderator]

Actually, I usually use EJS, but Express generated these files, and since I had just a few lines to render, I thought I d give it a try =)

its good.i like

you good

Nice
IMG_20180214_223202.jpg

Lucky day!

Nice

bitcoin is litcoin

Hey @stoodkev I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

👍

Got it

Hello, very good.

connect each other thank you

Interesting information. Thanks for sharing and for following as well.

Your publication is a great work of mathematical analysis.
Excellent work and contribution

I agree.

  ·  7 years ago Reveal Comment

914.jpg

Spam is discouraged by the community, including comment spam.

Tips to avoid being flagged

Thank You! ⚜

great a job.....@stoodkev,your post is very inspiring for me..Thanks

Very great a job 👍

Interesante, gracias a ti y a @steemit por permitirme dar la informacion.. feliz noche. saludos.

Indeed a very great job done

Interesting, thanks to you and to @steemit for letting me give the information .. happy night. Greetings.

Upvoted and follow. What do you ask for resteem?

Thanks for the follow and nice work 👌✨

Hi @stoodkev your post very nice I follow you and keep loving and keep seaport and follow me

Upvote and Follow me. From Aceh, Indonesia to the world :) @aceh.wonderful

POst new seeThe new flow is as follow:

Vote for me

Wonderful piece

This looks great, I will follow along.

hi

You get a resteem from getupvote.
Follow me @getupvote and get a upvote and resteem thank u

excellent work friend!

many many thanks for this news.

i upvote ur post
plz upvote my post

excellent post, thanks for sharing so valuable information, I congratulate you. I'm following you, I invite you to see my last post

Please help me new member from indonesia

Nice

the future of bitcoin is bright

About Agx, I have learned a lot about your previous posts, it is good to know the new features today.

Very good

Supporting me

Excelente trabajo voto, saludos

very good

Waw,this is good! You really tried,you' re one of the best on steemit.

Hello Friend, thank you for taking the time to read my article. I invite you to follow me. Hugs

Hello Friend, thank you for taking the time to read my article. I invite you to follow me. Hugs

Next step will probably be the final one and will integrate Steemt, excelente

I have interest in this. But I understand that.
Can you help me in this matter?
Thanks to shear it.

Happy Steeming.

This is a genius idea ill be tapping into this source this is gonna be very helpful for profit.

yes i like this