This tutorial provides a solid technical bridge between multi-agent theory and practical execution in prediction markets. It is a refreshing, code-first approach to turning algorithmic logic into automated financial action.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
How I build this Multi-Agent Kalshi Trading Bot (Full code Inside) | version 4Added:
To set this calcot locally, first you need to click on the link on the description and here you'll find the template to follow this video step by step. There are two major updates in this version 4. First is multi- aent trading so you don't have to put all your eggs in one basket and second is delta which is just a fancy way of saying distance between current price and target price. If you are new here, welcome to process over profit and today we will be building this advanced trading bot from scratch. All right, so this is the uh version 4 guide. So if you tried the version 3 on past uh you probably need to redownload the nitruck and then uh do this because it is only compatible with the latest version. So the first thing what we need to do is you need to confirm whether your nitruck has this agent numbering so that we can make sure that it is on the latest version and after that it also has this new feature where you can spawn new agent so that you can trade across multiple assets uh on parallel. Okay. So if you're new here, we're going to again start everything from the scratch. So the first thing what we need to do is we're going to create a new script on the nightshark and we can copy this name and then paste it like API key and then we're going to create a new script and we're going to name it private key.
Okay. And so for this also we're going to copy it and paste it here. And then we're going to create. And now we have this API key and private key. So these are the means to connect your call account to this bot so that it can properly place the orders. Okay. So now after you go to account and security on your col you should see this create key button and here you can name it any nickname whatever you like. Just make sure before hitting the create it is on read and write and then we're going to create and it's going to give you the API key information and private key information. So, we're going to copy the API key and then we're going to go to our API key on the night truck and go to the code and we're going to paste it here and save it. And then we're going to go back and then for the private key we're going to do the same. We're going to copy the private key from the col C and then we're going to go to private key and then we're going to click on code and we're going to paste it here.
So these are very sensitive informations but uh Nerta keeps these within locally within your machine. So these are not even synced across your profile for the security purpose. Okay. So now for the third script I'm going to name it call BTC and we're going to create and we're going to go to code and here we're going to copy and paste the third code. So this is the main uh trading V code. This is about thousand lines long. So when you try to click on copy, if you're on older machine, it might take a while. So just be patience with that. So now we're going to go to our crypto sections for the BTC and open it here just for our reference.
Obviously, you're not going to need the windows open here. We're just doing it for the testing purpose. You can always shut down your um Kasu website because we're dealing with the back end here.
Okay. So now first uh so for to explain you this configuration. So I'm going to move on to the next section where I'll explain you what are these settings and how are the ways you can tweak it and what are the ways that you can actually customize it uh for this trading bot.
All right. So to understand this better I'm going to use this graph. So here you can see this is the price of up and down. So the green one is the up price and red one is the down price. And this is the underlying trend that is that happened during this uh time period. So this is May 4th uh 6:45 to 7:00 p.m.
this 15-minute window specifically.
Okay. So here time delayed means like at what time do you want to activate the bot. So here you can see this line clearly. So whenever you set it to 8 that means that bot going to activate when there is a 8 minute remaining on the session. So every session has this countdown. Um so this is one is about to end. So that is where you draw the line and you can customize it to like either 15 if you want to start from the get- go or if you want to start somewhere between the middle of the session you can set it like that. So the entry is the whenever so so entry decides like at what time like at what category we're going to start picking the side. So here um so here uh after the 8 minute the bot activates somewhere here and whenever whichever sides uh side reaches the 75 first we're going to pick that side and the exit is if that starts you know declining then uh it's going to exit at 40 this is sort of like a stop loss. So the delta is based on uh another condition that we can add that how far it is from the the opening price. So if you see this white dot here. So this is the opening price and basically we are trading on whether this will end up or down. Right? So in this case we are also measuring the distance from this. So that let's say if it's like really close to the um towards the end and then like the the underlying price is really trading near the target price then we going to end up in a really volatile situation where either $1 move up or down kind of going to decide the fate of that session. Right? So in that case we really want to avoid this. So this is why the delta was added but uh you can also um minimize you can also if you choose to not use it you can just set it to zero. So asset is which asset are we trying to uh enter on. So this is for the BTC. I'm going to explain this uh later in the setup. Okay. So the order size is the the amount of contracts that we're placing based on the size of your portfolio. So the first thing is the price base entry. So this is more kind of like the the version three where we are not considering the delta. We don't care what the delta would be like. Uh but we're just basically entering based on the pricing the the threshold the entry threshold and picking the side. So here uh whenever it reaches 75 we're going to enter that side. There is no any condition on the delta. Now instead of the entry price if you set this to 51 and you are doing the delta. So basically at this period what we are doing is you can ignore this. These are just the duplicate one. So after the 8 minute, we don't care the price where it is, but we are entering the based on the delta. Like if it is 20 uh units uh $20 far from the target, then we're going to enter. So this is delta based entry.
Okay. So for this for the delta based entry, it's really important you set the entry at 51 so that uh this is this not going to come in the way, right? So for the hybrid one, so here what we're doing is so the entry is at 85 and delta is at 10. So that means not only we're looking for 85 to enter the price. So you can also notice it would be like somewhere here. Not only we're waiting for the 85, we also want to check whether the underlying is also sufficiently enough far from the target. So this is and this way we can also like avoid the volatility especially during the late session where the price is trading you know close to the open or the target price and you know simple uh $1 movement up and down is going to flick the price to let's say 85. We really don't want to enter there. So you can also use this as a hybrid set. All right so that's enough talking. So now let's set this up. So now we can uh create a clone of this BTC and then this time it will be for the ETH. So I'm going to name it Ethereum for the ETH and another one would be for the Salana. So I'm going to name it soul and I'm going to create another clone.
And now this would be for the uh Dogecoin. Okay. So I'm going to just going to name it Dog Doge. So now all those clones are ready. So we still need a few more things to do here. So first let me spawn uh four agent for each of those script. So what this going to do is these are going these four agents are going to monitor all those four markets parallelly. Okay. And execute the orders parallely. So first let's set up our BTC for the first one. And then let's load our ETH for the second one. And let's load our Salana for the third one. And the final one would be for the Doge.
Okay. So now we're going to open the code script section because we still need to update few things here especially the market here. So for the ETH it will be ETH ETH and for the Salana it would be so soul and for the Dogecoin it would be Doge.
Okay. So I'm just going to make uh few more adjustment here. So for the delta, for the BTC, I'm going to set it to 10.
Uh for the um Ethereum, I'm going to set this to um for the Salana um I'm just going to set this zero. Okay, for the Salana and those because those are really small. Uh but you can always find out like what's their average, you know, movement is and then you set this up the appropriate delta. So, for the order size, I'm just going to put uh 10 contracts for each for this demo. And I'm just going to go ahead and save.
So, I'm going to click back, back, and back.
So, let's go to the log for the each agent. And here now, I'm going to start.
So, if you remember, uh our time delay is for 8th uh minute. So now you can see on a log that all all these agents are waiting for the last 8 minute for the uh for those markets. So right now we are trailing at around um 12th minute. So when when the 8 minute kicks in um it's going to uh start triggering and monitoring the price. So let's fast forward this.
So now we are on the 10th second to the 8th minute. So let's see the reactions.
8 minute kicked in.
So now you can see um so BTC already entered the position. ETH also entered the position and Salana also entered the position. And if you see the dose is still waiting for the 85 threshold. So if you can see it on the top there on the inside the night shark the down is at 82. So let's wait until it triggers the 85th and I think it will enter the price there too.
So let's wait for the doze.
It's close. It's getting closer.
Okay. So now it triggered to 89 which is past 85. So it also entered the position on those. So let's see fast forward this to the resolution. Now All right. So now we are on the last 10 second of this market. Looks like uh everything going to be held until the resolution. So far on this session there's no stop-loss.
Um so after this session is complete uh what's going to do is it's going to wait for the you know new market data. It's going to take about like anywhere between five to probably around like 20 second. So BTC is already uh ready to go. Uh, ETH is already ready to go. Uh, Salana is waiting and Doge is still waiting. So, now we can see Doge is also there. Now, let's see. Now, Salana also transition to a new market. So, I'm going to stop this and let's go ahead and review our U trade history.
So, let me minimize this.
So, these last four trades are the ones that was recently taken uh by the night shark. And as you can also notice, there's another one on the bottom. I think that was from a previous test run.
So, that was also that one took a loss of like $2.14.
So, it's not always, you know, sign and runos. So, there is that. And this is up to your review. And if you have any questions, comment down below.
Related Videos
OpenHuman VS Hermes AI: Who Wins?
JulianGoldieSEO
285 views•2026-05-29
Long-Running Agents — Build an Agent That Never Forgets with Google ADK
suryakunju
142 views•2026-05-30
5 Mind Blowing Omni Uses Cases
PaulJLipsky
1K views•2026-06-02
This computer is made from real human brain cells. And you can buy it.
Talktmsmedia
3K views•2026-05-28
BREAKING: Microsoft’s New Image Generating Model Beat Out GPT 1.5 and Nano Banana 2
aimmediahouse
122 views•2026-06-03
I Made the Same Anime Fight Scene in Every AI Video Generator
NobleGooseAnime
295 views•2026-05-30
Nvidia Bets Big On AI PCs | New Chip To Power Windows Laptops | Technology | AI Updates | N18S
cnnnews18
3K views•2026-06-01
I Tested NEW Opus 4.8 on Four Projects (Updated LLM Leaderboard)
AICodingDaily
298 views•2026-05-29











