plato1976 / FinMind

Open Data, more than 40 financial data. 提供超過 40 個金融資料,每天更新

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status license PyPI version Documentation Status

Solicit partners who are interested in joint development.
徵求有興趣共同開發的夥伴。

重大更新 FinMind 1.0.80

過去是直接連 DataBase,由於 server 在國外,直接連 DataBase 斷線機率高。
目前改走 api 方式,未來舊版 package 將會失效,無法直接連 DataBase。請更新到最新版本,或是直接走 api。
Python document

What is it?

FinMind is open source of more than 40 dataset, contain Taiwan stock, US stock, Europe stock, Japan stock, oil price, gold price, G7 exchange rate, interest rate, government bonds. The datasets are automatically updated daily. You can analyze financial data without having to collect the data by yourself.

 pip3 install FinMind

Api

  • R document

  • R code

    library(httr) 
    library(jsonlite)
    library('data.table')
    library(dplyr)
    
    url = 'http://finmindapi.servebeer.com/api/data'
    
    # TaiwanStockInfo
    payload<-list( 'dataset' = 'TaiwanStockInfo')
    
    response = POST(url,body = payload,encode="json")
    data = response %>% content 
    data = do.call('cbind',data$data) %>%data.table
    head(data)
    
  • Python document

  • Python code

    import requests
    url = 'http://finmindapi.servebeer.com/api/data'
    form_data = {'dataset':'TaiwanStockInfo'}
    res = requests.post(url,verify = True,data = form_data)
    
    url = 'http://finmindapi.servebeer.com/api/data'
    form_data = {'dataset':'TaiwanStockPrice','stock_id':['2330','2317'],'date':'2019-06-01'}
    res = requests.post(url,verify = True,data = form_data)
    

Data

  • FinMind.Data

  • 40 data sets

  • Variable Document

    from FinMind.Data import Load
    TaiwanStockInfo = Load.FinData(dataset = 'TaiwanStockInfo')
    	data = Load.FinData(dataset = 'TaiwanStockPrice',select = ['2330','2317'],
    				date = '2018-10-10')
    

Mind

Document

HistoryUpdate

Financial Visualize ( In development )

At least five kinds of visualization tools for every data type. ( In development )
http://finmind.servebeer.com/ 開發中

email : linsam.tw.github@gmail.com

About

Open Data, more than 40 financial data. 提供超過 40 個金融資料,每天更新

License:Apache License 2.0


Languages

Language:Python 76.8%Language:R 23.2%