跳到正文
Skillpedia
API 与服务器(后端)7.0k · #13635

jupiter-swap-migration

它能做什么

本指南展示如何把现有的 Jupiter 兑换代码,从旧的 Metis v1 或 Ultra 端点更新到统一的 Swap API v2。它说明新的基础地址和端点变化,适合兑换代码已失效或需要升级的开发者。

适用场景

  • ✓当你的应用仍在调用旧的 Jupiter v1 报价或兑换指令端点时。
  • ✓当 API 变更后,你的 Jupiter 兑换功能停止工作的时候。
  • ✓当你需要从 Ultra 端点迁移到较新的订单或构建端点的时候。

技能链接

https://github.com/internet-court/internet-court-skill/blob/main/vendored/jupiter/jupiter-swap-migration/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/internet-court/internet-court-skill/blob/main/vendored/jupiter/jupiter-swap-migration/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的 Jupiter 兑换功能因为调用了旧的 v1 报价端点而失效了,我该如何迁移到 v2?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在你的代码中找到旧的调用,更新基础地址,并切换到统一的构建或订单端点。该技能列出了需要检查的已重命名参数和响应变化。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Jupiter Swap Migration Guide

Migrate existing Jupiter swap integrations from Metis (v1) or Ultra to the unified Swap API v2.

Target Base URL: https://api.jup.ag/swap/v2 Auth: x-api-key from developers.jup.ag (unchanged)

Use/Do Not Use

Use when:

  • Migrating code that calls api.jup.ag/swap/v1/quote, api.jup.ag/swap/v1/swap-instructions, or ultra-api.jup.ag.
  • Updating Jupiter swap endpoints to v2.
  • Switching from Metis two-step flow to the unified /build or /order endpoint.

Do not use when:

  • Building a new Jupiter integration from scratch (use integrating-jupiter skill instead).
  • Working with non-swap Jupiter APIs (Lend, Trigger, Recurring, etc.).

Triggers: ultra, metis, ultra swap, ultra api, ultra-api.jup.ag, /ultra/v1, swap/v1, swap-instructions, migrate swap, ultra migration, metis migration, swap v1 to v2, v1 to v2, upgrade jupiter, swap-instructions deprecated, deprecated swap, old jupiter api, swap upgrade, update swap api, quote endpoint deprecated, swap stopped working, swap broken, ExactOut removed, swapMode removed, userPublicKey, parameter rename, addressLookupTable, response format changed


Migration Paths

Source Target Effort When to choose
Ultra → /order GET /swap/v2/order + POST /swap/v2/execute Minimal (URL change only) Default for Ultra users
Metis → /build GET /swap/v2/build Moderate (parameter + response mapping) Need transaction composability
Metis → /order GET /swap/v2/order + POST /swap/v2/execute Moderate (flow change) Don't need tx modification, want managed execution

Path Details

Each path has a dedicated example with before/after code, parameter mappings, and response changes:


Post-Migration Checklist

  1. URL audit: Search codebase for ultra-api.jup.ag, /ultra/v1/, /swap/v1/quote, /swap/v1/swap-instructions — all should be replaced
  2. Parameter rename: userPublicKey → taker (for /build path)
  3. swapMode removal: V2 only supports ExactIn. If using ExactOut, redesign the flow — this mode is no longer available
  4. slippageBps default: /build defaults to 50 bps if omitted. For /order, verify the default if your integration relies on a specific value
  5. Response field names: Verify your code uses inputAmountResult/outputAmountResult for the /execute response (the canonical v2 field names)
  6. ALT handling: If using /build, switch from addressLookupTableAddresses (array) to addressesByLookupTableAddress (object) — remove RPC ALT resolution code
  7. Fee event parsing: V2 instructions don't emit fee events — update any transaction parser that depends on them
  8. Route plan format: If parsing route plans, use bps field (canonical) instead of percent
  9. Error codes: Update error handling to match Swap v2 error codes
  10. Test: Run end-to-end swap on devnet/mainnet with small amount to verify

Sunset

Remove this skill once Jupiter decommissions the v1 (/swap/v1) endpoints and the Ultra (ultra-api.jup.ag) domain. At that point all integrations will already be on v2.

Review by: 2026-09-01 — check if v1/Ultra endpoints have been decommissioned.

References

Migration is split into three profile-targeted guides (the old single migration page no longer exists):

常见问题

本指南适用于全新的 Jupiter 集成吗?

不适用。对于新代码,该技能会引导你查看通用的 Jupiter 集成指南。

迁移过程中 API 密钥会改变吗?

不会。该技能说明 x-api-key 请求头保持不变。

旧代码中哪些部分最容易出问题?

已重命名的参数、已移除的选项(例如 ExactOut 和 swapMode),以及已改变的响应格式。

详情

作者的原始描述

Migration guide from Jupiter Metis (v1) or Ultra to Swap API v2. Use when migrating existing Jupiter swap integrations, updating base URLs, or transitioning from quote+swap-instructions to the unified build endpoint.

repo: internet-court/internet-court-skill

热度

GitHub 星标
7.0k
排名
#13635
许可证
—
更新时间
2026/10/26

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能