0.2.7 • Published 3 years ago
updatetools v0.2.7
updateTools
This library is designed to Read & Write Crypto Currency historical data to and from a Mongo Database
The DB functions often call the cbxQuery library that I created to read the data from the coinbase api located at:
"https://api.pro.coinbase.com";
The functions that are the heart of this libary are:
- DBcollectionList- is used to get a list of collections from the mongo database.
- DBproductExist- is a simple check to see if a specific product exists in the mongo database.
- DBmostRecentDate-look to see when the last update was run by finding the most recent data for a specific collection.
- DBfillBlanks- when the server was off for a period of time, it creates blank spots in the data. To make analysis simpler We fill these blanks with zero volume and whatever the last value was for price.
- DBpatchBlanks- Sometimes blank spaces are due to download errors, this routine tries to re-read the data to fill in missing points
- DBrecordCount- Count how many records are in collection
- DBupdateCollection- Update the collection for a single collection
- DBupdateCollections- get the list of all collections and up date each one of them.
- DBupdateSet- This function actually write the data to the server
- DBpatchCollection- patch all missing data for a collection
To use this library, I created a mongodb Atlas
I named the Database: coinbase And created empty collections with names such as:
- ADA-USD
- BTC-USD
- ETH-USD
There is a another tool that calls this code to run updates for all of the data. It starts out empty, but the database fills quite rapidly