---
title: "Welcome to our first thread of the \"Jupiter DevRel Educational Series\" 1️⃣ What happens behind..."
canonical_url: "https://typefully.com/t/rGut3Y1"
markdown_url: "https://typefully.com/t/rGut3Y1.md"
agent_guide_url: "https://typefully.com/ai-agents.md"
post_delimiter: "***"
robots: noindex
source: typefully_shared_draft
share_id: "rGut3Y1"
---

Welcome to our first thread of the "Jupiter DevRel Educational Series" 

1️⃣ What happens behind each Jupiter Swap in the background? 🤔
Difficulty: Medium 🟠

🧵 👇

![2aaeabdf-bc97-4df7-bfb4-3b899801f712.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/41c888fd-3107-4697-a490-bf347ac16564.png)

***

🚨 This thread is based on the current Swap API (not the ultra)
 0 fees are applied 🚨

Whenever you swap via the UI or you want to do it programmatically the following actions need to be performed in sequence in the background.

▫️ The optimal quote for your trading pair is been fetched
▫️ A swap transaction for this trading pair is been created
▫️ The transaction is signed and sent to the blockchain

🧵 👇

![image.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/b47cbc9a-7a28-4b67-b658-c566eaf59db9.png)

***

So our first step is to call the Jupiter quote API and pass the correct parameters.

Amount: Atomic value to swap (Before applying decimals) 💡

🧵 👇

![image.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/ee311e78-96d2-4b00-b5a7-cb2a73d134e1.png)

***

The quote API returns data that are needed to call the swap API

We will not dive in deeper into this data you can look up for more details in the documentation: https://dev.jup.ag/docs/swap-api/get-quote
or visit us on discord for questions.

🧵 👇

![27e5f5d9-0d69-4a0a-b7c5-1a5422f7d534.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/d2f6a67f-fe3a-4661-bd76-832ae1726b56.png)

***

The next step is to call the swap API.

Here we pass the public address of the user, the data we received from the quote api (see last post) and the priority fees.
It is important that the complete object we received will also be passed to this http call.

We will cover fees, priority fees & how to land a transaction in an other thread  👀
Or take a quick look at @sssionggg post below👇

🧵 👇

![image.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/0de7a51d-f4c3-4712-8f06-fde6bc7d52f0.png)

***

The response we receive from the swap API contains the swapTransaction and this has to be:

▫️ Signed by the user in his wallet
▫️ Sent to the blockchain via your favorite RPC provider

In this example we use @heliuslabs as our RPC provider.

🧵 👇

![30b9771c-5916-4155-b588-05911c16e811.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/2b288b26-5ca8-4972-91e8-cc948e964d0f.png)

***

We got you covered some code examples in out GitHub Repo:

https://github.com/Jupiter-DevRel/typescript-examples/tree/main/swap

https://github.com/Jupiter-DevRel/python-examples/tree/main/standalone_script_examples/swap-api

![image.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/ec15dea9-8775-4e94-8ba5-5cc211f389e5.png)

***

That’s a wrap for our first thread! 🧵

We hope you now have a basic understanding of the Jupiter Swap API and feel inspired to explore new challenges and use cases for this incredible feature. 🚀

Remember, we are always here to support you on your journey through the Jupiverse! 🪐 

Feel free to give us feedback, like, comment and repost to support our new journey 😻

You can find us in the developer support channel on Discord—don’t hesitate to reach out! 💡💬

![a57f837c-15d1-4660-ab6c-5d52a3c0bdd8.png](https://d3e0luujhwn38u.cloudfront.net/original/img/original/188194/a4439e79-2dda-4360-9aa5-3fd95536e2fc.png)
