Distributed API via GUN js
Budget: $250 – $750 AUD
Hi Guys.. I’m a dev and need to outsource a part of a larger project. Currently, we get prices from an API, but we want to create a distributed price aggregation network which will allow for a distributed set of nodes to connect to different APIs and keep a distributed median price db using Gun JS (https://Gun.eco), a distributed graph database.
- We want to Monitor 35 pairs. Full list will be provided.
-To monitor the APIs and insert records into the Gun JS database, we'll create a a node service that utilise Gun JS. This node js service will fetch data from APIs and insert records into the Gun JS database at the 0.5-second interval.
- To ensure the correct price is selected in cases of discrepancies, we'll use a median consensus mechanism by modifying the core functionality of Gun JS. Each node will fetch prices from various APIs and insert records into the Gun JS database. The median price will be selected as the correct one in case of discrepancies between the prices fetched by different nodes and stored in their respective local dbs.
- As each node can supply there own API and we have to possibly create a basic front end to map each asset price to each end point. Eg. BTC —> example.com/price/btc
- Each node can only connect to 1 api so front end needs to also request API key and auth credentials.
- We'll configure each node's Gun JS settings as a signaler (for peer discovery) to make the network work like a distributed API.
- IMPORTANT : We'll also create HTTP routes on each node to act as endpoints that query the graph and return the latest price for an asset. E.g BTC, ETH, USDAUD etc, meaning we may need to create an interface for Nginx so if endpoints are URL or IP based we can get price from IPADDRESS/price/asset or URL/price/asset
- test premium API credentials will be provided.
- We want to Monitor 35 pairs. Full list will be provided.
-To monitor the APIs and insert records into the Gun JS database, we'll create a a node service that utilise Gun JS. This node js service will fetch data from APIs and insert records into the Gun JS database at the 0.5-second interval.
- To ensure the correct price is selected in cases of discrepancies, we'll use a median consensus mechanism by modifying the core functionality of Gun JS. Each node will fetch prices from various APIs and insert records into the Gun JS database. The median price will be selected as the correct one in case of discrepancies between the prices fetched by different nodes and stored in their respective local dbs.
- As each node can supply there own API and we have to possibly create a basic front end to map each asset price to each end point. Eg. BTC —> example.com/price/btc
- Each node can only connect to 1 api so front end needs to also request API key and auth credentials.
- We'll configure each node's Gun JS settings as a signaler (for peer discovery) to make the network work like a distributed API.
- IMPORTANT : We'll also create HTTP routes on each node to act as endpoints that query the graph and return the latest price for an asset. E.g BTC, ETH, USDAUD etc, meaning we may need to create an interface for Nginx so if endpoints are URL or IP based we can get price from IPADDRESS/price/asset or URL/price/asset
- test premium API credentials will be provided.