<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="190321" data-post-id="190321">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="GunnarPDX" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/GunnarPDX/120/18962_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  GunnarPDX
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I don’t think we should make things too dependant on any particular DB, it would be nice to make the backtesting/ohlc parts of the project modular so that you can just pass in the data and get results with whatever DB setup.</p>
<p>Also, not to add to the DB confusion <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> , but it looks like Redis could be another good choice <a href="https://redislabs.com/blog/unlocking-timeseries-data-redis/" rel="noopener nofollow ugc">https://redislabs.com/blog/unlocking-timeseries-data-redis/</a>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190321" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-190321" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190321"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="190627" data-post-id="190627">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/lostkobrakai" rel="nofollow">@LostKobrakai</a> looks very cool, but also looks like someone will have to write a NIF for this (probably over my head for now).</p>
<p><a class="mention" href="/u/gunnarpdx" rel="nofollow">@GunnarPDX</a> in principle I agree, but when I attempt to abstract away from the database, I start to see my progress slowing. I looked to see if I can simply use Ecto and back it with SQLite for my own purposes, and it seems that I can… Maybe?<br>
<a href="https://github.com/phoenixframework/phoenix/issues/3218" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/phoenixframework/phoenix/issues/3218</a></p>
<p>Making the library abstract enough to use most any database is a challenge that I’m kind of short on ideas for.</p>
<p>I decided to push on ahead with sqlite. <a href="https://hexdocs.pm/depo/readme.html" rel="noopener nofollow ugc">Depo</a> has been very straightforward to use. I wrote some functions tonight to seed my DB from polygon:<br>
<a href="https://github.com/rm-rf-etc/seeder" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/rm-rf-etc/seeder</a></p>
<p>And I discovered that jupyter notebook works with elixir! So I am working towards backtesting in JN with SQLite.<br>
<a href="https://github.com/pprzetacznik/IElixir" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/pprzetacznik/IElixir</a></p>
<p><a class="mention" href="/u/gunnarpdx" rel="nofollow">@GunnarPDX</a> I’m sorry, I still haven’t ran your support/resistance code. I will get to it. Planning on adding unit tests?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190627" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-190627" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190627"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="190690" data-post-id="190690">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="GunnarPDX" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/GunnarPDX/120/18962_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  GunnarPDX
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/rm-rf-etc" rel="nofollow">@rm-rf-etc</a> Hey, I went ahead and added a unit test as well as decimals.<br>
<a href="https://github.com/GunnarPDX/trade-indicators" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/GunnarPDX/trade-indicators</a><br>
Right now it returns a list of tuples like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[
    {:support, %{h: 208.94, l: 208.94, t: 1597657204}},
    {:resistance, %{h: 210.16, l: 209.84, t: 1597656664}}
]
</code></pre>
<p>I can’t remember why I opened a pr last week, I closed that and can open a new one if it’s ready.  I’ll also try to mess around with the polygon seeder and JN to see how that works with the S/R levels.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190690" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-190690" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190690"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="190692" data-post-id="190692">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/gunnarpdx" rel="nofollow">@GunnarPDX</a> that’s awesome, thank you.</p>
<p>Polygon’s data may give you some hassles. There can be holes in the data for some intervals, I posted about the issue here:</p><aside class="onebox discoursetopic" data-onebox-src="https://forum.alpaca.markets/t/wrong-amount-of-data/2808">
  <header class="source">
      <img src="https://us1.discourse-cdn.com/flex020/uploads/alp/optimized/2X/0/0db3c981a81590c06f90afd869ffdd3a67ae7e1d_2_32x32.png" class="site-icon" alt="" width="32" height="32">

      <a href="https://forum.alpaca.markets/t/wrong-amount-of-data/2808" target="_blank" rel="noopener nofollow ugc" title="11:07AM - 29 September 2020">Alpaca Community Forum – 29 Sep 20</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/362;"><img src="https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/f/f91047c7713bc13258d946a8cb84be1f9b2eaa08.png" class="thumbnail" width="690" height="362"></div>

<div class="title-wrapper">
  <h3><a href="https://forum.alpaca.markets/t/wrong-amount-of-data/2808" target="_blank" rel="noopener nofollow ugc">Wrong amount of data?</a></h3>
  <div class="topic-category">
      <span class="badge-wrapper bullet">
        <span class="badge-category-bg" style="background-color: #FBD603;"></span>
        <span class="badge-category clear-badge">
          <span class="category-name">Alpaca Integration Applications</span>
        </span>
      </span>
      <span class="badge-wrapper bullet">
        <span class="badge-category-bg" style="background-color: #231F20;"></span>
        <span class="badge-category clear-badge">
          <span class="category-name">App-Integration</span>
        </span>
      </span>
  </div>
