1
0
mirror of https://gitlab.com/MisterBiggs/blog-static.git synced 2025-06-15 22:56:49 +00:00

812 lines
34 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>
Super simple Telegram Bot wrote in Python for displaying the price of a
stock, or news about a stock quickly and easily.
</title>
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="../assets/built/screen.css" />
<meta
name="description"
content="Super simple Telegram Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
/>
<link rel="shortcut icon" href="../favicon.png" type="image/png" />
<link rel="canonical" href="https://simplestockbot.com/" />
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta property="og:site_name" content="Anson 3D" />
<meta property="og:type" content="article" />
<meta
property="og:title"
content="Super simple Telegram Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
/>
<meta
property="og:description"
content="Super simple Telegram Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
/>
<meta
property="og:url"
content="https://blog.ansonbiggs.com/simple-telegram-stock-bot/"
/>
<meta
property="og:image"
content="../content/images/2019/06/Stock-Bot--1-.png"
/>
<meta
property="article:published_time"
content="2019-06-09T22:39:14.000Z"
/>
<meta property="article:modified_time" content="2019-06-10T09:57:54.000Z" />
<meta property="article:tag" content="Python" />
<meta property="article:tag" content="Code" />
<meta
property="article:publisher"
content="https://www.facebook.com/Anson3D"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:title"
content="Super simple Telegram Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
/>
<meta
name="twitter:description"
content="Super simple Telegram Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily."
/>
<meta
name="twitter:url"
content="https://blog.ansonbiggs.com/simple-telegram-stock-bot/"
/>
<meta
name="twitter:image"
content="https://blog.ansonbiggs.com/content/images/2019/06/Stock-Bot--1-.png"
/>
<meta name="twitter:label1" content="Written by" />
<meta name="twitter:data1" content="Anson Biggs" />
<meta name="twitter:label2" content="Filed under" />
<meta name="twitter:data2" content="Python, Code" />
<meta name="twitter:site" content="@Anson_3D" />
<meta name="twitter:creator" content="@Anson_3D" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="500" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"publisher": {
"@type": "Organization",
"name": "Anson 3D",
"logo": {
"@type": "ImageObject",
"url": "https://blog.ansonbiggs.com/favicon.png",
"width": 60,
"height": 60
}
},
"author": {
"@type": "Person",
"name": "Anson Biggs",
"image": {
"@type": "ImageObject",
"url": "https://blog.ansonbiggs.com/content/images/2019/09/anson_suit_cropped.jpg",
"width": 1513,
"height": 1090
},
"url": "https://blog.ansonbiggs.com/author/anson/",
"sameAs": ["http://ansonbiggs.com", "https://twitter.com/AnsonBiggs"]
},
"headline": "Super simple Telegram Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily.",
"url": "https://blog.ansonbiggs.com/simple-telegram-stock-bot/",
"datePublished": "2019-06-09T22:39:14.000Z",
"dateModified": "2019-06-10T09:57:54.000Z",
"image": {
"@type": "ImageObject",
"url": "https://blog.ansonbiggs.com/content/images/2019/06/Stock-Bot--1-.png",
"width": 500,
"height": 500
},
"keywords": "Python, Code",
"description": "Super simple Telegram Bot wrote in Python for displaying the price of a stock, or news about a stock quickly and easily.",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://blog.ansonbiggs.com/"
}
}
</script>
<script
src="../public/ghost-sdk.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script type="266288dd2e035c674a71b6a4-text/javascript">
ghost.init({
clientId: "ghost-frontend",
clientSecret: "245af786ee20"
});
</script>
<meta name="generator" content="Ghost 2.31" />
<link
rel="alternate"
type="application/rss+xml"
title="Anson 3D"
href="https://blog.ansonbiggs.com/rss/"
/>
<script
async
src="https://analytics.ansonbiggs.com/tracker.js"
data-ackee-server="https://analytics.ansonbiggs.com"
data-ackee-domain-id="0846bb59-c7b6-4a0b-bc05-135f82425319"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
src="https://unpkg.com/mermaid@8.0.0/dist/mermaid.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script type="266288dd2e035c674a71b6a4-text/javascript">
mermaid.initialize({startOnLoad:true});
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/prism.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/plugins/line-numbers/prism-line-numbers.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/themes/prism.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/plugins/line-numbers/prism-line-numbers.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/themes/prism-coy.min.css"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-powershell.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-css.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-c.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-clike.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.14.0/components/prism-python.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-99766784-3"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script type="266288dd2e035c674a71b6a4-text/javascript">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-99766784-3');
</script>
<script
data-name="BMC-Widget"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="Anson"
data-description="Support my work on Buy me a coffee!"
data-message="Please consider donating if you enjoy my content!"
data-color="#5F7FFF"
data-position="right"
data-x_margin="18"
data-y_margin="18"
></script>
</head>
<body class="post-template tag-python tag-code">
<div class="site-wrapper">
<header class="site-header outer">
<div class="inner">
<nav class="site-nav">
<div class="site-nav-left">
<a class="site-nav-logo" href="../">Anson 3D</a>
<ul class="nav" role="menu">
<li class="nav-home" role="menuitem"><a href="../">Home</a></li>
<li class="nav-downloads" role="menuitem">
<a href="../where-to-download-my-models/">Downloads</a>
</li>
<li class="nav-yet-another-test-suite" role="menuitem">
<a href="../yet-another-test-suite/"
>Yet Another Test Suite</a
>
</li>
<li class="nav-tags" role="menuitem">
<a href="../tags/">Tags</a>
</li>
<li class="nav-resume" role="menuitem">
<a href="http://ansonbiggs.com">Resume</a>
</li>
<li class="nav-partners" role="menuitem">
<a href="https://projects.ansonbiggs.com">Projects</a>
</li>
</ul>
</div>
<div class="site-nav-right">
<div class="social-links">
<a
class="social-link social-link-fb"
href="https://www.facebook.com/Anson3D"
title="Facebook"
target="_blank"
rel="noopener"
><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path
d="M19 6h5V0h-5c-3.86 0-7 3.14-7 7v3H8v6h4v16h6V16h5l1-6h-6V7c0-.542.458-1 1-1z"
/>
</svg>
</a>
<a
class="social-link social-link-tw"
href="https://twitter.com/AnsonBiggs"
title="Twitter"
target="_blank"
rel="noopener"
><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path
d="M30.063 7.313c-.813 1.125-1.75 2.125-2.875 2.938v.75c0 1.563-.188 3.125-.688 4.625a15.088 15.088 0 0 1-2.063 4.438c-.875 1.438-2 2.688-3.25 3.813a15.015 15.015 0 0 1-4.625 2.563c-1.813.688-3.75 1-5.75 1-3.25 0-6.188-.875-8.875-2.625.438.063.875.125 1.375.125 2.688 0 5.063-.875 7.188-2.5-1.25 0-2.375-.375-3.375-1.125s-1.688-1.688-2.063-2.875c.438.063.813.125 1.125.125.5 0 1-.063 1.5-.25-1.313-.25-2.438-.938-3.313-1.938a5.673 5.673 0 0 1-1.313-3.688v-.063c.813.438 1.688.688 2.625.688a5.228 5.228 0 0 1-1.875-2c-.5-.875-.688-1.813-.688-2.75 0-1.063.25-2.063.75-2.938 1.438 1.75 3.188 3.188 5.25 4.25s4.313 1.688 6.688 1.813a5.579 5.579 0 0 1 1.5-5.438c1.125-1.125 2.5-1.688 4.125-1.688s3.063.625 4.188 1.813a11.48 11.48 0 0 0 3.688-1.375c-.438 1.375-1.313 2.438-2.563 3.188 1.125-.125 2.188-.438 3.313-.875z"
/>
</svg>
</a>
</div>
</div>
</nav>
</div>
</header>
<main id="site-main" class="site-main outer">
<div class="inner">
<article class="post-full post tag-python tag-code">
<header class="post-full-header">
<section class="post-full-meta">
<time class="post-full-meta-date" datetime="2019-06-09"
>9 June 2019</time
>
<span class="date-divider">/</span>
<a href="../tag/python/">Python</a>
</section>
<h1 class="post-full-title">
<a href="https://simplestockbot.com/"
>Simple Telegram Stock Bot</a
>
</h1>
</header>
<figure class="post-full-image">
<img
srcset="
../content/images/size/w300/2019/06/Stock-Bot--1-.png 300w,
../content/images/size/w600/2019/06/Stock-Bot--1-.png 600w,
../content/images/size/w1000/2019/06/Stock-Bot--1-.png 1000w,
../content/images/size/w2000/2019/06/Stock-Bot--1-.png 2000w
"
sizes="(max-width: 800px) 400px,
(max-width: 1170px) 700px,
1400px"
src="../content/images/size/w2000/2019/06/Stock-Bot--1-.png"
alt="Simple Telegram Stock Bot"
/>
</figure>
<section class="post-full-content">
<div class="post-content">
<h1>
This Content has moved. Get the latest info
<a href="https://simplestockbot.com/">here.</a>
</h1>
<hr />
<p align="center">
Telegram Bot 🤖 that provides Stock Market information.
<br />
</p>
<h2 id="tableofcontents">📝 Table of Contents</h2>
<ul>
<li><a href="#about">About</a></li>
<li><a href="#working">How it works</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#getting_started">Getting Started</a></li>
<li><a href="#deployment">Deploying your own bot</a></li>
<li><a href="#built_using">Built Using</a></li>
<li><a href="../contributing.md/">Contributing</a></li>
<li><a href="#author">author</a></li>
<li><a href="#acknowledgement">Acknowledgments</a></li>
</ul>
<h2 id="aboutanameabouta">🧐 About <a name="about"></a></h2>
<p>
This bot aims to be as simple as possible while providing all
the information you need on the stock market. The motivation
of this bot is to provide similar stock market functionality
that the Google Assistant provided in
<a href="https://gcemetery.co/google-allo/">Google Allo</a>
before the project was sunset.
</p>
<h2 id="howitworksanameworkinga">
💭 How it works <a name="working"></a>
</h2>
<p>
This bot works by using the
<a href="https://iexcloud.io/docs/api/">IEX API 2.0</a>. Using
various endpoints provided by the API, the bot can take either
take commands from users or check any messages for stock
symbols as detailed in <a href="#usage">Usage</a>.
</p>
<h2 id="usageanameusagea">🎈 Usage <a name="usage"></a></h2>
<h3 id="basicusage">Basic Usage</h3>
<p>
The simplest way to use the bot is just by sending a message
either as a direct message or in a group chat with the bot
active. The bot will search every message for text with a
dollar sign followed by a stock symbol, and it will return the
full name of the company and the current trading price.
</p>
<pre><code>$tsla
</code></pre>
<p>
The symbols can be anywhere in the message, and you can post
as many as you like so commands such as:
</p>
<pre><code>I wonder if $aapl is down as much as $msft is today.
</code></pre>
<p>
would return the stock price of both Apple and Microsoft like
so:
</p>
<pre><code>The current stock price of Microsoft Corp. is $131.4, the stock is currently up 2.8%
The current stock price of Apple, Inc. is $190.15, the stock is currently up 2.66%
</code></pre>
<h3 id="dividend">/dividend</h3>
<p>
To get information about the dividend of a stock type
<code>/dividend</code> followed by any text that has symbols
with a dollar sign in front of them. So, the following
command:
</p>
<pre><code>/dividend $psec
</code></pre>
<p>
Would return information about Prospect Capitals dividend:
</p>
<pre><code>Prospect Capital Corp. Declares June 2019 Dividend of $0.06 Per Share
The dividend is in: 38 Days 3 Hours 53 Minutes 22 Seconds.
</code></pre>
<h2 id="gettingstartedanamegetting_starteda">
🏁 Getting Started <a name="getting_started"></a>
</h2>
<p>
You can either choose to use the hosted version of the bot by
<a href="https://t.me/SimpleStockBot">clicking here</a> or you
can host your own bot with the instructions below.
</p>
<h3 id="selfhostedbot">Self Hosted Bot</h3>
<p>
These instructions will get you a copy of the project up and
running on your local machine for development and testing
purposes. See <a href="#deployment">deployment</a> for notes
on how to deploy the project on a live system.
</p>
<h3 id="prerequisites">Prerequisites</h3>
<p>
This project runs neatly in a docker container, so all that
you need to run it yourself is
<a href="https://hub.docker.com/?overlay=onboarding"
>Docker</a
>
installed on your system.
</p>
<p>
You will also need a telegram API key which can be obtained
for free by talking to
<a href="https://telegram.me/botfather">BotFather</a>, more
details
<a
href="https://core.telegram.org/bots#3-how-do-i-create-a-bot"
>here.</a
>
</p>
<p>
Finally, you will need and IEX Cloud API key. They offer a
free tier that should be enough for any private groups, more
details <a href="https://iexcloud.io/">here.</a>
</p>
<h3 id="installing">Installing</h3>
<p>
Once Docker is installed and you have your API keys for
Telegram and IEX Cloud getting the bot running on any platform
is extremely easy.
</p>
<p>
Download or clone the repository to your machine and open a
terminal in the project and build the Docker container.
</p>
<pre><code>docker build -t simple-telegram-bot .
</code></pre>
<p>Then run the bot using your API keys.</p>
<pre><code>docker run --detach \
-e TELEGRAM=TELEGRAM_API \
-e IEX=IEX_API \
simple-telegram-bot
</code></pre>
<p>
Your bot should be running! If you are new to Docker, I would
recommend checking out its documentation for full control over
your bot.
</p>
<h2 id="deployingyourownbotanamedeploymenta">
🚀 Deploying your own bot <a name="deployment"></a>
</h2>
<p>
I recommend Digital Ocean for small projects like this because
it is straightforward to use and affordable.
<a href="https://m.do.co/c/6b5df7ef55b6"
>Sign up with my referral code, and we both get some free
hosting.</a
>
</p>
<h2 id="builtusinganamebuilt_usinga">
⛏️ Built Using <a name="built_using"></a>
</h2>
<ul>
<li>
<a href="https://python-telegram-bot.org/"
>python-telegram-bot</a
>
- Python Telegram API Wrapper
</li>
<li>
<a href="https://www.digitalocean.com/">Digital Ocean</a> -
IaaS hosting platform
</li>
</ul>
<h2 id="authoranameauthora">✍️ author <a name="author"></a></h2>
<ul>
<li>
<a href="../author/anson/">Anson Biggs</a> - The one and
only
</li>
</ul>
<h2 id="acknowledgementsanameacknowledgementa">
🎉 Acknowledgements <a name="acknowledgement"></a>
</h2>
<ul>
<li>Telegram for having a great bot API</li>
<li>IEX Cloud for offering a free tier</li>
<li>Viewers like you ♥</li>
</ul>
</div>
</section>
<footer class="post-full-footer">
<section class="author-card">
<img
class="author-profile-image"
src="../content/images/size/w100/2019/09/anson_suit_cropped.jpg"
alt="Anson Biggs"
/>
<section class="author-card-content">
<h4 class="author-card-name">
<a href="../author/anson/">Anson Biggs</a>
</h4>
<p>
I am an undergraduate Aerospace Engineering student with a
focus on Astronautics and a minor in Electronic Engineering
studying at Embry-Riddle Aeronautical University in
Prescott, Arizona.
</p>
</section>
</section>
<div class="post-full-footer-right">
<a class="author-card-button" href="../author/anson/"
>Read More</a
>
</div>
</footer>
</article>
</div>
</main>
<aside class="read-next outer">
<div class="inner">
<div class="read-next-feed">
<article
class="read-next-card"
style="
background-image: url(../content/images/size/w600/2018/08/007---3kLkMUL-1.jpg);
"
>
<header class="read-next-card-header">
<small class="read-next-card-header-sitetitle"
>&mdash; Anson 3D &mdash;</small
>
<h3 class="read-next-card-header-title">
<a href="../tag/python/">Python</a>
</h3>
</header>
<div class="read-next-divider">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M13 14.5s2 3 5 3 5.5-2.463 5.5-5.5S21 6.5 18 6.5c-5 0-7 11-12 11C2.962 17.5.5 15.037.5 12S3 6.5 6 6.5s4.5 3.5 4.5 3.5"
/>
</svg>
</div>
<div class="read-next-card-content">
<ul>
<li>
<a href="../simple-discord-stock-bot/"
>Simple Discord Stock Bot</a
>
</li>
<li>
<a
href="../create-a-backup-of-your-chocolatey-packages-using-boxstarter/"
>Create a Backup of your Chocolatey Packages using
Boxstarter</a
>
</li>
</ul>
</div>
<footer class="read-next-card-footer">
<a href="../tag/python/">See all 2 posts →</a>
</footer>
</article>
<article class="post-card post tag-guide tag-code tag-python">
<a
class="post-card-image-link"
href="../simple-discord-stock-bot/"
>
<img
class="post-card-image"
srcset="
../content/images/size/w300/2019/01/logo.png 300w,
../content/images/size/w600/2019/01/logo.png 600w,
../content/images/size/w1000/2019/01/logo.png 1000w,
../content/images/size/w2000/2019/01/logo.png 2000w
"
sizes="(max-width: 1000px) 400px, 700px"
src="../content/images/size/w600/2019/01/logo.png"
alt="Simple Discord Stock Bot"
/>
</a>
<div class="post-card-content">
<a
class="post-card-content-link"
href="../simple-discord-stock-bot/"
>
<header class="post-card-header">
<span class="post-card-tags">Guide</span>
<h2 class="post-card-title">Simple Discord Stock Bot</h2>
</header>
<section class="post-card-excerpt">
<p>
Super simple Discord Bot wrote in Python for displaying
the price of a stock, or news about a stock quickly and
easily.
</p>
</section>
</a>
<footer class="post-card-meta">
<ul class="author-list">
<li class="author-list-item">
<div class="author-name-tooltip">Anson Biggs</div>
<a href="../author/anson/" class="static-avatar">
<img
class="author-profile-image"
src="../content/images/size/w100/2019/09/anson_suit_cropped.jpg"
alt="Anson Biggs"
/>
</a>
</li>
</ul>
<span class="reading-time">3 min read</span>
</footer>
</div>
</article>
</div>
</div>
</aside>
<div class="floating-header">
<div class="floating-header-logo">
<a href="../">
<img
src="../content/images/size/w30/2018/08/Anson.png"
alt="Anson 3D icon"
/>
<span>Anson 3D</span>
</a>
</div>
<span class="floating-header-divider">&mdash;</span>
<div class="floating-header-title">Simple Telegram Stock Bot</div>
<div class="floating-header-share">
<div class="floating-header-share-label">
Share this
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
d="M7.5 15.5V4a1.5 1.5 0 1 1 3 0v4.5h2a1 1 0 0 1 1 1h2a1 1 0 0 1 1 1H18a1.5 1.5 0 0 1 1.5 1.5v3.099c0 .929-.13 1.854-.385 2.748L17.5 23.5h-9c-1.5-2-5.417-8.673-5.417-8.673a1.2 1.2 0 0 1 1.76-1.605L7.5 15.5zm6-6v2m-3-3.5v3.5m6-1v2"
/>
</svg>
</div>
<a
class="floating-header-share-tw"
href="https://twitter.com/share?text=Simple%20Telegram%20Stock%20Bot&url=https://blog.ansonbiggs.com/simple-telegram-stock-bot/"
onclick="if (!window.__cfRLUnblockHandlers) return false; window.open(this.href, 'share-twitter', 'width=550,height=235');return false;"
data-cf-modified-266288dd2e035c674a71b6a4-
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path
d="M30.063 7.313c-.813 1.125-1.75 2.125-2.875 2.938v.75c0 1.563-.188 3.125-.688 4.625a15.088 15.088 0 0 1-2.063 4.438c-.875 1.438-2 2.688-3.25 3.813a15.015 15.015 0 0 1-4.625 2.563c-1.813.688-3.75 1-5.75 1-3.25 0-6.188-.875-8.875-2.625.438.063.875.125 1.375.125 2.688 0 5.063-.875 7.188-2.5-1.25 0-2.375-.375-3.375-1.125s-1.688-1.688-2.063-2.875c.438.063.813.125 1.125.125.5 0 1-.063 1.5-.25-1.313-.25-2.438-.938-3.313-1.938a5.673 5.673 0 0 1-1.313-3.688v-.063c.813.438 1.688.688 2.625.688a5.228 5.228 0 0 1-1.875-2c-.5-.875-.688-1.813-.688-2.75 0-1.063.25-2.063.75-2.938 1.438 1.75 3.188 3.188 5.25 4.25s4.313 1.688 6.688 1.813a5.579 5.579 0 0 1 1.5-5.438c1.125-1.125 2.5-1.688 4.125-1.688s3.063.625 4.188 1.813a11.48 11.48 0 0 0 3.688-1.375c-.438 1.375-1.313 2.438-2.563 3.188 1.125-.125 2.188-.438 3.313-.875z"
/>
</svg>
</a>
<a
class="floating-header-share-fb"
href="https://www.facebook.com/sharer/sharer.php?u=https://blog.ansonbiggs.com/simple-telegram-stock-bot/"
onclick="if (!window.__cfRLUnblockHandlers) return false; window.open(this.href, 'share-facebook','width=580,height=296');return false;"
data-cf-modified-266288dd2e035c674a71b6a4-
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path
d="M19 6h5V0h-5c-3.86 0-7 3.14-7 7v3H8v6h4v16h6V16h5l1-6h-6V7c0-.542.458-1 1-1z"
/>
</svg>
</a>
</div>
<progress id="reading-progress" class="progress" value="0">
<div class="progress-container">
<span class="progress-bar"></span>
</div>
</progress>
</div>
<footer class="site-footer outer">
<div class="site-footer-content inner">
<section class="copyright">
<a href="../">Anson 3D</a> &copy; 2019
</section>
<nav class="site-footer-nav">
<a href="../">Latest Posts</a>
<a
href="https://www.facebook.com/Anson3D"
target="_blank"
rel="noopener"
>Facebook</a
>
<a
href="https://twitter.com/AnsonBiggs"
target="_blank"
rel="noopener"
>Twitter</a
>
<a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
</nav>
</div>
</footer>
</div>
<script type="266288dd2e035c674a71b6a4-text/javascript">
var images = document.querySelectorAll('.kg-gallery-image img');
images.forEach(function (image) {
var container = image.closest('.kg-gallery-image');
var width = image.attributes.width.value;
var height = image.attributes.height.value;
var ratio = width / height;
container.style.flex = ratio + ' 1 0%';
})
</script>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
crossorigin="anonymous"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script
type="266288dd2e035c674a71b6a4-text/javascript"
src="../assets/built/jquery.fitvids.js"
></script>
<script
src="../assets/built/infinitescroll.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<script type="266288dd2e035c674a71b6a4-text/javascript">
// NOTE: Scroll performance is poor in Safari
// - this appears to be due to the events firing much more slowly in Safari.
// Dropping the scroll event and using only a raf loop results in smoother
// scrolling but continuous processing even when not scrolling
$(document).ready(function () {
// Start fitVids
var $postContent = $(".post-full-content");
$postContent.fitVids();
// End fitVids
var progressBar = document.querySelector('#reading-progress');
var header = document.querySelector('.floating-header');
var title = document.querySelector('.post-full-title');
var lastScrollY = window.scrollY;
var lastWindowHeight = window.innerHeight;
var lastDocumentHeight = $(document).height();
var ticking = false;
function onScroll() {
lastScrollY = window.scrollY;
requestTick();
}
function onResize() {
lastWindowHeight = window.innerHeight;
lastDocumentHeight = $(document).height();
requestTick();
}
function requestTick() {
if (!ticking) {
requestAnimationFrame(update);
}
ticking = true;
}
function update() {
var trigger = title.getBoundingClientRect().top + window.scrollY;
var triggerOffset = title.offsetHeight + 35;
var progressMax = lastDocumentHeight - lastWindowHeight;
// show/hide floating header
if (lastScrollY >= trigger + triggerOffset) {
header.classList.add('floating-active');
} else {
header.classList.remove('floating-active');
}
progressBar.setAttribute('max', progressMax);
progressBar.setAttribute('value', lastScrollY);
ticking = false;
}
window.addEventListener('scroll', onScroll, {passive: true});
window.addEventListener('resize', onResize, false);
update();
});
</script>
<script
src="https://embedd.io/embedd.min.js"
type="266288dd2e035c674a71b6a4-text/javascript"
></script>
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"
><img
alt="Creative Commons License"
style="border-width: 0"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a
><br />This work is licensed under a
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"
>Creative Commons Attribution-ShareAlike 4.0 International License</a
>.
<script
src="https://ajax.cloudflare.com/cdn-cgi/scripts/95c75768/cloudflare-static/rocket-loader.min.js"
data-cf-settings="266288dd2e035c674a71b6a4-|49"
defer
></script>
</body>
</html>