Skip to content

Instantly share code, notes, and snippets.

@cofearabi
Created May 30, 2012 23:00
Show Gist options
  • Save cofearabi/2839456 to your computer and use it in GitHub Desktop.
Save cofearabi/2839456 to your computer and use it in GitHub Desktop.
(python)get stock price data ( daily weekly monthly ) and write temp file.
# coding=utf-8
import jsm
if __name__ == "__main__":
import tempfile
q = jsm.Quotes()
c = jsm.QuotesCsv()
for range in (jsm.DAILY, jsm.WEEKLY, jsm.MONTHLY):
print(q.get_historical_prices(4689, range))
c.save_historical_prices(tempfile.mktemp(dir='/tmp/'), 4689, range)
print(q.get_price(4689))
# print(q.get_finance(4689))
# print(q.get_brand('0050'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment