nielse63 / stonksjs Goto Github PK
View Code? Open in Web Editor NEWReliable algotrading utilities written in node
Home Page: https://nielse63.github.io/stonksjs/
License: ISC License
Reliable algotrading utilities written in node
Home Page: https://nielse63.github.io/stonksjs/
License: ISC License
The finviz module can be written procedurely - no need for it to be a class
The api
module should export a plain object with a few basic method:
const api = require('@stonksjs/api');
// api.get(url, option) => {Promise<Object>}
// api.post(url, option) => {Promise<Object>} ?
The object methods only need to normalize the config passed to axios, parses/formats the response, and communicates errors to the user.
Create a bin script to automatically generate new tests for source files that don't have an assodiated .spec.js file
Repurpose @stonksjs/core
to import the other stonks packages and expose them to the user
Create a script that executes all the steps for a release
The quote module doesn't need to be a class - instead, just import @stonksjs/finviz as a dependency and treat this module as a passthrough
Some body
with line breaks
If the creds aren't set as environment variables, and error is throw, killing the entire script. If someone isn't using the robinhood features, the package is totally useless.
Create a package that gets results from a robinhood collection (ie: https://robinhood.com/collections/reit). Also pull a list of all collections available in robinhood.
The file packages/stock-screener/lib/StockScreener.js
doesn't need to be written as a class - it's simple enough that it can be written in basic functions
Setup codecov account once automated testing is complete
Dependent on #3
.
Add keywords to package.json and GitHub repo
Describe the bug
Module not found: Can't resolve '@stonksjs/finviz'
To Reproduce
export default async function Home() {
const data = await finviz.getQuote('MSFT');
console.log(data)
return (
... omitted for brevity
Expected behavior
I expected to see Microsoft company data in the console
Environment
NodeJS 20.14.0
NextJS 14.2.3
Create GitHub Actions to automate testing on push/pull requests
Describe the bug A clear and concise description of what the bug is.
Please forgive me if I am missing something obvious, I am relatively new to programming.
Passing the example screen (https://finviz.com/screener.ashx?v=111&s=ta_topgainers) to finviz.screen()
returns a promise that resolves to an empty array.
To Reproduce Steps to reproduce the behavior:
My code:
const finviz = require("@stonksjs/finviz");
const getTopGainers = async () => {
const symbols = await finviz.screener(
"https://finviz.com/screener.ashx?v=111&s=ta_topgainers"
);
console.log(symbols);
};
getTopGainers();
// => []
My package.json:
{
"name": "alpaca-trades",
"version": "1.0.0",
"description": "backend for sending requests to alpaca",
"main": "index.js",
"dependencies": {
"@stonksjs/finviz": "^1.0.1",
"node-fetch": "^2.6.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Expected behavior A clear and concise description of what you expected to happen.
Expect it to return an array of symbol in the response schema as described on npm
Environment A concise description of your environment: GatorGrader version, python version,
operating system, etc.
node v15.0.1
npm v6.14.11
macOS 10.15.7
Additional context Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.