Giter VIP home page Giter VIP logo

arweave-currency-datafeed's Introduction

Arweave Currency Datafeed

currency rates, on Arweave


๐Ÿ’ฐ

Wallet of this feed -> hjCuCtTDySi9_KNtRxmPIsAyYVrTXeJZNP3R1aHfNPg

License

currency rates, on Arweave

Click here for what it stores -> currencies.json

Features

Get the currency rates API

People should query using ARQL for the latest file like this

Tip: you can use https://ibwslcweo3rb.arweave.net/1w40L6Z8WLrRTZiBRcp4qMPaMuJfblUlB9pqovkh5PQ if you want to quickly test it

{
  op: 'and',
  expr1: {
    op: 'equals',
    expr1: 'from',
    expr2: 'hjCuCtTDySi9_KNtRxmPIsAyYVrTXeJZNP3R1aHfNPg'
  },
  expr2: {
    op: 'equals',
    expr1: 'TIME-HOUR',
    expr2: '2019-11-17T15'
  }
}

Since it updates hourly, I've added a tag called "TIME-HOUR"

TIME-HOUR represents the first part of the ISO8601 time formatting (UTC) so get the unix time, transform it to ISO8601, and leave just the date & hours

If you think of a better way to do this, let me know

Code your own datafeed

  • step 1: think about how would people query your datafeed
  • step 2: check the logic under sync.go.
  • step 3: reuse the config file & the push to arweave functions

Use it as a template

If you want to use this as a template for your project, for whatever reason, it's simple

  • edit the config file
  • check the logic under sync.go

Configuration file

{
  "debug": true,
  "nodeURL": "https://arweave.net",
  "appID": "YOUR_OPENEXCHANGERATES_ORG_APPID_HERE",
  "walletFile": "/PATH/TO/YOUR/arweave-wallet.json",
  "server": {
    "host": "localhost",
    "port": 5555
  }
}

Where:

  • debug run with move verbosity
  • nodeURL the arweave node url
  • appID the https://openexchangerates.org APP ID
  • walletFile the location of the wallet.json file
  • server ip & port where this service should run

Special thanks to:

https://github.com/Dev43/arweave-go -> for the transaction signing & transmitting code

Bugs / Features / Questions

fell free to create an issue

TODO://

  • tags
  • awaiting your idea

Sponsors

Does your company use arweave-datafeed ? Help keep the project bug-free and feature rich by sending a small donation

License

๐Ÿ’ฐ Arweave Currency Datafeed is released under the MIT license.

arweave-currency-datafeed's People

Contributors

andreid avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.