How To Turn Your AI Agent Into a Trading Bot

corbin· 8 min· 1,881 words· 9 min read· English ·Watch on YouTube

This is the full transcript of How To Turn Your AI Agent Into a Trading Bot, published on YouTube by corbin. Every paragraph carries the moment it was spoken, so you can click any line to jump straight to that point in the video, search the whole thing for a word, or copy it out.

0:00Your AI agent can trade now. To put simply, you can give an AI agent real money and a strategy and it can make you money. Therefore, by the end of this video, you're going to learn how to set up your own trading bot. Does that sound good? Let's jump in. Today's video is sponsored by Kraken and they wanted me to check out their CLI and just to put simply, y'all, what a CLI is is it gives your agent the ability to do same actions that you could do. What makes Kraken super cool is that they built out a very comprehensive Kraken CLI here that allows you to do trade, sell,

0:31everything of this nature. This is a full-blown toolkit for your AI agent to do trades and run strategies. Let's set it up. As it's a CLI, this is going to work with any of your app builders. I'm personally going to use Cursor today, but if you use Cloud Code, Codex, whatever you use, you're going to be able to integrate this CLI. So, I'm over in Cursor. I love Cursor. We are going to do this prompt here. Install the Kraken CLI. You're going to provide the relevant link here and I'll make sure I put this in the description down below and build me a simple buy the dip

0:57Bitcoin trading bot using a paper trading account. on every 0.5% dip, sell on each 1% gain, give it a dark web dashboard with a live price chart, P&L, trade log. This is so we can visually see it and then run it and let me watch the trade live. This is our initial prompt, right? This is setting our base layer. I'm going to hit

1:13enter here and let it start cooking. What you need to understand is a couple things. First thing, when using Kraken CLI, please, please, please provide this link. Specifically, you go to the website, you can check it out here. If you're a developer, you can copy and install. But, the point being is that you provide this link so you can get all the relevant docs associated with how to leverage this CLI correctly with an AI agent. Artificial intelligence is so good now that providing a simple link will allow it to search and get the relevant information it needs to set up this kind of environment. So, once you

1:40provide the link, it has the grounding of this data. You don't need to know how to develop, right? This is literally just a prompt. It's going to start building this out and therefore, once it starts building it out, we can start making algorithms for how we want to trade. And the one I'm showing you today is going to be an algorithm where if you're bullish on Bitcoin, like you see I think it's like 61k right now, whatever it is, right? You're bullish on Bitcoin. You can create a strategy around that where in your mind mentally you're like, "Based off my preconception, I think Bitcoin's going to go up." Therefore, create a strategy

2:08around that. So, if you think Bitcoin's going to go down, then short it, right? So, it goes both ways. This gets into other stuff within the CLI, like futures and margin trading, but this is today's example. All right, so here we go. As we know, when we're building something locally, we can view it in a web browser, so it provided the relevant here we can pull up. I'm going to copy this and open in the cursor browser. And this is nice, yo. I like this. So, right now we're using a paper trading account, which I suggest you do initially just so you can get comfortable, make sure your

2:36strategy looks good, and it essentially works as expected. But, what's good about this is that we can easily make this into a live account and then put real money in once we're confident in that this works. Look at this, yo. It's actually live right now, and what you'll notice is it was, right, $61,000. What you'll notice is that this is all using that CLI to get us the real information on what the price of Bitcoin

2:59is and actually be doing trades on it. So, for example, it's right here. Next buy trigger is $61,131 bucks. And what you'll notice is that the reason that's the buy trigger is that when the price goes down, we buy, and then if it goes up a percent, it will sell. This is, you know, like a bull straddle situation. And what you'll notice is that I can let this keep running, you know, for 6 hours and see where we are at when it comes to how much money we made or how much money we lost, everything of this nature, and then tweak the strategy off of that. So,

3:30it's not just Bitcoin, y'all. For example, what are all things we can trade with Kraken CLI? If I were to enter here, and then it's going to give me a directory of everything we can plug into a trade like this. This gets super cool because if you think about it, this is just one strategy. In theory, there are multiple strategies we could create here and then interchange into this application we're creating. It's all just code we're shooting out. We're not like siloed into anything. We are literally just using the CLI provided by Kraken to create real trades and do activities within the markets, but let our AI agent handle that. So, coming

