|
|
@@ -107,10 +107,10 @@ export class JupiterSwapper {
|
|
|
async getTokenPrices(tokenAddresses: string[]): Promise<Record<string, { price?: number; symbol?: string }>> {
|
|
|
const result: Record<string, { price?: number; symbol?: string }> = {}
|
|
|
|
|
|
- // 1. 先尝试 Jupiter Price API
|
|
|
+ // 1. 先尝试 Jupiter Price API v3
|
|
|
try {
|
|
|
const ids = tokenAddresses.join(',')
|
|
|
- const response = await fetch(`https://api.jup.ag/price/v2?ids=${ids}`, {
|
|
|
+ const response = await fetch(`https://api.jup.ag/price/v3?ids=${ids}`, {
|
|
|
headers: this.getHeaders(),
|
|
|
})
|
|
|
if (response.ok) {
|