Code Monkey home page Code Monkey logo

edgr's Introduction

Piquette website

MIT license Website piquette.io Build Status

edgr's People

Contributors

ackleymi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

edgr's Issues

Errors launching

Hi, Im attempting to test out your app (having used qtrn for quick quotes, i appreciate the time you've put into these), but upon launching it with edgr init I get:

INFO[0000] connecting to postgres..
WARN[0000] dial tcp [::1]:5432: connect: connection refused

So I tried "brew services start postgresql" first, then entered "edgr init" once again, only for a different error to pop up:

INFO[0000] connecting to postgres..
WARN[0000] FATAL #28000 role "postgres" does not exist

running macOS Catalina 10.15.4 on a MBPr from early 2013, homebrew is up to date (cleanup/doctor show no errors or issues relating to either postgresql nor edgr)

The function GetPublicCompanies always throws the error index out of range [1] with length 1

Dear Team,

I was trying to list of all US public companies registered with the US Securities and Exchange Commission. We aimed to achieve this by using the API GetPublicCompanies API. Regrettably, this approach has consistently resulted in errors during our attempts.

Furthermore, I have made an attempt to troubleshoot the code locally by implementing certain modifications. Unfortunately, these adjustments did not yield the desired successful execution.

import (
	"context"
	"encoding/csv"
	"fmt"
	"net/http"

	"github.com/piquette/edgr/core"
)

func main() {
      headers :=  map[string]string{"User-Agent": "Steampipe/v0.x"}
	req, err := http.NewRequest("GET", "https://api.iextrading.com/1.0/ref-data/symbols?format=csv", nil)
	if err != nil {
		return []core.Company{}, err
	}

	for k, v := range headers {
		req.Header.Set(k, v)
	}

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		return []core.Company{}, err
	}
	defer resp.Body.Close()

	r := csv.NewReader(resp.Body)
	r.FieldsPerRecord = -1
	table, _ := r.ReadAll()
	result := []core.Company{}
	for _, row := range table {
		if len(row) < 2 {
			fmt.Sprint("ROW =====>>>>>", row)
			continue
		}
		sym := row[0]
		nme := row[1]
		if len(sym) > 5 || nme == "" {
			continue
		}
		result = append(result, core.Company{
			Symbol: sym,
			Name:   nme,
		})
	}
}

Could you please check it out and let us know I am doing anything wrong or it is a bug from SDK side?

Thanks!

Couldnt get any filings/documents/filers data in the db

Hi,

I have setup the database correctly, since init does create the database tables and i see the forms metadata getting populated.

bin/edgr --pg-user postgres --pg-pass password --pg-db indexer --pg-addr localhost:5432 filers init --symbol AAPLinit
INFO[0000] connecting to postgres..
INFO[0000] connected
INFO[0000] retrieving single company
100% |████████████████████████████████████████| [0s:0s]INFO[0000] finished
INFO[0000] disconnected from postgres

Not sure what I am doing wrong here. I'd be ok to dig deeper and see whats going on but if its a quick issue would like some help.

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.