<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8992133329411225866</id><updated>2026-10-07T15:03:50.792+08:00</updated><category term="python"/><category term="群益API"/><category term="pywin32"/><category term="ubuntu"/><category term="小技巧"/><category term="comtypes"/><category term="linux"/><category term="論文寫作"/><category term="#群益API"/><category term="Event"/><category term="MEG"/><category term="SPM"/><category term="matplotlib"/><category term="pythoncom"/><category term="virtualbox"/><category term="群益API 更新"/><category term="#期貨權益"/><category term="CentOS"/><category term="DARTEL"/><category term="JCR"/><category term="MNE"/><category term="MRI"/><category term="PYTHONNET"/><category term="TA-Lib"/><category term="VBM"/><category term="callback 失效"/><category term="fMRI"/><category term="freesurfer"/><category term="fsl"/><category term="impact factor"/><category term="jupyter"/><category term="jupyterlab"/><category term="list"/><category term="pythnonet"/><category term="python automation"/><category term="pytorch"/><category term="reverse"/><category term="slicing"/><category term="virtualenv"/><category term="word"/><category term="丼"/><category term="冴"/><category term="拆喇叭鎖"/><category term="查詢中文字發音"/><category term="歷史報價"/><category term="沒反應 comtypes"/><category term="生活"/><category term="群益API debug"/><category term="選擇權"/><title type='text'>Eason&#39;s 記事本</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>58</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-4791409932050184904</id><published>2025-05-12T10:38:00.023+08:00</published><updated>2025-11-12T14:05:52.352+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>&gt;Python UV 管理器：從安裝到使用</title><content type='html'>&lt;!--建議加在 &lt;head&gt; 區塊--&gt;
&lt;style&gt;
/* 黑底白字，仿 GitHub dark code block */
.code-block {
  background: #18181b;
  color: #fff;
  border-radius: 4px;
  padding: 0.25em 0.25em;
  font-family: &#39;JetBrains Mono&#39;, &#39;Fira Mono&#39;, &#39;Consolas&#39;, &#39;Menlo&#39;, monospace;
  font-size: 1em;
  overflow-x: auto;
  margin: 0em 0;
  position: relative;
}
.code-block code {
  background: none;
  color: inherit;
  padding: 0;
}
.code-block .gp { color: #8be9fd; }   /* prompt */
.code-block .go { color: #bfbfbf; }   /* output */
.code-block .lineno {
  color: #444;
  user-select: none;
  display: inline-block;
  width: 2em;
  text-align: right;
  margin-right: 1em;
}

/* 段落標題與內文間距縮小，標題與前段落間距加大 */
h2, h3, h4 {
  margin-top: 2.5em;    /* 加大標題與前文間隔 */
  margin-bottom: 0.4em; /* 縮小標題與內文間距 */
}
p, ol, ul {
  margin-bottom: 1.2em;
}
hr {
  border: none;
  border-top: 1px solid #444;
  margin: 2em 0;
}
&lt;/style&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Python UV 管理器：從安裝到使用&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;
    UV 是一款強大的 Python 包管理工具，能夠替代 pip、pip-tools、pipx、poetry、pyenv、twine、virtualenv 等工具，提供高效的 Python 版本管理、依賴管理及虛擬環境管理，這裡簡單描述以利日後查找。
&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio5OeBJ3h5BsfuybjBXfAmsl_WW3er9VzlHNZlhp4IA56JWDdhf6i-y5KXxEvMIDeipbiM-vx76yUq49qAhZtWCBInmgHwdI_3QW69oGorXn0suLeL-3cGLcFXpN_nqQhyphenhyphenVnROovO1wDPPETX5v6_-LivZyzgzh9S3fM1p0-cq2_K4FAMnoNSSbzYY4Os/s1024/uv%20logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio5OeBJ3h5BsfuybjBXfAmsl_WW3er9VzlHNZlhp4IA56JWDdhf6i-y5KXxEvMIDeipbiM-vx76yUq49qAhZtWCBInmgHwdI_3QW69oGorXn0suLeL-3cGLcFXpN_nqQhyphenhyphenVnROovO1wDPPETX5v6_-LivZyzgzh9S3fM1p0-cq2_K4FAMnoNSSbzYY4Os/w210-h210/uv%20logo.png&quot; width=&quot;210&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;&lt;strong&gt;1. UV 的特點&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
    &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;一體化工具鏈&lt;/strong&gt;：安裝 UV 即可取代多個獨立工具，減少版本衝突與配置負擔。&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;極致性能&lt;/strong&gt;：基於 Rust 開發，安裝與解析速度遠超傳統 pip。&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;一致性與可重複性&lt;/strong&gt;：透過 &lt;code&gt;uv.lock&lt;/code&gt; 文件，確保不同環境的依賴一致性。&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;輕量虛擬環境管理&lt;/strong&gt;：內建 venv 功能，無需依賴外部工具。&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;完善的 Python 版本管理&lt;/strong&gt;：類似 pyenv，但更適合項目隔離，不影響系統環境。&lt;/p&gt;
    &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;&lt;strong&gt;2. UV 的安裝&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;UV 提供多種安裝方式，適用於不同平台：&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;方式 1：使用官方安裝腳本&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;適用於 Linux 和 macOS：&lt;/p&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;curl -LsSf https://astral.sh/uv/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;適用於 Windows：&lt;/p&gt;
&lt;div class=&quot;code-block&quot;&gt;
&lt;pre&gt;&lt;code&gt;
powershell -ExecutionPolicy ByPass -c &quot;irm https://astral.sh/uv/install.ps1 | iex&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h4&gt;&lt;strong&gt;方式 2：使用 pip 安裝&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;如果已安裝 Python，則可使用 pip 安裝：&lt;/p&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;pip install uv
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h4&gt;&lt;strong&gt;方式 3：其他安裝方式&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;
    UV 也支持 Homebrew、WinGet、Scoop、Docker 或 GitHub Releases 安裝。例如：&lt;/p&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;brew install uv
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h3&gt;&lt;strong&gt;3. UV 的基本使用&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;安裝完成後，可以使用 UV 來管理 Python 項目：&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;初始化新項目&lt;/strong&gt;&lt;/h4&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;uv init myproject
cd myproject
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;
    UV 會自動建立 &lt;code&gt;.gitignore&lt;/code&gt;、&lt;code&gt;.python-version&lt;/code&gt;、&lt;code&gt;pyproject.toml&lt;/code&gt; 等文件，並初始化 Git 倉庫。
&lt;/p&gt;

&lt;h4&gt;&lt;strong&gt;添加package&lt;/strong&gt;&lt;/h4&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;uv add numpy
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;這將自動：&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;
        &lt;p&gt;創建虛擬環境並安裝 &lt;code&gt;numpy&lt;/code&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p&gt;將 &lt;code&gt;numpy&lt;/code&gt; 添加至 &lt;code&gt;pyproject.toml&lt;/code&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p&gt;生成 &lt;code&gt;uv.lock&lt;/code&gt; 文件，確保依賴一致性&lt;/p&gt;
    &lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;&lt;strong&gt;運行 Python 腳本&lt;/strong&gt;&lt;/h4&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;uv run python script.py
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;或指定 Python 版本：&lt;/p&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;uv run --python 3.11 script.py
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h4&gt;&lt;strong&gt;同步依賴&lt;/strong&gt;&lt;/h4&gt;&lt;div class=&quot;code-block&quot;&gt;&lt;pre&gt;&lt;code&gt;uv sync
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;這將確保所有依賴與 &lt;code&gt;uv.lock&lt;/code&gt; 文件保持一致。&lt;/p&gt;


&lt;h3&gt;&lt;strong&gt;4. 參考文獻&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://bing.com/search?q=Python+UV+%e7%ae%a1%e7%90%86%e5%99%a8+%e5%ae%89%e8%a3%9d+%e4%bd%bf%e7%94%a8+%e5%8f%83%e8%80%83%e6%96%87%e7%8d%bb&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;UV 官方網站&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://zhuanlan.zhihu.com/p/1900465704555221273&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;UV 使用指南 - 知乎&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://www.cnblogs.com/wang_yb/p/18635441&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;UV 快速上手 - 博客園&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://www.youtube.com/watch?v=AMdG7IjgSPM&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;YouTube: UV 安裝與介紹&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://www.youtube.com/watch?v=RDCC6pJcIy8&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;YouTube: UV 教學&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://www.youtube.com/watch?v=qh98qOND6MI&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;YouTube: UV 實戰&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;https://blog.darkthread.net/blog/uv-cache-in-windows/&quot; rel=&quot;noopener&quot; target=&quot;_blank&quot;&gt;在 Windows 確保 uv 閃電安裝 Python 套件的小技巧&lt;/a&gt;
    &lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/4791409932050184904/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2025/05/python-uv.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/4791409932050184904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/4791409932050184904'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2025/05/python-uv.html' title='&gt;Python UV 管理器：從安裝到使用'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio5OeBJ3h5BsfuybjBXfAmsl_WW3er9VzlHNZlhp4IA56JWDdhf6i-y5KXxEvMIDeipbiM-vx76yUq49qAhZtWCBInmgHwdI_3QW69oGorXn0suLeL-3cGLcFXpN_nqQhyphenhyphenVnROovO1wDPPETX5v6_-LivZyzgzh9S3fM1p0-cq2_K4FAMnoNSSbzYY4Os/s72-w210-h210-c/uv%20logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-5627854855731150311</id><published>2025-04-16T23:47:00.010+08:00</published><updated>2025-05-13T17:41:33.040+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="#群益API"/><category scheme="http://www.blogger.com/atom/ns#" term="comtypes"/><category scheme="http://www.blogger.com/atom/ns#" term="Event"/><category scheme="http://www.blogger.com/atom/ns#" term="pythnonet"/><title type='text'>用 pythonnet 重塑群益 SKOrderLib，提升功能完整性</title><content type='html'>&lt;style&gt;
/* https://github.com/lonekorean/gist-syntax-themes */
@import url(&#39;https://cdn.rawgit.com/lonekorean/gist-syntax-themes/d49b91b3/stylesheets/idle-fingers.css&#39;);

@import url(&#39;https://fonts.googleapis.com/css?family=Open+Sans&#39;);
body {
  font: 16px &#39;Open Sans&#39;, sans-serif;
}
body .gist .gist-file {
  border-color: #555 #555 #444
}
body .gist .gist-data {
  border-color: #555
}
body .gist .gist-meta {
  color: #ffffff;
  background: #373737; 
}
body .gist .gist-meta a {
  color: #ffffff
}
body .gist .gist-data .pl-s .pl-s1 {
  color: #a5c261
}
&lt;/style&gt;


&lt;p&gt;&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgEPyMNQhV8X3Zs5PGRpeZgxIZVqGsNBjmIFF2PrG6lNR28dYZDHEfuxc-tkJUIB43mpmAZjx4SPpkz4j6TLIFnqUH0471x_cO8iGeQ6HKKvnLEncJO3FBbnFzT2tGBjkYxC9cuEJWlR4g8ZLY9Cruau9h2yAS2EjsvAUFv9ZGNk8At0MQFKwN0dIGF7zI&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgEPyMNQhV8X3Zs5PGRpeZgxIZVqGsNBjmIFF2PrG6lNR28dYZDHEfuxc-tkJUIB43mpmAZjx4SPpkz4j6TLIFnqUH0471x_cO8iGeQ6HKKvnLEncJO3FBbnFzT2tGBjkYxC9cuEJWlR4g8ZLY9Cruau9h2yAS2EjsvAUFv9ZGNk8At0MQFKwN0dIGF7zI&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
以前都使用 &lt;code&gt;comtypes&lt;/code&gt; 來包裹群益 SKCOM
API。然而，幾次API更新後，在處理 SKOrderLib 時，發現愈來愈多使用
&lt;code&gt;comtypes&lt;/code&gt;
包裝後功能不完善，一些事件無法正常運作。因此，我嘗試使用&amp;nbsp;&lt;code&gt;pythonnet&lt;/code&gt;
來包裝 SKCOM API (&lt;a href=&quot;https://easontseng.blogspot.com/2023/02/pythonnet-api.html&quot;&gt;請參考這篇&lt;/a&gt;)，結果 SKOrderLib 的功能得以順利運作。 以下是我比較 comtypes 和 pythonnet，最佳化 SKOrderLib 的實際經驗 ，用jupyter notebook來運行可以得到最好效果。&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;comtypes 範例&lt;/h4&gt;
&lt;p&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;很多功能呼叫後都沒有回應，向是 GetRealBalaceReport, GetMarginPurchaseAmountLimit 等，重複呼叫
  GetRealBalaceReport，甚至只會顯示 SK_ERROR_QUERY_IN_PROCESSING,
  不論是間隔多久，都不會再回傳正確資料。&lt;/span&gt;&lt;/p&gt;

&lt;style&gt;
  /* Dark theme for GitHub Gists */
  @import url(&#39;https://cdn.rawgit.com/lonekorean/gist-syntax-themes/master/themes/monokai.css&#39;);

  @import url(&#39;https://fonts.googleapis.com/css?family=Open+Sans&#39;);
  body {
    font: 16px &#39;Open Sans&#39;, sans-serif;
  }
  body .gist {
    border: 1px solid #555;
    border-radius: 6px;
    margin: 1em 0;
  }
  body .gist .gist-file {
    border: none;
    background-color: #272822;
  }
  body .gist .gist-data {
    background-color: #272822;
    border: none;
  }
  body .gist .gist-meta {
    background-color: #2d2d2d;
    color: #fff;
    padding: 10px;
  }
  body .gist .gist-meta a {
    color: #66d9ef;
  }
  body .gist .blob-code {
    color: #f8f8f2;
  }
  body .gist .gist-data .pl-s .pl-s1 {
    color: #a5c261
  }
&lt;/style&gt; 
  
&lt;p&gt;
  &lt;!--Second Gist--&gt;
  &lt;/p&gt;&lt;div class=&quot;gist-wrapper&quot;&gt;
    &lt;script src=&quot;https://gist.github.com/yijhan/6eeb1fb80b012a79d40ef18a195bae91.js&quot;&gt;&lt;/script&gt;  
  &lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
    
&lt;h4 style=&quot;text-align: left;&quot;&gt;pythonnet範例&lt;/h4&gt;
&lt;p&gt;
  &lt;!--Second Gist--&gt;
  &lt;/p&gt;&lt;div class=&quot;gist-wrapper&quot;&gt;
    &lt;script src=&quot;https://gist.github.com/yijhan/60edce5cec45110997955e666656fcb3.js&quot;&gt;&lt;/script&gt;
  &lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/5627854855731150311/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2025/04/pythonnet-skorderlib.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5627854855731150311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5627854855731150311'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2025/04/pythonnet-skorderlib.html' title='用 pythonnet 重塑群益 SKOrderLib，提升功能完整性'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgEPyMNQhV8X3Zs5PGRpeZgxIZVqGsNBjmIFF2PrG6lNR28dYZDHEfuxc-tkJUIB43mpmAZjx4SPpkz4j6TLIFnqUH0471x_cO8iGeQ6HKKvnLEncJO3FBbnFzT2tGBjkYxC9cuEJWlR4g8ZLY9Cruau9h2yAS2EjsvAUFv9ZGNk8At0MQFKwN0dIGF7zI=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-2081372229551617924</id><published>2024-09-13T17:52:00.006+08:00</published><updated>2024-09-13T17:56:53.739+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="#期貨權益"/><category scheme="http://www.blogger.com/atom/ns#" term="#群益API"/><title type='text'>範例 期貨權益 </title><content type='html'>&lt;p&gt;取得期貨權益並存入excel中&lt;/p&gt;&lt;p&gt;使用 &lt;a href=&quot;https://github.com/yijhan/skcom_api_python_unofficial_example/blob/cf26f7bf080a2271a156d9cc01e1ae80dd6050eb/%E7%AF%84%E4%BE%8B_%E6%9C%9F%E8%B2%A8%E6%AC%8A%E7%9B%8A_FutureRight.ipynb&quot;&gt;jupyterlab 範例&lt;/a&gt;，&lt;/p&gt;&lt;p&gt;使用 python script 範例&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/yijhan/87737a41295ea15cdd2078eec3ce52df.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/2081372229551617924/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2024/09/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/2081372229551617924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/2081372229551617924'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2024/09/blog-post.html' title='範例 期貨權益 '/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-6367024652049856553</id><published>2023-03-23T11:40:00.004+08:00</published><updated>2023-03-23T11:57:14.042+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jupyterlab"/><title type='text'>修改 jupyterlab notebooks 起始位置</title><content type='html'>久久用一次，但常忘記，所以紀錄一下&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;打開 cmd prompt，並執行 jupyter notebook --generate-config&lt;br /&gt;&amp;nbsp;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_LAUM5K2PqWPrz_FEisavtN0Djhb8zfwMdj2qq7rP5HYsgQH-7GfDoc7fPsVTbvENLK5sA6kvzJjv8iPsL9dRqrFxh9UCevK34fIcyHTKa2k4xnOmoWPAMTxHhdb_j0dB2scDp1EX3NnXGPWDJ8q7aMcidDRX-M_e69LTVGr3HULqKzcSkEUxn7B8/s984/jupyter1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;192&quot; data-original-width=&quot;984&quot; height=&quot;78&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_LAUM5K2PqWPrz_FEisavtN0Djhb8zfwMdj2qq7rP5HYsgQH-7GfDoc7fPsVTbvENLK5sA6kvzJjv8iPsL9dRqrFxh9UCevK34fIcyHTKa2k4xnOmoWPAMTxHhdb_j0dB2scDp1EX3NnXGPWDJ8q7aMcidDRX-M_e69LTVGr3HULqKzcSkEUxn7B8/w400-h78/jupyter1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;會產生一個&amp;nbsp; jupyter_notebook_config.py 檔案。 也會告知你存放的路徑，類似&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;D:\python\WPy64-31090\python-3.10.9.amd64\etc\jupyter\jupyter_notebook_config.py&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;用文字編輯器開啟它&lt;br /&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;尋找檔案內這行 #c.NotebookApp.notebook_dir = &#39;&#39;&amp;nbsp;&lt;br /&gt;移除井字號, 將單引號內輸入你想要的目錄位置，&lt;br /&gt;例如:
	c.NotebookApp.notebook_dir = &quot;D:/python/notebooks/&quot;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguyD1wtiQdl5Mp3LwCY5qKL09BqXfzIPjDrpGH1uhaL6KJiYkaWQjB-4aMF75yZfcqvZXaL4vi-GUHj4wzTVmG36DOtbLrSnJOR0kxQe0lVEAQOtC2qarIU5WZ7D_RgMFQFB12CsPr9XuRFVlqKHW1YL7B36Kw1MNf5WXae7Zw7eJbg2-SYDp-lGT5/s817/jupyter2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;359&quot; data-original-width=&quot;817&quot; height=&quot;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguyD1wtiQdl5Mp3LwCY5qKL09BqXfzIPjDrpGH1uhaL6KJiYkaWQjB-4aMF75yZfcqvZXaL4vi-GUHj4wzTVmG36DOtbLrSnJOR0kxQe0lVEAQOtC2qarIU5WZ7D_RgMFQFB12CsPr9XuRFVlqKHW1YL7B36Kw1MNf5WXae7Zw7eJbg2-SYDp-lGT5/w400-h176/jupyter2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;重新啟動 jupyter lab 後，起始位置就會改成您指定的目錄&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;參考:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;&quot;&gt;https://shanyitan.medium.com/how-to-change-the-working-directory-of-jupyter-and-jupyter-lab-on-windows-environment-bbe5a5a99f05&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/6367024652049856553/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2023/03/jupyterlab-notebooks.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/6367024652049856553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/6367024652049856553'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2023/03/jupyterlab-notebooks.html' title='修改 jupyterlab notebooks 起始位置'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_LAUM5K2PqWPrz_FEisavtN0Djhb8zfwMdj2qq7rP5HYsgQH-7GfDoc7fPsVTbvENLK5sA6kvzJjv8iPsL9dRqrFxh9UCevK34fIcyHTKa2k4xnOmoWPAMTxHhdb_j0dB2scDp1EX3NnXGPWDJ8q7aMcidDRX-M_e69LTVGr3HULqKzcSkEUxn7B8/s72-w400-h78-c/jupyter1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-718159508448024617</id><published>2023-02-20T16:46:00.011+08:00</published><updated>2023-03-06T17:05:55.947+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PYTHONNET"/><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><title type='text'>使用 pythonnet 呼叫群益api</title><content type='html'>&lt;p&gt;
  &amp;nbsp;多年前曾用想要用pythonnet，來載入群益的api
  ，但最後失敗了。這篇純粹是出自個人好奇，還是想了解是否能用 pythonnet 來載入
  dll，最近找到可以使用的步驟了，在windows下 python 可以呼叫群益api，讓熟悉 C#
  的開發者，又想用 python 的人多一種選擇。
&lt;/p&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; 目前使用這個方法的好處:&lt;/h4&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
  &lt;li&gt;
    在 juypterlab 下，可以顯示各個 function 參數有哪些，減少一直翻手冊的時間。
  &lt;/li&gt;
  &lt;li&gt;callback 部屬比較直覺快速，但也因此比較冗長。&lt;/li&gt;
  &lt;li&gt;
    熟悉 C# 的人，可以加入 C# 相關的 reference, namespace 當作 python
    的模組來使用。
  &lt;/li&gt;
  &lt;li&gt;其他券商的 dll 檔，也有機會用這套方法來呼叫?&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;壞處:&lt;/h4&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
  &lt;li&gt;
    目前遇到狀況是 callback 出現錯誤時，python沒有任何錯誤通知，除錯比較麻煩。
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;我的安裝環境:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
  &lt;li&gt;windows 10,&amp;nbsp;&lt;/li&gt;
  &lt;li&gt;我使用的是python 3.10.5&amp;nbsp;&lt;/li&gt;
  &lt;li&gt;visual studio 2022 (只是為了使用它的 tlbimp.exe)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;前置工作&lt;/h3&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
  1. 用 tlbimp.exe 將 SKCOM.dll 轉成 &amp;nbsp;Type library
&lt;/h4&gt;
&lt;p&gt;
  &amp;nbsp; &amp;nbsp; 要先將群益的SKCOM.dll 轉成 &amp;nbsp;Type library，我有安裝 visual
  studio 2022，利用它附帶的 comandline prompt terminal ，下指令 tlbimp.exe 將
  SKCOM.dll 轉成 typelib 形式，最終產生 SKCOMLib.dll 的檔案。之後就可以輕鬆用
  pythonnet 的 clr 模組取用。
&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCB0ZQveqH3pPyYOKWc9puBrFnCjTxC_u6WaK5WvDvS1F90NCMyqPAO2eLbo0Fgh7dAntJvPdRA0IHvOUMw3oxJpyIgWLfUsIkIq62wmCFQ8ibnXMZMC_tauyHftzcd1k9VpgEqIqkEaa1epDDmviamqkwMQ4QVdFdgHeG-8DIuLwlfzpWQfJD-j7E/s968/vs%202022%20convert%20dll%20to%20tlb.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;574&quot; data-original-width=&quot;968&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCB0ZQveqH3pPyYOKWc9puBrFnCjTxC_u6WaK5WvDvS1F90NCMyqPAO2eLbo0Fgh7dAntJvPdRA0IHvOUMw3oxJpyIgWLfUsIkIq62wmCFQ8ibnXMZMC_tauyHftzcd1k9VpgEqIqkEaa1epDDmviamqkwMQ4QVdFdgHeG-8DIuLwlfzpWQfJD-j7E/w501-h297/vs%202022%20convert%20dll%20to%20tlb.png&quot; title=&quot;用tlbimp 將 SKCOM.dll 轉換為 type library&quot; width=&quot;501&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;2. 安裝 pythonnet&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
  &amp;nbsp; &amp;nbsp; Python.NET 模組可以讓 python 使用者無縫整合 .NET Common Language
  Runtime (CLR)。它讓 Python 可以跟 CLR 互動, 甚至也可以反過來將 Python 包進
  .NET 裡.
&lt;/div&gt;
&lt;div&gt;
  &amp;nbsp; &amp;nbsp; 在你的 python 環境下用 pip 安裝 pythonnet 即可。詳細操作請看
  &lt;a href=&quot;https://github.com/pythonnet/pythonnet&quot;&gt;pythonnet 官網&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;
  &lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;pip install pythonnet&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;使用 pythonnet 的 clr 模組呼叫 SKCOMAPI&lt;/h3&gt;
&lt;div&gt;
  &lt;a href=&quot;https://github.com/yijhan/skcom_api_python_unofficial_example/blob/main/pythonnet_clr_%E6%93%8D%E4%BD%9Cskcomapi%E7%AF%84%E4%BE%8B.ipynb&quot;&gt;Jupyter Notebook範例&lt;/a&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;https://gist.github.com/yijhan/8ec6d4e05b017e673a4bf1ac72828139&quot;&gt;範例.py&lt;/a&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/yijhan/8ec6d4e05b017e673a4bf1ac72828139.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/718159508448024617/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2023/02/pythonnet-api.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/718159508448024617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/718159508448024617'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2023/02/pythonnet-api.html' title='使用 pythonnet 呼叫群益api'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCB0ZQveqH3pPyYOKWc9puBrFnCjTxC_u6WaK5WvDvS1F90NCMyqPAO2eLbo0Fgh7dAntJvPdRA0IHvOUMw3oxJpyIgWLfUsIkIq62wmCFQ8ibnXMZMC_tauyHftzcd1k9VpgEqIqkEaa1epDDmviamqkwMQ4QVdFdgHeG-8DIuLwlfzpWQfJD-j7E/s72-w501-h297-c/vs%202022%20convert%20dll%20to%20tlb.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-7311385125438843119</id><published>2022-11-14T17:44:00.005+08:00</published><updated>2023-03-13T13:24:00.111+08:00</updated><title type='text'>群益海期 tick 報價範例</title><content type='html'>&lt;p&gt;&amp;nbsp;群益海期 ticks 報價範例，本範例直接在 OnNotifyTicksNineDigitLONG, OnNotifyHistoryTicksNineDigitLONG 裡做一些資料處理，當海期報價資料量很大的時候，處理速度變很慢，kline 轉換也有點慢，日後都還需要改進，朋友呀，如果有什麼更快的方法請教教我。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Notebook 範例版&amp;nbsp;&lt;a href=&quot;https://github.com/yijhan/skcom_api_python_unofficial_example/blob/f23ba691dee9f1fb2b00f04c8204ee15edd74bd9/%E7%BE%A4%E7%9B%8A%E6%B5%B7%E6%9C%9F%20tick%20%E5%A0%B1%E5%83%B9%E7%AF%84%E4%BE%8B.ipynb&quot;&gt;jupyter notebook&amp;nbsp;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/yijhan/bb193970615532ce46aaf2d72352179a&quot;&gt;範例.py &lt;/a&gt;&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/yijhan/bb193970615532ce46aaf2d72352179a.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/7311385125438843119/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2022/11/tick.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/7311385125438843119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/7311385125438843119'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2022/11/tick.html' title='群益海期 tick 報價範例'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-8897102718532603252</id><published>2022-05-09T17:05:00.008+08:00</published><updated>2022-12-21T16:38:12.763+08:00</updated><title type='text'>群益 skcom api 海期報價、下單及回報範例</title><content type='html'>&lt;p&gt;群益海期報價跟下單跟api手冊上寫的有點出入，手冊也沒有明確表示下單的流程，經過一番試誤，可以報價也可以下單了。實在是太少碰海期相關的 api，每次想用的時候都重新經歷一次錯誤，因此寫下來留個紀錄好參考。真的很少用，可能有不少地雷，因此僅供參考，也歡迎大家分享曾經遇過的問題。&lt;/p&gt;&lt;p&gt;幾個容易有錯誤的地方&lt;/p&gt;&lt;p&gt;1. 海期商品與交易所的報價代號跟下單代號有些是不同的，請用&amp;nbsp;GetOverseaProductDetail 來查詢正確代號。&lt;/p&gt;&lt;p&gt;2. 報價代碼寫法是&amp;nbsp; &quot;交易所代碼1,商品代碼1#交易所代碼2,商品代碼2&quot;， 不同商品間以#字號隔開&lt;/p&gt;&lt;p&gt;3. 海期商品連線報價主機後，只會回應 3001，之後即可查詢報價&lt;/p&gt;&lt;p&gt;3. 海期委託單物件填寫商品代碼跟 GetOverseaProductDetail 查詢的稍有出入，需要加工處理。例如微型小道瓊下單代碼為 MYM_202206，填入委託單物件時事拆成兩個參數，要分別填入商品代碼及年月, 如 bstrStockNo = &quot;MYM&quot; 及 bstrYearMonth = &quot;202206&quot;&lt;/p&gt;&lt;p&gt;4. 要能下單要有幾項前置作業， SKOrderLib_Initialize &amp;gt;&amp;gt;&amp;nbsp;ReadCertByID &amp;gt;&amp;gt;&amp;nbsp;GetUserAccount &amp;gt;&amp;gt;&amp;nbsp;SKOrderLib_LoadOSCommodity&lt;/p&gt;&lt;p&gt;5. &quot;期貨API下單同意書&quot;要記得簽，才能進行海期報價，我都用手機掌中財神 app，下方有個同意書專區，把裡面能簽的都簽了。&lt;/p&gt;&lt;p&gt;6. 有網友詢問如何使用&amp;nbsp;GetOverSeaFutureOpenInterestGW，手冊寫經由 OnOverSeaFutureOpenInterestGW 回報，測試後發現並沒有反應。深查後發現手冊坑人，原來是經由&amp;nbsp;OnOFOpenInterestGWReport 來做回報，也一併加入本範例供參考。&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Notebook 範例版&amp;nbsp;&lt;a href=&quot;https://github.com/yijhan/skcom_api_python_unofficial_example/blob/main/skcom_%E6%B5%B7%E6%9C%9F%E5%A0%B1%E5%83%B9_%E4%B8%8B%E5%96%AE_%E5%9B%9E%E5%A0%B1%E7%AF%84%E4%BE%8B.ipynb&quot;&gt;jupyter notebook&amp;nbsp;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;py 範例版，僅在 spyder IDE 下測試過&lt;/p&gt;


&lt;script src=&quot;https://gist.github.com/yijhan/2ac7d3fe571d0c319514d007a1a55bee.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/8897102718532603252/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2022/05/skcom-api.html#comment-form' title='25 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/8897102718532603252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/8897102718532603252'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2022/05/skcom-api.html' title='群益 skcom api 海期報價、下單及回報範例'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>25</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-7254055557806062293</id><published>2022-03-07T12:40:00.002+08:00</published><updated>2022-03-07T12:40:25.445+08:00</updated><title type='text'>最近留言區被機器人進駐，有問題請到FB版上提問</title><content type='html'>&lt;p&gt;&amp;nbsp;最近留言區被機器人進駐，會重複發一些垃圾留言，先暫停留言功能，有問題請到FB版上提問&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.facebook.com/groups/1805224676441902/&quot;&gt;FB連結&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/7254055557806062293/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2022/03/fb.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/7254055557806062293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/7254055557806062293'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2022/03/fb.html' title='最近留言區被機器人進駐，有問題請到FB版上提問'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-8097163122605655429</id><published>2021-11-02T12:11:00.001+08:00</published><updated>2021-11-02T12:11:23.365+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jupyter"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualenv"/><title type='text'>Add Virtual Environment to Jupyter Notebook</title><content type='html'>&lt;p&gt;
  確認有安裝 ipykernel 後，terminal 下移動到新建的虛擬環境資料夾下，例如 my_env_name 
  執行下列指令: &lt;/p&gt;
&lt;p&gt;
  &lt;mark class=&quot;rs rt en&quot; data-darkreader-inline-bgcolor=&quot;&quot; data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #191b1c; --darkreader-inline-color: currentcolor; background-color: #1f2123; box-sizing: inherit; color: currentcolor; cursor: pointer; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;&quot;&gt;python -m ipykernel install --user --name=&lt;/mark&gt;&lt;span data-darkreader-inline-bgcolor=&quot;&quot; data-darkreader-inline-color=&quot;&quot; style=&quot;--darkreader-inline-bgcolor: #191b1c; --darkreader-inline-color: #c6c1b9; background-color: #1f2223; color: #cecac3; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.352px; white-space: pre-wrap;&quot;&gt;&amp;lt;my_env_name&amp;gt;&lt;/span&gt;
&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;
  ref: &lt;a href=&quot;https://towardsdatascience.com/create-virtual-environment-using-virtualenv-and-add-it-to-jupyter-notebook-6e1bf4e03415&quot;&gt;Create Virtual Environment using “virtualenv” and add it to Jupyter Notebook | by B. Chen | Towards Data Science&lt;/a&gt;
&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/8097163122605655429/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2021/11/add-virtual-environment-to-jupyter.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/8097163122605655429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/8097163122605655429'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2021/11/add-virtual-environment-to-jupyter.html' title='Add Virtual Environment to Jupyter Notebook'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-5362580128315536785</id><published>2021-10-06T16:12:00.002+08:00</published><updated>2023-06-05T10:46:43.302+08:00</updated><title type='text'>群益API SKReplyLib  回報 OnNewData 範例</title><content type='html'>&lt;div&gt;現在沒有模擬單帳號可以測試了，因此我用群益下單軟體，下了個很遠不會成交的單子當作委託測試單。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;另外最近 jupyter lab 開發不知道為什麼當我使用 %matplotlib auto 的 magic function時，會使整個notebook 當機，因此用 asyncio 自製了一個簡易的 event loop 來定時 pump event&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
ref:&lt;div&gt;jupyter跑 asyncio 的用法&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://nocomplexity.com/documents/jupyterlab/tip-asyncio.html&quot;&gt;Running asyncio — Mastering JupyterLab (nocomplexity.com)&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;div&gt;範例&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/yijhan/3f591809f73f2faddb9911299eb413f9.js&quot;&gt;&lt;/script&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;div&gt;結果&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX93gGq6NERqiq4zJhnOMbD-M95nH6sI2CHKz_KirInVWXmUKtfB1Cgp4YbWAoxcyvn3KsAqggUR2f-RLTQz5Bg5qp60MOWDVoAeIdG9nstFH7-wOJLvOR4FH1z3hdI2ILtnnsLEueCmk/s1083/skR_results.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;316&quot; data-original-width=&quot;1083&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX93gGq6NERqiq4zJhnOMbD-M95nH6sI2CHKz_KirInVWXmUKtfB1Cgp4YbWAoxcyvn3KsAqggUR2f-RLTQz5Bg5qp60MOWDVoAeIdG9nstFH7-wOJLvOR4FH1z3hdI2ILtnnsLEueCmk/w640-h187/skR_results.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/5362580128315536785/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2021/10/api-skreplylib-onnewdata.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5362580128315536785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5362580128315536785'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2021/10/api-skreplylib-onnewdata.html' title='群益API SKReplyLib  回報 OnNewData 範例'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX93gGq6NERqiq4zJhnOMbD-M95nH6sI2CHKz_KirInVWXmUKtfB1Cgp4YbWAoxcyvn3KsAqggUR2f-RLTQz5Bg5qp60MOWDVoAeIdG9nstFH7-wOJLvOR4FH1z3hdI2ILtnnsLEueCmk/s72-w640-h187-c/skR_results.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-7579218398313690915</id><published>2020-06-24T00:14:00.006+08:00</published><updated>2021-01-05T09:41:43.238+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="pythoncom"/><category scheme="http://www.blogger.com/atom/ns#" term="pywin32"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><title type='text'>在 linux 下使用wine python 串接群益 SKCOM API</title><content type='html'>&lt;div&gt;&lt;h3&gt;&lt;div&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 群益api 是使用 windows 的 COM 技術，在 linux 下要靠 wine 來模擬 windows 的環境。wine 要使用 32 bit 的相容性比較好，因此本篇 linux 系統 , python, skcom.dll 皆是使用 32 bit版。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;操作概念是 在 linux 下裝 wine 註冊 SKCOM.dll, 用 wine 安裝 windows 版本的 python,&amp;nbsp; 再用這個windows 版的 python 安裝 comtypes, pywin32 等套件來使用 skcom。 整個環境會是在 wine 底下執行的，操作起來還是有點隔閡，不是很順暢，我也還在摸索&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;linux 我使用 lubuntu 18.04 alternative-i386 這個桌面版本, 執行Wine時建議是要在有XWindow的環境下執行，安裝一些 windows 程式，會需要 GUI 的操作&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;linux wine 的安裝跟使用是參考這兩篇, 研究的超仔細，大推!!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;a href=&quot;https://hackmd.io/dhU67tClQCeuL36-8NztLA&quot;&gt;wine, winetrick 安裝&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;a href=&quot;https://hackmd.io/Tz2YYvOLTyG9FU0skkWs-Q&quot;&gt;wine 使用 SKCOM api&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;安裝 wine, winetricks&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;建議使用32位元的作業系統來安裝Wine，因為Wine目前64位元的支援很差，它主要是以執行32位元的Windows程式為主！&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;建議是透過compile Wine原始碼的方式來安裝Wine，也是為了避免32位元的函式庫裝得不夠完整！&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;winetricks 可以幫助安裝 VC++ runtime 2010 ，註冊 SKCOM.dll 時需要用到&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;剛裝好的 lubuntu 環境，把 apt 更新至最新，並裝下列開發套件，編譯 Wine 需要用到&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;font face=&quot;helvetica&quot;&gt;$ sudo apt update; apt upgrade&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;font face=&quot;helvetica&quot;&gt;$ sudo apt install openssh-client openssh-server vim software-properties-common gcc g++ vim subversion automake autoconf perl patch build-essential libtool doxygen bison flex zlib1g-dev gperf tofrodos wget curl screen git samba vsftpd bash-completion ftp colordiff libkrb5-dev rar unrar unzip vnstat libssl-dev&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;補足所需的套件&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ time apt install gnome-devel libx11-dev flex bison qt5-qmake libjpeg-dev libxslt1-dev libglu1-mesa-dev freeglut3-dev prelink libasound2-dev libfreetype6-dev libpng-dev libxml2-dev libxrender-dev libgl1-mesa-dev libgphoto2-dev libmpg123-dev libtiff-dev libpulse-dev liblcms2-dev libcapi20-dev libldap-dev libopenal-dev libv4l-dev libsane-dev libcups2-dev libgsm1-dev libosmesa6-dev libgnutls28-dev libpcap0.8-dev oss4-dev libcdk5-dev libgstreamer-plugins-base1.0-dev libarrayfire-opencl-dev&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ time apt install libsdl2-dev libvulkan-dev&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;清除一下apt-get抓下來的殘餘檔&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ apt clean&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;用root帳號登入&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;先把Wine的git repository上的code拉下來！&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ mkdir -pv /root/packages ; cd /root/packages&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ time git clone https://github.com/wine-mirror/wine&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;檢查套件是否足夠&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ cd ./wine&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ ./configure&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&amp;nbsp;#訊息大概剩下下面這樣，就差不多了。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;configure: MinGW compiler not found, cross-compiling PE files won&#39;t be supported.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;configure: libhal development files not found, no legacy dynamic device support.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;configure: libFAudio development files not found, XAudio2 won&#39;t be supported.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;configure: vkd3d development files not found (or too old), Direct3D 12 won&#39;t be supported.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;接下來編譯並且安裝！編譯會花大約40-60分鐘&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ time make&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ time make install&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;接下來安裝winetricks！直接從github wget下來就可以用了！&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ mkdir -pv /opt/bin ; cd /opt/bin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ chmod +x ./winetricks&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ ./winetricks -V&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;#檢查版本，出現下列訊息就沒問題了&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;20190615-next - sha256sum: 47304e177f259d6f9c05af01ab42c06531fd8a9716e2751d2fadcd664130feea&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;Wine 使用 SKCOM api&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;設定Wine的windows環境，&lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;在 XWindow環境下。第一次使用須初始化一個windows 環境，打開Terminal，執行以下指令以設定Wine的環境！我的環境是建立在 ~./home/使用者/.wine 下，.wine 就是windows 虛擬的系統，底下有個 drive_c 資料夾，等於 C:\&amp;nbsp; 槽&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ wineboot&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;群益API的SKCOM.dll檔需要 VC++ 2010可轉散發套件, 可透過winetricks來安裝 vcrun2010&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ winetricks vcrun2010　&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;下載群益API，將API 資料夾 CapitalAPI_2.13.22 下的x86 資料夾搬到&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;~/.wine/drive_c/skcom/x86&amp;nbsp; 這等於是存在 windows 的 C:\\skcom\\x86, 之後使用python 呼叫會方便一點&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;cd 到　~/.wine/drive_c/skcom/x86資料夾下，執行以下指令以註冊群益API：&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ regsvr32 ./SKCOM.dll&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;drive_c 下路徑的內容，skcom, python, strategy 是我自己創建的，資料夾名稱不要有空格，減少麻煩&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT08hKizWjZAVtUO3SIoAdW8sBgxk0HfWdpZSCDULw0yBKfIOPL6hrdd9Z4AXKo75saaHRtUZ03xDkjNnUIFF5golcw8f9PzzpNgZHa04Sp0MPCCPGZ3Kg3-9ycC1Jlb5w8aKSTqs4qvk/s803/drive_c%25E7%259B%25B8%25E5%25B0%258D%25E8%25B7%25AF%25E5%25BE%2591.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;392&quot; data-original-width=&quot;803&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT08hKizWjZAVtUO3SIoAdW8sBgxk0HfWdpZSCDULw0yBKfIOPL6hrdd9Z4AXKo75saaHRtUZ03xDkjNnUIFF5golcw8f9PzzpNgZHa04Sp0MPCCPGZ3Kg3-9ycC1Jlb5w8aKSTqs4qvk/s320/drive_c%25E7%259B%25B8%25E5%25B0%258D%25E8%25B7%25AF%25E5%25BE%2591.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;wine下的 python環境&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;用wine 來安裝 windows版的 python&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;到 python 官網，我選了 Python3.8.3 的 Windows x86 executable installer　這個版本下載&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;我有嘗試使用miniconda，但 conda 或 pip 位置不在預設路徑上，我搞不定，導致python套件裝不起來　&lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;　&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;div style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;#使用 wine安裝windows版的python&lt;/span&gt;&lt;/div&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;span&gt;會有GUI跳出，可將python裝在 C:\\python 路徑下&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ wine python-3.8.3.exe&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;span&gt;#安裝 comtypes 及 pywin32　套件，&lt;/span&gt;&lt;span&gt;其他python套件也可以如此安裝&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ wine pip install comtypes pywine32&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;wine的windows版的 python 環境建置完成，可以開始 CODING!!&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&amp;nbsp;wine python&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;font size=&quot;3&quot;&gt;&lt;span&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBLzaIa8_QbhrNfqw4uIa3Im_FRk1y_fPTofC5otLHRmzS6_AnGC3kffyemxdrjqrlxMYDkruWAVD2qK8q0EFcZszr8DssoxIUDAeveZtccutuKCsaXM2JB2ZpldZ0KAP9errqV5hT-hg/s590/wine_python.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;228&quot; data-original-width=&quot;590&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBLzaIa8_QbhrNfqw4uIa3Im_FRk1y_fPTofC5otLHRmzS6_AnGC3kffyemxdrjqrlxMYDkruWAVD2qK8q0EFcZszr8DssoxIUDAeveZtccutuKCsaXM2JB2ZpldZ0KAP9errqV5hT-hg/s320/wine_python.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;將寫好的 Script.py 交由 window python 執行, 要加wine 不然會呼叫到 linux系統下的 python, 兩個系統還是不相容的&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;$ wine python Script.py&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size=&quot;3&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;附上 Script.py 的內容&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size=&quot;3&quot;&gt;&lt;span style=&quot;font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.15;&quot;&gt;&lt;pre style=&quot;background-color: #272822; border: 0px; color: #f8f8f2; font-family: bitstreamverasansmonoroman; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; line-height: 1; margin-bottom: 0px; margin-top: 0px; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-style: inherit; font-weight: inherit; line-height: 1; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #272822; border: 0px; color: #f8f8f2; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; line-height: 1.15; margin-bottom: 0px; margin-top: 0px; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;font face=&quot;helvetica&quot; size=&quot;2&quot; style=&quot;line-height: 1.15;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pythoncom&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;os&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.client&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#第一次使用需要將 SKCOM 包成python 的package&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#SKCOM.dll 在linux 下，我是放在 ~./home/yi/.wine/driv_c/skcom/x86/SKCOM.dll&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#但在 wine 下，是放在下列路徑， drive_c 就是windows的C槽&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;C:&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skcom\x86\SKCOM.dll&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#GetModule會在comtypes.gen 下產生 SKCOMLib package, 之後就用下面方式引用&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.gen.SKCOMLib&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#建立COM物件&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skC&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skQ&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKQuoteLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKQuoteLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skR&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKReplyLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKReplyLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#輸入身分證與密碼&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#股票代號&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strStock&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;TX00&quot;&lt;/span&gt; 

&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;())[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;ID &amp;amp; PW entered&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#建立事件類別&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;                                
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnConnection&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;OnConnection&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3003&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#nKind==3003 表連線報價主機就緒&lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;quoate server connected..., nkind= &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ncode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKQuoteLib_RequestStocks&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strStock&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ncode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strStock&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;requested&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;    
    
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnNotifyQuote&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sMarket&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sIndex&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKSTOCK&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKQuoteLib_GetStockByIndex&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sMarket&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sIndex&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrStockName&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrStockNo&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nClose&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ts&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sDecimal&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
    
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnReplyMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrUserID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sConfirmCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mh&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0xFFFF&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;OnReplyMessage&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sConfirmCode&lt;/span&gt;
                            
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Event sink, 事件實體  &lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventQ&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventR&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#make connection to event sink&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ConnectionQ&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventQ&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #272822; border: 0px; color: #f8f8f2; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; line-height: 1.15; margin-bottom: 0px; margin-top: 0px; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;font face=&quot;helvetica&quot; size=&quot;2&quot; style=&quot;line-height: 1.15;&quot;&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ConnectionR&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventR&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;vm&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;__name__&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;__main__&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#登入&lt;/span&gt;
    &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_Login&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Login,&quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#連線報價主機&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;{datetime.now()}, EnterMonitor,&quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKQuoteLib_EnterMonitor&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()))&lt;/span&gt;
    &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;# Event loop, 持續檢查有沒有event產生&lt;/span&gt;
    &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pythoncom&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PumpMessages&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; line-height: 1.15; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #272822; border: 0px; color: #f8f8f2; font-family: bitstreamverasansmonoroman; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 400; line-height: 1.15; margin-bottom: 0px; margin-top: 0px; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; line-height: 1; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;輸出結果，大概類似下圖，夾雜很多 fixme的警告，但不影響使用&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4MJKhNTUKjsG2vmIULYwxnc-xmMs8SqLavY_kj439Op5B__swalOtW1s2BMrruZ1FtpIM8dc_3XRJlqPdfqFgI09WHRna8g4f7cQEOGarBrt80f1JC1JF843SfMosTyP2OVsCI5Ey_ns/s612/Lubuntu_sk_test1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;612&quot; data-original-width=&quot;504&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4MJKhNTUKjsG2vmIULYwxnc-xmMs8SqLavY_kj439Op5B__swalOtW1s2BMrruZ1FtpIM8dc_3XRJlqPdfqFgI09WHRna8g4f7cQEOGarBrt80f1JC1JF843SfMosTyP2OVsCI5Ey_ns/s320/Lubuntu_sk_test1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2F4jrvBso0z97eO7C_8IQlKy1cow62TewZo7aM0CaXiY9zK6YOKPwFsRw9FURGioxeV2nrBKdnh2KYxNsO_6NgxIafn71cvrMOZJCQ64Qb2AMEAQzryS7xYq4dFk80TH8j9pTIetzkGQ/s627/Lubuntu_sk_test.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;627&quot; data-original-width=&quot;531&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2F4jrvBso0z97eO7C_8IQlKy1cow62TewZo7aM0CaXiY9zK6YOKPwFsRw9FURGioxeV2nrBKdnh2KYxNsO_6NgxIafn71cvrMOZJCQ64Qb2AMEAQzryS7xYq4dFk80TH8j9pTIetzkGQ/s320/Lubuntu_sk_test.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/7579218398313690915/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2020/06/linux-wine-python-skcom-api.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/7579218398313690915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/7579218398313690915'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2020/06/linux-wine-python-skcom-api.html' title='在 linux 下使用wine python 串接群益 SKCOM API'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT08hKizWjZAVtUO3SIoAdW8sBgxk0HfWdpZSCDULw0yBKfIOPL6hrdd9Z4AXKo75saaHRtUZ03xDkjNnUIFF5golcw8f9PzzpNgZHa04Sp0MPCCPGZ3Kg3-9ycC1Jlb5w8aKSTqs4qvk/s72-c/drive_c%25E7%259B%25B8%25E5%25B0%258D%25E8%25B7%25AF%25E5%25BE%2591.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-368407710745735954</id><published>2020-04-27T23:36:00.002+08:00</published><updated>2020-04-27T23:36:43.713+08:00</updated><title type='text'>群益API 2.13.22 登入海期報價主機錯誤</title><content type='html'>最近群益API更新，有好多小bug, 搞得好頭大...&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
用python呼叫群益API 2.13.22 登入海期報價主機發生錯誤, 會出現&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); font-family: var(--jp-code-font-family); font-size: 13px; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;span class=&quot;ansi-red-fg&quot; style=&quot;color: #e75c58; font-weight: bold;&quot;&gt;OSError&lt;/span&gt;: exception: access violation writing 0x000000000000009C&lt;/pre&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); font-family: var(--jp-code-font-family); font-size: 13px; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); font-family: var(--jp-code-font-family); font-size: 13px; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;經多方詢問後, 應該是api bug, 下個版本應該就會修正. 目前非官方的解法，創建 skcom 元件的時候，將海期及海選元件同時建立即可。目前測試可以 正常SKOSQuoate_Entermonitor(), 其他的還沒試過，給大家試試看吧。也不知道其他語言會有這個問題嗎？&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;skOSQ = CreateObject(sk.SKOSQuoteLib, interface=sk.ISKOSQuoteLib)
# 只要多下面這列就可以正常使用了
skOOQ = CreateObject(sk.SKOOQuoteLib, interface=sk.ISKOOQuoteLib)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/368407710745735954/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2020/04/api-21322.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/368407710745735954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/368407710745735954'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2020/04/api-21322.html' title='群益API 2.13.22 登入海期報價主機錯誤'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-670918995299140</id><published>2019-10-13T21:09:00.005+08:00</published><updated>2023-04-20T10:34:00.678+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><category scheme="http://www.blogger.com/atom/ns#" term="選擇權"/><title type='text'>群益api 選擇擇權代碼規則</title><content type='html'>群益API 選擇權代碼規則&lt;br /&gt;
&lt;div&gt;
感謝 FB 網友提供&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Call option : A~L代表1~12月&lt;/div&gt;
&lt;div&gt;
Put option&amp;nbsp; : M~X代表1~12月。&lt;/div&gt;
&lt;div&gt;
群益的編碼邏輯都是 TX+@+strike+$+到期年分。&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
@:&amp;nbsp; 可以是O代表一般月結算的選擇權，若以是數字則代表為 1~4 的週選。&lt;/div&gt;
&lt;div&gt;
$&amp;nbsp; : 是選擇權到期的月份，所以call跟put是不同的。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ex.&lt;/div&gt;&lt;div&gt;TXO10700L2&amp;nbsp; &amp;nbsp; &amp;nbsp;台指選, 履約價 10700,&amp;nbsp; 12 月, 2022年 的 call&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;TXO10700X2&amp;nbsp; &amp;nbsp; &amp;nbsp;台指選, 履約價 10700, 12 月, 2022年 的 put&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;TXO14800A3&amp;nbsp; &amp;nbsp; &amp;nbsp; 台指選, 履約價 14800,&amp;nbsp; 1 月, 2023年 的 call&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;TXO14800M3&amp;nbsp; &amp;nbsp; &amp;nbsp;台指選, 履約價 14800,&amp;nbsp; 1 月, 2023年 的 put&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;
TX213000L2&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;台指週選 W2, 履約價 13000,&amp;nbsp; 12 月, 2022年 的 call&lt;/div&gt;&lt;div&gt;TX213000X2&amp;nbsp; &amp;nbsp; 台指週選 W2, 履約價 13000,&amp;nbsp; 12 月, 2022年 的 put&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ref:&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=5L6B7PaHtcI&amp;amp;ab_channel=TW%E9%96%8B%E8%AC%9B%EF%BC%88%E6%A8%82%E6%B4%BB%E5%B0%8F%E5%8F%94%EF%BC%89&quot;&gt;【Python程式交易DIY 10】群益選擇權編碼原則, 開始寫最容易寫的釣魚單了.. 2022 01 12 11 07 33 - YouTube&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/670918995299140/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/10/api.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/670918995299140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/670918995299140'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/10/api.html' title='群益api 選擇擇權代碼規則'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-5178054308717945149</id><published>2019-07-27T00:34:00.001+08:00</published><updated>2022-05-24T14:27:46.365+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><title type='text'>群益API python 下單範例</title><content type='html'>今天來示範下單, 請務必搞懂每個參數後在下單喔&lt;br /&gt;
我自己不放心所以去申請了模擬平台帳號，在來試試看下單的功能，不過模擬帳號目前沒有提供夜盤的功能，就加減用吧!! &lt;a href=&quot;https://easontseng.blogspot.com/2018/05/api.html&quot;&gt;之前介紹模擬平台的文章&lt;/a&gt;，大家參考一下囉&lt;br /&gt;
模擬平台有練功跟競賽兩種帳號，我沒有研究，隨便拿一個來用&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr style=&quot;color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12px; margin: 5px 0px 10px;&quot; /&gt;
&lt;div class=&quot;syntax&quot; style=&quot;background: rgb(39, 40, 34); border: 0px; font-family: &amp;quot;helvetica neue&amp;quot;, arial, helvetica, sans-serif; font-size: 12px; margin: 0px 0px 10px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline;&quot;&gt;
&lt;div id=&quot;paste-buttons&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; position: absolute; right: 0px; top: 0px; vertical-align: baseline; z-index: 1000;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;codeview&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; overflow: auto hidden; padding: 0px; position: relative; vertical-align: baseline;&quot;&gt;
&lt;div id=&quot;lcb&quot; style=&quot;border: 0px; color: #999999; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline; width: 1322px;&quot;&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt; &lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;rcb&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px 0px 0px 40px; position: absolute; top: 0px; vertical-align: baseline; width: 1282px;&quot;&gt;
&lt;pre style=&quot;border: 0px; color: #f8f8f2; font-family: bitstreamverasansmonoroman; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.client&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;C:&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skcom&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CapitalApi_2.13.17&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;x64&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCOM.dll&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.gen.SKCOMLib&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;getpass&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#建立物件，避免重複 createObject&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#登錄物件&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skC&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#下單物件&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skO&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKOrderLib&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKOrderLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;   
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#回報物件&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skR&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKReplyLib&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKReplyLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;   

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#輸入身分證與密碼&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;ID &amp;amp; PW&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#建立事件類別             &lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fm&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TFAcc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[]&lt;/span&gt;
        
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnAccount&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrLogInID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrAccountData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strI&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrAccountData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#找出期貨帳號&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;len&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strI&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strI&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;TF&#39;&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TFAcc&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strI&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strI&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;
            
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;        
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnReplyMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrUserID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sConfirmCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mh&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0xFFFF&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;sd&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&#39;API 2.13.17 一定要返回 sConfirmCode=0xFFFF&#39;&#39;&#39;&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skR_OnReplyMessage&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sConfirmCode&lt;/span&gt;
    
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrUserID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: 0px; color: #f8f8f2; font-family: bitstreamverasansmonoroman; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;         #成交回報
        &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrOnData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strftime&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;%H:%M:%S,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strI&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;,&quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;skR_OnData&quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strI&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
                        
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnNewData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrUserID&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skR_OnNewData&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Event sink, 事件實體&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventR&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#make connection to event sink&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ConnO&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt; 
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ConnR&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventR&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt; 

&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Making event objects&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;matplotlib&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;auto&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#登入模擬帳號&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_ResetServer&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;morder1.capital.com.tw&quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;set server to morder1.capital.com.tw&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#login&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_Login&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Login&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#初始 Order 物件&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKOrderLib_Initialize&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Initialize &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#初始 Cert by ID 物件，模擬平台不需要這個，會出現錯誤&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ReadCertByID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;ReadCertByID &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Get User TF Account&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetUserAccount&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;GetUserAccount &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TFAcc&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#設定期貨單參數，請自行調整囉，注意參數的資料型別，例如 bstr開頭的是要輸入文字型態&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: 0px; color: #f8f8f2; font-family: bitstreamverasansmonoroman; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#以下請再jupyter 裡用另外一個cell 跑&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: 0px; font-family: BitstreamVeraSansMonoRoman; font-size: 1.1em; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;FUTUREORDER&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrFullAccount&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TFAcc&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#TF 帳號&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrStockNo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;MTX00&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sBuySell&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;                         &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#0 buy, 1 sell&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrPrice&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;10700&#39;&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;               &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#委託價格，「M」表示市價，{移動停損、MIT皆無須價格}&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nQty&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;                              &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#交易口數&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sDayTrade&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;                     &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#當沖0:否 1:是，可當沖商品請參考交易所規定。 &lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sNewClose&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;                     &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#新平倉，0:新倉 1:平倉 2:自動{新期貨、選擇權使用}&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sTradeType&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;                    &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#0:ROD  1:IOC  2:FOK&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sReserved&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;                     &lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#盤別，0:盤中(T盤及T+1盤)；1:T盤預約{新期貨、停損單使用}&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#下單&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SendFutureOrder&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fo&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #f8f8f2;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; color: #f8f8f2; font-family: inherit; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/5178054308717945149/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/07/api-python.html#comment-form' title='8 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5178054308717945149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5178054308717945149'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/07/api-python.html' title='群益API python 下單範例'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-987043842259360869</id><published>2019-07-10T18:36:00.000+08:00</published><updated>2019-07-10T18:41:42.643+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><category scheme="http://www.blogger.com/atom/ns#" term="群益API debug"/><title type='text'>SKQuoteLib_RequestFutureTradeInfo 出現 LP_c_short error</title><content type='html'>&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;今日測試&amp;nbsp; SKQuoteLib_RequestFutureTradeInfo(0, &#39;TX00&#39;)，出現如下 error&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); font-size: 13px; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;ansi-red-fg&quot; style=&quot;color: #e75c58; font-weight: bold;&quot;&gt;---------------------------------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;ansi-red-fg&quot; style=&quot;color: #e75c58; font-weight: bold;&quot;&gt;ArgumentError&lt;/span&gt;                             Traceback (most recent call last)
&lt;span class=&quot;ansi-green-fg&quot; style=&quot;color: #00a250; font-weight: bold;&quot;&gt;&lt;ipython-input-47-cba6c6a94016&gt;&lt;/ipython-input-47-cba6c6a94016&gt;&lt;/span&gt; in &lt;span class=&quot;ansi-cyan-fg&quot; style=&quot;color: #60c6c8;&quot;&gt;&lt;module&gt;&lt;/module&gt;&lt;/span&gt;&lt;span class=&quot;ansi-blue-fg&quot; style=&quot;color: #208ffb; font-weight: bold;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;ansi-green-fg&quot; style=&quot;color: #00a250;&quot;&gt;      1&lt;/span&gt; &lt;span class=&quot;ansi-green-fg&quot; style=&quot;color: #00a250; font-weight: bold;&quot;&gt;import&lt;/span&gt; ctypes
&lt;span class=&quot;ansi-green-fg&quot; style=&quot;color: #00a250; font-weight: bold;&quot;&gt;----&amp;gt; 2&lt;/span&gt;&lt;span class=&quot;ansi-yellow-fg&quot; style=&quot;color: #ddb62b; font-weight: bold;&quot;&gt; &lt;/span&gt;skQ&lt;span class=&quot;ansi-yellow-fg&quot; style=&quot;color: #ddb62b; font-weight: bold;&quot;&gt;.&lt;/span&gt;SKQuoteLib_RequestFutureTradeInfo&lt;span class=&quot;ansi-yellow-fg&quot; style=&quot;color: #ddb62b; font-weight: bold;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ansi-cyan-fg&quot; style=&quot;color: #60c6c8; font-weight: bold;&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;ansi-yellow-fg&quot; style=&quot;color: #ddb62b; font-weight: bold;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ansi-blue-fg&quot; style=&quot;color: #208ffb; font-weight: bold;&quot;&gt;&#39;TX12&#39;&lt;/span&gt;&lt;span class=&quot;ansi-yellow-fg&quot; style=&quot;color: #ddb62b; font-weight: bold;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;ansi-red-fg&quot; style=&quot;color: #e75c58; font-weight: bold;&quot;&gt;ArgumentError&lt;/span&gt;: argument 1: &lt;class ypeerror=&quot;&quot;&gt;: expected LP_c_short instance instead of int&lt;/class&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); font-size: 13px; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;看起來參數的型態不對，LP_c_short &amp;lt;&amp;lt; 這個看起來很像 ctypes 會遇到的東西，所以我用 ctypes 試試看，轉換型別一下&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; color: var(--jp-content-font-color1); line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;import ctypes&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;skQ.SKQuoteLib_RequestFutureTradeInfo(ctypes.c_short(0), &#39;TX00&#39;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;border: none; line-height: var(--jp-code-line-height); overflow-wrap: break-word; overflow: auto; padding: 0px; word-break: break-all;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;恩  成功了!!!&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/987043842259360869/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/07/skquotelibrequestfuturetradeinfo.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/987043842259360869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/987043842259360869'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/07/skquotelibrequestfuturetradeinfo.html' title='SKQuoteLib_RequestFutureTradeInfo 出現 LP_c_short error'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-447265260704245359</id><published>2019-07-05T14:46:00.004+08:00</published><updated>2019-10-13T21:38:58.464+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="小技巧"/><title type='text'>tick data 轉換成 k Bar</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;轉換tick資料成 k bar，做個記錄&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;有筆 tick csv 資料如下&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00Ticks.csv&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Name,nPtr,nDate,nTimehms,nTimemillismicros,nBid,nAsk,nClose,nQty&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00,119,20190624,150000,17000,10621.0,10623.0,10622.0,36&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00,120,20190624,150000,38000,10621.0,10622.0,10621.0,2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00,121,20190624,150000,167000,10620.0,10622.0,10622.0,1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00,122,20190624,150000,199000,10620.0,10621.0,10620.0,1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00,123,20190624,150000,205000,10620.0,10621.0,10620.0,1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00,124,20190624,150000,304000,10620.0,10621.0,10620.0,1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;TX00,125,20190624,150000,321000,10620.0,10621.0,10621.0,2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;pandas&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;要對一排一排的 row 做處理的話，apply 要設定 axis=1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;ref: pandas apply 的使用&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://jonathansoma.com/lede/foundations/classes/pandas%20columns%20and%20functions/apply-a-function-to-every-row-in-a-pandas-dataframe/&quot;&gt;http://jonathansoma.com/lede/foundations/classes/pandas%20columns%20and%20functions/apply-a-function-to-every-row-in-a-pandas-dataframe/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
#斬大寫得更簡單!!&amp;nbsp;&lt;a href=&quot;https://ithelp.ithome.com.tw/articles/10223693&quot;&gt;https://ithelp.ithome.com.tw/articles/10223693&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;hr style=&quot;color: #333333; font-size: 12px; margin: 5px 0px 10px;&quot; /&gt;
&lt;div class=&quot;syntax&quot; style=&quot;background: rgb(39, 40, 34); border: 0px; color: #f8f8f2; font-size: 12px; margin: 0px 0px 10px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline;&quot;&gt;
&lt;div id=&quot;paste-buttons&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; position: absolute; right: 0px; top: 0px; vertical-align: baseline; z-index: 1000;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;codeview&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; overflow: auto hidden; padding: 0px; position: relative; vertical-align: baseline;&quot;&gt;
&lt;div id=&quot;lcb&quot; style=&quot;border: 0px; color: #999999; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline; width: 1506px;&quot;&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;rcb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px 0px 0px 40px; position: absolute; top: 0px; vertical-align: baseline; width: 1466px;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pd&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pd&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;read_csv&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;TX00Ticks.csv&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#將三個column 的時間 轉成文字合併後，再用 datetime 轉成 datetime格式&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;toDatetime&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;    
    &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nDate&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39; &#39;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nTimehms&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;zfill&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39; &#39;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;row&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nTimemillismicros&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;datetime&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;strptime&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;%Y%m&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; %H%M%S &lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;%f&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;toDatetime&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;axis&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tx1k&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pd&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DataFrame&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;# 開 高 低 收 量&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;# T 是分鐘, 5分K就用 5T&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tx1k&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Open&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nClose&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;resample&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;T&#39;, label=&#39;right&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tx1k&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;High&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nClose&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;resample&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;T&#39;, label=&#39;right&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tx1k&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Low&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nClose&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;resample&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;T&#39;, label=&#39;right&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;min&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tx1k&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Close&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nClose&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;resample&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;T&#39;, label=&#39;right&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tx1k&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Volume&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tick&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;nQty&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;resample&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;T&#39;, label=&#39;right&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sum&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;border: 0px; font-family: bitstreamverasansmonoroman; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/447265260704245359/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/07/tick-data-k-bar.html#comment-form' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/447265260704245359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/447265260704245359'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/07/tick-data-k-bar.html' title='tick data 轉換成 k Bar'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-290660337835708118</id><published>2019-07-03T09:55:00.001+08:00</published><updated>2019-07-05T14:01:51.137+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><category scheme="http://www.blogger.com/atom/ns#" term="群益API 更新"/><title type='text'>群益API 更新至 2.13.17,  Login 時錯誤訊息 &quot;SK_WARNING_REGISTER_REPLYLIB_ONREPLYMESSAGE_FIRST&quot;</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;群益API 更新至 2.13.17，這版本 Login 時會要求要先看過公告的訊息&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;否則會出現錯誤訊息&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&quot;SK_WARNING_REGISTER_REPLYLIB_ONREPLYMESSAGE_FIRST&quot;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;API文件寫說:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;SKCenterLib初使化檢查是否接收SKReplyLib_OnReplyMessage公告訊息並回傳指定值VARIANT_TRUE，方可登入。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;SKReplyLib_&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;OnReplyMessage&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;文件又寫說&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;，當&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;sConfirmCode&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&amp;nbsp;回傳 VARIANT_TRUE (0xFFFF)，表示你看過公告了。官方沒附範例還真難理解要怎麼實做，一陣摸索後，寫了一個目前可以運作的版本。這更新真是擾民啊，可能要設計個介面讓人讀取公告後按確認，才能進行登入吧，我把它寫死了，固定回傳&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;0xFFFF ，也就是 VARIANT_TRUE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #272822; border: 0px; color: #f8f8f2; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.client&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sa&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;C:\SKCOM\CapitalAPI_2.13.17\x64\SKCOM.dll&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.gen.SKCOMLib&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#建立COM物件&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skC&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skQ&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKQuoteLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKQuoteLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;skR&#39;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;globals&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;():&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKReplyLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKReplyLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Configuration&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#建立事件類別&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnConnection&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3001&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;連線中, nkind= &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3003&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;連線成功, nkind= &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nKind&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnReplyMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrUserID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sConfirmCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mh&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0xFFFF&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#根據API 手冊，login 前會先檢查這個 callback, &lt;/span&gt;
        &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#要返回 VARIANT_TRUE 給 server,  表示看過公告了，我預設返回值是 0xFFFF&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;OnReplyMessage&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrUserID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sConfirmCode&lt;/span&gt;       
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Event sink, 事件實體  &lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventQ&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventR&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#make connection to event sink&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ConnQ&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skQ&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventQ&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ConnR&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skR&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventR&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Login,&quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_Login&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)))&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/290660337835708118/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/07/api-21317-login-skwarningregisterreplyl.html#comment-form' title='13 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/290660337835708118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/290660337835708118'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/07/api-21317-login-skwarningregisterreplyl.html' title='群益API 更新至 2.13.17,  Login 時錯誤訊息 &quot;SK_WARNING_REGISTER_REPLYLIB_ONREPLYMESSAGE_FIRST&quot;'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-5354458861740100456</id><published>2019-06-14T17:53:00.000+08:00</published><updated>2019-07-05T13:07:31.920+08:00</updated><title type='text'>GetFutureRight example</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;示範一下 GetFutureRight 最簡版本&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: #272822; border: 0px; color: #f8f8f2; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pythoncom&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.client&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;cc&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#import skcom package&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.gen.SKCOMLib&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Create com objects&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;cc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;cc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKOrderLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKOrderLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Order event handlers&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fm&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#TXAccount&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TXAcc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnFutureRights&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;        
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnAccount&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;LogInID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;TF&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TXAcc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;
            &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;TXAcc&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TXAcc&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#implant event instances&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#connect event to com object&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO_conn&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;cc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#輸入身分證與密碼&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Login&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_Login&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Login&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#初始 Order 物件&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKOrderLib_Initialize&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Initialize &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Get User TF Account&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetUserAccount&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;GetUserAccount &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#GetFutureRights, 不能呼叫太頻繁，不然會出現 SK_ERROR_QUERY_IN_PROCESSING&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetFutureRights&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TXAcc&lt;/span&gt; &lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;GetFutureRights &quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_GetReturnCodeMessage&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;nCode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;))&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#每秒推一次 event, 推5秒&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;pythoncom&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PumpWaitingMessages&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;time&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sleep&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#exit&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sys&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/5354458861740100456/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/06/getfutureright-example.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5354458861740100456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5354458861740100456'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/06/getfutureright-example.html' title='GetFutureRight example'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-2569148391982859197</id><published>2019-03-11T15:15:00.001+08:00</published><updated>2019-07-03T13:23:23.954+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python automation"/><category scheme="http://www.blogger.com/atom/ns#" term="小技巧"/><title type='text'>python copy file and rename</title><content type='html'>&lt;hr style=&quot;color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Arial, Helvetica, sans-serif; font-size: 12px; margin: 5px 0px 10px;&quot; /&gt;
&lt;div class=&quot;syntax&quot; style=&quot;background: rgb(39, 40, 34); border: 0px; color: #f8f8f2; font-size: 12px; margin: 0px 0px 10px; overflow: auto; padding: 0px; position: relative; vertical-align: baseline;&quot;&gt;
&lt;div id=&quot;paste-buttons&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; position: absolute; right: 0px; top: 0px; vertical-align: baseline; z-index: 1000;&quot;&gt;
&lt;img id=&quot;delete-paste&quot; src=&quot;https://assets1.ofcode.org/images/cancel.png&quot; style=&quot;border: 0px; cursor: pointer; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Delete this paste&quot; /&gt;&amp;nbsp;&lt;img id=&quot;fork-paste&quot; src=&quot;https://assets1.ofcode.org/images/edit.png&quot; style=&quot;border: 0px; cursor: pointer; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;Start a new paste with this content&quot; /&gt;&lt;/div&gt;
&lt;div id=&quot;codeview&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; overflow: hidden; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; overflow: auto hidden; padding: 0px; position: relative; vertical-align: baseline;&quot;&gt;
&lt;div id=&quot;lcb&quot; style=&quot;border: 0px; color: #999999; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline; width: 1506px;&quot;&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l0&quot; style=&quot;background-color: #23241e; border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;l1&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 10px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;rcb&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px 0px 0px 40px; position: absolute; top: 0px; vertical-align: baseline; width: 1466px;&quot;&gt;
&lt;pre style=&quot;border: 0px; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#copy file (src) and move to the destination (dst)&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;shutil&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;copyfile&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;copyfile&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;dst&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;ref:&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://stackoverflow.com/questions/123198/how-do-i-copy-a-file-in-python&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;https://stackoverflow.com/questions/123198/how-do-i-copy-a-file-in-python&lt;/span&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/2569148391982859197/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/03/python-copy-file-and-rename.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/2569148391982859197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/2569148391982859197'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/03/python-copy-file-and-rename.html' title='python copy file and rename'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-1569216035658771246</id><published>2019-01-24T09:03:00.000+08:00</published><updated>2019-05-16T17:10:05.322+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="matplotlib"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="小技巧"/><title type='text'>matplotlib label 上/下標，設置方法</title><content type='html'>下標 (subscripts) 用底線 &#39;_&#39; ，上標(superscripts) 用 &#39;^&#39; 符號，前後用 &#39;$&#39; 包起來&lt;br /&gt;
&lt;br /&gt;
例如這樣&lt;br /&gt;
&lt;br /&gt;
#下標效果&lt;br /&gt;
plt.xlabel(&#39;RR$_{n}$ (ms)&#39;, fontsize=20)&lt;br /&gt;
&lt;br /&gt;
#上標效果&lt;br /&gt;
plt.ylabel(&#39;RR$^{n+1}$ (ms)&#39;, fontsize=20)&lt;br /&gt;
&lt;br /&gt;
結果&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicLG4EiaPsTZbW8hNJ6xZUbL_eEa7-OlZpun099tQBkdAPmdfxvam4kZwPfi3wt7o5WgiyhgYwyGEeDManBlFtIi5Quinxc7AK2vNjpryYRBDNMAimOI9KSVLcYphSB61h-ZRBkhd4-4Y/s1600/sub_superscript.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;216&quot; data-original-width=&quot;216&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicLG4EiaPsTZbW8hNJ6xZUbL_eEa7-OlZpun099tQBkdAPmdfxvam4kZwPfi3wt7o5WgiyhgYwyGEeDManBlFtIi5Quinxc7AK2vNjpryYRBDNMAimOI9KSVLcYphSB61h-ZRBkhd4-4Y/s1600/sub_superscript.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
ref:&lt;br /&gt;
&lt;a href=&quot;http://blog.sina.com.cn/s/blog_4a7b9abb0102x27h.html&quot;&gt;http://blog.sina.com.cn/s/blog_4a7b9abb0102x27h.html&lt;/a&gt;&lt;br /&gt;
其他特殊符號&lt;br /&gt;
&lt;a href=&quot;https://matplotlib.org/users/mathtext.html&quot;&gt;https://matplotlib.org/users/mathtext.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/1569216035658771246/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/01/matplotlib-label.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/1569216035658771246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/1569216035658771246'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/01/matplotlib-label.html' title='matplotlib label 上/下標，設置方法'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicLG4EiaPsTZbW8hNJ6xZUbL_eEa7-OlZpun099tQBkdAPmdfxvam4kZwPfi3wt7o5WgiyhgYwyGEeDManBlFtIi5Quinxc7AK2vNjpryYRBDNMAimOI9KSVLcYphSB61h-ZRBkhd4-4Y/s72-c/sub_superscript.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-6969862789613093716</id><published>2019-01-20T17:31:00.002+08:00</published><updated>2019-07-02T11:04:28.652+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="matplotlib"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="小技巧"/><title type='text'>matplotlib 2.2.0 以上版本，finance 分離出來了</title><content type='html'>最近想要使用 matplotlib 的 finance 包，突然發現找不到了，原來是從 matplotlib 2.2.0以上版本，就被分離出來了，需要另外獨自安裝&lt;br /&gt;
&lt;br /&gt;
cmd line 下&lt;br /&gt;
&lt;br /&gt;
pip install mpl_finance&lt;br /&gt;
&lt;br /&gt;
就可以安裝囉&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ref: 畫 candlestick chart&lt;br /&gt;
&lt;a href=&quot;https://openwritings.net/pg/python/python-draw-candlestick-chart-using-mplfinance-fetching-data-csv-file&quot;&gt;https://openwritings.net/pg/python/python-draw-candlestick-chart-using-mplfinance-fetching-data-csv-file&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/6969862789613093716/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2019/01/matplot-220-finance.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/6969862789613093716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/6969862789613093716'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2019/01/matplot-220-finance.html' title='matplotlib 2.2.0 以上版本，finance 分離出來了'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-8158901418902923064</id><published>2018-09-19T09:27:00.003+08:00</published><updated>2019-07-03T14:02:02.781+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><title type='text'>測試 SKOrderLib 的 GetBalanceQuery, GetMarginPurchaseAmountLimit 功能</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;一點範例測試 GetBalanceQuery, GetMarginPurchaseAmountLimit 功能&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #272822; border: 0px; color: #f8f8f2; font-size: 1.1em; font-stretch: normal; line-height: 1.5; padding: 0px 0px 0px 15px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.client&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetModule&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;C:&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCOM&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CapitalAPI_2.13.13&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;x64&lt;/span&gt;&lt;span class=&quot;se&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCOM.dll&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;comtypes.gen.SKCOMLib&lt;/span&gt; &lt;span class=&quot;kn&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKCenterLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;CreateObject&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKOrderLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;sk&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ISKOrderLib&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
    
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#使用jupyter notebook magic function,這句可以讓 Event Pump 出來&lt;/span&gt;
&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;matplotlib&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;auto&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#建立事件類別&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fm&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#初始化，可以設定一些變數供使用&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Acc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Balance&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnBalanceQuery&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#將Balance 回傳資訊存在 event instance 的 Balance 屬性中&lt;/span&gt;
        &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Balance&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;OnBalanceQuery&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnMarginPurchaseAmountLimit&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;OnMargin&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;bstrData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;border: 0px; color: #a6e22e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;OnAccount&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;LogInID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;TS&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;bp&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Acc&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;border: 0px; color: #ae81ff; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;
        &lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;LogInID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;AccountData&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO_events&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO_handler&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetEvents&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;       

&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Login&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skC&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKCenterLib_Login&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PW&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#Order object initialize&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SKORderLib_Initialize&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetUserAccount&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetBalanceQuery&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Acc&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot; style=&quot;border: 0px; color: #75715e; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;#查看 Balance&lt;/span&gt;
&lt;span class=&quot;k&quot; style=&quot;border: 0px; color: #66d9ef; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Balance&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;skO&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;border: 0px; color: #f92672; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GetMarginPurchaseAmountLimit&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot; style=&quot;border: 0px; color: #e6db74; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;border: 0px; font-size: 13.2px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/8158901418902923064/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2018/09/skorderlib-getbalancequery.html#comment-form' title='10 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/8158901418902923064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/8158901418902923064'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2018/09/skorderlib-getbalancequery.html' title='測試 SKOrderLib 的 GetBalanceQuery, GetMarginPurchaseAmountLimit 功能'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-1457378765812704021</id><published>2018-09-18T13:52:00.002+08:00</published><updated>2019-07-03T14:05:45.213+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><title type='text'>python 接群益api callback / event  沒反應，常見問題</title><content type='html'>沒有順序之分，想到過去有哪些經驗就寫什麼&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. python 跟 API 的位元版本要一樣，python 是64 bit，API 就裝 x64，網友指出 64位元版好像問題比較多，可以試試 32位元版本&lt;br /&gt;
&lt;br /&gt;
2. 缺少 event loop,&amp;nbsp; 在 IDE 或 GUI 介面下一般都會自帶有 eventloop 功能，比較不用煩惱。&amp;nbsp; 如果用 jupyter notebook 開發，可用 magic function:&amp;nbsp; %matplotlib auto, 也會幫你準備一個 eventloop。&lt;br /&gt;
&lt;br /&gt;
如果在 terminal 下開發，需要用 pythoncom.PumpWaitingMessages() / PumpMessages() 之類的方法讓 callback出來。如:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while Ture:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pythoncom.PumpWaitingMessages()&lt;br /&gt;
&lt;br /&gt;
或是直接用 pythoncom.PumpMessages() 等同上面的 while loop&lt;br /&gt;
&lt;br /&gt;
最近發現，使用 juypter notebook 的&amp;nbsp; magic function &#39;%matplotlob auto&#39; 來推動 eventloop，可能要注意 &#39;%matplotlob auto&#39; 放置的位置，太早使用，可能 eventloop 沒有反應，可以嘗試調整 &#39;%matplotlob auto&#39; 出現的位置。&lt;br /&gt;
&lt;br /&gt;
3. Event class 的定義有錯誤，像是&amp;nbsp; class 定義 def 的名稱都要參照 API 文件裡事件的名稱&lt;br /&gt;
例如: SKQuotelib 的事件&lt;br /&gt;
&lt;br /&gt;
class skQ_events:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; def OnConnect(self, nKind, nCode):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&#39;nKind, nCode=&#39;, nKind, nCode)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; def OnNotifyServerTime(self, sHour, sMinute, sSecond, nTotal):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(sHour, sMinute, sSecond)&lt;br /&gt;
&lt;br /&gt;
記得&amp;nbsp; def&amp;nbsp; 裡第一個參數是 self，這個一開始寫常忘記&lt;br /&gt;
&lt;br /&gt;
4. 如果是更新API 後有問題，可以考慮清空 comtypes.gen下的資料&lt;br /&gt;
&amp;nbsp; &amp;nbsp;請參考&amp;nbsp;&lt;a href=&quot;https://easontseng.blogspot.com/2018/05/api-python-comtypes.html&quot;&gt;https://easontseng.blogspot.com/2018/05/api-python-comtypes.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
我常用 OnNotifyServerTime 這個 callback 來看 eventloop 正不正常，連上群益報價主機後，每隔5秒主機會發送一個時間，可以藉此觀察 eventloop 有沒有問題。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
以上是我的經驗，如果你有遇到其它情況，也歡迎在下面留言分享&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/1457378765812704021/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2018/09/python-api-callback-event.html#comment-form' title='6 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/1457378765812704021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/1457378765812704021'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2018/09/python-api-callback-event.html' title='python 接群益api callback / event  沒反應，常見問題'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-4866689918563591412</id><published>2018-07-25T16:48:00.000+08:00</published><updated>2019-01-24T09:06:22.817+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="群益API"/><title type='text'>等不到Onconnection 回報 3003 </title><content type='html'>最近發現登錄報價後常常等不到 Onconnection 回報 3003，困擾了很久，後來才發現這個問題原來我很久之前就記錄過了，不過一時忘記了，特此紀錄一下，下次比較好找問題。&lt;br /&gt;
&lt;br /&gt;
原來如果我先呼叫 SKReplyLib_ConnectByID後，馬上乎叫 SKQuoteLib_EnterMonitor的話就會出現上述問題。安全做法是先EnterMonitor，再執行 SKReplyLib_ConnectByID，問題就可迎刃而解。細部原理我沒有深究，就先這樣吧!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/4866689918563591412/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2018/07/onconnection-3003.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/4866689918563591412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/4866689918563591412'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2018/07/onconnection-3003.html' title='等不到Onconnection 回報 3003 '/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8992133329411225866.post-5237010538108573008</id><published>2018-07-25T16:36:00.002+08:00</published><updated>2019-01-24T09:06:46.057+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>上完hahow 課程  &quot;用 Python 理財：打造小資族選股策略&quot; 心得</title><content type='html'>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 最近剛聽完 hahow&amp;nbsp;的線上課程&amp;nbsp; &quot;用 Python 理財：打造小資族選股策略&quot;，覺得實在是蠻超值的。很完整的課程，個人覺得很適合剛開始接觸python，想要用python 進行理財的人入門，由淺入深，手動打造完整選股策略，條理清晰，很好懂。不過很多資訊都是點到為止，給你一點提示，想要更精進則需要自己再花更多時間去研究，找資料。如果沒有半點程式基礎的人，則需要另外花點時間熟悉python，熟悉程式語言的邏輯。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;哇&amp;nbsp; 我買到早鳥票真是太超值了，已經回復原價了!!&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://easontseng.blogspot.com/feeds/5237010538108573008/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://easontseng.blogspot.com/2018/07/hahow-python.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5237010538108573008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8992133329411225866/posts/default/5237010538108573008'/><link rel='alternate' type='text/html' href='http://easontseng.blogspot.com/2018/07/hahow-python.html' title='上完hahow 課程  &quot;用 Python 理財：打造小資族選股策略&quot; 心得'/><author><name>Eason</name><uri>http://www.blogger.com/profile/02250474564253413719</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>