In this section of the workflow, all we're doing is getting our URLs ready for the download tool to download current prices. We're going to use two input files, one which lists the exchanges, we want to look up. And the second list the coins we're interested in for arbitrage. We're then going to do a Cartesian join using the append fields tool by combining all columns and records together. You'll notice for the exchange input, I've put a placeholder coin name called temp one. This is where we're going to replace the part of our URL with the coin name from the second input file.
So for this example, I'll use XRP. And the URL will say api.by Nance, calm blah, blah, blah XRP BTC bitrix calm equals BTC hyphen, x RP, and API dot coo coin bah bah bah x RP XRP hyphen BTC. So let's start by dragging in to text input tools into our new workflow. I've obtained the API URLs by going to the documentation from each exchange. For your convenience, I've placed them in the text file in our course files under Chapter 11. We'll copy those and paste them into our text input.
And we'll call this URL into the right. We'll put the exchange names in there. So this one will be finance, tracks, and coupons. For our second text input, you can insert the coins that you want to look up. Just as an example I'll be using ripple Litecoin and EOS, their symbol names Ah, x RP, LTC and Eos. Now let's drag in and append fields to from the join tab.
Let's rearrange the column order. So that name is at the top URLs in the middle and exchanges at the bottom. In terms of size, I think I've seen coin names up to five characters long. So just give it a bit of buffer and maybe use 10. URL. I know our current exchanges have pretty short URLs.
But in case we want to include an exchange in the future with a really long URL, we can probably bump this up to 1000. And exchange names are relatively short but who use a size of 100. We'll add a browse tool to the end of this and if we run our workflow, we'll see our append fields tool has created Both text inputs, but our URLs are still showing temp one. Let's update this now by dragging in a formula tool from the preparation tab. The output column we want to update is URL. So we'll select that.
And the function we want to use is replace. Let's update the parameters. Firstly, with the string that we want to look up, which is URL. We'll double click on that and locate the URL variable followed by the delimiter or text we want to find which is TMP one. And then the text we want to replace it with will be the coin name. So we'll double click on that and select name.
If we run out of workflow again. After adding a browse we can see that our delimiter temp one has been replaced with our coin names and URLs are now ready to download the price information.