npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ark-tracker

v1.1.4

Published

This is a set of tools to track ARK ETF trades. It only gets the data for you, it's up to you to do something with the data.

Downloads

39

Readme

Purpose

ARK ETF are very popular among investors, not only to invest but also to study what stocks ARK buys and sells on daily basis. After all, All ARK EFTs are actively managed and what could go wrong when there are smart people that have already done the homework for you. OK, this is a VERY BAD advise, please use your own judgement when investing.

ARK have been very transparent on their trades, they publish daily transactions for you to download on their website. However, you don't want to sit around every day to download the files. If you miss a day, the file gets overwritten with the new one, so you don't want to miss it.

This is a set of tools that you can setup on your server to automatically grab the CSV files and then store every records in transactional database(MySQL) so you can analyze with SQL and maybe do ML with it.

Proceed if you're:

  • Interested in ARK ETFs
  • Familiar with SQL and will do something with the data

This tool will only process ARKK, ARKQ, ARKG, ARKF, ARKW and ARKX files. It does not care about PRNT and IZRL at the moment.

Make sure your (Linux) server have ample disk space for the growing data before installation.

Database Setup and Configurations

Hey, before we begin, your server must have MySQL installed, OK?!

  1. Clone/fork the repository
  2. Create a new database in your MySQL server, name it whatever you want
  3. Load schema.sql into the new database
  4. Copy config.sample.php to config.php
  5. Edit config.php and fill out the db_* values

Scripts

ark-invest.sh

This is the crawler that downloads CSV files published daily by ARK from https://ark-funds.com/investor-resources

ark-invest.php

This is the ETL script that stores every transactions into database.

You can start running these scripts by ./ark-invest.sh and php ./ark-invest.php. These scripts will abort if you try to run on weekend, because they are intended to run on end of day of weekdays when stock market are open. The CSV files must exist for the date the ETL is running against.

If the ETL missed a day due to server outage or whaterver, you can manually kick it off by adding a date parameter to the ETL script, for example: php ./ark-invest.php 2021-02-12. If the ETL for that particular day has already been run, and you try to run it again, you will encounter with following messages. If you insist to redo the import for a particular day, you will have to delete the records from database manually and rerun the ETL for the day.

Run for 2021-02-12
Processing ARKK
Already processed, skipping
Processing ARKQ
Already processed, skipping
Processing ARKW
Already processed, skipping
Processing ARKG
Already processed, skipping
Processing ARKF
Already processed, skipping
Processing ARKX
Already processed, skipping

CRON Jobs

ARK publishes the files usually around 7pm every weekday. Run the scripts after 8pm to be sure.

  1. Run crontab -e to edit your CRON jobs, copy and paste lines below.
  2. Change /root/Desktop/ark-invest to your repo path.
# ark-invest.sh cron, runs the crawler every day at 8:30pm
30 20 * * * cd /root/Desktop/ark-invest && ./ark-invest.sh >> /var/log/ark-invest/ark-invest-sh.log 2>&1

# ark-invest.php cron, runs the ETL script every day at 9:00pm
0 21 * * * cd /root/Desktop/ark-invest && php ark-invest.php >> /var/log/ark-invest/ark-invest-php.log 2>&1

What Now?

Wait for the data to grow and do something cool with it, like creating charts. Do share with me!