</div>

  <p>Why am I getting more bars for 1-day intervals than I’m getting 4-hour intervals?  MSFT, 2018 - 2020, 4 hour intervals:  api.polygon.io/v2/aggs/ticker/MSFT/range/4/hour/2018-01-01/2020-10-01?apiKey=******  response: { "ticker": "MSFT", "status":...</p>

  <p>
    <span class="label1">Reading time: 1 min 🕑</span>
      <span class="label2">Likes: 2 ❤</span>
  </p>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>So I’m gonna try it with TD Ameritrade’s API.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190692" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-190692" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190692"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="190706" data-post-id="190706">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="GunnarPDX" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/GunnarPDX/120/18962_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  GunnarPDX
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh I see what the issue is now. Yeah, that’s a tricky one…  I never ran into this issue with the portfolio stuff I worked on since it was all EOD data which is pretty easy to come by.  I’m going to try out a company called TwelveData which looks promising.</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://twelvedata.com/apikey">
  <header class="source">
      <img src="https://twelvedata.com/build/favicons/favicon.ico" class="site-icon" alt="" width="16" height="16">

      <a href="https://twelvedata.com/apikey" target="_blank" rel="noopener nofollow ugc">Twelve Data</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/361;"><img src="https://twelvedata.com/assets/img/open_graph_logo.png" class="thumbnail" alt="" width="690" height="362"></div>

<h3><a href="https://twelvedata.com/apikey" target="_blank" rel="noopener nofollow ugc">Sign in - Twelve Data</a></h3>

  <p>Sign in to your account. Work with Twelve Data to access global financial data with the most advanced tools and services.</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<p>
If that doesn’t work and you can’t make a brokers API work then maybe take a look at DTN IQfeed.  You would need to stream IQfeed’s data off a windows box because of their client, which is annoying, but people say good things about their reliability and their prices are reasonable.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190706" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-190706" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190706"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="190721" data-post-id="190721">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for the info, I’ll take a look.</p>
<p>I think Ameritrade’s historical data will work well. I haven’t yet made <code>start_date</code> and <code>end_date</code> work, since an extra calculation step will be needed for Ameritrade’s params. You can see the endpoint doc <a href="https://developer.tdameritrade.com/price-history/apis/get/marketdata/%7Bsymbol%7D/pricehistory" rel="noopener nofollow ugc">here</a>, the issue is that params <code>period</code> and <code>periodType</code> seem to define the start and end dates (unless I’m mistaken).</p>
<p>But otherwise what I added is working and you can try it out.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">%Seeder.Conf{
    ticker: "MSFT",
    start: %Date{year: 2018, month: 1, day: 1},
    end: %Date{year: 2020, month: 10, day: 1},
    period_size: 1,
    period_unit: :minute,
    db_root: "/your/data/path",
    api_key: "****"
}
|&gt; Seeder.dl_to_db(:ameritrade)
</code></pre>
<p><a href="https://github.com/rm-rf-etc/seeder/blob/master/lib/seeder.ex#L49-L63" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/rm-rf-etc/seeder/blob/master/lib/seeder.ex#L49-L63</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190721" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-190721" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190721"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="190824" data-post-id="190824">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="GunnarPDX" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/GunnarPDX/120/18962_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  GunnarPDX
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nice! I haven’t tried it yet so this may not be the issue, but It looks like you aren’t supposed to provide a <code>period</code>/<code>periodType</code> if you use the <code>startDate</code> and <code>endDate</code>.  Their naming is kinda weird, I’m guessing that <code>period</code> and <code>periodType</code> are for when you just want a variable number of the most recent weeks/months/years data.  And <code>frequency</code> would be the bar interval size, eg: <code>:minute</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190824" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-190824" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190824"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="190887" data-post-id="190887">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Migrating to <a href="https://github.com/ElixirTradingTools" class="inline-onebox" rel="noopener nofollow ugc">ElixirTradingTools · GitHub</a>, will push some commits after work to fix names that I changed, and redirect people from the old location to the new. <a class="mention" href="/u/gunnarpdx" rel="nofollow">@GunnarPDX</a>, check your github for the invite <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="190887" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-190887" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="190887"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="192768" data-post-id="192768">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Checking in, since some time has passed with no updates.</p>
<p>I’ve been spending my time lately with TradingView, testing strategies in pinescript. This has the advantage of being very quick for prototyping.</p>
<p>I’ve landed on two strategies that I’m pretty sure will translate to consistent profit, and I’m switching back to elixir now to collect larger samples, refine the strategy, and produce a bot that’s ready to run:</p>
<ul>
<li>opening range breakout</li>
<li>trend following</li>
</ul>
<p><a href="https://www.youtube.com/watch?v=EUUd2kq1Mh4" rel="noopener nofollow ugc">Here’s a helpful video on building a trend following strategy.</a></p>
<p>I’ve been doing some work on the seeder repo to make the Ameritrade downloader work right (it’s in a separate branch).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="192768" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-192768" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="192768"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="193771" data-post-id="193771">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rm-rf-etc" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rm-rf-etc
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Here’s a client library for streaming market data. No unit tests yet, but the examples work. Supported brokers are Polygon, Binance, and Coinbase.</p>
<p><a href="https://github.com/ElixirTradingTools/market_client" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/ElixirTradingTools/market_client</a></p>
<p>To get forex data from Polygon, you have to buy the entry-level tier. I tried using a free key from Alpaca but Polygon blocks those. I will update this to support stocks too. Enjoy.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="193771" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/stock-trading-in-elixir/34002/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-193771" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="193771"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/34002/load_more?page=4">Load more posts (7 remaining)</a>
</div></template></turbo-stream>