4:03over here, you'll notice we can do other stuff such as Ethereum, Solana. We can also trade futures if you're into futures. We can also do forex, which is fiat to fiat pairs like EUR to USD, AUD to USD and do type of straddle trades there as well. But now that we built out the infrastructure here, what I'm curious about is creating another strategy. So, we can ask questions like, "Okay, this looks cool. What are the other strategy we can develop? Give me the top three." We can also change the user interface here if, you know, we don't like this coloring or we want a different style on it, of course. So,

4:30look at these two different strategies here. I think we're going to build out the momentum one right now. What was really cool here is this cross asset rotation strategy. So, as we know with the CLI's breadth, we have access to a ton of different assets. And what we do here is that we're able to rank every X amount of minute, like every 5 minutes, every 2 minutes, whatever the amount, Bitcoin, Ethereum, Solana, and see which one has recent momentum that we could trade on and then therefore the AI agent would discretionally choose, "Hey, Ethereum right now is hot. For the last 2 hours it's been hot." And it's going

4:59to start trading on Ethereum compared to being locked into just maybe a Bitcoin bot. Let me check out this one though. Let's do two. And what we do here is that we're going to go to plan mode, do this and hit enter and we're going to build out the infrastructure to handle a different type of algorithm trade. This stuff is actually insane, y'all, that we can create this so easily now with the CLI. From what I remember, remember like 3 years ago, 4 years ago, people would make these kind of like AI trading bot and they would charge like 3 grand, 4 grand to get access to it. But as you're

5:28seeing here in this video, we're able to set this up and fire it up in a couple minutes, which really just awesome. Like this is actually super cool. So, we got a little questions here. How should the momentum bot relate to the running dip bot? Obviously separate bots, separate trading. And then we can do fast 1 minute on the how fast it trades. Think about this logically though, the way I would definitely structure your architecture is very much so that you almost create separate pipelines or algorithms specific to the type of trade. So, the dip bot would be a specific type of trade and you can kind

5:57of create nuance of that. And then this momentum trade is going to be a very specific type of trade. Therefore, it's always better to silo out this information. The last thing we would need is make it extra confusing where there is overlap in the code between the dip bot and the momentum bot. We're

6:10going to set this up. Guys, here we go. The momentum bot was created. What you notice in the top right here stored architecturally correct. We have two separate folders and the relevant bots and trading strategy. And on top of that, we have two separate dashboards. So, I can go ahead and click on this link here and load up our momentum trading bot. This is where it shines, right? We're using paper trading here so that you can create a strategy, let it run, see long term if it is a net positive or net negative depending on your input. Your next question might be, "Hey Corby, this is really cool. This is

6:41all local, so what's the next steps here to have this run 24/7?" And that is simply just connecting something like Vercel, Google Cloud, Cloudflare, launching a virtual machine, a VM, and then letting this code run in that virtual machine. But, what you'll see here is that it is following all this relevant information. We can make this chart look better if we wanted to. I think it's just super cool, y'all. Not only do we have two bots running at the exact same time, but we have dedicated dashboards that are custom to what we care about. And you'll see that it's starting to draw in the relevant EMAs

7:10here. So, I'm going to go ahead and point out a couple other things here you should know about this CLI. First off, we already saw the paper trading value. That's super cool. But, one that's really like important that I'm glad they added was this dead man's switch where if it's tweaking out, you're using this AI agent and you're like, "Hold up, I have a real thousand dollars in there

7:28and something's going on I don't like." You can do this dead man's switch which basically makes it so that all orders, all operations are canceled and you can have the peace of mind that all trading money activities is stopped. And finally, which is really cool is it's It's source. So, you have access to all the code, you know exactly what you're putting into your system, and can proceed. So, as you already know these type of videos, make sure you leave a like, and I'll see you in the next The Quant Lady just showed how to create an AI trading agent with Kraken CLI, and have access to a bunch of different

7:53equities to a bunch of different trades type of video.

Where these words come from. This is the caption track YouTube holds for this video, written automatically by YouTube rather than by the creator. We read it, tidied the line breaks and laid it out so it can be read. The plain text version is at https://viewrankai.com/tools/youtube-transcript/XELulgzI-MM.txt.

All rights in this video belong to corbin. Watch it on YouTube. If this is your video and you would rather this page did not exist, tell us and we will remove it.