Code Monkey home page Code Monkey logo

stonksjs's People

Contributors

actions-user avatar dependabot[bot] avatar depfu[bot] avatar nielse63 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stonksjs's Issues

Refactor api module

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.

Generate test script

Create a bin script to automatically generate new tests for source files that don't have an assodiated .spec.js file

Deploy script

Create a script that executes all the steps for a release

Refactor `quote` module

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

Refactor `stock-screener` lib

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

Setup codecov account once automated testing is complete

Dependent on #3

Module not found: Can't resolve '@stonksjs/finviz'

Describe the bug
Module not found: Can't resolve '@stonksjs/finviz'

To Reproduce

  1. npm i @stonksjs/finviz
  2. npx create-next-app@latest (select Javascript and and other params by default)
  3. add to app\page.js
    import Image from "next/image";
    import finviz from '@stonksjs/finviz';

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

GitHub Actions

Create GitHub Actions to automate testing on push/pull requests

Screener returns an empty array

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.

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.