Skip to main content

台灣上市股票價格擷取(Fetch TWSE stock data)含台灣時間轉換、開休市判斷。

Project description

主要開發擷取台灣股市(TWSE)股價資料,資料來源 證券交易所網站

版本資訊

Authors:

Toomore Chiang

Version:

0.0.1x of 2012/03/10

Python Version:

Python 2.6-2.7

Report Issue or get involved

Quick Start

簡單計算

from grs import stock

g = stock(2618)       # 擷取長榮航股價
print g.MA(5)         # 計算五日均價與持續天數
print g.MAV(5)        # 計算五日均量與持續天數

擷取 12 個月份資料

g = stock(2618, 12)

輸出 CSV 檔

g.out_putfile('/dev/shm/2618.csv')

其他功能

顯示台灣時間:TWTime

適用於其他時區查詢台灣當地時間。

from grs import TWTime

t = TWTime()
t.now                 # 顯示台灣此刻時間
t.localtime           # 顯示當地此刻時間

判斷台灣股市是否開市:twseopen

from grs import twseopen
from datetime import datetime

t = twseopen()

t.Dday(datetime.today())       # 判斷今天是否開市,回傳 True or False
t.Dday(datetime(2012, 12, 22)) # 判斷 2012/12/22 是否開市

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grs-0.0.1a0310.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grs-0.0.1a0310-py2.7.egg (13.6 kB view details)

Uploaded Egg

File details

Details for the file grs-0.0.1a0310.tar.gz.

File metadata

  • Download URL: grs-0.0.1a0310.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for grs-0.0.1a0310.tar.gz
Algorithm Hash digest
SHA256 f66a39438c4e2715c7adb0a3eea2056fbc5fa52470d5fd9d3af1742027a19b9d
MD5 5c19b6116e3aa6b0be05897d100a0669
BLAKE2b-256 3f699c5b4a883153daeeb173902f2d5b9a2b203dbd731fa770d5b5e0fd541dcf

See more details on using hashes here.

File details

Details for the file grs-0.0.1a0310-py2.7.egg.

File metadata

  • Download URL: grs-0.0.1a0310-py2.7.egg
  • Upload date:
  • Size: 13.6 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for grs-0.0.1a0310-py2.7.egg
Algorithm Hash digest
SHA256 2942898a21d3dc33a974bc175d44e4be971bd645ecc84ef69d81fe9a7ce92866
MD5 ac9af8f21f31cc3278c367b6abbdc2ae
BLAKE2b-256 52f2906bbde12c1e001928d5c1145242a389a74929c2bdad2030ebf6ede35ca2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page