2022年8月17日 星期三

[app inventor2] 如何使用 app inventor2 擷取並解析 台灣證券交易所TWSE 的個股盤後股票資料

使用 app inventor2 解析以下網址的資料:

https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=xml&date=&stockNo=0050

{"stat":"OK","date":"20220816","title":"111年08月 0050 元大台灣50       各日成交資訊","fields":["日期","成交股數","成交金額","開盤價","最高價","最低價","收盤價","漲跌價差","成交筆數"],"data":[["111/08/01","9,841,470","1,157,739,155","118.10","118.10","117.20","117.65","-0.35","8,720"],["111/08/02","18,600,451","2,149,115,164","116.55","116.55","115.10","115.55","-2.10","22,146"],["111/08/03","8,100,057","939,263,431","115.65","116.25","115.50","116.25","+0.70","7,600"],["111/08/04","7,108,342","826,140,065","116.35","116.80","115.20","116.55","+0.30","7,988"],["111/08/05","9,625,538","1,143,739,838","118.00","119.50","117.90","119.50","+2.95","10,809"],["111/08/08","8,966,011","1,066,313,383","119.00","119.25","118.30","119.25","-0.25","10,279"],["111/08/09","8,186,879","971,998,418","118.40","119.50","118.00","119.15","-0.10","9,920"],["111/08/10","7,796,649","919,415,561","118.00","118.20","117.50","117.90","-1.25","13,624"],["111/08/11","10,957,384","1,314,562,900","119.80","120.45","119.60","120.05","+2.15","8,947"],["111/08/12","8,598,361","1,038,027,809","120.55","121.00","120.30","120.80","+0.75","7,656"],["111/08/15","9,837,499","1,198,033,224","121.45","122.10","121.25","121.90","+1.10","10,575"],["111/08/16","10,114,278","1,235,256,112","122.00","122.30","121.90","122.10","+0.20","10,769"]],"notes":["符號說明:+/-/X表示漲/跌/不比價","當日統計資訊含一般、零股、盤後定價、鉅額交易,不含拍賣、標購。","ETF證券代號第六碼為K、M、S、C者,表示該ETF以外幣交易。"]}

App 程式簡易說明:
一、ETF平衡配置上只使用三個欄位,股票、債券及定存現金,規畫上越簡單越好,投資沒煩惱。
二、擷取資料非即時,是盤後資料,但有時會擷取錯誤,那是因為證交所不允許大量重複擷取的緣故。

程式方塊如下:




app 執行如下:







[投資] 如何買槓桿型的 ETF(例如:00631L)?

 根據 臺灣證券交易所股份有限公司受益憑證買賣辦法

第四條

委託人首次買賣槓桿反向指數股票型證券投資信託基金受益憑證及槓桿反

向指數股票型期貨信託基金受益憑證時,應具備下列條件之一

一、已開立信用交易帳戶。

二、最近一年內委託買賣認購(售)權證成交達十筆(含)以上。

三、最近一年內委託買賣臺灣期貨交易所上市之期貨交易契約成交達十筆

    (含)以上。

四、有槓桿反向指數股票型證券投資信託基金受益憑證或槓桿反向指數股

    票型期貨信託基金受益憑證買進成交紀錄。


參考來源:

臺灣證券交易所股份有限公司受益憑證買賣辦法

http://www.selaw.com.tw/LawArticle.aspx?LawID=G0100107

2022年8月15日 星期一

[app inventor2] 手繪記事本 (搖一搖就清除畫面)

1.  工作面板及組件

(1) 畫布 Canvas

(2) 加速度感測器



2.  原始程式碼


[心得]

很陽春的功能,可以自行增加儲存畫面的功能,也許可以拿來變變魔術。

熱門文章