<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Broker &#8211; The Financial Hacker</title>
	<atom:link href="https://financial-hacker.com/tag/broker/feed/" rel="self" type="application/rss+xml" />
	<link>https://financial-hacker.com</link>
	<description>A new view on algorithmic trading</description>
	<lastBuildDate>Wed, 31 Jan 2024 10:07:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://financial-hacker.com/wp-content/uploads/2017/07/cropped-mask-32x32.jpg</url>
	<title>Broker &#8211; The Financial Hacker</title>
	<link>https://financial-hacker.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Trading with REST</title>
		<link>https://financial-hacker.com/crypto-trading-with-rest-part-1/</link>
					<comments>https://financial-hacker.com/crypto-trading-with-rest-part-1/#comments</comments>
		
		<dc:creator><![CDATA[jcl]]></dc:creator>
		<pubDate>Mon, 17 Oct 2022 11:16:41 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Bittrex]]></category>
		<category><![CDATA[Broker]]></category>
		<category><![CDATA[Hacking]]></category>
		<guid isPermaLink="false">https://financial-hacker.com/?p=4517</guid>

					<description><![CDATA[Many brokers and exchanges can nowadays be accessed online with a REST API that communicates with plain-text HTTP requests. The days of awkward proprietary broker APIs are coming to an end. This article is a step by step instruction of implementating a REST API interface in C for connecting a trading system to the Bittrex &#8230; <a href="https://financial-hacker.com/crypto-trading-with-rest-part-1/" class="more-link">Continue reading<span class="screen-reader-text"> "Trading with REST"</span></a>]]></description>
										<content:encoded><![CDATA[
<p>Many brokers and exchanges can nowadays be accessed online with a REST API that communicates with plain-text HTTP requests. The days of <a href="https://financial-hacker.com/dear-brokers/" target="_blank" rel="noopener">awkward proprietary broker APIs</a> are coming to an end. This article is a step by step instruction of implementating a REST API interface in C for connecting a trading system to the <a href="https://global.bittrex.com/" target="_blank" rel="noopener">Bittrex cryptocurrency exchange.</a> It&#8217;s for the <a href="https://zorro-project.com" target="_blank" rel="noopener">Zorro platform</a>, but the principles are also valid for other exchanges and platforms. The C code for a basic REST API implementation is relatively short and straightforward. <span id="more-4517"></span></p>
<p> For connecting the Zorro platform to a particular broker API, a DLL must be dropped in its Plugin folder. The DLL is then automatically recognized and appears in Zorro&#8217;s Broker selection box. For trading with the broker, the DLL exports functions for getting prices and sending orders. These functions are standardized and described in the <a href="https://zorro-project.com/manual/en/brokerplugin.htm" target="_blank" rel="noopener">Zorro manual</a>. They are the same for all brokers. The following 4 functions are the most important:</p>
<p><strong>BrokerOpen</strong> &#8211; identify the DLL.<br /><strong>BrokerLogin</strong> &#8211; initialize and store login credentials.<br /><strong>BrokerAsset</strong> &#8211; retrieve price and other parameters of an asset.<br /><strong>BrokerBuy2</strong> &#8211; send a buy or sell order.</p>
<p>These four are sufficient for running most trading strategies. The DLL can export additional functions that are useful, but not mandatory, since Zorro works around them when they are not implemented:</p>
<p><strong>BrokerAccount</strong> -get the account state.<br /><strong>BrokerTrade</strong> &#8211; get the trade or order state.<br /><strong>BrokerHistory2</strong> -get price history.<br /><strong>BrokerCommand</strong> &#8211; set special modes, get order book, etc.</p>
<p>Zorro users have written DLLs for several broker APIs, but the code is often redundant and invents the wheel many times again. I&#8217;ll give here an example of a relatively lean broker DLL that can be used as template for individual REST API implementations. Bittrex is a US based digital currency exchange that supports several hundred crypto currencies and provides free API access. We&#8217;re first going to implement the 4 mandatory functions, following the API description on the Bittrex website:</p>
<p><a href="https://bittrex.github.io/api/v3" target="_blank" rel="noopener">https://bittrex.github.io/api/v3</a></p>
<p>We will use the free Visual C++ Community Edition from Microsoft. Aside from the exported functions, we need some internal functions to print messages, send HTTP requests, parse a JSON response, and generate a digital signature. For all this there&#8217;s ready code available on the Internet, but there are also ready functions in Zorro&#8217;s library. To make life easier, we simply import the <a href="https://zorro-project.com/manual/en/funclist.htm" target="_blank" rel="noopener">Zorro function library</a> to the DLL. The VC++ setup for generating such a DLL is described here:</p>
<p><a href="https://zorro-project.com/manual/en/dlls.htm#project" target="_blank" rel="noopener">https://zorro-project.com/manual/en/dlls.htm</a></p>
<p>The setup is for a C++ trading strategy, but works as well for a broker API DLL. First we&#8217;re going to implement the adminstrative stuff, the <strong>BrokerOpen</strong> and <strong>BrokerLogin</strong> functions:</p>
<pre class="prettyprint">#define PLUGIN_TYPE 2<br />#define PLUGIN_NAME "Bittrex V3"<br />#define DLLFUNC extern "C" __declspec(dllexport)<br /><br />int (__cdecl *BrokerMessage)(const char *Text);<br />int (__cdecl *BrokerProgress)(const int Progress);<br />...<br /><br />DLLFUNC int BrokerOpen(char* Name,FARPROC fpMessage,FARPROC fpProgress)<br />{<br />  strcpy_s(Name,32,PLUGIN_NAME);<br />  (FARPROC&amp;)BrokerMessage = fpMessage;<br />  (FARPROC&amp;)BrokerProgress = fpProgress;<br />  return PLUGIN_TYPE;<br />}</pre>
<p>The <strong>BrokerOpen</strong> function is Zorro specific. It sets up two function pointers for printing message and sending heartbeats to Zorro. It&#8217;s needed for recognizing the DLL in the <strong>Plugin</strong> folder and letting the plugin name, &#8220;Bittrex V3&#8221;, appear in the broker scrollbox. </p>
<p>Next we need the login function that&#8217;s called at the begin and the end of any algo trading session</p>
<pre class="prettyprint">struct GLOBAL {<br />  int PriceType,VolType,OrderType;<br />  double Unit; // smallest trade unit<br />  char Path[256]; // send path buffer<br />  char Key[256],Secret[256]; // credentials<br />  char Symbol[64],Uuid[256]; // last trade symbol and UUID<br />  char AccountId[16]; // account currency<br />} G; // parameter singleton<br />...<br /><br />DLLFUNC int BrokerLogin(char* User,char* Pwd,char* Type,char* Accounts)<br />{<br />  if(User) { // login<br />    memset(&amp;G,0,sizeof(G));<br />    strcpy_s(G.Key,User);<br />    strcpy_s(G.Secret,Pwd);<br />    return 1;<br />  } else  // logout<br />    return 0;<br />}</pre>
<p>This function only sets up the <strong>G</strong> struct, a singleton that holds all global variables of the DLL. The <strong>User</strong> and <strong>Pwd</strong> arguments contain the Bittrex key and secret. They are taken from the Zorro login fields or from the account list. <strong>Type</strong> is the account type, ignored here because Bittrex has no demo accounts.  <strong>Account</strong> is the account identifier and also ignored since we&#8217;re not using sub-accounts.</p>
<p>Next comes the function to retrieve prices and other parameters of a particular cryptocurrency. It&#8217;s a bit more complex and requires a HTTP request to the API. Some requests require authentication, some not. For all this we first implement a <strong>send()</strong> function in the DLL that uses Zorro&#8217;s functions for sending <a href="https://zorro-project.com/manual/en/http.htm" target="_blank" rel="noopener">http requests</a> and generating a <a href="https://zorro-project.com/manual/en/hmac.htm" target="_blank" rel="noopener">HMAC signature</a>. The authentication method by the Bittrex REST API V3 is a bit complex:</p>
<p><em>To properly sign an authenticated request for the Bittrex v3 API, the following headers must be included: Api-Key, Api-Timestamp, Api-Content-Hash, Api-Signature. <span style="font-size: revert;">Api-Timestamp is </span>the current time as a UNIX timestamp in epoch-millisecond format. <span style="font-size: revert;">Api-Content-Hash </span>is a SHA512 hash of the request body, Hex-encoded (with no request body, a SHA512 hash of an empty string). For creating the Api-Signature, first generate a string by concatenating the following items: Contents of the Api-Timestamp header; the full URI used to make the request, including query string; the HTTP method of the request, in all caps (GET, POST, DELETE, etc.); Contents of the Api-Content-Hash header. Sign this string via HmacSHA512, using the API secret as the signing secret. Hex-encode the result and populate the Api-Signature header with it.</em></p>
<p>This is the implementation:</p>
<pre class="prettyprint">#define RHEADER "https://api.bittrex.com/v3/"<br />...<br /><br />int sleep(int ms)<br />{<br />  Sleep(ms); <br />  return BrokerProgress(0);<br />}<br /><br />char* send(const char* Url,<br />  int Mode = 0,<br />  const char* Method = NULL,<br />  const char* Body = NULL)
{
  static char Url[1024], Header[2048], Signature[1024],
    Buffer1[1024*1024], Buffer2[2048];
  *Signature = *Header = 0;
  sprintf_s(Url,"%s%s",RHEADER,Url);
  if (Mode &amp; 1) { // Authentication required
    strcpy_s(Header, "Content-Type:application/json");
    strcat_s(Header, "\nAccept:application/json");
    strcat_s(Header, "\nApi-Key: ");
    strcat_s(Header,G.Key);
    strcat_s(Header, "\nApi-Timestamp: ");
    __time64_t Time; _time64(&amp;Time);
    static __time64_t Offset = 0;
    char* TimeStamp = i64toa(Time*1000 + Offset++); 
    strcat_s(Header, TimeStamp);
    strcat_s(Header, "\nApi-Content-Hash: ");
    char* Hash = hmac(Body, 0, 0, 512);
    strcat_s(Header,Hash);
    strcpy_s(Signature, TimeStamp);
    strcat_s(Signature, Url);
    if(Method &amp;&amp; *Method)
      strcat_s(Signature, Method);
    else if(!Body)
      strcat_s(Signature,"GET");
    else
      strcat_s(Signature,"POST");
    strcat_s(Signature, Hash);
    strcat_s(Header, "\nApi-Signature: ");
    strcat_s(Header, hmac(Signature, 0, G.Secret, 512));
  }

  char* Response = Mode &amp; 2? Buffer2 : Buffer1;<br />  int MaxSize = Mode &amp; 2? sizeof(Buffer2) : sizeof(Buffer1);<br />  int Id = http_request(Url,Body,Header,Method);
  if(!Id) goto send_error;
// wait 30 seconds for the server to reply
  int Size = 0, Wait = 3000;  
  while (!(Size = http_status(Id)) &amp;&amp; --Wait &gt; 0)
    if(!sleep(10)) goto send_error;
  if (!Size) goto send_error;
  if(!http_result(Id,Response,MaxSize)) goto send_error;
  Response[MaxSize-1] = 0; // prevent buffer overrun
  http_free(Id);
  return Response;
<br />// transfer unsuccessful?
send_error:
  if(Id) http_free(Id);
  return NULL;
}
</pre>
<p>The above code adds an authentication header with signature when <strong>Mode</strong> == 1. <strong>Mode == 2</strong> selects a second, smaller response buffer and thus allows to evaluate two API responses at the same time. The <strong>sleep</strong> function generates a delay with a heartbeat to keep the Zorro window responsive during long requests. If it returns <strong>0</strong>, someone has hit Zorro&#8217;s [Stop] key and all operations should be aborted. The Windows <strong>_time64</strong> function has only 1-second resolution, so we add an incremented <strong>Offset</strong> for generating unique timestamps.</p>
<p>We&#8217;re now prepared to implement the <strong>BrokerAsset</strong> function:</p>
<pre class="prettyprint">double fixAmount(double Value)<br />{<br />  int Exp = log10(Value);<br />  if (Exp &gt;= 0) Exp++;<br />  return pow(10,Exp);<br />}<br /><br />DLLFUNC int BrokerAsset(char* Symbol,double* pPrice,double* pSpread,<br />double *pVolume, double *pPip, double *pPipCost, double *pMinAmount,<br />double *pMargin, double *pRollLong, double *pRollShort, double *pCommission)<br />{<br />  sprintf_s(G.Url,"markets/%s/ticker",fixSymbol(Symbol));<br />  char* Response = send(G.Url,2);<br />  if(!Response) return 0;<br />  double Bid = strvar(Response, "bidRate", 0.),<br />    Ask = strvar(Response,"askRate",0.);<br />  if (Ask &gt; 0. Bid &gt; 0. &amp;&amp; pSpread) <br />    *pSpread = Ask - Bid;<br />  double Last = strvar(Response, "lastTradeRate", 0.);<br />  if(Ask == 0. || G.PriceType == 2) <br />    Ask = Last;<br />  if (Ask == 0.) return 0; // symbol does not exist<br />  if(pPrice) *pPrice = Ask;<br />  if(pVolume) {<br />    sprintf_s(G.Url,"markets/%s/summary",fixSymbol(Symbol));<br />    Response = send(G.Url,2);<br />    if (Response) {<br />      if (G.VolType == 4)<br />        *pVolume = strvar(Response, "volume", 0);<br />    else<br />        *pVolume = strvar(Response, "quoteVolume", 0);<br />    }<br />  }<br />  if (pMinAmount) { // get lot amount<br />    sprintf_s(G.Url,"markets/%s",fixSymbol(Symbol));<br />    Response = send(G.Url,2);<br />    if (Response) {<br />      *pMinAmount = fixAmount(strvar(Response,"minTradeSize",0.000001));<br />      if (pPip) {<br />        int Exp = strvar(Response,"precision",8);<br />        *pPip = pow(10,-Exp); <br />        while (*pPip * *pMinAmount &lt; 0.000000001)<br />         *pPip *= 10; // avoid too small pip cost<br />        if (pPipCost)<br />          *pPipCost = *pPip * *pMinAmount;<br />      }<br />    }<br />  }<br />  if (pMargin) <br />    *pMargin = -100; // no leverage<br />  return 1;<br />} </pre>
<p>This function is supposed to return current price, current ask-bid spread, and current volume. It can also optionally request other asset specific parameters when available from the API. Otherwise Zorro will replace them with parameter values from the asset list. Broker APIs rarely provide all requested parameters. Make sure to only calculate and fill a parameter when its pointer passed to the function is nonzero. Most of the pointers are NULL most of the time.</p>
<p>The <strong>send</strong> function uses the second buffer because we&#8217;ll need price requests internally for calculating the account state. For getting lot amount, pip size, and pip cost, two more API requests are needed. The values from the response string are parsed with Zorro&#8217;s <strong>strvar</strong> function. The <strong>fixAmount</strong> function converts a value to its next-higher power of 10 &#8211; for instance, 7 is converted to 10 and 0.07 to 0.1. We&#8217;re doing this because we don&#8217;t want a strange number for the lot amount. The pip size is calculated from the precision, but we prevent it from going too small. Bittrex has no leverage, so the margin cost is always 100%.    </p>
<p>The next and final function sends an order to the API:</p>
<pre class="prettyprint">DLLFUNC int BrokerBuy2(char* Symbol,int Volume,double StopDist,double Limit,double *pPrice,int *pFill)<br />{<br />  if(!isConnected() || !Volume) return 0;<br /><br />// compose the body<br />  char Body[256] = "{\n";<br />  strcat_s(Body,"\"marketsymbol\": \"");<br />  strcat_s(Body,fixSymbol(Symbol));<br />  strcat_s(Body,"\",\n\"direction\": \"");<br />  strcat_s(Body,Volume &gt; 0? "BUY" : "SELL");<br />  strcat_s(Body,"\",\n\"type\": \"");<br />  strcat_s(Body,Limit &gt; 0. ? "LIMIT" : "MARKET");<br />  strcat_s(Body,"\",\n\"quantity\": \"");<br />  double Size = labs(Volume);<br />  if(G.Amount &lt; 1.) Size *= G.Amount;<br />  strcat_s(Body,ftoa(Size));<br />  if (Limit &gt; 0.) {<br />    strcat_s(Body,"\",\n\"limit\": \"");<br />    strcat_s(Body,ftoa(Limit));<br />  }<br />  strcat_s(Body,"\",\n\"timeInForce\": \"");<br />  if ((G.OrderType&amp;2) &amp;&amp; Limit &gt; 0.) <br />    strcat_s(Body,"GOOD_TIL_CANCELLED"); // limit orders only<br />  else if (G.OrderType&amp;1) <br />    strcat_s(Body,"FILL_OR_KILL"); // fill all or nothing<br />  else <br />    strcat_s(Body,"IMMEDIATE_OR_CANCEL");<br />  strcat_s(Body,"\"\n}");<br /><br />  char* Response = send("orders",1,0,Body);<br />  if(!Response) return 0;<br /><br />  char* Uuid = strtext(Response,"id","");<br />  if(!*Uuid) return 0; // failed<br />  strcpy(G.Uuid,Uuid);<br />  double Filled = strvar(Response,"fillQuantity",0);<br />  if(Filled == 0. &amp;&amp; !(G.OrderType&amp;2))<br />    return 0; // unfilled FOK/IOC order<br />  double Price = strvar(Response,"proceeds",0);<br />  if (Filled &gt; 0. &amp;&amp; Price &gt; 0. &amp;&amp; pPrice)<br />    *pPrice = Price/Filled;<br />  if (*pFill) *pFill = Filled/min(1.,G.Unit);<br />  return -1; <br />}</pre>
<p>The function first composes a message body in this JSON format (example):</p>
<pre>{<br /><span class="hljs-attr">  "marketSymbol"</span>: <span class="hljs-string">"ETH/BTC"</span>,<br /><span class="hljs-attr">  "direction"</span>: <span class="hljs-string">"BUY"</span>,<br /><span class="hljs-attr">  "type"</span>: <span class="hljs-string">"LIMIT"</span>,<br /><span class="hljs-attr">  "quantity"</span>: <span class="hljs-string">"0.1"</span>,<br /><span class="hljs-attr">  "limit"</span>: "0.008<span class="hljs-string">"</span>,<br /><span class="hljs-attr">  "timeInForce"</span>: "IMMEDIATE_OR_CANCEL<span class="hljs-string">"</span><br />}</pre>
<p>If the order is accepted, the response has this JSON format:</p>
<pre>{<br />  "id": "12345-6789-007-4711",<br />  "marketSymbol": "ETH/BTC",<br />  "direction": "BUY",<br />  "type": "LIMIT",<br />  "quantity": "0.1",<br />  "limit": "0.008",<br />  "timeInForce": "IMMEDIATE_OR_CANCEL",<br />  "fillQuantity": "0.05",<br />  "commission": "0.000002",<br />  "proceeds": "0.00001",<br />  "status": "<span class="json-property-enum" title="Possible values"><span class="json-property-enum-item">CLOSED</span></span>"<br />}</pre>
<p>The relevant fields, especially the id, the fill amount, and the fill price, are parsed from the response and returned. The return value <strong>-1</strong> indicates to Zorro that the order generated no identifer number, but an UUID. It was stored and can be retrieved with a subsequent command. <strong>G.Unit </strong>is the lot amount that was generated with the previous <strong>BrokerAsset</strong> call. </p>
<p>The remaining functions not described here &#8211; <strong>BrokerTrade</strong>, <strong>BrokerAccount</strong>, <strong>BrokerHistory2</strong>, and <strong>BrokerCommand</strong> &#8211;  are implemented in a similar way. You can find them in the full source code in the <strong>Source</strong> folder of the latest Zorro version. </p>
<p><strong>Update, November 2023:</strong> Bittrex recently announced that they will terminate their operation. So the Bittrex API plugin described herein lost its purpose, but you can still use the code as a template for connecting Zorro to any other broker or crypto exchange APIs &#8211; at least as long as they remain operational.  </p>
]]></content:encoded>
					
					<wfw:commentRss>https://financial-hacker.com/crypto-trading-with-rest-part-1/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title>Binary Options: Scam or Opportunity?</title>
		<link>https://financial-hacker.com/binary-options-scam-or-opportunity/</link>
					<comments>https://financial-hacker.com/binary-options-scam-or-opportunity/#comments</comments>
		
		<dc:creator><![CDATA[jcl]]></dc:creator>
		<pubDate>Sat, 18 Jun 2016 16:40:24 +0000</pubDate>
				<category><![CDATA[3 Most Clicked]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[System Development]]></category>
		<category><![CDATA[Binary options]]></category>
		<category><![CDATA[Broker]]></category>
		<category><![CDATA[Mean Reversion]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[Scam]]></category>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=1709</guid>

					<description><![CDATA[We&#8217;re recently getting more and more contracts for coding binary option strategies. Which gives us a slightly bad conscience, since those options are widely understood as a scheme to separate naive traders from their money. And their brokers make indeed no good impression at first look. Some are regulated in Cyprus under a fake address, &#8230; <a href="https://financial-hacker.com/binary-options-scam-or-opportunity/" class="more-link">Continue reading<span class="screen-reader-text"> "Binary Options: Scam or Opportunity?"</span></a>]]></description>
										<content:encoded><![CDATA[<p>We&#8217;re recently getting more and more contracts for coding binary option strategies. Which gives us a <strong>slightly bad conscience</strong>, since those options are widely understood as a scheme to separate naive traders from their money. And their brokers make indeed no good impression at first look. Some are regulated in Cyprus under a fake address, others are not regulated at all. They spread <strong>fabricated stories</strong> about huge profits with robots or EAs. They are said to <strong>manipulate their price curves</strong> for preventing you from winning. And if you still do, some <strong>refuse to pay out</strong>, and eventually disappear without a trace (but with your money). That&#8217;s the stories you hear about binary options brokers. Are binary options nothing but scam? Or do they offer a <strong>hidden opportunity</strong> that even their brokers are often not aware of?<span id="more-1709"></span></p>
<p>Binary options, in their most common form, are very different to <a href="http://www.financial-hacker.com/algorithmic-options-trading/" target="_blank" rel="noopener">real options</a>. They are a bet that the price of an asset will rise or fall within a given time frame. If you win the bet, the broker pays your stake multiplied with a <strong>win payout</strong> factor in the 75%..95% range. If you lose, you pay the stake minus a possible <strong>loss payout</strong>. You&#8217;re trading not against the market, but against the broker. The broker needs you to lose, otherwise they would not make any profit. Even if they really pay out your wins, and even if they do not manipulate the price curve, they can still control your profit with their payout factors. So it seems that even if you had a winning system, the broker would just reduce the payout for making sure that you lose in the long run.</p>
<p>However this conclusion is a fallacy. It can in fact be of advantage for the broker to offer a payout that allows you to win, as long as most other traders still lose. A broker has not the freedom of arbitrarily reducing the payout. He&#8217;s competing with other brokers. But why would you want to trade binary options anyway, when you also can trade serious instruments instead? If you wanted a binary outcome, you can also achieve this by opening a <a href="http://www.financial-hacker.com/algorithmic-options-trading-2/" target="_blank" rel="noopener">Put or Call Spread</a> with real options &#8211; and this with a serious broker, much higher payout factors (even &gt; 100% in some cases) and the possibility to sell the options prematurely.</p>
<p>But aside from tax advantages in some countries, there is one single compelling reason that might make a binary options trading experiment worthwhile. Profit and trading cost of a binary option are independent of the time frame. So you can trade on very short time frames, which would be difficult, if not impossible with real options or other financial instruments. You can find a discussion of this problem in the <a href="http://www.financial-hacker.com/is-scalping-irrational/" target="_blank" rel="noopener">Scalping</a> article.</p>
<h3>Binary scalping math</h3>
<p>The required minimum win rate for binary trading can be calculated from the broker&#8217;s win and loss payout:</p>
<p style="text-align: center;">[pmath size=16]W~=~ {1-Pl}/{1+Pw-Pl}[/pmath]</p>
<p><em><strong>W</strong></em> = required win rate for break even<br />
<em><strong>Pl</strong></em> = Loss payout<br />
<em><strong>Pw</strong></em> = Win payout</p>
<p>With 85% win payout and no loss payout, you need a win rate of</p>
<p style="text-align: center;">[pmath size=16]W ~=~ 1/{1.85} ~=~ 54%[/pmath]</p>
<p>54% win rate seem to be manageable on short time frames. The transaction costs of a non-binary, conventional broker would require a much higher win rate, as in the following graph from the <a href="http://www.financial-hacker.com/is-scalping-irrational/" target="_blank" rel="noopener">Scalping</a> article:</p>
<p><figure id="attachment_524" aria-describedby="caption-attachment-524" style="width: 889px" class="wp-caption alignnone"><a href="http://www.financial-hacker.com/wp-content/uploads/2015/10/scalp11.png"><img fetchpriority="high" decoding="async" class="wp-image-524 size-full" src="http://www.financial-hacker.com/wp-content/uploads/2015/10/scalp11.png" width="889" height="513" srcset="https://financial-hacker.com/wp-content/uploads/2015/10/scalp11.png 889w, https://financial-hacker.com/wp-content/uploads/2015/10/scalp11-300x173.png 300w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px" /></a><figcaption id="caption-attachment-524" class="wp-caption-text">Required win rate in percent vs. trade duration (non binary)</figcaption></figure></p>
<p>You had to win almost 80% of five-minutes trades &#8211; impossible for a trading system under normal conditions unless you enforce that win rate with some tricks, which however won&#8217;t help getting in the profit zone.</p>
<p>So,<strong> smaller trading costs on low time frames</strong> are the obvious benefit of trading binary options. With all the side benefits of low time frames, such as more data for backtests, and shorter drawdown periods in live trading. But how can we take advantage of that? There are three problems to solve.</p>
<h3>Three steps to potential binary profit</h3>
<ol>
<li>Find a strategy with a <strong>win r</strong><strong>ate</strong> that is better than the <em><strong>W</strong></em> determined with the above payout formula. But be aware that prices on small time frames are strongly feed dependent. Normally you won&#8217;t know your binary broker&#8217;s price source (if he has any at all). For being on the safe side, test with different historical price data from different serious brokers (f.i. Oanda or FXCM) and stay some percent points above the minimum <em><strong>W</strong></em>.<br />
 </li>
<li>Find a way to trade automated. Binary brokers often do not want you to do that. Consequently most do not offer a platform or API for automated trading. But they all have a web interface. So you need either a software tool (such as Zorro) that can <strong>send key strokes and mouse clicks</strong> to a website, or some other means to get your trades to the broker.<br />
  </li>
<li>Find a broker that&#8217;s halfway honest. At least one that allows you to <strong>really collect your gains</strong>. All binary brokers make it easy to deposit, but some follow the philosophy: &#8220;If you gave it to me, it&#8217;s mine.&#8221; Make test withdrawals before you deposit large amounts. Keep the account balance small. Check the broker&#8217;s opportunity to <strong>manipulate the price curve</strong>: the more customers they have and the more bets they handle, the more difficult is it to manipulate without attracting unwanted attention. Retrieve as many <strong>information</strong> as possible about your broker: Where are they really located? For some reason, fraudsters seem to be concentrated in Tel Aviv. Check what customers say about that broker &#8211; but be aware: positive statements on trader forums are often planted by the broker himself.</li>
</ol>
<p>All those issues make trading binary options sort of &#8220;messy&#8221;. However it&#8217;s the messy methods that sometimes offer the best opportunities. Ed Thorp made his first millions not with &#8216;serious trading&#8217;, but with a Blackjack strategy and with a method to estimate the value of warrants, both also considered messy and hard to calculate at that time.</p>
<h3>Step 1: The system</h3>
<p>A price curve is no random walk. At least not all of the time. Long time frames are often dominated by <a href="http://www.financial-hacker.com/build-better-strategies-part-2-model-based-systems/" target="_blank" rel="noopener">trend</a>, short time frames by <a href="http://www.financial-hacker.com/build-better-strategies-part-2-model-based-systems/" target="_blank" rel="noopener">mean reversion</a>. When transaction costs do not matter, it&#8217;s not very hard to find a system with &gt; 54% win rate on 5-minutes bars. Here&#8217;s a simple example that exploits the mean reversion tendency of short time frames (script for <a href="http://www.financial-hacker.com/hackers-tools-zorro-and-r/" target="_blank" rel="noopener">Zorro</a>):</p>
<pre class="prettyprint">var objective()
{
	return ((var)(NumWinLong+NumWinShort))/(NumLossLong+NumLossShort);
}


function run()
{
	BarPeriod = 5;
	LookBack = 100;
	NumWFOCycles = 20;
	NumCores = -1;
	
	set(BINARY);
	WinPayout = 85;
	LossPayout = 0;

	set(PARAMETERS);
	int TimePeriod = optimize(20,10,100);
	var Threshold = 0.01*(HH(TimePeriod)-LL(TimePeriod));

	if(NumOpenLong+NumOpenShort == 0) 
	{
		LifeTime = 1;
		if(HH(TimePeriod) - priceClose() &lt; Threshold)
			enterShort();
		else if(priceClose() - LL(TimePeriod) &lt; Threshold)
			enterLong();
	}
}</pre>
<p>In the C code above we defined an individual objective() function that optimizes the system for binary trading. It measures the system performance as the number of winning trades divided by the number of losing trades. Otherwise the optimizer would hunt for the most robust profit factor, which makes no sense for binary trading.</p>
<p>The setup establishes a 5 minutes bar period, which is the time frame of our bets. We use 20 WFO cycles and let the optimizer use all CPU cores but one. This way the training run takes about 5-10 minutes for 5 years data. The BINARY flag activates binary trades, and we&#8217;re simulating a broker with 85% win payout and no loss payout.</p>
<p>We have a mean reverting system that trades whenever the current price is closer than a threshold &#8211; here, 1% of recent volatility &#8211; to its previous High or Low. The time period for determining the High and Low is the only system parameter that we optimize. You could improve the system in many ways, for instance by optimizing also the threshold, by modifying the objective() function so that it prefers systems with more trades, and by applying a filter that prevents trading in non mean-reverting market regimes. Since we bet on the price in 5 minutes, we&#8217;ve set the LifeTime of a trade to one bar. Here&#8217;s the equity curve from a 5 years walk forward test with EUR/USD:</p>
<p><figure id="attachment_1935" aria-describedby="caption-attachment-1935" style="width: 879px" class="wp-caption alignnone"><a href="http://www.financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD.png"><img decoding="async" class="wp-image-1935 size-full" src="http://www.financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD.png" width="879" height="341" srcset="https://financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD.png 879w, https://financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD-300x116.png 300w, https://financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD-768x298.png 768w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px" /></a><figcaption id="caption-attachment-1935" class="wp-caption-text">Binary options</figcaption></figure></p>
<p>The system has about 56% win rate and a notable, although not spectacular positive return. Which is not achieved by the crude mean reversion mechanism, but mostly by amplifying the small entry-exit price differences through binary trading, even though the payout is only 85%. You won&#8217;t get a similar result with conventional trades. The same system not trading binary options, but leveraged forex positions produces a very different equity curve (for testing, comment out the BINARY flag and the Payout settings in the code):</p>
<p><figure id="attachment_1937" aria-describedby="caption-attachment-1937" style="width: 879px" class="wp-caption alignnone"><a href="http://www.financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD-1.png"><img decoding="async" class="wp-image-1937 size-full" src="http://www.financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD-1.png" width="879" height="341" srcset="https://financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD-1.png 879w, https://financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD-1-300x116.png 300w, https://financial-hacker.com/wp-content/uploads/2016/12/Binary_EURUSD-1-768x298.png 768w" sizes="(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px" /></a><figcaption id="caption-attachment-1937" class="wp-caption-text">Leveraged Forex</figcaption></figure></p>
<p>With the same trades we have now only 40% win rate and an overall loss, since all the trade profit is eaten up by spread and commission. </p>
<h3>Step 2: Automatizing</h3>
<p>How do you let your script automatically enter a bet at the right moment? This is a technical issue unrelated to trading, but it comes up whenever you have a broker with a web based platform and no proper connection for automatizing. Here&#8217;s a code snippet for detecting the positions of [Buy] and [Sell] buttons on a website, and automated clicking them:</p>
<pre class="prettyprint">void main()
{
	int BuyX,BuyY,SellX,SellY; // button coordinates

// open the browser	
	printf("\nOpening the broker's website...");
	exec("http://financial-hacker.com/shark.htm",0,1);

// get the position of the Buy button
	printf("\nRight click on [Buy]!");
	while(wait(50)) {
		int button = mouse(&amp;BuyX,&amp;BuyY,window(""));
		if(button &amp; 2) break;
	}
// wait until right mouse key released	
	while(wait(50)) {
		int x,y,button = mouse(&amp;x,&amp;y,0);
		if(!(button &amp; 2)) break;	
	}

// get the position of the Sell button	
	printf("\nRight click on [Sell]!");
	while(wait(50)) {
		int button = mouse(&amp;SellX,&amp;SellY,window(""));
		if(button &amp; 2) break;
	}
// wait until right mouse key released	
	while(wait(50)) {
		int x,y,button = mouse(&amp;x,&amp;y,0);
		if(!(button &amp; 2)) break;	
	}

// send mouse clicks to Buy and Sell	
	printf("\nI will now click on [Buy]!");
	keys("[click %d,%d]",BuyX,BuyY);
	printf("\nI will now click on [Sell]!");
	keys("[click %d,%d]",SellX,SellY);
	printf("\nDone!");
}
</pre>
<p>Start the script, and wait until the broker&#8217;s website pops up in your browser. Then follow the instructions in Zorro&#8217;s message window. Manoever the mouse onto the &#8220;Buy&#8221; button and hit the right mouse key. Then do the same with the &#8220;Sell&#8221; button. The script will store the button positions and then use the <a href="http://manual.zorro-project.com/keys.htm" target="_blank" rel="noopener">keys</a> function to send test clicks to both positions of the active window. For testing purposes I&#8217;ve imitated a typical binary broker&#8217;s trading platform.</p>
<p><a href="http://www.financial-hacker.com/wp-content/uploads/2016/12/sharkio.png"><img loading="lazy" decoding="async" class="alignnone wp-image-1944 size-full aligncenter" src="http://www.financial-hacker.com/wp-content/uploads/2016/12/sharkio.png" width="361" height="409" srcset="https://financial-hacker.com/wp-content/uploads/2016/12/sharkio.png 361w, https://financial-hacker.com/wp-content/uploads/2016/12/sharkio-265x300.png 265w" sizes="(max-width: 361px) 85vw, 361px" /></a></p>
<p>You now only need to glue together your trading script with the button clicking script, and adapt the latter to the website of your broker. This is left as an exercise to the reader. And better use improved versions &#8211; the scripts here are kept simple for demonstration purposes. As long as the script trades, make sure that the browser window stays in the foreground, or else it can not click on the buttons. For the position size, either enter a fixed size for all positions, or let your script click into the size field and send key strokes to set individual sizes.</p>
<h3>Step 3: The broker</h3>
<p>Of course I don&#8217;t want to recommend a particular binary options broker. In the end, they&#8217;re all crooks &#8211; but some are crookier than others. Finding a suited broker is, also, left as an exercise to the reader. Binary broker comparison websites are often &#8211; surprise, surprise &#8211; installed and paid by binary brokers. US citizens are normally not allowed to trade binary options with brokers that are not regulated in the US. Some brokers will accept your deposit nevertheless, but use that as pretext to refuse payout. If you&#8217;re a citizen of Israel, you might not be accepted by many binary brokers since they&#8217;re not allowed to fraud compatriots. </p>
<h3>Conclusion</h3>
<p>It&#8217;s often the &#8220;messy&#8221; and despised trade instruments that can still provide opportunities when they are correctly understood. I&#8217;ve uploaded the two scripts to the 2016 repository. You&#8217;ll need Zorro 1.52 or above for running them. When you now make huge profits with binary options, don&#8217;t forget where the money comes from: Not from the broker, but from his less fortunate customers that maybe just haven&#8217;t read the right blog.</p>
<hr />
<p><strong>Addendum:</strong> From all articles on this blog, this one attracted by far the most spam comments. From them it appears that a new lucrative business has established in the orbit of binary brokers: <strong>recovery fraud</strong>. As soon as you&#8217;ve lost your money, you&#8217;ll receive offers by &#8220;hackers&#8221; or &#8220;law firms&#8221; to recover it, for a fee of course. Where did they get your email from? Naturally from the very broker that bagged your money&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://financial-hacker.com/binary-options-scam-or-opportunity/feed/</wfw:commentRss>
			<slash:comments>83</slash:comments>
		
		
			</item>
		<item>
		<title>Dear Brokers&#8230;</title>
		<link>https://financial-hacker.com/dear-brokers/</link>
					<comments>https://financial-hacker.com/dear-brokers/#comments</comments>
		
		<dc:creator><![CDATA[jcl]]></dc:creator>
		<pubDate>Mon, 04 Jan 2016 14:02:11 +0000</pubDate>
				<category><![CDATA[No Math]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Broker]]></category>
		<category><![CDATA[Hacking]]></category>
		<guid isPermaLink="false">http://www.financial-hacker.com/?p=1169</guid>

					<description><![CDATA[Whatever software we&#8217;re using for automated trading: We all need some broker connection for the algorithm to receive price quotes and place trades. Seemingly a simple task. And almost any broker supports it through a protocol such as FIX, through an automated platform such as MT4™, or through a specific broker API. But if you &#8230; <a href="https://financial-hacker.com/dear-brokers/" class="more-link">Continue reading<span class="screen-reader-text"> "Dear Brokers&#8230;"</span></a>]]></description>
										<content:encoded><![CDATA[<p>Whatever software we&#8217;re using for automated trading: We all need <strong>some broker connection</strong> for the algorithm to receive price quotes and place trades. Seemingly a simple task. And almost any broker supports it through a protocol such as FIX, through an automated platform such as MT4<img src="https://s.w.org/images/core/emoji/15.0.3/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />, or through a specific broker API. But if you think you can quickly hook up your trading software to a broker API, you&#8217;re up for a bad surprise. Dear brokers &#8211; please read this post and try to make hacker&#8217;s and coder&#8217;s lifes a little easier!<span id="more-1169"></span></p>
<p>A broker API allows software to trade, receive price quotes, and download price history. Those three functions are essential for an automated system. Good-to-have additional features are retrieving trade status, account status, and asset parameters. That&#8217;s six functions, or seven when you count login/logout. A broker API has often more than 100 functions. So you should assume that at least the 6 essential are more than covered. But sadly, it is not so. The debacle begins already with installing and starting up the API. </p>
<h3>API startup</h3>
<p>Installing and starting a broker API can be so simple. The ideal case is a broker that provides no software at all, but just a protocol and a URL for a TCP/IP or UDP connection. You can then use well-established libraries such as curl or enet for connecting to the broker. In the second-best case you get an API DLL that you can redistribute to your clients. Your software then just calls the login function of that DLL, submits the authentification data and the connection is established. But for some unknown reason, many brokers feel obliged to provide connections to their APIs in much more complex and creative ways.</p>
<p><strong>Broker A</strong> required any user to run an API installation package. After an installation dialogue with several Windows incompatibility warnings, the installer produced a bunch of DLLs. Then you can go through a lengthy procedure with many steps of building up all the internal tables and data structures that you need for connecting to your account. In a previous version, the installer also modified the Registry, so you could not step around it and distribute the DLLs directly to your clients together with your software. They had to go through the installation procedure themselves. This is fortunately not required anymore with the current version.</p>
<p><strong>Broker B</strong> offers no direct connection at all. You have the choice of connecting either to their bloated Java trade platform, or to a small &#8220;Gateway&#8221; program. When you connect to the Java platform, your software must once per day log out, restart the platform, and log in again since the platform automatically shuts down every 24 hours. When you connect through the &#8220;Gateway&#8221;, you can not open their platform at the same time (not even from a different PC). So you can&#8217;t even check your positions. If you do, the Gateway connection breaks down and must be manually re-established. This is not a bug as you might think. It is intentionally implemented this way (according to the broker) as a service to their users.</p>
<p>Both broker A and broker B are major, world-wide operating Forex and stock brokers.  </p>
<h3>Getting price quotes</h3>
<p><strong>Broker A</strong> keeps its asset prices in a &#8220;Quote Table&#8221; on his server. For getting a price quote you must first subscribe to that asset. For this you do not just call a function, you build up a &#8220;Request Factory&#8221; and generate a &#8220;Subscription Request&#8221;. Now you can enter the procedure of receiving a response on your request, which involves the creation of a &#8220;Response Listener&#8221;. Subscribing to an asset this way takes about 30 primary lines of C++ code &#8211; and this does not include the secondary code for sending the requests, generating listeners, and all the supplementary stuff. My clients can consider themselves fortunate that I don&#8217;t charge by code line. Getting the price itself then only requires looking up the asset in the server&#8217;s quote table.</p>
<p><strong>Broker B</strong> makes it easy: You can not subscribe market quotes by API at all. You must do that manually on their website, and it is not free (except for Forex). For getting the price, a simple API call is sufficient. Or would be, if you knew the primary exchange, secondary exchange, asset type and sub-type, and other asset parameters. If any of them is not right, you get no price. And don&#8217;t think that these exchange and other parameters are documented somewhere. You&#8217;re supposed to find them out by trial and error, or to ask fellow programmers on the Internet.</p>
<h3>Getting price history</h3>
<p>Although any algorithm trades in real time, it still needs price history on startup for calculating initial values of its indicators and price-analyzing functions. With no access to price history, you had to wait a couple days before the first trade can be placed. Since this is not really practical, price history is an essential API function.</p>
<p><strong>Broker A</strong> provides price history with no major problem. I can almost not believe it. Ok, you must again fire up the &#8220;Request Factory&#8221;, generate requests and listeners, but about 50 code lines enable you to download historical prices. The broker charges no fee for those prices (you can even download them with a demo account), and at least the recent data, from 2010 and above, is in acceptable quality. Eight out of ten points for the price history from broker A.</p>
<p><strong>Broker B</strong> again got creative and enterprising. Their price history from demo accounts is worthless &#8211; you must indeed open a real account and deposit $10,000 when you want historical data. This sum, of course, is also required from a poor coder who only wants to implement a function for getting price history. Not that you get it then easily. Technically it&#8217;s simple &#8211; a few lines of code are enough &#8211; but you only have 60 requests. After that, the price history server is shut down for 10 minutes. 60 requests are enough for a single-asset system, but not for starting a portfolio system, and certainly not for backtests. Why this bizarre limit? Maybe broker B can&#8217;t afford a fast Internet connection for their price history server. Maybe they are using the CEO&#8217;s old PC, located in his living room, and the bandwidth goes down anytime when his kids play Tetris on it. Whatever the reason, that&#8217;s only one out of ten points for the price history from broker B.</p>
<p>Is there a broker with even zero points for the price history? Yes, there is: Broker C has no API function for retrieving historical prices at all. Apparently they had not expected that someone would really use their API. I had no choice but to advise my client to choose another broker for his algorithmic system.</p>
<h3>Handling trades</h3>
<p>We programmers tend to think binary. When we send a fill-or-kill order to the broker API, we assume that the position will be either opened (&#8220;yes&#8221;), or it will not (&#8220;no&#8221;). But from time to time, broker APIs produce a third result, like &#8220;maybe&#8221; or &#8220;I won&#8217;t tell&#8221;. A position that is maybe opened or maybe not can result in an <strong>orphaned trade</strong>. This is a trade opened by the broker, but not reported back to the trading software, and consequently not under automated control. This trade won&#8217;t be closed by a reversal or stop and can thus accumulate a large loss. It can blow the account. Orphaned trades are not a good thing.</p>
<p>Theoretically, they would be so easy to prevent. The API just needs to provide a simple order function with an identifier and a validity limit, like this:</p>
<p><strong>openAtMarket(string Asset, int Amount, int ID, int SecondsValid);</strong></p>
<p><strong>ID =</strong> dear broker, please store this identifier together with the trade and use it for retrieving the trade status in case of doubt.<br />
 <strong>SecondsValid =</strong> dear broker, please disregard the order when after the given number of seconds your API still doesn&#8217;t know if it can fill it or not, or is unable to confirm it for whatever reason. </p>
<p>That&#8217;s the ideal, but how&#8217;s the reality?</p>
<p><strong>Broker A</strong> accepts a ton of parameters in his order functions, but no user-supplied trade <strong>ID</strong> and no <strong>SecondsValid</strong> limit. After sending an order and going through the usual &#8220;Request Factory&#8221; and &#8220;Response Listener&#8221; rigmarole, you&#8217;ll receive a confirmation and can retrieve the trade identifier for managing or closing it later. Or you&#8217;ll get notified that the order failed. Or neither of both. It happens that the API does not react at all on your order, maybe due to a server hickup, an Internet outage, or because it became confused by too many Factories and Listeners. Then you can only guess if your order made it to the server or not. If it did, you have an orphaned trade. But at least you can relatively easily identify and close it manually.</p>
<p><strong>Broker B</strong> provides a simple order function, even with a user-supplied <strong>ID</strong>. And you get confirmation by a simple callback function that the order was filled or not. Usually not, since broker B needs again lots of information about the asset and the order routing, and won&#8217;t execute the order if something is missing or not fitting together. But at least you know the ID. This makes you think that you can later check the trade status. Think again: Broker B won&#8217;t reveal any information about your trades. At least not to you. In fact they do not store your trades at all. They only store net positions. So there is no way to identify orphans. Not even manually, since you can&#8217;t open the trade platform as long as an automated system is running.</p>
<h3>Account parameters and trading costs </h3>
<p><strong>Broker A</strong> provides a function where you can request leverage, pip size, pip cost, rollover, and any other parameters of the selected asset. Enough information to calculate margin and trading costs in advance, what is a good thing for an automated system &#8211; if there weren&#8217;t an important parameter missing. The API does not allow to retrieve the commission. You must enter it manually and store it per asset. Why this important parameter is not provided by the API remains broker A&#8217;s secret.</p>
<p><strong>Broker B</strong> does not have this problem, as its API provides no asset and trading cost information at all &#8211; not even the leverage. For compensation, it supports a sort of &#8220;virtual order&#8221; that can be used to calculate profit, similar to Zorro&#8217;s &#8220;phantom trades&#8221;. Theoretically you could use that to calculate some of the asset parameters in a complex way from a series of virtual orders with different lot sizes. My clients didn&#8217;t pay me for that. For simulating a broker B account in a backtest, you must therefore enter all required asset parameters and trading costs manually in a spreadsheet &#8211; which is no easy task due to the complicated fee and margin structure of that broker.</p>
<hr />
<p>There are APIs for almost all imaginable software tasks. And most are well structured nowadays and relatively easy to use. Why is it not so with most broker APIs? Dear brokers: If you think about providing API access to your customers, please look first into other broker&#8217;s solutions for learning how NOT to do it. And if really necessary, please add detailed documentation about which of the market or order parameters are really required and in which combination.</p>
<p>And if you then still are not sure how to implement your new API, just hire me. I had the dubious pleasure to implement dozens of APIs so far, and can show you how an API for algo trading should look like. And even though you&#8217;ll then have to hand over some shekels to my employer, you&#8217;ll make up for this by winning an excellent reputation. At least among the poor coders and hackers who have to implement your API.</p>
<hr />
<p><strong>Addendum (January 2017):</strong> For the sake of fairness it should be mentioned that broker B has meanwhile removed the bizarre 60 requests limit for historical data. One year of data is now available. Maybe they have read this blog. Or their CEO got a new PC for Christmas. Whatever the reason, it&#8217;s still not sufficient for backtests, but at least for live trading even large portfolio strategies.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://financial-hacker.com/dear-brokers/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
			</item>
	</channel>
</rss>
