Last active
July 21, 2019 05:04
-
-
Save lowweihong/d54e39159fb3c48a0e7a8dac08bd6fb3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
HEADERS = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36", | |
"Origin": "https://www2.sgx.com", | |
"Referer": "https://www2.sgx.com/securities/securities-prices"} | |
# Start downloading stocks info from sgx | |
req = requests.get("https://api.sgx.com/securities/v1.1?excludetypes=bonds¶ms=nc,adjusted-vwap,b,bv,p,c,change_vs_pc,change_vs_pc_percentage,cx,cn,dp,dpc,du,ed,fn,h,iiv,iopv,lt,l,o,p_,pv,ptd,s,sv,trading_time,v_,v,vl,vwap,vwap-currency", | |
headers=HEADERS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment