All Projects → piquette → Finance Go

piquette / Finance Go

Licence: mit
📊 Financial markets data library implemented in go.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Finance Go

Pandas Datareader
Extract data from a wide range of Internet sources into a pandas DataFrame.
Stars: ✭ 2,183 (+456.89%)
Mutual labels:  pandas, data, finance, financial-data, stock-data
Intrinio Realtime Node Sdk
Intrinio NodeJS SDK for Real-Time Stock & Crypto Prices
Stars: ✭ 30 (-92.35%)
Mutual labels:  cryptocurrency, finance, stock-market, stock-data
stock-market-scraper
Scraps historical stock market data from Yahoo Finance (https://finance.yahoo.com/)
Stars: ✭ 110 (-71.94%)
Mutual labels:  finance, scraper, stock-market, stock-data
Yahooquery
Python wrapper for an unofficial Yahoo Finance API
Stars: ✭ 288 (-26.53%)
Mutual labels:  pandas, finance, stock-market, stock-data
Financedatabase
This is a database of 180.000+ symbols containing Equities, ETFs, Funds, Indices, Futures, Options, Currencies, Cryptocurrencies and Money Markets.
Stars: ✭ 554 (+41.33%)
Mutual labels:  finance, stock-market, stock-data, options
Alpha vantage
A python wrapper for Alpha Vantage API for financial data.
Stars: ✭ 3,553 (+806.38%)
Mutual labels:  cryptocurrency, pandas, finance, financial-data
Algobot
A C++ stock market algorithmic trading bot
Stars: ✭ 78 (-80.1%)
Mutual labels:  finance, stock-market, financial-data, stock-data
Iexfinance
Python SDK for IEX Cloud
Stars: ✭ 573 (+46.17%)
Mutual labels:  pandas, data, finance, stock-data
Tushare
TuShare is a utility for crawling historical data of China stocks
Stars: ✭ 11,288 (+2779.59%)
Mutual labels:  pandas, finance, stock-market, stock-data
pyEX
Python interface to IEX and IEX cloud APIs
Stars: ✭ 407 (+3.83%)
Mutual labels:  finance, stock-market, stock-data
fhub
Python client for Finnhub API
Stars: ✭ 31 (-92.09%)
Mutual labels:  finance, stock-market, financial-data
AIPortfolio
Use AI to generate a optimized stock portfolio
Stars: ✭ 28 (-92.86%)
Mutual labels:  finance, pandas, stock-market
Technicalindicators
A javascript technical indicators written in typescript with pattern recognition right in the browser
Stars: ✭ 1,328 (+238.78%)
Mutual labels:  cryptocurrency, stock-market, stock-data
pytickersymbols
Fundamental stock data and yahoo/google ticker symbols for several indices.
Stars: ✭ 69 (-82.4%)
Mutual labels:  finance, stock-data, financial-data
Tianyancha
pip安装的天眼查爬虫API,指定的单个/多个企业工商信息一键保存为Excel/JSON格式。A Battery-included Scraper API of Tianyancha, the best Chinese business data and investigation platform.
Stars: ✭ 206 (-47.45%)
Mutual labels:  pandas, scraper, data
Finance
Here you can find all the quantitative finance algorithms that I've worked on and refined over the past year!
Stars: ✭ 194 (-50.51%)
Mutual labels:  pandas, finance, stock-market
qtrn
⚠️ Deprecated, see https://github.com/piquette/qtrn ⚠️
Stars: ✭ 20 (-94.9%)
Mutual labels:  finance, stock-market, stock-data
pinance
Python module(s) to get stock data, options data and news.
Stars: ✭ 70 (-82.14%)
Mutual labels:  finance, options, stock-data
dados-financeiros
Repositório de Fontes de Dados Financeiros do Brasil
Stars: ✭ 119 (-69.64%)
Mutual labels:  finance, stock-market, financial-data
Pyex
Python interface to IEX and IEX cloud APIs
Stars: ✭ 311 (-20.66%)
Mutual labels:  finance, stock-market, stock-data

finance-go

GoDoc Build Status Coverage Status

Summary

This go package aims to provide a go application with access to current and historical financial markets data in streamlined, well-formatted structures.

Check out the qtrn cli application, which is intended as a living example of this package. It prints quotes/options info in your favorite command-line in a few keystrokes!

Features

Description Source
Quote(s) Yahoo finance
Equity quote(s) Yahoo finance
Index quote(s) Yahoo finance
Option quote(s) Yahoo finance
Forex pair quote(s) Yahoo finance
Cryptocurrency pair quote(s) Yahoo finance
Futures quote(s) Yahoo finance
ETF quote(s) Yahoo finance
Mutual fund quote(s) Yahoo finance
Historical quotes Yahoo finance
Options straddles Yahoo finance

Documentation

A neatly formatted detailed list of implementation instructions and examples will be available on the piquette website.

For now, for details on all the functionality in this library, see the GoDoc documentation.

Installation

This project supports modules and Go 1.13+. Add finance-go to your own project the usual way -

go get github.com/piquette/finance-go

Usage example

Library usage is meant to be very specific about the user's intentions.

Quote

q, err := quote.Get("AAPL")
if err != nil {
  // Uh-oh.  
  panic(err)
}

// Success!
fmt.Println(q)

Equity quote (more fields)

q, err := equity.Get("AAPL")
if err != nil {
  // Uh-oh.  
  panic(err)
}

// Success!
fmt.Println(q)

Historical quotes (OHLCV)

params := &chart.Params{
  Symbol:   "TWTR",
  Interval: datetime.OneHour,
}
iter := chart.Get(params)

for iter.Next() {
  fmt.Println(iter.Bar())
}
if err := iter.Err(); err != nil {
  fmt.Println(err)
}

Development

Pull requests from the community are welcome. If you submit one, please keep the following guidelines in mind:

  1. All types, structs and funcs should be documented.
  2. Ensure that make test succeeds.

Test

The test suite needs testify's require package to run:

github.com/stretchr/testify/require

It also depends on a running instance of a test server finance-mock, so make sure to fetch that project and run the application from another terminal session (finance-mock's README contains more information).

Docker

  docker run -p 12111:12111 piquette/finance-mock:latest

Brew

brew tap piquette/finance-mock
brew install finance-mock
finance-mock

Go

go get -u github.com/piquette/finance-mock
finance-mock

Run all tests:

go test ./...

Run tests for one package:

go test ./equity

Run a single test:

go test ./equity -run TestGet

For any requests, bug or comments, please open an issue or submit a pull request. Also please email or tweet me as needed.

Notes

  • Yahoo changes their finance APIs without warning, which is their right to do so. However, its annoying and leads to some instability in this project..
  • Big shoutout to Stripe and the team working on the stripe-go project, I took a lot of library design / implementation hints from them.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].